aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Kbuild3
-rw-r--r--include/asm-generic/dma-mapping-broken.h16
-rw-r--r--include/asm-generic/io.h31
-rw-r--r--include/asm-generic/mmu.h6
-rw-r--r--include/asm-generic/parport.h4
-rw-r--r--include/asm-generic/pgtable.h6
-rw-r--r--include/asm-generic/syscalls.h2
-rw-r--r--include/asm-generic/tlb.h9
-rw-r--r--include/drm/drm_mm.h27
-rw-r--r--include/drm/exynos_drm.h22
-rw-r--r--include/linux/Kbuild5
-rw-r--r--include/linux/asn1.h2
-rw-r--r--include/linux/ata.h8
-rw-r--r--include/linux/ata_platform.h12
-rw-r--r--include/linux/audit.h4
-rw-r--r--include/linux/backing-dev.h1
-rw-r--r--include/linux/bcma/bcma.h1
-rw-r--r--include/linux/bcma/bcma_driver_gmac_cmn.h2
-rw-r--r--include/linux/bcma/bcma_driver_pci.h2
-rw-r--r--include/linux/binfmts.h5
-rw-r--r--include/linux/blkdev.h19
-rw-r--r--include/linux/ceph/libceph.h2
-rw-r--r--include/linux/ceph/osdmap.h1
-rw-r--r--include/linux/ceph/rados.h2
-rw-r--r--include/linux/compaction.h4
-rw-r--r--include/linux/compat.h62
-rw-r--r--include/linux/compiler-gcc4.h12
-rw-r--r--include/linux/compiler-intel.h7
-rw-r--r--include/linux/compiler.h9
-rw-r--r--include/linux/cpu_rmap.h13
-rw-r--r--include/linux/cpuidle.h2
-rw-r--r--include/linux/cred.h1
-rw-r--r--include/linux/dcache.h8
-rw-r--r--include/linux/device-mapper.h55
-rw-r--r--include/linux/dma-buf.h99
-rw-r--r--include/linux/dma-debug.h7
-rw-r--r--include/linux/exportfs.h5
-rw-r--r--include/linux/f2fs_fs.h413
-rw-r--r--include/linux/fs.h6
-rw-r--r--include/linux/fscache-cache.h71
-rw-r--r--include/linux/fscache.h50
-rw-r--r--include/linux/fsnotify_backend.h31
-rw-r--r--include/linux/hdlc/Kbuild0
-rw-r--r--include/linux/hsi/Kbuild0
-rw-r--r--include/linux/ima.h6
-rw-r--r--include/linux/init.h20
-rw-r--r--include/linux/interrupt.h5
-rw-r--r--include/linux/ipc_namespace.h1
-rw-r--r--include/linux/jbd2.h2
-rw-r--r--include/linux/kernel.h6
-rw-r--r--include/linux/libata.h4
-rw-r--r--include/linux/lockdep.h3
-rw-r--r--include/linux/mempolicy.h13
-rw-r--r--include/linux/mfd/abx500.h2
-rw-r--r--include/linux/mfd/abx500/ab8500-bm.h29
-rw-r--r--include/linux/mfd/da9052/da9052.h66
-rw-r--r--include/linux/mfd/da9052/reg.h3
-rw-r--r--include/linux/mfd/rtsx_common.h3
-rw-r--r--include/linux/mfd/rtsx_pci.h25
-rw-r--r--include/linux/mlx4/device.h1
-rw-r--r--include/linux/mm.h2
-rw-r--r--include/linux/mmzone.h8
-rw-r--r--include/linux/module.h10
-rw-r--r--include/linux/moduleparam.h6
-rw-r--r--include/linux/msg.h6
-rw-r--r--include/linux/mtd/blktrans.h4
-rw-r--r--include/linux/mtd/doc2000.h22
-rw-r--r--include/linux/mtd/fsmc.h3
-rw-r--r--include/linux/mtd/gpmi-nand.h68
-rw-r--r--include/linux/mtd/map.h4
-rw-r--r--include/linux/mtd/mtd.h2
-rw-r--r--include/linux/mtd/nand.h11
-rw-r--r--include/linux/mtd/sh_flctl.h14
-rw-r--r--include/linux/namei.h21
-rw-r--r--include/linux/netdevice.h5
-rw-r--r--include/linux/of_platform.h1
-rw-r--r--include/linux/page-flags.h8
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/pid.h1
-rw-r--r--include/linux/pid_namespace.h4
-rw-r--r--include/linux/platform_data/imx-iram.h41
-rw-r--r--include/linux/platform_data/iommu-omap.h9
-rw-r--r--include/linux/platform_data/mtd-nomadik-nand.h16
-rw-r--r--include/linux/platform_data/serial-omap.h51
-rw-r--r--include/linux/platform_data/usb-omap.h3
-rw-r--r--include/linux/pstore_ram.h5
-rw-r--r--include/linux/ptrace.h5
-rw-r--r--include/linux/pwm.h3
-rw-r--r--include/linux/raid/Kbuild0
-rw-r--r--include/linux/rbtree_augmented.h14
-rw-r--r--include/linux/rwsem.h9
-rw-r--r--include/linux/sched.h14
-rw-r--r--include/linux/security.h72
-rw-r--r--include/linux/signal.h3
-rw-r--r--include/linux/sunrpc/cache.h6
-rw-r--r--include/linux/sunrpc/svc.h6
-rw-r--r--include/linux/sunrpc/svcsock.h21
-rw-r--r--include/linux/syscalls.h16
-rw-r--r--include/linux/usb/Kbuild0
-rw-r--r--include/linux/usb/usbnet.h4
-rw-r--r--include/linux/virtio.h25
-rw-r--r--include/linux/virtio_scsi.h28
-rw-r--r--include/linux/watchdog.h2
-rw-r--r--include/net/inet_connection_sock.h1
-rw-r--r--include/net/ip.h2
-rw-r--r--include/net/ndisc.h7
-rw-r--r--include/net/netfilter/nf_conntrack_core.h2
-rw-r--r--include/net/netns/conntrack.h1
-rw-r--r--include/net/netns/x_tables.h1
-rw-r--r--include/net/sock.h2
-rw-r--r--include/rdma/Kbuild0
-rw-r--r--include/scsi/scsi_host.h4
-rw-r--r--include/sound/Kbuild0
-rw-r--r--include/sound/cs4271.h2
-rw-r--r--include/sound/soc-dai.h1
-rw-r--r--include/sound/soc.h11
-rw-r--r--include/target/target_core_base.h1
-rw-r--r--include/trace/events/ext4.h14
-rw-r--r--include/uapi/asm-generic/signal.h6
-rw-r--r--include/uapi/asm-generic/unistd.h4
-rw-r--r--include/uapi/drm/exynos_drm.h24
-rw-r--r--include/uapi/drm/i915_drm.h10
-rw-r--r--include/uapi/linux/audit.h2
-rw-r--r--include/uapi/linux/dm-ioctl.h4
-rw-r--r--include/uapi/linux/if_bridge.h3
-rw-r--r--include/uapi/linux/magic.h1
-rw-r--r--include/uapi/linux/module.h8
-rw-r--r--include/uapi/linux/msg.h1
-rw-r--r--include/uapi/linux/pci_regs.h2
-rw-r--r--include/uapi/linux/serial_core.h3
-rw-r--r--include/uapi/linux/signal.h2
-rw-r--r--include/uapi/linux/swab.h12
-rw-r--r--include/uapi/linux/virtio_ids.h1
-rw-r--r--include/video/omap-panel-tfp410.h2
134 files changed, 1386 insertions, 538 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
4header-y += linux/
5header-y += sound/
6header-y += rdma/
7header-y += video/ 4header-y += video/
8header-y += scsi/ 5header-y += scsi/
diff --git a/include/asm-generic/dma-mapping-broken.h b/include/asm-generic/dma-mapping-broken.h
index ccf7b4f34a3c..6c32af918c2f 100644
--- a/include/asm-generic/dma-mapping-broken.h
+++ b/include/asm-generic/dma-mapping-broken.h
@@ -16,6 +16,22 @@ extern void
16dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, 16dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
17 dma_addr_t dma_handle); 17 dma_addr_t dma_handle);
18 18
19static inline void *dma_alloc_attrs(struct device *dev, size_t size,
20 dma_addr_t *dma_handle, gfp_t flag,
21 struct dma_attrs *attrs)
22{
23 /* attrs is not supported and ignored */
24 return dma_alloc_coherent(dev, size, dma_handle, flag);
25}
26
27static inline void dma_free_attrs(struct device *dev, size_t size,
28 void *cpu_addr, dma_addr_t dma_handle,
29 struct dma_attrs *attrs)
30{
31 /* attrs is not supported and ignored */
32 dma_free_coherent(dev, size, cpu_addr, dma_handle);
33}
34
19#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) 35#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
20#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) 36#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
21 37
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
226static inline void readsl(const void __iomem *addr, void *buf, int len)
227{
228 insl(addr - PCI_IOBASE, buf, len);
229}
230
231static inline void readsw(const void __iomem *addr, void *buf, int len)
232{
233 insw(addr - PCI_IOBASE, buf, len);
234}
235
236static inline void readsb(const void __iomem *addr, void *buf, int len)
237{
238 insb(addr - PCI_IOBASE, buf, len);
239}
240
241static inline void writesl(const void __iomem *addr, const void *buf, int len)
242{
243 outsl(addr - PCI_IOBASE, buf, len);
244}
245
246static inline void writesw(const void __iomem *addr, const void *buf, int len)
247{
248 outsw(addr - PCI_IOBASE, buf, len);
249}
250
251static 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__
9typedef struct { 9typedef 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
13static int __devinit parport_pc_find_isa_ports(int autoirq, int autodma); 13static int parport_pc_find_isa_ports(int autoirq, int autodma);
14static int __devinit parport_pc_find_nonpci_ports(int autoirq, int autodma) 14static 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
464static 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
469static inline int is_zero_pfn(unsigned long pfn) 467static 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
25asmlinkage long sys_sigaltstack(const stack_t __user *, stack_t __user *, 26asmlinkage 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
30asmlinkage long sys_rt_sigreturn(struct pt_regs *regs); 32asmlinkage 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}
161extern int drm_mm_insert_node(struct drm_mm *mm, struct drm_mm_node *node, 161
162 unsigned long size, unsigned alignment); 162extern int drm_mm_insert_node(struct drm_mm *mm,
163 struct drm_mm_node *node,
164 unsigned long size,
165 unsigned alignment);
163extern int drm_mm_insert_node_in_range(struct drm_mm *mm, 166extern 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);
172extern 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);
177extern 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);
167extern void drm_mm_put_block(struct drm_mm_node *cur); 184extern void drm_mm_put_block(struct drm_mm_node *cur);
168extern void drm_mm_remove_node(struct drm_mm_node *node); 185extern void drm_mm_remove_node(struct drm_mm_node *node);
169extern void drm_mm_replace_node(struct drm_mm_node *old, struct drm_mm_node *new); 186extern 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 @@
1header-y += dvb/
2header-y += hdlc/
3header-y += hsi/
4header-y += raid/
5header-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
18extern int __devinit __pata_platform_probe(struct device *dev, 18extern 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
29struct audit_sig_info { 30struct audit_sig_info {
@@ -157,7 +158,8 @@ void audit_core_dumps(long signr);
157 158
158static inline void audit_seccomp(unsigned long syscall, long signr, int code) 159static 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 {
114int bdi_init(struct backing_dev_info *bdi); 114int bdi_init(struct backing_dev_info *bdi);
115void bdi_destroy(struct backing_dev_info *bdi); 115void bdi_destroy(struct backing_dev_info *bdi);
116 116
117__printf(3, 4)
117int bdi_register(struct backing_dev_info *bdi, struct device *parent, 118int bdi_register(struct backing_dev_info *bdi, struct device *parent,
118 const char *fmt, ...); 119 const char *fmt, ...);
119int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev); 120int 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);
351extern void bcma_core_pll_ctl(struct bcma_device *core, u32 req, u32 status, 351extern void bcma_core_pll_ctl(struct bcma_device *core, u32 req, u32 status,
352 bool on); 352 bool on);
353extern 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
95extern void __devinit bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc); 95extern void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc);
96#else 96#else
97static inline void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc) { } 97static 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
217extern void __devinit bcma_core_pci_init(struct bcma_drv_pci *pc); 217extern void bcma_core_pci_init(struct bcma_drv_pci *pc);
218extern int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, 218extern 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);
220extern void bcma_core_pci_extend_L1timer(struct bcma_drv_pci *pc, bool extend); 220extern 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);
114extern int bprm_mm_init(struct linux_binprm *bprm); 114extern int bprm_mm_init(struct linux_binprm *bprm);
115extern int bprm_change_interp(char *interp, struct linux_binprm *bprm);
115extern int copy_strings_kernel(int argc, const char *const *argv, 116extern int copy_strings_kernel(int argc, const char *const *argv,
116 struct linux_binprm *bprm); 117 struct linux_binprm *bprm);
117extern int prepare_bprm_creds(struct linux_binprm *bprm); 118extern int prepare_bprm_creds(struct linux_binprm *bprm);
@@ -119,8 +120,4 @@ extern void install_exec_creds(struct linux_binprm *bprm);
119extern void set_binfmt(struct linux_binfmt *new); 120extern void set_binfmt(struct linux_binfmt *new);
120extern void free_bprm(struct linux_binprm *); 121extern void free_bprm(struct linux_binprm *);
121 122
122#ifdef __ARCH_WANT_KERNEL_EXECVE
123extern 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
1189static inline int queue_limit_discard_alignment(struct queue_limits *lim, sector_t sector) 1189static 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
1201static inline int bdev_discard_alignment(struct block_device *bdev) 1212static 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,
123extern int ceph_calc_pg_primary(struct ceph_osdmap *osdmap, 123extern int ceph_calc_pg_primary(struct ceph_osdmap *osdmap,
124 struct ceph_pg pgid); 124 struct ceph_pg pgid);
125 125
126extern const char *ceph_pg_pool_name_by_id(struct ceph_osdmap *map, u64 id);
126extern int ceph_pg_poolid_by_name(struct ceph_osdmap *map, const char *name); 127extern 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,
22extern int fragmentation_index(struct zone *zone, unsigned int order); 22extern int fragmentation_index(struct zone *zone, unsigned int order);
23extern unsigned long try_to_compact_pages(struct zonelist *zonelist, 23extern 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);
26extern int compact_pgdat(pg_data_t *pgdat, int order); 26extern int compact_pgdat(pg_data_t *pgdat, int order);
27extern void reset_isolation_suitable(pg_data_t *pgdat); 27extern void reset_isolation_suitable(pg_data_t *pgdat);
28extern unsigned long compaction_suitable(struct zone *zone, int order); 28extern 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
76static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, 76static 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 */
73typedef 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
588asmlinkage long compat_sys_sendfile(int out_fd, int in_fd, 643asmlinkage 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
646asmlinkage long compat_sys_sigaltstack(const compat_stack_t __user *uss_ptr,
647 compat_stack_t __user *uoss_ptr);
648
649int compat_restore_altstack(const compat_stack_t __user *uss);
650int __compat_save_altstack(compat_stack_t __user *, unsigned long);
651#endif
590 652
591asmlinkage long compat_sys_sched_rr_get_interval(compat_pid_t pid, 653asmlinkage 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 */
25struct cpu_rmap { 27struct 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
35extern struct cpu_rmap *alloc_cpu_rmap(unsigned int size, gfp_t flags); 38extern struct cpu_rmap *alloc_cpu_rmap(unsigned int size, gfp_t flags);
36 39extern 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 */
41static inline void free_cpu_rmap(struct cpu_rmap *rmap)
42{
43 kfree(rmap);
44}
45 40
46extern int cpu_rmap_add(struct cpu_rmap *rmap, void *obj); 41extern int cpu_rmap_add(struct cpu_rmap *rmap, void *obj);
47extern int cpu_rmap_update(struct cpu_rmap *rmap, u16 index, 42extern 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
411static inline bool d_need_lookup(struct dentry *dentry)
412{
413 return dentry->d_flags & DCACHE_NEED_LOOKUP;
414}
415
416extern void d_clear_need_lookup(struct dentry *dentry);
417
418extern int sysctl_vfs_cache_pressure; 410extern 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;
23union map_info { 23union 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 */
49typedef int (*dm_map_fn) (struct dm_target *ti, struct bio *bio, 48typedef int (*dm_map_fn) (struct dm_target *ti, struct bio *bio);
50 union map_info *map_context);
51typedef int (*dm_map_request_fn) (struct dm_target *ti, struct request *clone, 49typedef 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 */
62typedef int (*dm_endio_fn) (struct dm_target *ti, 60typedef 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);
65typedef int (*dm_request_endio_fn) (struct dm_target *ti, 62typedef 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 */
260struct 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
268static 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
273static 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
278static 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
244int dm_register_target(struct target_type *t); 283int dm_register_target(struct target_type *t);
245void dm_unregister_target(struct target_type *t); 284void 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
160struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf, 159struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
161 struct device *dev); 160 struct device *dev);
162void dma_buf_detach(struct dma_buf *dmabuf, 161void 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);
185void *dma_buf_vmap(struct dma_buf *); 184void *dma_buf_vmap(struct dma_buf *);
186void dma_buf_vunmap(struct dma_buf *, void *vaddr); 185void dma_buf_vunmap(struct dma_buf *, void *vaddr);
187#else
188
189static inline struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
190 struct device *dev)
191{
192 return ERR_PTR(-ENODEV);
193}
194
195static inline void dma_buf_detach(struct dma_buf *dmabuf,
196 struct dma_buf_attachment *dmabuf_attach)
197{
198 return;
199}
200
201static 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
208static inline int dma_buf_fd(struct dma_buf *dmabuf, int flags)
209{
210 return -ENODEV;
211}
212
213static inline struct dma_buf *dma_buf_get(int fd)
214{
215 return ERR_PTR(-ENODEV);
216}
217
218static inline void dma_buf_put(struct dma_buf *dmabuf)
219{
220 return;
221}
222
223static 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
229static 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
235static 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
242static 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
248static inline void *dma_buf_kmap_atomic(struct dma_buf *dmabuf,
249 unsigned long pnum)
250{
251 return NULL;
252}
253
254static inline void dma_buf_kunmap_atomic(struct dma_buf *dmabuf,
255 unsigned long pnum, void *vaddr)
256{
257}
258
259static inline void *dma_buf_kmap(struct dma_buf *dmabuf, unsigned long pnum)
260{
261 return NULL;
262}
263
264static inline void dma_buf_kunmap(struct dma_buf *dmabuf,
265 unsigned long pnum, void *vaddr)
266{
267}
268
269static 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
276static inline void *dma_buf_vmap(struct dma_buf *dmabuf)
277{
278 return NULL;
279}
280
281static 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
42extern void debug_dma_mapping_error(struct device *dev, dma_addr_t dma_addr);
43
42extern void debug_dma_unmap_page(struct device *dev, dma_addr_t addr, 44extern 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
110static inline void debug_dma_mapping_error(struct device *dev,
111 dma_addr_t dma_addr)
112{
113}
114
108static inline void debug_dma_unmap_page(struct device *dev, dma_addr_t addr, 115static 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
88struct fid { 93struct 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 */
46struct 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
88struct 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
124struct 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 */
136struct 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
147struct 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
178struct direct_node {
179 __le32 addr[ADDRS_PER_BLOCK]; /* array of data block address */
180} __packed;
181
182struct indirect_node {
183 __le32 nid[NIDS_PER_BLOCK]; /* array of data block address */
184} __packed;
185
186enum {
187 COLD_BIT_SHIFT = 0,
188 FSYNC_BIT_SHIFT,
189 DENT_BIT_SHIFT,
190 OFFSET_BIT_SHIFT
191};
192
193struct 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
201struct 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
216struct 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
222struct 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
249struct 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
255struct 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 */
280struct 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
295struct 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 */
314enum {
315 NAT_JOURNAL = 0,
316 SIT_JOURNAL
317};
318
319struct nat_journal_entry {
320 __le32 nid;
321 struct f2fs_nat_entry ne;
322} __packed;
323
324struct nat_journal {
325 struct nat_journal_entry entries[NAT_JOURNAL_ENTRIES];
326 __u8 reserved[NAT_JOURNAL_RESERVED];
327} __packed;
328
329struct sit_journal_entry {
330 __le32 segno;
331 struct f2fs_sit_entry se;
332} __packed;
333
334struct 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 */
340struct 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
362typedef __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 */
384struct 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 */
392struct 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 */
401enum {
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
1446extern bool inode_owner_or_capable(const struct inode *inode); 1446extern bool inode_owner_or_capable(const struct inode *inode);
1447 1447
1448/* not quite ready to be deprecated, but... */
1449extern void lock_super(struct super_block *);
1450extern 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
1997extern long vfs_truncate(struct path *, loff_t);
2002extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, 1998extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs,
2003 struct file *filp); 1999 struct file *filp);
2004extern int do_fallocate(struct file *file, int mode, loff_t offset, 2000extern 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;
75typedef void (*fscache_operation_release_t)(struct fscache_operation *op); 75typedef void (*fscache_operation_release_t)(struct fscache_operation *op);
76typedef void (*fscache_operation_processor_t)(struct fscache_operation *op); 76typedef void (*fscache_operation_processor_t)(struct fscache_operation *op);
77 77
78enum 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
78struct fscache_operation { 88struct 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;
106extern void fscache_op_work_func(struct work_struct *work); 116extern void fscache_op_work_func(struct work_struct *work);
107 117
108extern void fscache_enqueue_operation(struct fscache_operation *); 118extern void fscache_enqueue_operation(struct fscache_operation *);
119extern void fscache_op_complete(struct fscache_operation *, bool);
109extern void fscache_put_operation(struct fscache_operation *); 120extern 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
143typedef int (*fscache_page_retrieval_func_t)(struct fscache_retrieval *op, 156typedef 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 */
194static 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
306extern struct fscache_cookie fscache_fsdef_index; 338extern struct fscache_cookie fscache_fsdef_index;
307 339
308/* 340/*
341 * Event list for fscache_object::{event_mask,events}
342 */
343enum {
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 */
311struct fscache_object { 360struct 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
505extern void fscache_io_error(struct fscache_cache *cache); 547extern void fscache_io_error(struct fscache_cache *cache);
506 548
549extern void fscache_mark_page_cached(struct fscache_retrieval *op,
550 struct page *page);
551
507extern void fscache_mark_pages_cached(struct fscache_retrieval *op, 552extern 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(
185extern void __fscache_relinquish_cookie(struct fscache_cookie *, int); 185extern void __fscache_relinquish_cookie(struct fscache_cookie *, int);
186extern void __fscache_update_cookie(struct fscache_cookie *); 186extern void __fscache_update_cookie(struct fscache_cookie *);
187extern int __fscache_attr_changed(struct fscache_cookie *); 187extern int __fscache_attr_changed(struct fscache_cookie *);
188extern void __fscache_invalidate(struct fscache_cookie *);
189extern void __fscache_wait_on_invalidate(struct fscache_cookie *);
188extern int __fscache_read_or_alloc_page(struct fscache_cookie *, 190extern 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 */
407static inline
408void 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 */
423static inline
424void 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 */
95struct fsnotify_ops { 96struct 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 */
364extern struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops); 365extern struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops);
366/* get reference to a group */
367extern 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 */
366extern void fsnotify_put_group(struct fsnotify_group *group); 369extern void fsnotify_put_group(struct fsnotify_group *group);
367 370/* destroy group */
371extern void fsnotify_destroy_group(struct fsnotify_group *group);
372/* fasync handler function */
373extern int fsnotify_fasync(int fd, struct file *file, int on);
368/* take a reference to an event */ 374/* take a reference to an event */
369extern void fsnotify_get_event(struct fsnotify_event *event); 375extern void fsnotify_get_event(struct fsnotify_event *event);
370extern void fsnotify_put_event(struct fsnotify_event *event); 376extern 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 */
406extern int fsnotify_add_mark(struct fsnotify_mark *mark, struct fsnotify_group *group, 412extern 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 */ 414extern int fsnotify_add_mark_locked(struct fsnotify_mark *mark, struct fsnotify_group *group,
409extern 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 */
417extern void fsnotify_destroy_mark(struct fsnotify_mark *mark,
418 struct fsnotify_group *group);
419extern 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 */
411extern void fsnotify_clear_vfsmount_marks_by_group(struct fsnotify_group *group); 422extern 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/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/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);
18extern int ima_file_check(struct file *file, int mask); 18extern int ima_file_check(struct file *file, int mask);
19extern void ima_file_free(struct file *file); 19extern void ima_file_free(struct file *file);
20extern int ima_file_mmap(struct file *file, unsigned long prot); 20extern int ima_file_mmap(struct file *file, unsigned long prot);
21extern int ima_module_check(struct file *file);
21 22
22#else 23#else
23static inline int ima_bprm_check(struct linux_binprm *bprm) 24static 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
44static 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 a799273714ac..10ed4f436458 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)
@@ -337,18 +329,6 @@ void __init parse_early_options(char *cmdline);
337#define __INITRODATA_OR_MODULE __INITRODATA 329#define __INITRODATA_OR_MODULE __INITRODATA
338#endif /*CONFIG_MODULES*/ 330#endif /*CONFIG_MODULES*/
339 331
340/* Functions marked as __devexit may be discarded at kernel link time, depending
341 on config options. Newer versions of binutils detect references from
342 retained sections to discarded sections and flag an error. Pointers to
343 __devexit functions must use __devexit_p(function_name), the wrapper will
344 insert either the function_name or NULL, depending on the config options.
345 */
346#if defined(MODULE) || defined(CONFIG_HOTPLUG)
347#define __devexit_p(x) x
348#else
349#define __devexit_p(x) NULL
350#endif
351
352#ifdef MODULE 332#ifdef MODULE
353#define __exit_p(x) x 333#define __exit_p(x) x
354#else 334#else
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 {
268extern int 268extern int
269irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify); 269irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify);
270 270
271static inline void irq_run_affinity_notifiers(void)
272{
273 flush_scheduled_work();
274}
275
276#else /* CONFIG_SMP */ 271#else /* CONFIG_SMP */
277 272
278static inline int irq_set_affinity(unsigned int irq, const struct cpumask *m) 273static 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
29struct ipc_namespace { 30struct 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 *,
1098extern int jbd2_journal_dirty_metadata (handle_t *, struct buffer_head *); 1098extern int jbd2_journal_dirty_metadata (handle_t *, struct buffer_head *);
1099extern int jbd2_journal_forget (handle_t *, struct buffer_head *); 1099extern int jbd2_journal_forget (handle_t *, struct buffer_head *);
1100extern void journal_sync_buffer (struct buffer_head *); 1100extern void journal_sync_buffer (struct buffer_head *);
1101extern void jbd2_journal_invalidatepage(journal_t *, 1101extern int jbd2_journal_invalidatepage(journal_t *,
1102 struct page *, unsigned long); 1102 struct page *, unsigned long);
1103extern int jbd2_journal_try_to_free_buffers(journal_t *, struct page *, gfp_t); 1103extern int jbd2_journal_try_to_free_buffers(journal_t *, struct page *, gfp_t);
1104extern int jbd2_journal_stop(handle_t *); 1104extern 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/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
124struct shared_policy { 124struct shared_policy {
125 struct rb_root root; 125 struct rb_root root;
126 struct mutex mutex; 126 spinlock_t lock;
127}; 127};
128 128
129void mpol_shared_policy_init(struct shared_policy *sp, struct mempolicy *mpol); 129void 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
168extern int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context); 168extern int mpol_parse_str(char *str, struct mempolicy **mpol);
169#endif 169#endif
170 170
171extern int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol, 171extern 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 */
175static inline int vma_migratable(struct vm_area_struct *vma) 174static 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
299static inline int mpol_parse_str(char *str, struct mempolicy **mpol, 298static 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
306static inline int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol, 304static 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/mfd/abx500.h b/include/linux/mfd/abx500.h
index 2138bd33021a..e53dcfeaee69 100644
--- a/include/linux/mfd/abx500.h
+++ b/include/linux/mfd/abx500.h
@@ -272,8 +272,6 @@ struct abx500_bm_data {
272 const struct abx500_fg_parameters *fg_params; 272 const struct abx500_fg_parameters *fg_params;
273}; 273};
274 274
275extern struct abx500_bm_data ab8500_bm_data;
276
277enum { 275enum {
278 NTC_EXTERNAL = 0, 276 NTC_EXTERNAL = 0,
279 NTC_INTERNAL, 277 NTC_INTERNAL,
diff --git a/include/linux/mfd/abx500/ab8500-bm.h b/include/linux/mfd/abx500/ab8500-bm.h
index 44310c98ee6e..9bd037df97d9 100644
--- a/include/linux/mfd/abx500/ab8500-bm.h
+++ b/include/linux/mfd/abx500/ab8500-bm.h
@@ -422,7 +422,10 @@ struct ab8500_chargalg_platform_data {
422struct ab8500_btemp; 422struct ab8500_btemp;
423struct ab8500_gpadc; 423struct ab8500_gpadc;
424struct ab8500_fg; 424struct ab8500_fg;
425
425#ifdef CONFIG_AB8500_BM 426#ifdef CONFIG_AB8500_BM
427extern struct abx500_bm_data ab8500_bm_data;
428
426void ab8500_fg_reinit(void); 429void ab8500_fg_reinit(void);
427void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA); 430void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA);
428struct ab8500_btemp *ab8500_btemp_get(void); 431struct ab8500_btemp *ab8500_btemp_get(void);
@@ -434,31 +437,7 @@ int ab8500_fg_inst_curr_finalize(struct ab8500_fg *di, int *res);
434int ab8500_fg_inst_curr_done(struct ab8500_fg *di); 437int ab8500_fg_inst_curr_done(struct ab8500_fg *di);
435 438
436#else 439#else
437int ab8500_fg_inst_curr_done(struct ab8500_fg *di) 440static struct abx500_bm_data ab8500_bm_data;
438{
439}
440static void ab8500_fg_reinit(void)
441{
442}
443static void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA)
444{
445}
446static struct ab8500_btemp *ab8500_btemp_get(void)
447{
448 return NULL;
449}
450static int ab8500_btemp_get_batctrl_temp(struct ab8500_btemp *btemp)
451{
452 return 0;
453}
454struct ab8500_fg *ab8500_fg_get(void)
455{
456 return NULL;
457}
458static int ab8500_fg_inst_curr_blocking(struct ab8500_fg *dev)
459{
460 return -ENODEV;
461}
462 441
463static inline int ab8500_fg_inst_curr_start(struct ab8500_fg *di) 442static inline int ab8500_fg_inst_curr_start(struct ab8500_fg *di)
464{ 443{
diff --git a/include/linux/mfd/da9052/da9052.h b/include/linux/mfd/da9052/da9052.h
index 86dd93de6ff2..786d02eb79d2 100644
--- a/include/linux/mfd/da9052/da9052.h
+++ b/include/linux/mfd/da9052/da9052.h
@@ -99,6 +99,9 @@ struct da9052 {
99 u8 chip_id; 99 u8 chip_id;
100 100
101 int chip_irq; 101 int chip_irq;
102
103 /* SOC I/O transfer related fixes for DA9052/53 */
104 int (*fix_io) (struct da9052 *da9052, unsigned char reg);
102}; 105};
103 106
104/* ADC API */ 107/* ADC API */
@@ -113,32 +116,87 @@ static inline int da9052_reg_read(struct da9052 *da9052, unsigned char reg)
113 ret = regmap_read(da9052->regmap, reg, &val); 116 ret = regmap_read(da9052->regmap, reg, &val);
114 if (ret < 0) 117 if (ret < 0)
115 return ret; 118 return ret;
119
120 if (da9052->fix_io) {
121 ret = da9052->fix_io(da9052, reg);
122 if (ret < 0)
123 return ret;
124 }
125
116 return val; 126 return val;
117} 127}
118 128
119static inline int da9052_reg_write(struct da9052 *da9052, unsigned char reg, 129static inline int da9052_reg_write(struct da9052 *da9052, unsigned char reg,
120 unsigned char val) 130 unsigned char val)
121{ 131{
122 return regmap_write(da9052->regmap, reg, val); 132 int ret;
133
134 ret = regmap_write(da9052->regmap, reg, val);
135 if (ret < 0)
136 return ret;
137
138 if (da9052->fix_io) {
139 ret = da9052->fix_io(da9052, reg);
140 if (ret < 0)
141 return ret;
142 }
143
144 return ret;
123} 145}
124 146
125static inline int da9052_group_read(struct da9052 *da9052, unsigned char reg, 147static inline int da9052_group_read(struct da9052 *da9052, unsigned char reg,
126 unsigned reg_cnt, unsigned char *val) 148 unsigned reg_cnt, unsigned char *val)
127{ 149{
128 return regmap_bulk_read(da9052->regmap, reg, val, reg_cnt); 150 int ret;
151
152 ret = regmap_bulk_read(da9052->regmap, reg, val, reg_cnt);
153 if (ret < 0)
154 return ret;
155
156 if (da9052->fix_io) {
157 ret = da9052->fix_io(da9052, reg);
158 if (ret < 0)
159 return ret;
160 }
161
162 return ret;
129} 163}
130 164
131static inline int da9052_group_write(struct da9052 *da9052, unsigned char reg, 165static inline int da9052_group_write(struct da9052 *da9052, unsigned char reg,
132 unsigned reg_cnt, unsigned char *val) 166 unsigned reg_cnt, unsigned char *val)
133{ 167{
134 return regmap_raw_write(da9052->regmap, reg, val, reg_cnt); 168 int ret;
169
170 ret = regmap_raw_write(da9052->regmap, reg, val, reg_cnt);
171 if (ret < 0)
172 return ret;
173
174 if (da9052->fix_io) {
175 ret = da9052->fix_io(da9052, reg);
176 if (ret < 0)
177 return ret;
178 }
179
180 return ret;
135} 181}
136 182
137static inline int da9052_reg_update(struct da9052 *da9052, unsigned char reg, 183static inline int da9052_reg_update(struct da9052 *da9052, unsigned char reg,
138 unsigned char bit_mask, 184 unsigned char bit_mask,
139 unsigned char reg_val) 185 unsigned char reg_val)
140{ 186{
141 return regmap_update_bits(da9052->regmap, reg, bit_mask, reg_val); 187 int ret;
188
189 ret = regmap_update_bits(da9052->regmap, reg, bit_mask, reg_val);
190 if (ret < 0)
191 return ret;
192
193 if (da9052->fix_io) {
194 ret = da9052->fix_io(da9052, reg);
195 if (ret < 0)
196 return ret;
197 }
198
199 return ret;
142} 200}
143 201
144int da9052_device_init(struct da9052 *da9052, u8 chip_id); 202int da9052_device_init(struct da9052 *da9052, u8 chip_id);
diff --git a/include/linux/mfd/da9052/reg.h b/include/linux/mfd/da9052/reg.h
index b97f7309d7f6..c4dd3a8add21 100644
--- a/include/linux/mfd/da9052/reg.h
+++ b/include/linux/mfd/da9052/reg.h
@@ -34,6 +34,9 @@
34#define DA9052_STATUS_C_REG 3 34#define DA9052_STATUS_C_REG 3
35#define DA9052_STATUS_D_REG 4 35#define DA9052_STATUS_D_REG 4
36 36
37/* PARK REGISTER */
38#define DA9052_PARK_REGISTER DA9052_STATUS_D_REG
39
37/* EVENT REGISTERS */ 40/* EVENT REGISTERS */
38#define DA9052_EVENT_A_REG 5 41#define DA9052_EVENT_A_REG 5
39#define DA9052_EVENT_B_REG 6 42#define DA9052_EVENT_B_REG 6
diff --git a/include/linux/mfd/rtsx_common.h b/include/linux/mfd/rtsx_common.h
index a8d393e3066b..2b13970596f5 100644
--- a/include/linux/mfd/rtsx_common.h
+++ b/include/linux/mfd/rtsx_common.h
@@ -38,6 +38,9 @@
38#define RTSX_SD_CARD 0 38#define RTSX_SD_CARD 0
39#define RTSX_MS_CARD 1 39#define RTSX_MS_CARD 1
40 40
41#define CLK_TO_DIV_N 0
42#define DIV_N_TO_CLK 1
43
41struct platform_device; 44struct platform_device;
42 45
43struct rtsx_slot { 46struct rtsx_slot {
diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h
index 060b721fcbfb..4b117a3f54d4 100644
--- a/include/linux/mfd/rtsx_pci.h
+++ b/include/linux/mfd/rtsx_pci.h
@@ -158,10 +158,9 @@
158#define SG_TRANS_DATA (0x02 << 4) 158#define SG_TRANS_DATA (0x02 << 4)
159#define SG_LINK_DESC (0x03 << 4) 159#define SG_LINK_DESC (0x03 << 4)
160 160
161/* SD bank voltage */ 161/* Output voltage */
162#define SD_IO_3V3 0 162#define OUTPUT_3V3 0
163#define SD_IO_1V8 1 163#define OUTPUT_1V8 1
164
165 164
166/* Card Clock Enable Register */ 165/* Card Clock Enable Register */
167#define SD_CLK_EN 0x04 166#define SD_CLK_EN 0x04
@@ -201,6 +200,20 @@
201#define CHANGE_CLK 0x01 200#define CHANGE_CLK 0x01
202 201
203/* LDO_CTL */ 202/* LDO_CTL */
203#define BPP_ASIC_1V7 0x00
204#define BPP_ASIC_1V8 0x01
205#define BPP_ASIC_1V9 0x02
206#define BPP_ASIC_2V0 0x03
207#define BPP_ASIC_2V7 0x04
208#define BPP_ASIC_2V8 0x05
209#define BPP_ASIC_3V2 0x06
210#define BPP_ASIC_3V3 0x07
211#define BPP_REG_TUNED18 0x07
212#define BPP_TUNED18_SHIFT_8402 5
213#define BPP_TUNED18_SHIFT_8411 4
214#define BPP_PAD_MASK 0x04
215#define BPP_PAD_3V3 0x04
216#define BPP_PAD_1V8 0x00
204#define BPP_LDO_POWB 0x03 217#define BPP_LDO_POWB 0x03
205#define BPP_LDO_ON 0x00 218#define BPP_LDO_ON 0x00
206#define BPP_LDO_SUSPEND 0x02 219#define BPP_LDO_SUSPEND 0x02
@@ -688,7 +701,10 @@ struct pcr_ops {
688 int (*disable_auto_blink)(struct rtsx_pcr *pcr); 701 int (*disable_auto_blink)(struct rtsx_pcr *pcr);
689 int (*card_power_on)(struct rtsx_pcr *pcr, int card); 702 int (*card_power_on)(struct rtsx_pcr *pcr, int card);
690 int (*card_power_off)(struct rtsx_pcr *pcr, int card); 703 int (*card_power_off)(struct rtsx_pcr *pcr, int card);
704 int (*switch_output_voltage)(struct rtsx_pcr *pcr,
705 u8 voltage);
691 unsigned int (*cd_deglitch)(struct rtsx_pcr *pcr); 706 unsigned int (*cd_deglitch)(struct rtsx_pcr *pcr);
707 int (*conv_clk_and_div_n)(int clk, int dir);
692}; 708};
693 709
694enum PDEV_STAT {PDEV_STAT_IDLE, PDEV_STAT_RUN}; 710enum PDEV_STAT {PDEV_STAT_IDLE, PDEV_STAT_RUN};
@@ -783,6 +799,7 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock,
783 u8 ssc_depth, bool initial_mode, bool double_clk, bool vpclk); 799 u8 ssc_depth, bool initial_mode, bool double_clk, bool vpclk);
784int rtsx_pci_card_power_on(struct rtsx_pcr *pcr, int card); 800int rtsx_pci_card_power_on(struct rtsx_pcr *pcr, int card);
785int rtsx_pci_card_power_off(struct rtsx_pcr *pcr, int card); 801int rtsx_pci_card_power_off(struct rtsx_pcr *pcr, int card);
802int rtsx_pci_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage);
786unsigned int rtsx_pci_card_exist(struct rtsx_pcr *pcr); 803unsigned int rtsx_pci_card_exist(struct rtsx_pcr *pcr);
787void rtsx_pci_complete_unfinished_transfer(struct rtsx_pcr *pcr); 804void rtsx_pci_complete_unfinished_transfer(struct rtsx_pcr *pcr);
788 805
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
456void split_page(struct page *page, unsigned int order); 456void split_page(struct page *page, unsigned int order);
457int split_free_page(struct page *page); 457int split_free_page(struct page *page);
458int 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
1008extern void truncate_pagecache(struct inode *inode, loff_t old, loff_t new); 1007extern void truncate_pagecache(struct inode *inode, loff_t old, loff_t new);
1009extern void truncate_setsize(struct inode *inode, loff_t newsize); 1008extern void truncate_setsize(struct inode *inode, loff_t newsize);
1010extern int vmtruncate(struct inode *inode, loff_t offset);
1011void truncate_pagecache_range(struct inode *inode, loff_t offset, loff_t end); 1009void truncate_pagecache_range(struct inode *inode, loff_t offset, loff_t end);
1012int truncate_inode_page(struct address_space *mapping, struct page *page); 1010int truncate_inode_page(struct address_space *mapping, struct page *page);
1013int generic_error_remove_page(struct address_space *mapping, struct page *page); 1011int generic_error_remove_page(struct address_space *mapping, struct page *page);
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
516typedef enum { 508typedef 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
202enum module_state 202enum 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) \
23static const char __module_cat(name,__LINE__)[] \ 21static 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 */
35extern long do_msgsnd(int msqid, long mtype, void __user *mtext, 35extern long do_msgsnd(int msqid, long mtype, void __user *mtext,
36 size_t msgsz, int msgflg); 36 size_t msgsz, int msgflg);
37extern long do_msgrcv(int msqid, long *pmtype, void __user *mtext, 37extern 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
27struct hd_geometry; 28struct hd_geometry;
28struct mtd_info; 29struct 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)))) 95static 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}
99static 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)))) 106static 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}
110static 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 */
55struct 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
329static inline map_word map_word_load(struct map_info *map, const void *ptr) 329static 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
392static inline map_word inline_map_read(struct map_info *map, unsigned long ofs) 392static 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
143struct dma_chan;
144
141struct sh_flctl { 145struct 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
166struct sh_flctl_platform_data { 175struct 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
175static inline struct sh_flctl *mtd_to_flctl(struct mtd_info *mtdinfo) 187static 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
66extern int kern_path(const char *, unsigned, struct path *); 67extern int kern_path(const char *, unsigned, struct path *);
67 68
68extern struct dentry *kern_path_create(int, const char *, struct path *, int); 69extern struct dentry *kern_path_create(int, const char *, struct path *, unsigned int);
69extern struct dentry *user_path_create(int, const char __user *, struct path *, int); 70extern struct dentry *user_path_create(int, const char __user *, struct path *, unsigned int);
70extern void done_path_create(struct path *, struct dentry *); 71extern void done_path_create(struct path *, struct dentry *);
71extern struct dentry *kern_path_locked(const char *, struct path *); 72extern struct dentry *kern_path_locked(const char *, struct path *);
72extern int vfs_path_lookup(struct dentry *, struct vfsmount *, 73extern 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 */
112static inline bool
113retry_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
63extern 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
1577extern rwlock_t dev_base_lock; /* Device list lock */ 1580extern rwlock_t dev_base_lock; /* Device list lock */
1578 1581
1579extern seqlock_t devnet_rename_seq; /* Device rename lock */ 1582extern 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/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)
102struct of_dev_auxdata; 102struct of_dev_auxdata;
103struct device;
103static inline int of_platform_populate(struct device_node *root, 104static 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 */
364TESTPAGEFLAG(Compound, compound) 364TESTPAGEFLAG(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
380static inline int PageHead(struct page *page)
381{
382 return ((page->flags & PG_head_tail_mask) == PG_head_mask);
383}
384
379static inline int PageTail(struct page *page) 385static 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
122extern struct pid *alloc_pid(struct pid_namespace *ns); 122extern struct pid *alloc_pid(struct pid_namespace *ns);
123extern void free_pid(struct pid *pid); 123extern void free_pid(struct pid *pid);
124extern 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
43extern struct pid_namespace init_pid_ns; 43extern 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
46static inline struct pid_namespace *get_pid_ns(struct pid_namespace *ns) 48static inline struct pid_namespace *get_pid_ns(struct pid_namespace *ns)
47{ 49{
diff --git a/include/linux/platform_data/imx-iram.h b/include/linux/platform_data/imx-iram.h
new file mode 100644
index 000000000000..022690c33702
--- /dev/null
+++ b/include/linux/platform_data/imx-iram.h
@@ -0,0 +1,41 @@
1/*
2 * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (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
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 * MA 02110-1301, USA.
18 */
19#include <linux/errno.h>
20
21#ifdef CONFIG_IRAM_ALLOC
22
23int __init iram_init(unsigned long base, unsigned long size);
24void __iomem *iram_alloc(unsigned int size, unsigned long *dma_addr);
25void iram_free(unsigned long dma_addr, unsigned int size);
26
27#else
28
29static inline int __init iram_init(unsigned long base, unsigned long size)
30{
31 return -ENOMEM;
32}
33
34static inline void __iomem *iram_alloc(unsigned int size, unsigned long *dma_addr)
35{
36 return NULL;
37}
38
39static inline void iram_free(unsigned long base, unsigned long size) {}
40
41#endif
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
43struct iommu_platform_data { 45struct 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
4struct 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
33struct 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
49struct persistent_ram_zone * __devinit persistent_ram_new(phys_addr_t start, 49struct 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);
52void persistent_ram_free(struct persistent_ram_zone *prz); 51void persistent_ram_free(struct persistent_ram_zone *prz);
53void persistent_ram_zap(struct persistent_ram_zone *prz); 52void 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,
45extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len); 45extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len);
46extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); 46extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len);
47extern void ptrace_disable(struct task_struct *); 47extern void ptrace_disable(struct task_struct *);
48extern int ptrace_check_attach(struct task_struct *task, bool ignore_state);
49extern int ptrace_request(struct task_struct *child, long request, 48extern int ptrace_request(struct task_struct *child, long request,
50 unsigned long addr, unsigned long data); 49 unsigned long addr, unsigned long data);
51extern void ptrace_notify(int exit_code); 50extern 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
347extern int task_current_syscall(struct task_struct *target, long *callno, 350extern 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
174struct pwm_device *of_pwm_xlate_with_flags(struct pwm_chip *pc,
175 const struct of_phandle_args *args);
176
174struct pwm_device *pwm_get(struct device *dev, const char *consumer); 177struct pwm_device *pwm_get(struct device *dev, const char *consumer);
175void pwm_put(struct pwm_device *pwm); 178void 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/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,
123extern void __rb_erase_color(struct rb_node *parent, struct rb_root *root, 123extern 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
126static __always_inline void 126static __always_inline struct rb_node *
127rb_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
223static __always_inline void
224rb_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/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 */
126extern void down_read_nested(struct rw_semaphore *sem, int subclass); 126extern void down_read_nested(struct rw_semaphore *sem, int subclass);
127extern void down_write_nested(struct rw_semaphore *sem, int subclass); 127extern void down_write_nested(struct rw_semaphore *sem, int subclass);
128extern void _down_write_nest_lock(struct rw_semaphore *sem, struct lockdep_map *nest_lock);
129
130# define down_write_nest_lock(sem, nest_lock) \
131do { \
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 f712465b05c5..d2112477ff5e 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1810,6 +1810,7 @@ extern void thread_group_cputime_adjusted(struct task_struct *p, cputime_t *ut,
1810#define PF_MEMALLOC 0x00000800 /* Allocating memory */ 1810#define PF_MEMALLOC 0x00000800 /* Allocating memory */
1811#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 */
1812#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 */
1813#define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ 1814#define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */
1814#define PF_FROZEN 0x00010000 /* frozen for system suspend */ 1815#define PF_FROZEN 0x00010000 /* frozen for system suspend */
1815#define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */ 1816#define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */
@@ -2353,9 +2354,7 @@ extern int do_execve(const char *,
2353 const char __user * const __user *); 2354 const char __user * const __user *);
2354extern long do_fork(unsigned long, unsigned long, unsigned long, int __user *, int __user *); 2355extern long do_fork(unsigned long, unsigned long, unsigned long, int __user *, int __user *);
2355struct task_struct *fork_idle(int); 2356struct task_struct *fork_idle(int);
2356#ifdef CONFIG_GENERIC_KERNEL_THREAD
2357extern pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); 2357extern pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
2358#endif
2359 2358
2360extern void set_task_comm(struct task_struct *tsk, char *from); 2359extern void set_task_comm(struct task_struct *tsk, char *from);
2361extern char *get_task_comm(char *to, struct task_struct *tsk); 2360extern char *get_task_comm(char *to, struct task_struct *tsk);
@@ -2715,7 +2714,16 @@ static inline void thread_group_cputime_init(struct signal_struct *sig)
2715extern void recalc_sigpending_and_wake(struct task_struct *t); 2714extern void recalc_sigpending_and_wake(struct task_struct *t);
2716extern void recalc_sigpending(void); 2715extern void recalc_sigpending(void);
2717 2716
2718extern void signal_wake_up(struct task_struct *t, int resume_stopped); 2717extern void signal_wake_up_state(struct task_struct *t, unsigned int state);
2718
2719static inline void signal_wake_up(struct task_struct *t, bool resume)
2720{
2721 signal_wake_up_state(t, resume ? TASK_WAKEKILL : 0);
2722}
2723static inline void ptrace_signal_wake_up(struct task_struct *t, bool resume)
2724{
2725 signal_wake_up_state(t, resume ? __TASK_TRACED : 0);
2726}
2719 2727
2720/* 2728/*
2721 * 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..eee7478cda70 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
@@ -983,17 +989,29 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
983 * tells the LSM to decrement the number of secmark labeling rules loaded 989 * tells the LSM to decrement the number of secmark labeling rules loaded
984 * @req_classify_flow: 990 * @req_classify_flow:
985 * Sets the flow's sid to the openreq sid. 991 * Sets the flow's sid to the openreq sid.
992 * @tun_dev_alloc_security:
993 * This hook allows a module to allocate a security structure for a TUN
994 * device.
995 * @security pointer to a security structure pointer.
996 * Returns a zero on success, negative values on failure.
997 * @tun_dev_free_security:
998 * This hook allows a module to free the security structure for a TUN
999 * device.
1000 * @security pointer to the TUN device's security structure
986 * @tun_dev_create: 1001 * @tun_dev_create:
987 * Check permissions prior to creating a new TUN device. 1002 * Check permissions prior to creating a new TUN device.
988 * @tun_dev_post_create: 1003 * @tun_dev_attach_queue:
989 * This hook allows a module to update or allocate a per-socket security 1004 * Check permissions prior to attaching to a TUN device queue.
990 * structure. 1005 * @security pointer to the TUN device's security structure.
991 * @sk contains the newly created sock structure.
992 * @tun_dev_attach: 1006 * @tun_dev_attach:
993 * Check permissions prior to attaching to a persistent TUN device. This 1007 * This hook can be used by the module to update any security state
994 * hook can also be used by the module to update any security state
995 * associated with the TUN device's sock structure. 1008 * associated with the TUN device's sock structure.
996 * @sk contains the existing sock structure. 1009 * @sk contains the existing sock structure.
1010 * @security pointer to the TUN device's security structure.
1011 * @tun_dev_open:
1012 * This hook can be used by the module to update any security state
1013 * associated with the TUN device's security structure.
1014 * @security pointer to the TUN devices's security structure.
997 * 1015 *
998 * Security hooks for XFRM operations. 1016 * Security hooks for XFRM operations.
999 * 1017 *
@@ -1508,6 +1526,7 @@ struct security_operations {
1508 int (*kernel_act_as)(struct cred *new, u32 secid); 1526 int (*kernel_act_as)(struct cred *new, u32 secid);
1509 int (*kernel_create_files_as)(struct cred *new, struct inode *inode); 1527 int (*kernel_create_files_as)(struct cred *new, struct inode *inode);
1510 int (*kernel_module_request)(char *kmod_name); 1528 int (*kernel_module_request)(char *kmod_name);
1529 int (*kernel_module_from_file)(struct file *file);
1511 int (*task_fix_setuid) (struct cred *new, const struct cred *old, 1530 int (*task_fix_setuid) (struct cred *new, const struct cred *old,
1512 int flags); 1531 int flags);
1513 int (*task_setpgid) (struct task_struct *p, pid_t pgid); 1532 int (*task_setpgid) (struct task_struct *p, pid_t pgid);
@@ -1613,9 +1632,12 @@ struct security_operations {
1613 void (*secmark_refcount_inc) (void); 1632 void (*secmark_refcount_inc) (void);
1614 void (*secmark_refcount_dec) (void); 1633 void (*secmark_refcount_dec) (void);
1615 void (*req_classify_flow) (const struct request_sock *req, struct flowi *fl); 1634 void (*req_classify_flow) (const struct request_sock *req, struct flowi *fl);
1616 int (*tun_dev_create)(void); 1635 int (*tun_dev_alloc_security) (void **security);
1617 void (*tun_dev_post_create)(struct sock *sk); 1636 void (*tun_dev_free_security) (void *security);
1618 int (*tun_dev_attach)(struct sock *sk); 1637 int (*tun_dev_create) (void);
1638 int (*tun_dev_attach_queue) (void *security);
1639 int (*tun_dev_attach) (struct sock *sk, void *security);
1640 int (*tun_dev_open) (void *security);
1619#endif /* CONFIG_SECURITY_NETWORK */ 1641#endif /* CONFIG_SECURITY_NETWORK */
1620 1642
1621#ifdef CONFIG_SECURITY_NETWORK_XFRM 1643#ifdef CONFIG_SECURITY_NETWORK_XFRM
@@ -1765,6 +1787,7 @@ void security_transfer_creds(struct cred *new, const struct cred *old);
1765int security_kernel_act_as(struct cred *new, u32 secid); 1787int security_kernel_act_as(struct cred *new, u32 secid);
1766int security_kernel_create_files_as(struct cred *new, struct inode *inode); 1788int security_kernel_create_files_as(struct cred *new, struct inode *inode);
1767int security_kernel_module_request(char *kmod_name); 1789int security_kernel_module_request(char *kmod_name);
1790int security_kernel_module_from_file(struct file *file);
1768int security_task_fix_setuid(struct cred *new, const struct cred *old, 1791int security_task_fix_setuid(struct cred *new, const struct cred *old,
1769 int flags); 1792 int flags);
1770int security_task_setpgid(struct task_struct *p, pid_t pgid); 1793int security_task_setpgid(struct task_struct *p, pid_t pgid);
@@ -2278,6 +2301,11 @@ static inline int security_kernel_module_request(char *kmod_name)
2278 return 0; 2301 return 0;
2279} 2302}
2280 2303
2304static inline int security_kernel_module_from_file(struct file *file)
2305{
2306 return 0;
2307}
2308
2281static inline int security_task_fix_setuid(struct cred *new, 2309static inline int security_task_fix_setuid(struct cred *new,
2282 const struct cred *old, 2310 const struct cred *old,
2283 int flags) 2311 int flags)
@@ -2553,9 +2581,12 @@ void security_inet_conn_established(struct sock *sk,
2553int security_secmark_relabel_packet(u32 secid); 2581int security_secmark_relabel_packet(u32 secid);
2554void security_secmark_refcount_inc(void); 2582void security_secmark_refcount_inc(void);
2555void security_secmark_refcount_dec(void); 2583void security_secmark_refcount_dec(void);
2584int security_tun_dev_alloc_security(void **security);
2585void security_tun_dev_free_security(void *security);
2556int security_tun_dev_create(void); 2586int security_tun_dev_create(void);
2557void security_tun_dev_post_create(struct sock *sk); 2587int security_tun_dev_attach_queue(void *security);
2558int security_tun_dev_attach(struct sock *sk); 2588int security_tun_dev_attach(struct sock *sk, void *security);
2589int security_tun_dev_open(void *security);
2559 2590
2560#else /* CONFIG_SECURITY_NETWORK */ 2591#else /* CONFIG_SECURITY_NETWORK */
2561static inline int security_unix_stream_connect(struct sock *sock, 2592static inline int security_unix_stream_connect(struct sock *sock,
@@ -2720,16 +2751,31 @@ static inline void security_secmark_refcount_dec(void)
2720{ 2751{
2721} 2752}
2722 2753
2754static inline int security_tun_dev_alloc_security(void **security)
2755{
2756 return 0;
2757}
2758
2759static inline void security_tun_dev_free_security(void *security)
2760{
2761}
2762
2723static inline int security_tun_dev_create(void) 2763static inline int security_tun_dev_create(void)
2724{ 2764{
2725 return 0; 2765 return 0;
2726} 2766}
2727 2767
2728static inline void security_tun_dev_post_create(struct sock *sk) 2768static inline int security_tun_dev_attach_queue(void *security)
2729{ 2769{
2770 return 0;
2771}
2772
2773static inline int security_tun_dev_attach(struct sock *sk, void *security)
2774{
2775 return 0;
2730} 2776}
2731 2777
2732static inline int security_tun_dev_attach(struct sock *sk) 2778static inline int security_tun_dev_open(void *security)
2733{ 2779{
2734 return 0; 2780 return 0;
2735} 2781}
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
386void signals_init(void); 386void signals_init(void);
387 387
388int restore_altstack(const stack_t __user *);
389int __save_altstack(stack_t __user *, unsigned long);
390
388#endif /* _LINUX_SIGNAL_H */ 391#endif /* _LINUX_SIGNAL_H */
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);
217static inline int get_int(char **bpp, int *anint) 217static 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/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
339static inline void svc_free_res_pages(struct svc_rqst *rqstp) 340static 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
41static inline u32 svc_sock_reclen(struct svc_sock *svsk)
42{
43 return ntohl(svsk->sk_reclen) & RPC_FRAGMENT_SIZE_MASK;
44}
45
46static 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;
63struct old_linux_dirent; 63struct old_linux_dirent;
64struct perf_event_attr; 64struct perf_event_attr;
65struct file_handle; 65struct file_handle;
66struct 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);
299asmlinkage long sys_sigpending(old_sigset_t __user *set); 300asmlinkage long sys_sigpending(old_sigset_t __user *set);
300asmlinkage long sys_sigprocmask(int how, old_sigset_t __user *set, 301asmlinkage 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
304asmlinkage long sys_sigaltstack(const struct sigaltstack __user *uss,
305 struct sigaltstack __user *uoss);
306#endif
307
302asmlinkage long sys_getitimer(int which, struct itimerval __user *value); 308asmlinkage long sys_getitimer(int which, struct itimerval __user *value);
303asmlinkage long sys_setitimer(int which, 309asmlinkage 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);
828asmlinkage long sys_syncfs(int fd); 834asmlinkage long sys_syncfs(int fd);
829 835
830#ifndef CONFIG_GENERIC_KERNEL_EXECVE
831int 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
839asmlinkage long sys_fork(void); 836asmlinkage long sys_fork(void);
840asmlinkage long sys_vfork(void); 837asmlinkage 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
881asmlinkage long sys_kcmp(pid_t pid1, pid_t pid2, int type, 878asmlinkage 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);
880asmlinkage long sys_finit_module(int fd, const char __user *uargs, int flags);
883#endif 881#endif
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..5de7a220e986 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
74static inline struct usb_driver *driver_of(struct usb_interface *intf) 75static inline struct usb_driver *driver_of(struct usb_interface *intf)
@@ -99,6 +100,7 @@ struct driver_info {
99#define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */ 100#define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */
100 101
101#define FLAG_POINTTOPOINT 0x1000 /* possibly use "usb%d" names */ 102#define FLAG_POINTTOPOINT 0x1000 /* possibly use "usb%d" names */
103#define FLAG_NOARP 0x2000 /* device can't do ARP */
102 104
103/* 105/*
104 * Indicates to usbnet, that USB driver accumulates multiple IP packets. 106 * Indicates to usbnet, that USB driver accumulates multiple IP packets.
@@ -240,4 +242,6 @@ extern void usbnet_set_msglevel(struct net_device *, u32);
240extern void usbnet_get_drvinfo(struct net_device *, struct ethtool_drvinfo *); 242extern void usbnet_get_drvinfo(struct net_device *, struct ethtool_drvinfo *);
241extern int usbnet_nway_reset(struct net_device *net); 243extern int usbnet_nway_reset(struct net_device *net);
242 244
245extern int usbnet_manage_power(struct usbnet *, int);
246
243#endif /* __LINUX_USB_USBNET_H */ 247#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 */
20struct virtqueue { 26struct 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
51unsigned int virtqueue_get_vring_size(struct virtqueue *vq); 59unsigned int virtqueue_get_vring_size(struct virtqueue *vq);
52 60
53int virtqueue_get_queue_index(struct virtqueue *vq); 61/* FIXME: Obsolete accessor, but required for virtio_net merge. */
62static 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) 88static inline struct virtio_device *dev_to_virtio(struct device *_dev)
89{
90 return container_of(_dev, struct virtio_device, dev);
91}
92
77int register_virtio_device(struct virtio_device *dev); 93int register_virtio_device(struct virtio_device *dev);
78void unregister_virtio_device(struct virtio_device *dev); 94void unregister_virtio_device(struct virtio_device *dev);
79 95
@@ -103,6 +119,11 @@ struct virtio_driver {
103#endif 119#endif
104}; 120};
105 121
122static inline struct virtio_driver *drv_to_virtio(struct device_driver *drv)
123{
124 return container_of(drv, struct virtio_driver, driver);
125}
126
106int register_virtio_driver(struct virtio_driver *drv); 127int register_virtio_driver(struct virtio_driver *drv);
107void unregister_virtio_driver(struct virtio_driver *drv); 128void 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 */
133extern int watchdog_register_device(struct watchdog_device *); 133extern int watchdog_register_device(struct watchdog_device *);
134extern void watchdog_unregister_device(struct watchdog_device *); 134extern 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
320extern void inet_csk_destroy_sock(struct sock *sk); 320extern void inet_csk_destroy_sock(struct sock *sk);
321extern 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/ip.h b/include/net/ip.h
index 0707fb9551aa..a68f838a132c 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -143,6 +143,8 @@ static inline struct sk_buff *ip_finish_skb(struct sock *sk, struct flowi4 *fl4)
143extern int ip4_datagram_connect(struct sock *sk, 143extern int ip4_datagram_connect(struct sock *sk,
144 struct sockaddr *uaddr, int addr_len); 144 struct sockaddr *uaddr, int addr_len);
145 145
146extern void ip4_datagram_release_cb(struct sock *sk);
147
146struct ip_reply_arg { 148struct ip_reply_arg {
147 struct kvec iov[1]; 149 struct kvec iov[1];
148 int flags; 150 int flags;
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
81struct rd_msg {
82 struct icmp6hdr icmph;
83 struct in6_addr target;
84 struct in6_addr dest;
85 __u8 opt[0];
86};
87
81struct nd_opt_hdr { 88struct 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/netfilter/nf_conntrack_core.h b/include/net/netfilter/nf_conntrack_core.h
index d8f5b9f52169..e98aeb3da033 100644
--- a/include/net/netfilter/nf_conntrack_core.h
+++ b/include/net/netfilter/nf_conntrack_core.h
@@ -31,6 +31,8 @@ extern void nf_conntrack_cleanup(struct net *net);
31extern int nf_conntrack_proto_init(struct net *net); 31extern int nf_conntrack_proto_init(struct net *net);
32extern void nf_conntrack_proto_fini(struct net *net); 32extern void nf_conntrack_proto_fini(struct net *net);
33 33
34extern void nf_conntrack_cleanup_end(void);
35
34extern bool 36extern bool
35nf_ct_get_tuple(const struct sk_buff *skb, 37nf_ct_get_tuple(const struct sk_buff *skb,
36 unsigned int nhoff, 38 unsigned int nhoff,
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
9struct netns_xt { 9struct 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/scsi/scsi_host.h b/include/scsi/scsi_host.h
index 49084807eb6b..2b6956e9853d 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -873,7 +873,7 @@ static inline unsigned int scsi_host_dif_capable(struct Scsi_Host *shost, unsign
873 SHOST_DIF_TYPE2_PROTECTION, 873 SHOST_DIF_TYPE2_PROTECTION,
874 SHOST_DIF_TYPE3_PROTECTION }; 874 SHOST_DIF_TYPE3_PROTECTION };
875 875
876 if (target_type > SHOST_DIF_TYPE3_PROTECTION) 876 if (target_type >= ARRAY_SIZE(cap))
877 return 0; 877 return 0;
878 878
879 return shost->prot_capabilities & cap[target_type] ? target_type : 0; 879 return shost->prot_capabilities & cap[target_type] ? target_type : 0;
@@ -887,7 +887,7 @@ static inline unsigned int scsi_host_dix_capable(struct Scsi_Host *shost, unsign
887 SHOST_DIX_TYPE2_PROTECTION, 887 SHOST_DIX_TYPE2_PROTECTION,
888 SHOST_DIX_TYPE3_PROTECTION }; 888 SHOST_DIX_TYPE3_PROTECTION };
889 889
890 if (target_type > SHOST_DIX_TYPE3_PROTECTION) 890 if (target_type >= ARRAY_SIZE(cap))
891 return 0; 891 return 0;
892 892
893 return shost->prot_capabilities & cap[target_type]; 893 return shost->prot_capabilities & cap[target_type];
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
20struct cs4271_platform_data { 20struct 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
175enum tcm_sense_reason_table { 175enum 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/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
454TRACE_EVENT(ext4_invalidatepage, 454DECLARE_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
480DEFINE_EVENT(ext4_invalidatepage_op, ext4_invalidatepage,
481 TP_PROTO(struct page *page, unsigned long offset),
482
483 TP_ARGS(page, offset)
484);
485
486DEFINE_EVENT(ext4_invalidatepage_op, ext4_journalled_invalidatepage,
487 TP_PROTO(struct page *page, unsigned long offset),
488
489 TP_ARGS(page, offset)
490);
491
480TRACE_EVENT(ext4_discard_blocks, 492TRACE_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/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
190enum drm_exynos_degree { 178enum 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
311typedef struct drm_i915_getparam { 312typedef 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
164struct br_mdb_entry { 164struct 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 */
15struct msqid_ds { 16struct 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
46static inline __attribute_const__ __u16 __fswab16(__u16 val) 46static 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
55static inline __attribute_const__ __u32 __fswab32(__u32 val) 57static 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
64static inline __attribute_const__ __u64 __fswab64(__u64 val) 68static 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 */
30struct tfp410_platform_data { 30struct 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