diff options
author | Tejun Heo <tj@kernel.org> | 2013-01-23 12:31:01 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-01-23 12:31:01 -0500 |
commit | c14afb82ffff5903a701a9fb737ac20f36d1f755 (patch) | |
tree | 304dcc7b1d7b9a5f564f7e978228e61ef41fbef2 /include | |
parent | 0fdff3ec6d87856cdcc99e69cf42143fdd6c56b4 (diff) | |
parent | 1d8549085377674224bf30a368284c391a3ce40e (diff) |
Merge branch 'master' into for-3.9-async
To receive f56c3196f251012de9b3ebaff55732a9074fdaae ("async: fix
__lowest_in_progress()").
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include')
145 files changed, 1639 insertions, 651 deletions
diff --git a/include/Kbuild b/include/Kbuild index 83256b64166a..1dfd33e8d43b 100644 --- a/include/Kbuild +++ b/include/Kbuild | |||
@@ -1,8 +1,5 @@ | |||
1 | # Top-level Makefile calls into asm-$(ARCH) | 1 | # Top-level Makefile calls into asm-$(ARCH) |
2 | # List only non-arch directories below | 2 | # List only non-arch directories below |
3 | 3 | ||
4 | header-y += linux/ | ||
5 | header-y += sound/ | ||
6 | header-y += rdma/ | ||
7 | header-y += video/ | 4 | header-y += video/ |
8 | header-y += scsi/ | 5 | header-y += scsi/ |
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index d1e93284d72a..33bbbae4ddc6 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h | |||
@@ -12,7 +12,6 @@ | |||
12 | #define __ASM_GENERIC_IO_H | 12 | #define __ASM_GENERIC_IO_H |
13 | 13 | ||
14 | #include <asm/page.h> /* I/O is all done through memory accesses */ | 14 | #include <asm/page.h> /* I/O is all done through memory accesses */ |
15 | #include <asm/cacheflush.h> | ||
16 | #include <linux/types.h> | 15 | #include <linux/types.h> |
17 | 16 | ||
18 | #ifdef CONFIG_GENERIC_IOMAP | 17 | #ifdef CONFIG_GENERIC_IOMAP |
@@ -223,36 +222,6 @@ static inline void outsl(unsigned long addr, const void *buffer, int count) | |||
223 | } | 222 | } |
224 | #endif | 223 | #endif |
225 | 224 | ||
226 | static inline void readsl(const void __iomem *addr, void *buf, int len) | ||
227 | { | ||
228 | insl(addr - PCI_IOBASE, buf, len); | ||
229 | } | ||
230 | |||
231 | static inline void readsw(const void __iomem *addr, void *buf, int len) | ||
232 | { | ||
233 | insw(addr - PCI_IOBASE, buf, len); | ||
234 | } | ||
235 | |||
236 | static inline void readsb(const void __iomem *addr, void *buf, int len) | ||
237 | { | ||
238 | insb(addr - PCI_IOBASE, buf, len); | ||
239 | } | ||
240 | |||
241 | static inline void writesl(const void __iomem *addr, const void *buf, int len) | ||
242 | { | ||
243 | outsl(addr - PCI_IOBASE, buf, len); | ||
244 | } | ||
245 | |||
246 | static inline void writesw(const void __iomem *addr, const void *buf, int len) | ||
247 | { | ||
248 | outsw(addr - PCI_IOBASE, buf, len); | ||
249 | } | ||
250 | |||
251 | static inline void writesb(const void __iomem *addr, const void *buf, int len) | ||
252 | { | ||
253 | outsb(addr - PCI_IOBASE, buf, len); | ||
254 | } | ||
255 | |||
256 | #ifndef CONFIG_GENERIC_IOMAP | 225 | #ifndef CONFIG_GENERIC_IOMAP |
257 | #define ioread8(addr) readb(addr) | 226 | #define ioread8(addr) readb(addr) |
258 | #define ioread16(addr) readw(addr) | 227 | #define ioread16(addr) readw(addr) |
diff --git a/include/asm-generic/mmu.h b/include/asm-generic/mmu.h index 4f4aa56d6b52..0ed3f1cfb854 100644 --- a/include/asm-generic/mmu.h +++ b/include/asm-generic/mmu.h | |||
@@ -7,8 +7,12 @@ | |||
7 | */ | 7 | */ |
8 | #ifndef __ASSEMBLY__ | 8 | #ifndef __ASSEMBLY__ |
9 | typedef struct { | 9 | typedef struct { |
10 | struct vm_list_struct *vmlist; | ||
11 | unsigned long end_brk; | 10 | unsigned long end_brk; |
11 | |||
12 | #ifdef CONFIG_BINFMT_ELF_FDPIC | ||
13 | unsigned long exec_fdpic_loadmap; | ||
14 | unsigned long interp_fdpic_loadmap; | ||
15 | #endif | ||
12 | } mm_context_t; | 16 | } mm_context_t; |
13 | #endif | 17 | #endif |
14 | 18 | ||
diff --git a/include/asm-generic/parport.h b/include/asm-generic/parport.h index 40528cb977e8..2c9f9d4336ca 100644 --- a/include/asm-generic/parport.h +++ b/include/asm-generic/parport.h | |||
@@ -10,8 +10,8 @@ | |||
10 | * to devices on the PCI bus. | 10 | * to devices on the PCI bus. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | static int __devinit parport_pc_find_isa_ports(int autoirq, int autodma); | 13 | static int parport_pc_find_isa_ports(int autoirq, int autodma); |
14 | static int __devinit parport_pc_find_nonpci_ports(int autoirq, int autodma) | 14 | static int parport_pc_find_nonpci_ports(int autoirq, int autodma) |
15 | { | 15 | { |
16 | #ifdef CONFIG_ISA | 16 | #ifdef CONFIG_ISA |
17 | return parport_pc_find_isa_ports(autoirq, autodma); | 17 | return parport_pc_find_isa_ports(autoirq, autodma); |
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index 701beab27aab..5cf680a98f9b 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
@@ -461,10 +461,8 @@ static inline int is_zero_pfn(unsigned long pfn) | |||
461 | return offset_from_zero_pfn <= (zero_page_mask >> PAGE_SHIFT); | 461 | return offset_from_zero_pfn <= (zero_page_mask >> PAGE_SHIFT); |
462 | } | 462 | } |
463 | 463 | ||
464 | static inline unsigned long my_zero_pfn(unsigned long addr) | 464 | #define my_zero_pfn(addr) page_to_pfn(ZERO_PAGE(addr)) |
465 | { | 465 | |
466 | return page_to_pfn(ZERO_PAGE(addr)); | ||
467 | } | ||
468 | #else | 466 | #else |
469 | static inline int is_zero_pfn(unsigned long pfn) | 467 | static inline int is_zero_pfn(unsigned long pfn) |
470 | { | 468 | { |
diff --git a/include/asm-generic/syscalls.h b/include/asm-generic/syscalls.h index 58f466ff00d3..1db51b8524e9 100644 --- a/include/asm-generic/syscalls.h +++ b/include/asm-generic/syscalls.h | |||
@@ -21,10 +21,12 @@ asmlinkage long sys_mmap(unsigned long addr, unsigned long len, | |||
21 | unsigned long fd, off_t pgoff); | 21 | unsigned long fd, off_t pgoff); |
22 | #endif | 22 | #endif |
23 | 23 | ||
24 | #ifndef CONFIG_GENERIC_SIGALTSTACK | ||
24 | #ifndef sys_sigaltstack | 25 | #ifndef sys_sigaltstack |
25 | asmlinkage long sys_sigaltstack(const stack_t __user *, stack_t __user *, | 26 | asmlinkage long sys_sigaltstack(const stack_t __user *, stack_t __user *, |
26 | struct pt_regs *); | 27 | struct pt_regs *); |
27 | #endif | 28 | #endif |
29 | #endif | ||
28 | 30 | ||
29 | #ifndef sys_rt_sigreturn | 31 | #ifndef sys_rt_sigreturn |
30 | asmlinkage long sys_rt_sigreturn(struct pt_regs *regs); | 32 | asmlinkage long sys_rt_sigreturn(struct pt_regs *regs); |
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index ed6642ad03e0..25f01d0bc149 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h | |||
@@ -78,6 +78,14 @@ struct mmu_gather_batch { | |||
78 | #define MAX_GATHER_BATCH \ | 78 | #define MAX_GATHER_BATCH \ |
79 | ((PAGE_SIZE - sizeof(struct mmu_gather_batch)) / sizeof(void *)) | 79 | ((PAGE_SIZE - sizeof(struct mmu_gather_batch)) / sizeof(void *)) |
80 | 80 | ||
81 | /* | ||
82 | * Limit the maximum number of mmu_gather batches to reduce a risk of soft | ||
83 | * lockups for non-preemptible kernels on huge machines when a lot of memory | ||
84 | * is zapped during unmapping. | ||
85 | * 10K pages freed at once should be safe even without a preemption point. | ||
86 | */ | ||
87 | #define MAX_GATHER_BATCH_COUNT (10000UL/MAX_GATHER_BATCH) | ||
88 | |||
81 | /* struct mmu_gather is an opaque type used by the mm code for passing around | 89 | /* struct mmu_gather is an opaque type used by the mm code for passing around |
82 | * any data needed by arch specific code for tlb_remove_page. | 90 | * any data needed by arch specific code for tlb_remove_page. |
83 | */ | 91 | */ |
@@ -96,6 +104,7 @@ struct mmu_gather { | |||
96 | struct mmu_gather_batch *active; | 104 | struct mmu_gather_batch *active; |
97 | struct mmu_gather_batch local; | 105 | struct mmu_gather_batch local; |
98 | struct page *__pages[MMU_GATHER_BUNDLE]; | 106 | struct page *__pages[MMU_GATHER_BUNDLE]; |
107 | unsigned int batch_count; | ||
99 | }; | 108 | }; |
100 | 109 | ||
101 | #define HAVE_GENERIC_MMU_GATHER | 110 | #define HAVE_GENERIC_MMU_GATHER |
diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h index 06d7f798a08c..3527fb3f75bb 100644 --- a/include/drm/drm_mm.h +++ b/include/drm/drm_mm.h | |||
@@ -70,7 +70,7 @@ struct drm_mm { | |||
70 | unsigned long scan_color; | 70 | unsigned long scan_color; |
71 | unsigned long scan_size; | 71 | unsigned long scan_size; |
72 | unsigned long scan_hit_start; | 72 | unsigned long scan_hit_start; |
73 | unsigned scan_hit_size; | 73 | unsigned long scan_hit_end; |
74 | unsigned scanned_blocks; | 74 | unsigned scanned_blocks; |
75 | unsigned long scan_start; | 75 | unsigned long scan_start; |
76 | unsigned long scan_end; | 76 | unsigned long scan_end; |
@@ -158,12 +158,29 @@ static inline struct drm_mm_node *drm_mm_get_block_atomic_range( | |||
158 | return drm_mm_get_block_range_generic(parent, size, alignment, 0, | 158 | return drm_mm_get_block_range_generic(parent, size, alignment, 0, |
159 | start, end, 1); | 159 | start, end, 1); |
160 | } | 160 | } |
161 | extern int drm_mm_insert_node(struct drm_mm *mm, struct drm_mm_node *node, | 161 | |
162 | unsigned long size, unsigned alignment); | 162 | extern int drm_mm_insert_node(struct drm_mm *mm, |
163 | struct drm_mm_node *node, | ||
164 | unsigned long size, | ||
165 | unsigned alignment); | ||
163 | extern int drm_mm_insert_node_in_range(struct drm_mm *mm, | 166 | extern int drm_mm_insert_node_in_range(struct drm_mm *mm, |
164 | struct drm_mm_node *node, | 167 | struct drm_mm_node *node, |
165 | unsigned long size, unsigned alignment, | 168 | unsigned long size, |
166 | unsigned long start, unsigned long end); | 169 | unsigned alignment, |
170 | unsigned long start, | ||
171 | unsigned long end); | ||
172 | extern int drm_mm_insert_node_generic(struct drm_mm *mm, | ||
173 | struct drm_mm_node *node, | ||
174 | unsigned long size, | ||
175 | unsigned alignment, | ||
176 | unsigned long color); | ||
177 | extern int drm_mm_insert_node_in_range_generic(struct drm_mm *mm, | ||
178 | struct drm_mm_node *node, | ||
179 | unsigned long size, | ||
180 | unsigned alignment, | ||
181 | unsigned long color, | ||
182 | unsigned long start, | ||
183 | unsigned long end); | ||
167 | extern void drm_mm_put_block(struct drm_mm_node *cur); | 184 | extern void drm_mm_put_block(struct drm_mm_node *cur); |
168 | extern void drm_mm_remove_node(struct drm_mm_node *node); | 185 | extern void drm_mm_remove_node(struct drm_mm_node *node); |
169 | extern void drm_mm_replace_node(struct drm_mm_node *old, struct drm_mm_node *new); | 186 | extern void drm_mm_replace_node(struct drm_mm_node *old, struct drm_mm_node *new); |
diff --git a/include/drm/exynos_drm.h b/include/drm/exynos_drm.h index 808dad29607a..d6aeaf3c6d6c 100644 --- a/include/drm/exynos_drm.h +++ b/include/drm/exynos_drm.h | |||
@@ -6,24 +6,10 @@ | |||
6 | * Joonyoung Shim <jy0922.shim@samsung.com> | 6 | * Joonyoung Shim <jy0922.shim@samsung.com> |
7 | * Seung-Woo Kim <sw0312.kim@samsung.com> | 7 | * Seung-Woo Kim <sw0312.kim@samsung.com> |
8 | * | 8 | * |
9 | * Permission is hereby granted, free of charge, to any person obtaining a | 9 | * This program is free software; you can redistribute it and/or modify it |
10 | * copy of this software and associated documentation files (the "Software"), | 10 | * under the terms of the GNU General Public License as published by the |
11 | * to deal in the Software without restriction, including without limitation | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
12 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 12 | * option) any later version. |
13 | * and/or sell copies of the Software, and to permit persons to whom the | ||
14 | * Software is furnished to do so, subject to the following conditions: | ||
15 | * | ||
16 | * The above copyright notice and this permission notice (including the next | ||
17 | * paragraph) shall be included in all copies or substantial portions of the | ||
18 | * Software. | ||
19 | * | ||
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
23 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
24 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
25 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
26 | * OTHER DEALINGS IN THE SOFTWARE. | ||
27 | */ | 13 | */ |
28 | #ifndef _EXYNOS_DRM_H_ | 14 | #ifndef _EXYNOS_DRM_H_ |
29 | #define _EXYNOS_DRM_H_ | 15 | #define _EXYNOS_DRM_H_ |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild deleted file mode 100644 index 7fe2dae251e5..000000000000 --- a/include/linux/Kbuild +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | header-y += dvb/ | ||
2 | header-y += hdlc/ | ||
3 | header-y += hsi/ | ||
4 | header-y += raid/ | ||
5 | header-y += usb/ | ||
diff --git a/include/linux/asn1.h b/include/linux/asn1.h index 5c3f4e4b9a23..eed6982860ba 100644 --- a/include/linux/asn1.h +++ b/include/linux/asn1.h | |||
@@ -64,4 +64,6 @@ enum asn1_tag { | |||
64 | ASN1_LONG_TAG = 31 /* Long form tag */ | 64 | ASN1_LONG_TAG = 31 /* Long form tag */ |
65 | }; | 65 | }; |
66 | 66 | ||
67 | #define ASN1_INDEFINITE_LENGTH 0x80 | ||
68 | |||
67 | #endif /* _LINUX_ASN1_H */ | 69 | #endif /* _LINUX_ASN1_H */ |
diff --git a/include/linux/ata.h b/include/linux/ata.h index 408da9502177..8f7a3d68371a 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -297,10 +297,12 @@ enum { | |||
297 | ATA_LOG_SATA_NCQ = 0x10, | 297 | ATA_LOG_SATA_NCQ = 0x10, |
298 | ATA_LOG_SATA_ID_DEV_DATA = 0x30, | 298 | ATA_LOG_SATA_ID_DEV_DATA = 0x30, |
299 | ATA_LOG_SATA_SETTINGS = 0x08, | 299 | ATA_LOG_SATA_SETTINGS = 0x08, |
300 | ATA_LOG_DEVSLP_MDAT = 0x30, | 300 | ATA_LOG_DEVSLP_OFFSET = 0x30, |
301 | ATA_LOG_DEVSLP_SIZE = 0x08, | ||
302 | ATA_LOG_DEVSLP_MDAT = 0x00, | ||
301 | ATA_LOG_DEVSLP_MDAT_MASK = 0x1F, | 303 | ATA_LOG_DEVSLP_MDAT_MASK = 0x1F, |
302 | ATA_LOG_DEVSLP_DETO = 0x31, | 304 | ATA_LOG_DEVSLP_DETO = 0x01, |
303 | ATA_LOG_DEVSLP_VALID = 0x37, | 305 | ATA_LOG_DEVSLP_VALID = 0x07, |
304 | ATA_LOG_DEVSLP_VALID_MASK = 0x80, | 306 | ATA_LOG_DEVSLP_VALID_MASK = 0x80, |
305 | 307 | ||
306 | /* READ/WRITE LONG (obsolete) */ | 308 | /* READ/WRITE LONG (obsolete) */ |
diff --git a/include/linux/ata_platform.h b/include/linux/ata_platform.h index fe9989636b62..b9fde17f767c 100644 --- a/include/linux/ata_platform.h +++ b/include/linux/ata_platform.h | |||
@@ -15,12 +15,12 @@ struct pata_platform_info { | |||
15 | unsigned int irq_flags; | 15 | unsigned int irq_flags; |
16 | }; | 16 | }; |
17 | 17 | ||
18 | extern int __devinit __pata_platform_probe(struct device *dev, | 18 | extern int __pata_platform_probe(struct device *dev, |
19 | struct resource *io_res, | 19 | struct resource *io_res, |
20 | struct resource *ctl_res, | 20 | struct resource *ctl_res, |
21 | struct resource *irq_res, | 21 | struct resource *irq_res, |
22 | unsigned int ioport_shift, | 22 | unsigned int ioport_shift, |
23 | int __pio_mask); | 23 | int __pio_mask); |
24 | 24 | ||
25 | /* | 25 | /* |
26 | * Marvell SATA private data | 26 | * Marvell SATA private data |
diff --git a/include/linux/audit.h b/include/linux/audit.h index bce729afbcf9..5a6d718adf34 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #define _LINUX_AUDIT_H_ | 24 | #define _LINUX_AUDIT_H_ |
25 | 25 | ||
26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
27 | #include <linux/ptrace.h> | ||
27 | #include <uapi/linux/audit.h> | 28 | #include <uapi/linux/audit.h> |
28 | 29 | ||
29 | struct audit_sig_info { | 30 | struct audit_sig_info { |
@@ -157,7 +158,8 @@ void audit_core_dumps(long signr); | |||
157 | 158 | ||
158 | static inline void audit_seccomp(unsigned long syscall, long signr, int code) | 159 | static inline void audit_seccomp(unsigned long syscall, long signr, int code) |
159 | { | 160 | { |
160 | if (unlikely(!audit_dummy_context())) | 161 | /* Force a record to be reported if a signal was delivered. */ |
162 | if (signr || unlikely(!audit_dummy_context())) | ||
161 | __audit_seccomp(syscall, signr, code); | 163 | __audit_seccomp(syscall, signr, code); |
162 | } | 164 | } |
163 | 165 | ||
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 2a9a9abc9126..12731a19ef06 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
@@ -114,6 +114,7 @@ struct backing_dev_info { | |||
114 | int bdi_init(struct backing_dev_info *bdi); | 114 | int bdi_init(struct backing_dev_info *bdi); |
115 | void bdi_destroy(struct backing_dev_info *bdi); | 115 | void bdi_destroy(struct backing_dev_info *bdi); |
116 | 116 | ||
117 | __printf(3, 4) | ||
117 | int bdi_register(struct backing_dev_info *bdi, struct device *parent, | 118 | int bdi_register(struct backing_dev_info *bdi, struct device *parent, |
118 | const char *fmt, ...); | 119 | const char *fmt, ...); |
119 | int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev); | 120 | int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev); |
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h index 93b1e091b1e9..e0ce311011c0 100644 --- a/include/linux/bcma/bcma.h +++ b/include/linux/bcma/bcma.h | |||
@@ -350,6 +350,7 @@ extern void bcma_core_set_clockmode(struct bcma_device *core, | |||
350 | enum bcma_clkmode clkmode); | 350 | enum bcma_clkmode clkmode); |
351 | extern void bcma_core_pll_ctl(struct bcma_device *core, u32 req, u32 status, | 351 | extern void bcma_core_pll_ctl(struct bcma_device *core, u32 req, u32 status, |
352 | bool on); | 352 | bool on); |
353 | extern u32 bcma_chipco_pll_read(struct bcma_drv_cc *cc, u32 offset); | ||
353 | #define BCMA_DMA_TRANSLATION_MASK 0xC0000000 | 354 | #define BCMA_DMA_TRANSLATION_MASK 0xC0000000 |
354 | #define BCMA_DMA_TRANSLATION_NONE 0x00000000 | 355 | #define BCMA_DMA_TRANSLATION_NONE 0x00000000 |
355 | #define BCMA_DMA_TRANSLATION_DMA32_CMT 0x40000000 /* Client Mode Translation for 32-bit DMA */ | 356 | #define BCMA_DMA_TRANSLATION_DMA32_CMT 0x40000000 /* Client Mode Translation for 32-bit DMA */ |
diff --git a/include/linux/bcma/bcma_driver_gmac_cmn.h b/include/linux/bcma/bcma_driver_gmac_cmn.h index def894b83b0d..4dd1f33e36a2 100644 --- a/include/linux/bcma/bcma_driver_gmac_cmn.h +++ b/include/linux/bcma/bcma_driver_gmac_cmn.h | |||
@@ -92,7 +92,7 @@ struct bcma_drv_gmac_cmn { | |||
92 | #define gmac_cmn_write32(gc, offset, val) bcma_write32((gc)->core, offset, val) | 92 | #define gmac_cmn_write32(gc, offset, val) bcma_write32((gc)->core, offset, val) |
93 | 93 | ||
94 | #ifdef CONFIG_BCMA_DRIVER_GMAC_CMN | 94 | #ifdef CONFIG_BCMA_DRIVER_GMAC_CMN |
95 | extern void __devinit bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc); | 95 | extern void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc); |
96 | #else | 96 | #else |
97 | static inline void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc) { } | 97 | static inline void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc) { } |
98 | #endif | 98 | #endif |
diff --git a/include/linux/bcma/bcma_driver_pci.h b/include/linux/bcma/bcma_driver_pci.h index 41da581e1612..c48d98d27b77 100644 --- a/include/linux/bcma/bcma_driver_pci.h +++ b/include/linux/bcma/bcma_driver_pci.h | |||
@@ -214,7 +214,7 @@ struct bcma_drv_pci { | |||
214 | #define pcicore_write16(pc, offset, val) bcma_write16((pc)->core, offset, val) | 214 | #define pcicore_write16(pc, offset, val) bcma_write16((pc)->core, offset, val) |
215 | #define pcicore_write32(pc, offset, val) bcma_write32((pc)->core, offset, val) | 215 | #define pcicore_write32(pc, offset, val) bcma_write32((pc)->core, offset, val) |
216 | 216 | ||
217 | extern void __devinit bcma_core_pci_init(struct bcma_drv_pci *pc); | 217 | extern void bcma_core_pci_init(struct bcma_drv_pci *pc); |
218 | extern int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, | 218 | extern int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, |
219 | struct bcma_device *core, bool enable); | 219 | struct bcma_device *core, bool enable); |
220 | extern void bcma_core_pci_extend_L1timer(struct bcma_drv_pci *pc, bool extend); | 220 | extern void bcma_core_pci_extend_L1timer(struct bcma_drv_pci *pc, bool extend); |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index a4c2b565c835..0530b9860359 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -112,6 +112,7 @@ extern int setup_arg_pages(struct linux_binprm * bprm, | |||
112 | unsigned long stack_top, | 112 | unsigned long stack_top, |
113 | int executable_stack); | 113 | int executable_stack); |
114 | extern int bprm_mm_init(struct linux_binprm *bprm); | 114 | extern int bprm_mm_init(struct linux_binprm *bprm); |
115 | extern int bprm_change_interp(char *interp, struct linux_binprm *bprm); | ||
115 | extern int copy_strings_kernel(int argc, const char *const *argv, | 116 | extern int copy_strings_kernel(int argc, const char *const *argv, |
116 | struct linux_binprm *bprm); | 117 | struct linux_binprm *bprm); |
117 | extern int prepare_bprm_creds(struct linux_binprm *bprm); | 118 | extern int prepare_bprm_creds(struct linux_binprm *bprm); |
@@ -119,8 +120,4 @@ extern void install_exec_creds(struct linux_binprm *bprm); | |||
119 | extern void set_binfmt(struct linux_binfmt *new); | 120 | extern void set_binfmt(struct linux_binfmt *new); |
120 | extern void free_bprm(struct linux_binprm *); | 121 | extern void free_bprm(struct linux_binprm *); |
121 | 122 | ||
122 | #ifdef __ARCH_WANT_KERNEL_EXECVE | ||
123 | extern void ret_from_kernel_execve(struct pt_regs *normal) __noreturn; | ||
124 | #endif | ||
125 | |||
126 | #endif /* _LINUX_BINFMTS_H */ | 123 | #endif /* _LINUX_BINFMTS_H */ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index acb4f7bbbd32..f94bc83011ed 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -1188,14 +1188,25 @@ static inline int queue_discard_alignment(struct request_queue *q) | |||
1188 | 1188 | ||
1189 | static inline int queue_limit_discard_alignment(struct queue_limits *lim, sector_t sector) | 1189 | static inline int queue_limit_discard_alignment(struct queue_limits *lim, sector_t sector) |
1190 | { | 1190 | { |
1191 | sector_t alignment = sector << 9; | 1191 | unsigned int alignment, granularity, offset; |
1192 | alignment = sector_div(alignment, lim->discard_granularity); | ||
1193 | 1192 | ||
1194 | if (!lim->max_discard_sectors) | 1193 | if (!lim->max_discard_sectors) |
1195 | return 0; | 1194 | return 0; |
1196 | 1195 | ||
1197 | alignment = lim->discard_granularity + lim->discard_alignment - alignment; | 1196 | /* Why are these in bytes, not sectors? */ |
1198 | return sector_div(alignment, lim->discard_granularity); | 1197 | alignment = lim->discard_alignment >> 9; |
1198 | granularity = lim->discard_granularity >> 9; | ||
1199 | if (!granularity) | ||
1200 | return 0; | ||
1201 | |||
1202 | /* Offset of the partition start in 'granularity' sectors */ | ||
1203 | offset = sector_div(sector, granularity); | ||
1204 | |||
1205 | /* And why do we do this modulus *again* in blkdev_issue_discard()? */ | ||
1206 | offset = (granularity + alignment - offset) % granularity; | ||
1207 | |||
1208 | /* Turn it back into bytes, gaah */ | ||
1209 | return offset << 9; | ||
1199 | } | 1210 | } |
1200 | 1211 | ||
1201 | static inline int bdev_discard_alignment(struct block_device *bdev) | 1212 | static inline int bdev_discard_alignment(struct block_device *bdev) |
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h index 6470792b13d3..084d3c622b12 100644 --- a/include/linux/ceph/libceph.h +++ b/include/linux/ceph/libceph.h | |||
@@ -43,7 +43,6 @@ struct ceph_options { | |||
43 | struct ceph_entity_addr my_addr; | 43 | struct ceph_entity_addr my_addr; |
44 | int mount_timeout; | 44 | int mount_timeout; |
45 | int osd_idle_ttl; | 45 | int osd_idle_ttl; |
46 | int osd_timeout; | ||
47 | int osd_keepalive_timeout; | 46 | int osd_keepalive_timeout; |
48 | 47 | ||
49 | /* | 48 | /* |
@@ -63,7 +62,6 @@ struct ceph_options { | |||
63 | * defaults | 62 | * defaults |
64 | */ | 63 | */ |
65 | #define CEPH_MOUNT_TIMEOUT_DEFAULT 60 | 64 | #define CEPH_MOUNT_TIMEOUT_DEFAULT 60 |
66 | #define CEPH_OSD_TIMEOUT_DEFAULT 60 /* seconds */ | ||
67 | #define CEPH_OSD_KEEPALIVE_DEFAULT 5 | 65 | #define CEPH_OSD_KEEPALIVE_DEFAULT 5 |
68 | #define CEPH_OSD_IDLE_TTL_DEFAULT 60 | 66 | #define CEPH_OSD_IDLE_TTL_DEFAULT 60 |
69 | 67 | ||
diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h index e37acbe989a9..10a417f9f76f 100644 --- a/include/linux/ceph/osdmap.h +++ b/include/linux/ceph/osdmap.h | |||
@@ -123,6 +123,7 @@ extern int ceph_calc_pg_acting(struct ceph_osdmap *osdmap, struct ceph_pg pgid, | |||
123 | extern int ceph_calc_pg_primary(struct ceph_osdmap *osdmap, | 123 | extern int ceph_calc_pg_primary(struct ceph_osdmap *osdmap, |
124 | struct ceph_pg pgid); | 124 | struct ceph_pg pgid); |
125 | 125 | ||
126 | extern const char *ceph_pg_pool_name_by_id(struct ceph_osdmap *map, u64 id); | ||
126 | extern int ceph_pg_poolid_by_name(struct ceph_osdmap *map, const char *name); | 127 | extern int ceph_pg_poolid_by_name(struct ceph_osdmap *map, const char *name); |
127 | 128 | ||
128 | #endif | 129 | #endif |
diff --git a/include/linux/ceph/rados.h b/include/linux/ceph/rados.h index de91fbdf127e..2c04afeead1c 100644 --- a/include/linux/ceph/rados.h +++ b/include/linux/ceph/rados.h | |||
@@ -87,6 +87,8 @@ struct ceph_pg { | |||
87 | * | 87 | * |
88 | * lpgp_num -- as above. | 88 | * lpgp_num -- as above. |
89 | */ | 89 | */ |
90 | #define CEPH_NOPOOL ((__u64) (-1)) /* pool id not defined */ | ||
91 | |||
90 | #define CEPH_PG_TYPE_REP 1 | 92 | #define CEPH_PG_TYPE_REP 1 |
91 | #define CEPH_PG_TYPE_RAID4 2 | 93 | #define CEPH_PG_TYPE_RAID4 2 |
92 | #define CEPH_PG_POOL_VERSION 2 | 94 | #define CEPH_PG_POOL_VERSION 2 |
diff --git a/include/linux/compaction.h b/include/linux/compaction.h index 6ecb6dc2f303..cc7bddeaf553 100644 --- a/include/linux/compaction.h +++ b/include/linux/compaction.h | |||
@@ -22,7 +22,7 @@ extern int sysctl_extfrag_handler(struct ctl_table *table, int write, | |||
22 | extern int fragmentation_index(struct zone *zone, unsigned int order); | 22 | extern int fragmentation_index(struct zone *zone, unsigned int order); |
23 | extern unsigned long try_to_compact_pages(struct zonelist *zonelist, | 23 | extern unsigned long try_to_compact_pages(struct zonelist *zonelist, |
24 | int order, gfp_t gfp_mask, nodemask_t *mask, | 24 | int order, gfp_t gfp_mask, nodemask_t *mask, |
25 | bool sync, bool *contended, struct page **page); | 25 | bool sync, bool *contended); |
26 | extern int compact_pgdat(pg_data_t *pgdat, int order); | 26 | extern int compact_pgdat(pg_data_t *pgdat, int order); |
27 | extern void reset_isolation_suitable(pg_data_t *pgdat); | 27 | extern void reset_isolation_suitable(pg_data_t *pgdat); |
28 | extern unsigned long compaction_suitable(struct zone *zone, int order); | 28 | extern unsigned long compaction_suitable(struct zone *zone, int order); |
@@ -75,7 +75,7 @@ static inline bool compaction_restarting(struct zone *zone, int order) | |||
75 | #else | 75 | #else |
76 | static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, | 76 | static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, |
77 | int order, gfp_t gfp_mask, nodemask_t *nodemask, | 77 | int order, gfp_t gfp_mask, nodemask_t *nodemask, |
78 | bool sync, bool *contended, struct page **page) | 78 | bool sync, bool *contended) |
79 | { | 79 | { |
80 | return COMPACT_CONTINUE; | 80 | return COMPACT_CONTINUE; |
81 | } | 81 | } |
diff --git a/include/linux/compat.h b/include/linux/compat.h index e4920bd58a47..dec7e2d18875 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -23,6 +23,61 @@ | |||
23 | #define COMPAT_USE_64BIT_TIME 0 | 23 | #define COMPAT_USE_64BIT_TIME 0 |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | #ifndef __SC_DELOUSE | ||
27 | #define __SC_DELOUSE(t,v) ((t)(unsigned long)(v)) | ||
28 | #endif | ||
29 | |||
30 | #define __SC_CCAST1(t1, a1) __SC_DELOUSE(t1,a1) | ||
31 | #define __SC_CCAST2(t2, a2, ...) __SC_DELOUSE(t2,a2), __SC_CCAST1(__VA_ARGS__) | ||
32 | #define __SC_CCAST3(t3, a3, ...) __SC_DELOUSE(t3,a3), __SC_CCAST2(__VA_ARGS__) | ||
33 | #define __SC_CCAST4(t4, a4, ...) __SC_DELOUSE(t4,a4), __SC_CCAST3(__VA_ARGS__) | ||
34 | #define __SC_CCAST5(t5, a5, ...) __SC_DELOUSE(t5,a5), __SC_CCAST4(__VA_ARGS__) | ||
35 | #define __SC_CCAST6(t6, a6, ...) __SC_DELOUSE(t6,a6), __SC_CCAST5(__VA_ARGS__) | ||
36 | #define COMPAT_SYSCALL_DEFINE1(name, ...) \ | ||
37 | COMPAT_SYSCALL_DEFINEx(1, _##name, __VA_ARGS__) | ||
38 | #define COMPAT_SYSCALL_DEFINE2(name, ...) \ | ||
39 | COMPAT_SYSCALL_DEFINEx(2, _##name, __VA_ARGS__) | ||
40 | #define COMPAT_SYSCALL_DEFINE3(name, ...) \ | ||
41 | COMPAT_SYSCALL_DEFINEx(3, _##name, __VA_ARGS__) | ||
42 | #define COMPAT_SYSCALL_DEFINE4(name, ...) \ | ||
43 | COMPAT_SYSCALL_DEFINEx(4, _##name, __VA_ARGS__) | ||
44 | #define COMPAT_SYSCALL_DEFINE5(name, ...) \ | ||
45 | COMPAT_SYSCALL_DEFINEx(5, _##name, __VA_ARGS__) | ||
46 | #define COMPAT_SYSCALL_DEFINE6(name, ...) \ | ||
47 | COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) | ||
48 | |||
49 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS | ||
50 | |||
51 | #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ | ||
52 | asmlinkage long compat_sys##name(__SC_DECL##x(__VA_ARGS__)); \ | ||
53 | static inline long C_SYSC##name(__SC_DECL##x(__VA_ARGS__)); \ | ||
54 | asmlinkage long compat_SyS##name(__SC_LONG##x(__VA_ARGS__)) \ | ||
55 | { \ | ||
56 | return (long) C_SYSC##name(__SC_CCAST##x(__VA_ARGS__)); \ | ||
57 | } \ | ||
58 | SYSCALL_ALIAS(compat_sys##name, compat_SyS##name); \ | ||
59 | static inline long C_SYSC##name(__SC_DECL##x(__VA_ARGS__)) | ||
60 | |||
61 | #else /* CONFIG_HAVE_SYSCALL_WRAPPERS */ | ||
62 | |||
63 | #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ | ||
64 | asmlinkage long compat_sys##name(__SC_DECL##x(__VA_ARGS__)) | ||
65 | |||
66 | #endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */ | ||
67 | |||
68 | #ifndef compat_user_stack_pointer | ||
69 | #define compat_user_stack_pointer() current_user_stack_pointer() | ||
70 | #endif | ||
71 | #ifdef CONFIG_GENERIC_SIGALTSTACK | ||
72 | #ifndef compat_sigaltstack /* we'll need that for MIPS */ | ||
73 | typedef struct compat_sigaltstack { | ||
74 | compat_uptr_t ss_sp; | ||
75 | int ss_flags; | ||
76 | compat_size_t ss_size; | ||
77 | } compat_stack_t; | ||
78 | #endif | ||
79 | #endif | ||
80 | |||
26 | #define compat_jiffies_to_clock_t(x) \ | 81 | #define compat_jiffies_to_clock_t(x) \ |
27 | (((unsigned long)(x) * COMPAT_USER_HZ) / HZ) | 82 | (((unsigned long)(x) * COMPAT_USER_HZ) / HZ) |
28 | 83 | ||
@@ -587,6 +642,13 @@ asmlinkage ssize_t compat_sys_process_vm_writev(compat_pid_t pid, | |||
587 | 642 | ||
588 | asmlinkage long compat_sys_sendfile(int out_fd, int in_fd, | 643 | asmlinkage long compat_sys_sendfile(int out_fd, int in_fd, |
589 | compat_off_t __user *offset, compat_size_t count); | 644 | compat_off_t __user *offset, compat_size_t count); |
645 | #ifdef CONFIG_GENERIC_SIGALTSTACK | ||
646 | asmlinkage long compat_sys_sigaltstack(const compat_stack_t __user *uss_ptr, | ||
647 | compat_stack_t __user *uoss_ptr); | ||
648 | |||
649 | int compat_restore_altstack(const compat_stack_t __user *uss); | ||
650 | int __compat_save_altstack(compat_stack_t __user *, unsigned long); | ||
651 | #endif | ||
590 | 652 | ||
591 | asmlinkage long compat_sys_sched_rr_get_interval(compat_pid_t pid, | 653 | asmlinkage long compat_sys_sched_rr_get_interval(compat_pid_t pid, |
592 | struct compat_timespec __user *interval); | 654 | struct compat_timespec __user *interval); |
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 412bc6c2b023..662fd1b4c42a 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
@@ -31,6 +31,8 @@ | |||
31 | 31 | ||
32 | #define __linktime_error(message) __attribute__((__error__(message))) | 32 | #define __linktime_error(message) __attribute__((__error__(message))) |
33 | 33 | ||
34 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ||
35 | |||
34 | #if __GNUC_MINOR__ >= 5 | 36 | #if __GNUC_MINOR__ >= 5 |
35 | /* | 37 | /* |
36 | * Mark a position in code as unreachable. This can be used to | 38 | * Mark a position in code as unreachable. This can be used to |
@@ -63,3 +65,13 @@ | |||
63 | #define __compiletime_warning(message) __attribute__((warning(message))) | 65 | #define __compiletime_warning(message) __attribute__((warning(message))) |
64 | #define __compiletime_error(message) __attribute__((error(message))) | 66 | #define __compiletime_error(message) __attribute__((error(message))) |
65 | #endif | 67 | #endif |
68 | |||
69 | #ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP | ||
70 | #if __GNUC_MINOR__ >= 4 | ||
71 | #define __HAVE_BUILTIN_BSWAP32__ | ||
72 | #define __HAVE_BUILTIN_BSWAP64__ | ||
73 | #endif | ||
74 | #if __GNUC_MINOR__ >= 8 || (defined(__powerpc__) && __GNUC_MINOR__ >= 6) | ||
75 | #define __HAVE_BUILTIN_BSWAP16__ | ||
76 | #endif | ||
77 | #endif | ||
diff --git a/include/linux/compiler-intel.h b/include/linux/compiler-intel.h index d8e636e5607d..973ce10c40b6 100644 --- a/include/linux/compiler-intel.h +++ b/include/linux/compiler-intel.h | |||
@@ -29,3 +29,10 @@ | |||
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | #define uninitialized_var(x) x | 31 | #define uninitialized_var(x) x |
32 | |||
33 | #ifndef __HAVE_BUILTIN_BSWAP16__ | ||
34 | /* icc has this, but it's called _bswap16 */ | ||
35 | #define __HAVE_BUILTIN_BSWAP16__ | ||
36 | #define __builtin_bswap16 _bswap16 | ||
37 | #endif | ||
38 | |||
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index b121554f1fe2..dd852b73b286 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -44,6 +44,10 @@ extern void __chk_io_ptr(const volatile void __iomem *); | |||
44 | # define __rcu | 44 | # define __rcu |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | /* Indirect macros required for expanded argument pasting, eg. __LINE__. */ | ||
48 | #define ___PASTE(a,b) a##b | ||
49 | #define __PASTE(a,b) ___PASTE(a,b) | ||
50 | |||
47 | #ifdef __KERNEL__ | 51 | #ifdef __KERNEL__ |
48 | 52 | ||
49 | #ifdef __GNUC__ | 53 | #ifdef __GNUC__ |
@@ -166,6 +170,11 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); | |||
166 | (typeof(ptr)) (__ptr + (off)); }) | 170 | (typeof(ptr)) (__ptr + (off)); }) |
167 | #endif | 171 | #endif |
168 | 172 | ||
173 | /* Not-quite-unique ID. */ | ||
174 | #ifndef __UNIQUE_ID | ||
175 | # define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __LINE__) | ||
176 | #endif | ||
177 | |||
169 | #endif /* __KERNEL__ */ | 178 | #endif /* __KERNEL__ */ |
170 | 179 | ||
171 | #endif /* __ASSEMBLY__ */ | 180 | #endif /* __ASSEMBLY__ */ |
diff --git a/include/linux/cpu_rmap.h b/include/linux/cpu_rmap.h index ac3bbb5b9502..1739510d8994 100644 --- a/include/linux/cpu_rmap.h +++ b/include/linux/cpu_rmap.h | |||
@@ -13,9 +13,11 @@ | |||
13 | #include <linux/cpumask.h> | 13 | #include <linux/cpumask.h> |
14 | #include <linux/gfp.h> | 14 | #include <linux/gfp.h> |
15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
16 | #include <linux/kref.h> | ||
16 | 17 | ||
17 | /** | 18 | /** |
18 | * struct cpu_rmap - CPU affinity reverse-map | 19 | * struct cpu_rmap - CPU affinity reverse-map |
20 | * @refcount: kref for object | ||
19 | * @size: Number of objects to be reverse-mapped | 21 | * @size: Number of objects to be reverse-mapped |
20 | * @used: Number of objects added | 22 | * @used: Number of objects added |
21 | * @obj: Pointer to array of object pointers | 23 | * @obj: Pointer to array of object pointers |
@@ -23,6 +25,7 @@ | |||
23 | * based on affinity masks | 25 | * based on affinity masks |
24 | */ | 26 | */ |
25 | struct cpu_rmap { | 27 | struct cpu_rmap { |
28 | struct kref refcount; | ||
26 | u16 size, used; | 29 | u16 size, used; |
27 | void **obj; | 30 | void **obj; |
28 | struct { | 31 | struct { |
@@ -33,15 +36,7 @@ struct cpu_rmap { | |||
33 | #define CPU_RMAP_DIST_INF 0xffff | 36 | #define CPU_RMAP_DIST_INF 0xffff |
34 | 37 | ||
35 | extern struct cpu_rmap *alloc_cpu_rmap(unsigned int size, gfp_t flags); | 38 | extern struct cpu_rmap *alloc_cpu_rmap(unsigned int size, gfp_t flags); |
36 | 39 | extern int cpu_rmap_put(struct cpu_rmap *rmap); | |
37 | /** | ||
38 | * free_cpu_rmap - free CPU affinity reverse-map | ||
39 | * @rmap: Reverse-map allocated with alloc_cpu_rmap(), or %NULL | ||
40 | */ | ||
41 | static inline void free_cpu_rmap(struct cpu_rmap *rmap) | ||
42 | { | ||
43 | kfree(rmap); | ||
44 | } | ||
45 | 40 | ||
46 | extern int cpu_rmap_add(struct cpu_rmap *rmap, void *obj); | 41 | extern int cpu_rmap_add(struct cpu_rmap *rmap, void *obj); |
47 | extern int cpu_rmap_update(struct cpu_rmap *rmap, u16 index, | 42 | extern int cpu_rmap_update(struct cpu_rmap *rmap, u16 index, |
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 3711b34dc4f9..24cd1037b6d6 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
@@ -126,9 +126,9 @@ struct cpuidle_driver { | |||
126 | struct module *owner; | 126 | struct module *owner; |
127 | int refcnt; | 127 | int refcnt; |
128 | 128 | ||
129 | unsigned int power_specified:1; | ||
130 | /* set to 1 to use the core cpuidle time keeping (for all states). */ | 129 | /* set to 1 to use the core cpuidle time keeping (for all states). */ |
131 | unsigned int en_core_tk_irqen:1; | 130 | unsigned int en_core_tk_irqen:1; |
131 | /* states array must be ordered in decreasing power consumption */ | ||
132 | struct cpuidle_state states[CPUIDLE_STATE_MAX]; | 132 | struct cpuidle_state states[CPUIDLE_STATE_MAX]; |
133 | int state_count; | 133 | int state_count; |
134 | int safe_state_index; | 134 | int safe_state_index; |
diff --git a/include/linux/cred.h b/include/linux/cred.h index abb2cd50f6b2..04421e825365 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
@@ -128,7 +128,6 @@ struct cred { | |||
128 | struct key *process_keyring; /* keyring private to this process */ | 128 | struct key *process_keyring; /* keyring private to this process */ |
129 | struct key *thread_keyring; /* keyring private to this thread */ | 129 | struct key *thread_keyring; /* keyring private to this thread */ |
130 | struct key *request_key_auth; /* assumed request_key authority */ | 130 | struct key *request_key_auth; /* assumed request_key authority */ |
131 | struct thread_group_cred *tgcred; /* thread-group shared credentials */ | ||
132 | #endif | 131 | #endif |
133 | #ifdef CONFIG_SECURITY | 132 | #ifdef CONFIG_SECURITY |
134 | void *security; /* subjective LSM security */ | 133 | void *security; /* subjective LSM security */ |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 59200795482e..c1754b59ddd3 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -202,7 +202,6 @@ struct dentry_operations { | |||
202 | #define DCACHE_MOUNTED 0x10000 /* is a mountpoint */ | 202 | #define DCACHE_MOUNTED 0x10000 /* is a mountpoint */ |
203 | #define DCACHE_NEED_AUTOMOUNT 0x20000 /* handle automount on this dir */ | 203 | #define DCACHE_NEED_AUTOMOUNT 0x20000 /* handle automount on this dir */ |
204 | #define DCACHE_MANAGE_TRANSIT 0x40000 /* manage transit from this dirent */ | 204 | #define DCACHE_MANAGE_TRANSIT 0x40000 /* manage transit from this dirent */ |
205 | #define DCACHE_NEED_LOOKUP 0x80000 /* dentry requires i_op->lookup */ | ||
206 | #define DCACHE_MANAGED_DENTRY \ | 205 | #define DCACHE_MANAGED_DENTRY \ |
207 | (DCACHE_MOUNTED|DCACHE_NEED_AUTOMOUNT|DCACHE_MANAGE_TRANSIT) | 206 | (DCACHE_MOUNTED|DCACHE_NEED_AUTOMOUNT|DCACHE_MANAGE_TRANSIT) |
208 | 207 | ||
@@ -408,13 +407,6 @@ static inline bool d_mountpoint(struct dentry *dentry) | |||
408 | return dentry->d_flags & DCACHE_MOUNTED; | 407 | return dentry->d_flags & DCACHE_MOUNTED; |
409 | } | 408 | } |
410 | 409 | ||
411 | static inline bool d_need_lookup(struct dentry *dentry) | ||
412 | { | ||
413 | return dentry->d_flags & DCACHE_NEED_LOOKUP; | ||
414 | } | ||
415 | |||
416 | extern void d_clear_need_lookup(struct dentry *dentry); | ||
417 | |||
418 | extern int sysctl_vfs_cache_pressure; | 410 | extern int sysctl_vfs_cache_pressure; |
419 | 411 | ||
420 | #endif /* __LINUX_DCACHE_H */ | 412 | #endif /* __LINUX_DCACHE_H */ |
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 38d27a10aa5d..bf6afa2fc432 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -23,7 +23,6 @@ typedef enum { STATUSTYPE_INFO, STATUSTYPE_TABLE } status_type_t; | |||
23 | union map_info { | 23 | union map_info { |
24 | void *ptr; | 24 | void *ptr; |
25 | unsigned long long ll; | 25 | unsigned long long ll; |
26 | unsigned target_request_nr; | ||
27 | }; | 26 | }; |
28 | 27 | ||
29 | /* | 28 | /* |
@@ -46,8 +45,7 @@ typedef void (*dm_dtr_fn) (struct dm_target *ti); | |||
46 | * = 1: simple remap complete | 45 | * = 1: simple remap complete |
47 | * = 2: The target wants to push back the io | 46 | * = 2: The target wants to push back the io |
48 | */ | 47 | */ |
49 | typedef int (*dm_map_fn) (struct dm_target *ti, struct bio *bio, | 48 | typedef int (*dm_map_fn) (struct dm_target *ti, struct bio *bio); |
50 | union map_info *map_context); | ||
51 | typedef int (*dm_map_request_fn) (struct dm_target *ti, struct request *clone, | 49 | typedef int (*dm_map_request_fn) (struct dm_target *ti, struct request *clone, |
52 | union map_info *map_context); | 50 | union map_info *map_context); |
53 | 51 | ||
@@ -60,8 +58,7 @@ typedef int (*dm_map_request_fn) (struct dm_target *ti, struct request *clone, | |||
60 | * 2 : The target wants to push back the io | 58 | * 2 : The target wants to push back the io |
61 | */ | 59 | */ |
62 | typedef int (*dm_endio_fn) (struct dm_target *ti, | 60 | typedef int (*dm_endio_fn) (struct dm_target *ti, |
63 | struct bio *bio, int error, | 61 | struct bio *bio, int error); |
64 | union map_info *map_context); | ||
65 | typedef int (*dm_request_endio_fn) (struct dm_target *ti, | 62 | typedef int (*dm_request_endio_fn) (struct dm_target *ti, |
66 | struct request *clone, int error, | 63 | struct request *clone, int error, |
67 | union map_info *map_context); | 64 | union map_info *map_context); |
@@ -193,18 +190,30 @@ struct dm_target { | |||
193 | * A number of zero-length barrier requests that will be submitted | 190 | * A number of zero-length barrier requests that will be submitted |
194 | * to the target for the purpose of flushing cache. | 191 | * to the target for the purpose of flushing cache. |
195 | * | 192 | * |
196 | * The request number will be placed in union map_info->target_request_nr. | 193 | * The request number can be accessed with dm_bio_get_target_request_nr. |
197 | * It is a responsibility of the target driver to remap these requests | 194 | * It is a responsibility of the target driver to remap these requests |
198 | * to the real underlying devices. | 195 | * to the real underlying devices. |
199 | */ | 196 | */ |
200 | unsigned num_flush_requests; | 197 | unsigned num_flush_requests; |
201 | 198 | ||
202 | /* | 199 | /* |
203 | * The number of discard requests that will be submitted to the | 200 | * The number of discard requests that will be submitted to the target. |
204 | * target. map_info->request_nr is used just like num_flush_requests. | 201 | * The request number can be accessed with dm_bio_get_target_request_nr. |
205 | */ | 202 | */ |
206 | unsigned num_discard_requests; | 203 | unsigned num_discard_requests; |
207 | 204 | ||
205 | /* | ||
206 | * The number of WRITE SAME requests that will be submitted to the target. | ||
207 | * The request number can be accessed with dm_bio_get_target_request_nr. | ||
208 | */ | ||
209 | unsigned num_write_same_requests; | ||
210 | |||
211 | /* | ||
212 | * The minimum number of extra bytes allocated in each bio for the | ||
213 | * target to use. dm_per_bio_data returns the data location. | ||
214 | */ | ||
215 | unsigned per_bio_data_size; | ||
216 | |||
208 | /* target specific data */ | 217 | /* target specific data */ |
209 | void *private; | 218 | void *private; |
210 | 219 | ||
@@ -241,6 +250,36 @@ struct dm_target_callbacks { | |||
241 | int (*congested_fn) (struct dm_target_callbacks *, int); | 250 | int (*congested_fn) (struct dm_target_callbacks *, int); |
242 | }; | 251 | }; |
243 | 252 | ||
253 | /* | ||
254 | * For bio-based dm. | ||
255 | * One of these is allocated for each bio. | ||
256 | * This structure shouldn't be touched directly by target drivers. | ||
257 | * It is here so that we can inline dm_per_bio_data and | ||
258 | * dm_bio_from_per_bio_data | ||
259 | */ | ||
260 | struct dm_target_io { | ||
261 | struct dm_io *io; | ||
262 | struct dm_target *ti; | ||
263 | union map_info info; | ||
264 | unsigned target_request_nr; | ||
265 | struct bio clone; | ||
266 | }; | ||
267 | |||
268 | static inline void *dm_per_bio_data(struct bio *bio, size_t data_size) | ||
269 | { | ||
270 | return (char *)bio - offsetof(struct dm_target_io, clone) - data_size; | ||
271 | } | ||
272 | |||
273 | static inline struct bio *dm_bio_from_per_bio_data(void *data, size_t data_size) | ||
274 | { | ||
275 | return (struct bio *)((char *)data + data_size + offsetof(struct dm_target_io, clone)); | ||
276 | } | ||
277 | |||
278 | static inline unsigned dm_bio_get_target_request_nr(const struct bio *bio) | ||
279 | { | ||
280 | return container_of(bio, struct dm_target_io, clone)->target_request_nr; | ||
281 | } | ||
282 | |||
244 | int dm_register_target(struct target_type *t); | 283 | int dm_register_target(struct target_type *t); |
245 | void dm_unregister_target(struct target_type *t); | 284 | void dm_unregister_target(struct target_type *t); |
246 | 285 | ||
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index eb48f3816df9..bd2e52ccc4f2 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h | |||
@@ -156,7 +156,6 @@ static inline void get_dma_buf(struct dma_buf *dmabuf) | |||
156 | get_file(dmabuf->file); | 156 | get_file(dmabuf->file); |
157 | } | 157 | } |
158 | 158 | ||
159 | #ifdef CONFIG_DMA_SHARED_BUFFER | ||
160 | struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf, | 159 | struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf, |
161 | struct device *dev); | 160 | struct device *dev); |
162 | void dma_buf_detach(struct dma_buf *dmabuf, | 161 | void dma_buf_detach(struct dma_buf *dmabuf, |
@@ -184,103 +183,5 @@ int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *, | |||
184 | unsigned long); | 183 | unsigned long); |
185 | void *dma_buf_vmap(struct dma_buf *); | 184 | void *dma_buf_vmap(struct dma_buf *); |
186 | void dma_buf_vunmap(struct dma_buf *, void *vaddr); | 185 | void dma_buf_vunmap(struct dma_buf *, void *vaddr); |
187 | #else | ||
188 | |||
189 | static inline struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf, | ||
190 | struct device *dev) | ||
191 | { | ||
192 | return ERR_PTR(-ENODEV); | ||
193 | } | ||
194 | |||
195 | static inline void dma_buf_detach(struct dma_buf *dmabuf, | ||
196 | struct dma_buf_attachment *dmabuf_attach) | ||
197 | { | ||
198 | return; | ||
199 | } | ||
200 | |||
201 | static inline struct dma_buf *dma_buf_export(void *priv, | ||
202 | const struct dma_buf_ops *ops, | ||
203 | size_t size, int flags) | ||
204 | { | ||
205 | return ERR_PTR(-ENODEV); | ||
206 | } | ||
207 | |||
208 | static inline int dma_buf_fd(struct dma_buf *dmabuf, int flags) | ||
209 | { | ||
210 | return -ENODEV; | ||
211 | } | ||
212 | |||
213 | static inline struct dma_buf *dma_buf_get(int fd) | ||
214 | { | ||
215 | return ERR_PTR(-ENODEV); | ||
216 | } | ||
217 | |||
218 | static inline void dma_buf_put(struct dma_buf *dmabuf) | ||
219 | { | ||
220 | return; | ||
221 | } | ||
222 | |||
223 | static inline struct sg_table *dma_buf_map_attachment( | ||
224 | struct dma_buf_attachment *attach, enum dma_data_direction write) | ||
225 | { | ||
226 | return ERR_PTR(-ENODEV); | ||
227 | } | ||
228 | |||
229 | static inline void dma_buf_unmap_attachment(struct dma_buf_attachment *attach, | ||
230 | struct sg_table *sg, enum dma_data_direction dir) | ||
231 | { | ||
232 | return; | ||
233 | } | ||
234 | |||
235 | static inline int dma_buf_begin_cpu_access(struct dma_buf *dmabuf, | ||
236 | size_t start, size_t len, | ||
237 | enum dma_data_direction dir) | ||
238 | { | ||
239 | return -ENODEV; | ||
240 | } | ||
241 | |||
242 | static inline void dma_buf_end_cpu_access(struct dma_buf *dmabuf, | ||
243 | size_t start, size_t len, | ||
244 | enum dma_data_direction dir) | ||
245 | { | ||
246 | } | ||
247 | |||
248 | static inline void *dma_buf_kmap_atomic(struct dma_buf *dmabuf, | ||
249 | unsigned long pnum) | ||
250 | { | ||
251 | return NULL; | ||
252 | } | ||
253 | |||
254 | static inline void dma_buf_kunmap_atomic(struct dma_buf *dmabuf, | ||
255 | unsigned long pnum, void *vaddr) | ||
256 | { | ||
257 | } | ||
258 | |||
259 | static inline void *dma_buf_kmap(struct dma_buf *dmabuf, unsigned long pnum) | ||
260 | { | ||
261 | return NULL; | ||
262 | } | ||
263 | |||
264 | static inline void dma_buf_kunmap(struct dma_buf *dmabuf, | ||
265 | unsigned long pnum, void *vaddr) | ||
266 | { | ||
267 | } | ||
268 | |||
269 | static inline int dma_buf_mmap(struct dma_buf *dmabuf, | ||
270 | struct vm_area_struct *vma, | ||
271 | unsigned long pgoff) | ||
272 | { | ||
273 | return -ENODEV; | ||
274 | } | ||
275 | |||
276 | static inline void *dma_buf_vmap(struct dma_buf *dmabuf) | ||
277 | { | ||
278 | return NULL; | ||
279 | } | ||
280 | |||
281 | static inline void dma_buf_vunmap(struct dma_buf *dmabuf, void *vaddr) | ||
282 | { | ||
283 | } | ||
284 | #endif /* CONFIG_DMA_SHARED_BUFFER */ | ||
285 | 186 | ||
286 | #endif /* __DMA_BUF_H__ */ | 187 | #endif /* __DMA_BUF_H__ */ |
diff --git a/include/linux/dma-debug.h b/include/linux/dma-debug.h index 171ad8aedc83..fc0e34ce038f 100644 --- a/include/linux/dma-debug.h +++ b/include/linux/dma-debug.h | |||
@@ -39,6 +39,8 @@ extern void debug_dma_map_page(struct device *dev, struct page *page, | |||
39 | int direction, dma_addr_t dma_addr, | 39 | int direction, dma_addr_t dma_addr, |
40 | bool map_single); | 40 | bool map_single); |
41 | 41 | ||
42 | extern void debug_dma_mapping_error(struct device *dev, dma_addr_t dma_addr); | ||
43 | |||
42 | extern void debug_dma_unmap_page(struct device *dev, dma_addr_t addr, | 44 | extern void debug_dma_unmap_page(struct device *dev, dma_addr_t addr, |
43 | size_t size, int direction, bool map_single); | 45 | size_t size, int direction, bool map_single); |
44 | 46 | ||
@@ -105,6 +107,11 @@ static inline void debug_dma_map_page(struct device *dev, struct page *page, | |||
105 | { | 107 | { |
106 | } | 108 | } |
107 | 109 | ||
110 | static inline void debug_dma_mapping_error(struct device *dev, | ||
111 | dma_addr_t dma_addr) | ||
112 | { | ||
113 | } | ||
114 | |||
108 | static inline void debug_dma_unmap_page(struct device *dev, dma_addr_t addr, | 115 | static inline void debug_dma_unmap_page(struct device *dev, dma_addr_t addr, |
109 | size_t size, int direction, | 116 | size_t size, int direction, |
110 | bool map_single) | 117 | bool map_single) |
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h index c7e6b6392ab8..5b9b5b317180 100644 --- a/include/linux/exportfs.h +++ b/include/linux/exportfs.h | |||
@@ -83,6 +83,11 @@ enum fid_type { | |||
83 | * 64 bit parent inode number. | 83 | * 64 bit parent inode number. |
84 | */ | 84 | */ |
85 | FILEID_NILFS_WITH_PARENT = 0x62, | 85 | FILEID_NILFS_WITH_PARENT = 0x62, |
86 | |||
87 | /* | ||
88 | * Filesystems must not use 0xff file ID. | ||
89 | */ | ||
90 | FILEID_INVALID = 0xff, | ||
86 | }; | 91 | }; |
87 | 92 | ||
88 | struct fid { | 93 | struct fid { |
diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h new file mode 100644 index 000000000000..f9a12f6243a5 --- /dev/null +++ b/include/linux/f2fs_fs.h | |||
@@ -0,0 +1,413 @@ | |||
1 | /** | ||
2 | * include/linux/f2fs_fs.h | ||
3 | * | ||
4 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. | ||
5 | * http://www.samsung.com/ | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef _LINUX_F2FS_FS_H | ||
12 | #define _LINUX_F2FS_FS_H | ||
13 | |||
14 | #include <linux/pagemap.h> | ||
15 | #include <linux/types.h> | ||
16 | |||
17 | #define F2FS_SUPER_OFFSET 1024 /* byte-size offset */ | ||
18 | #define F2FS_LOG_SECTOR_SIZE 9 /* 9 bits for 512 byte */ | ||
19 | #define F2FS_LOG_SECTORS_PER_BLOCK 3 /* 4KB: F2FS_BLKSIZE */ | ||
20 | #define F2FS_BLKSIZE 4096 /* support only 4KB block */ | ||
21 | #define F2FS_MAX_EXTENSION 64 /* # of extension entries */ | ||
22 | |||
23 | #define NULL_ADDR 0x0U | ||
24 | #define NEW_ADDR -1U | ||
25 | |||
26 | #define F2FS_ROOT_INO(sbi) (sbi->root_ino_num) | ||
27 | #define F2FS_NODE_INO(sbi) (sbi->node_ino_num) | ||
28 | #define F2FS_META_INO(sbi) (sbi->meta_ino_num) | ||
29 | |||
30 | /* This flag is used by node and meta inodes, and by recovery */ | ||
31 | #define GFP_F2FS_ZERO (GFP_NOFS | __GFP_ZERO) | ||
32 | |||
33 | /* | ||
34 | * For further optimization on multi-head logs, on-disk layout supports maximum | ||
35 | * 16 logs by default. The number, 16, is expected to cover all the cases | ||
36 | * enoughly. The implementaion currently uses no more than 6 logs. | ||
37 | * Half the logs are used for nodes, and the other half are used for data. | ||
38 | */ | ||
39 | #define MAX_ACTIVE_LOGS 16 | ||
40 | #define MAX_ACTIVE_NODE_LOGS 8 | ||
41 | #define MAX_ACTIVE_DATA_LOGS 8 | ||
42 | |||
43 | /* | ||
44 | * For superblock | ||
45 | */ | ||
46 | struct f2fs_super_block { | ||
47 | __le32 magic; /* Magic Number */ | ||
48 | __le16 major_ver; /* Major Version */ | ||
49 | __le16 minor_ver; /* Minor Version */ | ||
50 | __le32 log_sectorsize; /* log2 sector size in bytes */ | ||
51 | __le32 log_sectors_per_block; /* log2 # of sectors per block */ | ||
52 | __le32 log_blocksize; /* log2 block size in bytes */ | ||
53 | __le32 log_blocks_per_seg; /* log2 # of blocks per segment */ | ||
54 | __le32 segs_per_sec; /* # of segments per section */ | ||
55 | __le32 secs_per_zone; /* # of sections per zone */ | ||
56 | __le32 checksum_offset; /* checksum offset inside super block */ | ||
57 | __le64 block_count; /* total # of user blocks */ | ||
58 | __le32 section_count; /* total # of sections */ | ||
59 | __le32 segment_count; /* total # of segments */ | ||
60 | __le32 segment_count_ckpt; /* # of segments for checkpoint */ | ||
61 | __le32 segment_count_sit; /* # of segments for SIT */ | ||
62 | __le32 segment_count_nat; /* # of segments for NAT */ | ||
63 | __le32 segment_count_ssa; /* # of segments for SSA */ | ||
64 | __le32 segment_count_main; /* # of segments for main area */ | ||
65 | __le32 segment0_blkaddr; /* start block address of segment 0 */ | ||
66 | __le32 cp_blkaddr; /* start block address of checkpoint */ | ||
67 | __le32 sit_blkaddr; /* start block address of SIT */ | ||
68 | __le32 nat_blkaddr; /* start block address of NAT */ | ||
69 | __le32 ssa_blkaddr; /* start block address of SSA */ | ||
70 | __le32 main_blkaddr; /* start block address of main area */ | ||
71 | __le32 root_ino; /* root inode number */ | ||
72 | __le32 node_ino; /* node inode number */ | ||
73 | __le32 meta_ino; /* meta inode number */ | ||
74 | __u8 uuid[16]; /* 128-bit uuid for volume */ | ||
75 | __le16 volume_name[512]; /* volume name */ | ||
76 | __le32 extension_count; /* # of extensions below */ | ||
77 | __u8 extension_list[F2FS_MAX_EXTENSION][8]; /* extension array */ | ||
78 | } __packed; | ||
79 | |||
80 | /* | ||
81 | * For checkpoint | ||
82 | */ | ||
83 | #define CP_ERROR_FLAG 0x00000008 | ||
84 | #define CP_COMPACT_SUM_FLAG 0x00000004 | ||
85 | #define CP_ORPHAN_PRESENT_FLAG 0x00000002 | ||
86 | #define CP_UMOUNT_FLAG 0x00000001 | ||
87 | |||
88 | struct f2fs_checkpoint { | ||
89 | __le64 checkpoint_ver; /* checkpoint block version number */ | ||
90 | __le64 user_block_count; /* # of user blocks */ | ||
91 | __le64 valid_block_count; /* # of valid blocks in main area */ | ||
92 | __le32 rsvd_segment_count; /* # of reserved segments for gc */ | ||
93 | __le32 overprov_segment_count; /* # of overprovision segments */ | ||
94 | __le32 free_segment_count; /* # of free segments in main area */ | ||
95 | |||
96 | /* information of current node segments */ | ||
97 | __le32 cur_node_segno[MAX_ACTIVE_NODE_LOGS]; | ||
98 | __le16 cur_node_blkoff[MAX_ACTIVE_NODE_LOGS]; | ||
99 | /* information of current data segments */ | ||
100 | __le32 cur_data_segno[MAX_ACTIVE_DATA_LOGS]; | ||
101 | __le16 cur_data_blkoff[MAX_ACTIVE_DATA_LOGS]; | ||
102 | __le32 ckpt_flags; /* Flags : umount and journal_present */ | ||
103 | __le32 cp_pack_total_block_count; /* total # of one cp pack */ | ||
104 | __le32 cp_pack_start_sum; /* start block number of data summary */ | ||
105 | __le32 valid_node_count; /* Total number of valid nodes */ | ||
106 | __le32 valid_inode_count; /* Total number of valid inodes */ | ||
107 | __le32 next_free_nid; /* Next free node number */ | ||
108 | __le32 sit_ver_bitmap_bytesize; /* Default value 64 */ | ||
109 | __le32 nat_ver_bitmap_bytesize; /* Default value 256 */ | ||
110 | __le32 checksum_offset; /* checksum offset inside cp block */ | ||
111 | __le64 elapsed_time; /* mounted time */ | ||
112 | /* allocation type of current segment */ | ||
113 | unsigned char alloc_type[MAX_ACTIVE_LOGS]; | ||
114 | |||
115 | /* SIT and NAT version bitmap */ | ||
116 | unsigned char sit_nat_version_bitmap[1]; | ||
117 | } __packed; | ||
118 | |||
119 | /* | ||
120 | * For orphan inode management | ||
121 | */ | ||
122 | #define F2FS_ORPHANS_PER_BLOCK 1020 | ||
123 | |||
124 | struct f2fs_orphan_block { | ||
125 | __le32 ino[F2FS_ORPHANS_PER_BLOCK]; /* inode numbers */ | ||
126 | __le32 reserved; /* reserved */ | ||
127 | __le16 blk_addr; /* block index in current CP */ | ||
128 | __le16 blk_count; /* Number of orphan inode blocks in CP */ | ||
129 | __le32 entry_count; /* Total number of orphan nodes in current CP */ | ||
130 | __le32 check_sum; /* CRC32 for orphan inode block */ | ||
131 | } __packed; | ||
132 | |||
133 | /* | ||
134 | * For NODE structure | ||
135 | */ | ||
136 | struct f2fs_extent { | ||
137 | __le32 fofs; /* start file offset of the extent */ | ||
138 | __le32 blk_addr; /* start block address of the extent */ | ||
139 | __le32 len; /* lengh of the extent */ | ||
140 | } __packed; | ||
141 | |||
142 | #define F2FS_MAX_NAME_LEN 256 | ||
143 | #define ADDRS_PER_INODE 923 /* Address Pointers in an Inode */ | ||
144 | #define ADDRS_PER_BLOCK 1018 /* Address Pointers in a Direct Block */ | ||
145 | #define NIDS_PER_BLOCK 1018 /* Node IDs in an Indirect Block */ | ||
146 | |||
147 | struct f2fs_inode { | ||
148 | __le16 i_mode; /* file mode */ | ||
149 | __u8 i_advise; /* file hints */ | ||
150 | __u8 i_reserved; /* reserved */ | ||
151 | __le32 i_uid; /* user ID */ | ||
152 | __le32 i_gid; /* group ID */ | ||
153 | __le32 i_links; /* links count */ | ||
154 | __le64 i_size; /* file size in bytes */ | ||
155 | __le64 i_blocks; /* file size in blocks */ | ||
156 | __le64 i_atime; /* access time */ | ||
157 | __le64 i_ctime; /* change time */ | ||
158 | __le64 i_mtime; /* modification time */ | ||
159 | __le32 i_atime_nsec; /* access time in nano scale */ | ||
160 | __le32 i_ctime_nsec; /* change time in nano scale */ | ||
161 | __le32 i_mtime_nsec; /* modification time in nano scale */ | ||
162 | __le32 i_generation; /* file version (for NFS) */ | ||
163 | __le32 i_current_depth; /* only for directory depth */ | ||
164 | __le32 i_xattr_nid; /* nid to save xattr */ | ||
165 | __le32 i_flags; /* file attributes */ | ||
166 | __le32 i_pino; /* parent inode number */ | ||
167 | __le32 i_namelen; /* file name length */ | ||
168 | __u8 i_name[F2FS_MAX_NAME_LEN]; /* file name for SPOR */ | ||
169 | |||
170 | struct f2fs_extent i_ext; /* caching a largest extent */ | ||
171 | |||
172 | __le32 i_addr[ADDRS_PER_INODE]; /* Pointers to data blocks */ | ||
173 | |||
174 | __le32 i_nid[5]; /* direct(2), indirect(2), | ||
175 | double_indirect(1) node id */ | ||
176 | } __packed; | ||
177 | |||
178 | struct direct_node { | ||
179 | __le32 addr[ADDRS_PER_BLOCK]; /* array of data block address */ | ||
180 | } __packed; | ||
181 | |||
182 | struct indirect_node { | ||
183 | __le32 nid[NIDS_PER_BLOCK]; /* array of data block address */ | ||
184 | } __packed; | ||
185 | |||
186 | enum { | ||
187 | COLD_BIT_SHIFT = 0, | ||
188 | FSYNC_BIT_SHIFT, | ||
189 | DENT_BIT_SHIFT, | ||
190 | OFFSET_BIT_SHIFT | ||
191 | }; | ||
192 | |||
193 | struct node_footer { | ||
194 | __le32 nid; /* node id */ | ||
195 | __le32 ino; /* inode nunmber */ | ||
196 | __le32 flag; /* include cold/fsync/dentry marks and offset */ | ||
197 | __le64 cp_ver; /* checkpoint version */ | ||
198 | __le32 next_blkaddr; /* next node page block address */ | ||
199 | } __packed; | ||
200 | |||
201 | struct f2fs_node { | ||
202 | /* can be one of three types: inode, direct, and indirect types */ | ||
203 | union { | ||
204 | struct f2fs_inode i; | ||
205 | struct direct_node dn; | ||
206 | struct indirect_node in; | ||
207 | }; | ||
208 | struct node_footer footer; | ||
209 | } __packed; | ||
210 | |||
211 | /* | ||
212 | * For NAT entries | ||
213 | */ | ||
214 | #define NAT_ENTRY_PER_BLOCK (PAGE_CACHE_SIZE / sizeof(struct f2fs_nat_entry)) | ||
215 | |||
216 | struct f2fs_nat_entry { | ||
217 | __u8 version; /* latest version of cached nat entry */ | ||
218 | __le32 ino; /* inode number */ | ||
219 | __le32 block_addr; /* block address */ | ||
220 | } __packed; | ||
221 | |||
222 | struct f2fs_nat_block { | ||
223 | struct f2fs_nat_entry entries[NAT_ENTRY_PER_BLOCK]; | ||
224 | } __packed; | ||
225 | |||
226 | /* | ||
227 | * For SIT entries | ||
228 | * | ||
229 | * Each segment is 2MB in size by default so that a bitmap for validity of | ||
230 | * there-in blocks should occupy 64 bytes, 512 bits. | ||
231 | * Not allow to change this. | ||
232 | */ | ||
233 | #define SIT_VBLOCK_MAP_SIZE 64 | ||
234 | #define SIT_ENTRY_PER_BLOCK (PAGE_CACHE_SIZE / sizeof(struct f2fs_sit_entry)) | ||
235 | |||
236 | /* | ||
237 | * Note that f2fs_sit_entry->vblocks has the following bit-field information. | ||
238 | * [15:10] : allocation type such as CURSEG_XXXX_TYPE | ||
239 | * [9:0] : valid block count | ||
240 | */ | ||
241 | #define SIT_VBLOCKS_SHIFT 10 | ||
242 | #define SIT_VBLOCKS_MASK ((1 << SIT_VBLOCKS_SHIFT) - 1) | ||
243 | #define GET_SIT_VBLOCKS(raw_sit) \ | ||
244 | (le16_to_cpu((raw_sit)->vblocks) & SIT_VBLOCKS_MASK) | ||
245 | #define GET_SIT_TYPE(raw_sit) \ | ||
246 | ((le16_to_cpu((raw_sit)->vblocks) & ~SIT_VBLOCKS_MASK) \ | ||
247 | >> SIT_VBLOCKS_SHIFT) | ||
248 | |||
249 | struct f2fs_sit_entry { | ||
250 | __le16 vblocks; /* reference above */ | ||
251 | __u8 valid_map[SIT_VBLOCK_MAP_SIZE]; /* bitmap for valid blocks */ | ||
252 | __le64 mtime; /* segment age for cleaning */ | ||
253 | } __packed; | ||
254 | |||
255 | struct f2fs_sit_block { | ||
256 | struct f2fs_sit_entry entries[SIT_ENTRY_PER_BLOCK]; | ||
257 | } __packed; | ||
258 | |||
259 | /* | ||
260 | * For segment summary | ||
261 | * | ||
262 | * One summary block contains exactly 512 summary entries, which represents | ||
263 | * exactly 2MB segment by default. Not allow to change the basic units. | ||
264 | * | ||
265 | * NOTE: For initializing fields, you must use set_summary | ||
266 | * | ||
267 | * - If data page, nid represents dnode's nid | ||
268 | * - If node page, nid represents the node page's nid. | ||
269 | * | ||
270 | * The ofs_in_node is used by only data page. It represents offset | ||
271 | * from node's page's beginning to get a data block address. | ||
272 | * ex) data_blkaddr = (block_t)(nodepage_start_address + ofs_in_node) | ||
273 | */ | ||
274 | #define ENTRIES_IN_SUM 512 | ||
275 | #define SUMMARY_SIZE (7) /* sizeof(struct summary) */ | ||
276 | #define SUM_FOOTER_SIZE (5) /* sizeof(struct summary_footer) */ | ||
277 | #define SUM_ENTRY_SIZE (SUMMARY_SIZE * ENTRIES_IN_SUM) | ||
278 | |||
279 | /* a summary entry for a 4KB-sized block in a segment */ | ||
280 | struct f2fs_summary { | ||
281 | __le32 nid; /* parent node id */ | ||
282 | union { | ||
283 | __u8 reserved[3]; | ||
284 | struct { | ||
285 | __u8 version; /* node version number */ | ||
286 | __le16 ofs_in_node; /* block index in parent node */ | ||
287 | } __packed; | ||
288 | }; | ||
289 | } __packed; | ||
290 | |||
291 | /* summary block type, node or data, is stored to the summary_footer */ | ||
292 | #define SUM_TYPE_NODE (1) | ||
293 | #define SUM_TYPE_DATA (0) | ||
294 | |||
295 | struct summary_footer { | ||
296 | unsigned char entry_type; /* SUM_TYPE_XXX */ | ||
297 | __u32 check_sum; /* summary checksum */ | ||
298 | } __packed; | ||
299 | |||
300 | #define SUM_JOURNAL_SIZE (F2FS_BLKSIZE - SUM_FOOTER_SIZE -\ | ||
301 | SUM_ENTRY_SIZE) | ||
302 | #define NAT_JOURNAL_ENTRIES ((SUM_JOURNAL_SIZE - 2) /\ | ||
303 | sizeof(struct nat_journal_entry)) | ||
304 | #define NAT_JOURNAL_RESERVED ((SUM_JOURNAL_SIZE - 2) %\ | ||
305 | sizeof(struct nat_journal_entry)) | ||
306 | #define SIT_JOURNAL_ENTRIES ((SUM_JOURNAL_SIZE - 2) /\ | ||
307 | sizeof(struct sit_journal_entry)) | ||
308 | #define SIT_JOURNAL_RESERVED ((SUM_JOURNAL_SIZE - 2) %\ | ||
309 | sizeof(struct sit_journal_entry)) | ||
310 | /* | ||
311 | * frequently updated NAT/SIT entries can be stored in the spare area in | ||
312 | * summary blocks | ||
313 | */ | ||
314 | enum { | ||
315 | NAT_JOURNAL = 0, | ||
316 | SIT_JOURNAL | ||
317 | }; | ||
318 | |||
319 | struct nat_journal_entry { | ||
320 | __le32 nid; | ||
321 | struct f2fs_nat_entry ne; | ||
322 | } __packed; | ||
323 | |||
324 | struct nat_journal { | ||
325 | struct nat_journal_entry entries[NAT_JOURNAL_ENTRIES]; | ||
326 | __u8 reserved[NAT_JOURNAL_RESERVED]; | ||
327 | } __packed; | ||
328 | |||
329 | struct sit_journal_entry { | ||
330 | __le32 segno; | ||
331 | struct f2fs_sit_entry se; | ||
332 | } __packed; | ||
333 | |||
334 | struct sit_journal { | ||
335 | struct sit_journal_entry entries[SIT_JOURNAL_ENTRIES]; | ||
336 | __u8 reserved[SIT_JOURNAL_RESERVED]; | ||
337 | } __packed; | ||
338 | |||
339 | /* 4KB-sized summary block structure */ | ||
340 | struct f2fs_summary_block { | ||
341 | struct f2fs_summary entries[ENTRIES_IN_SUM]; | ||
342 | union { | ||
343 | __le16 n_nats; | ||
344 | __le16 n_sits; | ||
345 | }; | ||
346 | /* spare area is used by NAT or SIT journals */ | ||
347 | union { | ||
348 | struct nat_journal nat_j; | ||
349 | struct sit_journal sit_j; | ||
350 | }; | ||
351 | struct summary_footer footer; | ||
352 | } __packed; | ||
353 | |||
354 | /* | ||
355 | * For directory operations | ||
356 | */ | ||
357 | #define F2FS_DOT_HASH 0 | ||
358 | #define F2FS_DDOT_HASH F2FS_DOT_HASH | ||
359 | #define F2FS_MAX_HASH (~((0x3ULL) << 62)) | ||
360 | #define F2FS_HASH_COL_BIT ((0x1ULL) << 63) | ||
361 | |||
362 | typedef __le32 f2fs_hash_t; | ||
363 | |||
364 | /* One directory entry slot covers 8bytes-long file name */ | ||
365 | #define F2FS_NAME_LEN 8 | ||
366 | #define F2FS_NAME_LEN_BITS 3 | ||
367 | |||
368 | #define GET_DENTRY_SLOTS(x) ((x + F2FS_NAME_LEN - 1) >> F2FS_NAME_LEN_BITS) | ||
369 | |||
370 | /* the number of dentry in a block */ | ||
371 | #define NR_DENTRY_IN_BLOCK 214 | ||
372 | |||
373 | /* MAX level for dir lookup */ | ||
374 | #define MAX_DIR_HASH_DEPTH 63 | ||
375 | |||
376 | #define SIZE_OF_DIR_ENTRY 11 /* by byte */ | ||
377 | #define SIZE_OF_DENTRY_BITMAP ((NR_DENTRY_IN_BLOCK + BITS_PER_BYTE - 1) / \ | ||
378 | BITS_PER_BYTE) | ||
379 | #define SIZE_OF_RESERVED (PAGE_SIZE - ((SIZE_OF_DIR_ENTRY + \ | ||
380 | F2FS_NAME_LEN) * \ | ||
381 | NR_DENTRY_IN_BLOCK + SIZE_OF_DENTRY_BITMAP)) | ||
382 | |||
383 | /* One directory entry slot representing F2FS_NAME_LEN-sized file name */ | ||
384 | struct f2fs_dir_entry { | ||
385 | __le32 hash_code; /* hash code of file name */ | ||
386 | __le32 ino; /* inode number */ | ||
387 | __le16 name_len; /* lengh of file name */ | ||
388 | __u8 file_type; /* file type */ | ||
389 | } __packed; | ||
390 | |||
391 | /* 4KB-sized directory entry block */ | ||
392 | struct f2fs_dentry_block { | ||
393 | /* validity bitmap for directory entries in each block */ | ||
394 | __u8 dentry_bitmap[SIZE_OF_DENTRY_BITMAP]; | ||
395 | __u8 reserved[SIZE_OF_RESERVED]; | ||
396 | struct f2fs_dir_entry dentry[NR_DENTRY_IN_BLOCK]; | ||
397 | __u8 filename[NR_DENTRY_IN_BLOCK][F2FS_NAME_LEN]; | ||
398 | } __packed; | ||
399 | |||
400 | /* file types used in inode_info->flags */ | ||
401 | enum { | ||
402 | F2FS_FT_UNKNOWN, | ||
403 | F2FS_FT_REG_FILE, | ||
404 | F2FS_FT_DIR, | ||
405 | F2FS_FT_CHRDEV, | ||
406 | F2FS_FT_BLKDEV, | ||
407 | F2FS_FT_FIFO, | ||
408 | F2FS_FT_SOCK, | ||
409 | F2FS_FT_SYMLINK, | ||
410 | F2FS_FT_MAX | ||
411 | }; | ||
412 | |||
413 | #endif /* _LINUX_F2FS_FS_H */ | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index a823d4be38e7..7617ee04f066 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1445,10 +1445,6 @@ static inline void sb_start_intwrite(struct super_block *sb) | |||
1445 | 1445 | ||
1446 | extern bool inode_owner_or_capable(const struct inode *inode); | 1446 | extern bool inode_owner_or_capable(const struct inode *inode); |
1447 | 1447 | ||
1448 | /* not quite ready to be deprecated, but... */ | ||
1449 | extern void lock_super(struct super_block *); | ||
1450 | extern void unlock_super(struct super_block *); | ||
1451 | |||
1452 | /* | 1448 | /* |
1453 | * VFS helper functions.. | 1449 | * VFS helper functions.. |
1454 | */ | 1450 | */ |
@@ -1565,7 +1561,6 @@ struct inode_operations { | |||
1565 | int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t); | 1561 | int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t); |
1566 | int (*rename) (struct inode *, struct dentry *, | 1562 | int (*rename) (struct inode *, struct dentry *, |
1567 | struct inode *, struct dentry *); | 1563 | struct inode *, struct dentry *); |
1568 | void (*truncate) (struct inode *); | ||
1569 | int (*setattr) (struct dentry *, struct iattr *); | 1564 | int (*setattr) (struct dentry *, struct iattr *); |
1570 | int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); | 1565 | int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); |
1571 | int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); | 1566 | int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); |
@@ -1999,6 +1994,7 @@ struct filename { | |||
1999 | bool separate; /* should "name" be freed? */ | 1994 | bool separate; /* should "name" be freed? */ |
2000 | }; | 1995 | }; |
2001 | 1996 | ||
1997 | extern long vfs_truncate(struct path *, loff_t); | ||
2002 | extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, | 1998 | extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, |
2003 | struct file *filp); | 1999 | struct file *filp); |
2004 | extern int do_fallocate(struct file *file, int mode, loff_t offset, | 2000 | extern int do_fallocate(struct file *file, int mode, loff_t offset, |
diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h index ce31408b1e47..5dfa0aa216b6 100644 --- a/include/linux/fscache-cache.h +++ b/include/linux/fscache-cache.h | |||
@@ -75,6 +75,16 @@ extern wait_queue_head_t fscache_cache_cleared_wq; | |||
75 | typedef void (*fscache_operation_release_t)(struct fscache_operation *op); | 75 | typedef void (*fscache_operation_release_t)(struct fscache_operation *op); |
76 | typedef void (*fscache_operation_processor_t)(struct fscache_operation *op); | 76 | typedef void (*fscache_operation_processor_t)(struct fscache_operation *op); |
77 | 77 | ||
78 | enum fscache_operation_state { | ||
79 | FSCACHE_OP_ST_BLANK, /* Op is not yet submitted */ | ||
80 | FSCACHE_OP_ST_INITIALISED, /* Op is initialised */ | ||
81 | FSCACHE_OP_ST_PENDING, /* Op is blocked from running */ | ||
82 | FSCACHE_OP_ST_IN_PROGRESS, /* Op is in progress */ | ||
83 | FSCACHE_OP_ST_COMPLETE, /* Op is complete */ | ||
84 | FSCACHE_OP_ST_CANCELLED, /* Op has been cancelled */ | ||
85 | FSCACHE_OP_ST_DEAD /* Op is now dead */ | ||
86 | }; | ||
87 | |||
78 | struct fscache_operation { | 88 | struct fscache_operation { |
79 | struct work_struct work; /* record for async ops */ | 89 | struct work_struct work; /* record for async ops */ |
80 | struct list_head pend_link; /* link in object->pending_ops */ | 90 | struct list_head pend_link; /* link in object->pending_ops */ |
@@ -86,10 +96,10 @@ struct fscache_operation { | |||
86 | #define FSCACHE_OP_MYTHREAD 0x0002 /* - processing is done be issuing thread, not pool */ | 96 | #define FSCACHE_OP_MYTHREAD 0x0002 /* - processing is done be issuing thread, not pool */ |
87 | #define FSCACHE_OP_WAITING 4 /* cleared when op is woken */ | 97 | #define FSCACHE_OP_WAITING 4 /* cleared when op is woken */ |
88 | #define FSCACHE_OP_EXCLUSIVE 5 /* exclusive op, other ops must wait */ | 98 | #define FSCACHE_OP_EXCLUSIVE 5 /* exclusive op, other ops must wait */ |
89 | #define FSCACHE_OP_DEAD 6 /* op is now dead */ | 99 | #define FSCACHE_OP_DEC_READ_CNT 6 /* decrement object->n_reads on destruction */ |
90 | #define FSCACHE_OP_DEC_READ_CNT 7 /* decrement object->n_reads on destruction */ | 100 | #define FSCACHE_OP_KEEP_FLAGS 0x0070 /* flags to keep when repurposing an op */ |
91 | #define FSCACHE_OP_KEEP_FLAGS 0xc0 /* flags to keep when repurposing an op */ | ||
92 | 101 | ||
102 | enum fscache_operation_state state; | ||
93 | atomic_t usage; | 103 | atomic_t usage; |
94 | unsigned debug_id; /* debugging ID */ | 104 | unsigned debug_id; /* debugging ID */ |
95 | 105 | ||
@@ -106,6 +116,7 @@ extern atomic_t fscache_op_debug_id; | |||
106 | extern void fscache_op_work_func(struct work_struct *work); | 116 | extern void fscache_op_work_func(struct work_struct *work); |
107 | 117 | ||
108 | extern void fscache_enqueue_operation(struct fscache_operation *); | 118 | extern void fscache_enqueue_operation(struct fscache_operation *); |
119 | extern void fscache_op_complete(struct fscache_operation *, bool); | ||
109 | extern void fscache_put_operation(struct fscache_operation *); | 120 | extern void fscache_put_operation(struct fscache_operation *); |
110 | 121 | ||
111 | /** | 122 | /** |
@@ -122,6 +133,7 @@ static inline void fscache_operation_init(struct fscache_operation *op, | |||
122 | { | 133 | { |
123 | INIT_WORK(&op->work, fscache_op_work_func); | 134 | INIT_WORK(&op->work, fscache_op_work_func); |
124 | atomic_set(&op->usage, 1); | 135 | atomic_set(&op->usage, 1); |
136 | op->state = FSCACHE_OP_ST_INITIALISED; | ||
125 | op->debug_id = atomic_inc_return(&fscache_op_debug_id); | 137 | op->debug_id = atomic_inc_return(&fscache_op_debug_id); |
126 | op->processor = processor; | 138 | op->processor = processor; |
127 | op->release = release; | 139 | op->release = release; |
@@ -138,6 +150,7 @@ struct fscache_retrieval { | |||
138 | void *context; /* netfs read context (pinned) */ | 150 | void *context; /* netfs read context (pinned) */ |
139 | struct list_head to_do; /* list of things to be done by the backend */ | 151 | struct list_head to_do; /* list of things to be done by the backend */ |
140 | unsigned long start_time; /* time at which retrieval started */ | 152 | unsigned long start_time; /* time at which retrieval started */ |
153 | unsigned n_pages; /* number of pages to be retrieved */ | ||
141 | }; | 154 | }; |
142 | 155 | ||
143 | typedef int (*fscache_page_retrieval_func_t)(struct fscache_retrieval *op, | 156 | typedef int (*fscache_page_retrieval_func_t)(struct fscache_retrieval *op, |
@@ -174,8 +187,22 @@ static inline void fscache_enqueue_retrieval(struct fscache_retrieval *op) | |||
174 | } | 187 | } |
175 | 188 | ||
176 | /** | 189 | /** |
190 | * fscache_retrieval_complete - Record (partial) completion of a retrieval | ||
191 | * @op: The retrieval operation affected | ||
192 | * @n_pages: The number of pages to account for | ||
193 | */ | ||
194 | static inline void fscache_retrieval_complete(struct fscache_retrieval *op, | ||
195 | int n_pages) | ||
196 | { | ||
197 | op->n_pages -= n_pages; | ||
198 | if (op->n_pages <= 0) | ||
199 | fscache_op_complete(&op->op, true); | ||
200 | } | ||
201 | |||
202 | /** | ||
177 | * fscache_put_retrieval - Drop a reference to a retrieval operation | 203 | * fscache_put_retrieval - Drop a reference to a retrieval operation |
178 | * @op: The retrieval operation affected | 204 | * @op: The retrieval operation affected |
205 | * @n_pages: The number of pages to account for | ||
179 | * | 206 | * |
180 | * Drop a reference to a retrieval operation. | 207 | * Drop a reference to a retrieval operation. |
181 | */ | 208 | */ |
@@ -227,6 +254,9 @@ struct fscache_cache_ops { | |||
227 | /* store the updated auxiliary data on an object */ | 254 | /* store the updated auxiliary data on an object */ |
228 | void (*update_object)(struct fscache_object *object); | 255 | void (*update_object)(struct fscache_object *object); |
229 | 256 | ||
257 | /* Invalidate an object */ | ||
258 | void (*invalidate_object)(struct fscache_operation *op); | ||
259 | |||
230 | /* discard the resources pinned by an object and effect retirement if | 260 | /* discard the resources pinned by an object and effect retirement if |
231 | * necessary */ | 261 | * necessary */ |
232 | void (*drop_object)(struct fscache_object *object); | 262 | void (*drop_object)(struct fscache_object *object); |
@@ -301,11 +331,30 @@ struct fscache_cookie { | |||
301 | #define FSCACHE_COOKIE_PENDING_FILL 3 /* T if pending initial fill on object */ | 331 | #define FSCACHE_COOKIE_PENDING_FILL 3 /* T if pending initial fill on object */ |
302 | #define FSCACHE_COOKIE_FILLING 4 /* T if filling object incrementally */ | 332 | #define FSCACHE_COOKIE_FILLING 4 /* T if filling object incrementally */ |
303 | #define FSCACHE_COOKIE_UNAVAILABLE 5 /* T if cookie is unavailable (error, etc) */ | 333 | #define FSCACHE_COOKIE_UNAVAILABLE 5 /* T if cookie is unavailable (error, etc) */ |
334 | #define FSCACHE_COOKIE_WAITING_ON_READS 6 /* T if cookie is waiting on reads */ | ||
335 | #define FSCACHE_COOKIE_INVALIDATING 7 /* T if cookie is being invalidated */ | ||
304 | }; | 336 | }; |
305 | 337 | ||
306 | extern struct fscache_cookie fscache_fsdef_index; | 338 | extern struct fscache_cookie fscache_fsdef_index; |
307 | 339 | ||
308 | /* | 340 | /* |
341 | * Event list for fscache_object::{event_mask,events} | ||
342 | */ | ||
343 | enum { | ||
344 | FSCACHE_OBJECT_EV_REQUEUE, /* T if object should be requeued */ | ||
345 | FSCACHE_OBJECT_EV_UPDATE, /* T if object should be updated */ | ||
346 | FSCACHE_OBJECT_EV_INVALIDATE, /* T if cache requested object invalidation */ | ||
347 | FSCACHE_OBJECT_EV_CLEARED, /* T if accessors all gone */ | ||
348 | FSCACHE_OBJECT_EV_ERROR, /* T if fatal error occurred during processing */ | ||
349 | FSCACHE_OBJECT_EV_RELEASE, /* T if netfs requested object release */ | ||
350 | FSCACHE_OBJECT_EV_RETIRE, /* T if netfs requested object retirement */ | ||
351 | FSCACHE_OBJECT_EV_WITHDRAW, /* T if cache requested object withdrawal */ | ||
352 | NR_FSCACHE_OBJECT_EVENTS | ||
353 | }; | ||
354 | |||
355 | #define FSCACHE_OBJECT_EVENTS_MASK ((1UL << NR_FSCACHE_OBJECT_EVENTS) - 1) | ||
356 | |||
357 | /* | ||
309 | * on-disk cache file or index handle | 358 | * on-disk cache file or index handle |
310 | */ | 359 | */ |
311 | struct fscache_object { | 360 | struct fscache_object { |
@@ -317,6 +366,7 @@ struct fscache_object { | |||
317 | /* active states */ | 366 | /* active states */ |
318 | FSCACHE_OBJECT_AVAILABLE, /* cleaning up object after creation */ | 367 | FSCACHE_OBJECT_AVAILABLE, /* cleaning up object after creation */ |
319 | FSCACHE_OBJECT_ACTIVE, /* object is usable */ | 368 | FSCACHE_OBJECT_ACTIVE, /* object is usable */ |
369 | FSCACHE_OBJECT_INVALIDATING, /* object is invalidating */ | ||
320 | FSCACHE_OBJECT_UPDATING, /* object is updating */ | 370 | FSCACHE_OBJECT_UPDATING, /* object is updating */ |
321 | 371 | ||
322 | /* terminal states */ | 372 | /* terminal states */ |
@@ -332,10 +382,10 @@ struct fscache_object { | |||
332 | 382 | ||
333 | int debug_id; /* debugging ID */ | 383 | int debug_id; /* debugging ID */ |
334 | int n_children; /* number of child objects */ | 384 | int n_children; /* number of child objects */ |
335 | int n_ops; /* number of ops outstanding on object */ | 385 | int n_ops; /* number of extant ops on object */ |
336 | int n_obj_ops; /* number of object ops outstanding on object */ | 386 | int n_obj_ops; /* number of object ops outstanding on object */ |
337 | int n_in_progress; /* number of ops in progress */ | 387 | int n_in_progress; /* number of ops in progress */ |
338 | int n_exclusive; /* number of exclusive ops queued */ | 388 | int n_exclusive; /* number of exclusive ops queued or in progress */ |
339 | atomic_t n_reads; /* number of read ops in progress */ | 389 | atomic_t n_reads; /* number of read ops in progress */ |
340 | spinlock_t lock; /* state and operations lock */ | 390 | spinlock_t lock; /* state and operations lock */ |
341 | 391 | ||
@@ -343,14 +393,6 @@ struct fscache_object { | |||
343 | unsigned long event_mask; /* events this object is interested in */ | 393 | unsigned long event_mask; /* events this object is interested in */ |
344 | unsigned long events; /* events to be processed by this object | 394 | unsigned long events; /* events to be processed by this object |
345 | * (order is important - using fls) */ | 395 | * (order is important - using fls) */ |
346 | #define FSCACHE_OBJECT_EV_REQUEUE 0 /* T if object should be requeued */ | ||
347 | #define FSCACHE_OBJECT_EV_UPDATE 1 /* T if object should be updated */ | ||
348 | #define FSCACHE_OBJECT_EV_CLEARED 2 /* T if accessors all gone */ | ||
349 | #define FSCACHE_OBJECT_EV_ERROR 3 /* T if fatal error occurred during processing */ | ||
350 | #define FSCACHE_OBJECT_EV_RELEASE 4 /* T if netfs requested object release */ | ||
351 | #define FSCACHE_OBJECT_EV_RETIRE 5 /* T if netfs requested object retirement */ | ||
352 | #define FSCACHE_OBJECT_EV_WITHDRAW 6 /* T if cache requested object withdrawal */ | ||
353 | #define FSCACHE_OBJECT_EVENTS_MASK 0x7f /* mask of all events*/ | ||
354 | 396 | ||
355 | unsigned long flags; | 397 | unsigned long flags; |
356 | #define FSCACHE_OBJECT_LOCK 0 /* T if object is busy being processed */ | 398 | #define FSCACHE_OBJECT_LOCK 0 /* T if object is busy being processed */ |
@@ -504,6 +546,9 @@ extern void fscache_withdraw_cache(struct fscache_cache *cache); | |||
504 | 546 | ||
505 | extern void fscache_io_error(struct fscache_cache *cache); | 547 | extern void fscache_io_error(struct fscache_cache *cache); |
506 | 548 | ||
549 | extern void fscache_mark_page_cached(struct fscache_retrieval *op, | ||
550 | struct page *page); | ||
551 | |||
507 | extern void fscache_mark_pages_cached(struct fscache_retrieval *op, | 552 | extern void fscache_mark_pages_cached(struct fscache_retrieval *op, |
508 | struct pagevec *pagevec); | 553 | struct pagevec *pagevec); |
509 | 554 | ||
diff --git a/include/linux/fscache.h b/include/linux/fscache.h index 9ec20dec3353..7a086235da4b 100644 --- a/include/linux/fscache.h +++ b/include/linux/fscache.h | |||
@@ -135,14 +135,14 @@ struct fscache_cookie_def { | |||
135 | */ | 135 | */ |
136 | void (*put_context)(void *cookie_netfs_data, void *context); | 136 | void (*put_context)(void *cookie_netfs_data, void *context); |
137 | 137 | ||
138 | /* indicate pages that now have cache metadata retained | 138 | /* indicate page that now have cache metadata retained |
139 | * - this function should mark the specified pages as now being cached | 139 | * - this function should mark the specified page as now being cached |
140 | * - the pages will have been marked with PG_fscache before this is | 140 | * - the page will have been marked with PG_fscache before this is |
141 | * called, so this is optional | 141 | * called, so this is optional |
142 | */ | 142 | */ |
143 | void (*mark_pages_cached)(void *cookie_netfs_data, | 143 | void (*mark_page_cached)(void *cookie_netfs_data, |
144 | struct address_space *mapping, | 144 | struct address_space *mapping, |
145 | struct pagevec *cached_pvec); | 145 | struct page *page); |
146 | 146 | ||
147 | /* indicate the cookie is no longer cached | 147 | /* indicate the cookie is no longer cached |
148 | * - this function is called when the backing store currently caching | 148 | * - this function is called when the backing store currently caching |
@@ -185,6 +185,8 @@ extern struct fscache_cookie *__fscache_acquire_cookie( | |||
185 | extern void __fscache_relinquish_cookie(struct fscache_cookie *, int); | 185 | extern void __fscache_relinquish_cookie(struct fscache_cookie *, int); |
186 | extern void __fscache_update_cookie(struct fscache_cookie *); | 186 | extern void __fscache_update_cookie(struct fscache_cookie *); |
187 | extern int __fscache_attr_changed(struct fscache_cookie *); | 187 | extern int __fscache_attr_changed(struct fscache_cookie *); |
188 | extern void __fscache_invalidate(struct fscache_cookie *); | ||
189 | extern void __fscache_wait_on_invalidate(struct fscache_cookie *); | ||
188 | extern int __fscache_read_or_alloc_page(struct fscache_cookie *, | 190 | extern int __fscache_read_or_alloc_page(struct fscache_cookie *, |
189 | struct page *, | 191 | struct page *, |
190 | fscache_rw_complete_t, | 192 | fscache_rw_complete_t, |
@@ -390,6 +392,42 @@ int fscache_attr_changed(struct fscache_cookie *cookie) | |||
390 | } | 392 | } |
391 | 393 | ||
392 | /** | 394 | /** |
395 | * fscache_invalidate - Notify cache that an object needs invalidation | ||
396 | * @cookie: The cookie representing the cache object | ||
397 | * | ||
398 | * Notify the cache that an object is needs to be invalidated and that it | ||
399 | * should abort any retrievals or stores it is doing on the cache. The object | ||
400 | * is then marked non-caching until such time as the invalidation is complete. | ||
401 | * | ||
402 | * This can be called with spinlocks held. | ||
403 | * | ||
404 | * See Documentation/filesystems/caching/netfs-api.txt for a complete | ||
405 | * description. | ||
406 | */ | ||
407 | static inline | ||
408 | void fscache_invalidate(struct fscache_cookie *cookie) | ||
409 | { | ||
410 | if (fscache_cookie_valid(cookie)) | ||
411 | __fscache_invalidate(cookie); | ||
412 | } | ||
413 | |||
414 | /** | ||
415 | * fscache_wait_on_invalidate - Wait for invalidation to complete | ||
416 | * @cookie: The cookie representing the cache object | ||
417 | * | ||
418 | * Wait for the invalidation of an object to complete. | ||
419 | * | ||
420 | * See Documentation/filesystems/caching/netfs-api.txt for a complete | ||
421 | * description. | ||
422 | */ | ||
423 | static inline | ||
424 | void fscache_wait_on_invalidate(struct fscache_cookie *cookie) | ||
425 | { | ||
426 | if (fscache_cookie_valid(cookie)) | ||
427 | __fscache_wait_on_invalidate(cookie); | ||
428 | } | ||
429 | |||
430 | /** | ||
393 | * fscache_reserve_space - Reserve data space for a cached object | 431 | * fscache_reserve_space - Reserve data space for a cached object |
394 | * @cookie: The cookie representing the cache object | 432 | * @cookie: The cookie representing the cache object |
395 | * @i_size: The amount of space to be reserved | 433 | * @i_size: The amount of space to be reserved |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 63d966d5c2ea..d5b0910d4961 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
@@ -88,9 +88,10 @@ struct fsnotify_event_private_data; | |||
88 | * if the group is interested in this event. | 88 | * if the group is interested in this event. |
89 | * handle_event - main call for a group to handle an fs event | 89 | * handle_event - main call for a group to handle an fs event |
90 | * free_group_priv - called when a group refcnt hits 0 to clean up the private union | 90 | * free_group_priv - called when a group refcnt hits 0 to clean up the private union |
91 | * freeing-mark - this means that a mark has been flagged to die when everything | 91 | * freeing_mark - called when a mark is being destroyed for some reason. The group |
92 | * finishes using it. The function is supplied with what must be a | 92 | * MUST be holding a reference on each mark and that reference must be |
93 | * valid group and inode to use to clean up. | 93 | * dropped in this function. inotify uses this function to send |
94 | * userspace messages that marks have been removed. | ||
94 | */ | 95 | */ |
95 | struct fsnotify_ops { | 96 | struct fsnotify_ops { |
96 | bool (*should_send_event)(struct fsnotify_group *group, struct inode *inode, | 97 | bool (*should_send_event)(struct fsnotify_group *group, struct inode *inode, |
@@ -141,12 +142,14 @@ struct fsnotify_group { | |||
141 | unsigned int priority; | 142 | unsigned int priority; |
142 | 143 | ||
143 | /* stores all fastpath marks assoc with this group so they can be cleaned on unregister */ | 144 | /* stores all fastpath marks assoc with this group so they can be cleaned on unregister */ |
144 | spinlock_t mark_lock; /* protect marks_list */ | 145 | struct mutex mark_mutex; /* protect marks_list */ |
145 | atomic_t num_marks; /* 1 for each mark and 1 for not being | 146 | atomic_t num_marks; /* 1 for each mark and 1 for not being |
146 | * past the point of no return when freeing | 147 | * past the point of no return when freeing |
147 | * a group */ | 148 | * a group */ |
148 | struct list_head marks_list; /* all inode marks for this group */ | 149 | struct list_head marks_list; /* all inode marks for this group */ |
149 | 150 | ||
151 | struct fasync_struct *fsn_fa; /* async notification */ | ||
152 | |||
150 | /* groups can define private fields here or use the void *private */ | 153 | /* groups can define private fields here or use the void *private */ |
151 | union { | 154 | union { |
152 | void *private; | 155 | void *private; |
@@ -155,7 +158,6 @@ struct fsnotify_group { | |||
155 | spinlock_t idr_lock; | 158 | spinlock_t idr_lock; |
156 | struct idr idr; | 159 | struct idr idr; |
157 | u32 last_wd; | 160 | u32 last_wd; |
158 | struct fasync_struct *fa; /* async notification */ | ||
159 | struct user_struct *user; | 161 | struct user_struct *user; |
160 | } inotify_data; | 162 | } inotify_data; |
161 | #endif | 163 | #endif |
@@ -287,7 +289,6 @@ struct fsnotify_mark { | |||
287 | struct fsnotify_inode_mark i; | 289 | struct fsnotify_inode_mark i; |
288 | struct fsnotify_vfsmount_mark m; | 290 | struct fsnotify_vfsmount_mark m; |
289 | }; | 291 | }; |
290 | struct list_head free_g_list; /* tmp list used when freeing this mark */ | ||
291 | __u32 ignored_mask; /* events types to ignore */ | 292 | __u32 ignored_mask; /* events types to ignore */ |
292 | #define FSNOTIFY_MARK_FLAG_INODE 0x01 | 293 | #define FSNOTIFY_MARK_FLAG_INODE 0x01 |
293 | #define FSNOTIFY_MARK_FLAG_VFSMOUNT 0x02 | 294 | #define FSNOTIFY_MARK_FLAG_VFSMOUNT 0x02 |
@@ -360,11 +361,16 @@ static inline void __fsnotify_d_instantiate(struct dentry *dentry, struct inode | |||
360 | 361 | ||
361 | /* called from fsnotify listeners, such as fanotify or dnotify */ | 362 | /* called from fsnotify listeners, such as fanotify or dnotify */ |
362 | 363 | ||
363 | /* get a reference to an existing or create a new group */ | 364 | /* create a new group */ |
364 | extern struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops); | 365 | extern struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops); |
366 | /* get reference to a group */ | ||
367 | extern void fsnotify_get_group(struct fsnotify_group *group); | ||
365 | /* drop reference on a group from fsnotify_alloc_group */ | 368 | /* drop reference on a group from fsnotify_alloc_group */ |
366 | extern void fsnotify_put_group(struct fsnotify_group *group); | 369 | extern void fsnotify_put_group(struct fsnotify_group *group); |
367 | 370 | /* destroy group */ | |
371 | extern void fsnotify_destroy_group(struct fsnotify_group *group); | ||
372 | /* fasync handler function */ | ||
373 | extern int fsnotify_fasync(int fd, struct file *file, int on); | ||
368 | /* take a reference to an event */ | 374 | /* take a reference to an event */ |
369 | extern void fsnotify_get_event(struct fsnotify_event *event); | 375 | extern void fsnotify_get_event(struct fsnotify_event *event); |
370 | extern void fsnotify_put_event(struct fsnotify_event *event); | 376 | extern void fsnotify_put_event(struct fsnotify_event *event); |
@@ -405,8 +411,13 @@ extern void fsnotify_set_mark_mask_locked(struct fsnotify_mark *mark, __u32 mask | |||
405 | /* attach the mark to both the group and the inode */ | 411 | /* attach the mark to both the group and the inode */ |
406 | extern int fsnotify_add_mark(struct fsnotify_mark *mark, struct fsnotify_group *group, | 412 | extern int fsnotify_add_mark(struct fsnotify_mark *mark, struct fsnotify_group *group, |
407 | struct inode *inode, struct vfsmount *mnt, int allow_dups); | 413 | struct inode *inode, struct vfsmount *mnt, int allow_dups); |
408 | /* given a mark, flag it to be freed when all references are dropped */ | 414 | extern int fsnotify_add_mark_locked(struct fsnotify_mark *mark, struct fsnotify_group *group, |
409 | extern void fsnotify_destroy_mark(struct fsnotify_mark *mark); | 415 | struct inode *inode, struct vfsmount *mnt, int allow_dups); |
416 | /* given a group and a mark, flag mark to be freed when all references are dropped */ | ||
417 | extern void fsnotify_destroy_mark(struct fsnotify_mark *mark, | ||
418 | struct fsnotify_group *group); | ||
419 | extern void fsnotify_destroy_mark_locked(struct fsnotify_mark *mark, | ||
420 | struct fsnotify_group *group); | ||
410 | /* run all the marks in a group, and clear all of the vfsmount marks */ | 421 | /* run all the marks in a group, and clear all of the vfsmount marks */ |
411 | extern void fsnotify_clear_vfsmount_marks_by_group(struct fsnotify_group *group); | 422 | extern void fsnotify_clear_vfsmount_marks_by_group(struct fsnotify_group *group); |
412 | /* run all the marks in a group, and clear all of the inode marks */ | 423 | /* run all the marks in a group, and clear all of the inode marks */ |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index f74856e17e48..0f615eb23d05 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -30,6 +30,7 @@ struct vm_area_struct; | |||
30 | #define ___GFP_HARDWALL 0x20000u | 30 | #define ___GFP_HARDWALL 0x20000u |
31 | #define ___GFP_THISNODE 0x40000u | 31 | #define ___GFP_THISNODE 0x40000u |
32 | #define ___GFP_RECLAIMABLE 0x80000u | 32 | #define ___GFP_RECLAIMABLE 0x80000u |
33 | #define ___GFP_KMEMCG 0x100000u | ||
33 | #define ___GFP_NOTRACK 0x200000u | 34 | #define ___GFP_NOTRACK 0x200000u |
34 | #define ___GFP_NO_KSWAPD 0x400000u | 35 | #define ___GFP_NO_KSWAPD 0x400000u |
35 | #define ___GFP_OTHER_NODE 0x800000u | 36 | #define ___GFP_OTHER_NODE 0x800000u |
@@ -89,6 +90,7 @@ struct vm_area_struct; | |||
89 | 90 | ||
90 | #define __GFP_NO_KSWAPD ((__force gfp_t)___GFP_NO_KSWAPD) | 91 | #define __GFP_NO_KSWAPD ((__force gfp_t)___GFP_NO_KSWAPD) |
91 | #define __GFP_OTHER_NODE ((__force gfp_t)___GFP_OTHER_NODE) /* On behalf of other node */ | 92 | #define __GFP_OTHER_NODE ((__force gfp_t)___GFP_OTHER_NODE) /* On behalf of other node */ |
93 | #define __GFP_KMEMCG ((__force gfp_t)___GFP_KMEMCG) /* Allocation comes from a memcg-accounted resource */ | ||
92 | #define __GFP_WRITE ((__force gfp_t)___GFP_WRITE) /* Allocator intends to dirty page */ | 94 | #define __GFP_WRITE ((__force gfp_t)___GFP_WRITE) /* Allocator intends to dirty page */ |
93 | 95 | ||
94 | /* | 96 | /* |
@@ -365,6 +367,9 @@ extern void free_pages(unsigned long addr, unsigned int order); | |||
365 | extern void free_hot_cold_page(struct page *page, int cold); | 367 | extern void free_hot_cold_page(struct page *page, int cold); |
366 | extern void free_hot_cold_page_list(struct list_head *list, int cold); | 368 | extern void free_hot_cold_page_list(struct list_head *list, int cold); |
367 | 369 | ||
370 | extern void __free_memcg_kmem_pages(struct page *page, unsigned int order); | ||
371 | extern void free_memcg_kmem_pages(unsigned long addr, unsigned int order); | ||
372 | |||
368 | #define __free_page(page) __free_pages((page), 0) | 373 | #define __free_page(page) __free_pages((page), 0) |
369 | #define free_page(addr) free_pages((addr), 0) | 374 | #define free_page(addr) free_pages((addr), 0) |
370 | 375 | ||
diff --git a/include/linux/hdlc/Kbuild b/include/linux/hdlc/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/linux/hdlc/Kbuild +++ /dev/null | |||
diff --git a/include/linux/hsi/Kbuild b/include/linux/hsi/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/linux/hsi/Kbuild +++ /dev/null | |||
diff --git a/include/linux/hugetlb_cgroup.h b/include/linux/hugetlb_cgroup.h index d73878c694b3..ce8217f7b5c2 100644 --- a/include/linux/hugetlb_cgroup.h +++ b/include/linux/hugetlb_cgroup.h | |||
@@ -62,7 +62,7 @@ extern void hugetlb_cgroup_uncharge_page(int idx, unsigned long nr_pages, | |||
62 | struct page *page); | 62 | struct page *page); |
63 | extern void hugetlb_cgroup_uncharge_cgroup(int idx, unsigned long nr_pages, | 63 | extern void hugetlb_cgroup_uncharge_cgroup(int idx, unsigned long nr_pages, |
64 | struct hugetlb_cgroup *h_cg); | 64 | struct hugetlb_cgroup *h_cg); |
65 | extern int hugetlb_cgroup_file_init(int idx) __init; | 65 | extern void hugetlb_cgroup_file_init(void) __init; |
66 | extern void hugetlb_cgroup_migrate(struct page *oldhpage, | 66 | extern void hugetlb_cgroup_migrate(struct page *oldhpage, |
67 | struct page *newhpage); | 67 | struct page *newhpage); |
68 | 68 | ||
@@ -111,9 +111,8 @@ hugetlb_cgroup_uncharge_cgroup(int idx, unsigned long nr_pages, | |||
111 | return; | 111 | return; |
112 | } | 112 | } |
113 | 113 | ||
114 | static inline int __init hugetlb_cgroup_file_init(int idx) | 114 | static inline void hugetlb_cgroup_file_init(void) |
115 | { | 115 | { |
116 | return 0; | ||
117 | } | 116 | } |
118 | 117 | ||
119 | static inline void hugetlb_cgroup_migrate(struct page *oldhpage, | 118 | static inline void hugetlb_cgroup_migrate(struct page *oldhpage, |
diff --git a/include/linux/i2c-omap.h b/include/linux/i2c-omap.h index 92a0dc75bc74..babe0cf6d56b 100644 --- a/include/linux/i2c-omap.h +++ b/include/linux/i2c-omap.h | |||
@@ -20,8 +20,6 @@ | |||
20 | #define OMAP_I2C_FLAG_NO_FIFO BIT(0) | 20 | #define OMAP_I2C_FLAG_NO_FIFO BIT(0) |
21 | #define OMAP_I2C_FLAG_SIMPLE_CLOCK BIT(1) | 21 | #define OMAP_I2C_FLAG_SIMPLE_CLOCK BIT(1) |
22 | #define OMAP_I2C_FLAG_16BIT_DATA_REG BIT(2) | 22 | #define OMAP_I2C_FLAG_16BIT_DATA_REG BIT(2) |
23 | #define OMAP_I2C_FLAG_RESET_REGS_POSTIDLE BIT(3) | ||
24 | #define OMAP_I2C_FLAG_APPLY_ERRATA_I207 BIT(4) | ||
25 | #define OMAP_I2C_FLAG_ALWAYS_ARMXOR_CLK BIT(5) | 23 | #define OMAP_I2C_FLAG_ALWAYS_ARMXOR_CLK BIT(5) |
26 | #define OMAP_I2C_FLAG_FORCE_19200_INT_CLK BIT(6) | 24 | #define OMAP_I2C_FLAG_FORCE_19200_INT_CLK BIT(6) |
27 | /* how the CPU address bus must be translated for I2C unit access */ | 25 | /* how the CPU address bus must be translated for I2C unit access */ |
diff --git a/include/linux/i2c/i2c-sh_mobile.h b/include/linux/i2c/i2c-sh_mobile.h index beda7081aead..06e3089795fb 100644 --- a/include/linux/i2c/i2c-sh_mobile.h +++ b/include/linux/i2c/i2c-sh_mobile.h | |||
@@ -5,6 +5,7 @@ | |||
5 | 5 | ||
6 | struct i2c_sh_mobile_platform_data { | 6 | struct i2c_sh_mobile_platform_data { |
7 | unsigned long bus_speed; | 7 | unsigned long bus_speed; |
8 | unsigned int clks_per_count; | ||
8 | }; | 9 | }; |
9 | 10 | ||
10 | #endif /* __I2C_SH_MOBILE_H__ */ | 11 | #endif /* __I2C_SH_MOBILE_H__ */ |
diff --git a/include/linux/ima.h b/include/linux/ima.h index 2c7223d7e73b..86c361e947b9 100644 --- a/include/linux/ima.h +++ b/include/linux/ima.h | |||
@@ -18,6 +18,7 @@ extern int ima_bprm_check(struct linux_binprm *bprm); | |||
18 | extern int ima_file_check(struct file *file, int mask); | 18 | extern int ima_file_check(struct file *file, int mask); |
19 | extern void ima_file_free(struct file *file); | 19 | extern void ima_file_free(struct file *file); |
20 | extern int ima_file_mmap(struct file *file, unsigned long prot); | 20 | extern int ima_file_mmap(struct file *file, unsigned long prot); |
21 | extern int ima_module_check(struct file *file); | ||
21 | 22 | ||
22 | #else | 23 | #else |
23 | static inline int ima_bprm_check(struct linux_binprm *bprm) | 24 | static inline int ima_bprm_check(struct linux_binprm *bprm) |
@@ -40,6 +41,11 @@ static inline int ima_file_mmap(struct file *file, unsigned long prot) | |||
40 | return 0; | 41 | return 0; |
41 | } | 42 | } |
42 | 43 | ||
44 | static inline int ima_module_check(struct file *file) | ||
45 | { | ||
46 | return 0; | ||
47 | } | ||
48 | |||
43 | #endif /* CONFIG_IMA_H */ | 49 | #endif /* CONFIG_IMA_H */ |
44 | 50 | ||
45 | #ifdef CONFIG_IMA_APPRAISE | 51 | #ifdef CONFIG_IMA_APPRAISE |
diff --git a/include/linux/init.h b/include/linux/init.h index 9230c9408d8b..861814710d52 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -93,14 +93,6 @@ | |||
93 | 93 | ||
94 | #define __exit __section(.exit.text) __exitused __cold notrace | 94 | #define __exit __section(.exit.text) __exitused __cold notrace |
95 | 95 | ||
96 | /* Used for HOTPLUG, but that is always enabled now, so just make them noops */ | ||
97 | #define __devinit | ||
98 | #define __devinitdata | ||
99 | #define __devinitconst | ||
100 | #define __devexit | ||
101 | #define __devexitdata | ||
102 | #define __devexitconst | ||
103 | |||
104 | /* Used for HOTPLUG_CPU */ | 96 | /* Used for HOTPLUG_CPU */ |
105 | #define __cpuinit __section(.cpuinit.text) __cold notrace | 97 | #define __cpuinit __section(.cpuinit.text) __cold notrace |
106 | #define __cpuinitdata __section(.cpuinit.data) | 98 | #define __cpuinitdata __section(.cpuinit.data) |
@@ -338,18 +330,6 @@ void __init parse_early_options(char *cmdline); | |||
338 | #define __INITRODATA_OR_MODULE __INITRODATA | 330 | #define __INITRODATA_OR_MODULE __INITRODATA |
339 | #endif /*CONFIG_MODULES*/ | 331 | #endif /*CONFIG_MODULES*/ |
340 | 332 | ||
341 | /* Functions marked as __devexit may be discarded at kernel link time, depending | ||
342 | on config options. Newer versions of binutils detect references from | ||
343 | retained sections to discarded sections and flag an error. Pointers to | ||
344 | __devexit functions must use __devexit_p(function_name), the wrapper will | ||
345 | insert either the function_name or NULL, depending on the config options. | ||
346 | */ | ||
347 | #if defined(MODULE) || defined(CONFIG_HOTPLUG) | ||
348 | #define __devexit_p(x) x | ||
349 | #else | ||
350 | #define __devexit_p(x) NULL | ||
351 | #endif | ||
352 | |||
353 | #ifdef MODULE | 333 | #ifdef MODULE |
354 | #define __exit_p(x) x | 334 | #define __exit_p(x) x |
355 | #else | 335 | #else |
diff --git a/include/linux/input.h b/include/linux/input.h index cab994ba6d91..82ce323b9986 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -112,6 +112,11 @@ struct input_value { | |||
112 | * @h_list: list of input handles associated with the device. When | 112 | * @h_list: list of input handles associated with the device. When |
113 | * accessing the list dev->mutex must be held | 113 | * accessing the list dev->mutex must be held |
114 | * @node: used to place the device onto input_dev_list | 114 | * @node: used to place the device onto input_dev_list |
115 | * @num_vals: number of values queued in the current frame | ||
116 | * @max_vals: maximum number of values queued in a frame | ||
117 | * @vals: array of values queued in the current frame | ||
118 | * @devres_managed: indicates that devices is managed with devres framework | ||
119 | * and needs not be explicitly unregistered or freed. | ||
115 | */ | 120 | */ |
116 | struct input_dev { | 121 | struct input_dev { |
117 | const char *name; | 122 | const char *name; |
@@ -180,6 +185,8 @@ struct input_dev { | |||
180 | unsigned int num_vals; | 185 | unsigned int num_vals; |
181 | unsigned int max_vals; | 186 | unsigned int max_vals; |
182 | struct input_value *vals; | 187 | struct input_value *vals; |
188 | |||
189 | bool devres_managed; | ||
183 | }; | 190 | }; |
184 | #define to_input_dev(d) container_of(d, struct input_dev, dev) | 191 | #define to_input_dev(d) container_of(d, struct input_dev, dev) |
185 | 192 | ||
@@ -323,7 +330,8 @@ struct input_handle { | |||
323 | struct list_head h_node; | 330 | struct list_head h_node; |
324 | }; | 331 | }; |
325 | 332 | ||
326 | struct input_dev *input_allocate_device(void); | 333 | struct input_dev __must_check *input_allocate_device(void); |
334 | struct input_dev __must_check *devm_input_allocate_device(struct device *); | ||
327 | void input_free_device(struct input_dev *dev); | 335 | void input_free_device(struct input_dev *dev); |
328 | 336 | ||
329 | static inline struct input_dev *input_get_device(struct input_dev *dev) | 337 | static inline struct input_dev *input_get_device(struct input_dev *dev) |
diff --git a/include/linux/input/bu21013.h b/include/linux/input/bu21013.h index 05e03284b92a..6230d76bde5d 100644 --- a/include/linux/input/bu21013.h +++ b/include/linux/input/bu21013.h | |||
@@ -9,13 +9,10 @@ | |||
9 | 9 | ||
10 | /** | 10 | /** |
11 | * struct bu21013_platform_device - Handle the platform data | 11 | * struct bu21013_platform_device - Handle the platform data |
12 | * @cs_en: pointer to the cs enable function | ||
13 | * @cs_dis: pointer to the cs disable function | ||
14 | * @irq_read_val: pointer to read the pen irq value function | ||
15 | * @touch_x_max: touch x max | 12 | * @touch_x_max: touch x max |
16 | * @touch_y_max: touch y max | 13 | * @touch_y_max: touch y max |
17 | * @cs_pin: chip select pin | 14 | * @cs_pin: chip select pin |
18 | * @irq: irq pin | 15 | * @touch_pin: touch gpio pin |
19 | * @ext_clk: external clock flag | 16 | * @ext_clk: external clock flag |
20 | * @x_flip: x flip flag | 17 | * @x_flip: x flip flag |
21 | * @y_flip: y flip flag | 18 | * @y_flip: y flip flag |
@@ -24,13 +21,10 @@ | |||
24 | * This is used to handle the platform data | 21 | * This is used to handle the platform data |
25 | */ | 22 | */ |
26 | struct bu21013_platform_device { | 23 | struct bu21013_platform_device { |
27 | int (*cs_en)(int reset_pin); | ||
28 | int (*cs_dis)(int reset_pin); | ||
29 | int (*irq_read_val)(void); | ||
30 | int touch_x_max; | 24 | int touch_x_max; |
31 | int touch_y_max; | 25 | int touch_y_max; |
32 | unsigned int cs_pin; | 26 | unsigned int cs_pin; |
33 | unsigned int irq; | 27 | unsigned int touch_pin; |
34 | bool ext_clk; | 28 | bool ext_clk; |
35 | bool x_flip; | 29 | bool x_flip; |
36 | bool y_flip; | 30 | bool y_flip; |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 5e4e6170f43a..5fa5afeeb759 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -268,11 +268,6 @@ struct irq_affinity_notify { | |||
268 | extern int | 268 | extern int |
269 | irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify); | 269 | irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify); |
270 | 270 | ||
271 | static inline void irq_run_affinity_notifiers(void) | ||
272 | { | ||
273 | flush_scheduled_work(); | ||
274 | } | ||
275 | |||
276 | #else /* CONFIG_SMP */ | 271 | #else /* CONFIG_SMP */ |
277 | 272 | ||
278 | static inline int irq_set_affinity(unsigned int irq, const struct cpumask *m) | 273 | static inline int irq_set_affinity(unsigned int irq, const struct cpumask *m) |
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index fe771978e877..ae221a7b5092 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h | |||
@@ -24,6 +24,7 @@ struct ipc_ids { | |||
24 | unsigned short seq_max; | 24 | unsigned short seq_max; |
25 | struct rw_semaphore rw_mutex; | 25 | struct rw_semaphore rw_mutex; |
26 | struct idr ipcs_idr; | 26 | struct idr ipcs_idr; |
27 | int next_id; | ||
27 | }; | 28 | }; |
28 | 29 | ||
29 | struct ipc_namespace { | 30 | struct ipc_namespace { |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 1be23d9fdacb..e30b66346942 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -1098,7 +1098,7 @@ void jbd2_journal_set_triggers(struct buffer_head *, | |||
1098 | extern int jbd2_journal_dirty_metadata (handle_t *, struct buffer_head *); | 1098 | extern int jbd2_journal_dirty_metadata (handle_t *, struct buffer_head *); |
1099 | extern int jbd2_journal_forget (handle_t *, struct buffer_head *); | 1099 | extern int jbd2_journal_forget (handle_t *, struct buffer_head *); |
1100 | extern void journal_sync_buffer (struct buffer_head *); | 1100 | extern void journal_sync_buffer (struct buffer_head *); |
1101 | extern void jbd2_journal_invalidatepage(journal_t *, | 1101 | extern int jbd2_journal_invalidatepage(journal_t *, |
1102 | struct page *, unsigned long); | 1102 | struct page *, unsigned long); |
1103 | extern int jbd2_journal_try_to_free_buffers(journal_t *, struct page *, gfp_t); | 1103 | extern int jbd2_journal_try_to_free_buffers(journal_t *, struct page *, gfp_t); |
1104 | extern int jbd2_journal_stop(handle_t *); | 1104 | extern int jbd2_journal_stop(handle_t *); |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index d140e8fb075f..c566927efcbd 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -77,13 +77,15 @@ | |||
77 | 77 | ||
78 | /* | 78 | /* |
79 | * Divide positive or negative dividend by positive divisor and round | 79 | * Divide positive or negative dividend by positive divisor and round |
80 | * to closest integer. Result is undefined for negative divisors. | 80 | * to closest integer. Result is undefined for negative divisors and |
81 | * for negative dividends if the divisor variable type is unsigned. | ||
81 | */ | 82 | */ |
82 | #define DIV_ROUND_CLOSEST(x, divisor)( \ | 83 | #define DIV_ROUND_CLOSEST(x, divisor)( \ |
83 | { \ | 84 | { \ |
84 | typeof(x) __x = x; \ | 85 | typeof(x) __x = x; \ |
85 | typeof(divisor) __d = divisor; \ | 86 | typeof(divisor) __d = divisor; \ |
86 | (((typeof(x))-1) > 0 || (__x) > 0) ? \ | 87 | (((typeof(x))-1) > 0 || \ |
88 | ((typeof(divisor))-1) > 0 || (__x) > 0) ? \ | ||
87 | (((__x) + ((__d) / 2)) / (__d)) : \ | 89 | (((__x) + ((__d) / 2)) / (__d)) : \ |
88 | (((__x) - ((__d) / 2)) / (__d)); \ | 90 | (((__x) - ((__d) / 2)) / (__d)); \ |
89 | } \ | 91 | } \ |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 83ba0ab2c915..649e5f86b5f0 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -652,8 +652,8 @@ struct ata_device { | |||
652 | u32 gscr[SATA_PMP_GSCR_DWORDS]; /* PMP GSCR block */ | 652 | u32 gscr[SATA_PMP_GSCR_DWORDS]; /* PMP GSCR block */ |
653 | }; | 653 | }; |
654 | 654 | ||
655 | /* Identify Device Data Log (30h), SATA Settings (page 08h) */ | 655 | /* DEVSLP Timing Variables from Identify Device Data Log */ |
656 | u8 sata_settings[ATA_SECT_SIZE]; | 656 | u8 devslp_timing[ATA_LOG_DEVSLP_SIZE]; |
657 | 657 | ||
658 | /* error history */ | 658 | /* error history */ |
659 | int spdn_cnt; | 659 | int spdn_cnt; |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 00e46376e28f..2bca44b0893c 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -524,14 +524,17 @@ static inline void print_irqtrace_events(struct task_struct *curr) | |||
524 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 524 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
525 | # ifdef CONFIG_PROVE_LOCKING | 525 | # ifdef CONFIG_PROVE_LOCKING |
526 | # define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i) | 526 | # define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i) |
527 | # define rwsem_acquire_nest(l, s, t, n, i) lock_acquire(l, s, t, 0, 2, n, i) | ||
527 | # define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 2, NULL, i) | 528 | # define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 2, NULL, i) |
528 | # else | 529 | # else |
529 | # define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i) | 530 | # define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i) |
531 | # define rwsem_acquire_nest(l, s, t, n, i) lock_acquire(l, s, t, 0, 1, n, i) | ||
530 | # define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 1, NULL, i) | 532 | # define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 1, NULL, i) |
531 | # endif | 533 | # endif |
532 | # define rwsem_release(l, n, i) lock_release(l, n, i) | 534 | # define rwsem_release(l, n, i) lock_release(l, n, i) |
533 | #else | 535 | #else |
534 | # define rwsem_acquire(l, s, t, i) do { } while (0) | 536 | # define rwsem_acquire(l, s, t, i) do { } while (0) |
537 | # define rwsem_acquire_nest(l, s, t, n, i) do { } while (0) | ||
535 | # define rwsem_acquire_read(l, s, t, i) do { } while (0) | 538 | # define rwsem_acquire_read(l, s, t, i) do { } while (0) |
536 | # define rwsem_release(l, n, i) do { } while (0) | 539 | # define rwsem_release(l, n, i) do { } while (0) |
537 | #endif | 540 | #endif |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index e98a74c0c9c0..0108a56f814e 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -21,11 +21,14 @@ | |||
21 | #define _LINUX_MEMCONTROL_H | 21 | #define _LINUX_MEMCONTROL_H |
22 | #include <linux/cgroup.h> | 22 | #include <linux/cgroup.h> |
23 | #include <linux/vm_event_item.h> | 23 | #include <linux/vm_event_item.h> |
24 | #include <linux/hardirq.h> | ||
25 | #include <linux/jump_label.h> | ||
24 | 26 | ||
25 | struct mem_cgroup; | 27 | struct mem_cgroup; |
26 | struct page_cgroup; | 28 | struct page_cgroup; |
27 | struct page; | 29 | struct page; |
28 | struct mm_struct; | 30 | struct mm_struct; |
31 | struct kmem_cache; | ||
29 | 32 | ||
30 | /* Stats that can be updated by kernel. */ | 33 | /* Stats that can be updated by kernel. */ |
31 | enum mem_cgroup_page_stat_item { | 34 | enum mem_cgroup_page_stat_item { |
@@ -414,5 +417,211 @@ static inline void sock_release_memcg(struct sock *sk) | |||
414 | { | 417 | { |
415 | } | 418 | } |
416 | #endif /* CONFIG_INET && CONFIG_MEMCG_KMEM */ | 419 | #endif /* CONFIG_INET && CONFIG_MEMCG_KMEM */ |
420 | |||
421 | #ifdef CONFIG_MEMCG_KMEM | ||
422 | extern struct static_key memcg_kmem_enabled_key; | ||
423 | |||
424 | extern int memcg_limited_groups_array_size; | ||
425 | |||
426 | /* | ||
427 | * Helper macro to loop through all memcg-specific caches. Callers must still | ||
428 | * check if the cache is valid (it is either valid or NULL). | ||
429 | * the slab_mutex must be held when looping through those caches | ||
430 | */ | ||
431 | #define for_each_memcg_cache_index(_idx) \ | ||
432 | for ((_idx) = 0; i < memcg_limited_groups_array_size; (_idx)++) | ||
433 | |||
434 | static inline bool memcg_kmem_enabled(void) | ||
435 | { | ||
436 | return static_key_false(&memcg_kmem_enabled_key); | ||
437 | } | ||
438 | |||
439 | /* | ||
440 | * In general, we'll do everything in our power to not incur in any overhead | ||
441 | * for non-memcg users for the kmem functions. Not even a function call, if we | ||
442 | * can avoid it. | ||
443 | * | ||
444 | * Therefore, we'll inline all those functions so that in the best case, we'll | ||
445 | * see that kmemcg is off for everybody and proceed quickly. If it is on, | ||
446 | * we'll still do most of the flag checking inline. We check a lot of | ||
447 | * conditions, but because they are pretty simple, they are expected to be | ||
448 | * fast. | ||
449 | */ | ||
450 | bool __memcg_kmem_newpage_charge(gfp_t gfp, struct mem_cgroup **memcg, | ||
451 | int order); | ||
452 | void __memcg_kmem_commit_charge(struct page *page, | ||
453 | struct mem_cgroup *memcg, int order); | ||
454 | void __memcg_kmem_uncharge_pages(struct page *page, int order); | ||
455 | |||
456 | int memcg_cache_id(struct mem_cgroup *memcg); | ||
457 | int memcg_register_cache(struct mem_cgroup *memcg, struct kmem_cache *s, | ||
458 | struct kmem_cache *root_cache); | ||
459 | void memcg_release_cache(struct kmem_cache *cachep); | ||
460 | void memcg_cache_list_add(struct mem_cgroup *memcg, struct kmem_cache *cachep); | ||
461 | |||
462 | int memcg_update_cache_size(struct kmem_cache *s, int num_groups); | ||
463 | void memcg_update_array_size(int num_groups); | ||
464 | |||
465 | struct kmem_cache * | ||
466 | __memcg_kmem_get_cache(struct kmem_cache *cachep, gfp_t gfp); | ||
467 | |||
468 | void mem_cgroup_destroy_cache(struct kmem_cache *cachep); | ||
469 | void kmem_cache_destroy_memcg_children(struct kmem_cache *s); | ||
470 | |||
471 | /** | ||
472 | * memcg_kmem_newpage_charge: verify if a new kmem allocation is allowed. | ||
473 | * @gfp: the gfp allocation flags. | ||
474 | * @memcg: a pointer to the memcg this was charged against. | ||
475 | * @order: allocation order. | ||
476 | * | ||
477 | * returns true if the memcg where the current task belongs can hold this | ||
478 | * allocation. | ||
479 | * | ||
480 | * We return true automatically if this allocation is not to be accounted to | ||
481 | * any memcg. | ||
482 | */ | ||
483 | static inline bool | ||
484 | memcg_kmem_newpage_charge(gfp_t gfp, struct mem_cgroup **memcg, int order) | ||
485 | { | ||
486 | if (!memcg_kmem_enabled()) | ||
487 | return true; | ||
488 | |||
489 | /* | ||
490 | * __GFP_NOFAIL allocations will move on even if charging is not | ||
491 | * possible. Therefore we don't even try, and have this allocation | ||
492 | * unaccounted. We could in theory charge it with | ||
493 | * res_counter_charge_nofail, but we hope those allocations are rare, | ||
494 | * and won't be worth the trouble. | ||
495 | */ | ||
496 | if (!(gfp & __GFP_KMEMCG) || (gfp & __GFP_NOFAIL)) | ||
497 | return true; | ||
498 | if (in_interrupt() || (!current->mm) || (current->flags & PF_KTHREAD)) | ||
499 | return true; | ||
500 | |||
501 | /* If the test is dying, just let it go. */ | ||
502 | if (unlikely(fatal_signal_pending(current))) | ||
503 | return true; | ||
504 | |||
505 | return __memcg_kmem_newpage_charge(gfp, memcg, order); | ||
506 | } | ||
507 | |||
508 | /** | ||
509 | * memcg_kmem_uncharge_pages: uncharge pages from memcg | ||
510 | * @page: pointer to struct page being freed | ||
511 | * @order: allocation order. | ||
512 | * | ||
513 | * there is no need to specify memcg here, since it is embedded in page_cgroup | ||
514 | */ | ||
515 | static inline void | ||
516 | memcg_kmem_uncharge_pages(struct page *page, int order) | ||
517 | { | ||
518 | if (memcg_kmem_enabled()) | ||
519 | __memcg_kmem_uncharge_pages(page, order); | ||
520 | } | ||
521 | |||
522 | /** | ||
523 | * memcg_kmem_commit_charge: embeds correct memcg in a page | ||
524 | * @page: pointer to struct page recently allocated | ||
525 | * @memcg: the memcg structure we charged against | ||
526 | * @order: allocation order. | ||
527 | * | ||
528 | * Needs to be called after memcg_kmem_newpage_charge, regardless of success or | ||
529 | * failure of the allocation. if @page is NULL, this function will revert the | ||
530 | * charges. Otherwise, it will commit the memcg given by @memcg to the | ||
531 | * corresponding page_cgroup. | ||
532 | */ | ||
533 | static inline void | ||
534 | memcg_kmem_commit_charge(struct page *page, struct mem_cgroup *memcg, int order) | ||
535 | { | ||
536 | if (memcg_kmem_enabled() && memcg) | ||
537 | __memcg_kmem_commit_charge(page, memcg, order); | ||
538 | } | ||
539 | |||
540 | /** | ||
541 | * memcg_kmem_get_cache: selects the correct per-memcg cache for allocation | ||
542 | * @cachep: the original global kmem cache | ||
543 | * @gfp: allocation flags. | ||
544 | * | ||
545 | * This function assumes that the task allocating, which determines the memcg | ||
546 | * in the page allocator, belongs to the same cgroup throughout the whole | ||
547 | * process. Misacounting can happen if the task calls memcg_kmem_get_cache() | ||
548 | * while belonging to a cgroup, and later on changes. This is considered | ||
549 | * acceptable, and should only happen upon task migration. | ||
550 | * | ||
551 | * Before the cache is created by the memcg core, there is also a possible | ||
552 | * imbalance: the task belongs to a memcg, but the cache being allocated from | ||
553 | * is the global cache, since the child cache is not yet guaranteed to be | ||
554 | * ready. This case is also fine, since in this case the GFP_KMEMCG will not be | ||
555 | * passed and the page allocator will not attempt any cgroup accounting. | ||
556 | */ | ||
557 | static __always_inline struct kmem_cache * | ||
558 | memcg_kmem_get_cache(struct kmem_cache *cachep, gfp_t gfp) | ||
559 | { | ||
560 | if (!memcg_kmem_enabled()) | ||
561 | return cachep; | ||
562 | if (gfp & __GFP_NOFAIL) | ||
563 | return cachep; | ||
564 | if (in_interrupt() || (!current->mm) || (current->flags & PF_KTHREAD)) | ||
565 | return cachep; | ||
566 | if (unlikely(fatal_signal_pending(current))) | ||
567 | return cachep; | ||
568 | |||
569 | return __memcg_kmem_get_cache(cachep, gfp); | ||
570 | } | ||
571 | #else | ||
572 | #define for_each_memcg_cache_index(_idx) \ | ||
573 | for (; NULL; ) | ||
574 | |||
575 | static inline bool memcg_kmem_enabled(void) | ||
576 | { | ||
577 | return false; | ||
578 | } | ||
579 | |||
580 | static inline bool | ||
581 | memcg_kmem_newpage_charge(gfp_t gfp, struct mem_cgroup **memcg, int order) | ||
582 | { | ||
583 | return true; | ||
584 | } | ||
585 | |||
586 | static inline void memcg_kmem_uncharge_pages(struct page *page, int order) | ||
587 | { | ||
588 | } | ||
589 | |||
590 | static inline void | ||
591 | memcg_kmem_commit_charge(struct page *page, struct mem_cgroup *memcg, int order) | ||
592 | { | ||
593 | } | ||
594 | |||
595 | static inline int memcg_cache_id(struct mem_cgroup *memcg) | ||
596 | { | ||
597 | return -1; | ||
598 | } | ||
599 | |||
600 | static inline int | ||
601 | memcg_register_cache(struct mem_cgroup *memcg, struct kmem_cache *s, | ||
602 | struct kmem_cache *root_cache) | ||
603 | { | ||
604 | return 0; | ||
605 | } | ||
606 | |||
607 | static inline void memcg_release_cache(struct kmem_cache *cachep) | ||
608 | { | ||
609 | } | ||
610 | |||
611 | static inline void memcg_cache_list_add(struct mem_cgroup *memcg, | ||
612 | struct kmem_cache *s) | ||
613 | { | ||
614 | } | ||
615 | |||
616 | static inline struct kmem_cache * | ||
617 | memcg_kmem_get_cache(struct kmem_cache *cachep, gfp_t gfp) | ||
618 | { | ||
619 | return cachep; | ||
620 | } | ||
621 | |||
622 | static inline void kmem_cache_destroy_memcg_children(struct kmem_cache *s) | ||
623 | { | ||
624 | } | ||
625 | #endif /* CONFIG_MEMCG_KMEM */ | ||
417 | #endif /* _LINUX_MEMCONTROL_H */ | 626 | #endif /* _LINUX_MEMCONTROL_H */ |
418 | 627 | ||
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index 9adc270de7ef..0d7df39a5885 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h | |||
@@ -123,7 +123,7 @@ struct sp_node { | |||
123 | 123 | ||
124 | struct shared_policy { | 124 | struct shared_policy { |
125 | struct rb_root root; | 125 | struct rb_root root; |
126 | struct mutex mutex; | 126 | spinlock_t lock; |
127 | }; | 127 | }; |
128 | 128 | ||
129 | void mpol_shared_policy_init(struct shared_policy *sp, struct mempolicy *mpol); | 129 | void mpol_shared_policy_init(struct shared_policy *sp, struct mempolicy *mpol); |
@@ -165,11 +165,10 @@ int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from, | |||
165 | 165 | ||
166 | 166 | ||
167 | #ifdef CONFIG_TMPFS | 167 | #ifdef CONFIG_TMPFS |
168 | extern int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context); | 168 | extern int mpol_parse_str(char *str, struct mempolicy **mpol); |
169 | #endif | 169 | #endif |
170 | 170 | ||
171 | extern int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol, | 171 | extern int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol); |
172 | int no_context); | ||
173 | 172 | ||
174 | /* Check if a vma is migratable */ | 173 | /* Check if a vma is migratable */ |
175 | static inline int vma_migratable(struct vm_area_struct *vma) | 174 | static inline int vma_migratable(struct vm_area_struct *vma) |
@@ -296,15 +295,13 @@ static inline void check_highest_zone(int k) | |||
296 | } | 295 | } |
297 | 296 | ||
298 | #ifdef CONFIG_TMPFS | 297 | #ifdef CONFIG_TMPFS |
299 | static inline int mpol_parse_str(char *str, struct mempolicy **mpol, | 298 | static inline int mpol_parse_str(char *str, struct mempolicy **mpol) |
300 | int no_context) | ||
301 | { | 299 | { |
302 | return 1; /* error */ | 300 | return 1; /* error */ |
303 | } | 301 | } |
304 | #endif | 302 | #endif |
305 | 303 | ||
306 | static inline int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol, | 304 | static inline int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol) |
307 | int no_context) | ||
308 | { | 305 | { |
309 | return 0; | 306 | return 0; |
310 | } | 307 | } |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 21821da2abfd..20ea939c22a6 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -625,6 +625,7 @@ struct mlx4_dev { | |||
625 | u8 rev_id; | 625 | u8 rev_id; |
626 | char board_id[MLX4_BOARD_ID_LEN]; | 626 | char board_id[MLX4_BOARD_ID_LEN]; |
627 | int num_vfs; | 627 | int num_vfs; |
628 | int oper_log_mgm_entry_size; | ||
628 | u64 regid_promisc_array[MLX4_MAX_PORTS + 1]; | 629 | u64 regid_promisc_array[MLX4_MAX_PORTS + 1]; |
629 | u64 regid_allmulti_array[MLX4_MAX_PORTS + 1]; | 630 | u64 regid_allmulti_array[MLX4_MAX_PORTS + 1]; |
630 | }; | 631 | }; |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 7f4f906190bd..66e2f7c61e5c 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -455,7 +455,6 @@ void put_pages_list(struct list_head *pages); | |||
455 | 455 | ||
456 | void split_page(struct page *page, unsigned int order); | 456 | void split_page(struct page *page, unsigned int order); |
457 | int split_free_page(struct page *page); | 457 | int split_free_page(struct page *page); |
458 | int capture_free_page(struct page *page, int alloc_order, int migratetype); | ||
459 | 458 | ||
460 | /* | 459 | /* |
461 | * Compound pages have a destructor function. Provide a | 460 | * Compound pages have a destructor function. Provide a |
@@ -1007,7 +1006,6 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping, | |||
1007 | 1006 | ||
1008 | extern void truncate_pagecache(struct inode *inode, loff_t old, loff_t new); | 1007 | extern void truncate_pagecache(struct inode *inode, loff_t old, loff_t new); |
1009 | extern void truncate_setsize(struct inode *inode, loff_t newsize); | 1008 | extern void truncate_setsize(struct inode *inode, loff_t newsize); |
1010 | extern int vmtruncate(struct inode *inode, loff_t offset); | ||
1011 | void truncate_pagecache_range(struct inode *inode, loff_t offset, loff_t end); | 1009 | void truncate_pagecache_range(struct inode *inode, loff_t offset, loff_t end); |
1012 | int truncate_inode_page(struct address_space *mapping, struct page *page); | 1010 | int truncate_inode_page(struct address_space *mapping, struct page *page); |
1013 | int generic_error_remove_page(struct address_space *mapping, struct page *page); | 1011 | int generic_error_remove_page(struct address_space *mapping, struct page *page); |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 7d9ebb7cc982..f8f5162a3571 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -128,10 +128,7 @@ struct page { | |||
128 | }; | 128 | }; |
129 | 129 | ||
130 | struct list_head list; /* slobs list of pages */ | 130 | struct list_head list; /* slobs list of pages */ |
131 | struct { /* slab fields */ | 131 | struct slab *slab_page; /* slab fields */ |
132 | struct kmem_cache *slab_cache; | ||
133 | struct slab *slab_page; | ||
134 | }; | ||
135 | }; | 132 | }; |
136 | 133 | ||
137 | /* Remainder is not double word aligned */ | 134 | /* Remainder is not double word aligned */ |
@@ -146,7 +143,7 @@ struct page { | |||
146 | #if USE_SPLIT_PTLOCKS | 143 | #if USE_SPLIT_PTLOCKS |
147 | spinlock_t ptl; | 144 | spinlock_t ptl; |
148 | #endif | 145 | #endif |
149 | struct kmem_cache *slab; /* SLUB: Pointer to slab */ | 146 | struct kmem_cache *slab_cache; /* SL[AU]B: Pointer to slab */ |
150 | struct page *first_page; /* Compound tail pages */ | 147 | struct page *first_page; /* Compound tail pages */ |
151 | }; | 148 | }; |
152 | 149 | ||
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 4bec5be82cab..73b64a38b984 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -503,14 +503,6 @@ struct zone { | |||
503 | * rarely used fields: | 503 | * rarely used fields: |
504 | */ | 504 | */ |
505 | const char *name; | 505 | const char *name; |
506 | #ifdef CONFIG_MEMORY_ISOLATION | ||
507 | /* | ||
508 | * the number of MIGRATE_ISOLATE *pageblock*. | ||
509 | * We need this for free page counting. Look at zone_watermark_ok_safe. | ||
510 | * It's protected by zone->lock | ||
511 | */ | ||
512 | int nr_pageblock_isolate; | ||
513 | #endif | ||
514 | } ____cacheline_internodealigned_in_smp; | 506 | } ____cacheline_internodealigned_in_smp; |
515 | 507 | ||
516 | typedef enum { | 508 | typedef enum { |
diff --git a/include/linux/module.h b/include/linux/module.h index 7760c6d344a3..1375ee3f03aa 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -199,11 +199,11 @@ struct module_use { | |||
199 | struct module *source, *target; | 199 | struct module *source, *target; |
200 | }; | 200 | }; |
201 | 201 | ||
202 | enum module_state | 202 | enum module_state { |
203 | { | 203 | MODULE_STATE_LIVE, /* Normal state. */ |
204 | MODULE_STATE_LIVE, | 204 | MODULE_STATE_COMING, /* Full formed, running module_init. */ |
205 | MODULE_STATE_COMING, | 205 | MODULE_STATE_GOING, /* Going away. */ |
206 | MODULE_STATE_GOING, | 206 | MODULE_STATE_UNFORMED, /* Still setting it up. */ |
207 | }; | 207 | }; |
208 | 208 | ||
209 | /** | 209 | /** |
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index d6a58065c09c..137b4198fc03 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h | |||
@@ -16,17 +16,15 @@ | |||
16 | /* Chosen so that structs with an unsigned long line up. */ | 16 | /* Chosen so that structs with an unsigned long line up. */ |
17 | #define MAX_PARAM_PREFIX_LEN (64 - sizeof(unsigned long)) | 17 | #define MAX_PARAM_PREFIX_LEN (64 - sizeof(unsigned long)) |
18 | 18 | ||
19 | #define ___module_cat(a,b) __mod_ ## a ## b | ||
20 | #define __module_cat(a,b) ___module_cat(a,b) | ||
21 | #ifdef MODULE | 19 | #ifdef MODULE |
22 | #define __MODULE_INFO(tag, name, info) \ | 20 | #define __MODULE_INFO(tag, name, info) \ |
23 | static const char __module_cat(name,__LINE__)[] \ | 21 | static const char __UNIQUE_ID(name)[] \ |
24 | __used __attribute__((section(".modinfo"), unused, aligned(1))) \ | 22 | __used __attribute__((section(".modinfo"), unused, aligned(1))) \ |
25 | = __stringify(tag) "=" info | 23 | = __stringify(tag) "=" info |
26 | #else /* !MODULE */ | 24 | #else /* !MODULE */ |
27 | /* This struct is here for syntactic coherency, it is not used */ | 25 | /* This struct is here for syntactic coherency, it is not used */ |
28 | #define __MODULE_INFO(tag, name, info) \ | 26 | #define __MODULE_INFO(tag, name, info) \ |
29 | struct __module_cat(name,__LINE__) {} | 27 | struct __UNIQUE_ID(name) {} |
30 | #endif | 28 | #endif |
31 | #define __MODULE_PARM_TYPE(name, _type) \ | 29 | #define __MODULE_PARM_TYPE(name, _type) \ |
32 | __MODULE_INFO(parmtype, name##type, #name ":" _type) | 30 | __MODULE_INFO(parmtype, name##type, #name ":" _type) |
diff --git a/include/linux/msg.h b/include/linux/msg.h index 7a4b9e97d29a..391af8d11cce 100644 --- a/include/linux/msg.h +++ b/include/linux/msg.h | |||
@@ -34,7 +34,9 @@ struct msg_queue { | |||
34 | /* Helper routines for sys_msgsnd and sys_msgrcv */ | 34 | /* Helper routines for sys_msgsnd and sys_msgrcv */ |
35 | extern long do_msgsnd(int msqid, long mtype, void __user *mtext, | 35 | extern long do_msgsnd(int msqid, long mtype, void __user *mtext, |
36 | size_t msgsz, int msgflg); | 36 | size_t msgsz, int msgflg); |
37 | extern long do_msgrcv(int msqid, long *pmtype, void __user *mtext, | 37 | extern long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp, |
38 | size_t msgsz, long msgtyp, int msgflg); | 38 | int msgflg, |
39 | long (*msg_fill)(void __user *, struct msg_msg *, | ||
40 | size_t)); | ||
39 | 41 | ||
40 | #endif /* _LINUX_MSG_H */ | 42 | #endif /* _LINUX_MSG_H */ |
diff --git a/include/linux/mtd/blktrans.h b/include/linux/mtd/blktrans.h index ed270bd2e4df..4eb0a50d0c55 100644 --- a/include/linux/mtd/blktrans.h +++ b/include/linux/mtd/blktrans.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/mutex.h> | 23 | #include <linux/mutex.h> |
24 | #include <linux/kref.h> | 24 | #include <linux/kref.h> |
25 | #include <linux/sysfs.h> | 25 | #include <linux/sysfs.h> |
26 | #include <linux/workqueue.h> | ||
26 | 27 | ||
27 | struct hd_geometry; | 28 | struct hd_geometry; |
28 | struct mtd_info; | 29 | struct mtd_info; |
@@ -43,7 +44,8 @@ struct mtd_blktrans_dev { | |||
43 | struct kref ref; | 44 | struct kref ref; |
44 | struct gendisk *disk; | 45 | struct gendisk *disk; |
45 | struct attribute_group *disk_attributes; | 46 | struct attribute_group *disk_attributes; |
46 | struct task_struct *thread; | 47 | struct workqueue_struct *wq; |
48 | struct work_struct work; | ||
47 | struct request_queue *rq; | 49 | struct request_queue *rq; |
48 | spinlock_t queue_lock; | 50 | spinlock_t queue_lock; |
49 | void *priv; | 51 | void *priv; |
diff --git a/include/linux/mtd/doc2000.h b/include/linux/mtd/doc2000.h index 0f6fea73a1f6..407d1e556c39 100644 --- a/include/linux/mtd/doc2000.h +++ b/include/linux/mtd/doc2000.h | |||
@@ -92,12 +92,26 @@ | |||
92 | * Others use readb/writeb | 92 | * Others use readb/writeb |
93 | */ | 93 | */ |
94 | #if defined(__arm__) | 94 | #if defined(__arm__) |
95 | #define ReadDOC_(adr, reg) ((unsigned char)(*(volatile __u32 *)(((unsigned long)adr)+((reg)<<2)))) | 95 | static inline u8 ReadDOC_(u32 __iomem *addr, unsigned long reg) |
96 | #define WriteDOC_(d, adr, reg) do{ *(volatile __u32 *)(((unsigned long)adr)+((reg)<<2)) = (__u32)d; wmb();} while(0) | 96 | { |
97 | return __raw_readl(addr + reg); | ||
98 | } | ||
99 | static inline void WriteDOC_(u8 data, u32 __iomem *addr, unsigned long reg) | ||
100 | { | ||
101 | __raw_writel(data, addr + reg); | ||
102 | wmb(); | ||
103 | } | ||
97 | #define DOC_IOREMAP_LEN 0x8000 | 104 | #define DOC_IOREMAP_LEN 0x8000 |
98 | #elif defined(__ppc__) | 105 | #elif defined(__ppc__) |
99 | #define ReadDOC_(adr, reg) ((unsigned char)(*(volatile __u16 *)(((unsigned long)adr)+((reg)<<1)))) | 106 | static inline u8 ReadDOC_(u16 __iomem *addr, unsigned long reg) |
100 | #define WriteDOC_(d, adr, reg) do{ *(volatile __u16 *)(((unsigned long)adr)+((reg)<<1)) = (__u16)d; wmb();} while(0) | 107 | { |
108 | return __raw_readw(addr + reg); | ||
109 | } | ||
110 | static inline void WriteDOC_(u8 data, u16 __iomem *addr, unsigned long reg) | ||
111 | { | ||
112 | __raw_writew(data, addr + reg); | ||
113 | wmb(); | ||
114 | } | ||
101 | #define DOC_IOREMAP_LEN 0x4000 | 115 | #define DOC_IOREMAP_LEN 0x4000 |
102 | #else | 116 | #else |
103 | #define ReadDOC_(adr, reg) readb((void __iomem *)(adr) + (reg)) | 117 | #define ReadDOC_(adr, reg) readb((void __iomem *)(adr) + (reg)) |
diff --git a/include/linux/mtd/fsmc.h b/include/linux/mtd/fsmc.h index b20029221fb1..d6ed61ef451d 100644 --- a/include/linux/mtd/fsmc.h +++ b/include/linux/mtd/fsmc.h | |||
@@ -155,9 +155,6 @@ struct fsmc_nand_platform_data { | |||
155 | unsigned int width; | 155 | unsigned int width; |
156 | unsigned int bank; | 156 | unsigned int bank; |
157 | 157 | ||
158 | /* CLE, ALE offsets */ | ||
159 | unsigned int cle_off; | ||
160 | unsigned int ale_off; | ||
161 | enum access_mode mode; | 158 | enum access_mode mode; |
162 | 159 | ||
163 | void (*select_bank)(uint32_t bank, uint32_t busw); | 160 | void (*select_bank)(uint32_t bank, uint32_t busw); |
diff --git a/include/linux/mtd/gpmi-nand.h b/include/linux/mtd/gpmi-nand.h deleted file mode 100644 index ed3c4e09f3d1..000000000000 --- a/include/linux/mtd/gpmi-nand.h +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
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 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef __MACH_MXS_GPMI_NAND_H__ | ||
20 | #define __MACH_MXS_GPMI_NAND_H__ | ||
21 | |||
22 | /* The size of the resources is fixed. */ | ||
23 | #define GPMI_NAND_RES_SIZE 6 | ||
24 | |||
25 | /* Resource names for the GPMI NAND driver. */ | ||
26 | #define GPMI_NAND_GPMI_REGS_ADDR_RES_NAME "gpmi-nand" | ||
27 | #define GPMI_NAND_GPMI_INTERRUPT_RES_NAME "GPMI NAND GPMI Interrupt" | ||
28 | #define GPMI_NAND_BCH_REGS_ADDR_RES_NAME "bch" | ||
29 | #define GPMI_NAND_BCH_INTERRUPT_RES_NAME "bch" | ||
30 | #define GPMI_NAND_DMA_CHANNELS_RES_NAME "GPMI NAND DMA Channels" | ||
31 | #define GPMI_NAND_DMA_INTERRUPT_RES_NAME "gpmi-dma" | ||
32 | |||
33 | /** | ||
34 | * struct gpmi_nand_platform_data - GPMI NAND driver platform data. | ||
35 | * | ||
36 | * This structure communicates platform-specific information to the GPMI NAND | ||
37 | * driver that can't be expressed as resources. | ||
38 | * | ||
39 | * @platform_init: A pointer to a function the driver will call to | ||
40 | * initialize the platform (e.g., set up the pin mux). | ||
41 | * @min_prop_delay_in_ns: Minimum propagation delay of GPMI signals to and | ||
42 | * from the NAND Flash device, in nanoseconds. | ||
43 | * @max_prop_delay_in_ns: Maximum propagation delay of GPMI signals to and | ||
44 | * from the NAND Flash device, in nanoseconds. | ||
45 | * @max_chip_count: The maximum number of chips for which the driver | ||
46 | * should configure the hardware. This value most | ||
47 | * likely reflects the number of pins that are | ||
48 | * connected to a NAND Flash device. If this is | ||
49 | * greater than the SoC hardware can support, the | ||
50 | * driver will print a message and fail to initialize. | ||
51 | * @partitions: An optional pointer to an array of partition | ||
52 | * descriptions. | ||
53 | * @partition_count: The number of elements in the partitions array. | ||
54 | */ | ||
55 | struct gpmi_nand_platform_data { | ||
56 | /* SoC hardware information. */ | ||
57 | int (*platform_init)(void); | ||
58 | |||
59 | /* NAND Flash information. */ | ||
60 | unsigned int min_prop_delay_in_ns; | ||
61 | unsigned int max_prop_delay_in_ns; | ||
62 | unsigned int max_chip_count; | ||
63 | |||
64 | /* Medium information. */ | ||
65 | struct mtd_partition *partitions; | ||
66 | unsigned partition_count; | ||
67 | }; | ||
68 | #endif | ||
diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h index 3595a0236b0f..f6eb4332ac92 100644 --- a/include/linux/mtd/map.h +++ b/include/linux/mtd/map.h | |||
@@ -328,7 +328,7 @@ static inline int map_word_bitsset(struct map_info *map, map_word val1, map_word | |||
328 | 328 | ||
329 | static inline map_word map_word_load(struct map_info *map, const void *ptr) | 329 | static inline map_word map_word_load(struct map_info *map, const void *ptr) |
330 | { | 330 | { |
331 | map_word r; | 331 | map_word r = {{0} }; |
332 | 332 | ||
333 | if (map_bankwidth_is_1(map)) | 333 | if (map_bankwidth_is_1(map)) |
334 | r.x[0] = *(unsigned char *)ptr; | 334 | r.x[0] = *(unsigned char *)ptr; |
@@ -391,7 +391,7 @@ static inline map_word map_word_ff(struct map_info *map) | |||
391 | 391 | ||
392 | static inline map_word inline_map_read(struct map_info *map, unsigned long ofs) | 392 | static inline map_word inline_map_read(struct map_info *map, unsigned long ofs) |
393 | { | 393 | { |
394 | map_word r; | 394 | map_word uninitialized_var(r); |
395 | 395 | ||
396 | if (map_bankwidth_is_1(map)) | 396 | if (map_bankwidth_is_1(map)) |
397 | r.x[0] = __raw_readb(map->virt + ofs); | 397 | r.x[0] = __raw_readb(map->virt + ofs); |
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 81d61e704599..f9ac2897b86b 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -98,7 +98,7 @@ struct mtd_oob_ops { | |||
98 | }; | 98 | }; |
99 | 99 | ||
100 | #define MTD_MAX_OOBFREE_ENTRIES_LARGE 32 | 100 | #define MTD_MAX_OOBFREE_ENTRIES_LARGE 32 |
101 | #define MTD_MAX_ECCPOS_ENTRIES_LARGE 448 | 101 | #define MTD_MAX_ECCPOS_ENTRIES_LARGE 640 |
102 | /* | 102 | /* |
103 | * Internal ECC layout control structure. For historical reasons, there is a | 103 | * Internal ECC layout control structure. For historical reasons, there is a |
104 | * similar, smaller struct nand_ecclayout_user (in mtd-abi.h) that is retained | 104 | * similar, smaller struct nand_ecclayout_user (in mtd-abi.h) that is retained |
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 24e915957e4f..7ccb3c59ed60 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -219,6 +219,13 @@ typedef enum { | |||
219 | #define NAND_OWN_BUFFERS 0x00020000 | 219 | #define NAND_OWN_BUFFERS 0x00020000 |
220 | /* Chip may not exist, so silence any errors in scan */ | 220 | /* Chip may not exist, so silence any errors in scan */ |
221 | #define NAND_SCAN_SILENT_NODEV 0x00040000 | 221 | #define NAND_SCAN_SILENT_NODEV 0x00040000 |
222 | /* | ||
223 | * Autodetect nand buswidth with readid/onfi. | ||
224 | * This suppose the driver will configure the hardware in 8 bits mode | ||
225 | * when calling nand_scan_ident, and update its configuration | ||
226 | * before calling nand_scan_tail. | ||
227 | */ | ||
228 | #define NAND_BUSWIDTH_AUTO 0x00080000 | ||
222 | 229 | ||
223 | /* Options set by nand scan */ | 230 | /* Options set by nand scan */ |
224 | /* Nand scan has allocated controller struct */ | 231 | /* Nand scan has allocated controller struct */ |
@@ -471,8 +478,8 @@ struct nand_buffers { | |||
471 | * non 0 if ONFI supported. | 478 | * non 0 if ONFI supported. |
472 | * @onfi_params: [INTERN] holds the ONFI page parameter when ONFI is | 479 | * @onfi_params: [INTERN] holds the ONFI page parameter when ONFI is |
473 | * supported, 0 otherwise. | 480 | * supported, 0 otherwise. |
474 | * @onfi_set_features [REPLACEABLE] set the features for ONFI nand | 481 | * @onfi_set_features: [REPLACEABLE] set the features for ONFI nand |
475 | * @onfi_get_features [REPLACEABLE] get the features for ONFI nand | 482 | * @onfi_get_features: [REPLACEABLE] get the features for ONFI nand |
476 | * @ecclayout: [REPLACEABLE] the default ECC placement scheme | 483 | * @ecclayout: [REPLACEABLE] the default ECC placement scheme |
477 | * @bbt: [INTERN] bad block table pointer | 484 | * @bbt: [INTERN] bad block table pointer |
478 | * @bbt_td: [REPLACEABLE] bad block table descriptor for flash | 485 | * @bbt_td: [REPLACEABLE] bad block table descriptor for flash |
diff --git a/include/linux/mtd/sh_flctl.h b/include/linux/mtd/sh_flctl.h index 01e4b15b280e..1c28f8879b1c 100644 --- a/include/linux/mtd/sh_flctl.h +++ b/include/linux/mtd/sh_flctl.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #ifndef __SH_FLCTL_H__ | 20 | #ifndef __SH_FLCTL_H__ |
21 | #define __SH_FLCTL_H__ | 21 | #define __SH_FLCTL_H__ |
22 | 22 | ||
23 | #include <linux/completion.h> | ||
23 | #include <linux/mtd/mtd.h> | 24 | #include <linux/mtd/mtd.h> |
24 | #include <linux/mtd/nand.h> | 25 | #include <linux/mtd/nand.h> |
25 | #include <linux/mtd/partitions.h> | 26 | #include <linux/mtd/partitions.h> |
@@ -107,6 +108,7 @@ | |||
107 | #define ESTERINTE (0x1 << 24) /* ECC error interrupt enable */ | 108 | #define ESTERINTE (0x1 << 24) /* ECC error interrupt enable */ |
108 | #define AC1CLR (0x1 << 19) /* ECC FIFO clear */ | 109 | #define AC1CLR (0x1 << 19) /* ECC FIFO clear */ |
109 | #define AC0CLR (0x1 << 18) /* Data FIFO clear */ | 110 | #define AC0CLR (0x1 << 18) /* Data FIFO clear */ |
111 | #define DREQ0EN (0x1 << 16) /* FLDTFIFODMA Request Enable */ | ||
110 | #define ECERB (0x1 << 9) /* ECC error */ | 112 | #define ECERB (0x1 << 9) /* ECC error */ |
111 | #define STERB (0x1 << 8) /* Status error */ | 113 | #define STERB (0x1 << 8) /* Status error */ |
112 | #define STERINTE (0x1 << 4) /* Status error enable */ | 114 | #define STERINTE (0x1 << 4) /* Status error enable */ |
@@ -138,6 +140,8 @@ enum flctl_ecc_res_t { | |||
138 | FL_TIMEOUT | 140 | FL_TIMEOUT |
139 | }; | 141 | }; |
140 | 142 | ||
143 | struct dma_chan; | ||
144 | |||
141 | struct sh_flctl { | 145 | struct sh_flctl { |
142 | struct mtd_info mtd; | 146 | struct mtd_info mtd; |
143 | struct nand_chip chip; | 147 | struct nand_chip chip; |
@@ -147,7 +151,7 @@ struct sh_flctl { | |||
147 | 151 | ||
148 | uint8_t done_buff[2048 + 64]; /* max size 2048 + 64 */ | 152 | uint8_t done_buff[2048 + 64]; /* max size 2048 + 64 */ |
149 | int read_bytes; | 153 | int read_bytes; |
150 | int index; | 154 | unsigned int index; |
151 | int seqin_column; /* column in SEQIN cmd */ | 155 | int seqin_column; /* column in SEQIN cmd */ |
152 | int seqin_page_addr; /* page_addr in SEQIN cmd */ | 156 | int seqin_page_addr; /* page_addr in SEQIN cmd */ |
153 | uint32_t seqin_read_cmd; /* read cmd in SEQIN cmd */ | 157 | uint32_t seqin_read_cmd; /* read cmd in SEQIN cmd */ |
@@ -161,6 +165,11 @@ struct sh_flctl { | |||
161 | unsigned hwecc:1; /* Hardware ECC (0 = disabled, 1 = enabled) */ | 165 | unsigned hwecc:1; /* Hardware ECC (0 = disabled, 1 = enabled) */ |
162 | unsigned holden:1; /* Hardware has FLHOLDCR and HOLDEN is set */ | 166 | unsigned holden:1; /* Hardware has FLHOLDCR and HOLDEN is set */ |
163 | unsigned qos_request:1; /* QoS request to prevent deep power shutdown */ | 167 | unsigned qos_request:1; /* QoS request to prevent deep power shutdown */ |
168 | |||
169 | /* DMA related objects */ | ||
170 | struct dma_chan *chan_fifo0_rx; | ||
171 | struct dma_chan *chan_fifo0_tx; | ||
172 | struct completion dma_complete; | ||
164 | }; | 173 | }; |
165 | 174 | ||
166 | struct sh_flctl_platform_data { | 175 | struct sh_flctl_platform_data { |
@@ -170,6 +179,9 @@ struct sh_flctl_platform_data { | |||
170 | 179 | ||
171 | unsigned has_hwecc:1; | 180 | unsigned has_hwecc:1; |
172 | unsigned use_holden:1; | 181 | unsigned use_holden:1; |
182 | |||
183 | unsigned int slave_id_fifo0_tx; | ||
184 | unsigned int slave_id_fifo0_rx; | ||
173 | }; | 185 | }; |
174 | 186 | ||
175 | static inline struct sh_flctl *mtd_to_flctl(struct mtd_info *mtdinfo) | 187 | static inline struct sh_flctl *mtd_to_flctl(struct mtd_info *mtdinfo) |
diff --git a/include/linux/namei.h b/include/linux/namei.h index 4bf19d8174ed..5a5ff57ceed4 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _LINUX_NAMEI_H | 2 | #define _LINUX_NAMEI_H |
3 | 3 | ||
4 | #include <linux/dcache.h> | 4 | #include <linux/dcache.h> |
5 | #include <linux/errno.h> | ||
5 | #include <linux/linkage.h> | 6 | #include <linux/linkage.h> |
6 | #include <linux/path.h> | 7 | #include <linux/path.h> |
7 | 8 | ||
@@ -65,8 +66,8 @@ extern int user_path_at_empty(int, const char __user *, unsigned, struct path *, | |||
65 | 66 | ||
66 | extern int kern_path(const char *, unsigned, struct path *); | 67 | extern int kern_path(const char *, unsigned, struct path *); |
67 | 68 | ||
68 | extern struct dentry *kern_path_create(int, const char *, struct path *, int); | 69 | extern struct dentry *kern_path_create(int, const char *, struct path *, unsigned int); |
69 | extern struct dentry *user_path_create(int, const char __user *, struct path *, int); | 70 | extern struct dentry *user_path_create(int, const char __user *, struct path *, unsigned int); |
70 | extern void done_path_create(struct path *, struct dentry *); | 71 | extern void done_path_create(struct path *, struct dentry *); |
71 | extern struct dentry *kern_path_locked(const char *, struct path *); | 72 | extern struct dentry *kern_path_locked(const char *, struct path *); |
72 | extern int vfs_path_lookup(struct dentry *, struct vfsmount *, | 73 | extern int vfs_path_lookup(struct dentry *, struct vfsmount *, |
@@ -98,4 +99,20 @@ static inline void nd_terminate_link(void *name, size_t len, size_t maxlen) | |||
98 | ((char *) name)[min(len, maxlen)] = '\0'; | 99 | ((char *) name)[min(len, maxlen)] = '\0'; |
99 | } | 100 | } |
100 | 101 | ||
102 | /** | ||
103 | * retry_estale - determine whether the caller should retry an operation | ||
104 | * @error: the error that would currently be returned | ||
105 | * @flags: flags being used for next lookup attempt | ||
106 | * | ||
107 | * Check to see if the error code was -ESTALE, and then determine whether | ||
108 | * to retry the call based on whether "flags" already has LOOKUP_REVAL set. | ||
109 | * | ||
110 | * Returns true if the caller should try the operation again. | ||
111 | */ | ||
112 | static inline bool | ||
113 | retry_estale(const long error, const unsigned int flags) | ||
114 | { | ||
115 | return error == -ESTALE && !(flags & LOOKUP_REVAL); | ||
116 | } | ||
117 | |||
101 | #endif /* _LINUX_NAMEI_H */ | 118 | #endif /* _LINUX_NAMEI_H */ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 02e0f6b156c3..9ef07d0868b6 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -60,6 +60,9 @@ struct wireless_dev; | |||
60 | #define SET_ETHTOOL_OPS(netdev,ops) \ | 60 | #define SET_ETHTOOL_OPS(netdev,ops) \ |
61 | ( (netdev)->ethtool_ops = (ops) ) | 61 | ( (netdev)->ethtool_ops = (ops) ) |
62 | 62 | ||
63 | extern void netdev_set_default_ethtool_ops(struct net_device *dev, | ||
64 | const struct ethtool_ops *ops); | ||
65 | |||
63 | /* hardware address assignment types */ | 66 | /* hardware address assignment types */ |
64 | #define NET_ADDR_PERM 0 /* address is permanent (default) */ | 67 | #define NET_ADDR_PERM 0 /* address is permanent (default) */ |
65 | #define NET_ADDR_RANDOM 1 /* address is generated randomly */ | 68 | #define NET_ADDR_RANDOM 1 /* address is generated randomly */ |
@@ -1576,7 +1579,7 @@ extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); | |||
1576 | 1579 | ||
1577 | extern rwlock_t dev_base_lock; /* Device list lock */ | 1580 | extern rwlock_t dev_base_lock; /* Device list lock */ |
1578 | 1581 | ||
1579 | extern seqlock_t devnet_rename_seq; /* Device rename lock */ | 1582 | extern seqcount_t devnet_rename_seq; /* Device rename seq */ |
1580 | 1583 | ||
1581 | 1584 | ||
1582 | #define for_each_netdev(net, d) \ | 1585 | #define for_each_netdev(net, d) \ |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index a9e76ee1adca..6c6ed153a9b4 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -198,51 +198,4 @@ struct nfs_server { | |||
198 | #define NFS_CAP_POSIX_LOCK (1U << 14) | 198 | #define NFS_CAP_POSIX_LOCK (1U << 14) |
199 | #define NFS_CAP_UIDGID_NOMAP (1U << 15) | 199 | #define NFS_CAP_UIDGID_NOMAP (1U << 15) |
200 | 200 | ||
201 | |||
202 | /* maximum number of slots to use */ | ||
203 | #define NFS4_DEF_SLOT_TABLE_SIZE (16U) | ||
204 | #define NFS4_MAX_SLOT_TABLE (256U) | ||
205 | #define NFS4_NO_SLOT ((u32)-1) | ||
206 | |||
207 | #if IS_ENABLED(CONFIG_NFS_V4) | ||
208 | |||
209 | /* Sessions */ | ||
210 | #define SLOT_TABLE_SZ DIV_ROUND_UP(NFS4_MAX_SLOT_TABLE, 8*sizeof(long)) | ||
211 | struct nfs4_slot_table { | ||
212 | struct nfs4_slot *slots; /* seqid per slot */ | ||
213 | unsigned long used_slots[SLOT_TABLE_SZ]; /* used/unused bitmap */ | ||
214 | spinlock_t slot_tbl_lock; | ||
215 | struct rpc_wait_queue slot_tbl_waitq; /* allocators may wait here */ | ||
216 | u32 max_slots; /* # slots in table */ | ||
217 | u32 highest_used_slotid; /* sent to server on each SEQ. | ||
218 | * op for dynamic resizing */ | ||
219 | u32 target_max_slots; /* Set by CB_RECALL_SLOT as | ||
220 | * the new max_slots */ | ||
221 | struct completion complete; | ||
222 | }; | ||
223 | |||
224 | static inline int slot_idx(struct nfs4_slot_table *tbl, struct nfs4_slot *sp) | ||
225 | { | ||
226 | return sp - tbl->slots; | ||
227 | } | ||
228 | |||
229 | /* | ||
230 | * Session related parameters | ||
231 | */ | ||
232 | struct nfs4_session { | ||
233 | struct nfs4_sessionid sess_id; | ||
234 | u32 flags; | ||
235 | unsigned long session_state; | ||
236 | u32 hash_alg; | ||
237 | u32 ssv_len; | ||
238 | |||
239 | /* The fore and back channel */ | ||
240 | struct nfs4_channel_attrs fc_attrs; | ||
241 | struct nfs4_slot_table fc_slot_table; | ||
242 | struct nfs4_channel_attrs bc_attrs; | ||
243 | struct nfs4_slot_table bc_slot_table; | ||
244 | struct nfs_client *clp; | ||
245 | }; | ||
246 | |||
247 | #endif /* CONFIG_NFS_V4 */ | ||
248 | #endif | 201 | #endif |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index a73ea89789d1..29adb12c7ecf 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -185,23 +185,20 @@ struct nfs4_channel_attrs { | |||
185 | u32 max_reqs; | 185 | u32 max_reqs; |
186 | }; | 186 | }; |
187 | 187 | ||
188 | /* nfs41 sessions slot seqid */ | 188 | struct nfs4_slot; |
189 | struct nfs4_slot { | ||
190 | u32 seq_nr; | ||
191 | }; | ||
192 | |||
193 | struct nfs4_sequence_args { | 189 | struct nfs4_sequence_args { |
194 | struct nfs4_session *sa_session; | 190 | struct nfs4_slot *sa_slot; |
195 | u32 sa_slotid; | 191 | u8 sa_cache_this : 1, |
196 | u8 sa_cache_this; | 192 | sa_privileged : 1; |
197 | }; | 193 | }; |
198 | 194 | ||
199 | struct nfs4_sequence_res { | 195 | struct nfs4_sequence_res { |
200 | struct nfs4_session *sr_session; | ||
201 | struct nfs4_slot *sr_slot; /* slot used to send request */ | 196 | struct nfs4_slot *sr_slot; /* slot used to send request */ |
197 | unsigned long sr_timestamp; | ||
202 | int sr_status; /* sequence operation status */ | 198 | int sr_status; /* sequence operation status */ |
203 | unsigned long sr_renewal_time; | ||
204 | u32 sr_status_flags; | 199 | u32 sr_status_flags; |
200 | u32 sr_highest_slotid; | ||
201 | u32 sr_target_highest_slotid; | ||
205 | }; | 202 | }; |
206 | 203 | ||
207 | struct nfs4_get_lease_time_args { | 204 | struct nfs4_get_lease_time_args { |
@@ -209,8 +206,8 @@ struct nfs4_get_lease_time_args { | |||
209 | }; | 206 | }; |
210 | 207 | ||
211 | struct nfs4_get_lease_time_res { | 208 | struct nfs4_get_lease_time_res { |
212 | struct nfs_fsinfo *lr_fsinfo; | ||
213 | struct nfs4_sequence_res lr_seq_res; | 209 | struct nfs4_sequence_res lr_seq_res; |
210 | struct nfs_fsinfo *lr_fsinfo; | ||
214 | }; | 211 | }; |
215 | 212 | ||
216 | #define PNFS_LAYOUT_MAXSIZE 4096 | 213 | #define PNFS_LAYOUT_MAXSIZE 4096 |
@@ -228,23 +225,23 @@ struct pnfs_layout_range { | |||
228 | }; | 225 | }; |
229 | 226 | ||
230 | struct nfs4_layoutget_args { | 227 | struct nfs4_layoutget_args { |
228 | struct nfs4_sequence_args seq_args; | ||
231 | __u32 type; | 229 | __u32 type; |
232 | struct pnfs_layout_range range; | 230 | struct pnfs_layout_range range; |
233 | __u64 minlength; | 231 | __u64 minlength; |
234 | __u32 maxcount; | 232 | __u32 maxcount; |
235 | struct inode *inode; | 233 | struct inode *inode; |
236 | struct nfs_open_context *ctx; | 234 | struct nfs_open_context *ctx; |
237 | struct nfs4_sequence_args seq_args; | ||
238 | nfs4_stateid stateid; | 235 | nfs4_stateid stateid; |
239 | struct nfs4_layoutdriver_data layout; | 236 | struct nfs4_layoutdriver_data layout; |
240 | }; | 237 | }; |
241 | 238 | ||
242 | struct nfs4_layoutget_res { | 239 | struct nfs4_layoutget_res { |
240 | struct nfs4_sequence_res seq_res; | ||
243 | __u32 return_on_close; | 241 | __u32 return_on_close; |
244 | struct pnfs_layout_range range; | 242 | struct pnfs_layout_range range; |
245 | __u32 type; | 243 | __u32 type; |
246 | nfs4_stateid stateid; | 244 | nfs4_stateid stateid; |
247 | struct nfs4_sequence_res seq_res; | ||
248 | struct nfs4_layoutdriver_data *layoutp; | 245 | struct nfs4_layoutdriver_data *layoutp; |
249 | }; | 246 | }; |
250 | 247 | ||
@@ -255,38 +252,38 @@ struct nfs4_layoutget { | |||
255 | }; | 252 | }; |
256 | 253 | ||
257 | struct nfs4_getdevicelist_args { | 254 | struct nfs4_getdevicelist_args { |
255 | struct nfs4_sequence_args seq_args; | ||
258 | const struct nfs_fh *fh; | 256 | const struct nfs_fh *fh; |
259 | u32 layoutclass; | 257 | u32 layoutclass; |
260 | struct nfs4_sequence_args seq_args; | ||
261 | }; | 258 | }; |
262 | 259 | ||
263 | struct nfs4_getdevicelist_res { | 260 | struct nfs4_getdevicelist_res { |
264 | struct pnfs_devicelist *devlist; | ||
265 | struct nfs4_sequence_res seq_res; | 261 | struct nfs4_sequence_res seq_res; |
262 | struct pnfs_devicelist *devlist; | ||
266 | }; | 263 | }; |
267 | 264 | ||
268 | struct nfs4_getdeviceinfo_args { | 265 | struct nfs4_getdeviceinfo_args { |
269 | struct pnfs_device *pdev; | ||
270 | struct nfs4_sequence_args seq_args; | 266 | struct nfs4_sequence_args seq_args; |
267 | struct pnfs_device *pdev; | ||
271 | }; | 268 | }; |
272 | 269 | ||
273 | struct nfs4_getdeviceinfo_res { | 270 | struct nfs4_getdeviceinfo_res { |
274 | struct pnfs_device *pdev; | ||
275 | struct nfs4_sequence_res seq_res; | 271 | struct nfs4_sequence_res seq_res; |
272 | struct pnfs_device *pdev; | ||
276 | }; | 273 | }; |
277 | 274 | ||
278 | struct nfs4_layoutcommit_args { | 275 | struct nfs4_layoutcommit_args { |
276 | struct nfs4_sequence_args seq_args; | ||
279 | nfs4_stateid stateid; | 277 | nfs4_stateid stateid; |
280 | __u64 lastbytewritten; | 278 | __u64 lastbytewritten; |
281 | struct inode *inode; | 279 | struct inode *inode; |
282 | const u32 *bitmask; | 280 | const u32 *bitmask; |
283 | struct nfs4_sequence_args seq_args; | ||
284 | }; | 281 | }; |
285 | 282 | ||
286 | struct nfs4_layoutcommit_res { | 283 | struct nfs4_layoutcommit_res { |
284 | struct nfs4_sequence_res seq_res; | ||
287 | struct nfs_fattr *fattr; | 285 | struct nfs_fattr *fattr; |
288 | const struct nfs_server *server; | 286 | const struct nfs_server *server; |
289 | struct nfs4_sequence_res seq_res; | ||
290 | int status; | 287 | int status; |
291 | }; | 288 | }; |
292 | 289 | ||
@@ -300,11 +297,11 @@ struct nfs4_layoutcommit_data { | |||
300 | }; | 297 | }; |
301 | 298 | ||
302 | struct nfs4_layoutreturn_args { | 299 | struct nfs4_layoutreturn_args { |
300 | struct nfs4_sequence_args seq_args; | ||
303 | struct pnfs_layout_hdr *layout; | 301 | struct pnfs_layout_hdr *layout; |
304 | struct inode *inode; | 302 | struct inode *inode; |
305 | nfs4_stateid stateid; | 303 | nfs4_stateid stateid; |
306 | __u32 layout_type; | 304 | __u32 layout_type; |
307 | struct nfs4_sequence_args seq_args; | ||
308 | }; | 305 | }; |
309 | 306 | ||
310 | struct nfs4_layoutreturn_res { | 307 | struct nfs4_layoutreturn_res { |
@@ -330,6 +327,7 @@ struct stateowner_id { | |||
330 | * Arguments to the open call. | 327 | * Arguments to the open call. |
331 | */ | 328 | */ |
332 | struct nfs_openargs { | 329 | struct nfs_openargs { |
330 | struct nfs4_sequence_args seq_args; | ||
333 | const struct nfs_fh * fh; | 331 | const struct nfs_fh * fh; |
334 | struct nfs_seqid * seqid; | 332 | struct nfs_seqid * seqid; |
335 | int open_flags; | 333 | int open_flags; |
@@ -350,10 +348,10 @@ struct nfs_openargs { | |||
350 | const u32 * bitmask; | 348 | const u32 * bitmask; |
351 | const u32 * open_bitmap; | 349 | const u32 * open_bitmap; |
352 | __u32 claim; | 350 | __u32 claim; |
353 | struct nfs4_sequence_args seq_args; | ||
354 | }; | 351 | }; |
355 | 352 | ||
356 | struct nfs_openres { | 353 | struct nfs_openres { |
354 | struct nfs4_sequence_res seq_res; | ||
357 | nfs4_stateid stateid; | 355 | nfs4_stateid stateid; |
358 | struct nfs_fh fh; | 356 | struct nfs_fh fh; |
359 | struct nfs4_change_info cinfo; | 357 | struct nfs4_change_info cinfo; |
@@ -368,7 +366,6 @@ struct nfs_openres { | |||
368 | __u32 attrset[NFS4_BITMAP_SIZE]; | 366 | __u32 attrset[NFS4_BITMAP_SIZE]; |
369 | struct nfs4_string *owner; | 367 | struct nfs4_string *owner; |
370 | struct nfs4_string *group_owner; | 368 | struct nfs4_string *group_owner; |
371 | struct nfs4_sequence_res seq_res; | ||
372 | __u32 access_request; | 369 | __u32 access_request; |
373 | __u32 access_supported; | 370 | __u32 access_supported; |
374 | __u32 access_result; | 371 | __u32 access_result; |
@@ -392,20 +389,20 @@ struct nfs_open_confirmres { | |||
392 | * Arguments to the close call. | 389 | * Arguments to the close call. |
393 | */ | 390 | */ |
394 | struct nfs_closeargs { | 391 | struct nfs_closeargs { |
392 | struct nfs4_sequence_args seq_args; | ||
395 | struct nfs_fh * fh; | 393 | struct nfs_fh * fh; |
396 | nfs4_stateid * stateid; | 394 | nfs4_stateid * stateid; |
397 | struct nfs_seqid * seqid; | 395 | struct nfs_seqid * seqid; |
398 | fmode_t fmode; | 396 | fmode_t fmode; |
399 | const u32 * bitmask; | 397 | const u32 * bitmask; |
400 | struct nfs4_sequence_args seq_args; | ||
401 | }; | 398 | }; |
402 | 399 | ||
403 | struct nfs_closeres { | 400 | struct nfs_closeres { |
401 | struct nfs4_sequence_res seq_res; | ||
404 | nfs4_stateid stateid; | 402 | nfs4_stateid stateid; |
405 | struct nfs_fattr * fattr; | 403 | struct nfs_fattr * fattr; |
406 | struct nfs_seqid * seqid; | 404 | struct nfs_seqid * seqid; |
407 | const struct nfs_server *server; | 405 | const struct nfs_server *server; |
408 | struct nfs4_sequence_res seq_res; | ||
409 | }; | 406 | }; |
410 | /* | 407 | /* |
411 | * * Arguments to the lock,lockt, and locku call. | 408 | * * Arguments to the lock,lockt, and locku call. |
@@ -417,6 +414,7 @@ struct nfs_lowner { | |||
417 | }; | 414 | }; |
418 | 415 | ||
419 | struct nfs_lock_args { | 416 | struct nfs_lock_args { |
417 | struct nfs4_sequence_args seq_args; | ||
420 | struct nfs_fh * fh; | 418 | struct nfs_fh * fh; |
421 | struct file_lock * fl; | 419 | struct file_lock * fl; |
422 | struct nfs_seqid * lock_seqid; | 420 | struct nfs_seqid * lock_seqid; |
@@ -427,40 +425,39 @@ struct nfs_lock_args { | |||
427 | unsigned char block : 1; | 425 | unsigned char block : 1; |
428 | unsigned char reclaim : 1; | 426 | unsigned char reclaim : 1; |
429 | unsigned char new_lock_owner : 1; | 427 | unsigned char new_lock_owner : 1; |
430 | struct nfs4_sequence_args seq_args; | ||
431 | }; | 428 | }; |
432 | 429 | ||
433 | struct nfs_lock_res { | 430 | struct nfs_lock_res { |
431 | struct nfs4_sequence_res seq_res; | ||
434 | nfs4_stateid stateid; | 432 | nfs4_stateid stateid; |
435 | struct nfs_seqid * lock_seqid; | 433 | struct nfs_seqid * lock_seqid; |
436 | struct nfs_seqid * open_seqid; | 434 | struct nfs_seqid * open_seqid; |
437 | struct nfs4_sequence_res seq_res; | ||
438 | }; | 435 | }; |
439 | 436 | ||
440 | struct nfs_locku_args { | 437 | struct nfs_locku_args { |
438 | struct nfs4_sequence_args seq_args; | ||
441 | struct nfs_fh * fh; | 439 | struct nfs_fh * fh; |
442 | struct file_lock * fl; | 440 | struct file_lock * fl; |
443 | struct nfs_seqid * seqid; | 441 | struct nfs_seqid * seqid; |
444 | nfs4_stateid * stateid; | 442 | nfs4_stateid * stateid; |
445 | struct nfs4_sequence_args seq_args; | ||
446 | }; | 443 | }; |
447 | 444 | ||
448 | struct nfs_locku_res { | 445 | struct nfs_locku_res { |
446 | struct nfs4_sequence_res seq_res; | ||
449 | nfs4_stateid stateid; | 447 | nfs4_stateid stateid; |
450 | struct nfs_seqid * seqid; | 448 | struct nfs_seqid * seqid; |
451 | struct nfs4_sequence_res seq_res; | ||
452 | }; | 449 | }; |
453 | 450 | ||
454 | struct nfs_lockt_args { | 451 | struct nfs_lockt_args { |
452 | struct nfs4_sequence_args seq_args; | ||
455 | struct nfs_fh * fh; | 453 | struct nfs_fh * fh; |
456 | struct file_lock * fl; | 454 | struct file_lock * fl; |
457 | struct nfs_lowner lock_owner; | 455 | struct nfs_lowner lock_owner; |
458 | struct nfs4_sequence_args seq_args; | ||
459 | }; | 456 | }; |
460 | 457 | ||
461 | struct nfs_lockt_res { | 458 | struct nfs_lockt_res { |
462 | struct file_lock * denied; /* LOCK, LOCKT failed */ | ||
463 | struct nfs4_sequence_res seq_res; | 459 | struct nfs4_sequence_res seq_res; |
460 | struct file_lock * denied; /* LOCK, LOCKT failed */ | ||
464 | }; | 461 | }; |
465 | 462 | ||
466 | struct nfs_release_lockowner_args { | 463 | struct nfs_release_lockowner_args { |
@@ -468,22 +465,23 @@ struct nfs_release_lockowner_args { | |||
468 | }; | 465 | }; |
469 | 466 | ||
470 | struct nfs4_delegreturnargs { | 467 | struct nfs4_delegreturnargs { |
468 | struct nfs4_sequence_args seq_args; | ||
471 | const struct nfs_fh *fhandle; | 469 | const struct nfs_fh *fhandle; |
472 | const nfs4_stateid *stateid; | 470 | const nfs4_stateid *stateid; |
473 | const u32 * bitmask; | 471 | const u32 * bitmask; |
474 | struct nfs4_sequence_args seq_args; | ||
475 | }; | 472 | }; |
476 | 473 | ||
477 | struct nfs4_delegreturnres { | 474 | struct nfs4_delegreturnres { |
475 | struct nfs4_sequence_res seq_res; | ||
478 | struct nfs_fattr * fattr; | 476 | struct nfs_fattr * fattr; |
479 | const struct nfs_server *server; | 477 | const struct nfs_server *server; |
480 | struct nfs4_sequence_res seq_res; | ||
481 | }; | 478 | }; |
482 | 479 | ||
483 | /* | 480 | /* |
484 | * Arguments to the read call. | 481 | * Arguments to the read call. |
485 | */ | 482 | */ |
486 | struct nfs_readargs { | 483 | struct nfs_readargs { |
484 | struct nfs4_sequence_args seq_args; | ||
487 | struct nfs_fh * fh; | 485 | struct nfs_fh * fh; |
488 | struct nfs_open_context *context; | 486 | struct nfs_open_context *context; |
489 | struct nfs_lock_context *lock_context; | 487 | struct nfs_lock_context *lock_context; |
@@ -491,20 +489,20 @@ struct nfs_readargs { | |||
491 | __u32 count; | 489 | __u32 count; |
492 | unsigned int pgbase; | 490 | unsigned int pgbase; |
493 | struct page ** pages; | 491 | struct page ** pages; |
494 | struct nfs4_sequence_args seq_args; | ||
495 | }; | 492 | }; |
496 | 493 | ||
497 | struct nfs_readres { | 494 | struct nfs_readres { |
495 | struct nfs4_sequence_res seq_res; | ||
498 | struct nfs_fattr * fattr; | 496 | struct nfs_fattr * fattr; |
499 | __u32 count; | 497 | __u32 count; |
500 | int eof; | 498 | int eof; |
501 | struct nfs4_sequence_res seq_res; | ||
502 | }; | 499 | }; |
503 | 500 | ||
504 | /* | 501 | /* |
505 | * Arguments to the write call. | 502 | * Arguments to the write call. |
506 | */ | 503 | */ |
507 | struct nfs_writeargs { | 504 | struct nfs_writeargs { |
505 | struct nfs4_sequence_args seq_args; | ||
508 | struct nfs_fh * fh; | 506 | struct nfs_fh * fh; |
509 | struct nfs_open_context *context; | 507 | struct nfs_open_context *context; |
510 | struct nfs_lock_context *lock_context; | 508 | struct nfs_lock_context *lock_context; |
@@ -514,7 +512,6 @@ struct nfs_writeargs { | |||
514 | unsigned int pgbase; | 512 | unsigned int pgbase; |
515 | struct page ** pages; | 513 | struct page ** pages; |
516 | const u32 * bitmask; | 514 | const u32 * bitmask; |
517 | struct nfs4_sequence_args seq_args; | ||
518 | }; | 515 | }; |
519 | 516 | ||
520 | struct nfs_write_verifier { | 517 | struct nfs_write_verifier { |
@@ -527,65 +524,65 @@ struct nfs_writeverf { | |||
527 | }; | 524 | }; |
528 | 525 | ||
529 | struct nfs_writeres { | 526 | struct nfs_writeres { |
527 | struct nfs4_sequence_res seq_res; | ||
530 | struct nfs_fattr * fattr; | 528 | struct nfs_fattr * fattr; |
531 | struct nfs_writeverf * verf; | 529 | struct nfs_writeverf * verf; |
532 | __u32 count; | 530 | __u32 count; |
533 | const struct nfs_server *server; | 531 | const struct nfs_server *server; |
534 | struct nfs4_sequence_res seq_res; | ||
535 | }; | 532 | }; |
536 | 533 | ||
537 | /* | 534 | /* |
538 | * Arguments to the commit call. | 535 | * Arguments to the commit call. |
539 | */ | 536 | */ |
540 | struct nfs_commitargs { | 537 | struct nfs_commitargs { |
538 | struct nfs4_sequence_args seq_args; | ||
541 | struct nfs_fh *fh; | 539 | struct nfs_fh *fh; |
542 | __u64 offset; | 540 | __u64 offset; |
543 | __u32 count; | 541 | __u32 count; |
544 | const u32 *bitmask; | 542 | const u32 *bitmask; |
545 | struct nfs4_sequence_args seq_args; | ||
546 | }; | 543 | }; |
547 | 544 | ||
548 | struct nfs_commitres { | 545 | struct nfs_commitres { |
546 | struct nfs4_sequence_res seq_res; | ||
549 | struct nfs_fattr *fattr; | 547 | struct nfs_fattr *fattr; |
550 | struct nfs_writeverf *verf; | 548 | struct nfs_writeverf *verf; |
551 | const struct nfs_server *server; | 549 | const struct nfs_server *server; |
552 | struct nfs4_sequence_res seq_res; | ||
553 | }; | 550 | }; |
554 | 551 | ||
555 | /* | 552 | /* |
556 | * Common arguments to the unlink call | 553 | * Common arguments to the unlink call |
557 | */ | 554 | */ |
558 | struct nfs_removeargs { | 555 | struct nfs_removeargs { |
556 | struct nfs4_sequence_args seq_args; | ||
559 | const struct nfs_fh *fh; | 557 | const struct nfs_fh *fh; |
560 | struct qstr name; | 558 | struct qstr name; |
561 | struct nfs4_sequence_args seq_args; | ||
562 | }; | 559 | }; |
563 | 560 | ||
564 | struct nfs_removeres { | 561 | struct nfs_removeres { |
562 | struct nfs4_sequence_res seq_res; | ||
565 | const struct nfs_server *server; | 563 | const struct nfs_server *server; |
566 | struct nfs_fattr *dir_attr; | 564 | struct nfs_fattr *dir_attr; |
567 | struct nfs4_change_info cinfo; | 565 | struct nfs4_change_info cinfo; |
568 | struct nfs4_sequence_res seq_res; | ||
569 | }; | 566 | }; |
570 | 567 | ||
571 | /* | 568 | /* |
572 | * Common arguments to the rename call | 569 | * Common arguments to the rename call |
573 | */ | 570 | */ |
574 | struct nfs_renameargs { | 571 | struct nfs_renameargs { |
572 | struct nfs4_sequence_args seq_args; | ||
575 | const struct nfs_fh *old_dir; | 573 | const struct nfs_fh *old_dir; |
576 | const struct nfs_fh *new_dir; | 574 | const struct nfs_fh *new_dir; |
577 | const struct qstr *old_name; | 575 | const struct qstr *old_name; |
578 | const struct qstr *new_name; | 576 | const struct qstr *new_name; |
579 | struct nfs4_sequence_args seq_args; | ||
580 | }; | 577 | }; |
581 | 578 | ||
582 | struct nfs_renameres { | 579 | struct nfs_renameres { |
580 | struct nfs4_sequence_res seq_res; | ||
583 | const struct nfs_server *server; | 581 | const struct nfs_server *server; |
584 | struct nfs4_change_info old_cinfo; | 582 | struct nfs4_change_info old_cinfo; |
585 | struct nfs_fattr *old_fattr; | 583 | struct nfs_fattr *old_fattr; |
586 | struct nfs4_change_info new_cinfo; | 584 | struct nfs4_change_info new_cinfo; |
587 | struct nfs_fattr *new_fattr; | 585 | struct nfs_fattr *new_fattr; |
588 | struct nfs4_sequence_res seq_res; | ||
589 | }; | 586 | }; |
590 | 587 | ||
591 | /* | 588 | /* |
@@ -626,20 +623,20 @@ struct nfs_createargs { | |||
626 | }; | 623 | }; |
627 | 624 | ||
628 | struct nfs_setattrargs { | 625 | struct nfs_setattrargs { |
626 | struct nfs4_sequence_args seq_args; | ||
629 | struct nfs_fh * fh; | 627 | struct nfs_fh * fh; |
630 | nfs4_stateid stateid; | 628 | nfs4_stateid stateid; |
631 | struct iattr * iap; | 629 | struct iattr * iap; |
632 | const struct nfs_server * server; /* Needed for name mapping */ | 630 | const struct nfs_server * server; /* Needed for name mapping */ |
633 | const u32 * bitmask; | 631 | const u32 * bitmask; |
634 | struct nfs4_sequence_args seq_args; | ||
635 | }; | 632 | }; |
636 | 633 | ||
637 | struct nfs_setaclargs { | 634 | struct nfs_setaclargs { |
635 | struct nfs4_sequence_args seq_args; | ||
638 | struct nfs_fh * fh; | 636 | struct nfs_fh * fh; |
639 | size_t acl_len; | 637 | size_t acl_len; |
640 | unsigned int acl_pgbase; | 638 | unsigned int acl_pgbase; |
641 | struct page ** acl_pages; | 639 | struct page ** acl_pages; |
642 | struct nfs4_sequence_args seq_args; | ||
643 | }; | 640 | }; |
644 | 641 | ||
645 | struct nfs_setaclres { | 642 | struct nfs_setaclres { |
@@ -647,27 +644,27 @@ struct nfs_setaclres { | |||
647 | }; | 644 | }; |
648 | 645 | ||
649 | struct nfs_getaclargs { | 646 | struct nfs_getaclargs { |
647 | struct nfs4_sequence_args seq_args; | ||
650 | struct nfs_fh * fh; | 648 | struct nfs_fh * fh; |
651 | size_t acl_len; | 649 | size_t acl_len; |
652 | unsigned int acl_pgbase; | 650 | unsigned int acl_pgbase; |
653 | struct page ** acl_pages; | 651 | struct page ** acl_pages; |
654 | struct nfs4_sequence_args seq_args; | ||
655 | }; | 652 | }; |
656 | 653 | ||
657 | /* getxattr ACL interface flags */ | 654 | /* getxattr ACL interface flags */ |
658 | #define NFS4_ACL_TRUNC 0x0001 /* ACL was truncated */ | 655 | #define NFS4_ACL_TRUNC 0x0001 /* ACL was truncated */ |
659 | struct nfs_getaclres { | 656 | struct nfs_getaclres { |
657 | struct nfs4_sequence_res seq_res; | ||
660 | size_t acl_len; | 658 | size_t acl_len; |
661 | size_t acl_data_offset; | 659 | size_t acl_data_offset; |
662 | int acl_flags; | 660 | int acl_flags; |
663 | struct page * acl_scratch; | 661 | struct page * acl_scratch; |
664 | struct nfs4_sequence_res seq_res; | ||
665 | }; | 662 | }; |
666 | 663 | ||
667 | struct nfs_setattrres { | 664 | struct nfs_setattrres { |
665 | struct nfs4_sequence_res seq_res; | ||
668 | struct nfs_fattr * fattr; | 666 | struct nfs_fattr * fattr; |
669 | const struct nfs_server * server; | 667 | const struct nfs_server * server; |
670 | struct nfs4_sequence_res seq_res; | ||
671 | }; | 668 | }; |
672 | 669 | ||
673 | struct nfs_linkargs { | 670 | struct nfs_linkargs { |
@@ -832,21 +829,22 @@ struct nfs3_getaclres { | |||
832 | typedef u64 clientid4; | 829 | typedef u64 clientid4; |
833 | 830 | ||
834 | struct nfs4_accessargs { | 831 | struct nfs4_accessargs { |
832 | struct nfs4_sequence_args seq_args; | ||
835 | const struct nfs_fh * fh; | 833 | const struct nfs_fh * fh; |
836 | const u32 * bitmask; | 834 | const u32 * bitmask; |
837 | u32 access; | 835 | u32 access; |
838 | struct nfs4_sequence_args seq_args; | ||
839 | }; | 836 | }; |
840 | 837 | ||
841 | struct nfs4_accessres { | 838 | struct nfs4_accessres { |
839 | struct nfs4_sequence_res seq_res; | ||
842 | const struct nfs_server * server; | 840 | const struct nfs_server * server; |
843 | struct nfs_fattr * fattr; | 841 | struct nfs_fattr * fattr; |
844 | u32 supported; | 842 | u32 supported; |
845 | u32 access; | 843 | u32 access; |
846 | struct nfs4_sequence_res seq_res; | ||
847 | }; | 844 | }; |
848 | 845 | ||
849 | struct nfs4_create_arg { | 846 | struct nfs4_create_arg { |
847 | struct nfs4_sequence_args seq_args; | ||
850 | u32 ftype; | 848 | u32 ftype; |
851 | union { | 849 | union { |
852 | struct { | 850 | struct { |
@@ -863,88 +861,88 @@ struct nfs4_create_arg { | |||
863 | const struct iattr * attrs; | 861 | const struct iattr * attrs; |
864 | const struct nfs_fh * dir_fh; | 862 | const struct nfs_fh * dir_fh; |
865 | const u32 * bitmask; | 863 | const u32 * bitmask; |
866 | struct nfs4_sequence_args seq_args; | ||
867 | }; | 864 | }; |
868 | 865 | ||
869 | struct nfs4_create_res { | 866 | struct nfs4_create_res { |
867 | struct nfs4_sequence_res seq_res; | ||
870 | const struct nfs_server * server; | 868 | const struct nfs_server * server; |
871 | struct nfs_fh * fh; | 869 | struct nfs_fh * fh; |
872 | struct nfs_fattr * fattr; | 870 | struct nfs_fattr * fattr; |
873 | struct nfs4_change_info dir_cinfo; | 871 | struct nfs4_change_info dir_cinfo; |
874 | struct nfs4_sequence_res seq_res; | ||
875 | }; | 872 | }; |
876 | 873 | ||
877 | struct nfs4_fsinfo_arg { | 874 | struct nfs4_fsinfo_arg { |
875 | struct nfs4_sequence_args seq_args; | ||
878 | const struct nfs_fh * fh; | 876 | const struct nfs_fh * fh; |
879 | const u32 * bitmask; | 877 | const u32 * bitmask; |
880 | struct nfs4_sequence_args seq_args; | ||
881 | }; | 878 | }; |
882 | 879 | ||
883 | struct nfs4_fsinfo_res { | 880 | struct nfs4_fsinfo_res { |
884 | struct nfs_fsinfo *fsinfo; | ||
885 | struct nfs4_sequence_res seq_res; | 881 | struct nfs4_sequence_res seq_res; |
882 | struct nfs_fsinfo *fsinfo; | ||
886 | }; | 883 | }; |
887 | 884 | ||
888 | struct nfs4_getattr_arg { | 885 | struct nfs4_getattr_arg { |
886 | struct nfs4_sequence_args seq_args; | ||
889 | const struct nfs_fh * fh; | 887 | const struct nfs_fh * fh; |
890 | const u32 * bitmask; | 888 | const u32 * bitmask; |
891 | struct nfs4_sequence_args seq_args; | ||
892 | }; | 889 | }; |
893 | 890 | ||
894 | struct nfs4_getattr_res { | 891 | struct nfs4_getattr_res { |
892 | struct nfs4_sequence_res seq_res; | ||
895 | const struct nfs_server * server; | 893 | const struct nfs_server * server; |
896 | struct nfs_fattr * fattr; | 894 | struct nfs_fattr * fattr; |
897 | struct nfs4_sequence_res seq_res; | ||
898 | }; | 895 | }; |
899 | 896 | ||
900 | struct nfs4_link_arg { | 897 | struct nfs4_link_arg { |
898 | struct nfs4_sequence_args seq_args; | ||
901 | const struct nfs_fh * fh; | 899 | const struct nfs_fh * fh; |
902 | const struct nfs_fh * dir_fh; | 900 | const struct nfs_fh * dir_fh; |
903 | const struct qstr * name; | 901 | const struct qstr * name; |
904 | const u32 * bitmask; | 902 | const u32 * bitmask; |
905 | struct nfs4_sequence_args seq_args; | ||
906 | }; | 903 | }; |
907 | 904 | ||
908 | struct nfs4_link_res { | 905 | struct nfs4_link_res { |
906 | struct nfs4_sequence_res seq_res; | ||
909 | const struct nfs_server * server; | 907 | const struct nfs_server * server; |
910 | struct nfs_fattr * fattr; | 908 | struct nfs_fattr * fattr; |
911 | struct nfs4_change_info cinfo; | 909 | struct nfs4_change_info cinfo; |
912 | struct nfs_fattr * dir_attr; | 910 | struct nfs_fattr * dir_attr; |
913 | struct nfs4_sequence_res seq_res; | ||
914 | }; | 911 | }; |
915 | 912 | ||
916 | 913 | ||
917 | struct nfs4_lookup_arg { | 914 | struct nfs4_lookup_arg { |
915 | struct nfs4_sequence_args seq_args; | ||
918 | const struct nfs_fh * dir_fh; | 916 | const struct nfs_fh * dir_fh; |
919 | const struct qstr * name; | 917 | const struct qstr * name; |
920 | const u32 * bitmask; | 918 | const u32 * bitmask; |
921 | struct nfs4_sequence_args seq_args; | ||
922 | }; | 919 | }; |
923 | 920 | ||
924 | struct nfs4_lookup_res { | 921 | struct nfs4_lookup_res { |
922 | struct nfs4_sequence_res seq_res; | ||
925 | const struct nfs_server * server; | 923 | const struct nfs_server * server; |
926 | struct nfs_fattr * fattr; | 924 | struct nfs_fattr * fattr; |
927 | struct nfs_fh * fh; | 925 | struct nfs_fh * fh; |
928 | struct nfs4_sequence_res seq_res; | ||
929 | }; | 926 | }; |
930 | 927 | ||
931 | struct nfs4_lookup_root_arg { | 928 | struct nfs4_lookup_root_arg { |
932 | const u32 * bitmask; | ||
933 | struct nfs4_sequence_args seq_args; | 929 | struct nfs4_sequence_args seq_args; |
930 | const u32 * bitmask; | ||
934 | }; | 931 | }; |
935 | 932 | ||
936 | struct nfs4_pathconf_arg { | 933 | struct nfs4_pathconf_arg { |
934 | struct nfs4_sequence_args seq_args; | ||
937 | const struct nfs_fh * fh; | 935 | const struct nfs_fh * fh; |
938 | const u32 * bitmask; | 936 | const u32 * bitmask; |
939 | struct nfs4_sequence_args seq_args; | ||
940 | }; | 937 | }; |
941 | 938 | ||
942 | struct nfs4_pathconf_res { | 939 | struct nfs4_pathconf_res { |
943 | struct nfs_pathconf *pathconf; | ||
944 | struct nfs4_sequence_res seq_res; | 940 | struct nfs4_sequence_res seq_res; |
941 | struct nfs_pathconf *pathconf; | ||
945 | }; | 942 | }; |
946 | 943 | ||
947 | struct nfs4_readdir_arg { | 944 | struct nfs4_readdir_arg { |
945 | struct nfs4_sequence_args seq_args; | ||
948 | const struct nfs_fh * fh; | 946 | const struct nfs_fh * fh; |
949 | u64 cookie; | 947 | u64 cookie; |
950 | nfs4_verifier verifier; | 948 | nfs4_verifier verifier; |
@@ -953,21 +951,20 @@ struct nfs4_readdir_arg { | |||
953 | unsigned int pgbase; /* zero-copy data */ | 951 | unsigned int pgbase; /* zero-copy data */ |
954 | const u32 * bitmask; | 952 | const u32 * bitmask; |
955 | int plus; | 953 | int plus; |
956 | struct nfs4_sequence_args seq_args; | ||
957 | }; | 954 | }; |
958 | 955 | ||
959 | struct nfs4_readdir_res { | 956 | struct nfs4_readdir_res { |
957 | struct nfs4_sequence_res seq_res; | ||
960 | nfs4_verifier verifier; | 958 | nfs4_verifier verifier; |
961 | unsigned int pgbase; | 959 | unsigned int pgbase; |
962 | struct nfs4_sequence_res seq_res; | ||
963 | }; | 960 | }; |
964 | 961 | ||
965 | struct nfs4_readlink { | 962 | struct nfs4_readlink { |
963 | struct nfs4_sequence_args seq_args; | ||
966 | const struct nfs_fh * fh; | 964 | const struct nfs_fh * fh; |
967 | unsigned int pgbase; | 965 | unsigned int pgbase; |
968 | unsigned int pglen; /* zero-copy data */ | 966 | unsigned int pglen; /* zero-copy data */ |
969 | struct page ** pages; /* zero-copy data */ | 967 | struct page ** pages; /* zero-copy data */ |
970 | struct nfs4_sequence_args seq_args; | ||
971 | }; | 968 | }; |
972 | 969 | ||
973 | struct nfs4_readlink_res { | 970 | struct nfs4_readlink_res { |
@@ -993,28 +990,28 @@ struct nfs4_setclientid_res { | |||
993 | }; | 990 | }; |
994 | 991 | ||
995 | struct nfs4_statfs_arg { | 992 | struct nfs4_statfs_arg { |
993 | struct nfs4_sequence_args seq_args; | ||
996 | const struct nfs_fh * fh; | 994 | const struct nfs_fh * fh; |
997 | const u32 * bitmask; | 995 | const u32 * bitmask; |
998 | struct nfs4_sequence_args seq_args; | ||
999 | }; | 996 | }; |
1000 | 997 | ||
1001 | struct nfs4_statfs_res { | 998 | struct nfs4_statfs_res { |
1002 | struct nfs_fsstat *fsstat; | ||
1003 | struct nfs4_sequence_res seq_res; | 999 | struct nfs4_sequence_res seq_res; |
1000 | struct nfs_fsstat *fsstat; | ||
1004 | }; | 1001 | }; |
1005 | 1002 | ||
1006 | struct nfs4_server_caps_arg { | 1003 | struct nfs4_server_caps_arg { |
1007 | struct nfs_fh *fhandle; | ||
1008 | struct nfs4_sequence_args seq_args; | 1004 | struct nfs4_sequence_args seq_args; |
1005 | struct nfs_fh *fhandle; | ||
1009 | }; | 1006 | }; |
1010 | 1007 | ||
1011 | struct nfs4_server_caps_res { | 1008 | struct nfs4_server_caps_res { |
1009 | struct nfs4_sequence_res seq_res; | ||
1012 | u32 attr_bitmask[3]; | 1010 | u32 attr_bitmask[3]; |
1013 | u32 acl_bitmask; | 1011 | u32 acl_bitmask; |
1014 | u32 has_links; | 1012 | u32 has_links; |
1015 | u32 has_symlinks; | 1013 | u32 has_symlinks; |
1016 | u32 fh_expire_type; | 1014 | u32 fh_expire_type; |
1017 | struct nfs4_sequence_res seq_res; | ||
1018 | }; | 1015 | }; |
1019 | 1016 | ||
1020 | #define NFS4_PATHNAME_MAXCOMPONENTS 512 | 1017 | #define NFS4_PATHNAME_MAXCOMPONENTS 512 |
@@ -1040,16 +1037,16 @@ struct nfs4_fs_locations { | |||
1040 | }; | 1037 | }; |
1041 | 1038 | ||
1042 | struct nfs4_fs_locations_arg { | 1039 | struct nfs4_fs_locations_arg { |
1040 | struct nfs4_sequence_args seq_args; | ||
1043 | const struct nfs_fh *dir_fh; | 1041 | const struct nfs_fh *dir_fh; |
1044 | const struct qstr *name; | 1042 | const struct qstr *name; |
1045 | struct page *page; | 1043 | struct page *page; |
1046 | const u32 *bitmask; | 1044 | const u32 *bitmask; |
1047 | struct nfs4_sequence_args seq_args; | ||
1048 | }; | 1045 | }; |
1049 | 1046 | ||
1050 | struct nfs4_fs_locations_res { | 1047 | struct nfs4_fs_locations_res { |
1051 | struct nfs4_fs_locations *fs_locations; | ||
1052 | struct nfs4_sequence_res seq_res; | 1048 | struct nfs4_sequence_res seq_res; |
1049 | struct nfs4_fs_locations *fs_locations; | ||
1053 | }; | 1050 | }; |
1054 | 1051 | ||
1055 | struct nfs4_secinfo_oid { | 1052 | struct nfs4_secinfo_oid { |
@@ -1074,14 +1071,14 @@ struct nfs4_secinfo_flavors { | |||
1074 | }; | 1071 | }; |
1075 | 1072 | ||
1076 | struct nfs4_secinfo_arg { | 1073 | struct nfs4_secinfo_arg { |
1074 | struct nfs4_sequence_args seq_args; | ||
1077 | const struct nfs_fh *dir_fh; | 1075 | const struct nfs_fh *dir_fh; |
1078 | const struct qstr *name; | 1076 | const struct qstr *name; |
1079 | struct nfs4_sequence_args seq_args; | ||
1080 | }; | 1077 | }; |
1081 | 1078 | ||
1082 | struct nfs4_secinfo_res { | 1079 | struct nfs4_secinfo_res { |
1083 | struct nfs4_secinfo_flavors *flavors; | ||
1084 | struct nfs4_sequence_res seq_res; | 1080 | struct nfs4_sequence_res seq_res; |
1081 | struct nfs4_secinfo_flavors *flavors; | ||
1085 | }; | 1082 | }; |
1086 | 1083 | ||
1087 | #endif /* CONFIG_NFS_V4 */ | 1084 | #endif /* CONFIG_NFS_V4 */ |
@@ -1161,9 +1158,9 @@ struct nfs41_create_session_res { | |||
1161 | }; | 1158 | }; |
1162 | 1159 | ||
1163 | struct nfs41_reclaim_complete_args { | 1160 | struct nfs41_reclaim_complete_args { |
1161 | struct nfs4_sequence_args seq_args; | ||
1164 | /* In the future extend to include curr_fh for use with migration */ | 1162 | /* In the future extend to include curr_fh for use with migration */ |
1165 | unsigned char one_fs:1; | 1163 | unsigned char one_fs:1; |
1166 | struct nfs4_sequence_args seq_args; | ||
1167 | }; | 1164 | }; |
1168 | 1165 | ||
1169 | struct nfs41_reclaim_complete_res { | 1166 | struct nfs41_reclaim_complete_res { |
@@ -1173,28 +1170,28 @@ struct nfs41_reclaim_complete_res { | |||
1173 | #define SECINFO_STYLE_CURRENT_FH 0 | 1170 | #define SECINFO_STYLE_CURRENT_FH 0 |
1174 | #define SECINFO_STYLE_PARENT 1 | 1171 | #define SECINFO_STYLE_PARENT 1 |
1175 | struct nfs41_secinfo_no_name_args { | 1172 | struct nfs41_secinfo_no_name_args { |
1176 | int style; | ||
1177 | struct nfs4_sequence_args seq_args; | 1173 | struct nfs4_sequence_args seq_args; |
1174 | int style; | ||
1178 | }; | 1175 | }; |
1179 | 1176 | ||
1180 | struct nfs41_test_stateid_args { | 1177 | struct nfs41_test_stateid_args { |
1181 | nfs4_stateid *stateid; | ||
1182 | struct nfs4_sequence_args seq_args; | 1178 | struct nfs4_sequence_args seq_args; |
1179 | nfs4_stateid *stateid; | ||
1183 | }; | 1180 | }; |
1184 | 1181 | ||
1185 | struct nfs41_test_stateid_res { | 1182 | struct nfs41_test_stateid_res { |
1186 | unsigned int status; | ||
1187 | struct nfs4_sequence_res seq_res; | 1183 | struct nfs4_sequence_res seq_res; |
1184 | unsigned int status; | ||
1188 | }; | 1185 | }; |
1189 | 1186 | ||
1190 | struct nfs41_free_stateid_args { | 1187 | struct nfs41_free_stateid_args { |
1191 | nfs4_stateid *stateid; | ||
1192 | struct nfs4_sequence_args seq_args; | 1188 | struct nfs4_sequence_args seq_args; |
1189 | nfs4_stateid *stateid; | ||
1193 | }; | 1190 | }; |
1194 | 1191 | ||
1195 | struct nfs41_free_stateid_res { | 1192 | struct nfs41_free_stateid_res { |
1196 | unsigned int status; | ||
1197 | struct nfs4_sequence_res seq_res; | 1193 | struct nfs4_sequence_res seq_res; |
1194 | unsigned int status; | ||
1198 | }; | 1195 | }; |
1199 | 1196 | ||
1200 | #else | 1197 | #else |
diff --git a/include/linux/of.h b/include/linux/of.h index 6cfea9aa401f..5ebcc5c8e423 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/mod_devicetable.h> | 22 | #include <linux/mod_devicetable.h> |
23 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
24 | #include <linux/topology.h> | 24 | #include <linux/topology.h> |
25 | #include <linux/notifier.h> | ||
25 | 26 | ||
26 | #include <asm/byteorder.h> | 27 | #include <asm/byteorder.h> |
27 | #include <asm/errno.h> | 28 | #include <asm/errno.h> |
@@ -282,16 +283,28 @@ extern int of_alias_get_id(struct device_node *np, const char *stem); | |||
282 | 283 | ||
283 | extern int of_machine_is_compatible(const char *compat); | 284 | extern int of_machine_is_compatible(const char *compat); |
284 | 285 | ||
285 | extern int prom_add_property(struct device_node* np, struct property* prop); | 286 | extern int of_add_property(struct device_node *np, struct property *prop); |
286 | extern int prom_remove_property(struct device_node *np, struct property *prop); | 287 | extern int of_remove_property(struct device_node *np, struct property *prop); |
287 | extern int prom_update_property(struct device_node *np, | 288 | extern int of_update_property(struct device_node *np, struct property *newprop); |
288 | struct property *newprop); | ||
289 | 289 | ||
290 | #if defined(CONFIG_OF_DYNAMIC) | ||
291 | /* For updating the device tree at runtime */ | 290 | /* For updating the device tree at runtime */ |
292 | extern void of_attach_node(struct device_node *); | 291 | #define OF_RECONFIG_ATTACH_NODE 0x0001 |
293 | extern void of_detach_node(struct device_node *); | 292 | #define OF_RECONFIG_DETACH_NODE 0x0002 |
294 | #endif | 293 | #define OF_RECONFIG_ADD_PROPERTY 0x0003 |
294 | #define OF_RECONFIG_REMOVE_PROPERTY 0x0004 | ||
295 | #define OF_RECONFIG_UPDATE_PROPERTY 0x0005 | ||
296 | |||
297 | struct of_prop_reconfig { | ||
298 | struct device_node *dn; | ||
299 | struct property *prop; | ||
300 | }; | ||
301 | |||
302 | extern int of_reconfig_notifier_register(struct notifier_block *); | ||
303 | extern int of_reconfig_notifier_unregister(struct notifier_block *); | ||
304 | extern int of_reconfig_notify(unsigned long, void *); | ||
305 | |||
306 | extern int of_attach_node(struct device_node *); | ||
307 | extern int of_detach_node(struct device_node *); | ||
295 | 308 | ||
296 | #define of_match_ptr(_ptr) (_ptr) | 309 | #define of_match_ptr(_ptr) (_ptr) |
297 | 310 | ||
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index b47d2040c9f2..3863a4dbdf18 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h | |||
@@ -100,6 +100,7 @@ extern int of_platform_populate(struct device_node *root, | |||
100 | 100 | ||
101 | #if !defined(CONFIG_OF_ADDRESS) | 101 | #if !defined(CONFIG_OF_ADDRESS) |
102 | struct of_dev_auxdata; | 102 | struct of_dev_auxdata; |
103 | struct device; | ||
103 | static inline int of_platform_populate(struct device_node *root, | 104 | static inline int of_platform_populate(struct device_node *root, |
104 | const struct of_device_id *matches, | 105 | const struct of_device_id *matches, |
105 | const struct of_dev_auxdata *lookup, | 106 | const struct of_dev_auxdata *lookup, |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index b5d13841604e..70473da47b3f 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -362,7 +362,7 @@ static inline void ClearPageCompound(struct page *page) | |||
362 | * pages on the LRU and/or pagecache. | 362 | * pages on the LRU and/or pagecache. |
363 | */ | 363 | */ |
364 | TESTPAGEFLAG(Compound, compound) | 364 | TESTPAGEFLAG(Compound, compound) |
365 | __PAGEFLAG(Head, compound) | 365 | __SETPAGEFLAG(Head, compound) __CLEARPAGEFLAG(Head, compound) |
366 | 366 | ||
367 | /* | 367 | /* |
368 | * PG_reclaim is used in combination with PG_compound to mark the | 368 | * PG_reclaim is used in combination with PG_compound to mark the |
@@ -374,8 +374,14 @@ __PAGEFLAG(Head, compound) | |||
374 | * PG_compound & PG_reclaim => Tail page | 374 | * PG_compound & PG_reclaim => Tail page |
375 | * PG_compound & ~PG_reclaim => Head page | 375 | * PG_compound & ~PG_reclaim => Head page |
376 | */ | 376 | */ |
377 | #define PG_head_mask ((1L << PG_compound)) | ||
377 | #define PG_head_tail_mask ((1L << PG_compound) | (1L << PG_reclaim)) | 378 | #define PG_head_tail_mask ((1L << PG_compound) | (1L << PG_reclaim)) |
378 | 379 | ||
380 | static inline int PageHead(struct page *page) | ||
381 | { | ||
382 | return ((page->flags & PG_head_tail_mask) == PG_head_mask); | ||
383 | } | ||
384 | |||
379 | static inline int PageTail(struct page *page) | 385 | static inline int PageTail(struct page *page) |
380 | { | 386 | { |
381 | return ((page->flags & PG_head_tail_mask) == PG_head_tail_mask); | 387 | return ((page->flags & PG_head_tail_mask) == PG_head_tail_mask); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 0f8447376ddb..0eb65796bcb9 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1568,6 +1568,7 @@ | |||
1568 | #define PCI_DEVICE_ID_RICOH_RL5C476 0x0476 | 1568 | #define PCI_DEVICE_ID_RICOH_RL5C476 0x0476 |
1569 | #define PCI_DEVICE_ID_RICOH_RL5C478 0x0478 | 1569 | #define PCI_DEVICE_ID_RICOH_RL5C478 0x0478 |
1570 | #define PCI_DEVICE_ID_RICOH_R5C822 0x0822 | 1570 | #define PCI_DEVICE_ID_RICOH_R5C822 0x0822 |
1571 | #define PCI_DEVICE_ID_RICOH_R5CE822 0xe822 | ||
1571 | #define PCI_DEVICE_ID_RICOH_R5CE823 0xe823 | 1572 | #define PCI_DEVICE_ID_RICOH_R5CE823 0xe823 |
1572 | #define PCI_DEVICE_ID_RICOH_R5C832 0x0832 | 1573 | #define PCI_DEVICE_ID_RICOH_R5C832 0x0832 |
1573 | #define PCI_DEVICE_ID_RICOH_R5C843 0x0843 | 1574 | #define PCI_DEVICE_ID_RICOH_R5C843 0x0843 |
diff --git a/include/linux/pid.h b/include/linux/pid.h index b152d44fb181..2381c973d897 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -121,6 +121,7 @@ int next_pidmap(struct pid_namespace *pid_ns, unsigned int last); | |||
121 | 121 | ||
122 | extern struct pid *alloc_pid(struct pid_namespace *ns); | 122 | extern struct pid *alloc_pid(struct pid_namespace *ns); |
123 | extern void free_pid(struct pid *pid); | 123 | extern void free_pid(struct pid *pid); |
124 | extern void disable_pid_allocation(struct pid_namespace *ns); | ||
124 | 125 | ||
125 | /* | 126 | /* |
126 | * ns_of_pid() returns the pid namespace in which the specified pid was | 127 | * ns_of_pid() returns the pid namespace in which the specified pid was |
diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h index bf285999273a..215e5e3dda10 100644 --- a/include/linux/pid_namespace.h +++ b/include/linux/pid_namespace.h | |||
@@ -21,7 +21,7 @@ struct pid_namespace { | |||
21 | struct kref kref; | 21 | struct kref kref; |
22 | struct pidmap pidmap[PIDMAP_ENTRIES]; | 22 | struct pidmap pidmap[PIDMAP_ENTRIES]; |
23 | int last_pid; | 23 | int last_pid; |
24 | int nr_hashed; | 24 | unsigned int nr_hashed; |
25 | struct task_struct *child_reaper; | 25 | struct task_struct *child_reaper; |
26 | struct kmem_cache *pid_cachep; | 26 | struct kmem_cache *pid_cachep; |
27 | unsigned int level; | 27 | unsigned int level; |
@@ -42,6 +42,8 @@ struct pid_namespace { | |||
42 | 42 | ||
43 | extern struct pid_namespace init_pid_ns; | 43 | extern struct pid_namespace init_pid_ns; |
44 | 44 | ||
45 | #define PIDNS_HASH_ADDING (1U << 31) | ||
46 | |||
45 | #ifdef CONFIG_PID_NS | 47 | #ifdef CONFIG_PID_NS |
46 | static inline struct pid_namespace *get_pid_ns(struct pid_namespace *ns) | 48 | static inline struct pid_namespace *get_pid_ns(struct pid_namespace *ns) |
47 | { | 49 | { |
diff --git a/include/linux/platform_data/i2c-cbus-gpio.h b/include/linux/platform_data/i2c-cbus-gpio.h new file mode 100644 index 000000000000..6faa992a9502 --- /dev/null +++ b/include/linux/platform_data/i2c-cbus-gpio.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * i2c-cbus-gpio.h - CBUS I2C platform_data definition | ||
3 | * | ||
4 | * Copyright (C) 2004-2009 Nokia Corporation | ||
5 | * | ||
6 | * Written by Felipe Balbi and Aaro Koskinen. | ||
7 | * | ||
8 | * This file is subject to the terms and conditions of the GNU General | ||
9 | * Public License. See the file "COPYING" in the main directory of this | ||
10 | * archive for more details. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __INCLUDE_LINUX_I2C_CBUS_GPIO_H | ||
19 | #define __INCLUDE_LINUX_I2C_CBUS_GPIO_H | ||
20 | |||
21 | struct i2c_cbus_platform_data { | ||
22 | int dat_gpio; | ||
23 | int clk_gpio; | ||
24 | int sel_gpio; | ||
25 | }; | ||
26 | |||
27 | #endif /* __INCLUDE_LINUX_I2C_CBUS_GPIO_H */ | ||
diff --git a/include/linux/platform_data/iommu-omap.h b/include/linux/platform_data/iommu-omap.h index c677b9f2fefa..5b429c43a297 100644 --- a/include/linux/platform_data/iommu-omap.h +++ b/include/linux/platform_data/iommu-omap.h | |||
@@ -10,6 +10,8 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/platform_device.h> | ||
14 | |||
13 | #define MMU_REG_SIZE 256 | 15 | #define MMU_REG_SIZE 256 |
14 | 16 | ||
15 | /** | 17 | /** |
@@ -42,8 +44,11 @@ struct omap_mmu_dev_attr { | |||
42 | 44 | ||
43 | struct iommu_platform_data { | 45 | struct iommu_platform_data { |
44 | const char *name; | 46 | const char *name; |
45 | const char *clk_name; | 47 | const char *reset_name; |
46 | const int nr_tlb_entries; | 48 | int nr_tlb_entries; |
47 | u32 da_start; | 49 | u32 da_start; |
48 | u32 da_end; | 50 | u32 da_end; |
51 | |||
52 | int (*assert_reset)(struct platform_device *pdev, const char *name); | ||
53 | int (*deassert_reset)(struct platform_device *pdev, const char *name); | ||
49 | }; | 54 | }; |
diff --git a/include/linux/platform_data/mtd-nomadik-nand.h b/include/linux/platform_data/mtd-nomadik-nand.h deleted file mode 100644 index c3c8254c22a5..000000000000 --- a/include/linux/platform_data/mtd-nomadik-nand.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | #ifndef __ASM_ARCH_NAND_H | ||
2 | #define __ASM_ARCH_NAND_H | ||
3 | |||
4 | struct nomadik_nand_platform_data { | ||
5 | struct mtd_partition *parts; | ||
6 | int nparts; | ||
7 | int options; | ||
8 | int (*init) (void); | ||
9 | int (*exit) (void); | ||
10 | }; | ||
11 | |||
12 | #define NAND_IO_DATA 0x40000000 | ||
13 | #define NAND_IO_CMD 0x40800000 | ||
14 | #define NAND_IO_ADDR 0x41000000 | ||
15 | |||
16 | #endif /* __ASM_ARCH_NAND_H */ | ||
diff --git a/include/linux/platform_data/serial-omap.h b/include/linux/platform_data/serial-omap.h new file mode 100644 index 000000000000..ff9b0aab5281 --- /dev/null +++ b/include/linux/platform_data/serial-omap.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | * Driver for OMAP-UART controller. | ||
3 | * Based on drivers/serial/8250.c | ||
4 | * | ||
5 | * Copyright (C) 2010 Texas Instruments. | ||
6 | * | ||
7 | * Authors: | ||
8 | * Govindraj R <govindraj.raja@ti.com> | ||
9 | * Thara Gopinath <thara@ti.com> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | */ | ||
16 | |||
17 | #ifndef __OMAP_SERIAL_H__ | ||
18 | #define __OMAP_SERIAL_H__ | ||
19 | |||
20 | #include <linux/serial_core.h> | ||
21 | #include <linux/device.h> | ||
22 | #include <linux/pm_qos.h> | ||
23 | |||
24 | #define DRIVER_NAME "omap_uart" | ||
25 | |||
26 | /* | ||
27 | * Use tty device name as ttyO, [O -> OMAP] | ||
28 | * in bootargs we specify as console=ttyO0 if uart1 | ||
29 | * is used as console uart. | ||
30 | */ | ||
31 | #define OMAP_SERIAL_NAME "ttyO" | ||
32 | |||
33 | struct omap_uart_port_info { | ||
34 | bool dma_enabled; /* To specify DMA Mode */ | ||
35 | unsigned int uartclk; /* UART clock rate */ | ||
36 | upf_t flags; /* UPF_* flags */ | ||
37 | unsigned int dma_rx_buf_size; | ||
38 | unsigned int dma_rx_timeout; | ||
39 | unsigned int autosuspend_timeout; | ||
40 | unsigned int dma_rx_poll_rate; | ||
41 | int DTR_gpio; | ||
42 | int DTR_inverted; | ||
43 | int DTR_present; | ||
44 | |||
45 | int (*get_context_loss_count)(struct device *); | ||
46 | void (*set_forceidle)(struct device *); | ||
47 | void (*set_noidle)(struct device *); | ||
48 | void (*enable_wakeup)(struct device *, bool); | ||
49 | }; | ||
50 | |||
51 | #endif /* __OMAP_SERIAL_H__ */ | ||
diff --git a/include/linux/platform_data/usb-omap.h b/include/linux/platform_data/usb-omap.h index 8570bcfe6311..ef65b67c56c3 100644 --- a/include/linux/platform_data/usb-omap.h +++ b/include/linux/platform_data/usb-omap.h | |||
@@ -59,6 +59,9 @@ struct usbhs_omap_platform_data { | |||
59 | 59 | ||
60 | struct ehci_hcd_omap_platform_data *ehci_data; | 60 | struct ehci_hcd_omap_platform_data *ehci_data; |
61 | struct ohci_hcd_omap_platform_data *ohci_data; | 61 | struct ohci_hcd_omap_platform_data *ohci_data; |
62 | |||
63 | /* OMAP3 <= ES2.1 have a single ulpi bypass control bit */ | ||
64 | unsigned single_ulpi_bypass:1; | ||
62 | }; | 65 | }; |
63 | 66 | ||
64 | /*-------------------------------------------------------------------------*/ | 67 | /*-------------------------------------------------------------------------*/ |
diff --git a/include/linux/pstore_ram.h b/include/linux/pstore_ram.h index 098d2a838296..cb6ab5feab67 100644 --- a/include/linux/pstore_ram.h +++ b/include/linux/pstore_ram.h | |||
@@ -46,9 +46,8 @@ struct persistent_ram_zone { | |||
46 | size_t old_log_size; | 46 | size_t old_log_size; |
47 | }; | 47 | }; |
48 | 48 | ||
49 | struct persistent_ram_zone * __devinit persistent_ram_new(phys_addr_t start, | 49 | struct persistent_ram_zone *persistent_ram_new(phys_addr_t start, size_t size, |
50 | size_t size, u32 sig, | 50 | u32 sig, int ecc_size); |
51 | int ecc_size); | ||
52 | void persistent_ram_free(struct persistent_ram_zone *prz); | 51 | void persistent_ram_free(struct persistent_ram_zone *prz); |
53 | void persistent_ram_zap(struct persistent_ram_zone *prz); | 52 | void persistent_ram_zap(struct persistent_ram_zone *prz); |
54 | 53 | ||
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index addfbe7c180e..89573a33ab3c 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -45,7 +45,6 @@ extern long arch_ptrace(struct task_struct *child, long request, | |||
45 | extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len); | 45 | extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len); |
46 | extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); | 46 | extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); |
47 | extern void ptrace_disable(struct task_struct *); | 47 | extern void ptrace_disable(struct task_struct *); |
48 | extern int ptrace_check_attach(struct task_struct *task, bool ignore_state); | ||
49 | extern int ptrace_request(struct task_struct *child, long request, | 48 | extern int ptrace_request(struct task_struct *child, long request, |
50 | unsigned long addr, unsigned long data); | 49 | unsigned long addr, unsigned long data); |
51 | extern void ptrace_notify(int exit_code); | 50 | extern void ptrace_notify(int exit_code); |
@@ -344,6 +343,10 @@ static inline void user_single_step_siginfo(struct task_struct *tsk, | |||
344 | #define signal_pt_regs() task_pt_regs(current) | 343 | #define signal_pt_regs() task_pt_regs(current) |
345 | #endif | 344 | #endif |
346 | 345 | ||
346 | #ifndef current_user_stack_pointer | ||
347 | #define current_user_stack_pointer() user_stack_pointer(current_pt_regs()) | ||
348 | #endif | ||
349 | |||
347 | extern int task_current_syscall(struct task_struct *target, long *callno, | 350 | extern int task_current_syscall(struct task_struct *target, long *callno, |
348 | unsigned long args[6], unsigned int maxargs, | 351 | unsigned long args[6], unsigned int maxargs, |
349 | unsigned long *sp, unsigned long *pc); | 352 | unsigned long *sp, unsigned long *pc); |
diff --git a/include/linux/pwm.h b/include/linux/pwm.h index 112b31436848..6d661f32e0e4 100644 --- a/include/linux/pwm.h +++ b/include/linux/pwm.h | |||
@@ -171,6 +171,9 @@ struct pwm_device *pwm_request_from_chip(struct pwm_chip *chip, | |||
171 | unsigned int index, | 171 | unsigned int index, |
172 | const char *label); | 172 | const char *label); |
173 | 173 | ||
174 | struct pwm_device *of_pwm_xlate_with_flags(struct pwm_chip *pc, | ||
175 | const struct of_phandle_args *args); | ||
176 | |||
174 | struct pwm_device *pwm_get(struct device *dev, const char *consumer); | 177 | struct pwm_device *pwm_get(struct device *dev, const char *consumer); |
175 | void pwm_put(struct pwm_device *pwm); | 178 | void pwm_put(struct pwm_device *pwm); |
176 | 179 | ||
diff --git a/include/linux/raid/Kbuild b/include/linux/raid/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/linux/raid/Kbuild +++ /dev/null | |||
diff --git a/include/linux/raid/pq.h b/include/linux/raid/pq.h index 640c69ceec96..8dfaa2ce2e95 100644 --- a/include/linux/raid/pq.h +++ b/include/linux/raid/pq.h | |||
@@ -98,6 +98,9 @@ extern const struct raid6_calls raid6_altivec1; | |||
98 | extern const struct raid6_calls raid6_altivec2; | 98 | extern const struct raid6_calls raid6_altivec2; |
99 | extern const struct raid6_calls raid6_altivec4; | 99 | extern const struct raid6_calls raid6_altivec4; |
100 | extern const struct raid6_calls raid6_altivec8; | 100 | extern const struct raid6_calls raid6_altivec8; |
101 | extern const struct raid6_calls raid6_avx2x1; | ||
102 | extern const struct raid6_calls raid6_avx2x2; | ||
103 | extern const struct raid6_calls raid6_avx2x4; | ||
101 | 104 | ||
102 | struct raid6_recov_calls { | 105 | struct raid6_recov_calls { |
103 | void (*data2)(int, size_t, int, int, void **); | 106 | void (*data2)(int, size_t, int, int, void **); |
@@ -109,6 +112,7 @@ struct raid6_recov_calls { | |||
109 | 112 | ||
110 | extern const struct raid6_recov_calls raid6_recov_intx1; | 113 | extern const struct raid6_recov_calls raid6_recov_intx1; |
111 | extern const struct raid6_recov_calls raid6_recov_ssse3; | 114 | extern const struct raid6_recov_calls raid6_recov_ssse3; |
115 | extern const struct raid6_recov_calls raid6_recov_avx2; | ||
112 | 116 | ||
113 | /* Algorithm list */ | 117 | /* Algorithm list */ |
114 | extern const struct raid6_calls * const raid6_algos[]; | 118 | extern const struct raid6_calls * const raid6_algos[]; |
diff --git a/include/linux/rbtree_augmented.h b/include/linux/rbtree_augmented.h index 2ac60c9cf644..fea49b5da12a 100644 --- a/include/linux/rbtree_augmented.h +++ b/include/linux/rbtree_augmented.h | |||
@@ -123,9 +123,9 @@ __rb_change_child(struct rb_node *old, struct rb_node *new, | |||
123 | extern void __rb_erase_color(struct rb_node *parent, struct rb_root *root, | 123 | extern void __rb_erase_color(struct rb_node *parent, struct rb_root *root, |
124 | void (*augment_rotate)(struct rb_node *old, struct rb_node *new)); | 124 | void (*augment_rotate)(struct rb_node *old, struct rb_node *new)); |
125 | 125 | ||
126 | static __always_inline void | 126 | static __always_inline struct rb_node * |
127 | rb_erase_augmented(struct rb_node *node, struct rb_root *root, | 127 | __rb_erase_augmented(struct rb_node *node, struct rb_root *root, |
128 | const struct rb_augment_callbacks *augment) | 128 | const struct rb_augment_callbacks *augment) |
129 | { | 129 | { |
130 | struct rb_node *child = node->rb_right, *tmp = node->rb_left; | 130 | struct rb_node *child = node->rb_right, *tmp = node->rb_left; |
131 | struct rb_node *parent, *rebalance; | 131 | struct rb_node *parent, *rebalance; |
@@ -217,6 +217,14 @@ rb_erase_augmented(struct rb_node *node, struct rb_root *root, | |||
217 | } | 217 | } |
218 | 218 | ||
219 | augment->propagate(tmp, NULL); | 219 | augment->propagate(tmp, NULL); |
220 | return rebalance; | ||
221 | } | ||
222 | |||
223 | static __always_inline void | ||
224 | rb_erase_augmented(struct rb_node *node, struct rb_root *root, | ||
225 | const struct rb_augment_callbacks *augment) | ||
226 | { | ||
227 | struct rb_node *rebalance = __rb_erase_augmented(node, root, augment); | ||
220 | if (rebalance) | 228 | if (rebalance) |
221 | __rb_erase_color(rebalance, root, augment->rotate); | 229 | __rb_erase_color(rebalance, root, augment->rotate); |
222 | } | 230 | } |
diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h index 6f54e40fa218..5ae8456d9670 100644 --- a/include/linux/res_counter.h +++ b/include/linux/res_counter.h | |||
@@ -125,14 +125,16 @@ int res_counter_charge_nofail(struct res_counter *counter, | |||
125 | * | 125 | * |
126 | * these calls check for usage underflow and show a warning on the console | 126 | * these calls check for usage underflow and show a warning on the console |
127 | * _locked call expects the counter->lock to be taken | 127 | * _locked call expects the counter->lock to be taken |
128 | * | ||
129 | * returns the total charges still present in @counter. | ||
128 | */ | 130 | */ |
129 | 131 | ||
130 | void res_counter_uncharge_locked(struct res_counter *counter, unsigned long val); | 132 | u64 res_counter_uncharge_locked(struct res_counter *counter, unsigned long val); |
131 | void res_counter_uncharge(struct res_counter *counter, unsigned long val); | 133 | u64 res_counter_uncharge(struct res_counter *counter, unsigned long val); |
132 | 134 | ||
133 | void res_counter_uncharge_until(struct res_counter *counter, | 135 | u64 res_counter_uncharge_until(struct res_counter *counter, |
134 | struct res_counter *top, | 136 | struct res_counter *top, |
135 | unsigned long val); | 137 | unsigned long val); |
136 | /** | 138 | /** |
137 | * res_counter_margin - calculate chargeable space of a counter | 139 | * res_counter_margin - calculate chargeable space of a counter |
138 | * @cnt: the counter | 140 | * @cnt: the counter |
diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h index 54bd7cd7ecbd..8da67d625e13 100644 --- a/include/linux/rwsem.h +++ b/include/linux/rwsem.h | |||
@@ -125,8 +125,17 @@ extern void downgrade_write(struct rw_semaphore *sem); | |||
125 | */ | 125 | */ |
126 | extern void down_read_nested(struct rw_semaphore *sem, int subclass); | 126 | extern void down_read_nested(struct rw_semaphore *sem, int subclass); |
127 | extern void down_write_nested(struct rw_semaphore *sem, int subclass); | 127 | extern void down_write_nested(struct rw_semaphore *sem, int subclass); |
128 | extern void _down_write_nest_lock(struct rw_semaphore *sem, struct lockdep_map *nest_lock); | ||
129 | |||
130 | # define down_write_nest_lock(sem, nest_lock) \ | ||
131 | do { \ | ||
132 | typecheck(struct lockdep_map *, &(nest_lock)->dep_map); \ | ||
133 | _down_write_nest_lock(sem, &(nest_lock)->dep_map); \ | ||
134 | } while (0); | ||
135 | |||
128 | #else | 136 | #else |
129 | # define down_read_nested(sem, subclass) down_read(sem) | 137 | # define down_read_nested(sem, subclass) down_read(sem) |
138 | # define down_write_nest_lock(sem, nest_lock) down_write(sem) | ||
130 | # define down_write_nested(sem, subclass) down_write(sem) | 139 | # define down_write_nested(sem, subclass) down_write(sem) |
131 | #endif | 140 | #endif |
132 | 141 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 9914c662ed7b..d2112477ff5e 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1597,6 +1597,7 @@ struct task_struct { | |||
1597 | unsigned long nr_pages; /* uncharged usage */ | 1597 | unsigned long nr_pages; /* uncharged usage */ |
1598 | unsigned long memsw_nr_pages; /* uncharged mem+swap usage */ | 1598 | unsigned long memsw_nr_pages; /* uncharged mem+swap usage */ |
1599 | } memcg_batch; | 1599 | } memcg_batch; |
1600 | unsigned int memcg_kmem_skip_account; | ||
1600 | #endif | 1601 | #endif |
1601 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | 1602 | #ifdef CONFIG_HAVE_HW_BREAKPOINT |
1602 | atomic_t ptrace_bp_refcnt; | 1603 | atomic_t ptrace_bp_refcnt; |
@@ -1809,6 +1810,7 @@ extern void thread_group_cputime_adjusted(struct task_struct *p, cputime_t *ut, | |||
1809 | #define PF_MEMALLOC 0x00000800 /* Allocating memory */ | 1810 | #define PF_MEMALLOC 0x00000800 /* Allocating memory */ |
1810 | #define PF_NPROC_EXCEEDED 0x00001000 /* set_user noticed that RLIMIT_NPROC was exceeded */ | 1811 | #define PF_NPROC_EXCEEDED 0x00001000 /* set_user noticed that RLIMIT_NPROC was exceeded */ |
1811 | #define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */ | 1812 | #define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */ |
1813 | #define PF_USED_ASYNC 0x00004000 /* used async_schedule*(), used by module init */ | ||
1812 | #define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ | 1814 | #define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ |
1813 | #define PF_FROZEN 0x00010000 /* frozen for system suspend */ | 1815 | #define PF_FROZEN 0x00010000 /* frozen for system suspend */ |
1814 | #define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */ | 1816 | #define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */ |
@@ -2352,9 +2354,7 @@ extern int do_execve(const char *, | |||
2352 | const char __user * const __user *); | 2354 | const char __user * const __user *); |
2353 | extern long do_fork(unsigned long, unsigned long, unsigned long, int __user *, int __user *); | 2355 | extern long do_fork(unsigned long, unsigned long, unsigned long, int __user *, int __user *); |
2354 | struct task_struct *fork_idle(int); | 2356 | struct task_struct *fork_idle(int); |
2355 | #ifdef CONFIG_GENERIC_KERNEL_THREAD | ||
2356 | extern pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); | 2357 | extern pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); |
2357 | #endif | ||
2358 | 2358 | ||
2359 | extern void set_task_comm(struct task_struct *tsk, char *from); | 2359 | extern void set_task_comm(struct task_struct *tsk, char *from); |
2360 | extern char *get_task_comm(char *to, struct task_struct *tsk); | 2360 | extern char *get_task_comm(char *to, struct task_struct *tsk); |
@@ -2714,7 +2714,16 @@ static inline void thread_group_cputime_init(struct signal_struct *sig) | |||
2714 | extern void recalc_sigpending_and_wake(struct task_struct *t); | 2714 | extern void recalc_sigpending_and_wake(struct task_struct *t); |
2715 | extern void recalc_sigpending(void); | 2715 | extern void recalc_sigpending(void); |
2716 | 2716 | ||
2717 | extern void signal_wake_up(struct task_struct *t, int resume_stopped); | 2717 | extern void signal_wake_up_state(struct task_struct *t, unsigned int state); |
2718 | |||
2719 | static inline void signal_wake_up(struct task_struct *t, bool resume) | ||
2720 | { | ||
2721 | signal_wake_up_state(t, resume ? TASK_WAKEKILL : 0); | ||
2722 | } | ||
2723 | static inline void ptrace_signal_wake_up(struct task_struct *t, bool resume) | ||
2724 | { | ||
2725 | signal_wake_up_state(t, resume ? __TASK_TRACED : 0); | ||
2726 | } | ||
2718 | 2727 | ||
2719 | /* | 2728 | /* |
2720 | * Wrappers for p->thread_info->cpu access. No-op on UP. | 2729 | * Wrappers for p->thread_info->cpu access. No-op on UP. |
diff --git a/include/linux/security.h b/include/linux/security.h index 05e88bdcf7d9..0f6afc657f77 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -694,6 +694,12 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
694 | * userspace to load a kernel module with the given name. | 694 | * userspace to load a kernel module with the given name. |
695 | * @kmod_name name of the module requested by the kernel | 695 | * @kmod_name name of the module requested by the kernel |
696 | * Return 0 if successful. | 696 | * Return 0 if successful. |
697 | * @kernel_module_from_file: | ||
698 | * Load a kernel module from userspace. | ||
699 | * @file contains the file structure pointing to the file containing | ||
700 | * the kernel module to load. If the module is being loaded from a blob, | ||
701 | * this argument will be NULL. | ||
702 | * Return 0 if permission is granted. | ||
697 | * @task_fix_setuid: | 703 | * @task_fix_setuid: |
698 | * Update the module's state after setting one or more of the user | 704 | * Update the module's state after setting one or more of the user |
699 | * identity attributes of the current process. The @flags parameter | 705 | * identity attributes of the current process. The @flags parameter |
@@ -1508,6 +1514,7 @@ struct security_operations { | |||
1508 | int (*kernel_act_as)(struct cred *new, u32 secid); | 1514 | int (*kernel_act_as)(struct cred *new, u32 secid); |
1509 | int (*kernel_create_files_as)(struct cred *new, struct inode *inode); | 1515 | int (*kernel_create_files_as)(struct cred *new, struct inode *inode); |
1510 | int (*kernel_module_request)(char *kmod_name); | 1516 | int (*kernel_module_request)(char *kmod_name); |
1517 | int (*kernel_module_from_file)(struct file *file); | ||
1511 | int (*task_fix_setuid) (struct cred *new, const struct cred *old, | 1518 | int (*task_fix_setuid) (struct cred *new, const struct cred *old, |
1512 | int flags); | 1519 | int flags); |
1513 | int (*task_setpgid) (struct task_struct *p, pid_t pgid); | 1520 | int (*task_setpgid) (struct task_struct *p, pid_t pgid); |
@@ -1765,6 +1772,7 @@ void security_transfer_creds(struct cred *new, const struct cred *old); | |||
1765 | int security_kernel_act_as(struct cred *new, u32 secid); | 1772 | int security_kernel_act_as(struct cred *new, u32 secid); |
1766 | int security_kernel_create_files_as(struct cred *new, struct inode *inode); | 1773 | int security_kernel_create_files_as(struct cred *new, struct inode *inode); |
1767 | int security_kernel_module_request(char *kmod_name); | 1774 | int security_kernel_module_request(char *kmod_name); |
1775 | int security_kernel_module_from_file(struct file *file); | ||
1768 | int security_task_fix_setuid(struct cred *new, const struct cred *old, | 1776 | int security_task_fix_setuid(struct cred *new, const struct cred *old, |
1769 | int flags); | 1777 | int flags); |
1770 | int security_task_setpgid(struct task_struct *p, pid_t pgid); | 1778 | int security_task_setpgid(struct task_struct *p, pid_t pgid); |
@@ -2278,6 +2286,11 @@ static inline int security_kernel_module_request(char *kmod_name) | |||
2278 | return 0; | 2286 | return 0; |
2279 | } | 2287 | } |
2280 | 2288 | ||
2289 | static inline int security_kernel_module_from_file(struct file *file) | ||
2290 | { | ||
2291 | return 0; | ||
2292 | } | ||
2293 | |||
2281 | static inline int security_task_fix_setuid(struct cred *new, | 2294 | static inline int security_task_fix_setuid(struct cred *new, |
2282 | const struct cred *old, | 2295 | const struct cred *old, |
2283 | int flags) | 2296 | int flags) |
diff --git a/include/linux/signal.h b/include/linux/signal.h index e19a011b43b7..0a89ffc48466 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -385,4 +385,7 @@ int unhandled_signal(struct task_struct *tsk, int sig); | |||
385 | 385 | ||
386 | void signals_init(void); | 386 | void signals_init(void); |
387 | 387 | ||
388 | int restore_altstack(const stack_t __user *); | ||
389 | int __save_altstack(stack_t __user *, unsigned long); | ||
390 | |||
388 | #endif /* _LINUX_SIGNAL_H */ | 391 | #endif /* _LINUX_SIGNAL_H */ |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 83d1a1454b7e..5d168d7e0a28 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -11,6 +11,8 @@ | |||
11 | 11 | ||
12 | #include <linux/gfp.h> | 12 | #include <linux/gfp.h> |
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/workqueue.h> | ||
15 | |||
14 | 16 | ||
15 | /* | 17 | /* |
16 | * Flags to pass to kmem_cache_create(). | 18 | * Flags to pass to kmem_cache_create(). |
@@ -116,6 +118,7 @@ struct kmem_cache { | |||
116 | }; | 118 | }; |
117 | #endif | 119 | #endif |
118 | 120 | ||
121 | struct mem_cgroup; | ||
119 | /* | 122 | /* |
120 | * struct kmem_cache related prototypes | 123 | * struct kmem_cache related prototypes |
121 | */ | 124 | */ |
@@ -125,10 +128,12 @@ int slab_is_available(void); | |||
125 | struct kmem_cache *kmem_cache_create(const char *, size_t, size_t, | 128 | struct kmem_cache *kmem_cache_create(const char *, size_t, size_t, |
126 | unsigned long, | 129 | unsigned long, |
127 | void (*)(void *)); | 130 | void (*)(void *)); |
131 | struct kmem_cache * | ||
132 | kmem_cache_create_memcg(struct mem_cgroup *, const char *, size_t, size_t, | ||
133 | unsigned long, void (*)(void *), struct kmem_cache *); | ||
128 | void kmem_cache_destroy(struct kmem_cache *); | 134 | void kmem_cache_destroy(struct kmem_cache *); |
129 | int kmem_cache_shrink(struct kmem_cache *); | 135 | int kmem_cache_shrink(struct kmem_cache *); |
130 | void kmem_cache_free(struct kmem_cache *, void *); | 136 | void kmem_cache_free(struct kmem_cache *, void *); |
131 | unsigned int kmem_cache_size(struct kmem_cache *); | ||
132 | 137 | ||
133 | /* | 138 | /* |
134 | * Please use this macro to create slab caches. Simply specify the | 139 | * Please use this macro to create slab caches. Simply specify the |
@@ -176,6 +181,48 @@ unsigned int kmem_cache_size(struct kmem_cache *); | |||
176 | #ifndef ARCH_SLAB_MINALIGN | 181 | #ifndef ARCH_SLAB_MINALIGN |
177 | #define ARCH_SLAB_MINALIGN __alignof__(unsigned long long) | 182 | #define ARCH_SLAB_MINALIGN __alignof__(unsigned long long) |
178 | #endif | 183 | #endif |
184 | /* | ||
185 | * This is the main placeholder for memcg-related information in kmem caches. | ||
186 | * struct kmem_cache will hold a pointer to it, so the memory cost while | ||
187 | * disabled is 1 pointer. The runtime cost while enabled, gets bigger than it | ||
188 | * would otherwise be if that would be bundled in kmem_cache: we'll need an | ||
189 | * extra pointer chase. But the trade off clearly lays in favor of not | ||
190 | * penalizing non-users. | ||
191 | * | ||
192 | * Both the root cache and the child caches will have it. For the root cache, | ||
193 | * this will hold a dynamically allocated array large enough to hold | ||
194 | * information about the currently limited memcgs in the system. | ||
195 | * | ||
196 | * Child caches will hold extra metadata needed for its operation. Fields are: | ||
197 | * | ||
198 | * @memcg: pointer to the memcg this cache belongs to | ||
199 | * @list: list_head for the list of all caches in this memcg | ||
200 | * @root_cache: pointer to the global, root cache, this cache was derived from | ||
201 | * @dead: set to true after the memcg dies; the cache may still be around. | ||
202 | * @nr_pages: number of pages that belongs to this cache. | ||
203 | * @destroy: worker to be called whenever we are ready, or believe we may be | ||
204 | * ready, to destroy this cache. | ||
205 | */ | ||
206 | struct memcg_cache_params { | ||
207 | bool is_root_cache; | ||
208 | union { | ||
209 | struct kmem_cache *memcg_caches[0]; | ||
210 | struct { | ||
211 | struct mem_cgroup *memcg; | ||
212 | struct list_head list; | ||
213 | struct kmem_cache *root_cache; | ||
214 | bool dead; | ||
215 | atomic_t nr_pages; | ||
216 | struct work_struct destroy; | ||
217 | }; | ||
218 | }; | ||
219 | }; | ||
220 | |||
221 | int memcg_update_all_caches(int num_memcgs); | ||
222 | |||
223 | struct seq_file; | ||
224 | int cache_show(struct kmem_cache *s, struct seq_file *m); | ||
225 | void print_slabinfo_header(struct seq_file *m); | ||
179 | 226 | ||
180 | /* | 227 | /* |
181 | * Common kmalloc functions provided by all allocators | 228 | * Common kmalloc functions provided by all allocators |
@@ -388,6 +435,14 @@ static inline void *kzalloc_node(size_t size, gfp_t flags, int node) | |||
388 | return kmalloc_node(size, flags | __GFP_ZERO, node); | 435 | return kmalloc_node(size, flags | __GFP_ZERO, node); |
389 | } | 436 | } |
390 | 437 | ||
438 | /* | ||
439 | * Determine the size of a slab object | ||
440 | */ | ||
441 | static inline unsigned int kmem_cache_size(struct kmem_cache *s) | ||
442 | { | ||
443 | return s->object_size; | ||
444 | } | ||
445 | |||
391 | void __init kmem_cache_init_late(void); | 446 | void __init kmem_cache_init_late(void); |
392 | 447 | ||
393 | #endif /* _LINUX_SLAB_H */ | 448 | #endif /* _LINUX_SLAB_H */ |
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h index cc290f0bdb34..8bb6e0eaf3c6 100644 --- a/include/linux/slab_def.h +++ b/include/linux/slab_def.h | |||
@@ -81,6 +81,9 @@ struct kmem_cache { | |||
81 | */ | 81 | */ |
82 | int obj_offset; | 82 | int obj_offset; |
83 | #endif /* CONFIG_DEBUG_SLAB */ | 83 | #endif /* CONFIG_DEBUG_SLAB */ |
84 | #ifdef CONFIG_MEMCG_KMEM | ||
85 | struct memcg_cache_params *memcg_params; | ||
86 | #endif | ||
84 | 87 | ||
85 | /* 6) per-cpu/per-node data, touched during every alloc/free */ | 88 | /* 6) per-cpu/per-node data, touched during every alloc/free */ |
86 | /* | 89 | /* |
@@ -89,9 +92,13 @@ struct kmem_cache { | |||
89 | * (see kmem_cache_init()) | 92 | * (see kmem_cache_init()) |
90 | * We still use [NR_CPUS] and not [1] or [0] because cache_cache | 93 | * We still use [NR_CPUS] and not [1] or [0] because cache_cache |
91 | * is statically defined, so we reserve the max number of cpus. | 94 | * is statically defined, so we reserve the max number of cpus. |
95 | * | ||
96 | * We also need to guarantee that the list is able to accomodate a | ||
97 | * pointer for each node since "nodelists" uses the remainder of | ||
98 | * available pointers. | ||
92 | */ | 99 | */ |
93 | struct kmem_list3 **nodelists; | 100 | struct kmem_list3 **nodelists; |
94 | struct array_cache *array[NR_CPUS]; | 101 | struct array_cache *array[NR_CPUS + MAX_NUMNODES]; |
95 | /* | 102 | /* |
96 | * Do not add fields after array[] | 103 | * Do not add fields after array[] |
97 | */ | 104 | */ |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index df448adb7283..9db4825cd393 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -101,6 +101,10 @@ struct kmem_cache { | |||
101 | #ifdef CONFIG_SYSFS | 101 | #ifdef CONFIG_SYSFS |
102 | struct kobject kobj; /* For sysfs */ | 102 | struct kobject kobj; /* For sysfs */ |
103 | #endif | 103 | #endif |
104 | #ifdef CONFIG_MEMCG_KMEM | ||
105 | struct memcg_cache_params *memcg_params; | ||
106 | int max_attr_size; /* for propagation, maximum size of a stored attr */ | ||
107 | #endif | ||
104 | 108 | ||
105 | #ifdef CONFIG_NUMA | 109 | #ifdef CONFIG_NUMA |
106 | /* | 110 | /* |
@@ -222,7 +226,10 @@ void *__kmalloc(size_t size, gfp_t flags); | |||
222 | static __always_inline void * | 226 | static __always_inline void * |
223 | kmalloc_order(size_t size, gfp_t flags, unsigned int order) | 227 | kmalloc_order(size_t size, gfp_t flags, unsigned int order) |
224 | { | 228 | { |
225 | void *ret = (void *) __get_free_pages(flags | __GFP_COMP, order); | 229 | void *ret; |
230 | |||
231 | flags |= (__GFP_COMP | __GFP_KMEMCG); | ||
232 | ret = (void *) __get_free_pages(flags, order); | ||
226 | kmemleak_alloc(ret, size, 1, flags); | 233 | kmemleak_alloc(ret, size, 1, flags); |
227 | return ret; | 234 | return ret; |
228 | } | 235 | } |
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index f792794f6634..5dc9ee4d616e 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
@@ -217,6 +217,8 @@ extern int qword_get(char **bpp, char *dest, int bufsize); | |||
217 | static inline int get_int(char **bpp, int *anint) | 217 | static inline int get_int(char **bpp, int *anint) |
218 | { | 218 | { |
219 | char buf[50]; | 219 | char buf[50]; |
220 | char *ep; | ||
221 | int rv; | ||
220 | int len = qword_get(bpp, buf, sizeof(buf)); | 222 | int len = qword_get(bpp, buf, sizeof(buf)); |
221 | 223 | ||
222 | if (len < 0) | 224 | if (len < 0) |
@@ -224,9 +226,11 @@ static inline int get_int(char **bpp, int *anint) | |||
224 | if (len == 0) | 226 | if (len == 0) |
225 | return -ENOENT; | 227 | return -ENOENT; |
226 | 228 | ||
227 | if (kstrtoint(buf, 0, anint)) | 229 | rv = simple_strtol(buf, &ep, 0); |
230 | if (*ep) | ||
228 | return -EINVAL; | 231 | return -EINVAL; |
229 | 232 | ||
233 | *anint = rv; | ||
230 | return 0; | 234 | return 0; |
231 | } | 235 | } |
232 | 236 | ||
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index dc0c3cc3ada3..b64f8eb0b973 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
@@ -192,7 +192,6 @@ struct rpc_wait_queue { | |||
192 | pid_t owner; /* process id of last task serviced */ | 192 | pid_t owner; /* process id of last task serviced */ |
193 | unsigned char maxpriority; /* maximum priority (0 if queue is not a priority queue) */ | 193 | unsigned char maxpriority; /* maximum priority (0 if queue is not a priority queue) */ |
194 | unsigned char priority; /* current priority */ | 194 | unsigned char priority; /* current priority */ |
195 | unsigned char count; /* # task groups remaining serviced so far */ | ||
196 | unsigned char nr; /* # tasks remaining for cookie */ | 195 | unsigned char nr; /* # tasks remaining for cookie */ |
197 | unsigned short qlen; /* total # tasks waiting in queue */ | 196 | unsigned short qlen; /* total # tasks waiting in queue */ |
198 | struct rpc_timer timer_list; | 197 | struct rpc_timer timer_list; |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index d83db800fe02..676ddf53b3ee 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -243,6 +243,7 @@ struct svc_rqst { | |||
243 | struct page * rq_pages[RPCSVC_MAXPAGES]; | 243 | struct page * rq_pages[RPCSVC_MAXPAGES]; |
244 | struct page * *rq_respages; /* points into rq_pages */ | 244 | struct page * *rq_respages; /* points into rq_pages */ |
245 | int rq_resused; /* number of pages used for result */ | 245 | int rq_resused; /* number of pages used for result */ |
246 | struct page * *rq_next_page; /* next reply page to use */ | ||
246 | 247 | ||
247 | struct kvec rq_vec[RPCSVC_MAXPAGES]; /* generally useful.. */ | 248 | struct kvec rq_vec[RPCSVC_MAXPAGES]; /* generally useful.. */ |
248 | 249 | ||
@@ -338,9 +339,8 @@ xdr_ressize_check(struct svc_rqst *rqstp, __be32 *p) | |||
338 | 339 | ||
339 | static inline void svc_free_res_pages(struct svc_rqst *rqstp) | 340 | static inline void svc_free_res_pages(struct svc_rqst *rqstp) |
340 | { | 341 | { |
341 | while (rqstp->rq_resused) { | 342 | while (rqstp->rq_next_page != rqstp->rq_respages) { |
342 | struct page **pp = (rqstp->rq_respages + | 343 | struct page **pp = --rqstp->rq_next_page; |
343 | --rqstp->rq_resused); | ||
344 | if (*pp) { | 344 | if (*pp) { |
345 | put_page(*pp); | 345 | put_page(*pp); |
346 | *pp = NULL; | 346 | *pp = NULL; |
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index 92ad02f0dcc0..62fd1b756e99 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
@@ -26,11 +26,28 @@ struct svc_sock { | |||
26 | void (*sk_owspace)(struct sock *); | 26 | void (*sk_owspace)(struct sock *); |
27 | 27 | ||
28 | /* private TCP part */ | 28 | /* private TCP part */ |
29 | u32 sk_reclen; /* length of record */ | 29 | /* On-the-wire fragment header: */ |
30 | u32 sk_tcplen; /* current read length */ | 30 | __be32 sk_reclen; |
31 | /* As we receive a record, this includes the length received so | ||
32 | * far (including the fragment header): */ | ||
33 | u32 sk_tcplen; | ||
34 | /* Total length of the data (not including fragment headers) | ||
35 | * received so far in the fragments making up this rpc: */ | ||
36 | u32 sk_datalen; | ||
37 | |||
31 | struct page * sk_pages[RPCSVC_MAXPAGES]; /* received data */ | 38 | struct page * sk_pages[RPCSVC_MAXPAGES]; /* received data */ |
32 | }; | 39 | }; |
33 | 40 | ||
41 | static inline u32 svc_sock_reclen(struct svc_sock *svsk) | ||
42 | { | ||
43 | return ntohl(svsk->sk_reclen) & RPC_FRAGMENT_SIZE_MASK; | ||
44 | } | ||
45 | |||
46 | static inline u32 svc_sock_final_rec(struct svc_sock *svsk) | ||
47 | { | ||
48 | return ntohl(svsk->sk_reclen) & RPC_LAST_STREAM_FRAGMENT; | ||
49 | } | ||
50 | |||
34 | /* | 51 | /* |
35 | * Function prototypes. | 52 | * Function prototypes. |
36 | */ | 53 | */ |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 36c3b07c5119..45e2db270255 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -63,6 +63,7 @@ struct getcpu_cache; | |||
63 | struct old_linux_dirent; | 63 | struct old_linux_dirent; |
64 | struct perf_event_attr; | 64 | struct perf_event_attr; |
65 | struct file_handle; | 65 | struct file_handle; |
66 | struct sigaltstack; | ||
66 | 67 | ||
67 | #include <linux/types.h> | 68 | #include <linux/types.h> |
68 | #include <linux/aio_abi.h> | 69 | #include <linux/aio_abi.h> |
@@ -299,6 +300,11 @@ asmlinkage long sys_personality(unsigned int personality); | |||
299 | asmlinkage long sys_sigpending(old_sigset_t __user *set); | 300 | asmlinkage long sys_sigpending(old_sigset_t __user *set); |
300 | asmlinkage long sys_sigprocmask(int how, old_sigset_t __user *set, | 301 | asmlinkage long sys_sigprocmask(int how, old_sigset_t __user *set, |
301 | old_sigset_t __user *oset); | 302 | old_sigset_t __user *oset); |
303 | #ifdef CONFIG_GENERIC_SIGALTSTACK | ||
304 | asmlinkage long sys_sigaltstack(const struct sigaltstack __user *uss, | ||
305 | struct sigaltstack __user *uoss); | ||
306 | #endif | ||
307 | |||
302 | asmlinkage long sys_getitimer(int which, struct itimerval __user *value); | 308 | asmlinkage long sys_getitimer(int which, struct itimerval __user *value); |
303 | asmlinkage long sys_setitimer(int which, | 309 | asmlinkage long sys_setitimer(int which, |
304 | struct itimerval __user *value, | 310 | struct itimerval __user *value, |
@@ -827,15 +833,6 @@ asmlinkage long sys_fanotify_mark(int fanotify_fd, unsigned int flags, | |||
827 | const char __user *pathname); | 833 | const char __user *pathname); |
828 | asmlinkage long sys_syncfs(int fd); | 834 | asmlinkage long sys_syncfs(int fd); |
829 | 835 | ||
830 | #ifndef CONFIG_GENERIC_KERNEL_EXECVE | ||
831 | int kernel_execve(const char *filename, const char *const argv[], const char *const envp[]); | ||
832 | #else | ||
833 | #define kernel_execve(filename, argv, envp) \ | ||
834 | do_execve(filename, \ | ||
835 | (const char __user *const __user *)argv, \ | ||
836 | (const char __user *const __user *)envp) | ||
837 | #endif | ||
838 | |||
839 | asmlinkage long sys_fork(void); | 836 | asmlinkage long sys_fork(void); |
840 | asmlinkage long sys_vfork(void); | 837 | asmlinkage long sys_vfork(void); |
841 | #ifdef CONFIG_CLONE_BACKWARDS | 838 | #ifdef CONFIG_CLONE_BACKWARDS |
@@ -880,4 +877,5 @@ asmlinkage long sys_process_vm_writev(pid_t pid, | |||
880 | 877 | ||
881 | asmlinkage long sys_kcmp(pid_t pid1, pid_t pid2, int type, | 878 | asmlinkage long sys_kcmp(pid_t pid1, pid_t pid2, int type, |
882 | unsigned long idx1, unsigned long idx2); | 879 | unsigned long idx1, unsigned long idx2); |
880 | asmlinkage long sys_finit_module(int fd, const char __user *uargs, int flags); | ||
883 | #endif | 881 | #endif |
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index ccc1899bd62e..e7e04736802f 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h | |||
@@ -61,6 +61,8 @@ extern long do_no_restart_syscall(struct restart_block *parm); | |||
61 | # define THREADINFO_GFP (GFP_KERNEL | __GFP_NOTRACK) | 61 | # define THREADINFO_GFP (GFP_KERNEL | __GFP_NOTRACK) |
62 | #endif | 62 | #endif |
63 | 63 | ||
64 | #define THREADINFO_GFP_ACCOUNTED (THREADINFO_GFP | __GFP_KMEMCG) | ||
65 | |||
64 | /* | 66 | /* |
65 | * flag set/clear/test wrappers | 67 | * flag set/clear/test wrappers |
66 | * - pass TIF_xxxx constants to these functions | 68 | * - pass TIF_xxxx constants to these functions |
diff --git a/include/linux/usb/Kbuild b/include/linux/usb/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/linux/usb/Kbuild +++ /dev/null | |||
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 9bbeabf66c54..bd45eb7bedc8 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
@@ -69,6 +69,7 @@ struct usbnet { | |||
69 | # define EVENT_DEV_ASLEEP 6 | 69 | # define EVENT_DEV_ASLEEP 6 |
70 | # define EVENT_DEV_OPEN 7 | 70 | # define EVENT_DEV_OPEN 7 |
71 | # define EVENT_DEVICE_REPORT_IDLE 8 | 71 | # define EVENT_DEVICE_REPORT_IDLE 8 |
72 | # define EVENT_NO_RUNTIME_PM 9 | ||
72 | }; | 73 | }; |
73 | 74 | ||
74 | static inline struct usb_driver *driver_of(struct usb_interface *intf) | 75 | static inline struct usb_driver *driver_of(struct usb_interface *intf) |
@@ -240,4 +241,6 @@ extern void usbnet_set_msglevel(struct net_device *, u32); | |||
240 | extern void usbnet_get_drvinfo(struct net_device *, struct ethtool_drvinfo *); | 241 | extern void usbnet_get_drvinfo(struct net_device *, struct ethtool_drvinfo *); |
241 | extern int usbnet_nway_reset(struct net_device *net); | 242 | extern int usbnet_nway_reset(struct net_device *net); |
242 | 243 | ||
244 | extern int usbnet_manage_power(struct usbnet *, int); | ||
245 | |||
243 | #endif /* __LINUX_USB_USBNET_H */ | 246 | #endif /* __LINUX_USB_USBNET_H */ |
diff --git a/include/linux/virtio.h b/include/linux/virtio.h index 533b1157f22e..cf8adb1f5b2c 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h | |||
@@ -16,12 +16,20 @@ | |||
16 | * @name: the name of this virtqueue (mainly for debugging) | 16 | * @name: the name of this virtqueue (mainly for debugging) |
17 | * @vdev: the virtio device this queue was created for. | 17 | * @vdev: the virtio device this queue was created for. |
18 | * @priv: a pointer for the virtqueue implementation to use. | 18 | * @priv: a pointer for the virtqueue implementation to use. |
19 | * @index: the zero-based ordinal number for this queue. | ||
20 | * @num_free: number of elements we expect to be able to fit. | ||
21 | * | ||
22 | * A note on @num_free: with indirect buffers, each buffer needs one | ||
23 | * element in the queue, otherwise a buffer will need one element per | ||
24 | * sg element. | ||
19 | */ | 25 | */ |
20 | struct virtqueue { | 26 | struct virtqueue { |
21 | struct list_head list; | 27 | struct list_head list; |
22 | void (*callback)(struct virtqueue *vq); | 28 | void (*callback)(struct virtqueue *vq); |
23 | const char *name; | 29 | const char *name; |
24 | struct virtio_device *vdev; | 30 | struct virtio_device *vdev; |
31 | unsigned int index; | ||
32 | unsigned int num_free; | ||
25 | void *priv; | 33 | void *priv; |
26 | }; | 34 | }; |
27 | 35 | ||
@@ -50,7 +58,11 @@ void *virtqueue_detach_unused_buf(struct virtqueue *vq); | |||
50 | 58 | ||
51 | unsigned int virtqueue_get_vring_size(struct virtqueue *vq); | 59 | unsigned int virtqueue_get_vring_size(struct virtqueue *vq); |
52 | 60 | ||
53 | int virtqueue_get_queue_index(struct virtqueue *vq); | 61 | /* FIXME: Obsolete accessor, but required for virtio_net merge. */ |
62 | static inline unsigned int virtqueue_get_queue_index(struct virtqueue *vq) | ||
63 | { | ||
64 | return vq->index; | ||
65 | } | ||
54 | 66 | ||
55 | /** | 67 | /** |
56 | * virtio_device - representation of a device using virtio | 68 | * virtio_device - representation of a device using virtio |
@@ -73,7 +85,11 @@ struct virtio_device { | |||
73 | void *priv; | 85 | void *priv; |
74 | }; | 86 | }; |
75 | 87 | ||
76 | #define dev_to_virtio(dev) container_of(dev, struct virtio_device, dev) | 88 | static inline struct virtio_device *dev_to_virtio(struct device *_dev) |
89 | { | ||
90 | return container_of(_dev, struct virtio_device, dev); | ||
91 | } | ||
92 | |||
77 | int register_virtio_device(struct virtio_device *dev); | 93 | int register_virtio_device(struct virtio_device *dev); |
78 | void unregister_virtio_device(struct virtio_device *dev); | 94 | void unregister_virtio_device(struct virtio_device *dev); |
79 | 95 | ||
@@ -103,6 +119,11 @@ struct virtio_driver { | |||
103 | #endif | 119 | #endif |
104 | }; | 120 | }; |
105 | 121 | ||
122 | static inline struct virtio_driver *drv_to_virtio(struct device_driver *drv) | ||
123 | { | ||
124 | return container_of(drv, struct virtio_driver, driver); | ||
125 | } | ||
126 | |||
106 | int register_virtio_driver(struct virtio_driver *drv); | 127 | int register_virtio_driver(struct virtio_driver *drv); |
107 | void unregister_virtio_driver(struct virtio_driver *drv); | 128 | void unregister_virtio_driver(struct virtio_driver *drv); |
108 | #endif /* _LINUX_VIRTIO_H */ | 129 | #endif /* _LINUX_VIRTIO_H */ |
diff --git a/include/linux/virtio_scsi.h b/include/linux/virtio_scsi.h index d6b4440387b7..4195b97a3def 100644 --- a/include/linux/virtio_scsi.h +++ b/include/linux/virtio_scsi.h | |||
@@ -1,7 +1,31 @@ | |||
1 | /* | ||
2 | * This header is BSD licensed so anyone can use the definitions to implement | ||
3 | * compatible drivers/servers. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions | ||
7 | * are met: | ||
8 | * 1. Redistributions of source code must retain the above copyright | ||
9 | * notice, this list of conditions and the following disclaimer. | ||
10 | * 2. Redistributions in binary form must reproduce the above copyright | ||
11 | * notice, this list of conditions and the following disclaimer in the | ||
12 | * documentation and/or other materials provided with the distribution. | ||
13 | * | ||
14 | * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND | ||
15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
17 | * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE | ||
18 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
19 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
21 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
22 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
23 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
24 | * SUCH DAMAGE. | ||
25 | */ | ||
26 | |||
1 | #ifndef _LINUX_VIRTIO_SCSI_H | 27 | #ifndef _LINUX_VIRTIO_SCSI_H |
2 | #define _LINUX_VIRTIO_SCSI_H | 28 | #define _LINUX_VIRTIO_SCSI_H |
3 | /* This header is BSD licensed so anyone can use the definitions to implement | ||
4 | * compatible drivers/servers. */ | ||
5 | 29 | ||
6 | #define VIRTIO_SCSI_CDB_SIZE 32 | 30 | #define VIRTIO_SCSI_CDB_SIZE 32 |
7 | #define VIRTIO_SCSI_SENSE_SIZE 96 | 31 | #define VIRTIO_SCSI_SENSE_SIZE 96 |
diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h index 87490ac4bd87..3a9df2f43be6 100644 --- a/include/linux/watchdog.h +++ b/include/linux/watchdog.h | |||
@@ -129,7 +129,7 @@ static inline void *watchdog_get_drvdata(struct watchdog_device *wdd) | |||
129 | return wdd->driver_data; | 129 | return wdd->driver_data; |
130 | } | 130 | } |
131 | 131 | ||
132 | /* drivers/watchdog/core/watchdog_core.c */ | 132 | /* drivers/watchdog/watchdog_core.c */ |
133 | extern int watchdog_register_device(struct watchdog_device *); | 133 | extern int watchdog_register_device(struct watchdog_device *); |
134 | extern void watchdog_unregister_device(struct watchdog_device *); | 134 | extern void watchdog_unregister_device(struct watchdog_device *); |
135 | 135 | ||
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h index ba1d3615acbb..183292722f6e 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h | |||
@@ -318,6 +318,7 @@ extern void inet_csk_reqsk_queue_prune(struct sock *parent, | |||
318 | const unsigned long max_rto); | 318 | const unsigned long max_rto); |
319 | 319 | ||
320 | extern void inet_csk_destroy_sock(struct sock *sk); | 320 | extern void inet_csk_destroy_sock(struct sock *sk); |
321 | extern void inet_csk_prepare_forced_close(struct sock *sk); | ||
321 | 322 | ||
322 | /* | 323 | /* |
323 | * LISTEN is a special case for poll.. | 324 | * LISTEN is a special case for poll.. |
diff --git a/include/net/ndisc.h b/include/net/ndisc.h index 7af1ea893038..23b3a7c58783 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h | |||
@@ -78,6 +78,13 @@ struct ra_msg { | |||
78 | __be32 retrans_timer; | 78 | __be32 retrans_timer; |
79 | }; | 79 | }; |
80 | 80 | ||
81 | struct rd_msg { | ||
82 | struct icmp6hdr icmph; | ||
83 | struct in6_addr target; | ||
84 | struct in6_addr dest; | ||
85 | __u8 opt[0]; | ||
86 | }; | ||
87 | |||
81 | struct nd_opt_hdr { | 88 | struct nd_opt_hdr { |
82 | __u8 nd_opt_type; | 89 | __u8 nd_opt_type; |
83 | __u8 nd_opt_len; | 90 | __u8 nd_opt_len; |
diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h index a1d83cc8bf85..923cb20051ed 100644 --- a/include/net/netns/conntrack.h +++ b/include/net/netns/conntrack.h | |||
@@ -71,6 +71,7 @@ struct netns_ct { | |||
71 | struct hlist_head *expect_hash; | 71 | struct hlist_head *expect_hash; |
72 | struct hlist_nulls_head unconfirmed; | 72 | struct hlist_nulls_head unconfirmed; |
73 | struct hlist_nulls_head dying; | 73 | struct hlist_nulls_head dying; |
74 | struct hlist_nulls_head tmpl; | ||
74 | struct ip_conntrack_stat __percpu *stat; | 75 | struct ip_conntrack_stat __percpu *stat; |
75 | struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb; | 76 | struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb; |
76 | struct nf_exp_event_notifier __rcu *nf_expect_event_cb; | 77 | struct nf_exp_event_notifier __rcu *nf_expect_event_cb; |
diff --git a/include/net/netns/x_tables.h b/include/net/netns/x_tables.h index 591db7d657a3..c24060ee411e 100644 --- a/include/net/netns/x_tables.h +++ b/include/net/netns/x_tables.h | |||
@@ -8,6 +8,7 @@ struct ebt_table; | |||
8 | 8 | ||
9 | struct netns_xt { | 9 | struct netns_xt { |
10 | struct list_head tables[NFPROTO_NUMPROTO]; | 10 | struct list_head tables[NFPROTO_NUMPROTO]; |
11 | bool notrack_deprecated_warning; | ||
11 | #if defined(CONFIG_BRIDGE_NF_EBTABLES) || \ | 12 | #if defined(CONFIG_BRIDGE_NF_EBTABLES) || \ |
12 | defined(CONFIG_BRIDGE_NF_EBTABLES_MODULE) | 13 | defined(CONFIG_BRIDGE_NF_EBTABLES_MODULE) |
13 | struct ebt_table *broute_table; | 14 | struct ebt_table *broute_table; |
diff --git a/include/net/sock.h b/include/net/sock.h index 93a6745bfdb2..182ca99405ad 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -367,7 +367,7 @@ struct sock { | |||
367 | unsigned short sk_ack_backlog; | 367 | unsigned short sk_ack_backlog; |
368 | unsigned short sk_max_ack_backlog; | 368 | unsigned short sk_max_ack_backlog; |
369 | __u32 sk_priority; | 369 | __u32 sk_priority; |
370 | #ifdef CONFIG_CGROUPS | 370 | #if IS_ENABLED(CONFIG_NETPRIO_CGROUP) |
371 | __u32 sk_cgrp_prioidx; | 371 | __u32 sk_cgrp_prioidx; |
372 | #endif | 372 | #endif |
373 | struct pid *sk_peer_pid; | 373 | struct pid *sk_peer_pid; |
diff --git a/include/rdma/Kbuild b/include/rdma/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/rdma/Kbuild +++ /dev/null | |||
diff --git a/include/sound/Kbuild b/include/sound/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/sound/Kbuild +++ /dev/null | |||
diff --git a/include/sound/cs4271.h b/include/sound/cs4271.h index 6d9e15ed1dcf..dd8c48d14ed9 100644 --- a/include/sound/cs4271.h +++ b/include/sound/cs4271.h | |||
@@ -19,7 +19,7 @@ | |||
19 | 19 | ||
20 | struct cs4271_platform_data { | 20 | struct cs4271_platform_data { |
21 | int gpio_nreset; /* GPIO driving Reset pin, if any */ | 21 | int gpio_nreset; /* GPIO driving Reset pin, if any */ |
22 | int amutec_eq_bmutec:1; /* flag to enable AMUTEC=BMUTEC */ | 22 | bool amutec_eq_bmutec; /* flag to enable AMUTEC=BMUTEC */ |
23 | }; | 23 | }; |
24 | 24 | ||
25 | #endif /* __CS4271_H */ | 25 | #endif /* __CS4271_H */ |
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 628db7bca4fd..3953cea0ecfb 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h | |||
@@ -242,7 +242,6 @@ struct snd_soc_dai { | |||
242 | unsigned int symmetric_rates:1; | 242 | unsigned int symmetric_rates:1; |
243 | struct snd_pcm_runtime *runtime; | 243 | struct snd_pcm_runtime *runtime; |
244 | unsigned int active; | 244 | unsigned int active; |
245 | unsigned char pop_wait:1; | ||
246 | unsigned char probed:1; | 245 | unsigned char probed:1; |
247 | 246 | ||
248 | struct snd_soc_dapm_widget *playback_widget; | 247 | struct snd_soc_dapm_widget *playback_widget; |
diff --git a/include/sound/soc.h b/include/sound/soc.h index 91244a096c19..bc56738cb109 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -58,8 +58,9 @@ | |||
58 | .info = snd_soc_info_volsw_range, .get = snd_soc_get_volsw_range, \ | 58 | .info = snd_soc_info_volsw_range, .get = snd_soc_get_volsw_range, \ |
59 | .put = snd_soc_put_volsw_range, \ | 59 | .put = snd_soc_put_volsw_range, \ |
60 | .private_value = (unsigned long)&(struct soc_mixer_control) \ | 60 | .private_value = (unsigned long)&(struct soc_mixer_control) \ |
61 | {.reg = xreg, .shift = xshift, .min = xmin,\ | 61 | {.reg = xreg, .rreg = xreg, .shift = xshift, \ |
62 | .max = xmax, .platform_max = xmax, .invert = xinvert} } | 62 | .rshift = xshift, .min = xmin, .max = xmax, \ |
63 | .platform_max = xmax, .invert = xinvert} } | ||
63 | #define SOC_SINGLE_TLV(xname, reg, shift, max, invert, tlv_array) \ | 64 | #define SOC_SINGLE_TLV(xname, reg, shift, max, invert, tlv_array) \ |
64 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 65 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ |
65 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ | 66 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ |
@@ -88,8 +89,9 @@ | |||
88 | .info = snd_soc_info_volsw_range, \ | 89 | .info = snd_soc_info_volsw_range, \ |
89 | .get = snd_soc_get_volsw_range, .put = snd_soc_put_volsw_range, \ | 90 | .get = snd_soc_get_volsw_range, .put = snd_soc_put_volsw_range, \ |
90 | .private_value = (unsigned long)&(struct soc_mixer_control) \ | 91 | .private_value = (unsigned long)&(struct soc_mixer_control) \ |
91 | {.reg = xreg, .shift = xshift, .min = xmin,\ | 92 | {.reg = xreg, .rreg = xreg, .shift = xshift, \ |
92 | .max = xmax, .platform_max = xmax, .invert = xinvert} } | 93 | .rshift = xshift, .min = xmin, .max = xmax, \ |
94 | .platform_max = xmax, .invert = xinvert} } | ||
93 | #define SOC_DOUBLE(xname, reg, shift_left, shift_right, max, invert) \ | 95 | #define SOC_DOUBLE(xname, reg, shift_left, shift_right, max, invert) \ |
94 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\ | 96 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\ |
95 | .info = snd_soc_info_volsw, .get = snd_soc_get_volsw, \ | 97 | .info = snd_soc_info_volsw, .get = snd_soc_get_volsw, \ |
@@ -1039,6 +1041,7 @@ struct snd_soc_pcm_runtime { | |||
1039 | struct snd_soc_dpcm_runtime dpcm[2]; | 1041 | struct snd_soc_dpcm_runtime dpcm[2]; |
1040 | 1042 | ||
1041 | long pmdown_time; | 1043 | long pmdown_time; |
1044 | unsigned char pop_wait:1; | ||
1042 | 1045 | ||
1043 | /* runtime devices */ | 1046 | /* runtime devices */ |
1044 | struct snd_pcm *pcm; | 1047 | struct snd_pcm *pcm; |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 7cae2360221e..663e34a5383f 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
@@ -174,6 +174,7 @@ typedef unsigned __bitwise__ sense_reason_t; | |||
174 | 174 | ||
175 | enum tcm_sense_reason_table { | 175 | enum tcm_sense_reason_table { |
176 | #define R(x) (__force sense_reason_t )(x) | 176 | #define R(x) (__force sense_reason_t )(x) |
177 | TCM_NO_SENSE = R(0x00), | ||
177 | TCM_NON_EXISTENT_LUN = R(0x01), | 178 | TCM_NON_EXISTENT_LUN = R(0x01), |
178 | TCM_UNSUPPORTED_SCSI_OPCODE = R(0x02), | 179 | TCM_UNSUPPORTED_SCSI_OPCODE = R(0x02), |
179 | TCM_INCORRECT_AMOUNT_OF_DATA = R(0x03), | 180 | TCM_INCORRECT_AMOUNT_OF_DATA = R(0x03), |
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h index 54fab041b22a..ea546a4e9609 100644 --- a/include/trace/events/btrfs.h +++ b/include/trace/events/btrfs.h | |||
@@ -45,7 +45,8 @@ struct extent_buffer; | |||
45 | 45 | ||
46 | #define show_root_type(obj) \ | 46 | #define show_root_type(obj) \ |
47 | obj, ((obj >= BTRFS_DATA_RELOC_TREE_OBJECTID) || \ | 47 | obj, ((obj >= BTRFS_DATA_RELOC_TREE_OBJECTID) || \ |
48 | (obj <= BTRFS_CSUM_TREE_OBJECTID )) ? __show_root_type(obj) : "-" | 48 | (obj >= BTRFS_ROOT_TREE_OBJECTID && \ |
49 | obj <= BTRFS_CSUM_TREE_OBJECTID)) ? __show_root_type(obj) : "-" | ||
49 | 50 | ||
50 | #define BTRFS_GROUP_FLAGS \ | 51 | #define BTRFS_GROUP_FLAGS \ |
51 | { BTRFS_BLOCK_GROUP_DATA, "DATA"}, \ | 52 | { BTRFS_BLOCK_GROUP_DATA, "DATA"}, \ |
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index f6372b011366..7e8c36bc7082 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -451,7 +451,7 @@ DEFINE_EVENT(ext4__page_op, ext4_releasepage, | |||
451 | TP_ARGS(page) | 451 | TP_ARGS(page) |
452 | ); | 452 | ); |
453 | 453 | ||
454 | TRACE_EVENT(ext4_invalidatepage, | 454 | DECLARE_EVENT_CLASS(ext4_invalidatepage_op, |
455 | TP_PROTO(struct page *page, unsigned long offset), | 455 | TP_PROTO(struct page *page, unsigned long offset), |
456 | 456 | ||
457 | TP_ARGS(page, offset), | 457 | TP_ARGS(page, offset), |
@@ -477,6 +477,18 @@ TRACE_EVENT(ext4_invalidatepage, | |||
477 | (unsigned long) __entry->index, __entry->offset) | 477 | (unsigned long) __entry->index, __entry->offset) |
478 | ); | 478 | ); |
479 | 479 | ||
480 | DEFINE_EVENT(ext4_invalidatepage_op, ext4_invalidatepage, | ||
481 | TP_PROTO(struct page *page, unsigned long offset), | ||
482 | |||
483 | TP_ARGS(page, offset) | ||
484 | ); | ||
485 | |||
486 | DEFINE_EVENT(ext4_invalidatepage_op, ext4_journalled_invalidatepage, | ||
487 | TP_PROTO(struct page *page, unsigned long offset), | ||
488 | |||
489 | TP_ARGS(page, offset) | ||
490 | ); | ||
491 | |||
480 | TRACE_EVENT(ext4_discard_blocks, | 492 | TRACE_EVENT(ext4_discard_blocks, |
481 | TP_PROTO(struct super_block *sb, unsigned long long blk, | 493 | TP_PROTO(struct super_block *sb, unsigned long long blk, |
482 | unsigned long long count), | 494 | unsigned long long count), |
diff --git a/include/trace/events/gfpflags.h b/include/trace/events/gfpflags.h index d6fd8e5b14b7..1eddbf1557f2 100644 --- a/include/trace/events/gfpflags.h +++ b/include/trace/events/gfpflags.h | |||
@@ -34,6 +34,7 @@ | |||
34 | {(unsigned long)__GFP_HARDWALL, "GFP_HARDWALL"}, \ | 34 | {(unsigned long)__GFP_HARDWALL, "GFP_HARDWALL"}, \ |
35 | {(unsigned long)__GFP_THISNODE, "GFP_THISNODE"}, \ | 35 | {(unsigned long)__GFP_THISNODE, "GFP_THISNODE"}, \ |
36 | {(unsigned long)__GFP_RECLAIMABLE, "GFP_RECLAIMABLE"}, \ | 36 | {(unsigned long)__GFP_RECLAIMABLE, "GFP_RECLAIMABLE"}, \ |
37 | {(unsigned long)__GFP_KMEMCG, "GFP_KMEMCG"}, \ | ||
37 | {(unsigned long)__GFP_MOVABLE, "GFP_MOVABLE"}, \ | 38 | {(unsigned long)__GFP_MOVABLE, "GFP_MOVABLE"}, \ |
38 | {(unsigned long)__GFP_NOTRACK, "GFP_NOTRACK"}, \ | 39 | {(unsigned long)__GFP_NOTRACK, "GFP_NOTRACK"}, \ |
39 | {(unsigned long)__GFP_NO_KSWAPD, "GFP_NO_KSWAPD"}, \ | 40 | {(unsigned long)__GFP_NO_KSWAPD, "GFP_NO_KSWAPD"}, \ |
diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h index 0a78028984de..6fae30fd16ab 100644 --- a/include/uapi/asm-generic/signal.h +++ b/include/uapi/asm-generic/signal.h | |||
@@ -80,12 +80,6 @@ | |||
80 | * SA_RESTORER 0x04000000 | 80 | * SA_RESTORER 0x04000000 |
81 | */ | 81 | */ |
82 | 82 | ||
83 | /* | ||
84 | * sigaltstack controls | ||
85 | */ | ||
86 | #define SS_ONSTACK 1 | ||
87 | #define SS_DISABLE 2 | ||
88 | |||
89 | #define MINSIGSTKSZ 2048 | 83 | #define MINSIGSTKSZ 2048 |
90 | #define SIGSTKSZ 8192 | 84 | #define SIGSTKSZ 8192 |
91 | 85 | ||
diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index 6e595ba545f4..2c531f478410 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h | |||
@@ -690,9 +690,11 @@ __SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \ | |||
690 | compat_sys_process_vm_writev) | 690 | compat_sys_process_vm_writev) |
691 | #define __NR_kcmp 272 | 691 | #define __NR_kcmp 272 |
692 | __SYSCALL(__NR_kcmp, sys_kcmp) | 692 | __SYSCALL(__NR_kcmp, sys_kcmp) |
693 | #define __NR_finit_module 273 | ||
694 | __SYSCALL(__NR_finit_module, sys_finit_module) | ||
693 | 695 | ||
694 | #undef __NR_syscalls | 696 | #undef __NR_syscalls |
695 | #define __NR_syscalls 273 | 697 | #define __NR_syscalls 274 |
696 | 698 | ||
697 | /* | 699 | /* |
698 | * All syscalls below here should go away really, | 700 | * All syscalls below here should go away really, |
diff --git a/include/uapi/drm/exynos_drm.h b/include/uapi/drm/exynos_drm.h index e7f52c334005..d5844122ff32 100644 --- a/include/uapi/drm/exynos_drm.h +++ b/include/uapi/drm/exynos_drm.h | |||
@@ -6,24 +6,10 @@ | |||
6 | * Joonyoung Shim <jy0922.shim@samsung.com> | 6 | * Joonyoung Shim <jy0922.shim@samsung.com> |
7 | * Seung-Woo Kim <sw0312.kim@samsung.com> | 7 | * Seung-Woo Kim <sw0312.kim@samsung.com> |
8 | * | 8 | * |
9 | * Permission is hereby granted, free of charge, to any person obtaining a | 9 | * This program is free software; you can redistribute it and/or modify it |
10 | * copy of this software and associated documentation files (the "Software"), | 10 | * under the terms of the GNU General Public License as published by the |
11 | * to deal in the Software without restriction, including without limitation | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
12 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 12 | * option) any later version. |
13 | * and/or sell copies of the Software, and to permit persons to whom the | ||
14 | * Software is furnished to do so, subject to the following conditions: | ||
15 | * | ||
16 | * The above copyright notice and this permission notice (including the next | ||
17 | * paragraph) shall be included in all copies or substantial portions of the | ||
18 | * Software. | ||
19 | * | ||
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
23 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
24 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
25 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
26 | * OTHER DEALINGS IN THE SOFTWARE. | ||
27 | */ | 13 | */ |
28 | 14 | ||
29 | #ifndef _UAPI_EXYNOS_DRM_H_ | 15 | #ifndef _UAPI_EXYNOS_DRM_H_ |
@@ -185,6 +171,8 @@ enum drm_exynos_flip { | |||
185 | EXYNOS_DRM_FLIP_NONE = (0 << 0), | 171 | EXYNOS_DRM_FLIP_NONE = (0 << 0), |
186 | EXYNOS_DRM_FLIP_VERTICAL = (1 << 0), | 172 | EXYNOS_DRM_FLIP_VERTICAL = (1 << 0), |
187 | EXYNOS_DRM_FLIP_HORIZONTAL = (1 << 1), | 173 | EXYNOS_DRM_FLIP_HORIZONTAL = (1 << 1), |
174 | EXYNOS_DRM_FLIP_BOTH = EXYNOS_DRM_FLIP_VERTICAL | | ||
175 | EXYNOS_DRM_FLIP_HORIZONTAL, | ||
188 | }; | 176 | }; |
189 | 177 | ||
190 | enum drm_exynos_degree { | 178 | enum drm_exynos_degree { |
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h index b746a3cf5fa9..c4d2e9c74002 100644 --- a/include/uapi/drm/i915_drm.h +++ b/include/uapi/drm/i915_drm.h | |||
@@ -307,6 +307,7 @@ typedef struct drm_i915_irq_wait { | |||
307 | #define I915_PARAM_HAS_PRIME_VMAP_FLUSH 21 | 307 | #define I915_PARAM_HAS_PRIME_VMAP_FLUSH 21 |
308 | #define I915_PARAM_RSVD_FOR_FUTURE_USE 22 | 308 | #define I915_PARAM_RSVD_FOR_FUTURE_USE 22 |
309 | #define I915_PARAM_HAS_SECURE_BATCHES 23 | 309 | #define I915_PARAM_HAS_SECURE_BATCHES 23 |
310 | #define I915_PARAM_HAS_PINNED_BATCHES 24 | ||
310 | 311 | ||
311 | typedef struct drm_i915_getparam { | 312 | typedef struct drm_i915_getparam { |
312 | int param; | 313 | int param; |
@@ -677,6 +678,15 @@ struct drm_i915_gem_execbuffer2 { | |||
677 | */ | 678 | */ |
678 | #define I915_EXEC_SECURE (1<<9) | 679 | #define I915_EXEC_SECURE (1<<9) |
679 | 680 | ||
681 | /** Inform the kernel that the batch is and will always be pinned. This | ||
682 | * negates the requirement for a workaround to be performed to avoid | ||
683 | * an incoherent CS (such as can be found on 830/845). If this flag is | ||
684 | * not passed, the kernel will endeavour to make sure the batch is | ||
685 | * coherent with the CS before execution. If this flag is passed, | ||
686 | * userspace assumes the responsibility for ensuring the same. | ||
687 | */ | ||
688 | #define I915_EXEC_IS_PINNED (1<<10) | ||
689 | |||
680 | #define I915_EXEC_CONTEXT_ID_MASK (0xffffffff) | 690 | #define I915_EXEC_CONTEXT_ID_MASK (0xffffffff) |
681 | #define i915_execbuffer2_set_context_id(eb2, context) \ | 691 | #define i915_execbuffer2_set_context_id(eb2, context) \ |
682 | (eb2).rsvd1 = context & I915_EXEC_CONTEXT_ID_MASK | 692 | (eb2).rsvd1 = context & I915_EXEC_CONTEXT_ID_MASK |
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h index 76352ac45f24..9f096f1c0907 100644 --- a/include/uapi/linux/audit.h +++ b/include/uapi/linux/audit.h | |||
@@ -26,7 +26,6 @@ | |||
26 | 26 | ||
27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | #include <linux/elf-em.h> | 28 | #include <linux/elf-em.h> |
29 | #include <linux/ptrace.h> | ||
30 | 29 | ||
31 | /* The netlink messages for the audit system is divided into blocks: | 30 | /* The netlink messages for the audit system is divided into blocks: |
32 | * 1000 - 1099 are for commanding the audit system | 31 | * 1000 - 1099 are for commanding the audit system |
@@ -106,6 +105,7 @@ | |||
106 | #define AUDIT_MMAP 1323 /* Record showing descriptor and flags in mmap */ | 105 | #define AUDIT_MMAP 1323 /* Record showing descriptor and flags in mmap */ |
107 | #define AUDIT_NETFILTER_PKT 1324 /* Packets traversing netfilter chains */ | 106 | #define AUDIT_NETFILTER_PKT 1324 /* Packets traversing netfilter chains */ |
108 | #define AUDIT_NETFILTER_CFG 1325 /* Netfilter chain modifications */ | 107 | #define AUDIT_NETFILTER_CFG 1325 /* Netfilter chain modifications */ |
108 | #define AUDIT_SECCOMP 1326 /* Secure Computing event */ | ||
109 | 109 | ||
110 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ | 110 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ |
111 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ | 111 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ |
diff --git a/include/uapi/linux/dm-ioctl.h b/include/uapi/linux/dm-ioctl.h index 91e3a360f611..539b179b349c 100644 --- a/include/uapi/linux/dm-ioctl.h +++ b/include/uapi/linux/dm-ioctl.h | |||
@@ -268,8 +268,8 @@ enum { | |||
268 | 268 | ||
269 | #define DM_VERSION_MAJOR 4 | 269 | #define DM_VERSION_MAJOR 4 |
270 | #define DM_VERSION_MINOR 23 | 270 | #define DM_VERSION_MINOR 23 |
271 | #define DM_VERSION_PATCHLEVEL 0 | 271 | #define DM_VERSION_PATCHLEVEL 1 |
272 | #define DM_VERSION_EXTRA "-ioctl (2012-07-25)" | 272 | #define DM_VERSION_EXTRA "-ioctl (2012-12-18)" |
273 | 273 | ||
274 | /* Status bits */ | 274 | /* Status bits */ |
275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ | 275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h index afbb18a0227c..5db297514aec 100644 --- a/include/uapi/linux/if_bridge.h +++ b/include/uapi/linux/if_bridge.h | |||
@@ -163,6 +163,9 @@ struct br_port_msg { | |||
163 | 163 | ||
164 | struct br_mdb_entry { | 164 | struct br_mdb_entry { |
165 | __u32 ifindex; | 165 | __u32 ifindex; |
166 | #define MDB_TEMPORARY 0 | ||
167 | #define MDB_PERMANENT 1 | ||
168 | __u8 state; | ||
166 | struct { | 169 | struct { |
167 | union { | 170 | union { |
168 | __be32 ip4; | 171 | __be32 ip4; |
diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h index 12f68c7ceba6..873e086ce3a1 100644 --- a/include/uapi/linux/magic.h +++ b/include/uapi/linux/magic.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #define EXT4_SUPER_MAGIC 0xEF53 | 23 | #define EXT4_SUPER_MAGIC 0xEF53 |
24 | #define BTRFS_SUPER_MAGIC 0x9123683E | 24 | #define BTRFS_SUPER_MAGIC 0x9123683E |
25 | #define NILFS_SUPER_MAGIC 0x3434 | 25 | #define NILFS_SUPER_MAGIC 0x3434 |
26 | #define F2FS_SUPER_MAGIC 0xF2F52010 | ||
26 | #define HPFS_SUPER_MAGIC 0xf995e849 | 27 | #define HPFS_SUPER_MAGIC 0xf995e849 |
27 | #define ISOFS_SUPER_MAGIC 0x9660 | 28 | #define ISOFS_SUPER_MAGIC 0x9660 |
28 | #define JFFS2_SUPER_MAGIC 0x72b6 | 29 | #define JFFS2_SUPER_MAGIC 0x72b6 |
diff --git a/include/uapi/linux/module.h b/include/uapi/linux/module.h new file mode 100644 index 000000000000..38da4258b12f --- /dev/null +++ b/include/uapi/linux/module.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef _UAPI_LINUX_MODULE_H | ||
2 | #define _UAPI_LINUX_MODULE_H | ||
3 | |||
4 | /* Flags for sys_finit_module: */ | ||
5 | #define MODULE_INIT_IGNORE_MODVERSIONS 1 | ||
6 | #define MODULE_INIT_IGNORE_VERMAGIC 2 | ||
7 | |||
8 | #endif /* _UAPI_LINUX_MODULE_H */ | ||
diff --git a/include/uapi/linux/msg.h b/include/uapi/linux/msg.h index 78dbd2f996a3..22d95c6854e0 100644 --- a/include/uapi/linux/msg.h +++ b/include/uapi/linux/msg.h | |||
@@ -10,6 +10,7 @@ | |||
10 | /* msgrcv options */ | 10 | /* msgrcv options */ |
11 | #define MSG_NOERROR 010000 /* no error if message is too big */ | 11 | #define MSG_NOERROR 010000 /* no error if message is too big */ |
12 | #define MSG_EXCEPT 020000 /* recv any msg except of specified type.*/ | 12 | #define MSG_EXCEPT 020000 /* recv any msg except of specified type.*/ |
13 | #define MSG_COPY 040000 /* copy (not remove) all queue messages */ | ||
13 | 14 | ||
14 | /* Obsolete, used only for backwards compatibility and libc5 compiles */ | 15 | /* Obsolete, used only for backwards compatibility and libc5 compiles */ |
15 | struct msqid_ds { | 16 | struct msqid_ds { |
diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h index 6b7b6f1e2fd6..ebfadc56d1b4 100644 --- a/include/uapi/linux/pci_regs.h +++ b/include/uapi/linux/pci_regs.h | |||
@@ -458,6 +458,8 @@ | |||
458 | #define PCI_EXP_DEVSTA_TRPND 0x20 /* Transactions Pending */ | 458 | #define PCI_EXP_DEVSTA_TRPND 0x20 /* Transactions Pending */ |
459 | #define PCI_EXP_LNKCAP 12 /* Link Capabilities */ | 459 | #define PCI_EXP_LNKCAP 12 /* Link Capabilities */ |
460 | #define PCI_EXP_LNKCAP_SLS 0x0000000f /* Supported Link Speeds */ | 460 | #define PCI_EXP_LNKCAP_SLS 0x0000000f /* Supported Link Speeds */ |
461 | #define PCI_EXP_LNKCAP_SLS_2_5GB 0x1 /* LNKCAP2 SLS Vector bit 0 (2.5GT/s) */ | ||
462 | #define PCI_EXP_LNKCAP_SLS_5_0GB 0x2 /* LNKCAP2 SLS Vector bit 1 (5.0GT/s) */ | ||
461 | #define PCI_EXP_LNKCAP_MLW 0x000003f0 /* Maximum Link Width */ | 463 | #define PCI_EXP_LNKCAP_MLW 0x000003f0 /* Maximum Link Width */ |
462 | #define PCI_EXP_LNKCAP_ASPMS 0x00000c00 /* ASPM Support */ | 464 | #define PCI_EXP_LNKCAP_ASPMS 0x00000c00 /* ASPM Support */ |
463 | #define PCI_EXP_LNKCAP_L0SEL 0x00007000 /* L0s Exit Latency */ | 465 | #define PCI_EXP_LNKCAP_L0SEL 0x00007000 /* L0s Exit Latency */ |
diff --git a/include/uapi/linux/serial_core.h b/include/uapi/linux/serial_core.h index 78f99d97475b..2c6c85f18ea0 100644 --- a/include/uapi/linux/serial_core.h +++ b/include/uapi/linux/serial_core.h | |||
@@ -50,7 +50,8 @@ | |||
50 | #define PORT_LPC3220 22 /* NXP LPC32xx SoC "Standard" UART */ | 50 | #define PORT_LPC3220 22 /* NXP LPC32xx SoC "Standard" UART */ |
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_MAX_8250 24 /* max port ID */ | 53 | #define PORT_BRCM_TRUMANAGE 24 |
54 | #define PORT_MAX_8250 25 /* max port ID */ | ||
54 | 55 | ||
55 | /* | 56 | /* |
56 | * ARM specific type numbers. These are not currently guaranteed | 57 | * ARM specific type numbers. These are not currently guaranteed |
diff --git a/include/uapi/linux/signal.h b/include/uapi/linux/signal.h index dff452ed6d00..e1bd50c29ded 100644 --- a/include/uapi/linux/signal.h +++ b/include/uapi/linux/signal.h | |||
@@ -4,5 +4,7 @@ | |||
4 | #include <asm/signal.h> | 4 | #include <asm/signal.h> |
5 | #include <asm/siginfo.h> | 5 | #include <asm/siginfo.h> |
6 | 6 | ||
7 | #define SS_ONSTACK 1 | ||
8 | #define SS_DISABLE 2 | ||
7 | 9 | ||
8 | #endif /* _UAPI_LINUX_SIGNAL_H */ | 10 | #endif /* _UAPI_LINUX_SIGNAL_H */ |
diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h index e811474724c2..0e011eb91b5d 100644 --- a/include/uapi/linux/swab.h +++ b/include/uapi/linux/swab.h | |||
@@ -45,7 +45,9 @@ | |||
45 | 45 | ||
46 | static inline __attribute_const__ __u16 __fswab16(__u16 val) | 46 | static inline __attribute_const__ __u16 __fswab16(__u16 val) |
47 | { | 47 | { |
48 | #ifdef __arch_swab16 | 48 | #ifdef __HAVE_BUILTIN_BSWAP16__ |
49 | return __builtin_bswap16(val); | ||
50 | #elif defined (__arch_swab16) | ||
49 | return __arch_swab16(val); | 51 | return __arch_swab16(val); |
50 | #else | 52 | #else |
51 | return ___constant_swab16(val); | 53 | return ___constant_swab16(val); |
@@ -54,7 +56,9 @@ static inline __attribute_const__ __u16 __fswab16(__u16 val) | |||
54 | 56 | ||
55 | static inline __attribute_const__ __u32 __fswab32(__u32 val) | 57 | static inline __attribute_const__ __u32 __fswab32(__u32 val) |
56 | { | 58 | { |
57 | #ifdef __arch_swab32 | 59 | #ifdef __HAVE_BUILTIN_BSWAP32__ |
60 | return __builtin_bswap32(val); | ||
61 | #elif defined(__arch_swab32) | ||
58 | return __arch_swab32(val); | 62 | return __arch_swab32(val); |
59 | #else | 63 | #else |
60 | return ___constant_swab32(val); | 64 | return ___constant_swab32(val); |
@@ -63,7 +67,9 @@ static inline __attribute_const__ __u32 __fswab32(__u32 val) | |||
63 | 67 | ||
64 | static inline __attribute_const__ __u64 __fswab64(__u64 val) | 68 | static inline __attribute_const__ __u64 __fswab64(__u64 val) |
65 | { | 69 | { |
66 | #ifdef __arch_swab64 | 70 | #ifdef __HAVE_BUILTIN_BSWAP64__ |
71 | return __builtin_bswap64(val); | ||
72 | #elif defined (__arch_swab64) | ||
67 | return __arch_swab64(val); | 73 | return __arch_swab64(val); |
68 | #elif defined(__SWAB_64_THRU_32__) | 74 | #elif defined(__SWAB_64_THRU_32__) |
69 | __u32 h = val >> 32; | 75 | __u32 h = val >> 32; |
diff --git a/include/uapi/linux/virtio_ids.h b/include/uapi/linux/virtio_ids.h index 270fb22c5811..a7630d04029f 100644 --- a/include/uapi/linux/virtio_ids.h +++ b/include/uapi/linux/virtio_ids.h | |||
@@ -37,5 +37,6 @@ | |||
37 | #define VIRTIO_ID_RPMSG 7 /* virtio remote processor messaging */ | 37 | #define VIRTIO_ID_RPMSG 7 /* virtio remote processor messaging */ |
38 | #define VIRTIO_ID_SCSI 8 /* virtio scsi */ | 38 | #define VIRTIO_ID_SCSI 8 /* virtio scsi */ |
39 | #define VIRTIO_ID_9P 9 /* 9p virtio console */ | 39 | #define VIRTIO_ID_9P 9 /* 9p virtio console */ |
40 | #define VIRTIO_ID_RPROC_SERIAL 11 /* virtio remoteproc serial link */ | ||
40 | 41 | ||
41 | #endif /* _LINUX_VIRTIO_IDS_H */ | 42 | #endif /* _LINUX_VIRTIO_IDS_H */ |
diff --git a/include/video/omap-panel-tfp410.h b/include/video/omap-panel-tfp410.h index 68c31d79c571..aef35e48bc7e 100644 --- a/include/video/omap-panel-tfp410.h +++ b/include/video/omap-panel-tfp410.h | |||
@@ -28,7 +28,7 @@ struct omap_dss_device; | |||
28 | * @power_down_gpio: gpio number for PD pin (or -1 if not available) | 28 | * @power_down_gpio: gpio number for PD pin (or -1 if not available) |
29 | */ | 29 | */ |
30 | struct tfp410_platform_data { | 30 | struct tfp410_platform_data { |
31 | u16 i2c_bus_num; | 31 | int i2c_bus_num; |
32 | int power_down_gpio; | 32 | int power_down_gpio; |
33 | }; | 33 | }; |
34 | 34 | ||
diff --git a/include/xen/interface/event_channel.h b/include/xen/interface/event_channel.h index 2090881c3650..f4942921e202 100644 --- a/include/xen/interface/event_channel.h +++ b/include/xen/interface/event_channel.h | |||
@@ -177,6 +177,19 @@ struct evtchn_unmask { | |||
177 | evtchn_port_t port; | 177 | evtchn_port_t port; |
178 | }; | 178 | }; |
179 | 179 | ||
180 | /* | ||
181 | * EVTCHNOP_reset: Close all event channels associated with specified domain. | ||
182 | * NOTES: | ||
183 | * 1. <dom> may be specified as DOMID_SELF. | ||
184 | * 2. Only a sufficiently-privileged domain may specify other than DOMID_SELF. | ||
185 | */ | ||
186 | #define EVTCHNOP_reset 10 | ||
187 | struct evtchn_reset { | ||
188 | /* IN parameters. */ | ||
189 | domid_t dom; | ||
190 | }; | ||
191 | typedef struct evtchn_reset evtchn_reset_t; | ||
192 | |||
180 | struct evtchn_op { | 193 | struct evtchn_op { |
181 | uint32_t cmd; /* EVTCHNOP_* */ | 194 | uint32_t cmd; /* EVTCHNOP_* */ |
182 | union { | 195 | union { |