aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acct.h4
-rw-r--r--include/linux/acpi.h11
-rw-r--r--include/linux/atmel-pwm-bl.h43
-rw-r--r--include/linux/atmel_pwm.h70
-rw-r--r--include/linux/bio.h1
-rw-r--r--include/linux/bitmap.h62
-rw-r--r--include/linux/blkdev.h4
-rw-r--r--include/linux/byteorder/generic.h2
-rw-r--r--include/linux/ceph/messenger.h14
-rw-r--r--include/linux/ceph/osd_client.h18
-rw-r--r--include/linux/cma.h27
-rw-r--r--include/linux/cred.h9
-rw-r--r--include/linux/dcache.h1
-rw-r--r--include/linux/decompress/bunzip2.h8
-rw-r--r--include/linux/decompress/generic.h10
-rw-r--r--include/linux/decompress/inflate.h8
-rw-r--r--include/linux/decompress/unlz4.h8
-rw-r--r--include/linux/decompress/unlzma.h8
-rw-r--r--include/linux/decompress/unlzo.h8
-rw-r--r--include/linux/decompress/unxz.h8
-rw-r--r--include/linux/dma-contiguous.h11
-rw-r--r--include/linux/dmaengine.h5
-rw-r--r--include/linux/drbd.h4
-rw-r--r--include/linux/drbd_genl.h4
-rw-r--r--include/linux/drbd_limits.h6
-rw-r--r--include/linux/efi.h19
-rw-r--r--include/linux/fb.h2
-rw-r--r--include/linux/fs.h33
-rw-r--r--include/linux/fs_pin.h17
-rw-r--r--include/linux/fsnotify_backend.h14
-rw-r--r--include/linux/ftrace_event.h34
-rw-r--r--include/linux/gfp.h2
-rw-r--r--include/linux/glob.h9
-rw-r--r--include/linux/gpio/consumer.h81
-rw-r--r--include/linux/gpio/driver.h66
-rw-r--r--include/linux/gpio/machine.h61
-rw-r--r--include/linux/hid.h6
-rw-r--r--include/linux/highmem.h2
-rw-r--r--include/linux/host1x.h15
-rw-r--r--include/linux/huge_mm.h4
-rw-r--r--include/linux/hugetlb.h1
-rw-r--r--include/linux/i2c.h12
-rw-r--r--include/linux/i2c/atmel_mxt_ts.h3
-rw-r--r--include/linux/i2c/s6000.h10
-rw-r--r--include/linux/if_vlan.h6
-rw-r--r--include/linux/input/pixcir_ts.h12
-rw-r--r--include/linux/ioport.h6
-rw-r--r--include/linux/kernel.h8
-rw-r--r--include/linux/kexec.h104
-rw-r--r--include/linux/klist.h2
-rw-r--r--include/linux/kvm_host.h47
-rw-r--r--include/linux/leds.h5
-rw-r--r--include/linux/list.h14
-rw-r--r--include/linux/memblock.h4
-rw-r--r--include/linux/memcontrol.h98
-rw-r--r--include/linux/memory_hotplug.h10
-rw-r--r--include/linux/mfd/abx500/ab8500.h1
-rw-r--r--include/linux/mfd/arizona/core.h35
-rw-r--r--include/linux/mfd/arizona/registers.h785
-rw-r--r--include/linux/mfd/cros_ec.h110
-rw-r--r--include/linux/mfd/da9063/core.h3
-rw-r--r--include/linux/mfd/da9063/registers.h129
-rw-r--r--include/linux/mfd/intel_soc_pmic.h30
-rw-r--r--include/linux/mfd/max77686-private.h239
-rw-r--r--include/linux/mfd/max77686.h59
-rw-r--r--include/linux/mfd/mc13783.h1
-rw-r--r--include/linux/mfd/mc13xxx.h23
-rw-r--r--include/linux/mfd/rtsx_pci.h6
-rw-r--r--include/linux/mfd/samsung/core.h1
-rw-r--r--include/linux/mfd/samsung/irq.h24
-rw-r--r--include/linux/mfd/samsung/s2mpu02.h201
-rw-r--r--include/linux/mfd/tps65910.h2
-rw-r--r--include/linux/mlx4/cmd.h7
-rw-r--r--include/linux/mlx4/device.h17
-rw-r--r--include/linux/mm.h17
-rw-r--r--include/linux/mm_types.h1
-rw-r--r--include/linux/mmc/dw_mmc.h2
-rw-r--r--include/linux/mmc/sdhci.h3
-rw-r--r--include/linux/mmdebug.h2
-rw-r--r--include/linux/mmu_notifier.h6
-rw-r--r--include/linux/mmzone.h219
-rw-r--r--include/linux/module.h11
-rw-r--r--include/linux/moduleloader.h6
-rw-r--r--include/linux/mount.h13
-rw-r--r--include/linux/mtd/mtd.h2
-rw-r--r--include/linux/mtd/nand.h53
-rw-r--r--include/linux/mtd/spi-nor.h4
-rw-r--r--include/linux/mvebu-pmsu.h20
-rw-r--r--include/linux/nfs_fs.h2
-rw-r--r--include/linux/nfs_fs_sb.h1
-rw-r--r--include/linux/nfs_page.h19
-rw-r--r--include/linux/nfs_xdr.h34
-rw-r--r--include/linux/nodemask.h11
-rw-r--r--include/linux/nsproxy.h16
-rw-r--r--include/linux/of.h87
-rw-r--r--include/linux/of_dma.h4
-rw-r--r--include/linux/of_platform.h7
-rw-r--r--include/linux/of_reserved_mem.h7
-rw-r--r--include/linux/omap-dma.h1
-rw-r--r--include/linux/oom.h4
-rw-r--r--include/linux/page-flags.h21
-rw-r--r--include/linux/page_cgroup.h70
-rw-r--r--include/linux/pagemap.h3
-rw-r--r--include/linux/pid_namespace.h1
-rw-r--r--include/linux/pinctrl/pinmux.h2
-rw-r--r--include/linux/platform_data/camera-mx1.h35
-rw-r--r--include/linux/platform_data/dma-imx.h1
-rw-r--r--include/linux/platform_data/edma.h2
-rw-r--r--include/linux/platform_data/mmc-omap.h1
-rw-r--r--include/linux/platform_data/usb-ehci-mxc.h46
-rw-r--r--include/linux/platform_data/usb-imx_udc.h23
-rw-r--r--include/linux/platform_data/video-clcd-versatile.h27
-rw-r--r--include/linux/printk.h5
-rw-r--r--include/linux/quota.h1
-rw-r--r--include/linux/rculist.h8
-rw-r--r--include/linux/rhashtable.h17
-rw-r--r--include/linux/rio_drv.h5
-rw-r--r--include/linux/scatterlist.h2
-rw-r--r--include/linux/sched.h19
-rw-r--r--include/linux/sh_dma.h24
-rw-r--r--include/linux/shm.h18
-rw-r--r--include/linux/shmem_fs.h17
-rw-r--r--include/linux/signal.h15
-rw-r--r--include/linux/skbuff.h1
-rw-r--r--include/linux/sunrpc/auth.h4
-rw-r--r--include/linux/sunrpc/auth_gss.h3
-rw-r--r--include/linux/sunrpc/gss_krb5.h4
-rw-r--r--include/linux/sunrpc/svc.h4
-rw-r--r--include/linux/sunrpc/svc_rdma.h3
-rw-r--r--include/linux/sunrpc/svc_xprt.h2
-rw-r--r--include/linux/sunrpc/xprtrdma.h2
-rw-r--r--include/linux/swap.h16
-rw-r--r--include/linux/syscalls.h5
-rw-r--r--include/linux/sysctl.h2
-rw-r--r--include/linux/tegra-ahb.h19
-rw-r--r--include/linux/tegra-cpuidle.h25
-rw-r--r--include/linux/tegra-powergate.h134
-rw-r--r--include/linux/tegra-soc.h22
-rw-r--r--include/linux/thermal.h46
-rw-r--r--include/linux/tracehook.h8
-rw-r--r--include/linux/tracepoint.h44
-rw-r--r--include/linux/uio.h2
-rw-r--r--include/linux/user_namespace.h6
-rw-r--r--include/linux/vfio.h23
-rw-r--r--include/linux/vmalloc.h2
-rw-r--r--include/linux/zbud.h2
-rw-r--r--include/linux/zlib.h122
-rw-r--r--include/linux/zpool.h106
148 files changed, 2845 insertions, 1411 deletions
diff --git a/include/linux/acct.h b/include/linux/acct.h
index 4a5b7cb56079..dccc2d4fe7de 100644
--- a/include/linux/acct.h
+++ b/include/linux/acct.h
@@ -24,14 +24,10 @@ struct super_block;
24struct pacct_struct; 24struct pacct_struct;
25struct pid_namespace; 25struct pid_namespace;
26extern int acct_parm[]; /* for sysctl */ 26extern int acct_parm[]; /* for sysctl */
27extern void acct_auto_close_mnt(struct vfsmount *m);
28extern void acct_auto_close(struct super_block *sb);
29extern void acct_collect(long exitcode, int group_dead); 27extern void acct_collect(long exitcode, int group_dead);
30extern void acct_process(void); 28extern void acct_process(void);
31extern void acct_exit_ns(struct pid_namespace *); 29extern void acct_exit_ns(struct pid_namespace *);
32#else 30#else
33#define acct_auto_close_mnt(x) do { } while (0)
34#define acct_auto_close(x) do { } while (0)
35#define acct_collect(x,y) do { } while (0) 31#define acct_collect(x,y) do { } while (0)
36#define acct_process() do { } while (0) 32#define acct_process() do { } while (0)
37#define acct_exit_ns(ns) do { } while (0) 33#define acct_exit_ns(ns) do { } while (0)
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 5320153c311b..807cbc46d73e 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -364,6 +364,17 @@ extern bool osc_sb_apei_support_acked;
364#define OSC_PCI_EXPRESS_CAPABILITY_CONTROL 0x00000010 364#define OSC_PCI_EXPRESS_CAPABILITY_CONTROL 0x00000010
365#define OSC_PCI_CONTROL_MASKS 0x0000001f 365#define OSC_PCI_CONTROL_MASKS 0x0000001f
366 366
367#define ACPI_GSB_ACCESS_ATTRIB_QUICK 0x00000002
368#define ACPI_GSB_ACCESS_ATTRIB_SEND_RCV 0x00000004
369#define ACPI_GSB_ACCESS_ATTRIB_BYTE 0x00000006
370#define ACPI_GSB_ACCESS_ATTRIB_WORD 0x00000008
371#define ACPI_GSB_ACCESS_ATTRIB_BLOCK 0x0000000A
372#define ACPI_GSB_ACCESS_ATTRIB_MULTIBYTE 0x0000000B
373#define ACPI_GSB_ACCESS_ATTRIB_WORD_CALL 0x0000000C
374#define ACPI_GSB_ACCESS_ATTRIB_BLOCK_CALL 0x0000000D
375#define ACPI_GSB_ACCESS_ATTRIB_RAW_BYTES 0x0000000E
376#define ACPI_GSB_ACCESS_ATTRIB_RAW_PROCESS 0x0000000F
377
367extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, 378extern acpi_status acpi_pci_osc_control_set(acpi_handle handle,
368 u32 *mask, u32 req); 379 u32 *mask, u32 req);
369 380
diff --git a/include/linux/atmel-pwm-bl.h b/include/linux/atmel-pwm-bl.h
deleted file mode 100644
index 0153a47806c2..000000000000
--- a/include/linux/atmel-pwm-bl.h
+++ /dev/null
@@ -1,43 +0,0 @@
1/*
2 * Copyright (C) 2007 Atmel Corporation
3 *
4 * Driver for the AT32AP700X PS/2 controller (PSIF).
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation.
9 */
10
11#ifndef __INCLUDE_ATMEL_PWM_BL_H
12#define __INCLUDE_ATMEL_PWM_BL_H
13
14/**
15 * struct atmel_pwm_bl_platform_data
16 * @pwm_channel: which PWM channel in the PWM module to use.
17 * @pwm_frequency: PWM frequency to generate, the driver will try to be as
18 * close as the prescaler allows.
19 * @pwm_compare_max: value to use in the PWM channel compare register.
20 * @pwm_duty_max: maximum duty cycle value, must be less than or equal to
21 * pwm_compare_max.
22 * @pwm_duty_min: minimum duty cycle value, must be less than pwm_duty_max.
23 * @pwm_active_low: set to one if the low part of the PWM signal increases the
24 * brightness of the backlight.
25 * @gpio_on: GPIO line to control the backlight on/off, set to -1 if not used.
26 * @on_active_low: set to one if the on/off signal is on when GPIO is low.
27 *
28 * This struct must be added to the platform device in the board code. It is
29 * used by the atmel-pwm-bl driver to setup the GPIO to control on/off and the
30 * PWM device.
31 */
32struct atmel_pwm_bl_platform_data {
33 unsigned int pwm_channel;
34 unsigned int pwm_frequency;
35 unsigned int pwm_compare_max;
36 unsigned int pwm_duty_max;
37 unsigned int pwm_duty_min;
38 unsigned int pwm_active_low;
39 int gpio_on;
40 unsigned int on_active_low;
41};
42
43#endif /* __INCLUDE_ATMEL_PWM_BL_H */
diff --git a/include/linux/atmel_pwm.h b/include/linux/atmel_pwm.h
deleted file mode 100644
index ea04abb3db8e..000000000000
--- a/include/linux/atmel_pwm.h
+++ /dev/null
@@ -1,70 +0,0 @@
1#ifndef __LINUX_ATMEL_PWM_H
2#define __LINUX_ATMEL_PWM_H
3
4/**
5 * struct pwm_channel - driver handle to a PWM channel
6 * @regs: base of this channel's registers
7 * @index: number of this channel (0..31)
8 * @mck: base clock rate, which can be prescaled and maybe subdivided
9 *
10 * Drivers initialize a pwm_channel structure using pwm_channel_alloc().
11 * Then they configure its clock rate (derived from MCK), alignment,
12 * polarity, and duty cycle by writing directly to the channel registers,
13 * before enabling the channel by calling pwm_channel_enable().
14 *
15 * After emitting a PWM signal for the desired length of time, drivers
16 * may then pwm_channel_disable() or pwm_channel_free(). Both of these
17 * disable the channel, but when it's freed the IRQ is deconfigured and
18 * the channel must later be re-allocated and reconfigured.
19 *
20 * Note that if the period or duty cycle need to be changed while the
21 * PWM channel is operating, drivers must use the PWM_CUPD double buffer
22 * mechanism, either polling until they change or getting implicitly
23 * notified through a once-per-period interrupt handler.
24 */
25struct pwm_channel {
26 void __iomem *regs;
27 unsigned index;
28 unsigned long mck;
29};
30
31extern int pwm_channel_alloc(int index, struct pwm_channel *ch);
32extern int pwm_channel_free(struct pwm_channel *ch);
33
34extern int pwm_clk_alloc(unsigned prescale, unsigned div);
35extern void pwm_clk_free(unsigned clk);
36
37extern int __pwm_channel_onoff(struct pwm_channel *ch, int enabled);
38
39#define pwm_channel_enable(ch) __pwm_channel_onoff((ch), 1)
40#define pwm_channel_disable(ch) __pwm_channel_onoff((ch), 0)
41
42/* periodic interrupts, mostly for CUPD changes to period or cycle */
43extern int pwm_channel_handler(struct pwm_channel *ch,
44 void (*handler)(struct pwm_channel *ch));
45
46/* per-channel registers (banked at pwm_channel->regs) */
47#define PWM_CMR 0x00 /* mode register */
48#define PWM_CPR_CPD (1 << 10) /* set: CUPD modifies period */
49#define PWM_CPR_CPOL (1 << 9) /* set: idle high */
50#define PWM_CPR_CALG (1 << 8) /* set: center align */
51#define PWM_CPR_CPRE (0xf << 0) /* mask: rate is mck/(2^pre) */
52#define PWM_CPR_CLKA (0xb << 0) /* rate CLKA */
53#define PWM_CPR_CLKB (0xc << 0) /* rate CLKB */
54#define PWM_CDTY 0x04 /* duty cycle (max of CPRD) */
55#define PWM_CPRD 0x08 /* period (count up from zero) */
56#define PWM_CCNT 0x0c /* counter (20 bits?) */
57#define PWM_CUPD 0x10 /* update CPRD (or CDTY) next period */
58
59static inline void
60pwm_channel_writel(struct pwm_channel *pwmc, unsigned offset, u32 val)
61{
62 __raw_writel(val, pwmc->regs + offset);
63}
64
65static inline u32 pwm_channel_readl(struct pwm_channel *pwmc, unsigned offset)
66{
67 return __raw_readl(pwmc->regs + offset);
68}
69
70#endif /* __LINUX_ATMEL_PWM_H */
diff --git a/include/linux/bio.h b/include/linux/bio.h
index d2633ee099d9..b39e5000ff58 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -308,6 +308,7 @@ struct bio_integrity_payload {
308 308
309 unsigned short bip_slab; /* slab the bip came from */ 309 unsigned short bip_slab; /* slab the bip came from */
310 unsigned short bip_vcnt; /* # of integrity bio_vecs */ 310 unsigned short bip_vcnt; /* # of integrity bio_vecs */
311 unsigned short bip_max_vcnt; /* integrity bio_vec slots */
311 unsigned bip_owns_buf:1; /* should free bip_buf */ 312 unsigned bip_owns_buf:1; /* should free bip_buf */
312 313
313 struct work_struct bip_work; /* I/O completion */ 314 struct work_struct bip_work; /* I/O completion */
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h
index 7ad634501e48..e1c8d080c427 100644
--- a/include/linux/bitmap.h
+++ b/include/linux/bitmap.h
@@ -88,32 +88,32 @@
88 * lib/bitmap.c provides these functions: 88 * lib/bitmap.c provides these functions:
89 */ 89 */
90 90
91extern int __bitmap_empty(const unsigned long *bitmap, int bits); 91extern int __bitmap_empty(const unsigned long *bitmap, unsigned int nbits);
92extern int __bitmap_full(const unsigned long *bitmap, int bits); 92extern int __bitmap_full(const unsigned long *bitmap, unsigned int nbits);
93extern int __bitmap_equal(const unsigned long *bitmap1, 93extern int __bitmap_equal(const unsigned long *bitmap1,
94 const unsigned long *bitmap2, int bits); 94 const unsigned long *bitmap2, unsigned int nbits);
95extern void __bitmap_complement(unsigned long *dst, const unsigned long *src, 95extern void __bitmap_complement(unsigned long *dst, const unsigned long *src,
96 int bits); 96 unsigned int nbits);
97extern void __bitmap_shift_right(unsigned long *dst, 97extern void __bitmap_shift_right(unsigned long *dst,
98 const unsigned long *src, int shift, int bits); 98 const unsigned long *src, int shift, int bits);
99extern void __bitmap_shift_left(unsigned long *dst, 99extern void __bitmap_shift_left(unsigned long *dst,
100 const unsigned long *src, int shift, int bits); 100 const unsigned long *src, int shift, int bits);
101extern int __bitmap_and(unsigned long *dst, const unsigned long *bitmap1, 101extern int __bitmap_and(unsigned long *dst, const unsigned long *bitmap1,
102 const unsigned long *bitmap2, int bits); 102 const unsigned long *bitmap2, unsigned int nbits);
103extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1, 103extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1,
104 const unsigned long *bitmap2, int bits); 104 const unsigned long *bitmap2, unsigned int nbits);
105extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1, 105extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1,
106 const unsigned long *bitmap2, int bits); 106 const unsigned long *bitmap2, unsigned int nbits);
107extern int __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1, 107extern int __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1,
108 const unsigned long *bitmap2, int bits); 108 const unsigned long *bitmap2, unsigned int nbits);
109extern int __bitmap_intersects(const unsigned long *bitmap1, 109extern int __bitmap_intersects(const unsigned long *bitmap1,
110 const unsigned long *bitmap2, int bits); 110 const unsigned long *bitmap2, unsigned int nbits);
111extern int __bitmap_subset(const unsigned long *bitmap1, 111extern int __bitmap_subset(const unsigned long *bitmap1,
112 const unsigned long *bitmap2, int bits); 112 const unsigned long *bitmap2, unsigned int nbits);
113extern int __bitmap_weight(const unsigned long *bitmap, int bits); 113extern int __bitmap_weight(const unsigned long *bitmap, unsigned int nbits);
114 114
115extern void bitmap_set(unsigned long *map, int i, int len); 115extern void bitmap_set(unsigned long *map, unsigned int start, int len);
116extern void bitmap_clear(unsigned long *map, int start, int nr); 116extern void bitmap_clear(unsigned long *map, unsigned int start, int len);
117extern unsigned long bitmap_find_next_zero_area(unsigned long *map, 117extern unsigned long bitmap_find_next_zero_area(unsigned long *map,
118 unsigned long size, 118 unsigned long size,
119 unsigned long start, 119 unsigned long start,
@@ -140,9 +140,9 @@ extern void bitmap_onto(unsigned long *dst, const unsigned long *orig,
140 const unsigned long *relmap, int bits); 140 const unsigned long *relmap, int bits);
141extern void bitmap_fold(unsigned long *dst, const unsigned long *orig, 141extern void bitmap_fold(unsigned long *dst, const unsigned long *orig,
142 int sz, int bits); 142 int sz, int bits);
143extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order); 143extern int bitmap_find_free_region(unsigned long *bitmap, unsigned int bits, int order);
144extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); 144extern void bitmap_release_region(unsigned long *bitmap, unsigned int pos, int order);
145extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); 145extern int bitmap_allocate_region(unsigned long *bitmap, unsigned int pos, int order);
146extern void bitmap_copy_le(void *dst, const unsigned long *src, int nbits); 146extern void bitmap_copy_le(void *dst, const unsigned long *src, int nbits);
147extern int bitmap_ord_to_pos(const unsigned long *bitmap, int n, int bits); 147extern int bitmap_ord_to_pos(const unsigned long *bitmap, int n, int bits);
148 148
@@ -188,15 +188,15 @@ static inline void bitmap_copy(unsigned long *dst, const unsigned long *src,
188} 188}
189 189
190static inline int bitmap_and(unsigned long *dst, const unsigned long *src1, 190static inline int bitmap_and(unsigned long *dst, const unsigned long *src1,
191 const unsigned long *src2, int nbits) 191 const unsigned long *src2, unsigned int nbits)
192{ 192{
193 if (small_const_nbits(nbits)) 193 if (small_const_nbits(nbits))
194 return (*dst = *src1 & *src2) != 0; 194 return (*dst = *src1 & *src2 & BITMAP_LAST_WORD_MASK(nbits)) != 0;
195 return __bitmap_and(dst, src1, src2, nbits); 195 return __bitmap_and(dst, src1, src2, nbits);
196} 196}
197 197
198static inline void bitmap_or(unsigned long *dst, const unsigned long *src1, 198static inline void bitmap_or(unsigned long *dst, const unsigned long *src1,
199 const unsigned long *src2, int nbits) 199 const unsigned long *src2, unsigned int nbits)
200{ 200{
201 if (small_const_nbits(nbits)) 201 if (small_const_nbits(nbits))
202 *dst = *src1 | *src2; 202 *dst = *src1 | *src2;
@@ -205,7 +205,7 @@ static inline void bitmap_or(unsigned long *dst, const unsigned long *src1,
205} 205}
206 206
207static inline void bitmap_xor(unsigned long *dst, const unsigned long *src1, 207static inline void bitmap_xor(unsigned long *dst, const unsigned long *src1,
208 const unsigned long *src2, int nbits) 208 const unsigned long *src2, unsigned int nbits)
209{ 209{
210 if (small_const_nbits(nbits)) 210 if (small_const_nbits(nbits))
211 *dst = *src1 ^ *src2; 211 *dst = *src1 ^ *src2;
@@ -214,24 +214,24 @@ static inline void bitmap_xor(unsigned long *dst, const unsigned long *src1,
214} 214}
215 215
216static inline int bitmap_andnot(unsigned long *dst, const unsigned long *src1, 216static inline int bitmap_andnot(unsigned long *dst, const unsigned long *src1,
217 const unsigned long *src2, int nbits) 217 const unsigned long *src2, unsigned int nbits)
218{ 218{
219 if (small_const_nbits(nbits)) 219 if (small_const_nbits(nbits))
220 return (*dst = *src1 & ~(*src2)) != 0; 220 return (*dst = *src1 & ~(*src2) & BITMAP_LAST_WORD_MASK(nbits)) != 0;
221 return __bitmap_andnot(dst, src1, src2, nbits); 221 return __bitmap_andnot(dst, src1, src2, nbits);
222} 222}
223 223
224static inline void bitmap_complement(unsigned long *dst, const unsigned long *src, 224static inline void bitmap_complement(unsigned long *dst, const unsigned long *src,
225 int nbits) 225 unsigned int nbits)
226{ 226{
227 if (small_const_nbits(nbits)) 227 if (small_const_nbits(nbits))
228 *dst = ~(*src) & BITMAP_LAST_WORD_MASK(nbits); 228 *dst = ~(*src);
229 else 229 else
230 __bitmap_complement(dst, src, nbits); 230 __bitmap_complement(dst, src, nbits);
231} 231}
232 232
233static inline int bitmap_equal(const unsigned long *src1, 233static inline int bitmap_equal(const unsigned long *src1,
234 const unsigned long *src2, int nbits) 234 const unsigned long *src2, unsigned int nbits)
235{ 235{
236 if (small_const_nbits(nbits)) 236 if (small_const_nbits(nbits))
237 return ! ((*src1 ^ *src2) & BITMAP_LAST_WORD_MASK(nbits)); 237 return ! ((*src1 ^ *src2) & BITMAP_LAST_WORD_MASK(nbits));
@@ -240,7 +240,7 @@ static inline int bitmap_equal(const unsigned long *src1,
240} 240}
241 241
242static inline int bitmap_intersects(const unsigned long *src1, 242static inline int bitmap_intersects(const unsigned long *src1,
243 const unsigned long *src2, int nbits) 243 const unsigned long *src2, unsigned int nbits)
244{ 244{
245 if (small_const_nbits(nbits)) 245 if (small_const_nbits(nbits))
246 return ((*src1 & *src2) & BITMAP_LAST_WORD_MASK(nbits)) != 0; 246 return ((*src1 & *src2) & BITMAP_LAST_WORD_MASK(nbits)) != 0;
@@ -249,7 +249,7 @@ static inline int bitmap_intersects(const unsigned long *src1,
249} 249}
250 250
251static inline int bitmap_subset(const unsigned long *src1, 251static inline int bitmap_subset(const unsigned long *src1,
252 const unsigned long *src2, int nbits) 252 const unsigned long *src2, unsigned int nbits)
253{ 253{
254 if (small_const_nbits(nbits)) 254 if (small_const_nbits(nbits))
255 return ! ((*src1 & ~(*src2)) & BITMAP_LAST_WORD_MASK(nbits)); 255 return ! ((*src1 & ~(*src2)) & BITMAP_LAST_WORD_MASK(nbits));
@@ -257,7 +257,7 @@ static inline int bitmap_subset(const unsigned long *src1,
257 return __bitmap_subset(src1, src2, nbits); 257 return __bitmap_subset(src1, src2, nbits);
258} 258}
259 259
260static inline int bitmap_empty(const unsigned long *src, int nbits) 260static inline int bitmap_empty(const unsigned long *src, unsigned nbits)
261{ 261{
262 if (small_const_nbits(nbits)) 262 if (small_const_nbits(nbits))
263 return ! (*src & BITMAP_LAST_WORD_MASK(nbits)); 263 return ! (*src & BITMAP_LAST_WORD_MASK(nbits));
@@ -265,7 +265,7 @@ static inline int bitmap_empty(const unsigned long *src, int nbits)
265 return __bitmap_empty(src, nbits); 265 return __bitmap_empty(src, nbits);
266} 266}
267 267
268static inline int bitmap_full(const unsigned long *src, int nbits) 268static inline int bitmap_full(const unsigned long *src, unsigned int nbits)
269{ 269{
270 if (small_const_nbits(nbits)) 270 if (small_const_nbits(nbits))
271 return ! (~(*src) & BITMAP_LAST_WORD_MASK(nbits)); 271 return ! (~(*src) & BITMAP_LAST_WORD_MASK(nbits));
@@ -273,7 +273,7 @@ static inline int bitmap_full(const unsigned long *src, int nbits)
273 return __bitmap_full(src, nbits); 273 return __bitmap_full(src, nbits);
274} 274}
275 275
276static inline int bitmap_weight(const unsigned long *src, int nbits) 276static inline int bitmap_weight(const unsigned long *src, unsigned int nbits)
277{ 277{
278 if (small_const_nbits(nbits)) 278 if (small_const_nbits(nbits))
279 return hweight_long(*src & BITMAP_LAST_WORD_MASK(nbits)); 279 return hweight_long(*src & BITMAP_LAST_WORD_MASK(nbits));
@@ -284,7 +284,7 @@ static inline void bitmap_shift_right(unsigned long *dst,
284 const unsigned long *src, int n, int nbits) 284 const unsigned long *src, int n, int nbits)
285{ 285{
286 if (small_const_nbits(nbits)) 286 if (small_const_nbits(nbits))
287 *dst = *src >> n; 287 *dst = (*src & BITMAP_LAST_WORD_MASK(nbits)) >> n;
288 else 288 else
289 __bitmap_shift_right(dst, src, n, nbits); 289 __bitmap_shift_right(dst, src, n, nbits);
290} 290}
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 8699bcf5f099..518b46555b80 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -21,6 +21,7 @@
21#include <linux/bsg.h> 21#include <linux/bsg.h>
22#include <linux/smp.h> 22#include <linux/smp.h>
23#include <linux/rcupdate.h> 23#include <linux/rcupdate.h>
24#include <linux/percpu-refcount.h>
24 25
25#include <asm/scatterlist.h> 26#include <asm/scatterlist.h>
26 27
@@ -470,6 +471,7 @@ struct request_queue {
470 struct mutex sysfs_lock; 471 struct mutex sysfs_lock;
471 472
472 int bypass_depth; 473 int bypass_depth;
474 int mq_freeze_depth;
473 475
474#if defined(CONFIG_BLK_DEV_BSG) 476#if defined(CONFIG_BLK_DEV_BSG)
475 bsg_job_fn *bsg_job_fn; 477 bsg_job_fn *bsg_job_fn;
@@ -483,7 +485,7 @@ struct request_queue {
483#endif 485#endif
484 struct rcu_head rcu_head; 486 struct rcu_head rcu_head;
485 wait_queue_head_t mq_freeze_wq; 487 wait_queue_head_t mq_freeze_wq;
486 struct percpu_counter mq_usage_counter; 488 struct percpu_ref mq_usage_counter;
487 struct list_head all_q_node; 489 struct list_head all_q_node;
488 490
489 struct blk_mq_tag_set *tag_set; 491 struct blk_mq_tag_set *tag_set;
diff --git a/include/linux/byteorder/generic.h b/include/linux/byteorder/generic.h
index 0846e6b931ce..89f67c1c3160 100644
--- a/include/linux/byteorder/generic.h
+++ b/include/linux/byteorder/generic.h
@@ -2,7 +2,7 @@
2#define _LINUX_BYTEORDER_GENERIC_H 2#define _LINUX_BYTEORDER_GENERIC_H
3 3
4/* 4/*
5 * linux/byteorder_generic.h 5 * linux/byteorder/generic.h
6 * Generic Byte-reordering support 6 * Generic Byte-reordering support
7 * 7 *
8 * The "... p" macros, like le64_to_cpup, can be used with pointers 8 * The "... p" macros, like le64_to_cpup, can be used with pointers
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h
index d21f2dba0731..40ae58e3e9db 100644
--- a/include/linux/ceph/messenger.h
+++ b/include/linux/ceph/messenger.h
@@ -285,19 +285,9 @@ extern void ceph_msg_data_add_bio(struct ceph_msg *msg, struct bio *bio,
285 285
286extern struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags, 286extern struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags,
287 bool can_fail); 287 bool can_fail);
288extern void ceph_msg_kfree(struct ceph_msg *m);
289 288
290 289extern struct ceph_msg *ceph_msg_get(struct ceph_msg *msg);
291static inline struct ceph_msg *ceph_msg_get(struct ceph_msg *msg) 290extern void ceph_msg_put(struct ceph_msg *msg);
292{
293 kref_get(&msg->kref);
294 return msg;
295}
296extern void ceph_msg_last_put(struct kref *kref);
297static inline void ceph_msg_put(struct ceph_msg *msg)
298{
299 kref_put(&msg->kref, ceph_msg_last_put);
300}
301 291
302extern void ceph_msg_dump(struct ceph_msg *msg); 292extern void ceph_msg_dump(struct ceph_msg *msg);
303 293
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index 94ec69672164..03aeb27fcc69 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -117,7 +117,7 @@ struct ceph_osd_request {
117 struct list_head r_req_lru_item; 117 struct list_head r_req_lru_item;
118 struct list_head r_osd_item; 118 struct list_head r_osd_item;
119 struct list_head r_linger_item; 119 struct list_head r_linger_item;
120 struct list_head r_linger_osd; 120 struct list_head r_linger_osd_item;
121 struct ceph_osd *r_osd; 121 struct ceph_osd *r_osd;
122 struct ceph_pg r_pgid; 122 struct ceph_pg r_pgid;
123 int r_pg_osds[CEPH_PG_MAX_SIZE]; 123 int r_pg_osds[CEPH_PG_MAX_SIZE];
@@ -325,22 +325,14 @@ extern struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *,
325 325
326extern void ceph_osdc_set_request_linger(struct ceph_osd_client *osdc, 326extern void ceph_osdc_set_request_linger(struct ceph_osd_client *osdc,
327 struct ceph_osd_request *req); 327 struct ceph_osd_request *req);
328extern void ceph_osdc_unregister_linger_request(struct ceph_osd_client *osdc, 328
329 struct ceph_osd_request *req); 329extern void ceph_osdc_get_request(struct ceph_osd_request *req);
330 330extern void ceph_osdc_put_request(struct ceph_osd_request *req);
331static inline void ceph_osdc_get_request(struct ceph_osd_request *req)
332{
333 kref_get(&req->r_kref);
334}
335extern void ceph_osdc_release_request(struct kref *kref);
336static inline void ceph_osdc_put_request(struct ceph_osd_request *req)
337{
338 kref_put(&req->r_kref, ceph_osdc_release_request);
339}
340 331
341extern int ceph_osdc_start_request(struct ceph_osd_client *osdc, 332extern int ceph_osdc_start_request(struct ceph_osd_client *osdc,
342 struct ceph_osd_request *req, 333 struct ceph_osd_request *req,
343 bool nofail); 334 bool nofail);
335extern void ceph_osdc_cancel_request(struct ceph_osd_request *req);
344extern int ceph_osdc_wait_request(struct ceph_osd_client *osdc, 336extern int ceph_osdc_wait_request(struct ceph_osd_client *osdc,
345 struct ceph_osd_request *req); 337 struct ceph_osd_request *req);
346extern void ceph_osdc_sync(struct ceph_osd_client *osdc); 338extern void ceph_osdc_sync(struct ceph_osd_client *osdc);
diff --git a/include/linux/cma.h b/include/linux/cma.h
new file mode 100644
index 000000000000..371b93042520
--- /dev/null
+++ b/include/linux/cma.h
@@ -0,0 +1,27 @@
1#ifndef __CMA_H__
2#define __CMA_H__
3
4/*
5 * There is always at least global CMA area and a few optional
6 * areas configured in kernel .config.
7 */
8#ifdef CONFIG_CMA_AREAS
9#define MAX_CMA_AREAS (1 + CONFIG_CMA_AREAS)
10
11#else
12#define MAX_CMA_AREAS (0)
13
14#endif
15
16struct cma;
17
18extern phys_addr_t cma_get_base(struct cma *cma);
19extern unsigned long cma_get_size(struct cma *cma);
20
21extern int __init cma_declare_contiguous(phys_addr_t size,
22 phys_addr_t base, phys_addr_t limit,
23 phys_addr_t alignment, unsigned int order_per_bit,
24 bool fixed, struct cma **res_cma);
25extern struct page *cma_alloc(struct cma *cma, int count, unsigned int align);
26extern bool cma_release(struct cma *cma, struct page *pages, int count);
27#endif
diff --git a/include/linux/cred.h b/include/linux/cred.h
index f61d6c8f5ef3..b2d0820837c4 100644
--- a/include/linux/cred.h
+++ b/include/linux/cred.h
@@ -259,6 +259,15 @@ static inline void put_cred(const struct cred *_cred)
259 rcu_dereference_protected(current->cred, 1) 259 rcu_dereference_protected(current->cred, 1)
260 260
261/** 261/**
262 * current_real_cred - Access the current task's objective credentials
263 *
264 * Access the objective credentials of the current task. RCU-safe,
265 * since nobody else can modify it.
266 */
267#define current_real_cred() \
268 rcu_dereference_protected(current->real_cred, 1)
269
270/**
262 * __task_cred - Access a task's objective credentials 271 * __task_cred - Access a task's objective credentials
263 * @task: The task to query 272 * @task: The task to query
264 * 273 *
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 3c7ec327ebd2..e4ae2ad48d07 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -249,6 +249,7 @@ extern struct dentry * d_splice_alias(struct inode *, struct dentry *);
249extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *); 249extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *);
250extern struct dentry *d_find_any_alias(struct inode *inode); 250extern struct dentry *d_find_any_alias(struct inode *inode);
251extern struct dentry * d_obtain_alias(struct inode *); 251extern struct dentry * d_obtain_alias(struct inode *);
252extern struct dentry * d_obtain_root(struct inode *);
252extern void shrink_dcache_sb(struct super_block *); 253extern void shrink_dcache_sb(struct super_block *);
253extern void shrink_dcache_parent(struct dentry *); 254extern void shrink_dcache_parent(struct dentry *);
254extern void shrink_dcache_for_umount(struct super_block *); 255extern void shrink_dcache_for_umount(struct super_block *);
diff --git a/include/linux/decompress/bunzip2.h b/include/linux/decompress/bunzip2.h
index 115272137a9c..4d683df898e6 100644
--- a/include/linux/decompress/bunzip2.h
+++ b/include/linux/decompress/bunzip2.h
@@ -1,10 +1,10 @@
1#ifndef DECOMPRESS_BUNZIP2_H 1#ifndef DECOMPRESS_BUNZIP2_H
2#define DECOMPRESS_BUNZIP2_H 2#define DECOMPRESS_BUNZIP2_H
3 3
4int bunzip2(unsigned char *inbuf, int len, 4int bunzip2(unsigned char *inbuf, long len,
5 int(*fill)(void*, unsigned int), 5 long (*fill)(void*, unsigned long),
6 int(*flush)(void*, unsigned int), 6 long (*flush)(void*, unsigned long),
7 unsigned char *output, 7 unsigned char *output,
8 int *pos, 8 long *pos,
9 void(*error)(char *x)); 9 void(*error)(char *x));
10#endif 10#endif
diff --git a/include/linux/decompress/generic.h b/include/linux/decompress/generic.h
index 0c7111a55a1a..1fcfd64b5076 100644
--- a/include/linux/decompress/generic.h
+++ b/include/linux/decompress/generic.h
@@ -1,11 +1,11 @@
1#ifndef DECOMPRESS_GENERIC_H 1#ifndef DECOMPRESS_GENERIC_H
2#define DECOMPRESS_GENERIC_H 2#define DECOMPRESS_GENERIC_H
3 3
4typedef int (*decompress_fn) (unsigned char *inbuf, int len, 4typedef int (*decompress_fn) (unsigned char *inbuf, long len,
5 int(*fill)(void*, unsigned int), 5 long (*fill)(void*, unsigned long),
6 int(*flush)(void*, unsigned int), 6 long (*flush)(void*, unsigned long),
7 unsigned char *outbuf, 7 unsigned char *outbuf,
8 int *posp, 8 long *posp,
9 void(*error)(char *x)); 9 void(*error)(char *x));
10 10
11/* inbuf - input buffer 11/* inbuf - input buffer
@@ -33,7 +33,7 @@ typedef int (*decompress_fn) (unsigned char *inbuf, int len,
33 33
34 34
35/* Utility routine to detect the decompression method */ 35/* Utility routine to detect the decompression method */
36decompress_fn decompress_method(const unsigned char *inbuf, int len, 36decompress_fn decompress_method(const unsigned char *inbuf, long len,
37 const char **name); 37 const char **name);
38 38
39#endif 39#endif
diff --git a/include/linux/decompress/inflate.h b/include/linux/decompress/inflate.h
index 1d0aedef9822..e4f411fdbd24 100644
--- a/include/linux/decompress/inflate.h
+++ b/include/linux/decompress/inflate.h
@@ -1,10 +1,10 @@
1#ifndef LINUX_DECOMPRESS_INFLATE_H 1#ifndef LINUX_DECOMPRESS_INFLATE_H
2#define LINUX_DECOMPRESS_INFLATE_H 2#define LINUX_DECOMPRESS_INFLATE_H
3 3
4int gunzip(unsigned char *inbuf, int len, 4int gunzip(unsigned char *inbuf, long len,
5 int(*fill)(void*, unsigned int), 5 long (*fill)(void*, unsigned long),
6 int(*flush)(void*, unsigned int), 6 long (*flush)(void*, unsigned long),
7 unsigned char *output, 7 unsigned char *output,
8 int *pos, 8 long *pos,
9 void(*error_fn)(char *x)); 9 void(*error_fn)(char *x));
10#endif 10#endif
diff --git a/include/linux/decompress/unlz4.h b/include/linux/decompress/unlz4.h
index d5b68bf3ec92..3273c2f36496 100644
--- a/include/linux/decompress/unlz4.h
+++ b/include/linux/decompress/unlz4.h
@@ -1,10 +1,10 @@
1#ifndef DECOMPRESS_UNLZ4_H 1#ifndef DECOMPRESS_UNLZ4_H
2#define DECOMPRESS_UNLZ4_H 2#define DECOMPRESS_UNLZ4_H
3 3
4int unlz4(unsigned char *inbuf, int len, 4int unlz4(unsigned char *inbuf, long len,
5 int(*fill)(void*, unsigned int), 5 long (*fill)(void*, unsigned long),
6 int(*flush)(void*, unsigned int), 6 long (*flush)(void*, unsigned long),
7 unsigned char *output, 7 unsigned char *output,
8 int *pos, 8 long *pos,
9 void(*error)(char *x)); 9 void(*error)(char *x));
10#endif 10#endif
diff --git a/include/linux/decompress/unlzma.h b/include/linux/decompress/unlzma.h
index 7796538f1bf4..8a891a193840 100644
--- a/include/linux/decompress/unlzma.h
+++ b/include/linux/decompress/unlzma.h
@@ -1,11 +1,11 @@
1#ifndef DECOMPRESS_UNLZMA_H 1#ifndef DECOMPRESS_UNLZMA_H
2#define DECOMPRESS_UNLZMA_H 2#define DECOMPRESS_UNLZMA_H
3 3
4int unlzma(unsigned char *, int, 4int unlzma(unsigned char *, long,
5 int(*fill)(void*, unsigned int), 5 long (*fill)(void*, unsigned long),
6 int(*flush)(void*, unsigned int), 6 long (*flush)(void*, unsigned long),
7 unsigned char *output, 7 unsigned char *output,
8 int *posp, 8 long *posp,
9 void(*error)(char *x) 9 void(*error)(char *x)
10 ); 10 );
11 11
diff --git a/include/linux/decompress/unlzo.h b/include/linux/decompress/unlzo.h
index 987229752519..af18f95d6570 100644
--- a/include/linux/decompress/unlzo.h
+++ b/include/linux/decompress/unlzo.h
@@ -1,10 +1,10 @@
1#ifndef DECOMPRESS_UNLZO_H 1#ifndef DECOMPRESS_UNLZO_H
2#define DECOMPRESS_UNLZO_H 2#define DECOMPRESS_UNLZO_H
3 3
4int unlzo(unsigned char *inbuf, int len, 4int unlzo(unsigned char *inbuf, long len,
5 int(*fill)(void*, unsigned int), 5 long (*fill)(void*, unsigned long),
6 int(*flush)(void*, unsigned int), 6 long (*flush)(void*, unsigned long),
7 unsigned char *output, 7 unsigned char *output,
8 int *pos, 8 long *pos,
9 void(*error)(char *x)); 9 void(*error)(char *x));
10#endif 10#endif
diff --git a/include/linux/decompress/unxz.h b/include/linux/decompress/unxz.h
index 41728fc6c8a1..f764e2a7201e 100644
--- a/include/linux/decompress/unxz.h
+++ b/include/linux/decompress/unxz.h
@@ -10,10 +10,10 @@
10#ifndef DECOMPRESS_UNXZ_H 10#ifndef DECOMPRESS_UNXZ_H
11#define DECOMPRESS_UNXZ_H 11#define DECOMPRESS_UNXZ_H
12 12
13int unxz(unsigned char *in, int in_size, 13int unxz(unsigned char *in, long in_size,
14 int (*fill)(void *dest, unsigned int size), 14 long (*fill)(void *dest, unsigned long size),
15 int (*flush)(void *src, unsigned int size), 15 long (*flush)(void *src, unsigned long size),
16 unsigned char *out, int *in_used, 16 unsigned char *out, long *in_used,
17 void (*error)(char *x)); 17 void (*error)(char *x));
18 18
19#endif 19#endif
diff --git a/include/linux/dma-contiguous.h b/include/linux/dma-contiguous.h
index 772eab5d524a..569bbd039896 100644
--- a/include/linux/dma-contiguous.h
+++ b/include/linux/dma-contiguous.h
@@ -53,18 +53,13 @@
53 53
54#ifdef __KERNEL__ 54#ifdef __KERNEL__
55 55
56#include <linux/device.h>
57
56struct cma; 58struct cma;
57struct page; 59struct page;
58struct device;
59 60
60#ifdef CONFIG_DMA_CMA 61#ifdef CONFIG_DMA_CMA
61 62
62/*
63 * There is always at least global CMA area and a few optional device
64 * private areas configured in kernel .config.
65 */
66#define MAX_CMA_AREAS (1 + CONFIG_CMA_AREAS)
67
68extern struct cma *dma_contiguous_default_area; 63extern struct cma *dma_contiguous_default_area;
69 64
70static inline struct cma *dev_get_cma_area(struct device *dev) 65static inline struct cma *dev_get_cma_area(struct device *dev)
@@ -123,8 +118,6 @@ bool dma_release_from_contiguous(struct device *dev, struct page *pages,
123 118
124#else 119#else
125 120
126#define MAX_CMA_AREAS (0)
127
128static inline struct cma *dev_get_cma_area(struct device *dev) 121static inline struct cma *dev_get_cma_area(struct device *dev)
129{ 122{
130 return NULL; 123 return NULL;
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 3d1c2aa51530..1f9e642c66ad 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -37,7 +37,6 @@
37 */ 37 */
38typedef s32 dma_cookie_t; 38typedef s32 dma_cookie_t;
39#define DMA_MIN_COOKIE 1 39#define DMA_MIN_COOKIE 1
40#define DMA_MAX_COOKIE INT_MAX
41 40
42static inline int dma_submit_error(dma_cookie_t cookie) 41static inline int dma_submit_error(dma_cookie_t cookie)
43{ 42{
@@ -671,7 +670,7 @@ struct dma_device {
671 struct dma_async_tx_descriptor *(*device_prep_dma_cyclic)( 670 struct dma_async_tx_descriptor *(*device_prep_dma_cyclic)(
672 struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len, 671 struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
673 size_t period_len, enum dma_transfer_direction direction, 672 size_t period_len, enum dma_transfer_direction direction,
674 unsigned long flags, void *context); 673 unsigned long flags);
675 struct dma_async_tx_descriptor *(*device_prep_interleaved_dma)( 674 struct dma_async_tx_descriptor *(*device_prep_interleaved_dma)(
676 struct dma_chan *chan, struct dma_interleaved_template *xt, 675 struct dma_chan *chan, struct dma_interleaved_template *xt,
677 unsigned long flags); 676 unsigned long flags);
@@ -746,7 +745,7 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_cyclic(
746 unsigned long flags) 745 unsigned long flags)
747{ 746{
748 return chan->device->device_prep_dma_cyclic(chan, buf_addr, buf_len, 747 return chan->device->device_prep_dma_cyclic(chan, buf_addr, buf_len,
749 period_len, dir, flags, NULL); 748 period_len, dir, flags);
750} 749}
751 750
752static inline struct dma_async_tx_descriptor *dmaengine_prep_interleaved_dma( 751static inline struct dma_async_tx_descriptor *dmaengine_prep_interleaved_dma(
diff --git a/include/linux/drbd.h b/include/linux/drbd.h
index 3dbe9bd57a09..debb70d40547 100644
--- a/include/linux/drbd.h
+++ b/include/linux/drbd.h
@@ -52,7 +52,7 @@
52#endif 52#endif
53 53
54extern const char *drbd_buildtag(void); 54extern const char *drbd_buildtag(void);
55#define REL_VERSION "8.4.3" 55#define REL_VERSION "8.4.5"
56#define API_VERSION 1 56#define API_VERSION 1
57#define PRO_VERSION_MIN 86 57#define PRO_VERSION_MIN 86
58#define PRO_VERSION_MAX 101 58#define PRO_VERSION_MAX 101
@@ -245,7 +245,7 @@ enum drbd_disk_state {
245 D_DISKLESS, 245 D_DISKLESS,
246 D_ATTACHING, /* In the process of reading the meta-data */ 246 D_ATTACHING, /* In the process of reading the meta-data */
247 D_FAILED, /* Becomes D_DISKLESS as soon as we told it the peer */ 247 D_FAILED, /* Becomes D_DISKLESS as soon as we told it the peer */
248 /* when >= D_FAILED it is legal to access mdev->bc */ 248 /* when >= D_FAILED it is legal to access mdev->ldev */
249 D_NEGOTIATING, /* Late attaching state, we need to talk to the peer */ 249 D_NEGOTIATING, /* Late attaching state, we need to talk to the peer */
250 D_INCONSISTENT, 250 D_INCONSISTENT,
251 D_OUTDATED, 251 D_OUTDATED,
diff --git a/include/linux/drbd_genl.h b/include/linux/drbd_genl.h
index 4193f5f2636c..7b131ed8f9c6 100644
--- a/include/linux/drbd_genl.h
+++ b/include/linux/drbd_genl.h
@@ -171,6 +171,10 @@ GENL_struct(DRBD_NLA_NET_CONF, 5, net_conf,
171 __flg_field(28, DRBD_GENLA_F_MANDATORY | DRBD_F_INVARIANT, tentative) 171 __flg_field(28, DRBD_GENLA_F_MANDATORY | DRBD_F_INVARIANT, tentative)
172 __flg_field_def(29, DRBD_GENLA_F_MANDATORY, use_rle, DRBD_USE_RLE_DEF) 172 __flg_field_def(29, DRBD_GENLA_F_MANDATORY, use_rle, DRBD_USE_RLE_DEF)
173 /* 9: __u32_field_def(30, DRBD_GENLA_F_MANDATORY, fencing_policy, DRBD_FENCING_DEF) */ 173 /* 9: __u32_field_def(30, DRBD_GENLA_F_MANDATORY, fencing_policy, DRBD_FENCING_DEF) */
174 /* 9: __str_field_def(31, DRBD_GENLA_F_MANDATORY, name, SHARED_SECRET_MAX) */
175 /* 9: __u32_field(32, DRBD_F_REQUIRED | DRBD_F_INVARIANT, peer_node_id) */
176 __flg_field_def(33, 0 /* OPTIONAL */, csums_after_crash_only, DRBD_CSUMS_AFTER_CRASH_ONLY_DEF)
177 __u32_field_def(34, 0 /* OPTIONAL */, sock_check_timeo, DRBD_SOCKET_CHECK_TIMEO_DEF)
174) 178)
175 179
176GENL_struct(DRBD_NLA_SET_ROLE_PARMS, 6, set_role_parms, 180GENL_struct(DRBD_NLA_SET_ROLE_PARMS, 6, set_role_parms,
diff --git a/include/linux/drbd_limits.h b/include/linux/drbd_limits.h
index 17e50bb00521..8ac8c5d9a3ad 100644
--- a/include/linux/drbd_limits.h
+++ b/include/linux/drbd_limits.h
@@ -214,6 +214,7 @@
214#define DRBD_ALLOW_TWO_PRIMARIES_DEF 0 214#define DRBD_ALLOW_TWO_PRIMARIES_DEF 0
215#define DRBD_ALWAYS_ASBP_DEF 0 215#define DRBD_ALWAYS_ASBP_DEF 0
216#define DRBD_USE_RLE_DEF 1 216#define DRBD_USE_RLE_DEF 1
217#define DRBD_CSUMS_AFTER_CRASH_ONLY_DEF 0
217 218
218#define DRBD_AL_STRIPES_MIN 1 219#define DRBD_AL_STRIPES_MIN 1
219#define DRBD_AL_STRIPES_MAX 1024 220#define DRBD_AL_STRIPES_MAX 1024
@@ -224,4 +225,9 @@
224#define DRBD_AL_STRIPE_SIZE_MAX 16777216 225#define DRBD_AL_STRIPE_SIZE_MAX 16777216
225#define DRBD_AL_STRIPE_SIZE_DEF 32 226#define DRBD_AL_STRIPE_SIZE_DEF 32
226#define DRBD_AL_STRIPE_SIZE_SCALE 'k' /* kilobytes */ 227#define DRBD_AL_STRIPE_SIZE_SCALE 'k' /* kilobytes */
228
229#define DRBD_SOCKET_CHECK_TIMEO_MIN 0
230#define DRBD_SOCKET_CHECK_TIMEO_MAX DRBD_PING_TIMEO_MAX
231#define DRBD_SOCKET_CHECK_TIMEO_DEF 0
232#define DRBD_SOCKET_CHECK_TIMEO_SCALE '1'
227#endif 233#endif
diff --git a/include/linux/efi.h b/include/linux/efi.h
index efc681fd5895..45cb4ffdea62 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -1156,6 +1156,9 @@ int efivars_sysfs_init(void);
1156#ifdef CONFIG_EFI_RUNTIME_MAP 1156#ifdef CONFIG_EFI_RUNTIME_MAP
1157int efi_runtime_map_init(struct kobject *); 1157int efi_runtime_map_init(struct kobject *);
1158void efi_runtime_map_setup(void *, int, u32); 1158void efi_runtime_map_setup(void *, int, u32);
1159int efi_get_runtime_map_size(void);
1160int efi_get_runtime_map_desc_size(void);
1161int efi_runtime_map_copy(void *buf, size_t bufsz);
1159#else 1162#else
1160static inline int efi_runtime_map_init(struct kobject *kobj) 1163static inline int efi_runtime_map_init(struct kobject *kobj)
1161{ 1164{
@@ -1164,6 +1167,22 @@ static inline int efi_runtime_map_init(struct kobject *kobj)
1164 1167
1165static inline void 1168static inline void
1166efi_runtime_map_setup(void *map, int nr_entries, u32 desc_size) {} 1169efi_runtime_map_setup(void *map, int nr_entries, u32 desc_size) {}
1170
1171static inline int efi_get_runtime_map_size(void)
1172{
1173 return 0;
1174}
1175
1176static inline int efi_get_runtime_map_desc_size(void)
1177{
1178 return 0;
1179}
1180
1181static inline int efi_runtime_map_copy(void *buf, size_t bufsz)
1182{
1183 return 0;
1184}
1185
1167#endif 1186#endif
1168 1187
1169/* prototypes shared between arch specific and generic stub code */ 1188/* prototypes shared between arch specific and generic stub code */
diff --git a/include/linux/fb.h b/include/linux/fb.h
index b6bfda99add3..09bb7a18d287 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -553,7 +553,7 @@ static inline struct apertures_struct *alloc_apertures(unsigned int max_num) {
553#define fb_memcpy_fromfb sbus_memcpy_fromio 553#define fb_memcpy_fromfb sbus_memcpy_fromio
554#define fb_memcpy_tofb sbus_memcpy_toio 554#define fb_memcpy_tofb sbus_memcpy_toio
555 555
556#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || defined(__sh__) || defined(__powerpc__) || defined(__avr32__) || defined(__bfin__) 556#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || defined(__sh__) || defined(__powerpc__) || defined(__avr32__) || defined(__bfin__) || defined(__arm__)
557 557
558#define fb_readb __raw_readb 558#define fb_readb __raw_readb
559#define fb_readw __raw_readw 559#define fb_readw __raw_readw
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 2daccaf4b547..94187721ad41 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -387,7 +387,7 @@ struct address_space {
387 struct inode *host; /* owner: inode, block_device */ 387 struct inode *host; /* owner: inode, block_device */
388 struct radix_tree_root page_tree; /* radix tree of all pages */ 388 struct radix_tree_root page_tree; /* radix tree of all pages */
389 spinlock_t tree_lock; /* and lock protecting it */ 389 spinlock_t tree_lock; /* and lock protecting it */
390 unsigned int i_mmap_writable;/* count VM_SHARED mappings */ 390 atomic_t i_mmap_writable;/* count VM_SHARED mappings */
391 struct rb_root i_mmap; /* tree of private and shared mappings */ 391 struct rb_root i_mmap; /* tree of private and shared mappings */
392 struct list_head i_mmap_nonlinear;/*list VM_NONLINEAR mappings */ 392 struct list_head i_mmap_nonlinear;/*list VM_NONLINEAR mappings */
393 struct mutex i_mmap_mutex; /* protect tree, count, list */ 393 struct mutex i_mmap_mutex; /* protect tree, count, list */
@@ -470,10 +470,35 @@ static inline int mapping_mapped(struct address_space *mapping)
470 * Note that i_mmap_writable counts all VM_SHARED vmas: do_mmap_pgoff 470 * Note that i_mmap_writable counts all VM_SHARED vmas: do_mmap_pgoff
471 * marks vma as VM_SHARED if it is shared, and the file was opened for 471 * marks vma as VM_SHARED if it is shared, and the file was opened for
472 * writing i.e. vma may be mprotected writable even if now readonly. 472 * writing i.e. vma may be mprotected writable even if now readonly.
473 *
474 * If i_mmap_writable is negative, no new writable mappings are allowed. You
475 * can only deny writable mappings, if none exists right now.
473 */ 476 */
474static inline int mapping_writably_mapped(struct address_space *mapping) 477static inline int mapping_writably_mapped(struct address_space *mapping)
475{ 478{
476 return mapping->i_mmap_writable != 0; 479 return atomic_read(&mapping->i_mmap_writable) > 0;
480}
481
482static inline int mapping_map_writable(struct address_space *mapping)
483{
484 return atomic_inc_unless_negative(&mapping->i_mmap_writable) ?
485 0 : -EPERM;
486}
487
488static inline void mapping_unmap_writable(struct address_space *mapping)
489{
490 atomic_dec(&mapping->i_mmap_writable);
491}
492
493static inline int mapping_deny_writable(struct address_space *mapping)
494{
495 return atomic_dec_unless_positive(&mapping->i_mmap_writable) ?
496 0 : -EBUSY;
497}
498
499static inline void mapping_allow_writable(struct address_space *mapping)
500{
501 atomic_inc(&mapping->i_mmap_writable);
477} 502}
478 503
479/* 504/*
@@ -1250,6 +1275,7 @@ struct super_block {
1250 1275
1251 /* AIO completions deferred from interrupt context */ 1276 /* AIO completions deferred from interrupt context */
1252 struct workqueue_struct *s_dio_done_wq; 1277 struct workqueue_struct *s_dio_done_wq;
1278 struct hlist_head s_pins;
1253 1279
1254 /* 1280 /*
1255 * Keep the lru lists last in the structure so they always sit on their 1281 * Keep the lru lists last in the structure so they always sit on their
@@ -2335,6 +2361,7 @@ extern int do_pipe_flags(int *, int);
2335 2361
2336extern int kernel_read(struct file *, loff_t, char *, unsigned long); 2362extern int kernel_read(struct file *, loff_t, char *, unsigned long);
2337extern ssize_t kernel_write(struct file *, const char *, size_t, loff_t); 2363extern ssize_t kernel_write(struct file *, const char *, size_t, loff_t);
2364extern ssize_t __kernel_write(struct file *, const char *, size_t, loff_t *);
2338extern struct file * open_exec(const char *); 2365extern struct file * open_exec(const char *);
2339 2366
2340/* fs/dcache.c -- generic fs support functions */ 2367/* fs/dcache.c -- generic fs support functions */
@@ -2688,7 +2715,7 @@ static const struct file_operations __fops = { \
2688 .read = simple_attr_read, \ 2715 .read = simple_attr_read, \
2689 .write = simple_attr_write, \ 2716 .write = simple_attr_write, \
2690 .llseek = generic_file_llseek, \ 2717 .llseek = generic_file_llseek, \
2691}; 2718}
2692 2719
2693static inline __printf(1, 2) 2720static inline __printf(1, 2)
2694void __simple_attr_check_format(const char *fmt, ...) 2721void __simple_attr_check_format(const char *fmt, ...)
diff --git a/include/linux/fs_pin.h b/include/linux/fs_pin.h
new file mode 100644
index 000000000000..f66525e72ccf
--- /dev/null
+++ b/include/linux/fs_pin.h
@@ -0,0 +1,17 @@
1#include <linux/fs.h>
2
3struct fs_pin {
4 atomic_long_t count;
5 union {
6 struct {
7 struct hlist_node s_list;
8 struct hlist_node m_list;
9 };
10 struct rcu_head rcu;
11 };
12 void (*kill)(struct fs_pin *);
13};
14
15void pin_put(struct fs_pin *);
16void pin_remove(struct fs_pin *);
17void pin_insert(struct fs_pin *, struct vfsmount *);
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h
index fc7718c6bd3e..ca060d7c4fa6 100644
--- a/include/linux/fsnotify_backend.h
+++ b/include/linux/fsnotify_backend.h
@@ -322,16 +322,18 @@ extern int fsnotify_fasync(int fd, struct file *file, int on);
322extern void fsnotify_destroy_event(struct fsnotify_group *group, 322extern void fsnotify_destroy_event(struct fsnotify_group *group,
323 struct fsnotify_event *event); 323 struct fsnotify_event *event);
324/* attach the event to the group notification queue */ 324/* attach the event to the group notification queue */
325extern int fsnotify_add_notify_event(struct fsnotify_group *group, 325extern int fsnotify_add_event(struct fsnotify_group *group,
326 struct fsnotify_event *event, 326 struct fsnotify_event *event,
327 int (*merge)(struct list_head *, 327 int (*merge)(struct list_head *,
328 struct fsnotify_event *)); 328 struct fsnotify_event *));
329/* Remove passed event from groups notification queue */
330extern void fsnotify_remove_event(struct fsnotify_group *group, struct fsnotify_event *event);
329/* true if the group notification queue is empty */ 331/* true if the group notification queue is empty */
330extern bool fsnotify_notify_queue_is_empty(struct fsnotify_group *group); 332extern bool fsnotify_notify_queue_is_empty(struct fsnotify_group *group);
331/* return, but do not dequeue the first event on the notification queue */ 333/* return, but do not dequeue the first event on the notification queue */
332extern struct fsnotify_event *fsnotify_peek_notify_event(struct fsnotify_group *group); 334extern struct fsnotify_event *fsnotify_peek_first_event(struct fsnotify_group *group);
333/* return AND dequeue the first event on the notification queue */ 335/* return AND dequeue the first event on the notification queue */
334extern struct fsnotify_event *fsnotify_remove_notify_event(struct fsnotify_group *group); 336extern struct fsnotify_event *fsnotify_remove_first_event(struct fsnotify_group *group);
335 337
336/* functions used to manipulate the marks attached to inodes */ 338/* functions used to manipulate the marks attached to inodes */
337 339
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
index 06c6faa9e5cc..28672e87e910 100644
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -571,40 +571,6 @@ do { \
571 __trace_printk(ip, fmt, ##args); \ 571 __trace_printk(ip, fmt, ##args); \
572} while (0) 572} while (0)
573 573
574/**
575 * tracepoint_string - register constant persistent string to trace system
576 * @str - a constant persistent string that will be referenced in tracepoints
577 *
578 * If constant strings are being used in tracepoints, it is faster and
579 * more efficient to just save the pointer to the string and reference
580 * that with a printf "%s" instead of saving the string in the ring buffer
581 * and wasting space and time.
582 *
583 * The problem with the above approach is that userspace tools that read
584 * the binary output of the trace buffers do not have access to the string.
585 * Instead they just show the address of the string which is not very
586 * useful to users.
587 *
588 * With tracepoint_string(), the string will be registered to the tracing
589 * system and exported to userspace via the debugfs/tracing/printk_formats
590 * file that maps the string address to the string text. This way userspace
591 * tools that read the binary buffers have a way to map the pointers to
592 * the ASCII strings they represent.
593 *
594 * The @str used must be a constant string and persistent as it would not
595 * make sense to show a string that no longer exists. But it is still fine
596 * to be used with modules, because when modules are unloaded, if they
597 * had tracepoints, the ring buffers are cleared too. As long as the string
598 * does not change during the life of the module, it is fine to use
599 * tracepoint_string() within a module.
600 */
601#define tracepoint_string(str) \
602 ({ \
603 static const char *___tp_str __tracepoint_string = str; \
604 ___tp_str; \
605 })
606#define __tracepoint_string __attribute__((section("__tracepoint_str")))
607
608#ifdef CONFIG_PERF_EVENTS 574#ifdef CONFIG_PERF_EVENTS
609struct perf_event; 575struct perf_event;
610 576
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 6eb1fb37de9a..5e7219dc0fae 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -360,7 +360,7 @@ extern unsigned long get_zeroed_page(gfp_t gfp_mask);
360void *alloc_pages_exact(size_t size, gfp_t gfp_mask); 360void *alloc_pages_exact(size_t size, gfp_t gfp_mask);
361void free_pages_exact(void *virt, size_t size); 361void free_pages_exact(void *virt, size_t size);
362/* This is different from alloc_pages_exact_node !!! */ 362/* This is different from alloc_pages_exact_node !!! */
363void *alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask); 363void * __meminit alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask);
364 364
365#define __get_free_page(gfp_mask) \ 365#define __get_free_page(gfp_mask) \
366 __get_free_pages((gfp_mask), 0) 366 __get_free_pages((gfp_mask), 0)
diff --git a/include/linux/glob.h b/include/linux/glob.h
new file mode 100644
index 000000000000..861d8347d08e
--- /dev/null
+++ b/include/linux/glob.h
@@ -0,0 +1,9 @@
1#ifndef _LINUX_GLOB_H
2#define _LINUX_GLOB_H
3
4#include <linux/types.h> /* For bool */
5#include <linux/compiler.h> /* For __pure */
6
7bool __pure glob_match(char const *pat, char const *str);
8
9#endif /* _LINUX_GLOB_H */
diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h
index 05e53ccb708b..b7ce0c64c6f3 100644
--- a/include/linux/gpio/consumer.h
+++ b/include/linux/gpio/consumer.h
@@ -18,30 +18,79 @@ struct gpio_desc;
18 18
19#ifdef CONFIG_GPIOLIB 19#ifdef CONFIG_GPIOLIB
20 20
21#define GPIOD_FLAGS_BIT_DIR_SET BIT(0)
22#define GPIOD_FLAGS_BIT_DIR_OUT BIT(1)
23#define GPIOD_FLAGS_BIT_DIR_VAL BIT(2)
24
25/**
26 * Optional flags that can be passed to one of gpiod_* to configure direction
27 * and output value. These values cannot be OR'd.
28 */
29enum gpiod_flags {
30 GPIOD_ASIS = 0,
31 GPIOD_IN = GPIOD_FLAGS_BIT_DIR_SET,
32 GPIOD_OUT_LOW = GPIOD_FLAGS_BIT_DIR_SET | GPIOD_FLAGS_BIT_DIR_OUT,
33 GPIOD_OUT_HIGH = GPIOD_FLAGS_BIT_DIR_SET | GPIOD_FLAGS_BIT_DIR_OUT |
34 GPIOD_FLAGS_BIT_DIR_VAL,
35};
36
21/* Acquire and dispose GPIOs */ 37/* Acquire and dispose GPIOs */
22struct gpio_desc *__must_check gpiod_get(struct device *dev, 38struct gpio_desc *__must_check __gpiod_get(struct device *dev,
23 const char *con_id); 39 const char *con_id,
24struct gpio_desc *__must_check gpiod_get_index(struct device *dev, 40 enum gpiod_flags flags);
41#define __gpiod_get(dev, con_id, flags, ...) __gpiod_get(dev, con_id, flags)
42#define gpiod_get(varargs...) __gpiod_get(varargs, 0)
43struct gpio_desc *__must_check __gpiod_get_index(struct device *dev,
25 const char *con_id, 44 const char *con_id,
26 unsigned int idx); 45 unsigned int idx,
27struct gpio_desc *__must_check gpiod_get_optional(struct device *dev, 46 enum gpiod_flags flags);
28 const char *con_id); 47#define __gpiod_get_index(dev, con_id, index, flags, ...) \
29struct gpio_desc *__must_check gpiod_get_index_optional(struct device *dev, 48 __gpiod_get_index(dev, con_id, index, flags)
49#define gpiod_get_index(varargs...) __gpiod_get_index(varargs, 0)
50struct gpio_desc *__must_check __gpiod_get_optional(struct device *dev,
51 const char *con_id,
52 enum gpiod_flags flags);
53#define __gpiod_get_optional(dev, con_id, flags, ...) \
54 __gpiod_get_optional(dev, con_id, flags)
55#define gpiod_get_optional(varargs...) __gpiod_get_optional(varargs, 0)
56struct gpio_desc *__must_check __gpiod_get_index_optional(struct device *dev,
30 const char *con_id, 57 const char *con_id,
31 unsigned int index); 58 unsigned int index,
59 enum gpiod_flags flags);
60#define __gpiod_get_index_optional(dev, con_id, index, flags, ...) \
61 __gpiod_get_index_optional(dev, con_id, index, flags)
62#define gpiod_get_index_optional(varargs...) \
63 __gpiod_get_index_optional(varargs, 0)
32 64
33void gpiod_put(struct gpio_desc *desc); 65void gpiod_put(struct gpio_desc *desc);
34 66
35struct gpio_desc *__must_check devm_gpiod_get(struct device *dev, 67struct gpio_desc *__must_check __devm_gpiod_get(struct device *dev,
36 const char *con_id); 68 const char *con_id,
37struct gpio_desc *__must_check devm_gpiod_get_index(struct device *dev, 69 enum gpiod_flags flags);
70#define __devm_gpiod_get(dev, con_id, flags, ...) \
71 __devm_gpiod_get(dev, con_id, flags)
72#define devm_gpiod_get(varargs...) __devm_gpiod_get(varargs, 0)
73struct gpio_desc *__must_check __devm_gpiod_get_index(struct device *dev,
38 const char *con_id, 74 const char *con_id,
39 unsigned int idx); 75 unsigned int idx,
40struct gpio_desc *__must_check devm_gpiod_get_optional(struct device *dev, 76 enum gpiod_flags flags);
41 const char *con_id); 77#define __devm_gpiod_get_index(dev, con_id, index, flags, ...) \
78 __devm_gpiod_get_index(dev, con_id, index, flags)
79#define devm_gpiod_get_index(varargs...) __devm_gpiod_get_index(varargs, 0)
80struct gpio_desc *__must_check __devm_gpiod_get_optional(struct device *dev,
81 const char *con_id,
82 enum gpiod_flags flags);
83#define __devm_gpiod_get_optional(dev, con_id, flags, ...) \
84 __devm_gpiod_get_optional(dev, con_id, flags)
85#define devm_gpiod_get_optional(varargs...) \
86 __devm_gpiod_get_optional(varargs, 0)
42struct gpio_desc *__must_check 87struct gpio_desc *__must_check
43devm_gpiod_get_index_optional(struct device *dev, const char *con_id, 88__devm_gpiod_get_index_optional(struct device *dev, const char *con_id,
44 unsigned int index); 89 unsigned int index, enum gpiod_flags flags);
90#define __devm_gpiod_get_index_optional(dev, con_id, index, flags, ...) \
91 __devm_gpiod_get_index_optional(dev, con_id, index, flags)
92#define devm_gpiod_get_index_optional(varargs...) \
93 __devm_gpiod_get_index_optional(varargs, 0)
45 94
46void devm_gpiod_put(struct device *dev, struct gpio_desc *desc); 95void devm_gpiod_put(struct device *dev, struct gpio_desc *desc);
47 96
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index 573e4f3243d0..e78a2373e374 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -141,73 +141,16 @@ extern const char *gpiochip_is_requested(struct gpio_chip *chip,
141 141
142/* add/remove chips */ 142/* add/remove chips */
143extern int gpiochip_add(struct gpio_chip *chip); 143extern int gpiochip_add(struct gpio_chip *chip);
144extern int __must_check gpiochip_remove(struct gpio_chip *chip); 144extern int gpiochip_remove(struct gpio_chip *chip);
145extern struct gpio_chip *gpiochip_find(void *data, 145extern struct gpio_chip *gpiochip_find(void *data,
146 int (*match)(struct gpio_chip *chip, void *data)); 146 int (*match)(struct gpio_chip *chip, void *data));
147 147
148/* lock/unlock as IRQ */ 148/* lock/unlock as IRQ */
149int gpiod_lock_as_irq(struct gpio_desc *desc); 149int gpio_lock_as_irq(struct gpio_chip *chip, unsigned int offset);
150void gpiod_unlock_as_irq(struct gpio_desc *desc); 150void gpio_unlock_as_irq(struct gpio_chip *chip, unsigned int offset);
151 151
152struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc); 152struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc);
153 153
154struct gpio_desc *gpiochip_get_desc(struct gpio_chip *chip,
155 u16 hwnum);
156
157enum gpio_lookup_flags {
158 GPIO_ACTIVE_HIGH = (0 << 0),
159 GPIO_ACTIVE_LOW = (1 << 0),
160 GPIO_OPEN_DRAIN = (1 << 1),
161 GPIO_OPEN_SOURCE = (1 << 2),
162};
163
164/**
165 * struct gpiod_lookup - lookup table
166 * @chip_label: name of the chip the GPIO belongs to
167 * @chip_hwnum: hardware number (i.e. relative to the chip) of the GPIO
168 * @con_id: name of the GPIO from the device's point of view
169 * @idx: index of the GPIO in case several GPIOs share the same name
170 * @flags: mask of GPIO_* values
171 *
172 * gpiod_lookup is a lookup table for associating GPIOs to specific devices and
173 * functions using platform data.
174 */
175struct gpiod_lookup {
176 const char *chip_label;
177 u16 chip_hwnum;
178 const char *con_id;
179 unsigned int idx;
180 enum gpio_lookup_flags flags;
181};
182
183struct gpiod_lookup_table {
184 struct list_head list;
185 const char *dev_id;
186 struct gpiod_lookup table[];
187};
188
189/*
190 * Simple definition of a single GPIO under a con_id
191 */
192#define GPIO_LOOKUP(_chip_label, _chip_hwnum, _con_id, _flags) \
193 GPIO_LOOKUP_IDX(_chip_label, _chip_hwnum, _con_id, 0, _flags)
194
195/*
196 * Use this macro if you need to have several GPIOs under the same con_id.
197 * Each GPIO needs to use a different index and can be accessed using
198 * gpiod_get_index()
199 */
200#define GPIO_LOOKUP_IDX(_chip_label, _chip_hwnum, _con_id, _idx, _flags) \
201{ \
202 .chip_label = _chip_label, \
203 .chip_hwnum = _chip_hwnum, \
204 .con_id = _con_id, \
205 .idx = _idx, \
206 .flags = _flags, \
207}
208
209void gpiod_add_lookup_table(struct gpiod_lookup_table *table);
210
211#ifdef CONFIG_GPIOLIB_IRQCHIP 154#ifdef CONFIG_GPIOLIB_IRQCHIP
212 155
213void gpiochip_set_chained_irqchip(struct gpio_chip *gpiochip, 156void gpiochip_set_chained_irqchip(struct gpio_chip *gpiochip,
@@ -223,6 +166,9 @@ int gpiochip_irqchip_add(struct gpio_chip *gpiochip,
223 166
224#endif /* CONFIG_GPIO_IRQCHIP */ 167#endif /* CONFIG_GPIO_IRQCHIP */
225 168
169int gpiochip_request_own_desc(struct gpio_desc *desc, const char *label);
170void gpiochip_free_own_desc(struct gpio_desc *desc);
171
226#else /* CONFIG_GPIOLIB */ 172#else /* CONFIG_GPIOLIB */
227 173
228static inline struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc) 174static inline struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc)
diff --git a/include/linux/gpio/machine.h b/include/linux/gpio/machine.h
new file mode 100644
index 000000000000..e2706140eaff
--- /dev/null
+++ b/include/linux/gpio/machine.h
@@ -0,0 +1,61 @@
1#ifndef __LINUX_GPIO_MACHINE_H
2#define __LINUX_GPIO_MACHINE_H
3
4#include <linux/types.h>
5#include <linux/list.h>
6
7enum gpio_lookup_flags {
8 GPIO_ACTIVE_HIGH = (0 << 0),
9 GPIO_ACTIVE_LOW = (1 << 0),
10 GPIO_OPEN_DRAIN = (1 << 1),
11 GPIO_OPEN_SOURCE = (1 << 2),
12};
13
14/**
15 * struct gpiod_lookup - lookup table
16 * @chip_label: name of the chip the GPIO belongs to
17 * @chip_hwnum: hardware number (i.e. relative to the chip) of the GPIO
18 * @con_id: name of the GPIO from the device's point of view
19 * @idx: index of the GPIO in case several GPIOs share the same name
20 * @flags: mask of GPIO_* values
21 *
22 * gpiod_lookup is a lookup table for associating GPIOs to specific devices and
23 * functions using platform data.
24 */
25struct gpiod_lookup {
26 const char *chip_label;
27 u16 chip_hwnum;
28 const char *con_id;
29 unsigned int idx;
30 enum gpio_lookup_flags flags;
31};
32
33struct gpiod_lookup_table {
34 struct list_head list;
35 const char *dev_id;
36 struct gpiod_lookup table[];
37};
38
39/*
40 * Simple definition of a single GPIO under a con_id
41 */
42#define GPIO_LOOKUP(_chip_label, _chip_hwnum, _con_id, _flags) \
43 GPIO_LOOKUP_IDX(_chip_label, _chip_hwnum, _con_id, 0, _flags)
44
45/*
46 * Use this macro if you need to have several GPIOs under the same con_id.
47 * Each GPIO needs to use a different index and can be accessed using
48 * gpiod_get_index()
49 */
50#define GPIO_LOOKUP_IDX(_chip_label, _chip_hwnum, _con_id, _idx, _flags) \
51{ \
52 .chip_label = _chip_label, \
53 .chip_hwnum = _chip_hwnum, \
54 .con_id = _con_id, \
55 .idx = _idx, \
56 .flags = _flags, \
57}
58
59void gpiod_add_lookup_table(struct gpiod_lookup_table *table);
60
61#endif /* __LINUX_GPIO_MACHINE_H */
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 77632cf159c0..f53c4a9cca1d 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -167,6 +167,7 @@ struct hid_item {
167#define HID_UP_MSVENDOR 0xff000000 167#define HID_UP_MSVENDOR 0xff000000
168#define HID_UP_CUSTOM 0x00ff0000 168#define HID_UP_CUSTOM 0x00ff0000
169#define HID_UP_LOGIVENDOR 0xffbc0000 169#define HID_UP_LOGIVENDOR 0xffbc0000
170#define HID_UP_LNVENDOR 0xffa00000
170#define HID_UP_SENSOR 0x00200000 171#define HID_UP_SENSOR 0x00200000
171 172
172#define HID_USAGE 0x0000ffff 173#define HID_USAGE 0x0000ffff
@@ -311,6 +312,11 @@ struct hid_item {
311#define HID_GROUP_RMI 0x0100 312#define HID_GROUP_RMI 0x0100
312 313
313/* 314/*
315 * Vendor specific HID device groups
316 */
317#define HID_GROUP_WACOM 0x0101
318
319/*
314 * This is the global environment of the parser. This information is 320 * This is the global environment of the parser. This information is
315 * persistent for main-items. The global environment can be saved and 321 * persistent for main-items. The global environment can be saved and
316 * restored with PUSH/POP statements. 322 * restored with PUSH/POP statements.
diff --git a/include/linux/highmem.h b/include/linux/highmem.h
index 7fb31da45d03..9286a46b7d69 100644
--- a/include/linux/highmem.h
+++ b/include/linux/highmem.h
@@ -93,7 +93,7 @@ static inline int kmap_atomic_idx_push(void)
93 93
94#ifdef CONFIG_DEBUG_HIGHMEM 94#ifdef CONFIG_DEBUG_HIGHMEM
95 WARN_ON_ONCE(in_irq() && !irqs_disabled()); 95 WARN_ON_ONCE(in_irq() && !irqs_disabled());
96 BUG_ON(idx > KM_TYPE_NR); 96 BUG_ON(idx >= KM_TYPE_NR);
97#endif 97#endif
98 return idx; 98 return idx;
99} 99}
diff --git a/include/linux/host1x.h b/include/linux/host1x.h
index d2b52999e771..bb9840fd1e18 100644
--- a/include/linux/host1x.h
+++ b/include/linux/host1x.h
@@ -164,12 +164,15 @@ int host1x_job_submit(struct host1x_job *job);
164 */ 164 */
165 165
166struct host1x_reloc { 166struct host1x_reloc {
167 struct host1x_bo *cmdbuf; 167 struct {
168 u32 cmdbuf_offset; 168 struct host1x_bo *bo;
169 struct host1x_bo *target; 169 unsigned long offset;
170 u32 target_offset; 170 } cmdbuf;
171 u32 shift; 171 struct {
172 u32 pad; 172 struct host1x_bo *bo;
173 unsigned long offset;
174 } target;
175 unsigned long shift;
173}; 176};
174 177
175struct host1x_job { 178struct host1x_job {
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index b826239bdce0..63579cb8d3dc 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -93,10 +93,6 @@ extern bool is_vma_temporary_stack(struct vm_area_struct *vma);
93#endif /* CONFIG_DEBUG_VM */ 93#endif /* CONFIG_DEBUG_VM */
94 94
95extern unsigned long transparent_hugepage_flags; 95extern unsigned long transparent_hugepage_flags;
96extern int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm,
97 pmd_t *dst_pmd, pmd_t *src_pmd,
98 struct vm_area_struct *vma,
99 unsigned long addr, unsigned long end);
100extern int split_huge_page_to_list(struct page *page, struct list_head *list); 96extern int split_huge_page_to_list(struct page *page, struct list_head *list);
101static inline int split_huge_page(struct page *page) 97static inline int split_huge_page(struct page *page)
102{ 98{
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index a23c096b3080..6e6d338641fe 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -87,7 +87,6 @@ pte_t *huge_pmd_share(struct mm_struct *mm, unsigned long addr, pud_t *pud);
87#endif 87#endif
88 88
89extern unsigned long hugepages_treat_as_movable; 89extern unsigned long hugepages_treat_as_movable;
90extern const unsigned long hugetlb_zero, hugetlb_infinity;
91extern int sysctl_hugetlb_shm_group; 90extern int sysctl_hugetlb_shm_group;
92extern struct list_head huge_boot_pages; 91extern struct list_head huge_boot_pages;
93 92
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index b556e0ab946f..ea507665896c 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -577,4 +577,16 @@ static inline struct i2c_adapter *of_find_i2c_adapter_by_node(struct device_node
577} 577}
578#endif /* CONFIG_OF */ 578#endif /* CONFIG_OF */
579 579
580#ifdef CONFIG_I2C_ACPI
581int acpi_i2c_install_space_handler(struct i2c_adapter *adapter);
582void acpi_i2c_remove_space_handler(struct i2c_adapter *adapter);
583void acpi_i2c_register_devices(struct i2c_adapter *adap);
584#else
585static inline void acpi_i2c_register_devices(struct i2c_adapter *adap) { }
586static inline void acpi_i2c_remove_space_handler(struct i2c_adapter *adapter)
587{ }
588static inline int acpi_i2c_install_space_handler(struct i2c_adapter *adapter)
589{ return 0; }
590#endif
591
580#endif /* _LINUX_I2C_H */ 592#endif /* _LINUX_I2C_H */
diff --git a/include/linux/i2c/atmel_mxt_ts.h b/include/linux/i2c/atmel_mxt_ts.h
index 3891dc1de21c..02bf6ea31701 100644
--- a/include/linux/i2c/atmel_mxt_ts.h
+++ b/include/linux/i2c/atmel_mxt_ts.h
@@ -17,9 +17,6 @@
17 17
18/* The platform data for the Atmel maXTouch touchscreen driver */ 18/* The platform data for the Atmel maXTouch touchscreen driver */
19struct mxt_platform_data { 19struct mxt_platform_data {
20 const u8 *config;
21 size_t config_length;
22 u32 config_crc;
23 unsigned long irqflags; 20 unsigned long irqflags;
24 u8 t19_num_keys; 21 u8 t19_num_keys;
25 const unsigned int *t19_keymap; 22 const unsigned int *t19_keymap;
diff --git a/include/linux/i2c/s6000.h b/include/linux/i2c/s6000.h
deleted file mode 100644
index d9b34bfdae76..000000000000
--- a/include/linux/i2c/s6000.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#ifndef __LINUX_I2C_S6000_H
2#define __LINUX_I2C_S6000_H
3
4struct s6_i2c_platform_data {
5 const char *clock; /* the clock to use */
6 int bus_num; /* the bus number to register */
7};
8
9#endif
10
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 4967916fe4ac..d69f0577a319 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -187,7 +187,6 @@ vlan_dev_get_egress_qos_mask(struct net_device *dev, u32 skprio)
187} 187}
188 188
189extern bool vlan_do_receive(struct sk_buff **skb); 189extern bool vlan_do_receive(struct sk_buff **skb);
190extern struct sk_buff *vlan_untag(struct sk_buff *skb);
191 190
192extern int vlan_vid_add(struct net_device *dev, __be16 proto, u16 vid); 191extern int vlan_vid_add(struct net_device *dev, __be16 proto, u16 vid);
193extern void vlan_vid_del(struct net_device *dev, __be16 proto, u16 vid); 192extern void vlan_vid_del(struct net_device *dev, __be16 proto, u16 vid);
@@ -241,11 +240,6 @@ static inline bool vlan_do_receive(struct sk_buff **skb)
241 return false; 240 return false;
242} 241}
243 242
244static inline struct sk_buff *vlan_untag(struct sk_buff *skb)
245{
246 return skb;
247}
248
249static inline int vlan_vid_add(struct net_device *dev, __be16 proto, u16 vid) 243static inline int vlan_vid_add(struct net_device *dev, __be16 proto, u16 vid)
250{ 244{
251 return 0; 245 return 0;
diff --git a/include/linux/input/pixcir_ts.h b/include/linux/input/pixcir_ts.h
index 160cf353aa39..7bae83b7c396 100644
--- a/include/linux/input/pixcir_ts.h
+++ b/include/linux/input/pixcir_ts.h
@@ -43,10 +43,22 @@ enum pixcir_int_mode {
43#define PIXCIR_INT_ENABLE (1UL << 3) 43#define PIXCIR_INT_ENABLE (1UL << 3)
44#define PIXCIR_INT_POL_HIGH (1UL << 2) 44#define PIXCIR_INT_POL_HIGH (1UL << 2)
45 45
46/**
47 * struct pixcir_irc_chip_data - chip related data
48 * @max_fingers: Max number of fingers reported simultaneously by h/w
49 * @has_hw_ids: Hardware supports finger tracking IDs
50 *
51 */
52struct pixcir_i2c_chip_data {
53 u8 max_fingers;
54 bool has_hw_ids;
55};
56
46struct pixcir_ts_platform_data { 57struct pixcir_ts_platform_data {
47 int x_max; 58 int x_max;
48 int y_max; 59 int y_max;
49 int gpio_attb; /* GPIO connected to ATTB line */ 60 int gpio_attb; /* GPIO connected to ATTB line */
61 struct pixcir_i2c_chip_data chip;
50}; 62};
51 63
52#endif 64#endif
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index 5e3a906cc089..142ec544167c 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -237,6 +237,12 @@ extern int iomem_is_exclusive(u64 addr);
237extern int 237extern int
238walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages, 238walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages,
239 void *arg, int (*func)(unsigned long, unsigned long, void *)); 239 void *arg, int (*func)(unsigned long, unsigned long, void *));
240extern int
241walk_system_ram_res(u64 start, u64 end, void *arg,
242 int (*func)(u64, u64, void *));
243extern int
244walk_iomem_res(char *name, unsigned long flags, u64 start, u64 end, void *arg,
245 int (*func)(u64, u64, void *));
240 246
241/* True if any part of r1 overlaps r2 */ 247/* True if any part of r1 overlaps r2 */
242static inline bool resource_overlaps(struct resource *r1, struct resource *r2) 248static inline bool resource_overlaps(struct resource *r1, struct resource *r2)
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index a9e2268ecccb..95624bed87ef 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -470,6 +470,7 @@ extern enum system_states {
470#define TAINT_FIRMWARE_WORKAROUND 11 470#define TAINT_FIRMWARE_WORKAROUND 11
471#define TAINT_OOT_MODULE 12 471#define TAINT_OOT_MODULE 12
472#define TAINT_UNSIGNED_MODULE 13 472#define TAINT_UNSIGNED_MODULE 13
473#define TAINT_SOFTLOCKUP 14
473 474
474extern const char hex_asc[]; 475extern const char hex_asc[];
475#define hex_asc_lo(x) hex_asc[((x) & 0x0f)] 476#define hex_asc_lo(x) hex_asc[((x) & 0x0f)]
@@ -493,11 +494,6 @@ static inline char *hex_byte_pack_upper(char *buf, u8 byte)
493 return buf; 494 return buf;
494} 495}
495 496
496static inline char * __deprecated pack_hex_byte(char *buf, u8 byte)
497{
498 return hex_byte_pack(buf, byte);
499}
500
501extern int hex_to_bin(char ch); 497extern int hex_to_bin(char ch);
502extern int __must_check hex2bin(u8 *dst, const char *src, size_t count); 498extern int __must_check hex2bin(u8 *dst, const char *src, size_t count);
503 499
@@ -849,5 +845,7 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { }
849 /* User perms >= group perms >= other perms */ \ 845 /* User perms >= group perms >= other perms */ \
850 BUILD_BUG_ON_ZERO(((perms) >> 6) < (((perms) >> 3) & 7)) + \ 846 BUILD_BUG_ON_ZERO(((perms) >> 6) < (((perms) >> 3) & 7)) + \
851 BUILD_BUG_ON_ZERO((((perms) >> 3) & 7) < ((perms) & 7)) + \ 847 BUILD_BUG_ON_ZERO((((perms) >> 3) & 7) < ((perms) & 7)) + \
848 /* Other writable? Generally considered a bad idea. */ \
849 BUILD_BUG_ON_ZERO((perms) & 2) + \
852 (perms)) 850 (perms))
853#endif 851#endif
diff --git a/include/linux/kexec.h b/include/linux/kexec.h
index a75641930049..4b2a0e11cc5b 100644
--- a/include/linux/kexec.h
+++ b/include/linux/kexec.h
@@ -10,6 +10,7 @@
10#include <linux/ioport.h> 10#include <linux/ioport.h>
11#include <linux/elfcore.h> 11#include <linux/elfcore.h>
12#include <linux/elf.h> 12#include <linux/elf.h>
13#include <linux/module.h>
13#include <asm/kexec.h> 14#include <asm/kexec.h>
14 15
15/* Verify architecture specific macros are defined */ 16/* Verify architecture specific macros are defined */
@@ -69,7 +70,18 @@ typedef unsigned long kimage_entry_t;
69#define IND_SOURCE 0x8 70#define IND_SOURCE 0x8
70 71
71struct kexec_segment { 72struct kexec_segment {
72 void __user *buf; 73 /*
74 * This pointer can point to user memory if kexec_load() system
75 * call is used or will point to kernel memory if
76 * kexec_file_load() system call is used.
77 *
78 * Use ->buf when expecting to deal with user memory and use ->kbuf
79 * when expecting to deal with kernel memory.
80 */
81 union {
82 void __user *buf;
83 void *kbuf;
84 };
73 size_t bufsz; 85 size_t bufsz;
74 unsigned long mem; 86 unsigned long mem;
75 size_t memsz; 87 size_t memsz;
@@ -84,6 +96,27 @@ struct compat_kexec_segment {
84}; 96};
85#endif 97#endif
86 98
99struct kexec_sha_region {
100 unsigned long start;
101 unsigned long len;
102};
103
104struct purgatory_info {
105 /* Pointer to elf header of read only purgatory */
106 Elf_Ehdr *ehdr;
107
108 /* Pointer to purgatory sechdrs which are modifiable */
109 Elf_Shdr *sechdrs;
110 /*
111 * Temporary buffer location where purgatory is loaded and relocated
112 * This memory can be freed post image load
113 */
114 void *purgatory_buf;
115
116 /* Address where purgatory is finally loaded and is executed from */
117 unsigned long purgatory_load_addr;
118};
119
87struct kimage { 120struct kimage {
88 kimage_entry_t head; 121 kimage_entry_t head;
89 kimage_entry_t *entry; 122 kimage_entry_t *entry;
@@ -100,7 +133,7 @@ struct kimage {
100 133
101 struct list_head control_pages; 134 struct list_head control_pages;
102 struct list_head dest_pages; 135 struct list_head dest_pages;
103 struct list_head unuseable_pages; 136 struct list_head unusable_pages;
104 137
105 /* Address of next control page to allocate for crash kernels. */ 138 /* Address of next control page to allocate for crash kernels. */
106 unsigned long control_page; 139 unsigned long control_page;
@@ -110,13 +143,63 @@ struct kimage {
110#define KEXEC_TYPE_DEFAULT 0 143#define KEXEC_TYPE_DEFAULT 0
111#define KEXEC_TYPE_CRASH 1 144#define KEXEC_TYPE_CRASH 1
112 unsigned int preserve_context : 1; 145 unsigned int preserve_context : 1;
146 /* If set, we are using file mode kexec syscall */
147 unsigned int file_mode:1;
113 148
114#ifdef ARCH_HAS_KIMAGE_ARCH 149#ifdef ARCH_HAS_KIMAGE_ARCH
115 struct kimage_arch arch; 150 struct kimage_arch arch;
116#endif 151#endif
152
153 /* Additional fields for file based kexec syscall */
154 void *kernel_buf;
155 unsigned long kernel_buf_len;
156
157 void *initrd_buf;
158 unsigned long initrd_buf_len;
159
160 char *cmdline_buf;
161 unsigned long cmdline_buf_len;
162
163 /* File operations provided by image loader */
164 struct kexec_file_ops *fops;
165
166 /* Image loader handling the kernel can store a pointer here */
167 void *image_loader_data;
168
169 /* Information for loading purgatory */
170 struct purgatory_info purgatory_info;
117}; 171};
118 172
173/*
174 * Keeps track of buffer parameters as provided by caller for requesting
175 * memory placement of buffer.
176 */
177struct kexec_buf {
178 struct kimage *image;
179 char *buffer;
180 unsigned long bufsz;
181 unsigned long memsz;
182 unsigned long buf_align;
183 unsigned long buf_min;
184 unsigned long buf_max;
185 bool top_down; /* allocate from top of memory hole */
186};
119 187
188typedef int (kexec_probe_t)(const char *kernel_buf, unsigned long kernel_size);
189typedef void *(kexec_load_t)(struct kimage *image, char *kernel_buf,
190 unsigned long kernel_len, char *initrd,
191 unsigned long initrd_len, char *cmdline,
192 unsigned long cmdline_len);
193typedef int (kexec_cleanup_t)(void *loader_data);
194typedef int (kexec_verify_sig_t)(const char *kernel_buf,
195 unsigned long kernel_len);
196
197struct kexec_file_ops {
198 kexec_probe_t *probe;
199 kexec_load_t *load;
200 kexec_cleanup_t *cleanup;
201 kexec_verify_sig_t *verify_sig;
202};
120 203
121/* kexec interface functions */ 204/* kexec interface functions */
122extern void machine_kexec(struct kimage *image); 205extern void machine_kexec(struct kimage *image);
@@ -127,8 +210,21 @@ extern asmlinkage long sys_kexec_load(unsigned long entry,
127 struct kexec_segment __user *segments, 210 struct kexec_segment __user *segments,
128 unsigned long flags); 211 unsigned long flags);
129extern int kernel_kexec(void); 212extern int kernel_kexec(void);
213extern int kexec_add_buffer(struct kimage *image, char *buffer,
214 unsigned long bufsz, unsigned long memsz,
215 unsigned long buf_align, unsigned long buf_min,
216 unsigned long buf_max, bool top_down,
217 unsigned long *load_addr);
130extern struct page *kimage_alloc_control_pages(struct kimage *image, 218extern struct page *kimage_alloc_control_pages(struct kimage *image,
131 unsigned int order); 219 unsigned int order);
220extern int kexec_load_purgatory(struct kimage *image, unsigned long min,
221 unsigned long max, int top_down,
222 unsigned long *load_addr);
223extern int kexec_purgatory_get_set_symbol(struct kimage *image,
224 const char *name, void *buf,
225 unsigned int size, bool get_value);
226extern void *kexec_purgatory_get_symbol_addr(struct kimage *image,
227 const char *name);
132extern void crash_kexec(struct pt_regs *); 228extern void crash_kexec(struct pt_regs *);
133int kexec_should_crash(struct task_struct *); 229int kexec_should_crash(struct task_struct *);
134void crash_save_cpu(struct pt_regs *regs, int cpu); 230void crash_save_cpu(struct pt_regs *regs, int cpu);
@@ -177,6 +273,10 @@ extern int kexec_load_disabled;
177#define KEXEC_FLAGS (KEXEC_ON_CRASH | KEXEC_PRESERVE_CONTEXT) 273#define KEXEC_FLAGS (KEXEC_ON_CRASH | KEXEC_PRESERVE_CONTEXT)
178#endif 274#endif
179 275
276/* List of defined/legal kexec file flags */
277#define KEXEC_FILE_FLAGS (KEXEC_FILE_UNLOAD | KEXEC_FILE_ON_CRASH | \
278 KEXEC_FILE_NO_INITRAMFS)
279
180#define VMCOREINFO_BYTES (4096) 280#define VMCOREINFO_BYTES (4096)
181#define VMCOREINFO_NOTE_NAME "VMCOREINFO" 281#define VMCOREINFO_NOTE_NAME "VMCOREINFO"
182#define VMCOREINFO_NOTE_NAME_BYTES ALIGN(sizeof(VMCOREINFO_NOTE_NAME), 4) 282#define VMCOREINFO_NOTE_NAME_BYTES ALIGN(sizeof(VMCOREINFO_NOTE_NAME), 4)
diff --git a/include/linux/klist.h b/include/linux/klist.h
index a370ce57cf1d..61e5b723ae73 100644
--- a/include/linux/klist.h
+++ b/include/linux/klist.h
@@ -44,7 +44,7 @@ struct klist_node {
44 44
45extern void klist_add_tail(struct klist_node *n, struct klist *k); 45extern void klist_add_tail(struct klist_node *n, struct klist *k);
46extern void klist_add_head(struct klist_node *n, struct klist *k); 46extern void klist_add_head(struct klist_node *n, struct klist *k);
47extern void klist_add_after(struct klist_node *n, struct klist_node *pos); 47extern void klist_add_behind(struct klist_node *n, struct klist_node *pos);
48extern void klist_add_before(struct klist_node *n, struct klist_node *pos); 48extern void klist_add_before(struct klist_node *n, struct klist_node *pos);
49 49
50extern void klist_del(struct klist_node *n); 50extern void klist_del(struct klist_node *n);
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index ec4e3bd83d47..a4c33b34fe3f 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -325,24 +325,7 @@ struct kvm_kernel_irq_routing_entry {
325 struct hlist_node link; 325 struct hlist_node link;
326}; 326};
327 327
328#ifdef CONFIG_HAVE_KVM_IRQ_ROUTING 328struct kvm_irq_routing_table;
329
330struct kvm_irq_routing_table {
331 int chip[KVM_NR_IRQCHIPS][KVM_IRQCHIP_NUM_PINS];
332 struct kvm_kernel_irq_routing_entry *rt_entries;
333 u32 nr_rt_entries;
334 /*
335 * Array indexed by gsi. Each entry contains list of irq chips
336 * the gsi is connected to.
337 */
338 struct hlist_head map[0];
339};
340
341#else
342
343struct kvm_irq_routing_table {};
344
345#endif
346 329
347#ifndef KVM_PRIVATE_MEM_SLOTS 330#ifndef KVM_PRIVATE_MEM_SLOTS
348#define KVM_PRIVATE_MEM_SLOTS 0 331#define KVM_PRIVATE_MEM_SLOTS 0
@@ -401,11 +384,12 @@ struct kvm {
401 struct mutex irq_lock; 384 struct mutex irq_lock;
402#ifdef CONFIG_HAVE_KVM_IRQCHIP 385#ifdef CONFIG_HAVE_KVM_IRQCHIP
403 /* 386 /*
404 * Update side is protected by irq_lock and, 387 * Update side is protected by irq_lock.
405 * if configured, irqfds.lock.
406 */ 388 */
407 struct kvm_irq_routing_table __rcu *irq_routing; 389 struct kvm_irq_routing_table __rcu *irq_routing;
408 struct hlist_head mask_notifier_list; 390 struct hlist_head mask_notifier_list;
391#endif
392#ifdef CONFIG_HAVE_KVM_IRQFD
409 struct hlist_head irq_ack_notifier_list; 393 struct hlist_head irq_ack_notifier_list;
410#endif 394#endif
411 395
@@ -455,7 +439,7 @@ void kvm_vcpu_uninit(struct kvm_vcpu *vcpu);
455int __must_check vcpu_load(struct kvm_vcpu *vcpu); 439int __must_check vcpu_load(struct kvm_vcpu *vcpu);
456void vcpu_put(struct kvm_vcpu *vcpu); 440void vcpu_put(struct kvm_vcpu *vcpu);
457 441
458#ifdef CONFIG_HAVE_KVM_IRQ_ROUTING 442#ifdef CONFIG_HAVE_KVM_IRQFD
459int kvm_irqfd_init(void); 443int kvm_irqfd_init(void);
460void kvm_irqfd_exit(void); 444void kvm_irqfd_exit(void);
461#else 445#else
@@ -602,7 +586,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
602 unsigned int ioctl, unsigned long arg); 586 unsigned int ioctl, unsigned long arg);
603int kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf); 587int kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf);
604 588
605int kvm_dev_ioctl_check_extension(long ext); 589int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext);
606 590
607int kvm_get_dirty_log(struct kvm *kvm, 591int kvm_get_dirty_log(struct kvm *kvm,
608 struct kvm_dirty_log *log, int *is_dirty); 592 struct kvm_dirty_log *log, int *is_dirty);
@@ -752,6 +736,10 @@ void kvm_unregister_irq_mask_notifier(struct kvm *kvm, int irq,
752void kvm_fire_mask_notifiers(struct kvm *kvm, unsigned irqchip, unsigned pin, 736void kvm_fire_mask_notifiers(struct kvm *kvm, unsigned irqchip, unsigned pin,
753 bool mask); 737 bool mask);
754 738
739int kvm_irq_map_gsi(struct kvm *kvm,
740 struct kvm_kernel_irq_routing_entry *entries, int gsi);
741int kvm_irq_map_chip_pin(struct kvm *kvm, unsigned irqchip, unsigned pin);
742
755int kvm_set_irq(struct kvm *kvm, int irq_source_id, u32 irq, int level, 743int kvm_set_irq(struct kvm *kvm, int irq_source_id, u32 irq, int level,
756 bool line_status); 744 bool line_status);
757int kvm_set_irq_inatomic(struct kvm *kvm, int irq_source_id, u32 irq, int level); 745int kvm_set_irq_inatomic(struct kvm *kvm, int irq_source_id, u32 irq, int level);
@@ -942,28 +930,27 @@ int kvm_set_irq_routing(struct kvm *kvm,
942 const struct kvm_irq_routing_entry *entries, 930 const struct kvm_irq_routing_entry *entries,
943 unsigned nr, 931 unsigned nr,
944 unsigned flags); 932 unsigned flags);
945int kvm_set_routing_entry(struct kvm_irq_routing_table *rt, 933int kvm_set_routing_entry(struct kvm_kernel_irq_routing_entry *e,
946 struct kvm_kernel_irq_routing_entry *e,
947 const struct kvm_irq_routing_entry *ue); 934 const struct kvm_irq_routing_entry *ue);
948void kvm_free_irq_routing(struct kvm *kvm); 935void kvm_free_irq_routing(struct kvm *kvm);
949 936
950int kvm_send_userspace_msi(struct kvm *kvm, struct kvm_msi *msi);
951
952#else 937#else
953 938
954static inline void kvm_free_irq_routing(struct kvm *kvm) {} 939static inline void kvm_free_irq_routing(struct kvm *kvm) {}
955 940
956#endif 941#endif
957 942
943int kvm_send_userspace_msi(struct kvm *kvm, struct kvm_msi *msi);
944
958#ifdef CONFIG_HAVE_KVM_EVENTFD 945#ifdef CONFIG_HAVE_KVM_EVENTFD
959 946
960void kvm_eventfd_init(struct kvm *kvm); 947void kvm_eventfd_init(struct kvm *kvm);
961int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args); 948int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args);
962 949
963#ifdef CONFIG_HAVE_KVM_IRQCHIP 950#ifdef CONFIG_HAVE_KVM_IRQFD
964int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args); 951int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args);
965void kvm_irqfd_release(struct kvm *kvm); 952void kvm_irqfd_release(struct kvm *kvm);
966void kvm_irq_routing_update(struct kvm *, struct kvm_irq_routing_table *); 953void kvm_irq_routing_update(struct kvm *);
967#else 954#else
968static inline int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args) 955static inline int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args)
969{ 956{
@@ -985,10 +972,8 @@ static inline int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args)
985static inline void kvm_irqfd_release(struct kvm *kvm) {} 972static inline void kvm_irqfd_release(struct kvm *kvm) {}
986 973
987#ifdef CONFIG_HAVE_KVM_IRQCHIP 974#ifdef CONFIG_HAVE_KVM_IRQCHIP
988static inline void kvm_irq_routing_update(struct kvm *kvm, 975static inline void kvm_irq_routing_update(struct kvm *kvm)
989 struct kvm_irq_routing_table *irq_rt)
990{ 976{
991 rcu_assign_pointer(kvm->irq_routing, irq_rt);
992} 977}
993#endif 978#endif
994 979
diff --git a/include/linux/leds.h b/include/linux/leds.h
index 0287ab296689..6a599dce7f9d 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -15,7 +15,6 @@
15#include <linux/list.h> 15#include <linux/list.h>
16#include <linux/spinlock.h> 16#include <linux/spinlock.h>
17#include <linux/rwsem.h> 17#include <linux/rwsem.h>
18#include <linux/timer.h>
19#include <linux/workqueue.h> 18#include <linux/workqueue.h>
20 19
21struct device; 20struct device;
@@ -63,11 +62,13 @@ struct led_classdev {
63 unsigned long *delay_off); 62 unsigned long *delay_off);
64 63
65 struct device *dev; 64 struct device *dev;
65 const struct attribute_group **groups;
66
66 struct list_head node; /* LED Device list */ 67 struct list_head node; /* LED Device list */
67 const char *default_trigger; /* Trigger to use */ 68 const char *default_trigger; /* Trigger to use */
68 69
69 unsigned long blink_delay_on, blink_delay_off; 70 unsigned long blink_delay_on, blink_delay_off;
70 struct timer_list blink_timer; 71 struct delayed_work blink_work;
71 int blink_brightness; 72 int blink_brightness;
72 73
73 struct work_struct set_brightness_work; 74 struct work_struct set_brightness_work;
diff --git a/include/linux/list.h b/include/linux/list.h
index ef9594171062..cbbb96fcead9 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -654,15 +654,15 @@ static inline void hlist_add_before(struct hlist_node *n,
654 *(n->pprev) = n; 654 *(n->pprev) = n;
655} 655}
656 656
657static inline void hlist_add_after(struct hlist_node *n, 657static inline void hlist_add_behind(struct hlist_node *n,
658 struct hlist_node *next) 658 struct hlist_node *prev)
659{ 659{
660 next->next = n->next; 660 n->next = prev->next;
661 n->next = next; 661 prev->next = n;
662 next->pprev = &n->next; 662 n->pprev = &prev->next;
663 663
664 if(next->next) 664 if (n->next)
665 next->next->pprev = &next->next; 665 n->next->pprev = &n->next;
666} 666}
667 667
668/* after that we'll appear to be on some hlist and hlist_del will work */ 668/* after that we'll appear to be on some hlist and hlist_del will work */
diff --git a/include/linux/memblock.h b/include/linux/memblock.h
index b660e05b63d4..e8cc45307f8f 100644
--- a/include/linux/memblock.h
+++ b/include/linux/memblock.h
@@ -249,7 +249,7 @@ phys_addr_t memblock_alloc(phys_addr_t size, phys_addr_t align);
249/* 249/*
250 * Set the allocation direction to bottom-up or top-down. 250 * Set the allocation direction to bottom-up or top-down.
251 */ 251 */
252static inline void memblock_set_bottom_up(bool enable) 252static inline void __init memblock_set_bottom_up(bool enable)
253{ 253{
254 memblock.bottom_up = enable; 254 memblock.bottom_up = enable;
255} 255}
@@ -264,7 +264,7 @@ static inline bool memblock_bottom_up(void)
264 return memblock.bottom_up; 264 return memblock.bottom_up;
265} 265}
266#else 266#else
267static inline void memblock_set_bottom_up(bool enable) {} 267static inline void __init memblock_set_bottom_up(bool enable) {}
268static inline bool memblock_bottom_up(void) { return false; } 268static inline bool memblock_bottom_up(void) { return false; }
269#endif 269#endif
270 270
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index eb65d29516ca..e0752d204d9e 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -54,39 +54,20 @@ struct mem_cgroup_reclaim_cookie {
54}; 54};
55 55
56#ifdef CONFIG_MEMCG 56#ifdef CONFIG_MEMCG
57/* 57int mem_cgroup_try_charge(struct page *page, struct mm_struct *mm,
58 * All "charge" functions with gfp_mask should use GFP_KERNEL or 58 gfp_t gfp_mask, struct mem_cgroup **memcgp);
59 * (gfp_mask & GFP_RECLAIM_MASK). In current implementatin, memcg doesn't 59void mem_cgroup_commit_charge(struct page *page, struct mem_cgroup *memcg,
60 * alloc memory but reclaims memory from all available zones. So, "where I want 60 bool lrucare);
61 * memory from" bits of gfp_mask has no meaning. So any bits of that field is 61void mem_cgroup_cancel_charge(struct page *page, struct mem_cgroup *memcg);
62 * available but adding a rule is better. charge functions' gfp_mask should 62void mem_cgroup_uncharge(struct page *page);
63 * be set to GFP_KERNEL or gfp_mask & GFP_RECLAIM_MASK for avoiding ambiguous 63void mem_cgroup_uncharge_list(struct list_head *page_list);
64 * codes.
65 * (Of course, if memcg does memory allocation in future, GFP_KERNEL is sane.)
66 */
67 64
68extern int mem_cgroup_charge_anon(struct page *page, struct mm_struct *mm, 65void mem_cgroup_migrate(struct page *oldpage, struct page *newpage,
69 gfp_t gfp_mask); 66 bool lrucare);
70/* for swap handling */
71extern int mem_cgroup_try_charge_swapin(struct mm_struct *mm,
72 struct page *page, gfp_t mask, struct mem_cgroup **memcgp);
73extern void mem_cgroup_commit_charge_swapin(struct page *page,
74 struct mem_cgroup *memcg);
75extern void mem_cgroup_cancel_charge_swapin(struct mem_cgroup *memcg);
76
77extern int mem_cgroup_charge_file(struct page *page, struct mm_struct *mm,
78 gfp_t gfp_mask);
79 67
80struct lruvec *mem_cgroup_zone_lruvec(struct zone *, struct mem_cgroup *); 68struct lruvec *mem_cgroup_zone_lruvec(struct zone *, struct mem_cgroup *);
81struct lruvec *mem_cgroup_page_lruvec(struct page *, struct zone *); 69struct lruvec *mem_cgroup_page_lruvec(struct page *, struct zone *);
82 70
83/* For coalescing uncharge for reducing memcg' overhead*/
84extern void mem_cgroup_uncharge_start(void);
85extern void mem_cgroup_uncharge_end(void);
86
87extern void mem_cgroup_uncharge_page(struct page *page);
88extern void mem_cgroup_uncharge_cache_page(struct page *page);
89
90bool __mem_cgroup_same_or_subtree(const struct mem_cgroup *root_memcg, 71bool __mem_cgroup_same_or_subtree(const struct mem_cgroup *root_memcg,
91 struct mem_cgroup *memcg); 72 struct mem_cgroup *memcg);
92bool task_in_mem_cgroup(struct task_struct *task, 73bool task_in_mem_cgroup(struct task_struct *task,
@@ -113,12 +94,6 @@ bool mm_match_cgroup(const struct mm_struct *mm, const struct mem_cgroup *memcg)
113 94
114extern struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *memcg); 95extern struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *memcg);
115 96
116extern void
117mem_cgroup_prepare_migration(struct page *page, struct page *newpage,
118 struct mem_cgroup **memcgp);
119extern void mem_cgroup_end_migration(struct mem_cgroup *memcg,
120 struct page *oldpage, struct page *newpage, bool migration_ok);
121
122struct mem_cgroup *mem_cgroup_iter(struct mem_cgroup *, 97struct mem_cgroup *mem_cgroup_iter(struct mem_cgroup *,
123 struct mem_cgroup *, 98 struct mem_cgroup *,
124 struct mem_cgroup_reclaim_cookie *); 99 struct mem_cgroup_reclaim_cookie *);
@@ -133,8 +108,6 @@ unsigned long mem_cgroup_get_lru_size(struct lruvec *lruvec, enum lru_list);
133void mem_cgroup_update_lru_size(struct lruvec *, enum lru_list, int); 108void mem_cgroup_update_lru_size(struct lruvec *, enum lru_list, int);
134extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, 109extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg,
135 struct task_struct *p); 110 struct task_struct *p);
136extern void mem_cgroup_replace_page_cache(struct page *oldpage,
137 struct page *newpage);
138 111
139static inline void mem_cgroup_oom_enable(void) 112static inline void mem_cgroup_oom_enable(void)
140{ 113{
@@ -233,46 +206,36 @@ void mem_cgroup_print_bad_page(struct page *page);
233#else /* CONFIG_MEMCG */ 206#else /* CONFIG_MEMCG */
234struct mem_cgroup; 207struct mem_cgroup;
235 208
236static inline int mem_cgroup_charge_anon(struct page *page, 209static inline int mem_cgroup_try_charge(struct page *page, struct mm_struct *mm,
237 struct mm_struct *mm, gfp_t gfp_mask) 210 gfp_t gfp_mask,
238{ 211 struct mem_cgroup **memcgp)
239 return 0;
240}
241
242static inline int mem_cgroup_charge_file(struct page *page,
243 struct mm_struct *mm, gfp_t gfp_mask)
244{
245 return 0;
246}
247
248static inline int mem_cgroup_try_charge_swapin(struct mm_struct *mm,
249 struct page *page, gfp_t gfp_mask, struct mem_cgroup **memcgp)
250{ 212{
213 *memcgp = NULL;
251 return 0; 214 return 0;
252} 215}
253 216
254static inline void mem_cgroup_commit_charge_swapin(struct page *page, 217static inline void mem_cgroup_commit_charge(struct page *page,
255 struct mem_cgroup *memcg) 218 struct mem_cgroup *memcg,
256{ 219 bool lrucare)
257}
258
259static inline void mem_cgroup_cancel_charge_swapin(struct mem_cgroup *memcg)
260{ 220{
261} 221}
262 222
263static inline void mem_cgroup_uncharge_start(void) 223static inline void mem_cgroup_cancel_charge(struct page *page,
224 struct mem_cgroup *memcg)
264{ 225{
265} 226}
266 227
267static inline void mem_cgroup_uncharge_end(void) 228static inline void mem_cgroup_uncharge(struct page *page)
268{ 229{
269} 230}
270 231
271static inline void mem_cgroup_uncharge_page(struct page *page) 232static inline void mem_cgroup_uncharge_list(struct list_head *page_list)
272{ 233{
273} 234}
274 235
275static inline void mem_cgroup_uncharge_cache_page(struct page *page) 236static inline void mem_cgroup_migrate(struct page *oldpage,
237 struct page *newpage,
238 bool lrucare)
276{ 239{
277} 240}
278 241
@@ -311,17 +274,6 @@ static inline struct cgroup_subsys_state
311 return NULL; 274 return NULL;
312} 275}
313 276
314static inline void
315mem_cgroup_prepare_migration(struct page *page, struct page *newpage,
316 struct mem_cgroup **memcgp)
317{
318}
319
320static inline void mem_cgroup_end_migration(struct mem_cgroup *memcg,
321 struct page *oldpage, struct page *newpage, bool migration_ok)
322{
323}
324
325static inline struct mem_cgroup * 277static inline struct mem_cgroup *
326mem_cgroup_iter(struct mem_cgroup *root, 278mem_cgroup_iter(struct mem_cgroup *root,
327 struct mem_cgroup *prev, 279 struct mem_cgroup *prev,
@@ -417,10 +369,6 @@ static inline
417void mem_cgroup_count_vm_event(struct mm_struct *mm, enum vm_event_item idx) 369void mem_cgroup_count_vm_event(struct mm_struct *mm, enum vm_event_item idx)
418{ 370{
419} 371}
420static inline void mem_cgroup_replace_page_cache(struct page *oldpage,
421 struct page *newpage)
422{
423}
424#endif /* CONFIG_MEMCG */ 372#endif /* CONFIG_MEMCG */
425 373
426#if !defined(CONFIG_MEMCG) || !defined(CONFIG_DEBUG_VM) 374#if !defined(CONFIG_MEMCG) || !defined(CONFIG_DEBUG_VM)
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index 010d125bffbf..d9524c49d767 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -26,11 +26,12 @@ enum {
26 MEMORY_HOTPLUG_MAX_BOOTMEM_TYPE = NODE_INFO, 26 MEMORY_HOTPLUG_MAX_BOOTMEM_TYPE = NODE_INFO,
27}; 27};
28 28
29/* Types for control the zone type of onlined memory */ 29/* Types for control the zone type of onlined and offlined memory */
30enum { 30enum {
31 ONLINE_KEEP, 31 MMOP_OFFLINE = -1,
32 ONLINE_KERNEL, 32 MMOP_ONLINE_KEEP,
33 ONLINE_MOVABLE, 33 MMOP_ONLINE_KERNEL,
34 MMOP_ONLINE_MOVABLE,
34}; 35};
35 36
36/* 37/*
@@ -258,6 +259,7 @@ static inline void remove_memory(int nid, u64 start, u64 size) {}
258extern int walk_memory_range(unsigned long start_pfn, unsigned long end_pfn, 259extern int walk_memory_range(unsigned long start_pfn, unsigned long end_pfn,
259 void *arg, int (*func)(struct memory_block *, void *)); 260 void *arg, int (*func)(struct memory_block *, void *));
260extern int add_memory(int nid, u64 start, u64 size); 261extern int add_memory(int nid, u64 start, u64 size);
262extern int zone_for_memory(int nid, u64 start, u64 size, int zone_default);
261extern int arch_add_memory(int nid, u64 start, u64 size); 263extern int arch_add_memory(int nid, u64 start, u64 size);
262extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages); 264extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages);
263extern bool is_memblock_offlined(struct memory_block *mem); 265extern bool is_memblock_offlined(struct memory_block *mem);
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h
index 4e7fe7417fc9..9475fee2bfc5 100644
--- a/include/linux/mfd/abx500/ab8500.h
+++ b/include/linux/mfd/abx500/ab8500.h
@@ -505,6 +505,7 @@ static inline int is_ab9540_2p0_or_earlier(struct ab8500 *ab)
505void ab8500_override_turn_on_stat(u8 mask, u8 set); 505void ab8500_override_turn_on_stat(u8 mask, u8 set);
506 506
507#ifdef CONFIG_AB8500_DEBUG 507#ifdef CONFIG_AB8500_DEBUG
508extern int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size);
508void ab8500_dump_all_banks(struct device *dev); 509void ab8500_dump_all_banks(struct device *dev);
509void ab8500_debug_register_interrupt(int line); 510void ab8500_debug_register_interrupt(int line);
510#else 511#else
diff --git a/include/linux/mfd/arizona/core.h b/include/linux/mfd/arizona/core.h
index a614b33d0a39..f34723f7663c 100644
--- a/include/linux/mfd/arizona/core.h
+++ b/include/linux/mfd/arizona/core.h
@@ -18,7 +18,7 @@
18#include <linux/regulator/consumer.h> 18#include <linux/regulator/consumer.h>
19#include <linux/mfd/arizona/pdata.h> 19#include <linux/mfd/arizona/pdata.h>
20 20
21#define ARIZONA_MAX_CORE_SUPPLIES 3 21#define ARIZONA_MAX_CORE_SUPPLIES 2
22 22
23enum arizona_type { 23enum arizona_type {
24 WM5102 = 1, 24 WM5102 = 1,
@@ -46,8 +46,8 @@ enum arizona_type {
46#define ARIZONA_IRQ_DSP_IRQ6 17 46#define ARIZONA_IRQ_DSP_IRQ6 17
47#define ARIZONA_IRQ_DSP_IRQ7 18 47#define ARIZONA_IRQ_DSP_IRQ7 18
48#define ARIZONA_IRQ_DSP_IRQ8 19 48#define ARIZONA_IRQ_DSP_IRQ8 19
49#define ARIZONA_IRQ_SPK_SHUTDOWN_WARN 20 49#define ARIZONA_IRQ_SPK_OVERHEAT_WARN 20
50#define ARIZONA_IRQ_SPK_SHUTDOWN 21 50#define ARIZONA_IRQ_SPK_OVERHEAT 21
51#define ARIZONA_IRQ_MICDET 22 51#define ARIZONA_IRQ_MICDET 22
52#define ARIZONA_IRQ_HPDET 23 52#define ARIZONA_IRQ_HPDET 23
53#define ARIZONA_IRQ_WSEQ_DONE 24 53#define ARIZONA_IRQ_WSEQ_DONE 24
@@ -78,8 +78,31 @@ enum arizona_type {
78#define ARIZONA_IRQ_FLL1_CLOCK_OK 49 78#define ARIZONA_IRQ_FLL1_CLOCK_OK 49
79#define ARIZONA_IRQ_MICD_CLAMP_RISE 50 79#define ARIZONA_IRQ_MICD_CLAMP_RISE 50
80#define ARIZONA_IRQ_MICD_CLAMP_FALL 51 80#define ARIZONA_IRQ_MICD_CLAMP_FALL 51
81 81#define ARIZONA_IRQ_HP3R_DONE 52
82#define ARIZONA_NUM_IRQ 52 82#define ARIZONA_IRQ_HP3L_DONE 53
83#define ARIZONA_IRQ_HP2R_DONE 54
84#define ARIZONA_IRQ_HP2L_DONE 55
85#define ARIZONA_IRQ_HP1R_DONE 56
86#define ARIZONA_IRQ_HP1L_DONE 57
87#define ARIZONA_IRQ_ISRC3_CFG_ERR 58
88#define ARIZONA_IRQ_DSP_SHARED_WR_COLL 59
89#define ARIZONA_IRQ_SPK_SHUTDOWN 60
90#define ARIZONA_IRQ_SPK1R_SHORT 61
91#define ARIZONA_IRQ_SPK1L_SHORT 62
92#define ARIZONA_IRQ_HP3R_SC_NEG 63
93#define ARIZONA_IRQ_HP3R_SC_POS 64
94#define ARIZONA_IRQ_HP3L_SC_NEG 65
95#define ARIZONA_IRQ_HP3L_SC_POS 66
96#define ARIZONA_IRQ_HP2R_SC_NEG 67
97#define ARIZONA_IRQ_HP2R_SC_POS 68
98#define ARIZONA_IRQ_HP2L_SC_NEG 69
99#define ARIZONA_IRQ_HP2L_SC_POS 70
100#define ARIZONA_IRQ_HP1R_SC_NEG 71
101#define ARIZONA_IRQ_HP1R_SC_POS 72
102#define ARIZONA_IRQ_HP1L_SC_NEG 73
103#define ARIZONA_IRQ_HP1L_SC_POS 74
104
105#define ARIZONA_NUM_IRQ 75
83 106
84struct snd_soc_dapm_context; 107struct snd_soc_dapm_context;
85 108
@@ -109,6 +132,8 @@ struct arizona {
109 struct mutex clk_lock; 132 struct mutex clk_lock;
110 int clk32k_ref; 133 int clk32k_ref;
111 134
135 bool ctrlif_error;
136
112 struct snd_soc_dapm_context *dapm; 137 struct snd_soc_dapm_context *dapm;
113 138
114 int tdm_width[ARIZONA_MAX_AIF]; 139 int tdm_width[ARIZONA_MAX_AIF];
diff --git a/include/linux/mfd/arizona/registers.h b/include/linux/mfd/arizona/registers.h
index 7204d8138b24..dbd23c36de21 100644
--- a/include/linux/mfd/arizona/registers.h
+++ b/include/linux/mfd/arizona/registers.h
@@ -878,22 +878,26 @@
878#define ARIZONA_INTERRUPT_STATUS_3 0xD02 878#define ARIZONA_INTERRUPT_STATUS_3 0xD02
879#define ARIZONA_INTERRUPT_STATUS_4 0xD03 879#define ARIZONA_INTERRUPT_STATUS_4 0xD03
880#define ARIZONA_INTERRUPT_STATUS_5 0xD04 880#define ARIZONA_INTERRUPT_STATUS_5 0xD04
881#define ARIZONA_INTERRUPT_STATUS_6 0xD05
881#define ARIZONA_INTERRUPT_STATUS_1_MASK 0xD08 882#define ARIZONA_INTERRUPT_STATUS_1_MASK 0xD08
882#define ARIZONA_INTERRUPT_STATUS_2_MASK 0xD09 883#define ARIZONA_INTERRUPT_STATUS_2_MASK 0xD09
883#define ARIZONA_INTERRUPT_STATUS_3_MASK 0xD0A 884#define ARIZONA_INTERRUPT_STATUS_3_MASK 0xD0A
884#define ARIZONA_INTERRUPT_STATUS_4_MASK 0xD0B 885#define ARIZONA_INTERRUPT_STATUS_4_MASK 0xD0B
885#define ARIZONA_INTERRUPT_STATUS_5_MASK 0xD0C 886#define ARIZONA_INTERRUPT_STATUS_5_MASK 0xD0C
887#define ARIZONA_INTERRUPT_STATUS_6_MASK 0xD0D
886#define ARIZONA_INTERRUPT_CONTROL 0xD0F 888#define ARIZONA_INTERRUPT_CONTROL 0xD0F
887#define ARIZONA_IRQ2_STATUS_1 0xD10 889#define ARIZONA_IRQ2_STATUS_1 0xD10
888#define ARIZONA_IRQ2_STATUS_2 0xD11 890#define ARIZONA_IRQ2_STATUS_2 0xD11
889#define ARIZONA_IRQ2_STATUS_3 0xD12 891#define ARIZONA_IRQ2_STATUS_3 0xD12
890#define ARIZONA_IRQ2_STATUS_4 0xD13 892#define ARIZONA_IRQ2_STATUS_4 0xD13
891#define ARIZONA_IRQ2_STATUS_5 0xD14 893#define ARIZONA_IRQ2_STATUS_5 0xD14
894#define ARIZONA_IRQ2_STATUS_6 0xD15
892#define ARIZONA_IRQ2_STATUS_1_MASK 0xD18 895#define ARIZONA_IRQ2_STATUS_1_MASK 0xD18
893#define ARIZONA_IRQ2_STATUS_2_MASK 0xD19 896#define ARIZONA_IRQ2_STATUS_2_MASK 0xD19
894#define ARIZONA_IRQ2_STATUS_3_MASK 0xD1A 897#define ARIZONA_IRQ2_STATUS_3_MASK 0xD1A
895#define ARIZONA_IRQ2_STATUS_4_MASK 0xD1B 898#define ARIZONA_IRQ2_STATUS_4_MASK 0xD1B
896#define ARIZONA_IRQ2_STATUS_5_MASK 0xD1C 899#define ARIZONA_IRQ2_STATUS_5_MASK 0xD1C
900#define ARIZONA_IRQ2_STATUS_6_MASK 0xD1D
897#define ARIZONA_IRQ2_CONTROL 0xD1F 901#define ARIZONA_IRQ2_CONTROL 0xD1F
898#define ARIZONA_INTERRUPT_RAW_STATUS_2 0xD20 902#define ARIZONA_INTERRUPT_RAW_STATUS_2 0xD20
899#define ARIZONA_INTERRUPT_RAW_STATUS_3 0xD21 903#define ARIZONA_INTERRUPT_RAW_STATUS_3 0xD21
@@ -902,6 +906,7 @@
902#define ARIZONA_INTERRUPT_RAW_STATUS_6 0xD24 906#define ARIZONA_INTERRUPT_RAW_STATUS_6 0xD24
903#define ARIZONA_INTERRUPT_RAW_STATUS_7 0xD25 907#define ARIZONA_INTERRUPT_RAW_STATUS_7 0xD25
904#define ARIZONA_INTERRUPT_RAW_STATUS_8 0xD26 908#define ARIZONA_INTERRUPT_RAW_STATUS_8 0xD26
909#define ARIZONA_INTERRUPT_RAW_STATUS_9 0xD28
905#define ARIZONA_IRQ_PIN_STATUS 0xD40 910#define ARIZONA_IRQ_PIN_STATUS 0xD40
906#define ARIZONA_ADSP2_IRQ0 0xD41 911#define ARIZONA_ADSP2_IRQ0 0xD41
907#define ARIZONA_AOD_WKUP_AND_TRIG 0xD50 912#define ARIZONA_AOD_WKUP_AND_TRIG 0xD50
@@ -4691,14 +4696,14 @@
4691/* 4696/*
4692 * R3330 (0xD02) - Interrupt Status 3 4697 * R3330 (0xD02) - Interrupt Status 3
4693 */ 4698 */
4694#define ARIZONA_SPK_SHUTDOWN_WARN_EINT1 0x8000 /* SPK_SHUTDOWN_WARN_EINT1 */ 4699#define ARIZONA_SPK_OVERHEAT_WARN_EINT1 0x8000 /* SPK_OVERHEAT_WARN_EINT1 */
4695#define ARIZONA_SPK_SHUTDOWN_WARN_EINT1_MASK 0x8000 /* SPK_SHUTDOWN_WARN_EINT1 */ 4700#define ARIZONA_SPK_OVERHEAT_WARN_EINT1_MASK 0x8000 /* SPK_OVERHEAD_WARN_EINT1 */
4696#define ARIZONA_SPK_SHUTDOWN_WARN_EINT1_SHIFT 15 /* SPK_SHUTDOWN_WARN_EINT1 */ 4701#define ARIZONA_SPK_OVERHEAT_WARN_EINT1_SHIFT 15 /* SPK_OVERHEAT_WARN_EINT1 */
4697#define ARIZONA_SPK_SHUTDOWN_WARN_EINT1_WIDTH 1 /* SPK_SHUTDOWN_WARN_EINT1 */ 4702#define ARIZONA_SPK_OVERHEAT_WARN_EINT1_WIDTH 1 /* SPK_OVERHEAT_WARN_EINT1 */
4698#define ARIZONA_SPK_SHUTDOWN_EINT1 0x4000 /* SPK_SHUTDOWN_EINT1 */ 4703#define ARIZONA_SPK_OVERHEAT_EINT1 0x4000 /* SPK_OVERHEAT_EINT1 */
4699#define ARIZONA_SPK_SHUTDOWN_EINT1_MASK 0x4000 /* SPK_SHUTDOWN_EINT1 */ 4704#define ARIZONA_SPK_OVERHEAT_EINT1_MASK 0x4000 /* SPK_OVERHEAT_EINT1 */
4700#define ARIZONA_SPK_SHUTDOWN_EINT1_SHIFT 14 /* SPK_SHUTDOWN_EINT1 */ 4705#define ARIZONA_SPK_OVERHEAT_EINT1_SHIFT 14 /* SPK_OVERHEAT_EINT1 */
4701#define ARIZONA_SPK_SHUTDOWN_EINT1_WIDTH 1 /* SPK_SHUTDOWN_EINT1 */ 4706#define ARIZONA_SPK_OVERHEAT_EINT1_WIDTH 1 /* SPK_OVERHEAT_EINT1 */
4702#define ARIZONA_HPDET_EINT1 0x2000 /* HPDET_EINT1 */ 4707#define ARIZONA_HPDET_EINT1 0x2000 /* HPDET_EINT1 */
4703#define ARIZONA_HPDET_EINT1_MASK 0x2000 /* HPDET_EINT1 */ 4708#define ARIZONA_HPDET_EINT1_MASK 0x2000 /* HPDET_EINT1 */
4704#define ARIZONA_HPDET_EINT1_SHIFT 13 /* HPDET_EINT1 */ 4709#define ARIZONA_HPDET_EINT1_SHIFT 13 /* HPDET_EINT1 */
@@ -4795,6 +4800,77 @@
4795#define ARIZONA_ISRC2_CFG_ERR_EINT1_MASK 0x0040 /* ISRC2_CFG_ERR_EINT1 */ 4800#define ARIZONA_ISRC2_CFG_ERR_EINT1_MASK 0x0040 /* ISRC2_CFG_ERR_EINT1 */
4796#define ARIZONA_ISRC2_CFG_ERR_EINT1_SHIFT 6 /* ISRC2_CFG_ERR_EINT1 */ 4801#define ARIZONA_ISRC2_CFG_ERR_EINT1_SHIFT 6 /* ISRC2_CFG_ERR_EINT1 */
4797#define ARIZONA_ISRC2_CFG_ERR_EINT1_WIDTH 1 /* ISRC2_CFG_ERR_EINT1 */ 4802#define ARIZONA_ISRC2_CFG_ERR_EINT1_WIDTH 1 /* ISRC2_CFG_ERR_EINT1 */
4803#define ARIZONA_HP3R_DONE_EINT1 0x0020 /* HP3R_DONE_EINT1 */
4804#define ARIZONA_HP3R_DONE_EINT1_MASK 0x0020 /* HP3R_DONE_EINT1 */
4805#define ARIZONA_HP3R_DONE_EINT1_SHIFT 5 /* HP3R_DONE_EINT1 */
4806#define ARIZONA_HP3R_DONE_EINT1_WIDTH 1 /* HP3R_DONE_EINT1 */
4807#define ARIZONA_HP3L_DONE_EINT1 0x0010 /* HP3L_DONE_EINT1 */
4808#define ARIZONA_HP3L_DONE_EINT1_MASK 0x0010 /* HP3L_DONE_EINT1 */
4809#define ARIZONA_HP3L_DONE_EINT1_SHIFT 4 /* HP3L_DONE_EINT1 */
4810#define ARIZONA_HP3L_DONE_EINT1_WIDTH 1 /* HP3L_DONE_EINT1 */
4811#define ARIZONA_HP2R_DONE_EINT1 0x0008 /* HP2R_DONE_EINT1 */
4812#define ARIZONA_HP2R_DONE_EINT1_MASK 0x0008 /* HP2R_DONE_EINT1 */
4813#define ARIZONA_HP2R_DONE_EINT1_SHIFT 3 /* HP2R_DONE_EINT1 */
4814#define ARIZONA_HP2R_DONE_EINT1_WIDTH 1 /* HP2R_DONE_EINT1 */
4815#define ARIZONA_HP2L_DONE_EINT1 0x0004 /* HP2L_DONE_EINT1 */
4816#define ARIZONA_HP2L_DONE_EINT1_MASK 0x0004 /* HP2L_DONE_EINT1 */
4817#define ARIZONA_HP2L_DONE_EINT1_SHIFT 2 /* HP2L_DONE_EINT1 */
4818#define ARIZONA_HP2L_DONE_EINT1_WIDTH 1 /* HP2L_DONE_EINT1 */
4819#define ARIZONA_HP1R_DONE_EINT1 0x0002 /* HP1R_DONE_EINT1 */
4820#define ARIZONA_HP1R_DONE_EINT1_MASK 0x0002 /* HP1R_DONE_EINT1 */
4821#define ARIZONA_HP1R_DONE_EINT1_SHIFT 1 /* HP1R_DONE_EINT1 */
4822#define ARIZONA_HP1R_DONE_EINT1_WIDTH 1 /* HP1R_DONE_EINT1 */
4823#define ARIZONA_HP1L_DONE_EINT1 0x0001 /* HP1L_DONE_EINT1 */
4824#define ARIZONA_HP1L_DONE_EINT1_MASK 0x0001 /* HP1L_DONE_EINT1 */
4825#define ARIZONA_HP1L_DONE_EINT1_SHIFT 0 /* HP1L_DONE_EINT1 */
4826#define ARIZONA_HP1L_DONE_EINT1_WIDTH 1 /* HP1L_DONE_EINT1 */
4827
4828/*
4829 * R3331 (0xD03) - Interrupt Status 4 (Alternate layout)
4830 *
4831 * Alternate layout used on later devices, note only fields that have moved
4832 * are specified
4833 */
4834#define ARIZONA_V2_AIF3_ERR_EINT1 0x8000 /* AIF3_ERR_EINT1 */
4835#define ARIZONA_V2_AIF3_ERR_EINT1_MASK 0x8000 /* AIF3_ERR_EINT1 */
4836#define ARIZONA_V2_AIF3_ERR_EINT1_SHIFT 15 /* AIF3_ERR_EINT1 */
4837#define ARIZONA_V2_AIF3_ERR_EINT1_WIDTH 1 /* AIF3_ERR_EINT1 */
4838#define ARIZONA_V2_AIF2_ERR_EINT1 0x4000 /* AIF2_ERR_EINT1 */
4839#define ARIZONA_V2_AIF2_ERR_EINT1_MASK 0x4000 /* AIF2_ERR_EINT1 */
4840#define ARIZONA_V2_AIF2_ERR_EINT1_SHIFT 14 /* AIF2_ERR_EINT1 */
4841#define ARIZONA_V2_AIF2_ERR_EINT1_WIDTH 1 /* AIF2_ERR_EINT1 */
4842#define ARIZONA_V2_AIF1_ERR_EINT1 0x2000 /* AIF1_ERR_EINT1 */
4843#define ARIZONA_V2_AIF1_ERR_EINT1_MASK 0x2000 /* AIF1_ERR_EINT1 */
4844#define ARIZONA_V2_AIF1_ERR_EINT1_SHIFT 13 /* AIF1_ERR_EINT1 */
4845#define ARIZONA_V2_AIF1_ERR_EINT1_WIDTH 1 /* AIF1_ERR_EINT1 */
4846#define ARIZONA_V2_CTRLIF_ERR_EINT1 0x1000 /* CTRLIF_ERR_EINT1 */
4847#define ARIZONA_V2_CTRLIF_ERR_EINT1_MASK 0x1000 /* CTRLIF_ERR_EINT1 */
4848#define ARIZONA_V2_CTRLIF_ERR_EINT1_SHIFT 12 /* CTRLIF_ERR_EINT1 */
4849#define ARIZONA_V2_CTRLIF_ERR_EINT1_WIDTH 1 /* CTRLIF_ERR_EINT1 */
4850#define ARIZONA_V2_MIXER_DROPPED_SAMPLE_EINT1 0x0800 /* MIXER_DROPPED_SAMPLE_EINT1 */
4851#define ARIZONA_V2_MIXER_DROPPED_SAMPLE_EINT1_MASK 0x0800 /* MIXER_DROPPED_SAMPLE_EINT1 */
4852#define ARIZONA_V2_MIXER_DROPPED_SAMPLE_EINT1_SHIFT 11 /* MIXER_DROPPED_SAMPLE_EINT1 */
4853#define ARIZONA_V2_MIXER_DROPPED_SAMPLE_EINT1_WIDTH 1 /* MIXER_DROPPED_SAMPLE_EINT1 */
4854#define ARIZONA_V2_ASYNC_CLK_ENA_LOW_EINT1 0x0400 /* ASYNC_CLK_ENA_LOW_EINT1 */
4855#define ARIZONA_V2_ASYNC_CLK_ENA_LOW_EINT1_MASK 0x0400 /* ASYNC_CLK_ENA_LOW_EINT1 */
4856#define ARIZONA_V2_ASYNC_CLK_ENA_LOW_EINT1_SHIFT 10 /* ASYNC_CLK_ENA_LOW_EINT1 */
4857#define ARIZONA_V2_ASYNC_CLK_ENA_LOW_EINT1_WIDTH 1 /* ASYNC_CLK_ENA_LOW_EINT1 */
4858#define ARIZONA_V2_SYSCLK_ENA_LOW_EINT1 0x0200 /* SYSCLK_ENA_LOW_EINT1 */
4859#define ARIZONA_V2_SYSCLK_ENA_LOW_EINT1_MASK 0x0200 /* SYSCLK_ENA_LOW_EINT1 */
4860#define ARIZONA_V2_SYSCLK_ENA_LOW_EINT1_SHIFT 9 /* SYSCLK_ENA_LOW_EINT1 */
4861#define ARIZONA_V2_SYSCLK_ENA_LOW_EINT1_WIDTH 1 /* SYSCLK_ENA_LOW_EINT1 */
4862#define ARIZONA_V2_ISRC1_CFG_ERR_EINT1 0x0100 /* ISRC1_CFG_ERR_EINT1 */
4863#define ARIZONA_V2_ISRC1_CFG_ERR_EINT1_MASK 0x0100 /* ISRC1_CFG_ERR_EINT1 */
4864#define ARIZONA_V2_ISRC1_CFG_ERR_EINT1_SHIFT 8 /* ISRC1_CFG_ERR_EINT1 */
4865#define ARIZONA_V2_ISRC1_CFG_ERR_EINT1_WIDTH 1 /* ISRC1_CFG_ERR_EINT1 */
4866#define ARIZONA_V2_ISRC2_CFG_ERR_EINT1 0x0080 /* ISRC2_CFG_ERR_EINT1 */
4867#define ARIZONA_V2_ISRC2_CFG_ERR_EINT1_MASK 0x0080 /* ISRC2_CFG_ERR_EINT1 */
4868#define ARIZONA_V2_ISRC2_CFG_ERR_EINT1_SHIFT 7 /* ISRC2_CFG_ERR_EINT1 */
4869#define ARIZONA_V2_ISRC2_CFG_ERR_EINT1_WIDTH 1 /* ISRC2_CFG_ERR_EINT1 */
4870#define ARIZONA_V2_ISRC3_CFG_ERR_EINT1 0x0040 /* ISRC3_CFG_ERR_EINT1 */
4871#define ARIZONA_V2_ISRC3_CFG_ERR_EINT1_MASK 0x0040 /* ISRC3_CFG_ERR_EINT1 */
4872#define ARIZONA_V2_ISRC3_CFG_ERR_EINT1_SHIFT 6 /* ISRC3_CFG_ERR_EINT1 */
4873#define ARIZONA_V2_ISRC3_CFG_ERR_EINT1_WIDTH 1 /* ISRC3_CFG_ERR_EINT1 */
4798 4874
4799/* 4875/*
4800 * R3332 (0xD04) - Interrupt Status 5 4876 * R3332 (0xD04) - Interrupt Status 5
@@ -4821,6 +4897,85 @@
4821#define ARIZONA_FLL1_CLOCK_OK_EINT1_WIDTH 1 /* FLL1_CLOCK_OK_EINT1 */ 4897#define ARIZONA_FLL1_CLOCK_OK_EINT1_WIDTH 1 /* FLL1_CLOCK_OK_EINT1 */
4822 4898
4823/* 4899/*
4900 * R3332 (0xD05) - Interrupt Status 5 (Alternate layout)
4901 *
4902 * Alternate layout used on later devices, note only fields that have moved
4903 * are specified
4904 */
4905#define ARIZONA_V2_ASRC_CFG_ERR_EINT1 0x0008 /* ASRC_CFG_ERR_EINT1 */
4906#define ARIZONA_V2_ASRC_CFG_ERR_EINT1_MASK 0x0008 /* ASRC_CFG_ERR_EINT1 */
4907#define ARIZONA_V2_ASRC_CFG_ERR_EINT1_SHIFT 3 /* ASRC_CFG_ERR_EINT1 */
4908#define ARIZONA_V2_ASRC_CFG_ERR_EINT1_WIDTH 1 /* ASRC_CFG_ERR_EINT1 */
4909
4910/*
4911 * R3333 (0xD05) - Interrupt Status 6
4912 */
4913#define ARIZONA_DSP_SHARED_WR_COLL_EINT1 0x8000 /* DSP_SHARED_WR_COLL_EINT1 */
4914#define ARIZONA_DSP_SHARED_WR_COLL_EINT1_MASK 0x8000 /* DSP_SHARED_WR_COLL_EINT1 */
4915#define ARIZONA_DSP_SHARED_WR_COLL_EINT1_SHIFT 15 /* DSP_SHARED_WR_COLL_EINT1 */
4916#define ARIZONA_DSP_SHARED_WR_COLL_EINT1_WIDTH 1 /* DSP_SHARED_WR_COLL_EINT1 */
4917#define ARIZONA_SPK_SHUTDOWN_EINT1 0x4000 /* SPK_SHUTDOWN_EINT1 */
4918#define ARIZONA_SPK_SHUTDOWN_EINT1_MASK 0x4000 /* SPK_SHUTDOWN_EINT1 */
4919#define ARIZONA_SPK_SHUTDOWN_EINT1_SHIFT 14 /* SPK_SHUTDOWN_EINT1 */
4920#define ARIZONA_SPK_SHUTDOWN_EINT1_WIDTH 1 /* SPK_SHUTDOWN_EINT1 */
4921#define ARIZONA_SPK1R_SHORT_EINT1 0x2000 /* SPK1R_SHORT_EINT1 */
4922#define ARIZONA_SPK1R_SHORT_EINT1_MASK 0x2000 /* SPK1R_SHORT_EINT1 */
4923#define ARIZONA_SPK1R_SHORT_EINT1_SHIFT 13 /* SPK1R_SHORT_EINT1 */
4924#define ARIZONA_SPK1R_SHORT_EINT1_WIDTH 1 /* SPK1R_SHORT_EINT1 */
4925#define ARIZONA_SPK1L_SHORT_EINT1 0x1000 /* SPK1L_SHORT_EINT1 */
4926#define ARIZONA_SPK1L_SHORT_EINT1_MASK 0x1000 /* SPK1L_SHORT_EINT1 */
4927#define ARIZONA_SPK1L_SHORT_EINT1_SHIFT 12 /* SPK1L_SHORT_EINT1 */
4928#define ARIZONA_SPK1L_SHORT_EINT1_WIDTH 1 /* SPK1L_SHORT_EINT1 */
4929#define ARIZONA_HP3R_SC_NEG_EINT1 0x0800 /* HP3R_SC_NEG_EINT1 */
4930#define ARIZONA_HP3R_SC_NEG_EINT1_MASK 0x0800 /* HP3R_SC_NEG_EINT1 */
4931#define ARIZONA_HP3R_SC_NEG_EINT1_SHIFT 11 /* HP3R_SC_NEG_EINT1 */
4932#define ARIZONA_HP3R_SC_NEG_EINT1_WIDTH 1 /* HP3R_SC_NEG_EINT1 */
4933#define ARIZONA_HP3R_SC_POS_EINT1 0x0400 /* HP3R_SC_POS_EINT1 */
4934#define ARIZONA_HP3R_SC_POS_EINT1_MASK 0x0400 /* HP3R_SC_POS_EINT1 */
4935#define ARIZONA_HP3R_SC_POS_EINT1_SHIFT 10 /* HP3R_SC_POS_EINT1 */
4936#define ARIZONA_HP3R_SC_POS_EINT1_WIDTH 1 /* HP3R_SC_POS_EINT1 */
4937#define ARIZONA_HP3L_SC_NEG_EINT1 0x0200 /* HP3L_SC_NEG_EINT1 */
4938#define ARIZONA_HP3L_SC_NEG_EINT1_MASK 0x0200 /* HP3L_SC_NEG_EINT1 */
4939#define ARIZONA_HP3L_SC_NEG_EINT1_SHIFT 9 /* HP3L_SC_NEG_EINT1 */
4940#define ARIZONA_HP3L_SC_NEG_EINT1_WIDTH 1 /* HP3L_SC_NEG_EINT1 */
4941#define ARIZONA_HP3L_SC_POS_EINT1 0x0100 /* HP3L_SC_POS_EINT1 */
4942#define ARIZONA_HP3L_SC_POS_EINT1_MASK 0x0100 /* HP3L_SC_POS_EINT1 */
4943#define ARIZONA_HP3L_SC_POS_EINT1_SHIFT 8 /* HP3L_SC_POS_EINT1 */
4944#define ARIZONA_HP3L_SC_POS_EINT1_WIDTH 1 /* HP3L_SC_POS_EINT1 */
4945#define ARIZONA_HP2R_SC_NEG_EINT1 0x0080 /* HP2R_SC_NEG_EINT1 */
4946#define ARIZONA_HP2R_SC_NEG_EINT1_MASK 0x0080 /* HP2R_SC_NEG_EINT1 */
4947#define ARIZONA_HP2R_SC_NEG_EINT1_SHIFT 7 /* HP2R_SC_NEG_EINT1 */
4948#define ARIZONA_HP2R_SC_NEG_EINT1_WIDTH 1 /* HP2R_SC_NEG_EINT1 */
4949#define ARIZONA_HP2R_SC_POS_EINT1 0x0040 /* HP2R_SC_POS_EINT1 */
4950#define ARIZONA_HP2R_SC_POS_EINT1_MASK 0x0040 /* HP2R_SC_POS_EINT1 */
4951#define ARIZONA_HP2R_SC_POS_EINT1_SHIFT 6 /* HP2R_SC_POS_EINT1 */
4952#define ARIZONA_HP2R_SC_POS_EINT1_WIDTH 1 /* HP2R_SC_POS_EINT1 */
4953#define ARIZONA_HP2L_SC_NEG_EINT1 0x0020 /* HP2L_SC_NEG_EINT1 */
4954#define ARIZONA_HP2L_SC_NEG_EINT1_MASK 0x0020 /* HP2L_SC_NEG_EINT1 */
4955#define ARIZONA_HP2L_SC_NEG_EINT1_SHIFT 5 /* HP2L_SC_NEG_EINT1 */
4956#define ARIZONA_HP2L_SC_NEG_EINT1_WIDTH 1 /* HP2L_SC_NEG_EINT1 */
4957#define ARIZONA_HP2L_SC_POS_EINT1 0x0010 /* HP2L_SC_POS_EINT1 */
4958#define ARIZONA_HP2L_SC_POS_EINT1_MASK 0x0010 /* HP2L_SC_POS_EINT1 */
4959#define ARIZONA_HP2L_SC_POS_EINT1_SHIFT 4 /* HP2L_SC_POS_EINT1 */
4960#define ARIZONA_HP2L_SC_POS_EINT1_WIDTH 1 /* HP2L_SC_POS_EINT1 */
4961#define ARIZONA_HP1R_SC_NEG_EINT1 0x0008 /* HP1R_SC_NEG_EINT1 */
4962#define ARIZONA_HP1R_SC_NEG_EINT1_MASK 0x0008 /* HP1R_SC_NEG_EINT1 */
4963#define ARIZONA_HP1R_SC_NEG_EINT1_SHIFT 3 /* HP1R_SC_NEG_EINT1 */
4964#define ARIZONA_HP1R_SC_NEG_EINT1_WIDTH 1 /* HP1R_SC_NEG_EINT1 */
4965#define ARIZONA_HP1R_SC_POS_EINT1 0x0004 /* HP1R_SC_POS_EINT1 */
4966#define ARIZONA_HP1R_SC_POS_EINT1_MASK 0x0004 /* HP1R_SC_POS_EINT1 */
4967#define ARIZONA_HP1R_SC_POS_EINT1_SHIFT 2 /* HP1R_SC_POS_EINT1 */
4968#define ARIZONA_HP1R_SC_POS_EINT1_WIDTH 1 /* HP1R_SC_POS_EINT1 */
4969#define ARIZONA_HP1L_SC_NEG_EINT1 0x0002 /* HP1L_SC_NEG_EINT1 */
4970#define ARIZONA_HP1L_SC_NEG_EINT1_MASK 0x0002 /* HP1L_SC_NEG_EINT1 */
4971#define ARIZONA_HP1L_SC_NEG_EINT1_SHIFT 1 /* HP1L_SC_NEG_EINT1 */
4972#define ARIZONA_HP1L_SC_NEG_EINT1_WIDTH 1 /* HP1L_SC_NEG_EINT1 */
4973#define ARIZONA_HP1L_SC_POS_EINT1 0x0001 /* HP1L_SC_POS_EINT1 */
4974#define ARIZONA_HP1L_SC_POS_EINT1_MASK 0x0001 /* HP1L_SC_POS_EINT1 */
4975#define ARIZONA_HP1L_SC_POS_EINT1_SHIFT 0 /* HP1L_SC_POS_EINT1 */
4976#define ARIZONA_HP1L_SC_POS_EINT1_WIDTH 1 /* HP1L_SC_POS_EINT1 */
4977
4978/*
4824 * R3336 (0xD08) - Interrupt Status 1 Mask 4979 * R3336 (0xD08) - Interrupt Status 1 Mask
4825 */ 4980 */
4826#define ARIZONA_IM_GP4_EINT1 0x0008 /* IM_GP4_EINT1 */ 4981#define ARIZONA_IM_GP4_EINT1 0x0008 /* IM_GP4_EINT1 */
@@ -4859,14 +5014,14 @@
4859/* 5014/*
4860 * R3338 (0xD0A) - Interrupt Status 3 Mask 5015 * R3338 (0xD0A) - Interrupt Status 3 Mask
4861 */ 5016 */
4862#define ARIZONA_IM_SPK_SHUTDOWN_WARN_EINT1 0x8000 /* IM_SPK_SHUTDOWN_WARN_EINT1 */ 5017#define ARIZONA_IM_SPK_OVERHEAT_WARN_EINT1 0x8000 /* IM_SPK_OVERHEAT_WARN_EINT1 */
4863#define ARIZONA_IM_SPK_SHUTDOWN_WARN_EINT1_MASK 0x8000 /* IM_SPK_SHUTDOWN_WARN_EINT1 */ 5018#define ARIZONA_IM_SPK_OVERHEAT_WARN_EINT1_MASK 0x8000 /* IM_SPK_OVERHEAT_WARN_EINT1 */
4864#define ARIZONA_IM_SPK_SHUTDOWN_WARN_EINT1_SHIFT 15 /* IM_SPK_SHUTDOWN_WARN_EINT1 */ 5019#define ARIZONA_IM_SPK_OVERHEAT_WARN_EINT1_SHIFT 15 /* IM_SPK_OVERHEAT_WARN_EINT1 */
4865#define ARIZONA_IM_SPK_SHUTDOWN_WARN_EINT1_WIDTH 1 /* IM_SPK_SHUTDOWN_WARN_EINT1 */ 5020#define ARIZONA_IM_SPK_OVERHEAT_WARN_EINT1_WIDTH 1 /* IM_SPK_OVERHEAT_WARN_EINT1 */
4866#define ARIZONA_IM_SPK_SHUTDOWN_EINT1 0x4000 /* IM_SPK_SHUTDOWN_EINT1 */ 5021#define ARIZONA_IM_SPK_OVERHEAT_EINT1 0x4000 /* IM_SPK_OVERHEAT_EINT1 */
4867#define ARIZONA_IM_SPK_SHUTDOWN_EINT1_MASK 0x4000 /* IM_SPK_SHUTDOWN_EINT1 */ 5022#define ARIZONA_IM_SPK_OVERHEAT_EINT1_MASK 0x4000 /* IM_SPK_OVERHEAT_EINT1 */
4868#define ARIZONA_IM_SPK_SHUTDOWN_EINT1_SHIFT 14 /* IM_SPK_SHUTDOWN_EINT1 */ 5023#define ARIZONA_IM_SPK_OVERHEAT_EINT1_SHIFT 14 /* IM_SPK_OVERHEAT_EINT1 */
4869#define ARIZONA_IM_SPK_SHUTDOWN_EINT1_WIDTH 1 /* IM_SPK_SHUTDOWN_EINT1 */ 5024#define ARIZONA_IM_SPK_OVERHEAT_EINT1_WIDTH 1 /* IM_SPK_OVERHEAT_EINT1 */
4870#define ARIZONA_IM_HPDET_EINT1 0x2000 /* IM_HPDET_EINT1 */ 5025#define ARIZONA_IM_HPDET_EINT1 0x2000 /* IM_HPDET_EINT1 */
4871#define ARIZONA_IM_HPDET_EINT1_MASK 0x2000 /* IM_HPDET_EINT1 */ 5026#define ARIZONA_IM_HPDET_EINT1_MASK 0x2000 /* IM_HPDET_EINT1 */
4872#define ARIZONA_IM_HPDET_EINT1_SHIFT 13 /* IM_HPDET_EINT1 */ 5027#define ARIZONA_IM_HPDET_EINT1_SHIFT 13 /* IM_HPDET_EINT1 */
@@ -4963,6 +5118,77 @@
4963#define ARIZONA_IM_ISRC2_CFG_ERR_EINT1_MASK 0x0040 /* IM_ISRC2_CFG_ERR_EINT1 */ 5118#define ARIZONA_IM_ISRC2_CFG_ERR_EINT1_MASK 0x0040 /* IM_ISRC2_CFG_ERR_EINT1 */
4964#define ARIZONA_IM_ISRC2_CFG_ERR_EINT1_SHIFT 6 /* IM_ISRC2_CFG_ERR_EINT1 */ 5119#define ARIZONA_IM_ISRC2_CFG_ERR_EINT1_SHIFT 6 /* IM_ISRC2_CFG_ERR_EINT1 */
4965#define ARIZONA_IM_ISRC2_CFG_ERR_EINT1_WIDTH 1 /* IM_ISRC2_CFG_ERR_EINT1 */ 5120#define ARIZONA_IM_ISRC2_CFG_ERR_EINT1_WIDTH 1 /* IM_ISRC2_CFG_ERR_EINT1 */
5121#define ARIZONA_IM_HP3R_DONE_EINT1 0x0020 /* IM_HP3R_DONE_EINT1 */
5122#define ARIZONA_IM_HP3R_DONE_EINT1_MASK 0x0020 /* IM_HP3R_DONE_EINT1 */
5123#define ARIZONA_IM_HP3R_DONE_EINT1_SHIFT 5 /* IM_HP3R_DONE_EINT1 */
5124#define ARIZONA_IM_HP3R_DONE_EINT1_WIDTH 1 /* IM_HP3R_DONE_EINT1 */
5125#define ARIZONA_IM_HP3L_DONE_EINT1 0x0010 /* IM_HP3L_DONE_EINT1 */
5126#define ARIZONA_IM_HP3L_DONE_EINT1_MASK 0x0010 /* IM_HP3L_DONE_EINT1 */
5127#define ARIZONA_IM_HP3L_DONE_EINT1_SHIFT 4 /* IM_HP3L_DONE_EINT1 */
5128#define ARIZONA_IM_HP3L_DONE_EINT1_WIDTH 1 /* IM_HP3L_DONE_EINT1 */
5129#define ARIZONA_IM_HP2R_DONE_EINT1 0x0008 /* IM_HP2R_DONE_EINT1 */
5130#define ARIZONA_IM_HP2R_DONE_EINT1_MASK 0x0008 /* IM_HP2R_DONE_EINT1 */
5131#define ARIZONA_IM_HP2R_DONE_EINT1_SHIFT 3 /* IM_HP2R_DONE_EINT1 */
5132#define ARIZONA_IM_HP2R_DONE_EINT1_WIDTH 1 /* IM_HP2R_DONE_EINT1 */
5133#define ARIZONA_IM_HP2L_DONE_EINT1 0x0004 /* IM_HP2L_DONE_EINT1 */
5134#define ARIZONA_IM_HP2L_DONE_EINT1_MASK 0x0004 /* IM_HP2L_DONE_EINT1 */
5135#define ARIZONA_IM_HP2L_DONE_EINT1_SHIFT 2 /* IM_HP2L_DONE_EINT1 */
5136#define ARIZONA_IM_HP2L_DONE_EINT1_WIDTH 1 /* IM_HP2L_DONE_EINT1 */
5137#define ARIZONA_IM_HP1R_DONE_EINT1 0x0002 /* IM_HP1R_DONE_EINT1 */
5138#define ARIZONA_IM_HP1R_DONE_EINT1_MASK 0x0002 /* IM_HP1R_DONE_EINT1 */
5139#define ARIZONA_IM_HP1R_DONE_EINT1_SHIFT 1 /* IM_HP1R_DONE_EINT1 */
5140#define ARIZONA_IM_HP1R_DONE_EINT1_WIDTH 1 /* IM_HP1R_DONE_EINT1 */
5141#define ARIZONA_IM_HP1L_DONE_EINT1 0x0001 /* IM_HP1L_DONE_EINT1 */
5142#define ARIZONA_IM_HP1L_DONE_EINT1_MASK 0x0001 /* IM_HP1L_DONE_EINT1 */
5143#define ARIZONA_IM_HP1L_DONE_EINT1_SHIFT 0 /* IM_HP1L_DONE_EINT1 */
5144#define ARIZONA_IM_HP1L_DONE_EINT1_WIDTH 1 /* IM_HP1L_DONE_EINT1 */
5145
5146/*
5147 * R3339 (0xD0B) - Interrupt Status 4 Mask (Alternate layout)
5148 *
5149 * Alternate layout used on later devices, note only fields that have moved
5150 * are specified
5151 */
5152#define ARIZONA_V2_IM_AIF3_ERR_EINT1 0x8000 /* IM_AIF3_ERR_EINT1 */
5153#define ARIZONA_V2_IM_AIF3_ERR_EINT1_MASK 0x8000 /* IM_AIF3_ERR_EINT1 */
5154#define ARIZONA_V2_IM_AIF3_ERR_EINT1_SHIFT 15 /* IM_AIF3_ERR_EINT1 */
5155#define ARIZONA_V2_IM_AIF3_ERR_EINT1_WIDTH 1 /* IM_AIF3_ERR_EINT1 */
5156#define ARIZONA_V2_IM_AIF2_ERR_EINT1 0x4000 /* IM_AIF2_ERR_EINT1 */
5157#define ARIZONA_V2_IM_AIF2_ERR_EINT1_MASK 0x4000 /* IM_AIF2_ERR_EINT1 */
5158#define ARIZONA_V2_IM_AIF2_ERR_EINT1_SHIFT 14 /* IM_AIF2_ERR_EINT1 */
5159#define ARIZONA_V2_IM_AIF2_ERR_EINT1_WIDTH 1 /* IM_AIF2_ERR_EINT1 */
5160#define ARIZONA_V2_IM_AIF1_ERR_EINT1 0x2000 /* IM_AIF1_ERR_EINT1 */
5161#define ARIZONA_V2_IM_AIF1_ERR_EINT1_MASK 0x2000 /* IM_AIF1_ERR_EINT1 */
5162#define ARIZONA_V2_IM_AIF1_ERR_EINT1_SHIFT 13 /* IM_AIF1_ERR_EINT1 */
5163#define ARIZONA_V2_IM_AIF1_ERR_EINT1_WIDTH 1 /* IM_AIF1_ERR_EINT1 */
5164#define ARIZONA_V2_IM_CTRLIF_ERR_EINT1 0x1000 /* IM_CTRLIF_ERR_EINT1 */
5165#define ARIZONA_V2_IM_CTRLIF_ERR_EINT1_MASK 0x1000 /* IM_CTRLIF_ERR_EINT1 */
5166#define ARIZONA_V2_IM_CTRLIF_ERR_EINT1_SHIFT 12 /* IM_CTRLIF_ERR_EINT1 */
5167#define ARIZONA_V2_IM_CTRLIF_ERR_EINT1_WIDTH 1 /* IM_CTRLIF_ERR_EINT1 */
5168#define ARIZONA_V2_IM_MIXER_DROPPED_SAMPLE_EINT1 0x0800 /* IM_MIXER_DROPPED_SAMPLE_EINT1 */
5169#define ARIZONA_V2_IM_MIXER_DROPPED_SAMPLE_EINT1_MASK 0x0800 /* IM_MIXER_DROPPED_SAMPLE_EINT1 */
5170#define ARIZONA_V2_IM_MIXER_DROPPED_SAMPLE_EINT1_SHIFT 11 /* IM_MIXER_DROPPED_SAMPLE_EINT1 */
5171#define ARIZONA_V2_IM_MIXER_DROPPED_SAMPLE_EINT1_WIDTH 1 /* IM_MIXER_DROPPED_SAMPLE_EINT1 */
5172#define ARIZONA_V2_IM_ASYNC_CLK_ENA_LOW_EINT1 0x0400 /* IM_ASYNC_CLK_ENA_LOW_EINT1 */
5173#define ARIZONA_V2_IM_ASYNC_CLK_ENA_LOW_EINT1_MASK 0x0400 /* IM_ASYNC_CLK_ENA_LOW_EINT1 */
5174#define ARIZONA_V2_IM_ASYNC_CLK_ENA_LOW_EINT1_SHIFT 10 /* IM_ASYNC_CLK_ENA_LOW_EINT1 */
5175#define ARIZONA_V2_IM_ASYNC_CLK_ENA_LOW_EINT1_WIDTH 1 /* IM_ASYNC_CLK_ENA_LOW_EINT1 */
5176#define ARIZONA_V2_IM_SYSCLK_ENA_LOW_EINT1 0x0200 /* IM_SYSCLK_ENA_LOW_EINT1 */
5177#define ARIZONA_V2_IM_SYSCLK_ENA_LOW_EINT1_MASK 0x0200 /* IM_SYSCLK_ENA_LOW_EINT1 */
5178#define ARIZONA_V2_IM_SYSCLK_ENA_LOW_EINT1_SHIFT 9 /* IM_SYSCLK_ENA_LOW_EINT1 */
5179#define ARIZONA_V2_IM_SYSCLK_ENA_LOW_EINT1_WIDTH 1 /* IM_SYSCLK_ENA_LOW_EINT1 */
5180#define ARIZONA_V2_IM_ISRC1_CFG_ERR_EINT1 0x0100 /* IM_ISRC1_CFG_ERR_EINT1 */
5181#define ARIZONA_V2_IM_ISRC1_CFG_ERR_EINT1_MASK 0x0100 /* IM_ISRC1_CFG_ERR_EINT1 */
5182#define ARIZONA_V2_IM_ISRC1_CFG_ERR_EINT1_SHIFT 8 /* IM_ISRC1_CFG_ERR_EINT1 */
5183#define ARIZONA_V2_IM_ISRC1_CFG_ERR_EINT1_WIDTH 1 /* IM_ISRC1_CFG_ERR_EINT1 */
5184#define ARIZONA_V2_IM_ISRC2_CFG_ERR_EINT1 0x0080 /* IM_ISRC2_CFG_ERR_EINT1 */
5185#define ARIZONA_V2_IM_ISRC2_CFG_ERR_EINT1_MASK 0x0080 /* IM_ISRC2_CFG_ERR_EINT1 */
5186#define ARIZONA_V2_IM_ISRC2_CFG_ERR_EINT1_SHIFT 7 /* IM_ISRC2_CFG_ERR_EINT1 */
5187#define ARIZONA_V2_IM_ISRC2_CFG_ERR_EINT1_WIDTH 1 /* IM_ISRC2_CFG_ERR_EINT1 */
5188#define ARIZONA_V2_IM_ISRC3_CFG_ERR_EINT1 0x0040 /* IM_ISRC3_CFG_ERR_EINT1 */
5189#define ARIZONA_V2_IM_ISRC3_CFG_ERR_EINT1_MASK 0x0040 /* IM_ISRC3_CFG_ERR_EINT1 */
5190#define ARIZONA_V2_IM_ISRC3_CFG_ERR_EINT1_SHIFT 6 /* IM_ISRC3_CFG_ERR_EINT1 */
5191#define ARIZONA_V2_IM_ISRC3_CFG_ERR_EINT1_WIDTH 1 /* IM_ISRC3_CFG_ERR_EINT1 */
4966 5192
4967/* 5193/*
4968 * R3340 (0xD0C) - Interrupt Status 5 Mask 5194 * R3340 (0xD0C) - Interrupt Status 5 Mask
@@ -4989,6 +5215,85 @@
4989#define ARIZONA_IM_FLL1_CLOCK_OK_EINT1_WIDTH 1 /* IM_FLL1_CLOCK_OK_EINT1 */ 5215#define ARIZONA_IM_FLL1_CLOCK_OK_EINT1_WIDTH 1 /* IM_FLL1_CLOCK_OK_EINT1 */
4990 5216
4991/* 5217/*
5218 * R3340 (0xD0C) - Interrupt Status 5 Mask (Alternate layout)
5219 *
5220 * Alternate layout used on later devices, note only fields that have moved
5221 * are specified
5222 */
5223#define ARIZONA_V2_IM_ASRC_CFG_ERR_EINT1 0x0008 /* IM_ASRC_CFG_ERR_EINT1 */
5224#define ARIZONA_V2_IM_ASRC_CFG_ERR_EINT1_MASK 0x0008 /* IM_ASRC_CFG_ERR_EINT1 */
5225#define ARIZONA_V2_IM_ASRC_CFG_ERR_EINT1_SHIFT 3 /* IM_ASRC_CFG_ERR_EINT1 */
5226#define ARIZONA_V2_IM_ASRC_CFG_ERR_EINT1_WIDTH 1 /* IM_ASRC_CFG_ERR_EINT1 */
5227
5228/*
5229 * R3341 (0xD0D) - Interrupt Status 6 Mask
5230 */
5231#define ARIZONA_IM_DSP_SHARED_WR_COLL_EINT1 0x8000 /* IM_DSP_SHARED_WR_COLL_EINT1 */
5232#define ARIZONA_IM_DSP_SHARED_WR_COLL_EINT1_MASK 0x8000 /* IM_DSP_SHARED_WR_COLL_EINT1 */
5233#define ARIZONA_IM_DSP_SHARED_WR_COLL_EINT1_SHIFT 15 /* IM_DSP_SHARED_WR_COLL_EINT1 */
5234#define ARIZONA_IM_DSP_SHARED_WR_COLL_EINT1_WIDTH 1 /* IM_DSP_SHARED_WR_COLL_EINT1 */
5235#define ARIZONA_IM_SPK_SHUTDOWN_EINT1 0x4000 /* IM_SPK_SHUTDOWN_EINT1 */
5236#define ARIZONA_IM_SPK_SHUTDOWN_EINT1_MASK 0x4000 /* IM_SPK_SHUTDOWN_EINT1 */
5237#define ARIZONA_IM_SPK_SHUTDOWN_EINT1_SHIFT 14 /* IM_SPK_SHUTDOWN_EINT1 */
5238#define ARIZONA_IM_SPK_SHUTDOWN_EINT1_WIDTH 1 /* IM_SPK_SHUTDOWN_EINT1 */
5239#define ARIZONA_IM_SPK1R_SHORT_EINT1 0x2000 /* IM_SPK1R_SHORT_EINT1 */
5240#define ARIZONA_IM_SPK1R_SHORT_EINT1_MASK 0x2000 /* IM_SPK1R_SHORT_EINT1 */
5241#define ARIZONA_IM_SPK1R_SHORT_EINT1_SHIFT 13 /* IM_SPK1R_SHORT_EINT1 */
5242#define ARIZONA_IM_SPK1R_SHORT_EINT1_WIDTH 1 /* IM_SPK1R_SHORT_EINT1 */
5243#define ARIZONA_IM_SPK1L_SHORT_EINT1 0x1000 /* IM_SPK1L_SHORT_EINT1 */
5244#define ARIZONA_IM_SPK1L_SHORT_EINT1_MASK 0x1000 /* IM_SPK1L_SHORT_EINT1 */
5245#define ARIZONA_IM_SPK1L_SHORT_EINT1_SHIFT 12 /* IM_SPK1L_SHORT_EINT1 */
5246#define ARIZONA_IM_SPK1L_SHORT_EINT1_WIDTH 1 /* IM_SPK1L_SHORT_EINT1 */
5247#define ARIZONA_IM_HP3R_SC_NEG_EINT1 0x0800 /* IM_HP3R_SC_NEG_EINT1 */
5248#define ARIZONA_IM_HP3R_SC_NEG_EINT1_MASK 0x0800 /* IM_HP3R_SC_NEG_EINT1 */
5249#define ARIZONA_IM_HP3R_SC_NEG_EINT1_SHIFT 11 /* IM_HP3R_SC_NEG_EINT1 */
5250#define ARIZONA_IM_HP3R_SC_NEG_EINT1_WIDTH 1 /* IM_HP3R_SC_NEG_EINT1 */
5251#define ARIZONA_IM_HP3R_SC_POS_EINT1 0x0400 /* IM_HP3R_SC_POS_EINT1 */
5252#define ARIZONA_IM_HP3R_SC_POS_EINT1_MASK 0x0400 /* IM_HP3R_SC_POS_EINT1 */
5253#define ARIZONA_IM_HP3R_SC_POS_EINT1_SHIFT 10 /* IM_HP3R_SC_POS_EINT1 */
5254#define ARIZONA_IM_HP3R_SC_POS_EINT1_WIDTH 1 /* IM_HP3R_SC_POS_EINT1 */
5255#define ARIZONA_IM_HP3L_SC_NEG_EINT1 0x0200 /* IM_HP3L_SC_NEG_EINT1 */
5256#define ARIZONA_IM_HP3L_SC_NEG_EINT1_MASK 0x0200 /* IM_HP3L_SC_NEG_EINT1 */
5257#define ARIZONA_IM_HP3L_SC_NEG_EINT1_SHIFT 9 /* IM_HP3L_SC_NEG_EINT1 */
5258#define ARIZONA_IM_HP3L_SC_NEG_EINT1_WIDTH 1 /* IM_HP3L_SC_NEG_EINT1 */
5259#define ARIZONA_IM_HP3L_SC_POS_EINT1 0x0100 /* IM_HP3L_SC_POS_EINT1 */
5260#define ARIZONA_IM_HP3L_SC_POS_EINT1_MASK 0x0100 /* IM_HP3L_SC_POS_EINT1 */
5261#define ARIZONA_IM_HP3L_SC_POS_EINT1_SHIFT 8 /* IM_HP3L_SC_POS_EINT1 */
5262#define ARIZONA_IM_HP3L_SC_POS_EINT1_WIDTH 1 /* IM_HP3L_SC_POS_EINT1 */
5263#define ARIZONA_IM_HP2R_SC_NEG_EINT1 0x0080 /* IM_HP2R_SC_NEG_EINT1 */
5264#define ARIZONA_IM_HP2R_SC_NEG_EINT1_MASK 0x0080 /* IM_HP2R_SC_NEG_EINT1 */
5265#define ARIZONA_IM_HP2R_SC_NEG_EINT1_SHIFT 7 /* IM_HP2R_SC_NEG_EINT1 */
5266#define ARIZONA_IM_HP2R_SC_NEG_EINT1_WIDTH 1 /* IM_HP2R_SC_NEG_EINT1 */
5267#define ARIZONA_IM_HP2R_SC_POS_EINT1 0x0040 /* IM_HP2R_SC_POS_EINT1 */
5268#define ARIZONA_IM_HP2R_SC_POS_EINT1_MASK 0x0040 /* IM_HP2R_SC_POS_EINT1 */
5269#define ARIZONA_IM_HP2R_SC_POS_EINT1_SHIFT 6 /* IM_HP2R_SC_POS_EINT1 */
5270#define ARIZONA_IM_HP2R_SC_POS_EINT1_WIDTH 1 /* IM_HP2R_SC_POS_EINT1 */
5271#define ARIZONA_IM_HP2L_SC_NEG_EINT1 0x0020 /* IM_HP2L_SC_NEG_EINT1 */
5272#define ARIZONA_IM_HP2L_SC_NEG_EINT1_MASK 0x0020 /* IM_HP2L_SC_NEG_EINT1 */
5273#define ARIZONA_IM_HP2L_SC_NEG_EINT1_SHIFT 5 /* IM_HP2L_SC_NEG_EINT1 */
5274#define ARIZONA_IM_HP2L_SC_NEG_EINT1_WIDTH 1 /* IM_HP2L_SC_NEG_EINT1 */
5275#define ARIZONA_IM_HP2L_SC_POS_EINT1 0x0010 /* IM_HP2L_SC_POS_EINT1 */
5276#define ARIZONA_IM_HP2L_SC_POS_EINT1_MASK 0x0010 /* IM_HP2L_SC_POS_EINT1 */
5277#define ARIZONA_IM_HP2L_SC_POS_EINT1_SHIFT 4 /* IM_HP2L_SC_POS_EINT1 */
5278#define ARIZONA_IM_HP2L_SC_POS_EINT1_WIDTH 1 /* IM_HP2L_SC_POS_EINT1 */
5279#define ARIZONA_IM_HP1R_SC_NEG_EINT1 0x0008 /* IM_HP1R_SC_NEG_EINT1 */
5280#define ARIZONA_IM_HP1R_SC_NEG_EINT1_MASK 0x0008 /* IM_HP1R_SC_NEG_EINT1 */
5281#define ARIZONA_IM_HP1R_SC_NEG_EINT1_SHIFT 3 /* IM_HP1R_SC_NEG_EINT1 */
5282#define ARIZONA_IM_HP1R_SC_NEG_EINT1_WIDTH 1 /* IM_HP1R_SC_NEG_EINT1 */
5283#define ARIZONA_IM_HP1R_SC_POS_EINT1 0x0004 /* IM_HP1R_SC_POS_EINT1 */
5284#define ARIZONA_IM_HP1R_SC_POS_EINT1_MASK 0x0004 /* IM_HP1R_SC_POS_EINT1 */
5285#define ARIZONA_IM_HP1R_SC_POS_EINT1_SHIFT 2 /* IM_HP1R_SC_POS_EINT1 */
5286#define ARIZONA_IM_HP1R_SC_POS_EINT1_WIDTH 1 /* IM_HP1R_SC_POS_EINT1 */
5287#define ARIZONA_IM_HP1L_SC_NEG_EINT1 0x0002 /* IM_HP1L_SC_NEG_EINT1 */
5288#define ARIZONA_IM_HP1L_SC_NEG_EINT1_MASK 0x0002 /* IM_HP1L_SC_NEG_EINT1 */
5289#define ARIZONA_IM_HP1L_SC_NEG_EINT1_SHIFT 1 /* IM_HP1L_SC_NEG_EINT1 */
5290#define ARIZONA_IM_HP1L_SC_NEG_EINT1_WIDTH 1 /* IM_HP1L_SC_NEG_EINT1 */
5291#define ARIZONA_IM_HP1L_SC_POS_EINT1 0x0001 /* IM_HP1L_SC_POS_EINT1 */
5292#define ARIZONA_IM_HP1L_SC_POS_EINT1_MASK 0x0001 /* IM_HP1L_SC_POS_EINT1 */
5293#define ARIZONA_IM_HP1L_SC_POS_EINT1_SHIFT 0 /* IM_HP1L_SC_POS_EINT1 */
5294#define ARIZONA_IM_HP1L_SC_POS_EINT1_WIDTH 1 /* IM_HP1L_SC_POS_EINT1 */
5295
5296/*
4992 * R3343 (0xD0F) - Interrupt Control 5297 * R3343 (0xD0F) - Interrupt Control
4993 */ 5298 */
4994#define ARIZONA_IM_IRQ1 0x0001 /* IM_IRQ1 */ 5299#define ARIZONA_IM_IRQ1 0x0001 /* IM_IRQ1 */
@@ -5035,14 +5340,14 @@
5035/* 5340/*
5036 * R3346 (0xD12) - IRQ2 Status 3 5341 * R3346 (0xD12) - IRQ2 Status 3
5037 */ 5342 */
5038#define ARIZONA_SPK_SHUTDOWN_WARN_EINT2 0x8000 /* SPK_SHUTDOWN_WARN_EINT2 */ 5343#define ARIZONA_SPK_OVERHEAT_WARN_EINT2 0x8000 /* SPK_OVERHEAT_WARN_EINT2 */
5039#define ARIZONA_SPK_SHUTDOWN_WARN_EINT2_MASK 0x8000 /* SPK_SHUTDOWN_WARN_EINT2 */ 5344#define ARIZONA_SPK_OVERHEAT_WARN_EINT2_MASK 0x8000 /* SPK_OVERHEAT_WARN_EINT2 */
5040#define ARIZONA_SPK_SHUTDOWN_WARN_EINT2_SHIFT 15 /* SPK_SHUTDOWN_WARN_EINT2 */ 5345#define ARIZONA_SPK_OVERHEAT_WARN_EINT2_SHIFT 15 /* SPK_OVERHEAT_WARN_EINT2 */
5041#define ARIZONA_SPK_SHUTDOWN_WARN_EINT2_WIDTH 1 /* SPK_SHUTDOWN_WARN_EINT2 */ 5346#define ARIZONA_SPK_OVERHEAT_WARN_EINT2_WIDTH 1 /* SPK_OVERHEAT_WARN_EINT2 */
5042#define ARIZONA_SPK_SHUTDOWN_EINT2 0x4000 /* SPK_SHUTDOWN_EINT2 */ 5347#define ARIZONA_SPK_OVERHEAT_EINT2 0x4000 /* SPK_OVERHEAT_EINT2 */
5043#define ARIZONA_SPK_SHUTDOWN_EINT2_MASK 0x4000 /* SPK_SHUTDOWN_EINT2 */ 5348#define ARIZONA_SPK_OVERHEAT_EINT2_MASK 0x4000 /* SPK_OVERHEAT_EINT2 */
5044#define ARIZONA_SPK_SHUTDOWN_EINT2_SHIFT 14 /* SPK_SHUTDOWN_EINT2 */ 5349#define ARIZONA_SPK_OVERHEAT_EINT2_SHIFT 14 /* SPK_OVERHEAT_EINT2 */
5045#define ARIZONA_SPK_SHUTDOWN_EINT2_WIDTH 1 /* SPK_SHUTDOWN_EINT2 */ 5350#define ARIZONA_SPK_OVERHEAT_EINT2_WIDTH 1 /* SPK_OVERHEAT_EINT2 */
5046#define ARIZONA_HPDET_EINT2 0x2000 /* HPDET_EINT2 */ 5351#define ARIZONA_HPDET_EINT2 0x2000 /* HPDET_EINT2 */
5047#define ARIZONA_HPDET_EINT2_MASK 0x2000 /* HPDET_EINT2 */ 5352#define ARIZONA_HPDET_EINT2_MASK 0x2000 /* HPDET_EINT2 */
5048#define ARIZONA_HPDET_EINT2_SHIFT 13 /* HPDET_EINT2 */ 5353#define ARIZONA_HPDET_EINT2_SHIFT 13 /* HPDET_EINT2 */
@@ -5139,6 +5444,77 @@
5139#define ARIZONA_ISRC2_CFG_ERR_EINT2_MASK 0x0040 /* ISRC2_CFG_ERR_EINT2 */ 5444#define ARIZONA_ISRC2_CFG_ERR_EINT2_MASK 0x0040 /* ISRC2_CFG_ERR_EINT2 */
5140#define ARIZONA_ISRC2_CFG_ERR_EINT2_SHIFT 6 /* ISRC2_CFG_ERR_EINT2 */ 5445#define ARIZONA_ISRC2_CFG_ERR_EINT2_SHIFT 6 /* ISRC2_CFG_ERR_EINT2 */
5141#define ARIZONA_ISRC2_CFG_ERR_EINT2_WIDTH 1 /* ISRC2_CFG_ERR_EINT2 */ 5446#define ARIZONA_ISRC2_CFG_ERR_EINT2_WIDTH 1 /* ISRC2_CFG_ERR_EINT2 */
5447#define ARIZONA_HP3R_DONE_EINT2 0x0020 /* HP3R_DONE_EINT2 */
5448#define ARIZONA_HP3R_DONE_EINT2_MASK 0x0020 /* HP3R_DONE_EINT2 */
5449#define ARIZONA_HP3R_DONE_EINT2_SHIFT 5 /* HP3R_DONE_EINT2 */
5450#define ARIZONA_HP3R_DONE_EINT2_WIDTH 1 /* HP3R_DONE_EINT2 */
5451#define ARIZONA_HP3L_DONE_EINT2 0x0010 /* HP3L_DONE_EINT2 */
5452#define ARIZONA_HP3L_DONE_EINT2_MASK 0x0010 /* HP3L_DONE_EINT2 */
5453#define ARIZONA_HP3L_DONE_EINT2_SHIFT 4 /* HP3L_DONE_EINT2 */
5454#define ARIZONA_HP3L_DONE_EINT2_WIDTH 1 /* HP3L_DONE_EINT2 */
5455#define ARIZONA_HP2R_DONE_EINT2 0x0008 /* HP2R_DONE_EINT2 */
5456#define ARIZONA_HP2R_DONE_EINT2_MASK 0x0008 /* HP2R_DONE_EINT2 */
5457#define ARIZONA_HP2R_DONE_EINT2_SHIFT 3 /* HP2R_DONE_EINT2 */
5458#define ARIZONA_HP2R_DONE_EINT2_WIDTH 1 /* HP2R_DONE_EINT2 */
5459#define ARIZONA_HP2L_DONE_EINT2 0x0004 /* HP2L_DONE_EINT2 */
5460#define ARIZONA_HP2L_DONE_EINT2_MASK 0x0004 /* HP2L_DONE_EINT2 */
5461#define ARIZONA_HP2L_DONE_EINT2_SHIFT 2 /* HP2L_DONE_EINT2 */
5462#define ARIZONA_HP2L_DONE_EINT2_WIDTH 1 /* HP2L_DONE_EINT2 */
5463#define ARIZONA_HP1R_DONE_EINT2 0x0002 /* HP1R_DONE_EINT2 */
5464#define ARIZONA_HP1R_DONE_EINT2_MASK 0x0002 /* HP1R_DONE_EINT2 */
5465#define ARIZONA_HP1R_DONE_EINT2_SHIFT 1 /* HP1R_DONE_EINT2 */
5466#define ARIZONA_HP1R_DONE_EINT2_WIDTH 1 /* HP1R_DONE_EINT2 */
5467#define ARIZONA_HP1L_DONE_EINT2 0x0001 /* HP1L_DONE_EINT2 */
5468#define ARIZONA_HP1L_DONE_EINT2_MASK 0x0001 /* HP1L_DONE_EINT2 */
5469#define ARIZONA_HP1L_DONE_EINT2_SHIFT 0 /* HP1L_DONE_EINT2 */
5470#define ARIZONA_HP1L_DONE_EINT2_WIDTH 1 /* HP1L_DONE_EINT2 */
5471
5472/*
5473 * R3347 (0xD13) - IRQ2 Status 4 (Alternate layout)
5474 *
5475 * Alternate layout used on later devices, note only fields that have moved
5476 * are specified
5477 */
5478#define ARIZONA_V2_AIF3_ERR_EINT2 0x8000 /* AIF3_ERR_EINT2 */
5479#define ARIZONA_V2_AIF3_ERR_EINT2_MASK 0x8000 /* AIF3_ERR_EINT2 */
5480#define ARIZONA_V2_AIF3_ERR_EINT2_SHIFT 15 /* AIF3_ERR_EINT2 */
5481#define ARIZONA_V2_AIF3_ERR_EINT2_WIDTH 1 /* AIF3_ERR_EINT2 */
5482#define ARIZONA_V2_AIF2_ERR_EINT2 0x4000 /* AIF2_ERR_EINT2 */
5483#define ARIZONA_V2_AIF2_ERR_EINT2_MASK 0x4000 /* AIF2_ERR_EINT2 */
5484#define ARIZONA_V2_AIF2_ERR_EINT2_SHIFT 14 /* AIF2_ERR_EINT2 */
5485#define ARIZONA_V2_AIF2_ERR_EINT2_WIDTH 1 /* AIF2_ERR_EINT2 */
5486#define ARIZONA_V2_AIF1_ERR_EINT2 0x2000 /* AIF1_ERR_EINT2 */
5487#define ARIZONA_V2_AIF1_ERR_EINT2_MASK 0x2000 /* AIF1_ERR_EINT2 */
5488#define ARIZONA_V2_AIF1_ERR_EINT2_SHIFT 13 /* AIF1_ERR_EINT2 */
5489#define ARIZONA_V2_AIF1_ERR_EINT2_WIDTH 1 /* AIF1_ERR_EINT2 */
5490#define ARIZONA_V2_CTRLIF_ERR_EINT2 0x1000 /* CTRLIF_ERR_EINT2 */
5491#define ARIZONA_V2_CTRLIF_ERR_EINT2_MASK 0x1000 /* CTRLIF_ERR_EINT2 */
5492#define ARIZONA_V2_CTRLIF_ERR_EINT2_SHIFT 12 /* CTRLIF_ERR_EINT2 */
5493#define ARIZONA_V2_CTRLIF_ERR_EINT2_WIDTH 1 /* CTRLIF_ERR_EINT2 */
5494#define ARIZONA_V2_MIXER_DROPPED_SAMPLE_EINT2 0x0800 /* MIXER_DROPPED_SAMPLE_EINT2 */
5495#define ARIZONA_V2_MIXER_DROPPED_SAMPLE_EINT2_MASK 0x0800 /* MIXER_DROPPED_SAMPLE_EINT2 */
5496#define ARIZONA_V2_MIXER_DROPPED_SAMPLE_EINT2_SHIFT 11 /* MIXER_DROPPED_SAMPLE_EINT2 */
5497#define ARIZONA_V2_MIXER_DROPPED_SAMPLE_EINT2_WIDTH 1 /* MIXER_DROPPED_SAMPLE_EINT2 */
5498#define ARIZONA_V2_ASYNC_CLK_ENA_LOW_EINT2 0x0400 /* ASYNC_CLK_ENA_LOW_EINT2 */
5499#define ARIZONA_V2_ASYNC_CLK_ENA_LOW_EINT2_MASK 0x0400 /* ASYNC_CLK_ENA_LOW_EINT2 */
5500#define ARIZONA_V2_ASYNC_CLK_ENA_LOW_EINT2_SHIFT 10 /* ASYNC_CLK_ENA_LOW_EINT2 */
5501#define ARIZONA_V2_ASYNC_CLK_ENA_LOW_EINT2_WIDTH 1 /* ASYNC_CLK_ENA_LOW_EINT2 */
5502#define ARIZONA_V2_SYSCLK_ENA_LOW_EINT2 0x0200 /* SYSCLK_ENA_LOW_EINT2 */
5503#define ARIZONA_V2_SYSCLK_ENA_LOW_EINT2_MASK 0x0200 /* SYSCLK_ENA_LOW_EINT2 */
5504#define ARIZONA_V2_SYSCLK_ENA_LOW_EINT2_SHIFT 9 /* SYSCLK_ENA_LOW_EINT2 */
5505#define ARIZONA_V2_SYSCLK_ENA_LOW_EINT2_WIDTH 1 /* SYSCLK_ENA_LOW_EINT2 */
5506#define ARIZONA_V2_ISRC1_CFG_ERR_EINT2 0x0100 /* ISRC1_CFG_ERR_EINT2 */
5507#define ARIZONA_V2_ISRC1_CFG_ERR_EINT2_MASK 0x0100 /* ISRC1_CFG_ERR_EINT2 */
5508#define ARIZONA_V2_ISRC1_CFG_ERR_EINT2_SHIFT 8 /* ISRC1_CFG_ERR_EINT2 */
5509#define ARIZONA_V2_ISRC1_CFG_ERR_EINT2_WIDTH 1 /* ISRC1_CFG_ERR_EINT2 */
5510#define ARIZONA_V2_ISRC2_CFG_ERR_EINT2 0x0080 /* ISRC2_CFG_ERR_EINT2 */
5511#define ARIZONA_V2_ISRC2_CFG_ERR_EINT2_MASK 0x0080 /* ISRC2_CFG_ERR_EINT2 */
5512#define ARIZONA_V2_ISRC2_CFG_ERR_EINT2_SHIFT 7 /* ISRC2_CFG_ERR_EINT2 */
5513#define ARIZONA_V2_ISRC2_CFG_ERR_EINT2_WIDTH 1 /* ISRC2_CFG_ERR_EINT2 */
5514#define ARIZONA_V2_ISRC3_CFG_ERR_EINT2 0x0040 /* ISRC3_CFG_ERR_EINT2 */
5515#define ARIZONA_V2_ISRC3_CFG_ERR_EINT2_MASK 0x0040 /* ISRC3_CFG_ERR_EINT2 */
5516#define ARIZONA_V2_ISRC3_CFG_ERR_EINT2_SHIFT 6 /* ISRC3_CFG_ERR_EINT2 */
5517#define ARIZONA_V2_ISRC3_CFG_ERR_EINT2_WIDTH 1 /* ISRC3_CFG_ERR_EINT2 */
5142 5518
5143/* 5519/*
5144 * R3348 (0xD14) - IRQ2 Status 5 5520 * R3348 (0xD14) - IRQ2 Status 5
@@ -5165,6 +5541,85 @@
5165#define ARIZONA_FLL1_CLOCK_OK_EINT2_WIDTH 1 /* FLL1_CLOCK_OK_EINT2 */ 5541#define ARIZONA_FLL1_CLOCK_OK_EINT2_WIDTH 1 /* FLL1_CLOCK_OK_EINT2 */
5166 5542
5167/* 5543/*
5544 * R3348 (0xD14) - IRQ2 Status 5 (Alternate layout)
5545 *
5546 * Alternate layout used on later devices, note only fields that have moved
5547 * are specified
5548 */
5549#define ARIZONA_V2_ASRC_CFG_ERR_EINT2 0x0008 /* ASRC_CFG_ERR_EINT2 */
5550#define ARIZONA_V2_ASRC_CFG_ERR_EINT2_MASK 0x0008 /* ASRC_CFG_ERR_EINT2 */
5551#define ARIZONA_V2_ASRC_CFG_ERR_EINT2_SHIFT 3 /* ASRC_CFG_ERR_EINT2 */
5552#define ARIZONA_V2_ASRC_CFG_ERR_EINT2_WIDTH 1 /* ASRC_CFG_ERR_EINT2 */
5553
5554/*
5555 * R3349 (0xD15) - IRQ2 Status 6
5556 */
5557#define ARIZONA_DSP_SHARED_WR_COLL_EINT2 0x8000 /* DSP_SHARED_WR_COLL_EINT2 */
5558#define ARIZONA_DSP_SHARED_WR_COLL_EINT2_MASK 0x8000 /* DSP_SHARED_WR_COLL_EINT2 */
5559#define ARIZONA_DSP_SHARED_WR_COLL_EINT2_SHIFT 15 /* DSP_SHARED_WR_COLL_EINT2 */
5560#define ARIZONA_DSP_SHARED_WR_COLL_EINT2_WIDTH 1 /* DSP_SHARED_WR_COLL_EINT2 */
5561#define ARIZONA_SPK_SHUTDOWN_EINT2 0x4000 /* SPK_SHUTDOWN_EINT2 */
5562#define ARIZONA_SPK_SHUTDOWN_EINT2_MASK 0x4000 /* SPK_SHUTDOWN_EINT2 */
5563#define ARIZONA_SPK_SHUTDOWN_EINT2_SHIFT 14 /* SPK_SHUTDOWN_EINT2 */
5564#define ARIZONA_SPK_SHUTDOWN_EINT2_WIDTH 1 /* SPK_SHUTDOWN_EINT2 */
5565#define ARIZONA_SPK1R_SHORT_EINT2 0x2000 /* SPK1R_SHORT_EINT2 */
5566#define ARIZONA_SPK1R_SHORT_EINT2_MASK 0x2000 /* SPK1R_SHORT_EINT2 */
5567#define ARIZONA_SPK1R_SHORT_EINT2_SHIFT 13 /* SPK1R_SHORT_EINT2 */
5568#define ARIZONA_SPK1R_SHORT_EINT2_WIDTH 1 /* SPK1R_SHORT_EINT2 */
5569#define ARIZONA_SPK1L_SHORT_EINT2 0x1000 /* SPK1L_SHORT_EINT2 */
5570#define ARIZONA_SPK1L_SHORT_EINT2_MASK 0x1000 /* SPK1L_SHORT_EINT2 */
5571#define ARIZONA_SPK1L_SHORT_EINT2_SHIFT 12 /* SPK1L_SHORT_EINT2 */
5572#define ARIZONA_SPK1L_SHORT_EINT2_WIDTH 1 /* SPK1L_SHORT_EINT2 */
5573#define ARIZONA_HP3R_SC_NEG_EINT2 0x0800 /* HP3R_SC_NEG_EINT2 */
5574#define ARIZONA_HP3R_SC_NEG_EINT2_MASK 0x0800 /* HP3R_SC_NEG_EINT2 */
5575#define ARIZONA_HP3R_SC_NEG_EINT2_SHIFT 11 /* HP3R_SC_NEG_EINT2 */
5576#define ARIZONA_HP3R_SC_NEG_EINT2_WIDTH 1 /* HP3R_SC_NEG_EINT2 */
5577#define ARIZONA_HP3R_SC_POS_EINT2 0x0400 /* HP3R_SC_POS_EINT2 */
5578#define ARIZONA_HP3R_SC_POS_EINT2_MASK 0x0400 /* HP3R_SC_POS_EINT2 */
5579#define ARIZONA_HP3R_SC_POS_EINT2_SHIFT 10 /* HP3R_SC_POS_EINT2 */
5580#define ARIZONA_HP3R_SC_POS_EINT2_WIDTH 1 /* HP3R_SC_POS_EINT2 */
5581#define ARIZONA_HP3L_SC_NEG_EINT2 0x0200 /* HP3L_SC_NEG_EINT2 */
5582#define ARIZONA_HP3L_SC_NEG_EINT2_MASK 0x0200 /* HP3L_SC_NEG_EINT2 */
5583#define ARIZONA_HP3L_SC_NEG_EINT2_SHIFT 9 /* HP3L_SC_NEG_EINT2 */
5584#define ARIZONA_HP3L_SC_NEG_EINT2_WIDTH 1 /* HP3L_SC_NEG_EINT2 */
5585#define ARIZONA_HP3L_SC_POS_EINT2 0x0100 /* HP3L_SC_POS_EINT2 */
5586#define ARIZONA_HP3L_SC_POS_EINT2_MASK 0x0100 /* HP3L_SC_POS_EINT2 */
5587#define ARIZONA_HP3L_SC_POS_EINT2_SHIFT 8 /* HP3L_SC_POS_EINT2 */
5588#define ARIZONA_HP3L_SC_POS_EINT2_WIDTH 1 /* HP3L_SC_POS_EINT2 */
5589#define ARIZONA_HP2R_SC_NEG_EINT2 0x0080 /* HP2R_SC_NEG_EINT2 */
5590#define ARIZONA_HP2R_SC_NEG_EINT2_MASK 0x0080 /* HP2R_SC_NEG_EINT2 */
5591#define ARIZONA_HP2R_SC_NEG_EINT2_SHIFT 7 /* HP2R_SC_NEG_EINT2 */
5592#define ARIZONA_HP2R_SC_NEG_EINT2_WIDTH 1 /* HP2R_SC_NEG_EINT2 */
5593#define ARIZONA_HP2R_SC_POS_EINT2 0x0040 /* HP2R_SC_POS_EINT2 */
5594#define ARIZONA_HP2R_SC_POS_EINT2_MASK 0x0040 /* HP2R_SC_POS_EINT2 */
5595#define ARIZONA_HP2R_SC_POS_EINT2_SHIFT 6 /* HP2R_SC_POS_EINT2 */
5596#define ARIZONA_HP2R_SC_POS_EINT2_WIDTH 1 /* HP2R_SC_POS_EINT2 */
5597#define ARIZONA_HP2L_SC_NEG_EINT2 0x0020 /* HP2L_SC_NEG_EINT2 */
5598#define ARIZONA_HP2L_SC_NEG_EINT2_MASK 0x0020 /* HP2L_SC_NEG_EINT2 */
5599#define ARIZONA_HP2L_SC_NEG_EINT2_SHIFT 5 /* HP2L_SC_NEG_EINT2 */
5600#define ARIZONA_HP2L_SC_NEG_EINT2_WIDTH 1 /* HP2L_SC_NEG_EINT2 */
5601#define ARIZONA_HP2L_SC_POS_EINT2 0x0010 /* HP2L_SC_POS_EINT2 */
5602#define ARIZONA_HP2L_SC_POS_EINT2_MASK 0x0010 /* HP2L_SC_POS_EINT2 */
5603#define ARIZONA_HP2L_SC_POS_EINT2_SHIFT 4 /* HP2L_SC_POS_EINT2 */
5604#define ARIZONA_HP2L_SC_POS_EINT2_WIDTH 1 /* HP2L_SC_POS_EINT2 */
5605#define ARIZONA_HP1R_SC_NEG_EINT2 0x0008 /* HP1R_SC_NEG_EINT2 */
5606#define ARIZONA_HP1R_SC_NEG_EINT2_MASK 0x0008 /* HP1R_SC_NEG_EINT2 */
5607#define ARIZONA_HP1R_SC_NEG_EINT2_SHIFT 3 /* HP1R_SC_NEG_EINT2 */
5608#define ARIZONA_HP1R_SC_NEG_EINT2_WIDTH 1 /* HP1R_SC_NEG_EINT2 */
5609#define ARIZONA_HP1R_SC_POS_EINT2 0x0004 /* HP1R_SC_POS_EINT2 */
5610#define ARIZONA_HP1R_SC_POS_EINT2_MASK 0x0004 /* HP1R_SC_POS_EINT2 */
5611#define ARIZONA_HP1R_SC_POS_EINT2_SHIFT 2 /* HP1R_SC_POS_EINT2 */
5612#define ARIZONA_HP1R_SC_POS_EINT2_WIDTH 1 /* HP1R_SC_POS_EINT2 */
5613#define ARIZONA_HP1L_SC_NEG_EINT2 0x0002 /* HP1L_SC_NEG_EINT2 */
5614#define ARIZONA_HP1L_SC_NEG_EINT2_MASK 0x0002 /* HP1L_SC_NEG_EINT2 */
5615#define ARIZONA_HP1L_SC_NEG_EINT2_SHIFT 1 /* HP1L_SC_NEG_EINT2 */
5616#define ARIZONA_HP1L_SC_NEG_EINT2_WIDTH 1 /* HP1L_SC_NEG_EINT2 */
5617#define ARIZONA_HP1L_SC_POS_EINT2 0x0001 /* HP1L_SC_POS_EINT2 */
5618#define ARIZONA_HP1L_SC_POS_EINT2_MASK 0x0001 /* HP1L_SC_POS_EINT2 */
5619#define ARIZONA_HP1L_SC_POS_EINT2_SHIFT 0 /* HP1L_SC_POS_EINT2 */
5620#define ARIZONA_HP1L_SC_POS_EINT2_WIDTH 1 /* HP1L_SC_POS_EINT2 */
5621
5622/*
5168 * R3352 (0xD18) - IRQ2 Status 1 Mask 5623 * R3352 (0xD18) - IRQ2 Status 1 Mask
5169 */ 5624 */
5170#define ARIZONA_IM_GP4_EINT2 0x0008 /* IM_GP4_EINT2 */ 5625#define ARIZONA_IM_GP4_EINT2 0x0008 /* IM_GP4_EINT2 */
@@ -5203,14 +5658,14 @@
5203/* 5658/*
5204 * R3354 (0xD1A) - IRQ2 Status 3 Mask 5659 * R3354 (0xD1A) - IRQ2 Status 3 Mask
5205 */ 5660 */
5206#define ARIZONA_IM_SPK_SHUTDOWN_WARN_EINT2 0x8000 /* IM_SPK_SHUTDOWN_WARN_EINT2 */ 5661#define ARIZONA_IM_SPK_OVERHEAT_WARN_EINT2 0x8000 /* IM_SPK_OVERHEAT_WARN_EINT2 */
5207#define ARIZONA_IM_SPK_SHUTDOWN_WARN_EINT2_MASK 0x8000 /* IM_SPK_SHUTDOWN_WARN_EINT2 */ 5662#define ARIZONA_IM_SPK_OVERHEAT_WARN_EINT2_MASK 0x8000 /* IM_SPK_OVERHEAT_WARN_EINT2 */
5208#define ARIZONA_IM_SPK_SHUTDOWN_WARN_EINT2_SHIFT 15 /* IM_SPK_SHUTDOWN_WARN_EINT2 */ 5663#define ARIZONA_IM_SPK_OVERHEAT_WARN_EINT2_SHIFT 15 /* IM_SPK_OVERHEAT_WARN_EINT2 */
5209#define ARIZONA_IM_SPK_SHUTDOWN_WARN_EINT2_WIDTH 1 /* IM_SPK_SHUTDOWN_WARN_EINT2 */ 5664#define ARIZONA_IM_SPK_OVERHEAT_WARN_EINT2_WIDTH 1 /* IM_SPK_OVERHEAT_WARN_EINT2 */
5210#define ARIZONA_IM_SPK_SHUTDOWN_EINT2 0x4000 /* IM_SPK_SHUTDOWN_EINT2 */ 5665#define ARIZONA_IM_SPK_OVERHEAT_EINT2 0x4000 /* IM_SPK_OVERHEAT_EINT2 */
5211#define ARIZONA_IM_SPK_SHUTDOWN_EINT2_MASK 0x4000 /* IM_SPK_SHUTDOWN_EINT2 */ 5666#define ARIZONA_IM_SPK_OVERHEAT_EINT2_MASK 0x4000 /* IM_SPK_OVERHEAT_EINT2 */
5212#define ARIZONA_IM_SPK_SHUTDOWN_EINT2_SHIFT 14 /* IM_SPK_SHUTDOWN_EINT2 */ 5667#define ARIZONA_IM_SPK_OVERHEAT_EINT2_SHIFT 14 /* IM_SPK_OVERHEAT_EINT2 */
5213#define ARIZONA_IM_SPK_SHUTDOWN_EINT2_WIDTH 1 /* IM_SPK_SHUTDOWN_EINT2 */ 5668#define ARIZONA_IM_SPK_OVERHEAT_EINT2_WIDTH 1 /* IM_SPK_OVERHEAT_EINT2 */
5214#define ARIZONA_IM_HPDET_EINT2 0x2000 /* IM_HPDET_EINT2 */ 5669#define ARIZONA_IM_HPDET_EINT2 0x2000 /* IM_HPDET_EINT2 */
5215#define ARIZONA_IM_HPDET_EINT2_MASK 0x2000 /* IM_HPDET_EINT2 */ 5670#define ARIZONA_IM_HPDET_EINT2_MASK 0x2000 /* IM_HPDET_EINT2 */
5216#define ARIZONA_IM_HPDET_EINT2_SHIFT 13 /* IM_HPDET_EINT2 */ 5671#define ARIZONA_IM_HPDET_EINT2_SHIFT 13 /* IM_HPDET_EINT2 */
@@ -5307,6 +5762,77 @@
5307#define ARIZONA_IM_ISRC2_CFG_ERR_EINT2_MASK 0x0040 /* IM_ISRC2_CFG_ERR_EINT2 */ 5762#define ARIZONA_IM_ISRC2_CFG_ERR_EINT2_MASK 0x0040 /* IM_ISRC2_CFG_ERR_EINT2 */
5308#define ARIZONA_IM_ISRC2_CFG_ERR_EINT2_SHIFT 6 /* IM_ISRC2_CFG_ERR_EINT2 */ 5763#define ARIZONA_IM_ISRC2_CFG_ERR_EINT2_SHIFT 6 /* IM_ISRC2_CFG_ERR_EINT2 */
5309#define ARIZONA_IM_ISRC2_CFG_ERR_EINT2_WIDTH 1 /* IM_ISRC2_CFG_ERR_EINT2 */ 5764#define ARIZONA_IM_ISRC2_CFG_ERR_EINT2_WIDTH 1 /* IM_ISRC2_CFG_ERR_EINT2 */
5765#define ARIZONA_IM_HP3R_DONE_EINT2 0x0020 /* IM_HP3R_DONE_EINT2 */
5766#define ARIZONA_IM_HP3R_DONE_EINT2_MASK 0x0020 /* IM_HP3R_DONE_EINT2 */
5767#define ARIZONA_IM_HP3R_DONE_EINT2_SHIFT 5 /* IM_HP3R_DONE_EINT2 */
5768#define ARIZONA_IM_HP3R_DONE_EINT2_WIDTH 1 /* IM_HP3R_DONE_EINT2 */
5769#define ARIZONA_IM_HP3L_DONE_EINT2 0x0010 /* IM_HP3L_DONE_EINT2 */
5770#define ARIZONA_IM_HP3L_DONE_EINT2_MASK 0x0010 /* IM_HP3L_DONE_EINT2 */
5771#define ARIZONA_IM_HP3L_DONE_EINT2_SHIFT 4 /* IM_HP3L_DONE_EINT2 */
5772#define ARIZONA_IM_HP3L_DONE_EINT2_WIDTH 1 /* IM_HP3L_DONE_EINT2 */
5773#define ARIZONA_IM_HP2R_DONE_EINT2 0x0008 /* IM_HP2R_DONE_EINT2 */
5774#define ARIZONA_IM_HP2R_DONE_EINT2_MASK 0x0008 /* IM_HP2R_DONE_EINT2 */
5775#define ARIZONA_IM_HP2R_DONE_EINT2_SHIFT 3 /* IM_HP2R_DONE_EINT2 */
5776#define ARIZONA_IM_HP2R_DONE_EINT2_WIDTH 1 /* IM_HP2R_DONE_EINT2 */
5777#define ARIZONA_IM_HP2L_DONE_EINT2 0x0004 /* IM_HP2L_DONE_EINT2 */
5778#define ARIZONA_IM_HP2L_DONE_EINT2_MASK 0x0004 /* IM_HP2L_DONE_EINT2 */
5779#define ARIZONA_IM_HP2L_DONE_EINT2_SHIFT 2 /* IM_HP2L_DONE_EINT2 */
5780#define ARIZONA_IM_HP2L_DONE_EINT2_WIDTH 1 /* IM_HP2L_DONE_EINT2 */
5781#define ARIZONA_IM_HP1R_DONE_EINT2 0x0002 /* IM_HP1R_DONE_EINT2 */
5782#define ARIZONA_IM_HP1R_DONE_EINT2_MASK 0x0002 /* IM_HP1R_DONE_EINT2 */
5783#define ARIZONA_IM_HP1R_DONE_EINT2_SHIFT 1 /* IM_HP1R_DONE_EINT2 */
5784#define ARIZONA_IM_HP1R_DONE_EINT2_WIDTH 1 /* IM_HP1R_DONE_EINT2 */
5785#define ARIZONA_IM_HP1L_DONE_EINT2 0x0001 /* IM_HP1L_DONE_EINT2 */
5786#define ARIZONA_IM_HP1L_DONE_EINT2_MASK 0x0001 /* IM_HP1L_DONE_EINT2 */
5787#define ARIZONA_IM_HP1L_DONE_EINT2_SHIFT 0 /* IM_HP1L_DONE_EINT2 */
5788#define ARIZONA_IM_HP1L_DONE_EINT2_WIDTH 1 /* IM_HP1L_DONE_EINT2 */
5789
5790/*
5791 * R3355 (0xD1B) - IRQ2 Status 4 Mask (Alternate layout)
5792 *
5793 * Alternate layout used on later devices, note only fields that have moved
5794 * are specified
5795 */
5796#define ARIZONA_V2_IM_AIF3_ERR_EINT2 0x8000 /* IM_AIF3_ERR_EINT2 */
5797#define ARIZONA_V2_IM_AIF3_ERR_EINT2_MASK 0x8000 /* IM_AIF3_ERR_EINT2 */
5798#define ARIZONA_V2_IM_AIF3_ERR_EINT2_SHIFT 15 /* IM_AIF3_ERR_EINT2 */
5799#define ARIZONA_V2_IM_AIF3_ERR_EINT2_WIDTH 1 /* IM_AIF3_ERR_EINT2 */
5800#define ARIZONA_V2_IM_AIF2_ERR_EINT2 0x4000 /* IM_AIF2_ERR_EINT2 */
5801#define ARIZONA_V2_IM_AIF2_ERR_EINT2_MASK 0x4000 /* IM_AIF2_ERR_EINT2 */
5802#define ARIZONA_V2_IM_AIF2_ERR_EINT2_SHIFT 14 /* IM_AIF2_ERR_EINT2 */
5803#define ARIZONA_V2_IM_AIF2_ERR_EINT2_WIDTH 1 /* IM_AIF2_ERR_EINT2 */
5804#define ARIZONA_V2_IM_AIF1_ERR_EINT2 0x2000 /* IM_AIF1_ERR_EINT2 */
5805#define ARIZONA_V2_IM_AIF1_ERR_EINT2_MASK 0x2000 /* IM_AIF1_ERR_EINT2 */
5806#define ARIZONA_V2_IM_AIF1_ERR_EINT2_SHIFT 13 /* IM_AIF1_ERR_EINT2 */
5807#define ARIZONA_V2_IM_AIF1_ERR_EINT2_WIDTH 1 /* IM_AIF1_ERR_EINT2 */
5808#define ARIZONA_V2_IM_CTRLIF_ERR_EINT2 0x1000 /* IM_CTRLIF_ERR_EINT2 */
5809#define ARIZONA_V2_IM_CTRLIF_ERR_EINT2_MASK 0x1000 /* IM_CTRLIF_ERR_EINT2 */
5810#define ARIZONA_V2_IM_CTRLIF_ERR_EINT2_SHIFT 12 /* IM_CTRLIF_ERR_EINT2 */
5811#define ARIZONA_V2_IM_CTRLIF_ERR_EINT2_WIDTH 1 /* IM_CTRLIF_ERR_EINT2 */
5812#define ARIZONA_V2_IM_MIXER_DROPPED_SAMPLE_EINT2 0x0800 /* IM_MIXER_DROPPED_SAMPLE_EINT2 */
5813#define ARIZONA_V2_IM_MIXER_DROPPED_SAMPLE_EINT2_MASK 0x0800 /* IM_MIXER_DROPPED_SAMPLE_EINT2 */
5814#define ARIZONA_V2_IM_MIXER_DROPPED_SAMPLE_EINT2_SHIFT 11 /* IM_MIXER_DROPPED_SAMPLE_EINT2 */
5815#define ARIZONA_V2_IM_MIXER_DROPPED_SAMPLE_EINT2_WIDTH 1 /* IM_MIXER_DROPPED_SAMPLE_EINT2 */
5816#define ARIZONA_V2_IM_ASYNC_CLK_ENA_LOW_EINT2 0x0400 /* IM_ASYNC_CLK_ENA_LOW_EINT2 */
5817#define ARIZONA_V2_IM_ASYNC_CLK_ENA_LOW_EINT2_MASK 0x0400 /* IM_ASYNC_CLK_ENA_LOW_EINT2 */
5818#define ARIZONA_V2_IM_ASYNC_CLK_ENA_LOW_EINT2_SHIFT 10 /* IM_ASYNC_CLK_ENA_LOW_EINT2 */
5819#define ARIZONA_V2_IM_ASYNC_CLK_ENA_LOW_EINT2_WIDTH 1 /* IM_ASYNC_CLK_ENA_LOW_EINT2 */
5820#define ARIZONA_V2_IM_SYSCLK_ENA_LOW_EINT2 0x0200 /* IM_SYSCLK_ENA_LOW_EINT2 */
5821#define ARIZONA_V2_IM_SYSCLK_ENA_LOW_EINT2_MASK 0x0200 /* IM_SYSCLK_ENA_LOW_EINT2 */
5822#define ARIZONA_V2_IM_SYSCLK_ENA_LOW_EINT2_SHIFT 9 /* IM_SYSCLK_ENA_LOW_EINT2 */
5823#define ARIZONA_V2_IM_SYSCLK_ENA_LOW_EINT2_WIDTH 1 /* IM_SYSCLK_ENA_LOW_EINT2 */
5824#define ARIZONA_V2_IM_ISRC1_CFG_ERR_EINT2 0x0100 /* IM_ISRC1_CFG_ERR_EINT2 */
5825#define ARIZONA_V2_IM_ISRC1_CFG_ERR_EINT2_MASK 0x0100 /* IM_ISRC1_CFG_ERR_EINT2 */
5826#define ARIZONA_V2_IM_ISRC1_CFG_ERR_EINT2_SHIFT 8 /* IM_ISRC1_CFG_ERR_EINT2 */
5827#define ARIZONA_V2_IM_ISRC1_CFG_ERR_EINT2_WIDTH 1 /* IM_ISRC1_CFG_ERR_EINT2 */
5828#define ARIZONA_V2_IM_ISRC2_CFG_ERR_EINT2 0x0080 /* IM_ISRC2_CFG_ERR_EINT2 */
5829#define ARIZONA_V2_IM_ISRC2_CFG_ERR_EINT2_MASK 0x0080 /* IM_ISRC2_CFG_ERR_EINT2 */
5830#define ARIZONA_V2_IM_ISRC2_CFG_ERR_EINT2_SHIFT 7 /* IM_ISRC2_CFG_ERR_EINT2 */
5831#define ARIZONA_V2_IM_ISRC2_CFG_ERR_EINT2_WIDTH 1 /* IM_ISRC2_CFG_ERR_EINT2 */
5832#define ARIZONA_V2_IM_ISRC3_CFG_ERR_EINT2 0x0040 /* IM_ISRC3_CFG_ERR_EINT2 */
5833#define ARIZONA_V2_IM_ISRC3_CFG_ERR_EINT2_MASK 0x0040 /* IM_ISRC3_CFG_ERR_EINT2 */
5834#define ARIZONA_V2_IM_ISRC3_CFG_ERR_EINT2_SHIFT 6 /* IM_ISRC3_CFG_ERR_EINT2 */
5835#define ARIZONA_V2_IM_ISRC3_CFG_ERR_EINT2_WIDTH 1 /* IM_ISRC3_CFG_ERR_EINT2 */
5310 5836
5311/* 5837/*
5312 * R3356 (0xD1C) - IRQ2 Status 5 Mask 5838 * R3356 (0xD1C) - IRQ2 Status 5 Mask
@@ -5334,6 +5860,85 @@
5334#define ARIZONA_IM_FLL1_CLOCK_OK_EINT2_WIDTH 1 /* IM_FLL1_CLOCK_OK_EINT2 */ 5860#define ARIZONA_IM_FLL1_CLOCK_OK_EINT2_WIDTH 1 /* IM_FLL1_CLOCK_OK_EINT2 */
5335 5861
5336/* 5862/*
5863 * R3340 (0xD0C) - Interrupt Status 5 Mask (Alternate layout)
5864 *
5865 * Alternate layout used on later devices, note only fields that have moved
5866 * are specified
5867 */
5868#define ARIZONA_V2_IM_ASRC_CFG_ERR_EINT2 0x0008 /* IM_ASRC_CFG_ERR_EINT2 */
5869#define ARIZONA_V2_IM_ASRC_CFG_ERR_EINT2_MASK 0x0008 /* IM_ASRC_CFG_ERR_EINT2 */
5870#define ARIZONA_V2_IM_ASRC_CFG_ERR_EINT2_SHIFT 3 /* IM_ASRC_CFG_ERR_EINT2 */
5871#define ARIZONA_V2_IM_ASRC_CFG_ERR_EINT2_WIDTH 1 /* IM_ASRC_CFG_ERR_EINT2 */
5872
5873/*
5874 * R3357 (0xD1D) - IRQ2 Status 6 Mask
5875 */
5876#define ARIZONA_IM_DSP_SHARED_WR_COLL_EINT2 0x8000 /* IM_DSP_SHARED_WR_COLL_EINT2 */
5877#define ARIZONA_IM_DSP_SHARED_WR_COLL_EINT2_MASK 0x8000 /* IM_DSP_SHARED_WR_COLL_EINT2 */
5878#define ARIZONA_IM_DSP_SHARED_WR_COLL_EINT2_SHIFT 15 /* IM_DSP_SHARED_WR_COLL_EINT2 */
5879#define ARIZONA_IM_DSP_SHARED_WR_COLL_EINT2_WIDTH 1 /* IM_DSP_SHARED_WR_COLL_EINT2 */
5880#define ARIZONA_IM_SPK_SHUTDOWN_EINT2 0x4000 /* IM_SPK_SHUTDOWN_EINT2 */
5881#define ARIZONA_IM_SPK_SHUTDOWN_EINT2_MASK 0x4000 /* IM_SPK_SHUTDOWN_EINT2 */
5882#define ARIZONA_IM_SPK_SHUTDOWN_EINT2_SHIFT 14 /* IM_SPK_SHUTDOWN_EINT2 */
5883#define ARIZONA_IM_SPK_SHUTDOWN_EINT2_WIDTH 1 /* IM_SPK_SHUTDOWN_EINT2 */
5884#define ARIZONA_IM_SPK1R_SHORT_EINT2 0x2000 /* IM_SPK1R_SHORT_EINT2 */
5885#define ARIZONA_IM_SPK1R_SHORT_EINT2_MASK 0x2000 /* IM_SPK1R_SHORT_EINT2 */
5886#define ARIZONA_IM_SPK1R_SHORT_EINT2_SHIFT 13 /* IM_SPK1R_SHORT_EINT2 */
5887#define ARIZONA_IM_SPK1R_SHORT_EINT2_WIDTH 1 /* IM_SPK1R_SHORT_EINT2 */
5888#define ARIZONA_IM_SPK1L_SHORT_EINT2 0x1000 /* IM_SPK1L_SHORT_EINT2 */
5889#define ARIZONA_IM_SPK1L_SHORT_EINT2_MASK 0x1000 /* IM_SPK1L_SHORT_EINT2 */
5890#define ARIZONA_IM_SPK1L_SHORT_EINT2_SHIFT 12 /* IM_SPK1L_SHORT_EINT2 */
5891#define ARIZONA_IM_SPK1L_SHORT_EINT2_WIDTH 1 /* IM_SPK1L_SHORT_EINT2 */
5892#define ARIZONA_IM_HP3R_SC_NEG_EINT2 0x0800 /* IM_HP3R_SC_NEG_EINT2 */
5893#define ARIZONA_IM_HP3R_SC_NEG_EINT2_MASK 0x0800 /* IM_HP3R_SC_NEG_EINT2 */
5894#define ARIZONA_IM_HP3R_SC_NEG_EINT2_SHIFT 11 /* IM_HP3R_SC_NEG_EINT2 */
5895#define ARIZONA_IM_HP3R_SC_NEG_EINT2_WIDTH 1 /* IM_HP3R_SC_NEG_EINT2 */
5896#define ARIZONA_IM_HP3R_SC_POS_EINT2 0x0400 /* IM_HP3R_SC_POS_EINT2 */
5897#define ARIZONA_IM_HP3R_SC_POS_EINT2_MASK 0x0400 /* IM_HP3R_SC_POS_EINT2 */
5898#define ARIZONA_IM_HP3R_SC_POS_EINT2_SHIFT 10 /* IM_HP3R_SC_POS_EINT2 */
5899#define ARIZONA_IM_HP3R_SC_POS_EINT2_WIDTH 1 /* IM_HP3R_SC_POS_EINT2 */
5900#define ARIZONA_IM_HP3L_SC_NEG_EINT2 0x0200 /* IM_HP3L_SC_NEG_EINT2 */
5901#define ARIZONA_IM_HP3L_SC_NEG_EINT2_MASK 0x0200 /* IM_HP3L_SC_NEG_EINT2 */
5902#define ARIZONA_IM_HP3L_SC_NEG_EINT2_SHIFT 9 /* IM_HP3L_SC_NEG_EINT2 */
5903#define ARIZONA_IM_HP3L_SC_NEG_EINT2_WIDTH 1 /* IM_HP3L_SC_NEG_EINT2 */
5904#define ARIZONA_IM_HP3L_SC_POS_EINT2 0x0100 /* IM_HP3L_SC_POS_EINT2 */
5905#define ARIZONA_IM_HP3L_SC_POS_EINT2_MASK 0x0100 /* IM_HP3L_SC_POS_EINT2 */
5906#define ARIZONA_IM_HP3L_SC_POS_EINT2_SHIFT 8 /* IM_HP3L_SC_POS_EINT2 */
5907#define ARIZONA_IM_HP3L_SC_POS_EINT2_WIDTH 1 /* IM_HP3L_SC_POS_EINT2 */
5908#define ARIZONA_IM_HP2R_SC_NEG_EINT2 0x0080 /* IM_HP2R_SC_NEG_EINT2 */
5909#define ARIZONA_IM_HP2R_SC_NEG_EINT2_MASK 0x0080 /* IM_HP2R_SC_NEG_EINT2 */
5910#define ARIZONA_IM_HP2R_SC_NEG_EINT2_SHIFT 7 /* IM_HP2R_SC_NEG_EINT2 */
5911#define ARIZONA_IM_HP2R_SC_NEG_EINT2_WIDTH 1 /* IM_HP2R_SC_NEG_EINT2 */
5912#define ARIZONA_IM_HP2R_SC_POS_EINT2 0x0040 /* IM_HP2R_SC_POS_EINT2 */
5913#define ARIZONA_IM_HP2R_SC_POS_EINT2_MASK 0x0040 /* IM_HP2R_SC_POS_EINT2 */
5914#define ARIZONA_IM_HP2R_SC_POS_EINT2_SHIFT 6 /* IM_HP2R_SC_POS_EINT2 */
5915#define ARIZONA_IM_HP2R_SC_POS_EINT2_WIDTH 1 /* IM_HP2R_SC_POS_EINT2 */
5916#define ARIZONA_IM_HP2L_SC_NEG_EINT2 0x0020 /* IM_HP2L_SC_NEG_EINT2 */
5917#define ARIZONA_IM_HP2L_SC_NEG_EINT2_MASK 0x0020 /* IM_HP2L_SC_NEG_EINT2 */
5918#define ARIZONA_IM_HP2L_SC_NEG_EINT2_SHIFT 5 /* IM_HP2L_SC_NEG_EINT2 */
5919#define ARIZONA_IM_HP2L_SC_NEG_EINT2_WIDTH 1 /* IM_HP2L_SC_NEG_EINT2 */
5920#define ARIZONA_IM_HP2L_SC_POS_EINT2 0x0010 /* IM_HP2L_SC_POS_EINT2 */
5921#define ARIZONA_IM_HP2L_SC_POS_EINT2_MASK 0x0010 /* IM_HP2L_SC_POS_EINT2 */
5922#define ARIZONA_IM_HP2L_SC_POS_EINT2_SHIFT 4 /* IM_HP2L_SC_POS_EINT2 */
5923#define ARIZONA_IM_HP2L_SC_POS_EINT2_WIDTH 1 /* IM_HP2L_SC_POS_EINT2 */
5924#define ARIZONA_IM_HP1R_SC_NEG_EINT2 0x0008 /* IM_HP1R_SC_NEG_EINT2 */
5925#define ARIZONA_IM_HP1R_SC_NEG_EINT2_MASK 0x0008 /* IM_HP1R_SC_NEG_EINT2 */
5926#define ARIZONA_IM_HP1R_SC_NEG_EINT2_SHIFT 3 /* IM_HP1R_SC_NEG_EINT2 */
5927#define ARIZONA_IM_HP1R_SC_NEG_EINT2_WIDTH 1 /* IM_HP1R_SC_NEG_EINT2 */
5928#define ARIZONA_IM_HP1R_SC_POS_EINT2 0x0004 /* IM_HP1R_SC_POS_EINT2 */
5929#define ARIZONA_IM_HP1R_SC_POS_EINT2_MASK 0x0004 /* IM_HP1R_SC_POS_EINT2 */
5930#define ARIZONA_IM_HP1R_SC_POS_EINT2_SHIFT 2 /* IM_HP1R_SC_POS_EINT2 */
5931#define ARIZONA_IM_HP1R_SC_POS_EINT2_WIDTH 1 /* IM_HP1R_SC_POS_EINT2 */
5932#define ARIZONA_IM_HP1L_SC_NEG_EINT2 0x0002 /* IM_HP1L_SC_NEG_EINT2 */
5933#define ARIZONA_IM_HP1L_SC_NEG_EINT2_MASK 0x0002 /* IM_HP1L_SC_NEG_EINT2 */
5934#define ARIZONA_IM_HP1L_SC_NEG_EINT2_SHIFT 1 /* IM_HP1L_SC_NEG_EINT2 */
5935#define ARIZONA_IM_HP1L_SC_NEG_EINT2_WIDTH 1 /* IM_HP1L_SC_NEG_EINT2 */
5936#define ARIZONA_IM_HP1L_SC_POS_EINT2 0x0001 /* IM_HP1L_SC_POS_EINT2 */
5937#define ARIZONA_IM_HP1L_SC_POS_EINT2_MASK 0x0001 /* IM_HP1L_SC_POS_EINT2 */
5938#define ARIZONA_IM_HP1L_SC_POS_EINT2_SHIFT 0 /* IM_HP1L_SC_POS_EINT2 */
5939#define ARIZONA_IM_HP1L_SC_POS_EINT2_WIDTH 1 /* IM_HP1L_SC_POS_EINT2 */
5940
5941/*
5337 * R3359 (0xD1F) - IRQ2 Control 5942 * R3359 (0xD1F) - IRQ2 Control
5338 */ 5943 */
5339#define ARIZONA_IM_IRQ2 0x0001 /* IM_IRQ2 */ 5944#define ARIZONA_IM_IRQ2 0x0001 /* IM_IRQ2 */
@@ -5360,14 +5965,14 @@
5360/* 5965/*
5361 * R3361 (0xD21) - Interrupt Raw Status 3 5966 * R3361 (0xD21) - Interrupt Raw Status 3
5362 */ 5967 */
5363#define ARIZONA_SPK_SHUTDOWN_WARN_STS 0x8000 /* SPK_SHUTDOWN_WARN_STS */ 5968#define ARIZONA_SPK_OVERHEAT_WARN_STS 0x8000 /* SPK_OVERHEAT_WARN_STS */
5364#define ARIZONA_SPK_SHUTDOWN_WARN_STS_MASK 0x8000 /* SPK_SHUTDOWN_WARN_STS */ 5969#define ARIZONA_SPK_OVERHEAT_WARN_STS_MASK 0x8000 /* SPK_OVERHEAT_WARN_STS */
5365#define ARIZONA_SPK_SHUTDOWN_WARN_STS_SHIFT 15 /* SPK_SHUTDOWN_WARN_STS */ 5970#define ARIZONA_SPK_OVERHEAT_WARN_STS_SHIFT 15 /* SPK_OVERHEAT_WARN_STS */
5366#define ARIZONA_SPK_SHUTDOWN_WARN_STS_WIDTH 1 /* SPK_SHUTDOWN_WARN_STS */ 5971#define ARIZONA_SPK_OVERHEAT_WARN_STS_WIDTH 1 /* SPK_OVERHEAT_WARN_STS */
5367#define ARIZONA_SPK_SHUTDOWN_STS 0x4000 /* SPK_SHUTDOWN_STS */ 5972#define ARIZONA_SPK_OVERHEAT_STS 0x4000 /* SPK_OVERHEAT_STS */
5368#define ARIZONA_SPK_SHUTDOWN_STS_MASK 0x4000 /* SPK_SHUTDOWN_STS */ 5973#define ARIZONA_SPK_OVERHEAT_STS_MASK 0x4000 /* SPK_OVERHEAT_STS */
5369#define ARIZONA_SPK_SHUTDOWN_STS_SHIFT 14 /* SPK_SHUTDOWN_STS */ 5974#define ARIZONA_SPK_OVERHEAT_STS_SHIFT 14 /* SPK_OVERHEAT_STS */
5370#define ARIZONA_SPK_SHUTDOWN_STS_WIDTH 1 /* SPK_SHUTDOWN_STS */ 5975#define ARIZONA_SPK_OVERHEAT_STS_WIDTH 1 /* SPK_OVERHEAT_STS */
5371#define ARIZONA_HPDET_STS 0x2000 /* HPDET_STS */ 5976#define ARIZONA_HPDET_STS 0x2000 /* HPDET_STS */
5372#define ARIZONA_HPDET_STS_MASK 0x2000 /* HPDET_STS */ 5977#define ARIZONA_HPDET_STS_MASK 0x2000 /* HPDET_STS */
5373#define ARIZONA_HPDET_STS_SHIFT 13 /* HPDET_STS */ 5978#define ARIZONA_HPDET_STS_SHIFT 13 /* HPDET_STS */
@@ -5464,6 +6069,30 @@
5464#define ARIZONA_ISRC2_CFG_ERR_STS_MASK 0x0040 /* ISRC2_CFG_ERR_STS */ 6069#define ARIZONA_ISRC2_CFG_ERR_STS_MASK 0x0040 /* ISRC2_CFG_ERR_STS */
5465#define ARIZONA_ISRC2_CFG_ERR_STS_SHIFT 6 /* ISRC2_CFG_ERR_STS */ 6070#define ARIZONA_ISRC2_CFG_ERR_STS_SHIFT 6 /* ISRC2_CFG_ERR_STS */
5466#define ARIZONA_ISRC2_CFG_ERR_STS_WIDTH 1 /* ISRC2_CFG_ERR_STS */ 6071#define ARIZONA_ISRC2_CFG_ERR_STS_WIDTH 1 /* ISRC2_CFG_ERR_STS */
6072#define ARIZONA_HP3R_DONE_STS 0x0020 /* HP3R_DONE_STS */
6073#define ARIZONA_HP3R_DONE_STS_MASK 0x0020 /* HP3R_DONE_STS */
6074#define ARIZONA_HP3R_DONE_STS_SHIFT 5 /* HP3R_DONE_STS */
6075#define ARIZONA_HP3R_DONE_STS_WIDTH 1 /* HP3R_DONE_STS */
6076#define ARIZONA_HP3L_DONE_STS 0x0010 /* HP3L_DONE_STS */
6077#define ARIZONA_HP3L_DONE_STS_MASK 0x0010 /* HP3L_DONE_STS */
6078#define ARIZONA_HP3L_DONE_STS_SHIFT 4 /* HP3L_DONE_STS */
6079#define ARIZONA_HP3L_DONE_STS_WIDTH 1 /* HP3L_DONE_STS */
6080#define ARIZONA_HP2R_DONE_STS 0x0008 /* HP2R_DONE_STS */
6081#define ARIZONA_HP2R_DONE_STS_MASK 0x0008 /* HP2R_DONE_STS */
6082#define ARIZONA_HP2R_DONE_STS_SHIFT 3 /* HP2R_DONE_STS */
6083#define ARIZONA_HP2R_DONE_STS_WIDTH 1 /* HP2R_DONE_STS */
6084#define ARIZONA_HP2L_DONE_STS 0x0004 /* HP2L_DONE_STS */
6085#define ARIZONA_HP2L_DONE_STS_MASK 0x0004 /* HP2L_DONE_STS */
6086#define ARIZONA_HP2L_DONE_STS_SHIFT 2 /* HP2L_DONE_STS */
6087#define ARIZONA_HP2L_DONE_STS_WIDTH 1 /* HP2L_DONE_STS */
6088#define ARIZONA_HP1R_DONE_STS 0x0002 /* HP1R_DONE_STS */
6089#define ARIZONA_HP1R_DONE_STS_MASK 0x0002 /* HP1R_DONE_STS */
6090#define ARIZONA_HP1R_DONE_STS_SHIFT 1 /* HP1R_DONE_STS */
6091#define ARIZONA_HP1R_DONE_STS_WIDTH 1 /* HP1R_DONE_STS */
6092#define ARIZONA_HP1L_DONE_STS 0x0001 /* HP1L_DONE_STS */
6093#define ARIZONA_HP1L_DONE_STS_MASK 0x0001 /* HP1L_DONE_STS */
6094#define ARIZONA_HP1L_DONE_STS_SHIFT 0 /* HP1L_DONE_STS */
6095#define ARIZONA_HP1L_DONE_STS_WIDTH 1 /* HP1L_DONE_STS */
5467 6096
5468/* 6097/*
5469 * R3363 (0xD23) - Interrupt Raw Status 5 6098 * R3363 (0xD23) - Interrupt Raw Status 5
@@ -5580,6 +6209,10 @@
5580#define ARIZONA_ADSP2_1_OVERCLOCKED_STS_MASK 0x0008 /* ADSP2_1_OVERCLOCKED_STS */ 6209#define ARIZONA_ADSP2_1_OVERCLOCKED_STS_MASK 0x0008 /* ADSP2_1_OVERCLOCKED_STS */
5581#define ARIZONA_ADSP2_1_OVERCLOCKED_STS_SHIFT 3 /* ADSP2_1_OVERCLOCKED_STS */ 6210#define ARIZONA_ADSP2_1_OVERCLOCKED_STS_SHIFT 3 /* ADSP2_1_OVERCLOCKED_STS */
5582#define ARIZONA_ADSP2_1_OVERCLOCKED_STS_WIDTH 1 /* ADSP2_1_OVERCLOCKED_STS */ 6211#define ARIZONA_ADSP2_1_OVERCLOCKED_STS_WIDTH 1 /* ADSP2_1_OVERCLOCKED_STS */
6212#define ARIZONA_ISRC3_OVERCLOCKED_STS 0x0004 /* ISRC3_OVERCLOCKED_STS */
6213#define ARIZONA_ISRC3_OVERCLOCKED_STS_MASK 0x0004 /* ISRC3_OVERCLOCKED_STS */
6214#define ARIZONA_ISRC3_OVERCLOCKED_STS_SHIFT 2 /* ISRC3_OVERCLOCKED_STS */
6215#define ARIZONA_ISRC3_OVERCLOCKED_STS_WIDTH 1 /* ISRC3_OVERCLOCKED_STS */
5583#define ARIZONA_ISRC2_OVERCLOCKED_STS 0x0002 /* ISRC2_OVERCLOCKED_STS */ 6216#define ARIZONA_ISRC2_OVERCLOCKED_STS 0x0002 /* ISRC2_OVERCLOCKED_STS */
5584#define ARIZONA_ISRC2_OVERCLOCKED_STS_MASK 0x0002 /* ISRC2_OVERCLOCKED_STS */ 6217#define ARIZONA_ISRC2_OVERCLOCKED_STS_MASK 0x0002 /* ISRC2_OVERCLOCKED_STS */
5585#define ARIZONA_ISRC2_OVERCLOCKED_STS_SHIFT 1 /* ISRC2_OVERCLOCKED_STS */ 6218#define ARIZONA_ISRC2_OVERCLOCKED_STS_SHIFT 1 /* ISRC2_OVERCLOCKED_STS */
@@ -5604,6 +6237,10 @@
5604#define ARIZONA_AIF1_UNDERCLOCKED_STS_MASK 0x0100 /* AIF1_UNDERCLOCKED_STS */ 6237#define ARIZONA_AIF1_UNDERCLOCKED_STS_MASK 0x0100 /* AIF1_UNDERCLOCKED_STS */
5605#define ARIZONA_AIF1_UNDERCLOCKED_STS_SHIFT 8 /* AIF1_UNDERCLOCKED_STS */ 6238#define ARIZONA_AIF1_UNDERCLOCKED_STS_SHIFT 8 /* AIF1_UNDERCLOCKED_STS */
5606#define ARIZONA_AIF1_UNDERCLOCKED_STS_WIDTH 1 /* AIF1_UNDERCLOCKED_STS */ 6239#define ARIZONA_AIF1_UNDERCLOCKED_STS_WIDTH 1 /* AIF1_UNDERCLOCKED_STS */
6240#define ARIZONA_ISRC3_UNDERCLOCKED_STS 0x0080 /* ISRC3_UNDERCLOCKED_STS */
6241#define ARIZONA_ISRC3_UNDERCLOCKED_STS_MASK 0x0080 /* ISRC3_UNDERCLOCKED_STS */
6242#define ARIZONA_ISRC3_UNDERCLOCKED_STS_SHIFT 7 /* ISRC3_UNDERCLOCKED_STS */
6243#define ARIZONA_ISRC3_UNDERCLOCKED_STS_WIDTH 1 /* ISRC3_UNDERCLOCKED_STS */
5607#define ARIZONA_ISRC2_UNDERCLOCKED_STS 0x0040 /* ISRC2_UNDERCLOCKED_STS */ 6244#define ARIZONA_ISRC2_UNDERCLOCKED_STS 0x0040 /* ISRC2_UNDERCLOCKED_STS */
5608#define ARIZONA_ISRC2_UNDERCLOCKED_STS_MASK 0x0040 /* ISRC2_UNDERCLOCKED_STS */ 6245#define ARIZONA_ISRC2_UNDERCLOCKED_STS_MASK 0x0040 /* ISRC2_UNDERCLOCKED_STS */
5609#define ARIZONA_ISRC2_UNDERCLOCKED_STS_SHIFT 6 /* ISRC2_UNDERCLOCKED_STS */ 6246#define ARIZONA_ISRC2_UNDERCLOCKED_STS_SHIFT 6 /* ISRC2_UNDERCLOCKED_STS */
@@ -5634,6 +6271,74 @@
5634#define ARIZONA_MIXER_UNDERCLOCKED_STS_WIDTH 1 /* MIXER_UNDERCLOCKED_STS */ 6271#define ARIZONA_MIXER_UNDERCLOCKED_STS_WIDTH 1 /* MIXER_UNDERCLOCKED_STS */
5635 6272
5636/* 6273/*
6274 * R3368 (0xD28) - Interrupt Raw Status 9
6275 */
6276#define ARIZONA_DSP_SHARED_WR_COLL_STS 0x8000 /* DSP_SHARED_WR_COLL_STS */
6277#define ARIZONA_DSP_SHARED_WR_COLL_STS_MASK 0x8000 /* DSP_SHARED_WR_COLL_STS */
6278#define ARIZONA_DSP_SHARED_WR_COLL_STS_SHIFT 15 /* DSP_SHARED_WR_COLL_STS */
6279#define ARIZONA_DSP_SHARED_WR_COLL_STS_WIDTH 1 /* DSP_SHARED_WR_COLL_STS */
6280#define ARIZONA_SPK_SHUTDOWN_STS 0x4000 /* SPK_SHUTDOWN_STS */
6281#define ARIZONA_SPK_SHUTDOWN_STS_MASK 0x4000 /* SPK_SHUTDOWN_STS */
6282#define ARIZONA_SPK_SHUTDOWN_STS_SHIFT 14 /* SPK_SHUTDOWN_STS */
6283#define ARIZONA_SPK_SHUTDOWN_STS_WIDTH 1 /* SPK_SHUTDOWN_STS */
6284#define ARIZONA_SPK1R_SHORT_STS 0x2000 /* SPK1R_SHORT_STS */
6285#define ARIZONA_SPK1R_SHORT_STS_MASK 0x2000 /* SPK1R_SHORT_STS */
6286#define ARIZONA_SPK1R_SHORT_STS_SHIFT 13 /* SPK1R_SHORT_STS */
6287#define ARIZONA_SPK1R_SHORT_STS_WIDTH 1 /* SPK1R_SHORT_STS */
6288#define ARIZONA_SPK1L_SHORT_STS 0x1000 /* SPK1L_SHORT_STS */
6289#define ARIZONA_SPK1L_SHORT_STS_MASK 0x1000 /* SPK1L_SHORT_STS */
6290#define ARIZONA_SPK1L_SHORT_STS_SHIFT 12 /* SPK1L_SHORT_STS */
6291#define ARIZONA_SPK1L_SHORT_STS_WIDTH 1 /* SPK1L_SHORT_STS */
6292#define ARIZONA_HP3R_SC_NEG_STS 0x0800 /* HP3R_SC_NEG_STS */
6293#define ARIZONA_HP3R_SC_NEG_STS_MASK 0x0800 /* HP3R_SC_NEG_STS */
6294#define ARIZONA_HP3R_SC_NEG_STS_SHIFT 11 /* HP3R_SC_NEG_STS */
6295#define ARIZONA_HP3R_SC_NEG_STS_WIDTH 1 /* HP3R_SC_NEG_STS */
6296#define ARIZONA_HP3R_SC_POS_STS 0x0400 /* HP3R_SC_POS_STS */
6297#define ARIZONA_HP3R_SC_POS_STS_MASK 0x0400 /* HP3R_SC_POS_STS */
6298#define ARIZONA_HP3R_SC_POS_STS_SHIFT 10 /* HP3R_SC_POS_STS */
6299#define ARIZONA_HP3R_SC_POS_STS_WIDTH 1 /* HP3R_SC_POS_STS */
6300#define ARIZONA_HP3L_SC_NEG_STS 0x0200 /* HP3L_SC_NEG_STS */
6301#define ARIZONA_HP3L_SC_NEG_STS_MASK 0x0200 /* HP3L_SC_NEG_STS */
6302#define ARIZONA_HP3L_SC_NEG_STS_SHIFT 9 /* HP3L_SC_NEG_STS */
6303#define ARIZONA_HP3L_SC_NEG_STS_WIDTH 1 /* HP3L_SC_NEG_STS */
6304#define ARIZONA_HP3L_SC_POS_STS 0x0100 /* HP3L_SC_POS_STS */
6305#define ARIZONA_HP3L_SC_POS_STS_MASK 0x0100 /* HP3L_SC_POS_STS */
6306#define ARIZONA_HP3L_SC_POS_STS_SHIFT 8 /* HP3L_SC_POS_STS */
6307#define ARIZONA_HP3L_SC_POS_STS_WIDTH 1 /* HP3L_SC_POS_STS */
6308#define ARIZONA_HP2R_SC_NEG_STS 0x0080 /* HP2R_SC_NEG_STS */
6309#define ARIZONA_HP2R_SC_NEG_STS_MASK 0x0080 /* HP2R_SC_NEG_STS */
6310#define ARIZONA_HP2R_SC_NEG_STS_SHIFT 7 /* HP2R_SC_NEG_STS */
6311#define ARIZONA_HP2R_SC_NEG_STS_WIDTH 1 /* HP2R_SC_NEG_STS */
6312#define ARIZONA_HP2R_SC_POS_STS 0x0040 /* HP2R_SC_POS_STS */
6313#define ARIZONA_HP2R_SC_POS_STS_MASK 0x0040 /* HP2R_SC_POS_STS */
6314#define ARIZONA_HP2R_SC_POS_STS_SHIFT 6 /* HP2R_SC_POS_STS */
6315#define ARIZONA_HP2R_SC_POS_STS_WIDTH 1 /* HP2R_SC_POS_STS */
6316#define ARIZONA_HP2L_SC_NEG_STS 0x0020 /* HP2L_SC_NEG_STS */
6317#define ARIZONA_HP2L_SC_NEG_STS_MASK 0x0020 /* HP2L_SC_NEG_STS */
6318#define ARIZONA_HP2L_SC_NEG_STS_SHIFT 5 /* HP2L_SC_NEG_STS */
6319#define ARIZONA_HP2L_SC_NEG_STS_WIDTH 1 /* HP2L_SC_NEG_STS */
6320#define ARIZONA_HP2L_SC_POS_STS 0x0010 /* HP2L_SC_POS_STS */
6321#define ARIZONA_HP2L_SC_POS_STS_MASK 0x0010 /* HP2L_SC_POS_STS */
6322#define ARIZONA_HP2L_SC_POS_STS_SHIFT 4 /* HP2L_SC_POS_STS */
6323#define ARIZONA_HP2L_SC_POS_STS_WIDTH 1 /* HP2L_SC_POS_STS */
6324#define ARIZONA_HP1R_SC_NEG_STS 0x0008 /* HP1R_SC_NEG_STS */
6325#define ARIZONA_HP1R_SC_NEG_STS_MASK 0x0008 /* HP1R_SC_NEG_STS */
6326#define ARIZONA_HP1R_SC_NEG_STS_SHIFT 3 /* HP1R_SC_NEG_STS */
6327#define ARIZONA_HP1R_SC_NEG_STS_WIDTH 1 /* HP1R_SC_NEG_STS */
6328#define ARIZONA_HP1R_SC_POS_STS 0x0004 /* HP1R_SC_POS_STS */
6329#define ARIZONA_HP1R_SC_POS_STS_MASK 0x0004 /* HP1R_SC_POS_STS */
6330#define ARIZONA_HP1R_SC_POS_STS_SHIFT 2 /* HP1R_SC_POS_STS */
6331#define ARIZONA_HP1R_SC_POS_STS_WIDTH 1 /* HP1R_SC_POS_STS */
6332#define ARIZONA_HP1L_SC_NEG_STS 0x0002 /* HP1L_SC_NEG_STS */
6333#define ARIZONA_HP1L_SC_NEG_STS_MASK 0x0002 /* HP1L_SC_NEG_STS */
6334#define ARIZONA_HP1L_SC_NEG_STS_SHIFT 1 /* HP1L_SC_NEG_STS */
6335#define ARIZONA_HP1L_SC_NEG_STS_WIDTH 1 /* HP1L_SC_NEG_STS */
6336#define ARIZONA_HP1L_SC_POS_STS 0x0001 /* HP1L_SC_POS_STS */
6337#define ARIZONA_HP1L_SC_POS_STS_MASK 0x0001 /* HP1L_SC_POS_STS */
6338#define ARIZONA_HP1L_SC_POS_STS_SHIFT 0 /* HP1L_SC_POS_STS */
6339#define ARIZONA_HP1L_SC_POS_STS_WIDTH 1 /* HP1L_SC_POS_STS */
6340
6341/*
5637 * R3392 (0xD40) - IRQ Pin Status 6342 * R3392 (0xD40) - IRQ Pin Status
5638 */ 6343 */
5639#define ARIZONA_IRQ2_STS 0x0002 /* IRQ2_STS */ 6344#define ARIZONA_IRQ2_STS 0x0002 /* IRQ2_STS */
diff --git a/include/linux/mfd/cros_ec.h b/include/linux/mfd/cros_ec.h
index 887ef4f7bef7..fcbe9d129a9d 100644
--- a/include/linux/mfd/cros_ec.h
+++ b/include/linux/mfd/cros_ec.h
@@ -16,7 +16,9 @@
16#ifndef __LINUX_MFD_CROS_EC_H 16#ifndef __LINUX_MFD_CROS_EC_H
17#define __LINUX_MFD_CROS_EC_H 17#define __LINUX_MFD_CROS_EC_H
18 18
19#include <linux/notifier.h>
19#include <linux/mfd/cros_ec_commands.h> 20#include <linux/mfd/cros_ec_commands.h>
21#include <linux/mutex.h>
20 22
21/* 23/*
22 * Command interface between EC and AP, for LPC, I2C and SPI interfaces. 24 * Command interface between EC and AP, for LPC, I2C and SPI interfaces.
@@ -33,83 +35,76 @@ enum {
33 EC_MSG_TX_PROTO_BYTES, 35 EC_MSG_TX_PROTO_BYTES,
34}; 36};
35 37
36/** 38/*
37 * struct cros_ec_msg - A message sent to the EC, and its reply
38 *
39 * @version: Command version number (often 0) 39 * @version: Command version number (often 0)
40 * @cmd: Command to send (EC_CMD_...) 40 * @command: Command to send (EC_CMD_...)
41 * @out_buf: Outgoing payload (to EC) 41 * @outdata: Outgoing data to EC
42 * @outlen: Outgoing length 42 * @outsize: Outgoing length in bytes
43 * @in_buf: Incoming payload (from EC) 43 * @indata: Where to put the incoming data from EC
44 * @in_len: Incoming length 44 * @insize: Max number of bytes to accept from EC
45 * @result: EC's response to the command (separate from communication failure)
45 */ 46 */
46struct cros_ec_msg { 47struct cros_ec_command {
47 u8 version; 48 uint32_t version;
48 u8 cmd; 49 uint32_t command;
49 uint8_t *out_buf; 50 uint8_t *outdata;
50 int out_len; 51 uint32_t outsize;
51 uint8_t *in_buf; 52 uint8_t *indata;
52 int in_len; 53 uint32_t insize;
54 uint32_t result;
53}; 55};
54 56
55/** 57/**
56 * struct cros_ec_device - Information about a ChromeOS EC device 58 * struct cros_ec_device - Information about a ChromeOS EC device
57 * 59 *
58 * @name: Name of this EC interface 60 * @ec_name: name of EC device (e.g. 'chromeos-ec')
61 * @phys_name: name of physical comms layer (e.g. 'i2c-4')
62 * @dev: Device pointer
63 * @was_wake_device: true if this device was set to wake the system from
64 * sleep at the last suspend
65 * @cmd_xfer: send command to EC and get response
66 * Returns the number of bytes received if the communication succeeded, but
67 * that doesn't mean the EC was happy with the command. The caller
68 * should check msg.result for the EC's result code.
69 *
59 * @priv: Private data 70 * @priv: Private data
60 * @irq: Interrupt to use 71 * @irq: Interrupt to use
61 * @din: input buffer (from EC) 72 * @din: input buffer (for data from EC)
62 * @dout: output buffer (to EC) 73 * @dout: output buffer (for data to EC)
63 * \note 74 * \note
64 * These two buffers will always be dword-aligned and include enough 75 * These two buffers will always be dword-aligned and include enough
65 * space for up to 7 word-alignment bytes also, so we can ensure that 76 * space for up to 7 word-alignment bytes also, so we can ensure that
66 * the body of the message is always dword-aligned (64-bit). 77 * the body of the message is always dword-aligned (64-bit).
67 *
68 * We use this alignment to keep ARM and x86 happy. Probably word 78 * We use this alignment to keep ARM and x86 happy. Probably word
69 * alignment would be OK, there might be a small performance advantage 79 * alignment would be OK, there might be a small performance advantage
70 * to using dword. 80 * to using dword.
71 * @din_size: size of din buffer 81 * @din_size: size of din buffer to allocate (zero to use static din)
72 * @dout_size: size of dout buffer 82 * @dout_size: size of dout buffer to allocate (zero to use static dout)
73 * @command_send: send a command
74 * @command_recv: receive a command
75 * @ec_name: name of EC device (e.g. 'chromeos-ec')
76 * @phys_name: name of physical comms layer (e.g. 'i2c-4')
77 * @parent: pointer to parent device (e.g. i2c or spi device) 83 * @parent: pointer to parent device (e.g. i2c or spi device)
78 * @dev: Device pointer
79 * dev_lock: Lock to prevent concurrent access
80 * @wake_enabled: true if this device can wake the system from sleep 84 * @wake_enabled: true if this device can wake the system from sleep
81 * @was_wake_device: true if this device was set to wake the system from 85 * @lock: one transaction at a time
82 * sleep at the last suspend
83 * @event_notifier: interrupt event notifier for transport devices
84 */ 86 */
85struct cros_ec_device { 87struct cros_ec_device {
86 const char *name; 88
89 /* These are used by other drivers that want to talk to the EC */
90 const char *ec_name;
91 const char *phys_name;
92 struct device *dev;
93 bool was_wake_device;
94 struct class *cros_class;
95 int (*cmd_xfer)(struct cros_ec_device *ec,
96 struct cros_ec_command *msg);
97
98 /* These are used to implement the platform-specific interface */
87 void *priv; 99 void *priv;
88 int irq; 100 int irq;
89 uint8_t *din; 101 uint8_t *din;
90 uint8_t *dout; 102 uint8_t *dout;
91 int din_size; 103 int din_size;
92 int dout_size; 104 int dout_size;
93 int (*command_send)(struct cros_ec_device *ec,
94 uint16_t cmd, void *out_buf, int out_len);
95 int (*command_recv)(struct cros_ec_device *ec,
96 uint16_t cmd, void *in_buf, int in_len);
97 int (*command_sendrecv)(struct cros_ec_device *ec,
98 uint16_t cmd, void *out_buf, int out_len,
99 void *in_buf, int in_len);
100 int (*command_xfer)(struct cros_ec_device *ec,
101 struct cros_ec_msg *msg);
102
103 const char *ec_name;
104 const char *phys_name;
105 struct device *parent; 105 struct device *parent;
106
107 /* These are --private-- fields - do not assign */
108 struct device *dev;
109 struct mutex dev_lock;
110 bool wake_enabled; 106 bool wake_enabled;
111 bool was_wake_device; 107 struct mutex lock;
112 struct blocking_notifier_head event_notifier;
113}; 108};
114 109
115/** 110/**
@@ -143,13 +138,24 @@ int cros_ec_resume(struct cros_ec_device *ec_dev);
143 * @msg: Message to write 138 * @msg: Message to write
144 */ 139 */
145int cros_ec_prepare_tx(struct cros_ec_device *ec_dev, 140int cros_ec_prepare_tx(struct cros_ec_device *ec_dev,
146 struct cros_ec_msg *msg); 141 struct cros_ec_command *msg);
142
143/**
144 * cros_ec_check_result - Check ec_msg->result
145 *
146 * This is used by ChromeOS EC drivers to check the ec_msg->result for
147 * errors and to warn about them.
148 *
149 * @ec_dev: EC device
150 * @msg: Message to check
151 */
152int cros_ec_check_result(struct cros_ec_device *ec_dev,
153 struct cros_ec_command *msg);
147 154
148/** 155/**
149 * cros_ec_remove - Remove a ChromeOS EC 156 * cros_ec_remove - Remove a ChromeOS EC
150 * 157 *
151 * Call this to deregister a ChromeOS EC. After this you should call 158 * Call this to deregister a ChromeOS EC, then clean up any private data.
152 * cros_ec_free().
153 * 159 *
154 * @ec_dev: Device to register 160 * @ec_dev: Device to register
155 * @return 0 if ok, -ve on error 161 * @return 0 if ok, -ve on error
diff --git a/include/linux/mfd/da9063/core.h b/include/linux/mfd/da9063/core.h
index 00a9aac5d1e8..b92a3262f8f6 100644
--- a/include/linux/mfd/da9063/core.h
+++ b/include/linux/mfd/da9063/core.h
@@ -34,7 +34,8 @@ enum da9063_models {
34}; 34};
35 35
36enum da9063_variant_codes { 36enum da9063_variant_codes {
37 PMIC_DA9063_BB = 0x5 37 PMIC_DA9063_AD = 0x3,
38 PMIC_DA9063_BB = 0x5,
38}; 39};
39 40
40/* Interrupts */ 41/* Interrupts */
diff --git a/include/linux/mfd/da9063/registers.h b/include/linux/mfd/da9063/registers.h
index 09a85c699da1..2e0ba6d5fbc3 100644
--- a/include/linux/mfd/da9063/registers.h
+++ b/include/linux/mfd/da9063/registers.h
@@ -104,16 +104,27 @@
104#define DA9063_REG_COUNT_D 0x43 104#define DA9063_REG_COUNT_D 0x43
105#define DA9063_REG_COUNT_MO 0x44 105#define DA9063_REG_COUNT_MO 0x44
106#define DA9063_REG_COUNT_Y 0x45 106#define DA9063_REG_COUNT_Y 0x45
107#define DA9063_REG_ALARM_S 0x46 107
108#define DA9063_REG_ALARM_MI 0x47 108#define DA9063_AD_REG_ALARM_MI 0x46
109#define DA9063_REG_ALARM_H 0x48 109#define DA9063_AD_REG_ALARM_H 0x47
110#define DA9063_REG_ALARM_D 0x49 110#define DA9063_AD_REG_ALARM_D 0x48
111#define DA9063_REG_ALARM_MO 0x4A 111#define DA9063_AD_REG_ALARM_MO 0x49
112#define DA9063_REG_ALARM_Y 0x4B 112#define DA9063_AD_REG_ALARM_Y 0x4A
113#define DA9063_REG_SECOND_A 0x4C 113#define DA9063_AD_REG_SECOND_A 0x4B
114#define DA9063_REG_SECOND_B 0x4D 114#define DA9063_AD_REG_SECOND_B 0x4C
115#define DA9063_REG_SECOND_C 0x4E 115#define DA9063_AD_REG_SECOND_C 0x4D
116#define DA9063_REG_SECOND_D 0x4F 116#define DA9063_AD_REG_SECOND_D 0x4E
117
118#define DA9063_BB_REG_ALARM_S 0x46
119#define DA9063_BB_REG_ALARM_MI 0x47
120#define DA9063_BB_REG_ALARM_H 0x48
121#define DA9063_BB_REG_ALARM_D 0x49
122#define DA9063_BB_REG_ALARM_MO 0x4A
123#define DA9063_BB_REG_ALARM_Y 0x4B
124#define DA9063_BB_REG_SECOND_A 0x4C
125#define DA9063_BB_REG_SECOND_B 0x4D
126#define DA9063_BB_REG_SECOND_C 0x4E
127#define DA9063_BB_REG_SECOND_D 0x4F
117 128
118/* Sequencer Control Registers */ 129/* Sequencer Control Registers */
119#define DA9063_REG_SEQ 0x81 130#define DA9063_REG_SEQ 0x81
@@ -223,37 +234,67 @@
223#define DA9063_REG_CONFIG_J 0x10F 234#define DA9063_REG_CONFIG_J 0x10F
224#define DA9063_REG_CONFIG_K 0x110 235#define DA9063_REG_CONFIG_K 0x110
225#define DA9063_REG_CONFIG_L 0x111 236#define DA9063_REG_CONFIG_L 0x111
226#define DA9063_REG_CONFIG_M 0x112 237
227#define DA9063_REG_CONFIG_N 0x113 238#define DA9063_AD_REG_MON_REG_1 0x112
228 239#define DA9063_AD_REG_MON_REG_2 0x113
229#define DA9063_REG_MON_REG_1 0x114 240#define DA9063_AD_REG_MON_REG_3 0x114
230#define DA9063_REG_MON_REG_2 0x115 241#define DA9063_AD_REG_MON_REG_4 0x115
231#define DA9063_REG_MON_REG_3 0x116 242#define DA9063_AD_REG_MON_REG_5 0x116
232#define DA9063_REG_MON_REG_4 0x117 243#define DA9063_AD_REG_MON_REG_6 0x117
233#define DA9063_REG_MON_REG_5 0x11E 244#define DA9063_AD_REG_TRIM_CLDR 0x118
234#define DA9063_REG_MON_REG_6 0x11F 245
235#define DA9063_REG_TRIM_CLDR 0x120 246#define DA9063_AD_REG_GP_ID_0 0x119
247#define DA9063_AD_REG_GP_ID_1 0x11A
248#define DA9063_AD_REG_GP_ID_2 0x11B
249#define DA9063_AD_REG_GP_ID_3 0x11C
250#define DA9063_AD_REG_GP_ID_4 0x11D
251#define DA9063_AD_REG_GP_ID_5 0x11E
252#define DA9063_AD_REG_GP_ID_6 0x11F
253#define DA9063_AD_REG_GP_ID_7 0x120
254#define DA9063_AD_REG_GP_ID_8 0x121
255#define DA9063_AD_REG_GP_ID_9 0x122
256#define DA9063_AD_REG_GP_ID_10 0x123
257#define DA9063_AD_REG_GP_ID_11 0x124
258#define DA9063_AD_REG_GP_ID_12 0x125
259#define DA9063_AD_REG_GP_ID_13 0x126
260#define DA9063_AD_REG_GP_ID_14 0x127
261#define DA9063_AD_REG_GP_ID_15 0x128
262#define DA9063_AD_REG_GP_ID_16 0x129
263#define DA9063_AD_REG_GP_ID_17 0x12A
264#define DA9063_AD_REG_GP_ID_18 0x12B
265#define DA9063_AD_REG_GP_ID_19 0x12C
266
267#define DA9063_BB_REG_CONFIG_M 0x112
268#define DA9063_BB_REG_CONFIG_N 0x113
269
270#define DA9063_BB_REG_MON_REG_1 0x114
271#define DA9063_BB_REG_MON_REG_2 0x115
272#define DA9063_BB_REG_MON_REG_3 0x116
273#define DA9063_BB_REG_MON_REG_4 0x117
274#define DA9063_BB_REG_MON_REG_5 0x11E
275#define DA9063_BB_REG_MON_REG_6 0x11F
276#define DA9063_BB_REG_TRIM_CLDR 0x120
236/* General Purpose Registers */ 277/* General Purpose Registers */
237#define DA9063_REG_GP_ID_0 0x121 278#define DA9063_BB_REG_GP_ID_0 0x121
238#define DA9063_REG_GP_ID_1 0x122 279#define DA9063_BB_REG_GP_ID_1 0x122
239#define DA9063_REG_GP_ID_2 0x123 280#define DA9063_BB_REG_GP_ID_2 0x123
240#define DA9063_REG_GP_ID_3 0x124 281#define DA9063_BB_REG_GP_ID_3 0x124
241#define DA9063_REG_GP_ID_4 0x125 282#define DA9063_BB_REG_GP_ID_4 0x125
242#define DA9063_REG_GP_ID_5 0x126 283#define DA9063_BB_REG_GP_ID_5 0x126
243#define DA9063_REG_GP_ID_6 0x127 284#define DA9063_BB_REG_GP_ID_6 0x127
244#define DA9063_REG_GP_ID_7 0x128 285#define DA9063_BB_REG_GP_ID_7 0x128
245#define DA9063_REG_GP_ID_8 0x129 286#define DA9063_BB_REG_GP_ID_8 0x129
246#define DA9063_REG_GP_ID_9 0x12A 287#define DA9063_BB_REG_GP_ID_9 0x12A
247#define DA9063_REG_GP_ID_10 0x12B 288#define DA9063_BB_REG_GP_ID_10 0x12B
248#define DA9063_REG_GP_ID_11 0x12C 289#define DA9063_BB_REG_GP_ID_11 0x12C
249#define DA9063_REG_GP_ID_12 0x12D 290#define DA9063_BB_REG_GP_ID_12 0x12D
250#define DA9063_REG_GP_ID_13 0x12E 291#define DA9063_BB_REG_GP_ID_13 0x12E
251#define DA9063_REG_GP_ID_14 0x12F 292#define DA9063_BB_REG_GP_ID_14 0x12F
252#define DA9063_REG_GP_ID_15 0x130 293#define DA9063_BB_REG_GP_ID_15 0x130
253#define DA9063_REG_GP_ID_16 0x131 294#define DA9063_BB_REG_GP_ID_16 0x131
254#define DA9063_REG_GP_ID_17 0x132 295#define DA9063_BB_REG_GP_ID_17 0x132
255#define DA9063_REG_GP_ID_18 0x133 296#define DA9063_BB_REG_GP_ID_18 0x133
256#define DA9063_REG_GP_ID_19 0x134 297#define DA9063_BB_REG_GP_ID_19 0x134
257 298
258/* Chip ID and variant */ 299/* Chip ID and variant */
259#define DA9063_REG_CHIP_ID 0x181 300#define DA9063_REG_CHIP_ID 0x181
@@ -404,10 +445,10 @@
404/* DA9063_REG_CONTROL_B (addr=0x0F) */ 445/* DA9063_REG_CONTROL_B (addr=0x0F) */
405#define DA9063_CHG_SEL 0x01 446#define DA9063_CHG_SEL 0x01
406#define DA9063_WATCHDOG_PD 0x02 447#define DA9063_WATCHDOG_PD 0x02
407#define DA9063_RESET_BLINKING 0x04 448#define DA9063_BB_RESET_BLINKING 0x04
408#define DA9063_NRES_MODE 0x08 449#define DA9063_NRES_MODE 0x08
409#define DA9063_NONKEY_LOCK 0x10 450#define DA9063_NONKEY_LOCK 0x10
410#define DA9063_BUCK_SLOWSTART 0x80 451#define DA9063_BB_BUCK_SLOWSTART 0x80
411 452
412/* DA9063_REG_CONTROL_C (addr=0x10) */ 453/* DA9063_REG_CONTROL_C (addr=0x10) */
413#define DA9063_DEBOUNCING_MASK 0x07 454#define DA9063_DEBOUNCING_MASK 0x07
@@ -467,7 +508,7 @@
467#define DA9063_GPADC_PAUSE 0x02 508#define DA9063_GPADC_PAUSE 0x02
468#define DA9063_PMIF_DIS 0x04 509#define DA9063_PMIF_DIS 0x04
469#define DA9063_HS2WIRE_DIS 0x08 510#define DA9063_HS2WIRE_DIS 0x08
470#define DA9063_CLDR_PAUSE 0x10 511#define DA9063_BB_CLDR_PAUSE 0x10
471#define DA9063_BBAT_DIS 0x20 512#define DA9063_BBAT_DIS 0x20
472#define DA9063_OUT_32K_PAUSE 0x40 513#define DA9063_OUT_32K_PAUSE 0x40
473#define DA9063_PMCONT_DIS 0x80 514#define DA9063_PMCONT_DIS 0x80
@@ -844,7 +885,7 @@
844#define DA9063_MONITOR 0x40 885#define DA9063_MONITOR 0x40
845 886
846/* DA9063_REG_ALARM_S (addr=0x46) */ 887/* DA9063_REG_ALARM_S (addr=0x46) */
847#define DA9063_ALARM_S_MASK 0x3F 888#define DA9063_BB_ALARM_S_MASK 0x3F
848#define DA9063_ALARM_STATUS_ALARM 0x80 889#define DA9063_ALARM_STATUS_ALARM 0x80
849#define DA9063_ALARM_STATUS_TICK 0x40 890#define DA9063_ALARM_STATUS_TICK 0x40
850/* DA9063_REG_ALARM_MI (addr=0x47) */ 891/* DA9063_REG_ALARM_MI (addr=0x47) */
diff --git a/include/linux/mfd/intel_soc_pmic.h b/include/linux/mfd/intel_soc_pmic.h
new file mode 100644
index 000000000000..abcbfcf32d10
--- /dev/null
+++ b/include/linux/mfd/intel_soc_pmic.h
@@ -0,0 +1,30 @@
1/*
2 * intel_soc_pmic.h - Intel SoC PMIC Driver
3 *
4 * Copyright (C) 2012-2014 Intel Corporation. All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License version
8 * 2 as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * Author: Yang, Bin <bin.yang@intel.com>
16 * Author: Zhu, Lejun <lejun.zhu@linux.intel.com>
17 */
18
19#ifndef __INTEL_SOC_PMIC_H__
20#define __INTEL_SOC_PMIC_H__
21
22#include <linux/regmap.h>
23
24struct intel_soc_pmic {
25 int irq;
26 struct regmap *regmap;
27 struct regmap_irq_chip_data *irq_chip_data;
28};
29
30#endif /* __INTEL_SOC_PMIC_H__ */
diff --git a/include/linux/mfd/max77686-private.h b/include/linux/mfd/max77686-private.h
index 8c75a9c8dfab..960b92ad450d 100644
--- a/include/linux/mfd/max77686-private.h
+++ b/include/linux/mfd/max77686-private.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * max77686-private.h - Voltage regulator driver for the Maxim 77686 2 * max77686-private.h - Voltage regulator driver for the Maxim 77686/802
3 * 3 *
4 * Copyright (C) 2012 Samsung Electrnoics 4 * Copyright (C) 2012 Samsung Electrnoics
5 * Chiwoong Byun <woong.byun@samsung.com> 5 * Chiwoong Byun <woong.byun@samsung.com>
@@ -28,6 +28,7 @@
28 28
29#define MAX77686_REG_INVALID (0xff) 29#define MAX77686_REG_INVALID (0xff)
30 30
31/* MAX77686 PMIC registers */
31enum max77686_pmic_reg { 32enum max77686_pmic_reg {
32 MAX77686_REG_DEVICE_ID = 0x00, 33 MAX77686_REG_DEVICE_ID = 0x00,
33 MAX77686_REG_INTSRC = 0x01, 34 MAX77686_REG_INTSRC = 0x01,
@@ -181,8 +182,209 @@ enum max77686_rtc_reg {
181 MAX77686_ALARM2_DATE = 0x1B, 182 MAX77686_ALARM2_DATE = 0x1B,
182}; 183};
183 184
184#define MAX77686_IRQSRC_PMIC (0) 185/* MAX77802 PMIC registers */
185#define MAX77686_IRQSRC_RTC (1 << 0) 186enum max77802_pmic_reg {
187 MAX77802_REG_DEVICE_ID = 0x00,
188 MAX77802_REG_INTSRC = 0x01,
189 MAX77802_REG_INT1 = 0x02,
190 MAX77802_REG_INT2 = 0x03,
191
192 MAX77802_REG_INT1MSK = 0x04,
193 MAX77802_REG_INT2MSK = 0x05,
194
195 MAX77802_REG_STATUS1 = 0x06,
196 MAX77802_REG_STATUS2 = 0x07,
197
198 MAX77802_REG_PWRON = 0x08,
199 /* Reserved: 0x09 */
200 MAX77802_REG_MRSTB = 0x0A,
201 MAX77802_REG_EPWRHOLD = 0x0B,
202 /* Reserved: 0x0C-0x0D */
203 MAX77802_REG_BOOSTCTRL = 0x0E,
204 MAX77802_REG_BOOSTOUT = 0x0F,
205
206 MAX77802_REG_BUCK1CTRL = 0x10,
207 MAX77802_REG_BUCK1DVS1 = 0x11,
208 MAX77802_REG_BUCK1DVS2 = 0x12,
209 MAX77802_REG_BUCK1DVS3 = 0x13,
210 MAX77802_REG_BUCK1DVS4 = 0x14,
211 MAX77802_REG_BUCK1DVS5 = 0x15,
212 MAX77802_REG_BUCK1DVS6 = 0x16,
213 MAX77802_REG_BUCK1DVS7 = 0x17,
214 MAX77802_REG_BUCK1DVS8 = 0x18,
215 /* Reserved: 0x19 */
216 MAX77802_REG_BUCK2CTRL1 = 0x1A,
217 MAX77802_REG_BUCK2CTRL2 = 0x1B,
218 MAX77802_REG_BUCK2PHTRAN = 0x1C,
219 MAX77802_REG_BUCK2DVS1 = 0x1D,
220 MAX77802_REG_BUCK2DVS2 = 0x1E,
221 MAX77802_REG_BUCK2DVS3 = 0x1F,
222 MAX77802_REG_BUCK2DVS4 = 0x20,
223 MAX77802_REG_BUCK2DVS5 = 0x21,
224 MAX77802_REG_BUCK2DVS6 = 0x22,
225 MAX77802_REG_BUCK2DVS7 = 0x23,
226 MAX77802_REG_BUCK2DVS8 = 0x24,
227 /* Reserved: 0x25-0x26 */
228 MAX77802_REG_BUCK3CTRL1 = 0x27,
229 MAX77802_REG_BUCK3DVS1 = 0x28,
230 MAX77802_REG_BUCK3DVS2 = 0x29,
231 MAX77802_REG_BUCK3DVS3 = 0x2A,
232 MAX77802_REG_BUCK3DVS4 = 0x2B,
233 MAX77802_REG_BUCK3DVS5 = 0x2C,
234 MAX77802_REG_BUCK3DVS6 = 0x2D,
235 MAX77802_REG_BUCK3DVS7 = 0x2E,
236 MAX77802_REG_BUCK3DVS8 = 0x2F,
237 /* Reserved: 0x30-0x36 */
238 MAX77802_REG_BUCK4CTRL1 = 0x37,
239 MAX77802_REG_BUCK4DVS1 = 0x38,
240 MAX77802_REG_BUCK4DVS2 = 0x39,
241 MAX77802_REG_BUCK4DVS3 = 0x3A,
242 MAX77802_REG_BUCK4DVS4 = 0x3B,
243 MAX77802_REG_BUCK4DVS5 = 0x3C,
244 MAX77802_REG_BUCK4DVS6 = 0x3D,
245 MAX77802_REG_BUCK4DVS7 = 0x3E,
246 MAX77802_REG_BUCK4DVS8 = 0x3F,
247 /* Reserved: 0x40 */
248 MAX77802_REG_BUCK5CTRL = 0x41,
249 MAX77802_REG_BUCK5OUT = 0x42,
250 /* Reserved: 0x43 */
251 MAX77802_REG_BUCK6CTRL = 0x44,
252 MAX77802_REG_BUCK6DVS1 = 0x45,
253 MAX77802_REG_BUCK6DVS2 = 0x46,
254 MAX77802_REG_BUCK6DVS3 = 0x47,
255 MAX77802_REG_BUCK6DVS4 = 0x48,
256 MAX77802_REG_BUCK6DVS5 = 0x49,
257 MAX77802_REG_BUCK6DVS6 = 0x4A,
258 MAX77802_REG_BUCK6DVS7 = 0x4B,
259 MAX77802_REG_BUCK6DVS8 = 0x4C,
260 /* Reserved: 0x4D */
261 MAX77802_REG_BUCK7CTRL = 0x4E,
262 MAX77802_REG_BUCK7OUT = 0x4F,
263 /* Reserved: 0x50 */
264 MAX77802_REG_BUCK8CTRL = 0x51,
265 MAX77802_REG_BUCK8OUT = 0x52,
266 /* Reserved: 0x53 */
267 MAX77802_REG_BUCK9CTRL = 0x54,
268 MAX77802_REG_BUCK9OUT = 0x55,
269 /* Reserved: 0x56 */
270 MAX77802_REG_BUCK10CTRL = 0x57,
271 MAX77802_REG_BUCK10OUT = 0x58,
272
273 /* Reserved: 0x59-0x5F */
274
275 MAX77802_REG_LDO1CTRL1 = 0x60,
276 MAX77802_REG_LDO2CTRL1 = 0x61,
277 MAX77802_REG_LDO3CTRL1 = 0x62,
278 MAX77802_REG_LDO4CTRL1 = 0x63,
279 MAX77802_REG_LDO5CTRL1 = 0x64,
280 MAX77802_REG_LDO6CTRL1 = 0x65,
281 MAX77802_REG_LDO7CTRL1 = 0x66,
282 MAX77802_REG_LDO8CTRL1 = 0x67,
283 MAX77802_REG_LDO9CTRL1 = 0x68,
284 MAX77802_REG_LDO10CTRL1 = 0x69,
285 MAX77802_REG_LDO11CTRL1 = 0x6A,
286 MAX77802_REG_LDO12CTRL1 = 0x6B,
287 MAX77802_REG_LDO13CTRL1 = 0x6C,
288 MAX77802_REG_LDO14CTRL1 = 0x6D,
289 MAX77802_REG_LDO15CTRL1 = 0x6E,
290 /* Reserved: 0x6F */
291 MAX77802_REG_LDO17CTRL1 = 0x70,
292 MAX77802_REG_LDO18CTRL1 = 0x71,
293 MAX77802_REG_LDO19CTRL1 = 0x72,
294 MAX77802_REG_LDO20CTRL1 = 0x73,
295 MAX77802_REG_LDO21CTRL1 = 0x74,
296 MAX77802_REG_LDO22CTRL1 = 0x75,
297 MAX77802_REG_LDO23CTRL1 = 0x76,
298 MAX77802_REG_LDO24CTRL1 = 0x77,
299 MAX77802_REG_LDO25CTRL1 = 0x78,
300 MAX77802_REG_LDO26CTRL1 = 0x79,
301 MAX77802_REG_LDO27CTRL1 = 0x7A,
302 MAX77802_REG_LDO28CTRL1 = 0x7B,
303 MAX77802_REG_LDO29CTRL1 = 0x7C,
304 MAX77802_REG_LDO30CTRL1 = 0x7D,
305 /* Reserved: 0x7E */
306 MAX77802_REG_LDO32CTRL1 = 0x7F,
307 MAX77802_REG_LDO33CTRL1 = 0x80,
308 MAX77802_REG_LDO34CTRL1 = 0x81,
309 MAX77802_REG_LDO35CTRL1 = 0x82,
310 /* Reserved: 0x83-0x8F */
311 MAX77802_REG_LDO1CTRL2 = 0x90,
312 MAX77802_REG_LDO2CTRL2 = 0x91,
313 MAX77802_REG_LDO3CTRL2 = 0x92,
314 MAX77802_REG_LDO4CTRL2 = 0x93,
315 MAX77802_REG_LDO5CTRL2 = 0x94,
316 MAX77802_REG_LDO6CTRL2 = 0x95,
317 MAX77802_REG_LDO7CTRL2 = 0x96,
318 MAX77802_REG_LDO8CTRL2 = 0x97,
319 MAX77802_REG_LDO9CTRL2 = 0x98,
320 MAX77802_REG_LDO10CTRL2 = 0x99,
321 MAX77802_REG_LDO11CTRL2 = 0x9A,
322 MAX77802_REG_LDO12CTRL2 = 0x9B,
323 MAX77802_REG_LDO13CTRL2 = 0x9C,
324 MAX77802_REG_LDO14CTRL2 = 0x9D,
325 MAX77802_REG_LDO15CTRL2 = 0x9E,
326 /* Reserved: 0x9F */
327 MAX77802_REG_LDO17CTRL2 = 0xA0,
328 MAX77802_REG_LDO18CTRL2 = 0xA1,
329 MAX77802_REG_LDO19CTRL2 = 0xA2,
330 MAX77802_REG_LDO20CTRL2 = 0xA3,
331 MAX77802_REG_LDO21CTRL2 = 0xA4,
332 MAX77802_REG_LDO22CTRL2 = 0xA5,
333 MAX77802_REG_LDO23CTRL2 = 0xA6,
334 MAX77802_REG_LDO24CTRL2 = 0xA7,
335 MAX77802_REG_LDO25CTRL2 = 0xA8,
336 MAX77802_REG_LDO26CTRL2 = 0xA9,
337 MAX77802_REG_LDO27CTRL2 = 0xAA,
338 MAX77802_REG_LDO28CTRL2 = 0xAB,
339 MAX77802_REG_LDO29CTRL2 = 0xAC,
340 MAX77802_REG_LDO30CTRL2 = 0xAD,
341 /* Reserved: 0xAE */
342 MAX77802_REG_LDO32CTRL2 = 0xAF,
343 MAX77802_REG_LDO33CTRL2 = 0xB0,
344 MAX77802_REG_LDO34CTRL2 = 0xB1,
345 MAX77802_REG_LDO35CTRL2 = 0xB2,
346 /* Reserved: 0xB3 */
347
348 MAX77802_REG_BBAT_CHG = 0xB4,
349 MAX77802_REG_32KHZ = 0xB5,
350
351 MAX77802_REG_PMIC_END = 0xB6,
352};
353
354enum max77802_rtc_reg {
355 MAX77802_RTC_INT = 0xC0,
356 MAX77802_RTC_INTM = 0xC1,
357 MAX77802_RTC_CONTROLM = 0xC2,
358 MAX77802_RTC_CONTROL = 0xC3,
359 MAX77802_RTC_UPDATE0 = 0xC4,
360 MAX77802_RTC_UPDATE1 = 0xC5,
361 MAX77802_WTSR_SMPL_CNTL = 0xC6,
362 MAX77802_RTC_SEC = 0xC7,
363 MAX77802_RTC_MIN = 0xC8,
364 MAX77802_RTC_HOUR = 0xC9,
365 MAX77802_RTC_WEEKDAY = 0xCA,
366 MAX77802_RTC_MONTH = 0xCB,
367 MAX77802_RTC_YEAR = 0xCC,
368 MAX77802_RTC_DATE = 0xCD,
369 MAX77802_RTC_AE1 = 0xCE,
370 MAX77802_ALARM1_SEC = 0xCF,
371 MAX77802_ALARM1_MIN = 0xD0,
372 MAX77802_ALARM1_HOUR = 0xD1,
373 MAX77802_ALARM1_WEEKDAY = 0xD2,
374 MAX77802_ALARM1_MONTH = 0xD3,
375 MAX77802_ALARM1_YEAR = 0xD4,
376 MAX77802_ALARM1_DATE = 0xD5,
377 MAX77802_RTC_AE2 = 0xD6,
378 MAX77802_ALARM2_SEC = 0xD7,
379 MAX77802_ALARM2_MIN = 0xD8,
380 MAX77802_ALARM2_HOUR = 0xD9,
381 MAX77802_ALARM2_WEEKDAY = 0xDA,
382 MAX77802_ALARM2_MONTH = 0xDB,
383 MAX77802_ALARM2_YEAR = 0xDC,
384 MAX77802_ALARM2_DATE = 0xDD,
385
386 MAX77802_RTC_END = 0xDF,
387};
186 388
187enum max77686_irq_source { 389enum max77686_irq_source {
188 PMIC_INT1 = 0, 390 PMIC_INT1 = 0,
@@ -205,30 +407,46 @@ enum max77686_irq {
205 MAX77686_PMICIRQ_140C, 407 MAX77686_PMICIRQ_140C,
206 MAX77686_PMICIRQ_120C, 408 MAX77686_PMICIRQ_120C,
207 409
208 MAX77686_RTCIRQ_RTC60S, 410 MAX77686_RTCIRQ_RTC60S = 0,
209 MAX77686_RTCIRQ_RTCA1, 411 MAX77686_RTCIRQ_RTCA1,
210 MAX77686_RTCIRQ_RTCA2, 412 MAX77686_RTCIRQ_RTCA2,
211 MAX77686_RTCIRQ_SMPL, 413 MAX77686_RTCIRQ_SMPL,
212 MAX77686_RTCIRQ_RTC1S, 414 MAX77686_RTCIRQ_RTC1S,
213 MAX77686_RTCIRQ_WTSR, 415 MAX77686_RTCIRQ_WTSR,
214
215 MAX77686_IRQ_NR,
216}; 416};
217 417
418#define MAX77686_INT1_PWRONF_MSK BIT(0)
419#define MAX77686_INT1_PWRONR_MSK BIT(1)
420#define MAX77686_INT1_JIGONBF_MSK BIT(2)
421#define MAX77686_INT1_JIGONBR_MSK BIT(3)
422#define MAX77686_INT1_ACOKBF_MSK BIT(4)
423#define MAX77686_INT1_ACOKBR_MSK BIT(5)
424#define MAX77686_INT1_ONKEY1S_MSK BIT(6)
425#define MAX77686_INT1_MRSTB_MSK BIT(7)
426
427#define MAX77686_INT2_140C_MSK BIT(0)
428#define MAX77686_INT2_120C_MSK BIT(1)
429
430#define MAX77686_RTCINT_RTC60S_MSK BIT(0)
431#define MAX77686_RTCINT_RTCA1_MSK BIT(1)
432#define MAX77686_RTCINT_RTCA2_MSK BIT(2)
433#define MAX77686_RTCINT_SMPL_MSK BIT(3)
434#define MAX77686_RTCINT_RTC1S_MSK BIT(4)
435#define MAX77686_RTCINT_WTSR_MSK BIT(5)
436
218struct max77686_dev { 437struct max77686_dev {
219 struct device *dev; 438 struct device *dev;
220 struct i2c_client *i2c; /* 0xcc / PMIC, Battery Control, and FLASH */ 439 struct i2c_client *i2c; /* 0xcc / PMIC, Battery Control, and FLASH */
221 struct i2c_client *rtc; /* slave addr 0x0c */ 440 struct i2c_client *rtc; /* slave addr 0x0c */
222 441
223 int type; 442 unsigned long type;
224 443
225 struct regmap *regmap; /* regmap for mfd */ 444 struct regmap *regmap; /* regmap for mfd */
226 struct regmap *rtc_regmap; /* regmap for rtc */ 445 struct regmap *rtc_regmap; /* regmap for rtc */
227 446 struct regmap_irq_chip_data *irq_data;
228 struct irq_domain *irq_domain; 447 struct regmap_irq_chip_data *rtc_irq_data;
229 448
230 int irq; 449 int irq;
231 int irq_gpio;
232 bool wakeup; 450 bool wakeup;
233 struct mutex irqlock; 451 struct mutex irqlock;
234 int irq_masks_cur[MAX77686_IRQ_GROUP_NR]; 452 int irq_masks_cur[MAX77686_IRQ_GROUP_NR];
@@ -237,6 +455,7 @@ struct max77686_dev {
237 455
238enum max77686_types { 456enum max77686_types {
239 TYPE_MAX77686, 457 TYPE_MAX77686,
458 TYPE_MAX77802,
240}; 459};
241 460
242extern int max77686_irq_init(struct max77686_dev *max77686); 461extern int max77686_irq_init(struct max77686_dev *max77686);
diff --git a/include/linux/mfd/max77686.h b/include/linux/mfd/max77686.h
index 46c0f320ed76..7e6dc4b2b795 100644
--- a/include/linux/mfd/max77686.h
+++ b/include/linux/mfd/max77686.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * max77686.h - Driver for the Maxim 77686 2 * max77686.h - Driver for the Maxim 77686/802
3 * 3 *
4 * Copyright (C) 2012 Samsung Electrnoics 4 * Copyright (C) 2012 Samsung Electrnoics
5 * Chiwoong Byun <woong.byun@samsung.com> 5 * Chiwoong Byun <woong.byun@samsung.com>
@@ -71,6 +71,54 @@ enum max77686_regulators {
71 MAX77686_REG_MAX, 71 MAX77686_REG_MAX,
72}; 72};
73 73
74/* MAX77802 regulator IDs */
75enum max77802_regulators {
76 MAX77802_BUCK1 = 0,
77 MAX77802_BUCK2,
78 MAX77802_BUCK3,
79 MAX77802_BUCK4,
80 MAX77802_BUCK5,
81 MAX77802_BUCK6,
82 MAX77802_BUCK7,
83 MAX77802_BUCK8,
84 MAX77802_BUCK9,
85 MAX77802_BUCK10,
86 MAX77802_LDO1,
87 MAX77802_LDO2,
88 MAX77802_LDO3,
89 MAX77802_LDO4,
90 MAX77802_LDO5,
91 MAX77802_LDO6,
92 MAX77802_LDO7,
93 MAX77802_LDO8,
94 MAX77802_LDO9,
95 MAX77802_LDO10,
96 MAX77802_LDO11,
97 MAX77802_LDO12,
98 MAX77802_LDO13,
99 MAX77802_LDO14,
100 MAX77802_LDO15,
101 MAX77802_LDO17,
102 MAX77802_LDO18,
103 MAX77802_LDO19,
104 MAX77802_LDO20,
105 MAX77802_LDO21,
106 MAX77802_LDO23,
107 MAX77802_LDO24,
108 MAX77802_LDO25,
109 MAX77802_LDO26,
110 MAX77802_LDO27,
111 MAX77802_LDO28,
112 MAX77802_LDO29,
113 MAX77802_LDO30,
114 MAX77802_LDO32,
115 MAX77802_LDO33,
116 MAX77802_LDO34,
117 MAX77802_LDO35,
118
119 MAX77802_REG_MAX,
120};
121
74struct max77686_regulator_data { 122struct max77686_regulator_data {
75 int id; 123 int id;
76 struct regulator_init_data *initdata; 124 struct regulator_init_data *initdata;
@@ -83,14 +131,19 @@ enum max77686_opmode {
83 MAX77686_OPMODE_STANDBY, 131 MAX77686_OPMODE_STANDBY,
84}; 132};
85 133
134enum max77802_opmode {
135 MAX77802_OPMODE_OFF,
136 MAX77802_OPMODE_STANDBY,
137 MAX77802_OPMODE_LP,
138 MAX77802_OPMODE_NORMAL,
139};
140
86struct max77686_opmode_data { 141struct max77686_opmode_data {
87 int id; 142 int id;
88 int mode; 143 int mode;
89}; 144};
90 145
91struct max77686_platform_data { 146struct max77686_platform_data {
92 /* IRQ */
93 int irq_gpio;
94 int ono; 147 int ono;
95 int wakeup; 148 int wakeup;
96 149
diff --git a/include/linux/mfd/mc13783.h b/include/linux/mfd/mc13783.h
index a8eeda773a7b..4ff6137d8d67 100644
--- a/include/linux/mfd/mc13783.h
+++ b/include/linux/mfd/mc13783.h
@@ -86,6 +86,5 @@
86#define MC13783_IRQ_HSL 43 86#define MC13783_IRQ_HSL 43
87#define MC13783_IRQ_ALSPTH 44 87#define MC13783_IRQ_ALSPTH 44
88#define MC13783_IRQ_AHSSHORT 45 88#define MC13783_IRQ_AHSSHORT 45
89#define MC13783_NUM_IRQ MC13XXX_NUM_IRQ
90 89
91#endif /* ifndef __LINUX_MFD_MC13783_H */ 90#endif /* ifndef __LINUX_MFD_MC13783_H */
diff --git a/include/linux/mfd/mc13xxx.h b/include/linux/mfd/mc13xxx.h
index d63b1d309106..638222e43e48 100644
--- a/include/linux/mfd/mc13xxx.h
+++ b/include/linux/mfd/mc13xxx.h
@@ -23,15 +23,10 @@ int mc13xxx_reg_rmw(struct mc13xxx *mc13xxx, unsigned int offset,
23 23
24int mc13xxx_irq_request(struct mc13xxx *mc13xxx, int irq, 24int mc13xxx_irq_request(struct mc13xxx *mc13xxx, int irq,
25 irq_handler_t handler, const char *name, void *dev); 25 irq_handler_t handler, const char *name, void *dev);
26int mc13xxx_irq_request_nounmask(struct mc13xxx *mc13xxx, int irq,
27 irq_handler_t handler, const char *name, void *dev);
28int mc13xxx_irq_free(struct mc13xxx *mc13xxx, int irq, void *dev); 26int mc13xxx_irq_free(struct mc13xxx *mc13xxx, int irq, void *dev);
29 27
30int mc13xxx_irq_mask(struct mc13xxx *mc13xxx, int irq);
31int mc13xxx_irq_unmask(struct mc13xxx *mc13xxx, int irq);
32int mc13xxx_irq_status(struct mc13xxx *mc13xxx, int irq, 28int mc13xxx_irq_status(struct mc13xxx *mc13xxx, int irq,
33 int *enabled, int *pending); 29 int *enabled, int *pending);
34int mc13xxx_irq_ack(struct mc13xxx *mc13xxx, int irq);
35 30
36int mc13xxx_get_flags(struct mc13xxx *mc13xxx); 31int mc13xxx_get_flags(struct mc13xxx *mc13xxx);
37 32
@@ -39,6 +34,22 @@ int mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx,
39 unsigned int mode, unsigned int channel, 34 unsigned int mode, unsigned int channel,
40 u8 ato, bool atox, unsigned int *sample); 35 u8 ato, bool atox, unsigned int *sample);
41 36
37/* Deprecated calls */
38static inline int mc13xxx_irq_ack(struct mc13xxx *mc13xxx, int irq)
39{
40 return 0;
41}
42
43static inline int mc13xxx_irq_request_nounmask(struct mc13xxx *mc13xxx, int irq,
44 irq_handler_t handler,
45 const char *name, void *dev)
46{
47 return mc13xxx_irq_request(mc13xxx, irq, handler, name, dev);
48}
49
50int mc13xxx_irq_mask(struct mc13xxx *mc13xxx, int irq);
51int mc13xxx_irq_unmask(struct mc13xxx *mc13xxx, int irq);
52
42#define MC13783_AUDIO_RX0 36 53#define MC13783_AUDIO_RX0 36
43#define MC13783_AUDIO_RX1 37 54#define MC13783_AUDIO_RX1 37
44#define MC13783_AUDIO_TX 38 55#define MC13783_AUDIO_TX 38
@@ -68,8 +79,6 @@ int mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx,
68#define MC13XXX_IRQ_THWARNH 37 79#define MC13XXX_IRQ_THWARNH 37
69#define MC13XXX_IRQ_CLK 38 80#define MC13XXX_IRQ_CLK 38
70 81
71#define MC13XXX_NUM_IRQ 46
72
73struct regulator_init_data; 82struct regulator_init_data;
74 83
75struct mc13xxx_regulator_init_data { 84struct mc13xxx_regulator_init_data {
diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h
index a3835976f7c6..74346d5e7899 100644
--- a/include/linux/mfd/rtsx_pci.h
+++ b/include/linux/mfd/rtsx_pci.h
@@ -943,6 +943,12 @@ void rtsx_pci_send_cmd_no_wait(struct rtsx_pcr *pcr);
943int rtsx_pci_send_cmd(struct rtsx_pcr *pcr, int timeout); 943int rtsx_pci_send_cmd(struct rtsx_pcr *pcr, int timeout);
944int rtsx_pci_transfer_data(struct rtsx_pcr *pcr, struct scatterlist *sglist, 944int rtsx_pci_transfer_data(struct rtsx_pcr *pcr, struct scatterlist *sglist,
945 int num_sg, bool read, int timeout); 945 int num_sg, bool read, int timeout);
946int rtsx_pci_dma_map_sg(struct rtsx_pcr *pcr, struct scatterlist *sglist,
947 int num_sg, bool read);
948void rtsx_pci_dma_unmap_sg(struct rtsx_pcr *pcr, struct scatterlist *sglist,
949 int num_sg, bool read);
950int rtsx_pci_dma_transfer(struct rtsx_pcr *pcr, struct scatterlist *sglist,
951 int count, bool read, int timeout);
946int rtsx_pci_read_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len); 952int rtsx_pci_read_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len);
947int rtsx_pci_write_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len); 953int rtsx_pci_write_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len);
948int rtsx_pci_card_pull_ctl_enable(struct rtsx_pcr *pcr, int card); 954int rtsx_pci_card_pull_ctl_enable(struct rtsx_pcr *pcr, int card);
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h
index 47d84242940b..b5f73de81aad 100644
--- a/include/linux/mfd/samsung/core.h
+++ b/include/linux/mfd/samsung/core.h
@@ -21,6 +21,7 @@ enum sec_device_type {
21 S2MPA01, 21 S2MPA01,
22 S2MPS11X, 22 S2MPS11X,
23 S2MPS14X, 23 S2MPS14X,
24 S2MPU02,
24}; 25};
25 26
26/** 27/**
diff --git a/include/linux/mfd/samsung/irq.h b/include/linux/mfd/samsung/irq.h
index 1224f447356b..f35af7361b60 100644
--- a/include/linux/mfd/samsung/irq.h
+++ b/include/linux/mfd/samsung/irq.h
@@ -129,6 +129,30 @@ enum s2mps14_irq {
129 S2MPS14_IRQ_NR, 129 S2MPS14_IRQ_NR,
130}; 130};
131 131
132enum s2mpu02_irq {
133 S2MPU02_IRQ_PWRONF,
134 S2MPU02_IRQ_PWRONR,
135 S2MPU02_IRQ_JIGONBF,
136 S2MPU02_IRQ_JIGONBR,
137 S2MPU02_IRQ_ACOKBF,
138 S2MPU02_IRQ_ACOKBR,
139 S2MPU02_IRQ_PWRON1S,
140 S2MPU02_IRQ_MRB,
141
142 S2MPU02_IRQ_RTC60S,
143 S2MPU02_IRQ_RTCA1,
144 S2MPU02_IRQ_RTCA0,
145 S2MPU02_IRQ_SMPL,
146 S2MPU02_IRQ_RTC1S,
147 S2MPU02_IRQ_WTSR,
148
149 S2MPU02_IRQ_INT120C,
150 S2MPU02_IRQ_INT140C,
151 S2MPU02_IRQ_TSD,
152
153 S2MPU02_IRQ_NR,
154};
155
132/* Masks for interrupts are the same as in s2mps11 */ 156/* Masks for interrupts are the same as in s2mps11 */
133#define S2MPS14_IRQ_TSD_MASK (1 << 2) 157#define S2MPS14_IRQ_TSD_MASK (1 << 2)
134 158
diff --git a/include/linux/mfd/samsung/s2mpu02.h b/include/linux/mfd/samsung/s2mpu02.h
new file mode 100644
index 000000000000..47ae9bc583a7
--- /dev/null
+++ b/include/linux/mfd/samsung/s2mpu02.h
@@ -0,0 +1,201 @@
1/*
2 * s2mpu02.h
3 *
4 * Copyright (c) 2014 Samsung Electronics Co., Ltd
5 * http://www.samsung.com
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 */
18
19#ifndef __LINUX_MFD_S2MPU02_H
20#define __LINUX_MFD_S2MPU02_H
21
22/* S2MPU02 registers */
23enum S2MPU02_reg {
24 S2MPU02_REG_ID,
25 S2MPU02_REG_INT1,
26 S2MPU02_REG_INT2,
27 S2MPU02_REG_INT3,
28 S2MPU02_REG_INT1M,
29 S2MPU02_REG_INT2M,
30 S2MPU02_REG_INT3M,
31 S2MPU02_REG_ST1,
32 S2MPU02_REG_ST2,
33 S2MPU02_REG_PWRONSRC,
34 S2MPU02_REG_OFFSRC,
35 S2MPU02_REG_BU_CHG,
36 S2MPU02_REG_RTCCTRL,
37 S2MPU02_REG_PMCTRL1,
38 S2MPU02_REG_RSVD1,
39 S2MPU02_REG_RSVD2,
40 S2MPU02_REG_RSVD3,
41 S2MPU02_REG_RSVD4,
42 S2MPU02_REG_RSVD5,
43 S2MPU02_REG_RSVD6,
44 S2MPU02_REG_RSVD7,
45 S2MPU02_REG_WRSTEN,
46 S2MPU02_REG_RSVD8,
47 S2MPU02_REG_RSVD9,
48 S2MPU02_REG_RSVD10,
49 S2MPU02_REG_B1CTRL1,
50 S2MPU02_REG_B1CTRL2,
51 S2MPU02_REG_B2CTRL1,
52 S2MPU02_REG_B2CTRL2,
53 S2MPU02_REG_B3CTRL1,
54 S2MPU02_REG_B3CTRL2,
55 S2MPU02_REG_B4CTRL1,
56 S2MPU02_REG_B4CTRL2,
57 S2MPU02_REG_B5CTRL1,
58 S2MPU02_REG_B5CTRL2,
59 S2MPU02_REG_B5CTRL3,
60 S2MPU02_REG_B5CTRL4,
61 S2MPU02_REG_B5CTRL5,
62 S2MPU02_REG_B6CTRL1,
63 S2MPU02_REG_B6CTRL2,
64 S2MPU02_REG_B7CTRL1,
65 S2MPU02_REG_B7CTRL2,
66 S2MPU02_REG_RAMP1,
67 S2MPU02_REG_RAMP2,
68 S2MPU02_REG_L1CTRL,
69 S2MPU02_REG_L2CTRL1,
70 S2MPU02_REG_L2CTRL2,
71 S2MPU02_REG_L2CTRL3,
72 S2MPU02_REG_L2CTRL4,
73 S2MPU02_REG_L3CTRL,
74 S2MPU02_REG_L4CTRL,
75 S2MPU02_REG_L5CTRL,
76 S2MPU02_REG_L6CTRL,
77 S2MPU02_REG_L7CTRL,
78 S2MPU02_REG_L8CTRL,
79 S2MPU02_REG_L9CTRL,
80 S2MPU02_REG_L10CTRL,
81 S2MPU02_REG_L11CTRL,
82 S2MPU02_REG_L12CTRL,
83 S2MPU02_REG_L13CTRL,
84 S2MPU02_REG_L14CTRL,
85 S2MPU02_REG_L15CTRL,
86 S2MPU02_REG_L16CTRL,
87 S2MPU02_REG_L17CTRL,
88 S2MPU02_REG_L18CTRL,
89 S2MPU02_REG_L19CTRL,
90 S2MPU02_REG_L20CTRL,
91 S2MPU02_REG_L21CTRL,
92 S2MPU02_REG_L22CTRL,
93 S2MPU02_REG_L23CTRL,
94 S2MPU02_REG_L24CTRL,
95 S2MPU02_REG_L25CTRL,
96 S2MPU02_REG_L26CTRL,
97 S2MPU02_REG_L27CTRL,
98 S2MPU02_REG_L28CTRL,
99 S2MPU02_REG_LDODSCH1,
100 S2MPU02_REG_LDODSCH2,
101 S2MPU02_REG_LDODSCH3,
102 S2MPU02_REG_LDODSCH4,
103 S2MPU02_REG_SELMIF,
104 S2MPU02_REG_RSVD11,
105 S2MPU02_REG_RSVD12,
106 S2MPU02_REG_RSVD13,
107 S2MPU02_REG_DVSSEL,
108 S2MPU02_REG_DVSPTR,
109 S2MPU02_REG_DVSDATA,
110};
111
112/* S2MPU02 regulator ids */
113enum S2MPU02_regulators {
114 S2MPU02_LDO1,
115 S2MPU02_LDO2,
116 S2MPU02_LDO3,
117 S2MPU02_LDO4,
118 S2MPU02_LDO5,
119 S2MPU02_LDO6,
120 S2MPU02_LDO7,
121 S2MPU02_LDO8,
122 S2MPU02_LDO9,
123 S2MPU02_LDO10,
124 S2MPU02_LDO11,
125 S2MPU02_LDO12,
126 S2MPU02_LDO13,
127 S2MPU02_LDO14,
128 S2MPU02_LDO15,
129 S2MPU02_LDO16,
130 S2MPU02_LDO17,
131 S2MPU02_LDO18,
132 S2MPU02_LDO19,
133 S2MPU02_LDO20,
134 S2MPU02_LDO21,
135 S2MPU02_LDO22,
136 S2MPU02_LDO23,
137 S2MPU02_LDO24,
138 S2MPU02_LDO25,
139 S2MPU02_LDO26,
140 S2MPU02_LDO27,
141 S2MPU02_LDO28,
142 S2MPU02_BUCK1,
143 S2MPU02_BUCK2,
144 S2MPU02_BUCK3,
145 S2MPU02_BUCK4,
146 S2MPU02_BUCK5,
147 S2MPU02_BUCK6,
148 S2MPU02_BUCK7,
149
150 S2MPU02_REGULATOR_MAX,
151};
152
153/* Regulator constraints for BUCKx */
154#define S2MPU02_BUCK1234_MIN_600MV 600000
155#define S2MPU02_BUCK5_MIN_1081_25MV 1081250
156#define S2MPU02_BUCK6_MIN_1700MV 1700000
157#define S2MPU02_BUCK7_MIN_900MV 900000
158
159#define S2MPU02_BUCK1234_STEP_6_25MV 6250
160#define S2MPU02_BUCK5_STEP_6_25MV 6250
161#define S2MPU02_BUCK6_STEP_2_50MV 2500
162#define S2MPU02_BUCK7_STEP_6_25MV 6250
163
164#define S2MPU02_BUCK1234_START_SEL 0x00
165#define S2MPU02_BUCK5_START_SEL 0x4D
166#define S2MPU02_BUCK6_START_SEL 0x28
167#define S2MPU02_BUCK7_START_SEL 0x30
168
169#define S2MPU02_BUCK_RAMP_DELAY 12500
170
171/* Regulator constraints for different types of LDOx */
172#define S2MPU02_LDO_MIN_900MV 900000
173#define S2MPU02_LDO_MIN_1050MV 1050000
174#define S2MPU02_LDO_MIN_1600MV 1600000
175#define S2MPU02_LDO_STEP_12_5MV 12500
176#define S2MPU02_LDO_STEP_25MV 25000
177#define S2MPU02_LDO_STEP_50MV 50000
178
179#define S2MPU02_LDO_GROUP1_START_SEL 0x8
180#define S2MPU02_LDO_GROUP2_START_SEL 0xA
181#define S2MPU02_LDO_GROUP3_START_SEL 0x10
182
183#define S2MPU02_LDO_VSEL_MASK 0x3F
184#define S2MPU02_BUCK_VSEL_MASK 0xFF
185#define S2MPU02_ENABLE_MASK (0x03 << S2MPU02_ENABLE_SHIFT)
186#define S2MPU02_ENABLE_SHIFT 6
187
188/* On/Off controlled by PWREN */
189#define S2MPU02_ENABLE_SUSPEND (0x01 << S2MPU02_ENABLE_SHIFT)
190#define S2MPU02_DISABLE_SUSPEND (0x11 << S2MPU02_ENABLE_SHIFT)
191#define S2MPU02_LDO_N_VOLTAGES (S2MPU02_LDO_VSEL_MASK + 1)
192#define S2MPU02_BUCK_N_VOLTAGES (S2MPU02_BUCK_VSEL_MASK + 1)
193
194/* RAMP delay for BUCK1234*/
195#define S2MPU02_BUCK1_RAMP_SHIFT 6
196#define S2MPU02_BUCK2_RAMP_SHIFT 4
197#define S2MPU02_BUCK3_RAMP_SHIFT 2
198#define S2MPU02_BUCK4_RAMP_SHIFT 0
199#define S2MPU02_BUCK1234_RAMP_MASK 0x3
200
201#endif /* __LINUX_MFD_S2MPU02_H */
diff --git a/include/linux/mfd/tps65910.h b/include/linux/mfd/tps65910.h
index 16c2335c2856..6483a6fdce59 100644
--- a/include/linux/mfd/tps65910.h
+++ b/include/linux/mfd/tps65910.h
@@ -892,7 +892,7 @@ struct tps65910 {
892 struct device *dev; 892 struct device *dev;
893 struct i2c_client *i2c_client; 893 struct i2c_client *i2c_client;
894 struct regmap *regmap; 894 struct regmap *regmap;
895 unsigned int id; 895 unsigned long id;
896 896
897 /* Client devices */ 897 /* Client devices */
898 struct tps65910_pmic *pmic; 898 struct tps65910_pmic *pmic;
diff --git a/include/linux/mlx4/cmd.h b/include/linux/mlx4/cmd.h
index c8450366c130..379c02648ab3 100644
--- a/include/linux/mlx4/cmd.h
+++ b/include/linux/mlx4/cmd.h
@@ -116,6 +116,7 @@ enum {
116 /* special QP and management commands */ 116 /* special QP and management commands */
117 MLX4_CMD_CONF_SPECIAL_QP = 0x23, 117 MLX4_CMD_CONF_SPECIAL_QP = 0x23,
118 MLX4_CMD_MAD_IFC = 0x24, 118 MLX4_CMD_MAD_IFC = 0x24,
119 MLX4_CMD_MAD_DEMUX = 0x203,
119 120
120 /* multicast commands */ 121 /* multicast commands */
121 MLX4_CMD_READ_MCG = 0x25, 122 MLX4_CMD_READ_MCG = 0x25,
@@ -186,6 +187,12 @@ enum {
186}; 187};
187 188
188enum { 189enum {
190 MLX4_CMD_MAD_DEMUX_CONFIG = 0,
191 MLX4_CMD_MAD_DEMUX_QUERY_STATE = 1,
192 MLX4_CMD_MAD_DEMUX_QUERY_RESTR = 2, /* Query mad demux restrictions */
193};
194
195enum {
189 MLX4_CMD_WRAPPED, 196 MLX4_CMD_WRAPPED,
190 MLX4_CMD_NATIVE 197 MLX4_CMD_NATIVE
191}; 198};
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index e15b1544ea83..071f6b234604 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -183,6 +183,7 @@ enum {
183 MLX4_DEV_CAP_FLAG2_UPDATE_QP = 1LL << 8, 183 MLX4_DEV_CAP_FLAG2_UPDATE_QP = 1LL << 8,
184 MLX4_DEV_CAP_FLAG2_DMFS_IPOIB = 1LL << 9, 184 MLX4_DEV_CAP_FLAG2_DMFS_IPOIB = 1LL << 9,
185 MLX4_DEV_CAP_FLAG2_VXLAN_OFFLOADS = 1LL << 10, 185 MLX4_DEV_CAP_FLAG2_VXLAN_OFFLOADS = 1LL << 10,
186 MLX4_DEV_CAP_FLAG2_MAD_DEMUX = 1LL << 11,
186}; 187};
187 188
188enum { 189enum {
@@ -273,6 +274,7 @@ enum {
273 MLX4_PERM_REMOTE_WRITE = 1 << 13, 274 MLX4_PERM_REMOTE_WRITE = 1 << 13,
274 MLX4_PERM_ATOMIC = 1 << 14, 275 MLX4_PERM_ATOMIC = 1 << 14,
275 MLX4_PERM_BIND_MW = 1 << 15, 276 MLX4_PERM_BIND_MW = 1 << 15,
277 MLX4_PERM_MASK = 0xFC00
276}; 278};
277 279
278enum { 280enum {
@@ -1254,6 +1256,21 @@ int mlx4_vf_smi_enabled(struct mlx4_dev *dev, int slave, int port);
1254int mlx4_vf_get_enable_smi_admin(struct mlx4_dev *dev, int slave, int port); 1256int mlx4_vf_get_enable_smi_admin(struct mlx4_dev *dev, int slave, int port);
1255int mlx4_vf_set_enable_smi_admin(struct mlx4_dev *dev, int slave, int port, 1257int mlx4_vf_set_enable_smi_admin(struct mlx4_dev *dev, int slave, int port,
1256 int enable); 1258 int enable);
1259int mlx4_mr_hw_get_mpt(struct mlx4_dev *dev, struct mlx4_mr *mmr,
1260 struct mlx4_mpt_entry ***mpt_entry);
1261int mlx4_mr_hw_write_mpt(struct mlx4_dev *dev, struct mlx4_mr *mmr,
1262 struct mlx4_mpt_entry **mpt_entry);
1263int mlx4_mr_hw_change_pd(struct mlx4_dev *dev, struct mlx4_mpt_entry *mpt_entry,
1264 u32 pdn);
1265int mlx4_mr_hw_change_access(struct mlx4_dev *dev,
1266 struct mlx4_mpt_entry *mpt_entry,
1267 u32 access);
1268void mlx4_mr_hw_put_mpt(struct mlx4_dev *dev,
1269 struct mlx4_mpt_entry **mpt_entry);
1270void mlx4_mr_rereg_mem_cleanup(struct mlx4_dev *dev, struct mlx4_mr *mr);
1271int mlx4_mr_rereg_mem_write(struct mlx4_dev *dev, struct mlx4_mr *mr,
1272 u64 iova, u64 size, int npages,
1273 int page_shift, struct mlx4_mpt_entry *mpt_entry);
1257 1274
1258/* Returns true if running in low memory profile (kdump kernel) */ 1275/* Returns true if running in low memory profile (kdump kernel) */
1259static inline bool mlx4_low_memory_profile(void) 1276static inline bool mlx4_low_memory_profile(void)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index e03dd29145a0..8981cc882ed2 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -2014,13 +2014,20 @@ static inline bool kernel_page_present(struct page *page) { return true; }
2014#endif /* CONFIG_HIBERNATION */ 2014#endif /* CONFIG_HIBERNATION */
2015#endif 2015#endif
2016 2016
2017#ifdef __HAVE_ARCH_GATE_AREA
2017extern struct vm_area_struct *get_gate_vma(struct mm_struct *mm); 2018extern struct vm_area_struct *get_gate_vma(struct mm_struct *mm);
2018#ifdef __HAVE_ARCH_GATE_AREA 2019extern int in_gate_area_no_mm(unsigned long addr);
2019int in_gate_area_no_mm(unsigned long addr); 2020extern int in_gate_area(struct mm_struct *mm, unsigned long addr);
2020int in_gate_area(struct mm_struct *mm, unsigned long addr);
2021#else 2021#else
2022int in_gate_area_no_mm(unsigned long addr); 2022static inline struct vm_area_struct *get_gate_vma(struct mm_struct *mm)
2023#define in_gate_area(mm, addr) ({(void)mm; in_gate_area_no_mm(addr);}) 2023{
2024 return NULL;
2025}
2026static inline int in_gate_area_no_mm(unsigned long addr) { return 0; }
2027static inline int in_gate_area(struct mm_struct *mm, unsigned long addr)
2028{
2029 return 0;
2030}
2024#endif /* __HAVE_ARCH_GATE_AREA */ 2031#endif /* __HAVE_ARCH_GATE_AREA */
2025 2032
2026#ifdef CONFIG_SYSCTL 2033#ifdef CONFIG_SYSCTL
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 796deac19fcf..6e0b286649f1 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -461,6 +461,7 @@ static inline void mm_init_cpumask(struct mm_struct *mm)
461#ifdef CONFIG_CPUMASK_OFFSTACK 461#ifdef CONFIG_CPUMASK_OFFSTACK
462 mm->cpu_vm_mask_var = &mm->cpumask_allocation; 462 mm->cpu_vm_mask_var = &mm->cpumask_allocation;
463#endif 463#endif
464 cpumask_clear(mm->cpu_vm_mask_var);
464} 465}
465 466
466/* Future-safe accessor for struct mm_struct's cpu_vm_mask. */ 467/* Future-safe accessor for struct mm_struct's cpu_vm_mask. */
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
index babaea93bca6..29ce014ab421 100644
--- a/include/linux/mmc/dw_mmc.h
+++ b/include/linux/mmc/dw_mmc.h
@@ -213,6 +213,8 @@ struct dw_mci_dma_ops {
213#define DW_MCI_QUIRK_HIGHSPEED BIT(2) 213#define DW_MCI_QUIRK_HIGHSPEED BIT(2)
214/* Unreliable card detection */ 214/* Unreliable card detection */
215#define DW_MCI_QUIRK_BROKEN_CARD_DETECTION BIT(3) 215#define DW_MCI_QUIRK_BROKEN_CARD_DETECTION BIT(3)
216/* No write protect */
217#define DW_MCI_QUIRK_NO_WRITE_PROTECT BIT(4)
216 218
217/* Slot level quirks */ 219/* Slot level quirks */
218/* This slot has no write protect */ 220/* This slot has no write protect */
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h
index 08abe9941884..09ebe57d5ce9 100644
--- a/include/linux/mmc/sdhci.h
+++ b/include/linux/mmc/sdhci.h
@@ -104,9 +104,6 @@ struct sdhci_host {
104 104
105 const struct sdhci_ops *ops; /* Low level hw interface */ 105 const struct sdhci_ops *ops; /* Low level hw interface */
106 106
107 struct regulator *vmmc; /* Power regulator (vmmc) */
108 struct regulator *vqmmc; /* Signaling regulator (vccq) */
109
110 /* Internal data */ 107 /* Internal data */
111 struct mmc_host *mmc; /* MMC structure */ 108 struct mmc_host *mmc; /* MMC structure */
112 u64 dma_mask; /* custom DMA mask */ 109 u64 dma_mask; /* custom DMA mask */
diff --git a/include/linux/mmdebug.h b/include/linux/mmdebug.h
index edd82a105220..2f348d02f640 100644
--- a/include/linux/mmdebug.h
+++ b/include/linux/mmdebug.h
@@ -20,11 +20,13 @@ extern void dump_page_badflags(struct page *page, const char *reason,
20 } while (0) 20 } while (0)
21#define VM_WARN_ON(cond) WARN_ON(cond) 21#define VM_WARN_ON(cond) WARN_ON(cond)
22#define VM_WARN_ON_ONCE(cond) WARN_ON_ONCE(cond) 22#define VM_WARN_ON_ONCE(cond) WARN_ON_ONCE(cond)
23#define VM_WARN_ONCE(cond, format...) WARN_ONCE(cond, format)
23#else 24#else
24#define VM_BUG_ON(cond) BUILD_BUG_ON_INVALID(cond) 25#define VM_BUG_ON(cond) BUILD_BUG_ON_INVALID(cond)
25#define VM_BUG_ON_PAGE(cond, page) VM_BUG_ON(cond) 26#define VM_BUG_ON_PAGE(cond, page) VM_BUG_ON(cond)
26#define VM_WARN_ON(cond) BUILD_BUG_ON_INVALID(cond) 27#define VM_WARN_ON(cond) BUILD_BUG_ON_INVALID(cond)
27#define VM_WARN_ON_ONCE(cond) BUILD_BUG_ON_INVALID(cond) 28#define VM_WARN_ON_ONCE(cond) BUILD_BUG_ON_INVALID(cond)
29#define VM_WARN_ONCE(cond, format...) BUILD_BUG_ON_INVALID(cond)
28#endif 30#endif
29 31
30#ifdef CONFIG_DEBUG_VIRTUAL 32#ifdef CONFIG_DEBUG_VIRTUAL
diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h
index deca87452528..27288692241e 100644
--- a/include/linux/mmu_notifier.h
+++ b/include/linux/mmu_notifier.h
@@ -170,6 +170,8 @@ extern int __mmu_notifier_register(struct mmu_notifier *mn,
170 struct mm_struct *mm); 170 struct mm_struct *mm);
171extern void mmu_notifier_unregister(struct mmu_notifier *mn, 171extern void mmu_notifier_unregister(struct mmu_notifier *mn,
172 struct mm_struct *mm); 172 struct mm_struct *mm);
173extern void mmu_notifier_unregister_no_release(struct mmu_notifier *mn,
174 struct mm_struct *mm);
173extern void __mmu_notifier_mm_destroy(struct mm_struct *mm); 175extern void __mmu_notifier_mm_destroy(struct mm_struct *mm);
174extern void __mmu_notifier_release(struct mm_struct *mm); 176extern void __mmu_notifier_release(struct mm_struct *mm);
175extern int __mmu_notifier_clear_flush_young(struct mm_struct *mm, 177extern int __mmu_notifier_clear_flush_young(struct mm_struct *mm,
@@ -288,6 +290,10 @@ static inline void mmu_notifier_mm_destroy(struct mm_struct *mm)
288 set_pte_at(___mm, ___address, __ptep, ___pte); \ 290 set_pte_at(___mm, ___address, __ptep, ___pte); \
289}) 291})
290 292
293extern void mmu_notifier_call_srcu(struct rcu_head *rcu,
294 void (*func)(struct rcu_head *rcu));
295extern void mmu_notifier_synchronize(void);
296
291#else /* CONFIG_MMU_NOTIFIER */ 297#else /* CONFIG_MMU_NOTIFIER */
292 298
293static inline void mmu_notifier_release(struct mm_struct *mm) 299static inline void mmu_notifier_release(struct mm_struct *mm)
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 6cbd1b6c3d20..318df7051850 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -143,6 +143,7 @@ enum zone_stat_item {
143 NR_SHMEM, /* shmem pages (included tmpfs/GEM pages) */ 143 NR_SHMEM, /* shmem pages (included tmpfs/GEM pages) */
144 NR_DIRTIED, /* page dirtyings since bootup */ 144 NR_DIRTIED, /* page dirtyings since bootup */
145 NR_WRITTEN, /* page writings since bootup */ 145 NR_WRITTEN, /* page writings since bootup */
146 NR_PAGES_SCANNED, /* pages scanned since last reclaim */
146#ifdef CONFIG_NUMA 147#ifdef CONFIG_NUMA
147 NUMA_HIT, /* allocated in intended node */ 148 NUMA_HIT, /* allocated in intended node */
148 NUMA_MISS, /* allocated in non intended node */ 149 NUMA_MISS, /* allocated in non intended node */
@@ -324,19 +325,12 @@ enum zone_type {
324#ifndef __GENERATING_BOUNDS_H 325#ifndef __GENERATING_BOUNDS_H
325 326
326struct zone { 327struct zone {
327 /* Fields commonly accessed by the page allocator */ 328 /* Read-mostly fields */
328 329
329 /* zone watermarks, access with *_wmark_pages(zone) macros */ 330 /* zone watermarks, access with *_wmark_pages(zone) macros */
330 unsigned long watermark[NR_WMARK]; 331 unsigned long watermark[NR_WMARK];
331 332
332 /* 333 /*
333 * When free pages are below this point, additional steps are taken
334 * when reading the number of free pages to avoid per-cpu counter
335 * drift allowing watermarks to be breached
336 */
337 unsigned long percpu_drift_mark;
338
339 /*
340 * We don't know if the memory that we're going to allocate will be freeable 334 * We don't know if the memory that we're going to allocate will be freeable
341 * or/and it will be released eventually, so to avoid totally wasting several 335 * or/and it will be released eventually, so to avoid totally wasting several
342 * GB of ram we must reserve some of the lower zone memory (otherwise we risk 336 * GB of ram we must reserve some of the lower zone memory (otherwise we risk
@@ -344,41 +338,26 @@ struct zone {
344 * on the higher zones). This array is recalculated at runtime if the 338 * on the higher zones). This array is recalculated at runtime if the
345 * sysctl_lowmem_reserve_ratio sysctl changes. 339 * sysctl_lowmem_reserve_ratio sysctl changes.
346 */ 340 */
347 unsigned long lowmem_reserve[MAX_NR_ZONES]; 341 long lowmem_reserve[MAX_NR_ZONES];
348
349 /*
350 * This is a per-zone reserve of pages that should not be
351 * considered dirtyable memory.
352 */
353 unsigned long dirty_balance_reserve;
354 342
355#ifdef CONFIG_NUMA 343#ifdef CONFIG_NUMA
356 int node; 344 int node;
345#endif
346
357 /* 347 /*
358 * zone reclaim becomes active if more unmapped pages exist. 348 * The target ratio of ACTIVE_ANON to INACTIVE_ANON pages on
349 * this zone's LRU. Maintained by the pageout code.
359 */ 350 */
360 unsigned long min_unmapped_pages; 351 unsigned int inactive_ratio;
361 unsigned long min_slab_pages; 352
362#endif 353 struct pglist_data *zone_pgdat;
363 struct per_cpu_pageset __percpu *pageset; 354 struct per_cpu_pageset __percpu *pageset;
355
364 /* 356 /*
365 * free areas of different sizes 357 * This is a per-zone reserve of pages that should not be
358 * considered dirtyable memory.
366 */ 359 */
367 spinlock_t lock; 360 unsigned long dirty_balance_reserve;
368#if defined CONFIG_COMPACTION || defined CONFIG_CMA
369 /* Set to true when the PG_migrate_skip bits should be cleared */
370 bool compact_blockskip_flush;
371
372 /* pfn where compaction free scanner should start */
373 unsigned long compact_cached_free_pfn;
374 /* pfn where async and sync compaction migration scanner should start */
375 unsigned long compact_cached_migrate_pfn[2];
376#endif
377#ifdef CONFIG_MEMORY_HOTPLUG
378 /* see spanned/present_pages for more description */
379 seqlock_t span_seqlock;
380#endif
381 struct free_area free_area[MAX_ORDER];
382 361
383#ifndef CONFIG_SPARSEMEM 362#ifndef CONFIG_SPARSEMEM
384 /* 363 /*
@@ -388,74 +367,14 @@ struct zone {
388 unsigned long *pageblock_flags; 367 unsigned long *pageblock_flags;
389#endif /* CONFIG_SPARSEMEM */ 368#endif /* CONFIG_SPARSEMEM */
390 369
391#ifdef CONFIG_COMPACTION 370#ifdef CONFIG_NUMA
392 /*
393 * On compaction failure, 1<<compact_defer_shift compactions
394 * are skipped before trying again. The number attempted since
395 * last failure is tracked with compact_considered.
396 */
397 unsigned int compact_considered;
398 unsigned int compact_defer_shift;
399 int compact_order_failed;
400#endif
401
402 ZONE_PADDING(_pad1_)
403
404 /* Fields commonly accessed by the page reclaim scanner */
405 spinlock_t lru_lock;
406 struct lruvec lruvec;
407
408 /* Evictions & activations on the inactive file list */
409 atomic_long_t inactive_age;
410
411 unsigned long pages_scanned; /* since last reclaim */
412 unsigned long flags; /* zone flags, see below */
413
414 /* Zone statistics */
415 atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
416
417 /*
418 * The target ratio of ACTIVE_ANON to INACTIVE_ANON pages on
419 * this zone's LRU. Maintained by the pageout code.
420 */
421 unsigned int inactive_ratio;
422
423
424 ZONE_PADDING(_pad2_)
425 /* Rarely used or read-mostly fields */
426
427 /* 371 /*
428 * wait_table -- the array holding the hash table 372 * zone reclaim becomes active if more unmapped pages exist.
429 * wait_table_hash_nr_entries -- the size of the hash table array
430 * wait_table_bits -- wait_table_size == (1 << wait_table_bits)
431 *
432 * The purpose of all these is to keep track of the people
433 * waiting for a page to become available and make them
434 * runnable again when possible. The trouble is that this
435 * consumes a lot of space, especially when so few things
436 * wait on pages at a given time. So instead of using
437 * per-page waitqueues, we use a waitqueue hash table.
438 *
439 * The bucket discipline is to sleep on the same queue when
440 * colliding and wake all in that wait queue when removing.
441 * When something wakes, it must check to be sure its page is
442 * truly available, a la thundering herd. The cost of a
443 * collision is great, but given the expected load of the
444 * table, they should be so rare as to be outweighed by the
445 * benefits from the saved space.
446 *
447 * __wait_on_page_locked() and unlock_page() in mm/filemap.c, are the
448 * primary users of these fields, and in mm/page_alloc.c
449 * free_area_init_core() performs the initialization of them.
450 */ 373 */
451 wait_queue_head_t * wait_table; 374 unsigned long min_unmapped_pages;
452 unsigned long wait_table_hash_nr_entries; 375 unsigned long min_slab_pages;
453 unsigned long wait_table_bits; 376#endif /* CONFIG_NUMA */
454 377
455 /*
456 * Discontig memory support fields.
457 */
458 struct pglist_data *zone_pgdat;
459 /* zone_start_pfn == zone_start_paddr >> PAGE_SHIFT */ 378 /* zone_start_pfn == zone_start_paddr >> PAGE_SHIFT */
460 unsigned long zone_start_pfn; 379 unsigned long zone_start_pfn;
461 380
@@ -500,9 +419,11 @@ struct zone {
500 * adjust_managed_page_count() should be used instead of directly 419 * adjust_managed_page_count() should be used instead of directly
501 * touching zone->managed_pages and totalram_pages. 420 * touching zone->managed_pages and totalram_pages.
502 */ 421 */
422 unsigned long managed_pages;
503 unsigned long spanned_pages; 423 unsigned long spanned_pages;
504 unsigned long present_pages; 424 unsigned long present_pages;
505 unsigned long managed_pages; 425
426 const char *name;
506 427
507 /* 428 /*
508 * Number of MIGRATE_RESEVE page block. To maintain for just 429 * Number of MIGRATE_RESEVE page block. To maintain for just
@@ -510,10 +431,94 @@ struct zone {
510 */ 431 */
511 int nr_migrate_reserve_block; 432 int nr_migrate_reserve_block;
512 433
434#ifdef CONFIG_MEMORY_HOTPLUG
435 /* see spanned/present_pages for more description */
436 seqlock_t span_seqlock;
437#endif
438
513 /* 439 /*
514 * rarely used fields: 440 * wait_table -- the array holding the hash table
441 * wait_table_hash_nr_entries -- the size of the hash table array
442 * wait_table_bits -- wait_table_size == (1 << wait_table_bits)
443 *
444 * The purpose of all these is to keep track of the people
445 * waiting for a page to become available and make them
446 * runnable again when possible. The trouble is that this
447 * consumes a lot of space, especially when so few things
448 * wait on pages at a given time. So instead of using
449 * per-page waitqueues, we use a waitqueue hash table.
450 *
451 * The bucket discipline is to sleep on the same queue when
452 * colliding and wake all in that wait queue when removing.
453 * When something wakes, it must check to be sure its page is
454 * truly available, a la thundering herd. The cost of a
455 * collision is great, but given the expected load of the
456 * table, they should be so rare as to be outweighed by the
457 * benefits from the saved space.
458 *
459 * __wait_on_page_locked() and unlock_page() in mm/filemap.c, are the
460 * primary users of these fields, and in mm/page_alloc.c
461 * free_area_init_core() performs the initialization of them.
515 */ 462 */
516 const char *name; 463 wait_queue_head_t *wait_table;
464 unsigned long wait_table_hash_nr_entries;
465 unsigned long wait_table_bits;
466
467 ZONE_PADDING(_pad1_)
468
469 /* Write-intensive fields used from the page allocator */
470 spinlock_t lock;
471
472 /* free areas of different sizes */
473 struct free_area free_area[MAX_ORDER];
474
475 /* zone flags, see below */
476 unsigned long flags;
477
478 ZONE_PADDING(_pad2_)
479
480 /* Write-intensive fields used by page reclaim */
481
482 /* Fields commonly accessed by the page reclaim scanner */
483 spinlock_t lru_lock;
484 struct lruvec lruvec;
485
486 /* Evictions & activations on the inactive file list */
487 atomic_long_t inactive_age;
488
489 /*
490 * When free pages are below this point, additional steps are taken
491 * when reading the number of free pages to avoid per-cpu counter
492 * drift allowing watermarks to be breached
493 */
494 unsigned long percpu_drift_mark;
495
496#if defined CONFIG_COMPACTION || defined CONFIG_CMA
497 /* pfn where compaction free scanner should start */
498 unsigned long compact_cached_free_pfn;
499 /* pfn where async and sync compaction migration scanner should start */
500 unsigned long compact_cached_migrate_pfn[2];
501#endif
502
503#ifdef CONFIG_COMPACTION
504 /*
505 * On compaction failure, 1<<compact_defer_shift compactions
506 * are skipped before trying again. The number attempted since
507 * last failure is tracked with compact_considered.
508 */
509 unsigned int compact_considered;
510 unsigned int compact_defer_shift;
511 int compact_order_failed;
512#endif
513
514#if defined CONFIG_COMPACTION || defined CONFIG_CMA
515 /* Set to true when the PG_migrate_skip bits should be cleared */
516 bool compact_blockskip_flush;
517#endif
518
519 ZONE_PADDING(_pad3_)
520 /* Zone statistics */
521 atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
517} ____cacheline_internodealigned_in_smp; 522} ____cacheline_internodealigned_in_smp;
518 523
519typedef enum { 524typedef enum {
@@ -529,6 +534,7 @@ typedef enum {
529 ZONE_WRITEBACK, /* reclaim scanning has recently found 534 ZONE_WRITEBACK, /* reclaim scanning has recently found
530 * many pages under writeback 535 * many pages under writeback
531 */ 536 */
537 ZONE_FAIR_DEPLETED, /* fair zone policy batch depleted */
532} zone_flags_t; 538} zone_flags_t;
533 539
534static inline void zone_set_flag(struct zone *zone, zone_flags_t flag) 540static inline void zone_set_flag(struct zone *zone, zone_flags_t flag)
@@ -566,6 +572,11 @@ static inline int zone_is_reclaim_locked(const struct zone *zone)
566 return test_bit(ZONE_RECLAIM_LOCKED, &zone->flags); 572 return test_bit(ZONE_RECLAIM_LOCKED, &zone->flags);
567} 573}
568 574
575static inline int zone_is_fair_depleted(const struct zone *zone)
576{
577 return test_bit(ZONE_FAIR_DEPLETED, &zone->flags);
578}
579
569static inline int zone_is_oom_locked(const struct zone *zone) 580static inline int zone_is_oom_locked(const struct zone *zone)
570{ 581{
571 return test_bit(ZONE_OOM_LOCKED, &zone->flags); 582 return test_bit(ZONE_OOM_LOCKED, &zone->flags);
@@ -872,6 +883,8 @@ static inline int zone_movable_is_highmem(void)
872{ 883{
873#if defined(CONFIG_HIGHMEM) && defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) 884#if defined(CONFIG_HIGHMEM) && defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP)
874 return movable_zone == ZONE_HIGHMEM; 885 return movable_zone == ZONE_HIGHMEM;
886#elif defined(CONFIG_HIGHMEM)
887 return (ZONE_MOVABLE - 1) == ZONE_HIGHMEM;
875#else 888#else
876 return 0; 889 return 0;
877#endif 890#endif
diff --git a/include/linux/module.h b/include/linux/module.h
index f520a767c86c..71f282a4e307 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -396,18 +396,25 @@ bool is_module_address(unsigned long addr);
396bool is_module_percpu_address(unsigned long addr); 396bool is_module_percpu_address(unsigned long addr);
397bool is_module_text_address(unsigned long addr); 397bool is_module_text_address(unsigned long addr);
398 398
399static inline int within_module_core(unsigned long addr, const struct module *mod) 399static inline bool within_module_core(unsigned long addr,
400 const struct module *mod)
400{ 401{
401 return (unsigned long)mod->module_core <= addr && 402 return (unsigned long)mod->module_core <= addr &&
402 addr < (unsigned long)mod->module_core + mod->core_size; 403 addr < (unsigned long)mod->module_core + mod->core_size;
403} 404}
404 405
405static inline int within_module_init(unsigned long addr, const struct module *mod) 406static inline bool within_module_init(unsigned long addr,
407 const struct module *mod)
406{ 408{
407 return (unsigned long)mod->module_init <= addr && 409 return (unsigned long)mod->module_init <= addr &&
408 addr < (unsigned long)mod->module_init + mod->init_size; 410 addr < (unsigned long)mod->module_init + mod->init_size;
409} 411}
410 412
413static inline bool within_module(unsigned long addr, const struct module *mod)
414{
415 return within_module_init(addr, mod) || within_module_core(addr, mod);
416}
417
411/* Search for module by name: must hold module_mutex. */ 418/* Search for module by name: must hold module_mutex. */
412struct module *find_module(const char *name); 419struct module *find_module(const char *name);
413 420
diff --git a/include/linux/moduleloader.h b/include/linux/moduleloader.h
index 560ca53a75fa..7eeb9bbfb816 100644
--- a/include/linux/moduleloader.h
+++ b/include/linux/moduleloader.h
@@ -45,7 +45,8 @@ static inline int apply_relocate(Elf_Shdr *sechdrs,
45 unsigned int relsec, 45 unsigned int relsec,
46 struct module *me) 46 struct module *me)
47{ 47{
48 printk(KERN_ERR "module %s: REL relocation unsupported\n", me->name); 48 printk(KERN_ERR "module %s: REL relocation unsupported\n",
49 module_name(me));
49 return -ENOEXEC; 50 return -ENOEXEC;
50} 51}
51#endif 52#endif
@@ -67,7 +68,8 @@ static inline int apply_relocate_add(Elf_Shdr *sechdrs,
67 unsigned int relsec, 68 unsigned int relsec,
68 struct module *me) 69 struct module *me)
69{ 70{
70 printk(KERN_ERR "module %s: REL relocation unsupported\n", me->name); 71 printk(KERN_ERR "module %s: REL relocation unsupported\n",
72 module_name(me));
71 return -ENOEXEC; 73 return -ENOEXEC;
72} 74}
73#endif 75#endif
diff --git a/include/linux/mount.h b/include/linux/mount.h
index 839bac270904..9262e4bf0cc3 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -42,13 +42,20 @@ struct mnt_namespace;
42 * flag, consider how it interacts with shared mounts. 42 * flag, consider how it interacts with shared mounts.
43 */ 43 */
44#define MNT_SHARED_MASK (MNT_UNBINDABLE) 44#define MNT_SHARED_MASK (MNT_UNBINDABLE)
45#define MNT_PROPAGATION_MASK (MNT_SHARED | MNT_UNBINDABLE) 45#define MNT_USER_SETTABLE_MASK (MNT_NOSUID | MNT_NODEV | MNT_NOEXEC \
46 | MNT_NOATIME | MNT_NODIRATIME | MNT_RELATIME \
47 | MNT_READONLY)
48#define MNT_ATIME_MASK (MNT_NOATIME | MNT_NODIRATIME | MNT_RELATIME )
46 49
47#define MNT_INTERNAL_FLAGS (MNT_SHARED | MNT_WRITE_HOLD | MNT_INTERNAL | \ 50#define MNT_INTERNAL_FLAGS (MNT_SHARED | MNT_WRITE_HOLD | MNT_INTERNAL | \
48 MNT_DOOMED | MNT_SYNC_UMOUNT | MNT_MARKED) 51 MNT_DOOMED | MNT_SYNC_UMOUNT | MNT_MARKED)
49 52
50#define MNT_INTERNAL 0x4000 53#define MNT_INTERNAL 0x4000
51 54
55#define MNT_LOCK_ATIME 0x040000
56#define MNT_LOCK_NOEXEC 0x080000
57#define MNT_LOCK_NOSUID 0x100000
58#define MNT_LOCK_NODEV 0x200000
52#define MNT_LOCK_READONLY 0x400000 59#define MNT_LOCK_READONLY 0x400000
53#define MNT_LOCKED 0x800000 60#define MNT_LOCKED 0x800000
54#define MNT_DOOMED 0x1000000 61#define MNT_DOOMED 0x1000000
@@ -62,6 +69,7 @@ struct vfsmount {
62}; 69};
63 70
64struct file; /* forward dec */ 71struct file; /* forward dec */
72struct path;
65 73
66extern int mnt_want_write(struct vfsmount *mnt); 74extern int mnt_want_write(struct vfsmount *mnt);
67extern int mnt_want_write_file(struct file *file); 75extern int mnt_want_write_file(struct file *file);
@@ -70,8 +78,7 @@ extern void mnt_drop_write(struct vfsmount *mnt);
70extern void mnt_drop_write_file(struct file *file); 78extern void mnt_drop_write_file(struct file *file);
71extern void mntput(struct vfsmount *mnt); 79extern void mntput(struct vfsmount *mnt);
72extern struct vfsmount *mntget(struct vfsmount *mnt); 80extern struct vfsmount *mntget(struct vfsmount *mnt);
73extern void mnt_pin(struct vfsmount *mnt); 81extern struct vfsmount *mnt_clone_internal(struct path *path);
74extern void mnt_unpin(struct vfsmount *mnt);
75extern int __mnt_is_readonly(struct vfsmount *mnt); 82extern int __mnt_is_readonly(struct vfsmount *mnt);
76 83
77struct file_system_type; 84struct file_system_type;
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index a1b0b4c8fd79..031ff3a9a0bd 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -222,6 +222,7 @@ struct mtd_info {
222 int (*_lock) (struct mtd_info *mtd, loff_t ofs, uint64_t len); 222 int (*_lock) (struct mtd_info *mtd, loff_t ofs, uint64_t len);
223 int (*_unlock) (struct mtd_info *mtd, loff_t ofs, uint64_t len); 223 int (*_unlock) (struct mtd_info *mtd, loff_t ofs, uint64_t len);
224 int (*_is_locked) (struct mtd_info *mtd, loff_t ofs, uint64_t len); 224 int (*_is_locked) (struct mtd_info *mtd, loff_t ofs, uint64_t len);
225 int (*_block_isreserved) (struct mtd_info *mtd, loff_t ofs);
225 int (*_block_isbad) (struct mtd_info *mtd, loff_t ofs); 226 int (*_block_isbad) (struct mtd_info *mtd, loff_t ofs);
226 int (*_block_markbad) (struct mtd_info *mtd, loff_t ofs); 227 int (*_block_markbad) (struct mtd_info *mtd, loff_t ofs);
227 int (*_suspend) (struct mtd_info *mtd); 228 int (*_suspend) (struct mtd_info *mtd);
@@ -302,6 +303,7 @@ static inline void mtd_sync(struct mtd_info *mtd)
302int mtd_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len); 303int mtd_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
303int mtd_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len); 304int mtd_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
304int mtd_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len); 305int mtd_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len);
306int mtd_block_isreserved(struct mtd_info *mtd, loff_t ofs);
305int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs); 307int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs);
306int mtd_block_markbad(struct mtd_info *mtd, loff_t ofs); 308int mtd_block_markbad(struct mtd_info *mtd, loff_t ofs);
307 309
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 2f0af2891f0f..3083c53e0270 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -810,6 +810,7 @@ extern struct nand_manufacturers nand_manuf_ids[];
810extern int nand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd); 810extern int nand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd);
811extern int nand_default_bbt(struct mtd_info *mtd); 811extern int nand_default_bbt(struct mtd_info *mtd);
812extern int nand_markbad_bbt(struct mtd_info *mtd, loff_t offs); 812extern int nand_markbad_bbt(struct mtd_info *mtd, loff_t offs);
813extern int nand_isreserved_bbt(struct mtd_info *mtd, loff_t offs);
813extern int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt); 814extern int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt);
814extern int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, 815extern int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr,
815 int allowbbt); 816 int allowbbt);
@@ -947,4 +948,56 @@ static inline int jedec_feature(struct nand_chip *chip)
947 return chip->jedec_version ? le16_to_cpu(chip->jedec_params.features) 948 return chip->jedec_version ? le16_to_cpu(chip->jedec_params.features)
948 : 0; 949 : 0;
949} 950}
951
952/**
953 * struct nand_sdr_timings - SDR NAND chip timings
954 *
955 * This struct defines the timing requirements of a SDR NAND chip.
956 * These informations can be found in every NAND datasheets and the timings
957 * meaning are described in the ONFI specifications:
958 * www.onfi.org/~/media/ONFI/specs/onfi_3_1_spec.pdf (chapter 4.15 Timing
959 * Parameters)
960 *
961 * All these timings are expressed in picoseconds.
962 */
963
964struct nand_sdr_timings {
965 u32 tALH_min;
966 u32 tADL_min;
967 u32 tALS_min;
968 u32 tAR_min;
969 u32 tCEA_max;
970 u32 tCEH_min;
971 u32 tCH_min;
972 u32 tCHZ_max;
973 u32 tCLH_min;
974 u32 tCLR_min;
975 u32 tCLS_min;
976 u32 tCOH_min;
977 u32 tCS_min;
978 u32 tDH_min;
979 u32 tDS_min;
980 u32 tFEAT_max;
981 u32 tIR_min;
982 u32 tITC_max;
983 u32 tRC_min;
984 u32 tREA_max;
985 u32 tREH_min;
986 u32 tRHOH_min;
987 u32 tRHW_min;
988 u32 tRHZ_max;
989 u32 tRLOH_min;
990 u32 tRP_min;
991 u32 tRR_min;
992 u64 tRST_max;
993 u32 tWB_max;
994 u32 tWC_min;
995 u32 tWH_min;
996 u32 tWHR_min;
997 u32 tWP_min;
998 u32 tWW_min;
999};
1000
1001/* get timing characteristics from ONFI timing mode. */
1002const struct nand_sdr_timings *onfi_async_timing_mode_to_sdr_timings(int mode);
950#endif /* __LINUX_MTD_NAND_H */ 1003#endif /* __LINUX_MTD_NAND_H */
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
index 53241842a7ab..9e6294f32ba8 100644
--- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h
@@ -34,6 +34,7 @@
34#define SPINOR_OP_SE 0xd8 /* Sector erase (usually 64KiB) */ 34#define SPINOR_OP_SE 0xd8 /* Sector erase (usually 64KiB) */
35#define SPINOR_OP_RDID 0x9f /* Read JEDEC ID */ 35#define SPINOR_OP_RDID 0x9f /* Read JEDEC ID */
36#define SPINOR_OP_RDCR 0x35 /* Read configuration register */ 36#define SPINOR_OP_RDCR 0x35 /* Read configuration register */
37#define SPINOR_OP_RDFSR 0x70 /* Read flag status register */
37 38
38/* 4-byte address opcodes - used on Spansion and some Macronix flashes. */ 39/* 4-byte address opcodes - used on Spansion and some Macronix flashes. */
39#define SPINOR_OP_READ4 0x13 /* Read data bytes (low frequency) */ 40#define SPINOR_OP_READ4 0x13 /* Read data bytes (low frequency) */
@@ -66,6 +67,9 @@
66 67
67#define SR_QUAD_EN_MX 0x40 /* Macronix Quad I/O */ 68#define SR_QUAD_EN_MX 0x40 /* Macronix Quad I/O */
68 69
70/* Flag Status Register bits */
71#define FSR_READY 0x80
72
69/* Configuration Register bits. */ 73/* Configuration Register bits. */
70#define CR_QUAD_EN_SPAN 0x2 /* Spansion Quad I/O */ 74#define CR_QUAD_EN_SPAN 0x2 /* Spansion Quad I/O */
71 75
diff --git a/include/linux/mvebu-pmsu.h b/include/linux/mvebu-pmsu.h
new file mode 100644
index 000000000000..b918d07efe23
--- /dev/null
+++ b/include/linux/mvebu-pmsu.h
@@ -0,0 +1,20 @@
1/*
2 * Copyright (C) 2012 Marvell
3 *
4 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __MVEBU_PMSU_H__
12#define __MVEBU_PMSU_H__
13
14#ifdef CONFIG_MACH_MVEBU_V7
15int mvebu_pmsu_dfs_request(int cpu);
16#else
17static inline int mvebu_pmsu_dfs_request(int cpu) { return -ENODEV; }
18#endif
19
20#endif /* __MVEBU_PMSU_H__ */
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index e30f6059ecd6..5180a7ededec 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -52,6 +52,7 @@ struct nfs_access_entry {
52 unsigned long jiffies; 52 unsigned long jiffies;
53 struct rpc_cred * cred; 53 struct rpc_cred * cred;
54 int mask; 54 int mask;
55 struct rcu_head rcu_head;
55}; 56};
56 57
57struct nfs_lockowner { 58struct nfs_lockowner {
@@ -352,6 +353,7 @@ extern int nfs_release(struct inode *, struct file *);
352extern int nfs_attribute_timeout(struct inode *inode); 353extern int nfs_attribute_timeout(struct inode *inode);
353extern int nfs_attribute_cache_expired(struct inode *inode); 354extern int nfs_attribute_cache_expired(struct inode *inode);
354extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode); 355extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode);
356extern int nfs_revalidate_inode_rcu(struct nfs_server *server, struct inode *inode);
355extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *); 357extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *);
356extern int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping); 358extern int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping);
357extern int nfs_setattr(struct dentry *, struct iattr *); 359extern int nfs_setattr(struct dentry *, struct iattr *);
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index 1150ea41b626..922be2e050f5 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -45,6 +45,7 @@ struct nfs_client {
45 struct sockaddr_storage cl_addr; /* server identifier */ 45 struct sockaddr_storage cl_addr; /* server identifier */
46 size_t cl_addrlen; 46 size_t cl_addrlen;
47 char * cl_hostname; /* hostname of server */ 47 char * cl_hostname; /* hostname of server */
48 char * cl_acceptor; /* GSSAPI acceptor name */
48 struct list_head cl_share_link; /* link in global client list */ 49 struct list_head cl_share_link; /* link in global client list */
49 struct list_head cl_superblocks; /* List of nfs_server structs */ 50 struct list_head cl_superblocks; /* List of nfs_server structs */
50 51
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h
index 7d9096d95d4a..6ad2bbcad405 100644
--- a/include/linux/nfs_page.h
+++ b/include/linux/nfs_page.h
@@ -26,7 +26,7 @@ enum {
26 PG_MAPPED, /* page private set for buffered io */ 26 PG_MAPPED, /* page private set for buffered io */
27 PG_CLEAN, /* write succeeded */ 27 PG_CLEAN, /* write succeeded */
28 PG_COMMIT_TO_DS, /* used by pnfs layouts */ 28 PG_COMMIT_TO_DS, /* used by pnfs layouts */
29 PG_INODE_REF, /* extra ref held by inode (head req only) */ 29 PG_INODE_REF, /* extra ref held by inode when in writeback */
30 PG_HEADLOCK, /* page group lock of wb_head */ 30 PG_HEADLOCK, /* page group lock of wb_head */
31 PG_TEARDOWN, /* page group sync for destroy */ 31 PG_TEARDOWN, /* page group sync for destroy */
32 PG_UNLOCKPAGE, /* page group sync bit in read path */ 32 PG_UNLOCKPAGE, /* page group sync bit in read path */
@@ -62,12 +62,13 @@ struct nfs_pageio_ops {
62 62
63struct nfs_rw_ops { 63struct nfs_rw_ops {
64 const fmode_t rw_mode; 64 const fmode_t rw_mode;
65 struct nfs_rw_header *(*rw_alloc_header)(void); 65 struct nfs_pgio_header *(*rw_alloc_header)(void);
66 void (*rw_free_header)(struct nfs_rw_header *); 66 void (*rw_free_header)(struct nfs_pgio_header *);
67 void (*rw_release)(struct nfs_pgio_data *); 67 void (*rw_release)(struct nfs_pgio_header *);
68 int (*rw_done)(struct rpc_task *, struct nfs_pgio_data *, struct inode *); 68 int (*rw_done)(struct rpc_task *, struct nfs_pgio_header *,
69 void (*rw_result)(struct rpc_task *, struct nfs_pgio_data *); 69 struct inode *);
70 void (*rw_initiate)(struct nfs_pgio_data *, struct rpc_message *, 70 void (*rw_result)(struct rpc_task *, struct nfs_pgio_header *);
71 void (*rw_initiate)(struct nfs_pgio_header *, struct rpc_message *,
71 struct rpc_task_setup *, int); 72 struct rpc_task_setup *, int);
72}; 73};
73 74
@@ -111,6 +112,8 @@ extern void nfs_pageio_init(struct nfs_pageio_descriptor *desc,
111 int how); 112 int how);
112extern int nfs_pageio_add_request(struct nfs_pageio_descriptor *, 113extern int nfs_pageio_add_request(struct nfs_pageio_descriptor *,
113 struct nfs_page *); 114 struct nfs_page *);
115extern int nfs_pageio_resend(struct nfs_pageio_descriptor *,
116 struct nfs_pgio_header *);
114extern void nfs_pageio_complete(struct nfs_pageio_descriptor *desc); 117extern void nfs_pageio_complete(struct nfs_pageio_descriptor *desc);
115extern void nfs_pageio_cond_complete(struct nfs_pageio_descriptor *, pgoff_t); 118extern void nfs_pageio_cond_complete(struct nfs_pageio_descriptor *, pgoff_t);
116extern size_t nfs_generic_pg_test(struct nfs_pageio_descriptor *desc, 119extern size_t nfs_generic_pg_test(struct nfs_pageio_descriptor *desc,
@@ -119,7 +122,7 @@ extern size_t nfs_generic_pg_test(struct nfs_pageio_descriptor *desc,
119extern int nfs_wait_on_request(struct nfs_page *); 122extern int nfs_wait_on_request(struct nfs_page *);
120extern void nfs_unlock_request(struct nfs_page *req); 123extern void nfs_unlock_request(struct nfs_page *req);
121extern void nfs_unlock_and_release_request(struct nfs_page *); 124extern void nfs_unlock_and_release_request(struct nfs_page *);
122extern void nfs_page_group_lock(struct nfs_page *); 125extern int nfs_page_group_lock(struct nfs_page *, bool);
123extern void nfs_page_group_unlock(struct nfs_page *); 126extern void nfs_page_group_unlock(struct nfs_page *);
124extern bool nfs_page_group_sync_on_bit(struct nfs_page *, unsigned int); 127extern bool nfs_page_group_sync_on_bit(struct nfs_page *, unsigned int);
125 128
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 9a1396e70310..0040629894df 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -993,6 +993,7 @@ struct nfs4_setclientid {
993 unsigned int sc_uaddr_len; 993 unsigned int sc_uaddr_len;
994 char sc_uaddr[RPCBIND_MAXUADDRLEN + 1]; 994 char sc_uaddr[RPCBIND_MAXUADDRLEN + 1];
995 u32 sc_cb_ident; 995 u32 sc_cb_ident;
996 struct rpc_cred *sc_cred;
996}; 997};
997 998
998struct nfs4_setclientid_res { 999struct nfs4_setclientid_res {
@@ -1253,18 +1254,12 @@ enum {
1253 NFS_IOHDR_ERROR = 0, 1254 NFS_IOHDR_ERROR = 0,
1254 NFS_IOHDR_EOF, 1255 NFS_IOHDR_EOF,
1255 NFS_IOHDR_REDO, 1256 NFS_IOHDR_REDO,
1256 NFS_IOHDR_NEED_COMMIT,
1257 NFS_IOHDR_NEED_RESCHED,
1258}; 1257};
1259 1258
1260struct nfs_pgio_data;
1261
1262struct nfs_pgio_header { 1259struct nfs_pgio_header {
1263 struct inode *inode; 1260 struct inode *inode;
1264 struct rpc_cred *cred; 1261 struct rpc_cred *cred;
1265 struct list_head pages; 1262 struct list_head pages;
1266 struct nfs_pgio_data *data;
1267 atomic_t refcnt;
1268 struct nfs_page *req; 1263 struct nfs_page *req;
1269 struct nfs_writeverf verf; /* Used for writes */ 1264 struct nfs_writeverf verf; /* Used for writes */
1270 struct pnfs_layout_segment *lseg; 1265 struct pnfs_layout_segment *lseg;
@@ -1281,28 +1276,22 @@ struct nfs_pgio_header {
1281 int error; /* merge with pnfs_error */ 1276 int error; /* merge with pnfs_error */
1282 unsigned long good_bytes; /* boundary of good data */ 1277 unsigned long good_bytes; /* boundary of good data */
1283 unsigned long flags; 1278 unsigned long flags;
1284};
1285 1279
1286struct nfs_pgio_data { 1280 /*
1287 struct nfs_pgio_header *header; 1281 * rpc data
1282 */
1288 struct rpc_task task; 1283 struct rpc_task task;
1289 struct nfs_fattr fattr; 1284 struct nfs_fattr fattr;
1290 struct nfs_writeverf verf; /* Used for writes */
1291 struct nfs_pgio_args args; /* argument struct */ 1285 struct nfs_pgio_args args; /* argument struct */
1292 struct nfs_pgio_res res; /* result struct */ 1286 struct nfs_pgio_res res; /* result struct */
1293 unsigned long timestamp; /* For lease renewal */ 1287 unsigned long timestamp; /* For lease renewal */
1294 int (*pgio_done_cb) (struct rpc_task *task, struct nfs_pgio_data *data); 1288 int (*pgio_done_cb)(struct rpc_task *, struct nfs_pgio_header *);
1295 __u64 mds_offset; /* Filelayout dense stripe */ 1289 __u64 mds_offset; /* Filelayout dense stripe */
1296 struct nfs_page_array pages; 1290 struct nfs_page_array page_array;
1297 struct nfs_client *ds_clp; /* pNFS data server */ 1291 struct nfs_client *ds_clp; /* pNFS data server */
1298 int ds_idx; /* ds index if ds_clp is set */ 1292 int ds_idx; /* ds index if ds_clp is set */
1299}; 1293};
1300 1294
1301struct nfs_rw_header {
1302 struct nfs_pgio_header header;
1303 struct nfs_pgio_data rpc_data;
1304};
1305
1306struct nfs_mds_commit_info { 1295struct nfs_mds_commit_info {
1307 atomic_t rpcs_out; 1296 atomic_t rpcs_out;
1308 unsigned long ncommit; 1297 unsigned long ncommit;
@@ -1432,11 +1421,12 @@ struct nfs_rpc_ops {
1432 struct nfs_pathconf *); 1421 struct nfs_pathconf *);
1433 int (*set_capabilities)(struct nfs_server *, struct nfs_fh *); 1422 int (*set_capabilities)(struct nfs_server *, struct nfs_fh *);
1434 int (*decode_dirent)(struct xdr_stream *, struct nfs_entry *, int); 1423 int (*decode_dirent)(struct xdr_stream *, struct nfs_entry *, int);
1435 int (*pgio_rpc_prepare)(struct rpc_task *, struct nfs_pgio_data *); 1424 int (*pgio_rpc_prepare)(struct rpc_task *,
1436 void (*read_setup) (struct nfs_pgio_data *, struct rpc_message *); 1425 struct nfs_pgio_header *);
1437 int (*read_done) (struct rpc_task *, struct nfs_pgio_data *); 1426 void (*read_setup)(struct nfs_pgio_header *, struct rpc_message *);
1438 void (*write_setup) (struct nfs_pgio_data *, struct rpc_message *); 1427 int (*read_done)(struct rpc_task *, struct nfs_pgio_header *);
1439 int (*write_done) (struct rpc_task *, struct nfs_pgio_data *); 1428 void (*write_setup)(struct nfs_pgio_header *, struct rpc_message *);
1429 int (*write_done)(struct rpc_task *, struct nfs_pgio_header *);
1440 void (*commit_setup) (struct nfs_commit_data *, struct rpc_message *); 1430 void (*commit_setup) (struct nfs_commit_data *, struct rpc_message *);
1441 void (*commit_rpc_prepare)(struct rpc_task *, struct nfs_commit_data *); 1431 void (*commit_rpc_prepare)(struct rpc_task *, struct nfs_commit_data *);
1442 int (*commit_done) (struct rpc_task *, struct nfs_commit_data *); 1432 int (*commit_done) (struct rpc_task *, struct nfs_commit_data *);
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h
index 58b9a02c38d2..83a6aeda899d 100644
--- a/include/linux/nodemask.h
+++ b/include/linux/nodemask.h
@@ -430,7 +430,15 @@ static inline int num_node_state(enum node_states state)
430 for_each_node_mask((__node), node_states[__state]) 430 for_each_node_mask((__node), node_states[__state])
431 431
432#define first_online_node first_node(node_states[N_ONLINE]) 432#define first_online_node first_node(node_states[N_ONLINE])
433#define next_online_node(nid) next_node((nid), node_states[N_ONLINE]) 433#define first_memory_node first_node(node_states[N_MEMORY])
434static inline int next_online_node(int nid)
435{
436 return next_node(nid, node_states[N_ONLINE]);
437}
438static inline int next_memory_node(int nid)
439{
440 return next_node(nid, node_states[N_MEMORY]);
441}
434 442
435extern int nr_node_ids; 443extern int nr_node_ids;
436extern int nr_online_nodes; 444extern int nr_online_nodes;
@@ -471,6 +479,7 @@ static inline int num_node_state(enum node_states state)
471 for ( (node) = 0; (node) == 0; (node) = 1) 479 for ( (node) = 0; (node) == 0; (node) = 1)
472 480
473#define first_online_node 0 481#define first_online_node 0
482#define first_memory_node 0
474#define next_online_node(nid) (MAX_NUMNODES) 483#define next_online_node(nid) (MAX_NUMNODES)
475#define nr_node_ids 1 484#define nr_node_ids 1
476#define nr_online_nodes 1 485#define nr_online_nodes 1
diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h
index b4ec59d159ac..35fa08fd7739 100644
--- a/include/linux/nsproxy.h
+++ b/include/linux/nsproxy.h
@@ -40,32 +40,28 @@ extern struct nsproxy init_nsproxy;
40 * the namespaces access rules are: 40 * the namespaces access rules are:
41 * 41 *
42 * 1. only current task is allowed to change tsk->nsproxy pointer or 42 * 1. only current task is allowed to change tsk->nsproxy pointer or
43 * any pointer on the nsproxy itself 43 * any pointer on the nsproxy itself. Current must hold the task_lock
44 * when changing tsk->nsproxy.
44 * 45 *
45 * 2. when accessing (i.e. reading) current task's namespaces - no 46 * 2. when accessing (i.e. reading) current task's namespaces - no
46 * precautions should be taken - just dereference the pointers 47 * precautions should be taken - just dereference the pointers
47 * 48 *
48 * 3. the access to other task namespaces is performed like this 49 * 3. the access to other task namespaces is performed like this
49 * rcu_read_lock(); 50 * task_lock(task);
50 * nsproxy = task_nsproxy(tsk); 51 * nsproxy = task->nsproxy;
51 * if (nsproxy != NULL) { 52 * if (nsproxy != NULL) {
52 * / * 53 * / *
53 * * work with the namespaces here 54 * * work with the namespaces here
54 * * e.g. get the reference on one of them 55 * * e.g. get the reference on one of them
55 * * / 56 * * /
56 * } / * 57 * } / *
57 * * NULL task_nsproxy() means that this task is 58 * * NULL task->nsproxy means that this task is
58 * * almost dead (zombie) 59 * * almost dead (zombie)
59 * * / 60 * * /
60 * rcu_read_unlock(); 61 * task_unlock(task);
61 * 62 *
62 */ 63 */
63 64
64static inline struct nsproxy *task_nsproxy(struct task_struct *tsk)
65{
66 return rcu_dereference(tsk->nsproxy);
67}
68
69int copy_namespaces(unsigned long flags, struct task_struct *tsk); 65int copy_namespaces(unsigned long flags, struct task_struct *tsk);
70void exit_task_namespaces(struct task_struct *tsk); 66void exit_task_namespaces(struct task_struct *tsk);
71void switch_task_namespaces(struct task_struct *tsk, struct nsproxy *new); 67void switch_task_namespaces(struct task_struct *tsk, struct nsproxy *new);
diff --git a/include/linux/of.h b/include/linux/of.h
index 196b34c1ef4e..6c4363b8ddc3 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -74,8 +74,6 @@ struct of_phandle_args {
74 uint32_t args[MAX_PHANDLE_ARGS]; 74 uint32_t args[MAX_PHANDLE_ARGS];
75}; 75};
76 76
77extern int of_node_add(struct device_node *node);
78
79/* initialize a node */ 77/* initialize a node */
80extern struct kobj_type of_node_ktype; 78extern struct kobj_type of_node_ktype;
81static inline void of_node_init(struct device_node *node) 79static inline void of_node_init(struct device_node *node)
@@ -113,6 +111,7 @@ static inline void of_node_put(struct device_node *node) { }
113extern struct device_node *of_allnodes; 111extern struct device_node *of_allnodes;
114extern struct device_node *of_chosen; 112extern struct device_node *of_chosen;
115extern struct device_node *of_aliases; 113extern struct device_node *of_aliases;
114extern struct device_node *of_stdout;
116extern raw_spinlock_t devtree_lock; 115extern raw_spinlock_t devtree_lock;
117 116
118static inline bool of_have_populated_dt(void) 117static inline bool of_have_populated_dt(void)
@@ -204,6 +203,7 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size)
204#define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */ 203#define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */
205#define OF_DETACHED 2 /* node has been detached from the device tree */ 204#define OF_DETACHED 2 /* node has been detached from the device tree */
206#define OF_POPULATED 3 /* device already created for the node */ 205#define OF_POPULATED 3 /* device already created for the node */
206#define OF_POPULATED_BUS 4 /* of_platform_populate recursed to children of this node */
207 207
208#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) 208#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags)
209#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) 209#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags)
@@ -322,6 +322,7 @@ extern int of_update_property(struct device_node *np, struct property *newprop);
322struct of_prop_reconfig { 322struct of_prop_reconfig {
323 struct device_node *dn; 323 struct device_node *dn;
324 struct property *prop; 324 struct property *prop;
325 struct property *old_prop;
325}; 326};
326 327
327extern int of_reconfig_notifier_register(struct notifier_block *); 328extern int of_reconfig_notifier_register(struct notifier_block *);
@@ -352,7 +353,7 @@ const __be32 *of_prop_next_u32(struct property *prop, const __be32 *cur,
352 */ 353 */
353const char *of_prop_next_string(struct property *prop, const char *cur); 354const char *of_prop_next_string(struct property *prop, const char *cur);
354 355
355int of_device_is_stdout_path(struct device_node *dn); 356bool of_console_check(struct device_node *dn, char *name, int index);
356 357
357#else /* CONFIG_OF */ 358#else /* CONFIG_OF */
358 359
@@ -564,9 +565,9 @@ static inline int of_machine_is_compatible(const char *compat)
564 return 0; 565 return 0;
565} 566}
566 567
567static inline int of_device_is_stdout_path(struct device_node *dn) 568static inline bool of_console_check(const struct device_node *dn, const char *name, int index)
568{ 569{
569 return 0; 570 return false;
570} 571}
571 572
572static inline const __be32 *of_prop_next_u32(struct property *prop, 573static inline const __be32 *of_prop_next_u32(struct property *prop,
@@ -786,4 +787,80 @@ typedef void (*of_init_fn_1)(struct device_node *);
786#define OF_DECLARE_2(table, name, compat, fn) \ 787#define OF_DECLARE_2(table, name, compat, fn) \
787 _OF_DECLARE(table, name, compat, fn, of_init_fn_2) 788 _OF_DECLARE(table, name, compat, fn, of_init_fn_2)
788 789
790/**
791 * struct of_changeset_entry - Holds a changeset entry
792 *
793 * @node: list_head for the log list
794 * @action: notifier action
795 * @np: pointer to the device node affected
796 * @prop: pointer to the property affected
797 * @old_prop: hold a pointer to the original property
798 *
799 * Every modification of the device tree during a changeset
800 * is held in a list of of_changeset_entry structures.
801 * That way we can recover from a partial application, or we can
802 * revert the changeset
803 */
804struct of_changeset_entry {
805 struct list_head node;
806 unsigned long action;
807 struct device_node *np;
808 struct property *prop;
809 struct property *old_prop;
810};
811
812/**
813 * struct of_changeset - changeset tracker structure
814 *
815 * @entries: list_head for the changeset entries
816 *
817 * changesets are a convenient way to apply bulk changes to the
818 * live tree. In case of an error, changes are rolled-back.
819 * changesets live on after initial application, and if not
820 * destroyed after use, they can be reverted in one single call.
821 */
822struct of_changeset {
823 struct list_head entries;
824};
825
826#ifdef CONFIG_OF_DYNAMIC
827extern void of_changeset_init(struct of_changeset *ocs);
828extern void of_changeset_destroy(struct of_changeset *ocs);
829extern int of_changeset_apply(struct of_changeset *ocs);
830extern int of_changeset_revert(struct of_changeset *ocs);
831extern int of_changeset_action(struct of_changeset *ocs,
832 unsigned long action, struct device_node *np,
833 struct property *prop);
834
835static inline int of_changeset_attach_node(struct of_changeset *ocs,
836 struct device_node *np)
837{
838 return of_changeset_action(ocs, OF_RECONFIG_ATTACH_NODE, np, NULL);
839}
840
841static inline int of_changeset_detach_node(struct of_changeset *ocs,
842 struct device_node *np)
843{
844 return of_changeset_action(ocs, OF_RECONFIG_DETACH_NODE, np, NULL);
845}
846
847static inline int of_changeset_add_property(struct of_changeset *ocs,
848 struct device_node *np, struct property *prop)
849{
850 return of_changeset_action(ocs, OF_RECONFIG_ADD_PROPERTY, np, prop);
851}
852
853static inline int of_changeset_remove_property(struct of_changeset *ocs,
854 struct device_node *np, struct property *prop)
855{
856 return of_changeset_action(ocs, OF_RECONFIG_REMOVE_PROPERTY, np, prop);
857}
858
859static inline int of_changeset_update_property(struct of_changeset *ocs,
860 struct device_node *np, struct property *prop)
861{
862 return of_changeset_action(ocs, OF_RECONFIG_UPDATE_PROPERTY, np, prop);
863}
864#endif
865
789#endif /* _LINUX_OF_H */ 866#endif /* _LINUX_OF_H */
diff --git a/include/linux/of_dma.h b/include/linux/of_dma.h
index ae36298ba076..56bc026c143f 100644
--- a/include/linux/of_dma.h
+++ b/include/linux/of_dma.h
@@ -41,6 +41,8 @@ extern struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
41 const char *name); 41 const char *name);
42extern struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec, 42extern struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec,
43 struct of_dma *ofdma); 43 struct of_dma *ofdma);
44extern struct dma_chan *of_dma_xlate_by_chan_id(struct of_phandle_args *dma_spec,
45 struct of_dma *ofdma);
44#else 46#else
45static inline int of_dma_controller_register(struct device_node *np, 47static inline int of_dma_controller_register(struct device_node *np,
46 struct dma_chan *(*of_dma_xlate) 48 struct dma_chan *(*of_dma_xlate)
@@ -66,6 +68,8 @@ static inline struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_s
66 return NULL; 68 return NULL;
67} 69}
68 70
71#define of_dma_xlate_by_chan_id NULL
72
69#endif 73#endif
70 74
71#endif /* __LINUX_OF_DMA_H */ 75#endif /* __LINUX_OF_DMA_H */
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index d96e1badbee0..c2b0627a2317 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -72,7 +72,7 @@ extern int of_platform_populate(struct device_node *root,
72 const struct of_device_id *matches, 72 const struct of_device_id *matches,
73 const struct of_dev_auxdata *lookup, 73 const struct of_dev_auxdata *lookup,
74 struct device *parent); 74 struct device *parent);
75extern int of_platform_depopulate(struct device *parent); 75extern void of_platform_depopulate(struct device *parent);
76#else 76#else
77static inline int of_platform_populate(struct device_node *root, 77static inline int of_platform_populate(struct device_node *root,
78 const struct of_device_id *matches, 78 const struct of_device_id *matches,
@@ -81,10 +81,7 @@ static inline int of_platform_populate(struct device_node *root,
81{ 81{
82 return -ENODEV; 82 return -ENODEV;
83} 83}
84static inline int of_platform_depopulate(struct device *parent) 84static inline void of_platform_depopulate(struct device *parent) { }
85{
86 return -ENODEV;
87}
88#endif 85#endif
89 86
90#endif /* _LINUX_OF_PLATFORM_H */ 87#endif /* _LINUX_OF_PLATFORM_H */
diff --git a/include/linux/of_reserved_mem.h b/include/linux/of_reserved_mem.h
index 4669ddfdd5af..5b5efae09135 100644
--- a/include/linux/of_reserved_mem.h
+++ b/include/linux/of_reserved_mem.h
@@ -8,6 +8,7 @@ struct reserved_mem_ops;
8struct reserved_mem { 8struct reserved_mem {
9 const char *name; 9 const char *name;
10 unsigned long fdt_node; 10 unsigned long fdt_node;
11 unsigned long phandle;
11 const struct reserved_mem_ops *ops; 12 const struct reserved_mem_ops *ops;
12 phys_addr_t base; 13 phys_addr_t base;
13 phys_addr_t size; 14 phys_addr_t size;
@@ -27,10 +28,16 @@ typedef int (*reservedmem_of_init_fn)(struct reserved_mem *rmem);
27 _OF_DECLARE(reservedmem, name, compat, init, reservedmem_of_init_fn) 28 _OF_DECLARE(reservedmem, name, compat, init, reservedmem_of_init_fn)
28 29
29#ifdef CONFIG_OF_RESERVED_MEM 30#ifdef CONFIG_OF_RESERVED_MEM
31void of_reserved_mem_device_init(struct device *dev);
32void of_reserved_mem_device_release(struct device *dev);
33
30void fdt_init_reserved_mem(void); 34void fdt_init_reserved_mem(void);
31void fdt_reserved_mem_save_node(unsigned long node, const char *uname, 35void fdt_reserved_mem_save_node(unsigned long node, const char *uname,
32 phys_addr_t base, phys_addr_t size); 36 phys_addr_t base, phys_addr_t size);
33#else 37#else
38static inline void of_reserved_mem_device_init(struct device *dev) { }
39static inline void of_reserved_mem_device_release(struct device *pdev) { }
40
34static inline void fdt_init_reserved_mem(void) { } 41static inline void fdt_init_reserved_mem(void) { }
35static inline void fdt_reserved_mem_save_node(unsigned long node, 42static inline void fdt_reserved_mem_save_node(unsigned long node,
36 const char *uname, phys_addr_t base, phys_addr_t size) { } 43 const char *uname, phys_addr_t base, phys_addr_t size) { }
diff --git a/include/linux/omap-dma.h b/include/linux/omap-dma.h
index 88e6ea4a5d36..6f06f8bc612c 100644
--- a/include/linux/omap-dma.h
+++ b/include/linux/omap-dma.h
@@ -130,6 +130,7 @@
130#define IS_WORD_16 BIT(0xd) 130#define IS_WORD_16 BIT(0xd)
131#define ENABLE_16XX_MODE BIT(0xe) 131#define ENABLE_16XX_MODE BIT(0xe)
132#define HS_CHANNELS_RESERVED BIT(0xf) 132#define HS_CHANNELS_RESERVED BIT(0xf)
133#define DMA_ENGINE_HANDLE_IRQ BIT(0x10)
133 134
134/* Defines for DMA Capabilities */ 135/* Defines for DMA Capabilities */
135#define DMA_HAS_TRANSPARENT_CAPS (0x1 << 18) 136#define DMA_HAS_TRANSPARENT_CAPS (0x1 << 18)
diff --git a/include/linux/oom.h b/include/linux/oom.h
index 4cd62677feb9..647395a1a550 100644
--- a/include/linux/oom.h
+++ b/include/linux/oom.h
@@ -55,8 +55,8 @@ extern void oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order,
55 struct mem_cgroup *memcg, nodemask_t *nodemask, 55 struct mem_cgroup *memcg, nodemask_t *nodemask,
56 const char *message); 56 const char *message);
57 57
58extern int try_set_zonelist_oom(struct zonelist *zonelist, gfp_t gfp_flags); 58extern bool oom_zonelist_trylock(struct zonelist *zonelist, gfp_t gfp_flags);
59extern void clear_zonelist_oom(struct zonelist *zonelist, gfp_t gfp_flags); 59extern void oom_zonelist_unlock(struct zonelist *zonelist, gfp_t gfp_flags);
60 60
61extern void check_panic_on_oom(enum oom_constraint constraint, gfp_t gfp_mask, 61extern void check_panic_on_oom(enum oom_constraint constraint, gfp_t gfp_mask,
62 int order, const nodemask_t *nodemask); 62 int order, const nodemask_t *nodemask);
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 8304959ad336..e1f5fcd79792 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -171,13 +171,12 @@ static inline int __TestClearPage##uname(struct page *page) \
171#define __PAGEFLAG(uname, lname) TESTPAGEFLAG(uname, lname) \ 171#define __PAGEFLAG(uname, lname) TESTPAGEFLAG(uname, lname) \
172 __SETPAGEFLAG(uname, lname) __CLEARPAGEFLAG(uname, lname) 172 __SETPAGEFLAG(uname, lname) __CLEARPAGEFLAG(uname, lname)
173 173
174#define PAGEFLAG_FALSE(uname) \
175static inline int Page##uname(const struct page *page) \
176 { return 0; }
177
178#define TESTSCFLAG(uname, lname) \ 174#define TESTSCFLAG(uname, lname) \
179 TESTSETFLAG(uname, lname) TESTCLEARFLAG(uname, lname) 175 TESTSETFLAG(uname, lname) TESTCLEARFLAG(uname, lname)
180 176
177#define TESTPAGEFLAG_FALSE(uname) \
178static inline int Page##uname(const struct page *page) { return 0; }
179
181#define SETPAGEFLAG_NOOP(uname) \ 180#define SETPAGEFLAG_NOOP(uname) \
182static inline void SetPage##uname(struct page *page) { } 181static inline void SetPage##uname(struct page *page) { }
183 182
@@ -187,12 +186,21 @@ static inline void ClearPage##uname(struct page *page) { }
187#define __CLEARPAGEFLAG_NOOP(uname) \ 186#define __CLEARPAGEFLAG_NOOP(uname) \
188static inline void __ClearPage##uname(struct page *page) { } 187static inline void __ClearPage##uname(struct page *page) { }
189 188
189#define TESTSETFLAG_FALSE(uname) \
190static inline int TestSetPage##uname(struct page *page) { return 0; }
191
190#define TESTCLEARFLAG_FALSE(uname) \ 192#define TESTCLEARFLAG_FALSE(uname) \
191static inline int TestClearPage##uname(struct page *page) { return 0; } 193static inline int TestClearPage##uname(struct page *page) { return 0; }
192 194
193#define __TESTCLEARFLAG_FALSE(uname) \ 195#define __TESTCLEARFLAG_FALSE(uname) \
194static inline int __TestClearPage##uname(struct page *page) { return 0; } 196static inline int __TestClearPage##uname(struct page *page) { return 0; }
195 197
198#define PAGEFLAG_FALSE(uname) TESTPAGEFLAG_FALSE(uname) \
199 SETPAGEFLAG_NOOP(uname) CLEARPAGEFLAG_NOOP(uname)
200
201#define TESTSCFLAG_FALSE(uname) \
202 TESTSETFLAG_FALSE(uname) TESTCLEARFLAG_FALSE(uname)
203
196struct page; /* forward declaration */ 204struct page; /* forward declaration */
197 205
198TESTPAGEFLAG(Locked, locked) 206TESTPAGEFLAG(Locked, locked)
@@ -248,7 +256,6 @@ PAGEFLAG_FALSE(HighMem)
248PAGEFLAG(SwapCache, swapcache) 256PAGEFLAG(SwapCache, swapcache)
249#else 257#else
250PAGEFLAG_FALSE(SwapCache) 258PAGEFLAG_FALSE(SwapCache)
251 SETPAGEFLAG_NOOP(SwapCache) CLEARPAGEFLAG_NOOP(SwapCache)
252#endif 259#endif
253 260
254PAGEFLAG(Unevictable, unevictable) __CLEARPAGEFLAG(Unevictable, unevictable) 261PAGEFLAG(Unevictable, unevictable) __CLEARPAGEFLAG(Unevictable, unevictable)
@@ -258,8 +265,8 @@ PAGEFLAG(Unevictable, unevictable) __CLEARPAGEFLAG(Unevictable, unevictable)
258PAGEFLAG(Mlocked, mlocked) __CLEARPAGEFLAG(Mlocked, mlocked) 265PAGEFLAG(Mlocked, mlocked) __CLEARPAGEFLAG(Mlocked, mlocked)
259 TESTSCFLAG(Mlocked, mlocked) __TESTCLEARFLAG(Mlocked, mlocked) 266 TESTSCFLAG(Mlocked, mlocked) __TESTCLEARFLAG(Mlocked, mlocked)
260#else 267#else
261PAGEFLAG_FALSE(Mlocked) SETPAGEFLAG_NOOP(Mlocked) 268PAGEFLAG_FALSE(Mlocked) __CLEARPAGEFLAG_NOOP(Mlocked)
262 TESTCLEARFLAG_FALSE(Mlocked) __TESTCLEARFLAG_FALSE(Mlocked) 269 TESTSCFLAG_FALSE(Mlocked) __TESTCLEARFLAG_FALSE(Mlocked)
263#endif 270#endif
264 271
265#ifdef CONFIG_ARCH_USES_PG_UNCACHED 272#ifdef CONFIG_ARCH_USES_PG_UNCACHED
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h
index 777a524716db..5c831f1eca79 100644
--- a/include/linux/page_cgroup.h
+++ b/include/linux/page_cgroup.h
@@ -3,17 +3,15 @@
3 3
4enum { 4enum {
5 /* flags for mem_cgroup */ 5 /* flags for mem_cgroup */
6 PCG_LOCK, /* Lock for pc->mem_cgroup and following bits. */ 6 PCG_USED = 0x01, /* This page is charged to a memcg */
7 PCG_USED, /* this object is in use. */ 7 PCG_MEM = 0x02, /* This page holds a memory charge */
8 PCG_MIGRATION, /* under page migration */ 8 PCG_MEMSW = 0x04, /* This page holds a memory+swap charge */
9 __NR_PCG_FLAGS,
10}; 9};
11 10
12#ifndef __GENERATING_BOUNDS_H 11struct pglist_data;
13#include <generated/bounds.h>
14 12
15#ifdef CONFIG_MEMCG 13#ifdef CONFIG_MEMCG
16#include <linux/bit_spinlock.h> 14struct mem_cgroup;
17 15
18/* 16/*
19 * Page Cgroup can be considered as an extended mem_map. 17 * Page Cgroup can be considered as an extended mem_map.
@@ -27,65 +25,30 @@ struct page_cgroup {
27 struct mem_cgroup *mem_cgroup; 25 struct mem_cgroup *mem_cgroup;
28}; 26};
29 27
30void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat); 28extern void pgdat_page_cgroup_init(struct pglist_data *pgdat);
31 29
32#ifdef CONFIG_SPARSEMEM 30#ifdef CONFIG_SPARSEMEM
33static inline void __init page_cgroup_init_flatmem(void) 31static inline void page_cgroup_init_flatmem(void)
34{ 32{
35} 33}
36extern void __init page_cgroup_init(void); 34extern void page_cgroup_init(void);
37#else 35#else
38void __init page_cgroup_init_flatmem(void); 36extern void page_cgroup_init_flatmem(void);
39static inline void __init page_cgroup_init(void) 37static inline void page_cgroup_init(void)
40{ 38{
41} 39}
42#endif 40#endif
43 41
44struct page_cgroup *lookup_page_cgroup(struct page *page); 42struct page_cgroup *lookup_page_cgroup(struct page *page);
45struct page *lookup_cgroup_page(struct page_cgroup *pc);
46
47#define TESTPCGFLAG(uname, lname) \
48static inline int PageCgroup##uname(struct page_cgroup *pc) \
49 { return test_bit(PCG_##lname, &pc->flags); }
50
51#define SETPCGFLAG(uname, lname) \
52static inline void SetPageCgroup##uname(struct page_cgroup *pc)\
53 { set_bit(PCG_##lname, &pc->flags); }
54
55#define CLEARPCGFLAG(uname, lname) \
56static inline void ClearPageCgroup##uname(struct page_cgroup *pc) \
57 { clear_bit(PCG_##lname, &pc->flags); }
58
59#define TESTCLEARPCGFLAG(uname, lname) \
60static inline int TestClearPageCgroup##uname(struct page_cgroup *pc) \
61 { return test_and_clear_bit(PCG_##lname, &pc->flags); }
62
63TESTPCGFLAG(Used, USED)
64CLEARPCGFLAG(Used, USED)
65SETPCGFLAG(Used, USED)
66
67SETPCGFLAG(Migration, MIGRATION)
68CLEARPCGFLAG(Migration, MIGRATION)
69TESTPCGFLAG(Migration, MIGRATION)
70 43
71static inline void lock_page_cgroup(struct page_cgroup *pc) 44static inline int PageCgroupUsed(struct page_cgroup *pc)
72{ 45{
73 /* 46 return !!(pc->flags & PCG_USED);
74 * Don't take this lock in IRQ context.
75 * This lock is for pc->mem_cgroup, USED, MIGRATION
76 */
77 bit_spin_lock(PCG_LOCK, &pc->flags);
78} 47}
79 48#else /* !CONFIG_MEMCG */
80static inline void unlock_page_cgroup(struct page_cgroup *pc)
81{
82 bit_spin_unlock(PCG_LOCK, &pc->flags);
83}
84
85#else /* CONFIG_MEMCG */
86struct page_cgroup; 49struct page_cgroup;
87 50
88static inline void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat) 51static inline void pgdat_page_cgroup_init(struct pglist_data *pgdat)
89{ 52{
90} 53}
91 54
@@ -98,10 +61,9 @@ static inline void page_cgroup_init(void)
98{ 61{
99} 62}
100 63
101static inline void __init page_cgroup_init_flatmem(void) 64static inline void page_cgroup_init_flatmem(void)
102{ 65{
103} 66}
104
105#endif /* CONFIG_MEMCG */ 67#endif /* CONFIG_MEMCG */
106 68
107#include <linux/swap.h> 69#include <linux/swap.h>
@@ -140,6 +102,4 @@ static inline void swap_cgroup_swapoff(int type)
140 102
141#endif /* CONFIG_MEMCG_SWAP */ 103#endif /* CONFIG_MEMCG_SWAP */
142 104
143#endif /* !__GENERATING_BOUNDS_H */
144
145#endif /* __LINUX_PAGE_CGROUP_H */ 105#endif /* __LINUX_PAGE_CGROUP_H */
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index e1474ae18c88..3df8c7db7a4e 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -484,6 +484,9 @@ static inline int lock_page_killable(struct page *page)
484/* 484/*
485 * lock_page_or_retry - Lock the page, unless this would block and the 485 * lock_page_or_retry - Lock the page, unless this would block and the
486 * caller indicated that it can handle a retry. 486 * caller indicated that it can handle a retry.
487 *
488 * Return value and mmap_sem implications depend on flags; see
489 * __lock_page_or_retry().
487 */ 490 */
488static inline int lock_page_or_retry(struct page *page, struct mm_struct *mm, 491static inline int lock_page_or_retry(struct page *page, struct mm_struct *mm,
489 unsigned int flags) 492 unsigned int flags)
diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h
index 7246ef3d4455..1997ffc295a7 100644
--- a/include/linux/pid_namespace.h
+++ b/include/linux/pid_namespace.h
@@ -33,6 +33,7 @@ struct pid_namespace {
33#ifdef CONFIG_PROC_FS 33#ifdef CONFIG_PROC_FS
34 struct vfsmount *proc_mnt; 34 struct vfsmount *proc_mnt;
35 struct dentry *proc_self; 35 struct dentry *proc_self;
36 struct dentry *proc_thread_self;
36#endif 37#endif
37#ifdef CONFIG_BSD_PROCESS_ACCT 38#ifdef CONFIG_BSD_PROCESS_ACCT
38 struct bsd_acct_struct *bacct; 39 struct bsd_acct_struct *bacct;
diff --git a/include/linux/pinctrl/pinmux.h b/include/linux/pinctrl/pinmux.h
index c15395031cb3..3097aafbeb24 100644
--- a/include/linux/pinctrl/pinmux.h
+++ b/include/linux/pinctrl/pinmux.h
@@ -70,8 +70,6 @@ struct pinmux_ops {
70 unsigned * const num_groups); 70 unsigned * const num_groups);
71 int (*enable) (struct pinctrl_dev *pctldev, unsigned func_selector, 71 int (*enable) (struct pinctrl_dev *pctldev, unsigned func_selector,
72 unsigned group_selector); 72 unsigned group_selector);
73 void (*disable) (struct pinctrl_dev *pctldev, unsigned func_selector,
74 unsigned group_selector);
75 int (*gpio_request_enable) (struct pinctrl_dev *pctldev, 73 int (*gpio_request_enable) (struct pinctrl_dev *pctldev,
76 struct pinctrl_gpio_range *range, 74 struct pinctrl_gpio_range *range,
77 unsigned offset); 75 unsigned offset);
diff --git a/include/linux/platform_data/camera-mx1.h b/include/linux/platform_data/camera-mx1.h
deleted file mode 100644
index 4fd6c70314b4..000000000000
--- a/include/linux/platform_data/camera-mx1.h
+++ /dev/null
@@ -1,35 +0,0 @@
1/*
2 * mx1_camera.h - i.MX1/i.MXL camera driver header file
3 *
4 * Copyright (c) 2008, Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
5 * Copyright (C) 2009, Darius Augulis <augulis.darius@gmail.com>
6 *
7 * Based on PXA camera.h file:
8 * Copyright (C) 2003, Intel Corporation
9 * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de>
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 version 2 as
13 * published by the Free Software Foundation.
14 */
15
16#ifndef __ASM_ARCH_CAMERA_H_
17#define __ASM_ARCH_CAMERA_H_
18
19#define MX1_CAMERA_DATA_HIGH 1
20#define MX1_CAMERA_PCLK_RISING 2
21#define MX1_CAMERA_VSYNC_HIGH 4
22
23extern unsigned char mx1_camera_sof_fiq_start, mx1_camera_sof_fiq_end;
24
25/**
26 * struct mx1_camera_pdata - i.MX1/i.MXL camera platform data
27 * @mclk_10khz: master clock frequency in 10kHz units
28 * @flags: MX1 camera platform flags
29 */
30struct mx1_camera_pdata {
31 unsigned long mclk_10khz;
32 unsigned long flags;
33};
34
35#endif /* __ASM_ARCH_CAMERA_H_ */
diff --git a/include/linux/platform_data/dma-imx.h b/include/linux/platform_data/dma-imx.h
index d05542aafa3e..6a1357d31871 100644
--- a/include/linux/platform_data/dma-imx.h
+++ b/include/linux/platform_data/dma-imx.h
@@ -40,6 +40,7 @@ enum sdma_peripheral_type {
40 IMX_DMATYPE_ASRC, /* ASRC */ 40 IMX_DMATYPE_ASRC, /* ASRC */
41 IMX_DMATYPE_ESAI, /* ESAI */ 41 IMX_DMATYPE_ESAI, /* ESAI */
42 IMX_DMATYPE_SSI_DUAL, /* SSI Dual FIFO */ 42 IMX_DMATYPE_SSI_DUAL, /* SSI Dual FIFO */
43 IMX_DMATYPE_ASRC_SP, /* Shared ASRC */
43}; 44};
44 45
45enum imx_dma_prio { 46enum imx_dma_prio {
diff --git a/include/linux/platform_data/edma.h b/include/linux/platform_data/edma.h
index eb8d5627d080..bdb2710e2aab 100644
--- a/include/linux/platform_data/edma.h
+++ b/include/linux/platform_data/edma.h
@@ -150,6 +150,8 @@ void edma_clear_event(unsigned channel);
150void edma_pause(unsigned channel); 150void edma_pause(unsigned channel);
151void edma_resume(unsigned channel); 151void edma_resume(unsigned channel);
152 152
153void edma_assign_channel_eventq(unsigned channel, enum dma_event_q eventq_no);
154
153struct edma_rsv_info { 155struct edma_rsv_info {
154 156
155 const s16 (*rsv_chans)[2]; 157 const s16 (*rsv_chans)[2];
diff --git a/include/linux/platform_data/mmc-omap.h b/include/linux/platform_data/mmc-omap.h
index 2bf1b30cb5dc..51e70cf25cbc 100644
--- a/include/linux/platform_data/mmc-omap.h
+++ b/include/linux/platform_data/mmc-omap.h
@@ -28,6 +28,7 @@
28 */ 28 */
29#define OMAP_HSMMC_SUPPORTS_DUAL_VOLT BIT(0) 29#define OMAP_HSMMC_SUPPORTS_DUAL_VOLT BIT(0)
30#define OMAP_HSMMC_BROKEN_MULTIBLOCK_READ BIT(1) 30#define OMAP_HSMMC_BROKEN_MULTIBLOCK_READ BIT(1)
31#define OMAP_HSMMC_SWAKEUP_MISSING BIT(2)
31 32
32struct mmc_card; 33struct mmc_card;
33 34
diff --git a/include/linux/platform_data/usb-ehci-mxc.h b/include/linux/platform_data/usb-ehci-mxc.h
index 7eb9d1329671..157e71f79f99 100644
--- a/include/linux/platform_data/usb-ehci-mxc.h
+++ b/include/linux/platform_data/usb-ehci-mxc.h
@@ -1,46 +1,6 @@
1#ifndef __INCLUDE_ASM_ARCH_MXC_EHCI_H 1#ifndef __INCLUDE_ASM_ARCH_MXC_EHCI_H
2#define __INCLUDE_ASM_ARCH_MXC_EHCI_H 2#define __INCLUDE_ASM_ARCH_MXC_EHCI_H
3 3
4/* values for portsc field */
5#define MXC_EHCI_PHY_LOW_POWER_SUSPEND (1 << 23)
6#define MXC_EHCI_FORCE_FS (1 << 24)
7#define MXC_EHCI_UTMI_8BIT (0 << 28)
8#define MXC_EHCI_UTMI_16BIT (1 << 28)
9#define MXC_EHCI_SERIAL (1 << 29)
10#define MXC_EHCI_MODE_UTMI (0 << 30)
11#define MXC_EHCI_MODE_PHILIPS (1 << 30)
12#define MXC_EHCI_MODE_ULPI (2 << 30)
13#define MXC_EHCI_MODE_SERIAL (3 << 30)
14
15/* values for flags field */
16#define MXC_EHCI_INTERFACE_DIFF_UNI (0 << 0)
17#define MXC_EHCI_INTERFACE_DIFF_BI (1 << 0)
18#define MXC_EHCI_INTERFACE_SINGLE_UNI (2 << 0)
19#define MXC_EHCI_INTERFACE_SINGLE_BI (3 << 0)
20#define MXC_EHCI_INTERFACE_MASK (0xf)
21
22#define MXC_EHCI_POWER_PINS_ENABLED (1 << 5)
23#define MXC_EHCI_PWR_PIN_ACTIVE_HIGH (1 << 6)
24#define MXC_EHCI_OC_PIN_ACTIVE_LOW (1 << 7)
25#define MXC_EHCI_TTL_ENABLED (1 << 8)
26
27#define MXC_EHCI_INTERNAL_PHY (1 << 9)
28#define MXC_EHCI_IPPUE_DOWN (1 << 10)
29#define MXC_EHCI_IPPUE_UP (1 << 11)
30#define MXC_EHCI_WAKEUP_ENABLED (1 << 12)
31#define MXC_EHCI_ITC_NO_THRESHOLD (1 << 13)
32
33#define MXC_USBCTRL_OFFSET 0
34#define MXC_USB_PHY_CTR_FUNC_OFFSET 0x8
35#define MXC_USB_PHY_CTR_FUNC2_OFFSET 0xc
36#define MXC_USBH2CTRL_OFFSET 0x14
37
38#define MX5_USBOTHER_REGS_OFFSET 0x800
39
40/* USB_PHY_CTRL_FUNC2*/
41#define MX5_USB_UTMI_PHYCTRL1_PLLDIV_MASK 0x3
42#define MX5_USB_UTMI_PHYCTRL1_PLLDIV_SHIFT 0
43
44struct mxc_usbh_platform_data { 4struct mxc_usbh_platform_data {
45 int (*init)(struct platform_device *pdev); 5 int (*init)(struct platform_device *pdev);
46 int (*exit)(struct platform_device *pdev); 6 int (*exit)(struct platform_device *pdev);
@@ -49,11 +9,5 @@ struct mxc_usbh_platform_data {
49 struct usb_phy *otg; 9 struct usb_phy *otg;
50}; 10};
51 11
52int mx51_initialize_usb_hw(int port, unsigned int flags);
53int mx25_initialize_usb_hw(int port, unsigned int flags);
54int mx31_initialize_usb_hw(int port, unsigned int flags);
55int mx35_initialize_usb_hw(int port, unsigned int flags);
56int mx27_initialize_usb_hw(int port, unsigned int flags);
57
58#endif /* __INCLUDE_ASM_ARCH_MXC_EHCI_H */ 12#endif /* __INCLUDE_ASM_ARCH_MXC_EHCI_H */
59 13
diff --git a/include/linux/platform_data/usb-imx_udc.h b/include/linux/platform_data/usb-imx_udc.h
deleted file mode 100644
index be273371f34a..000000000000
--- a/include/linux/platform_data/usb-imx_udc.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * Copyright (C) 2008 Darius Augulis <augulis.darius@gmail.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14
15#ifndef __ASM_ARCH_MXC_USB
16#define __ASM_ARCH_MXC_USB
17
18struct imxusb_platform_data {
19 int (*init)(struct device *);
20 void (*exit)(struct device *);
21};
22
23#endif /* __ASM_ARCH_MXC_USB */
diff --git a/include/linux/platform_data/video-clcd-versatile.h b/include/linux/platform_data/video-clcd-versatile.h
new file mode 100644
index 000000000000..09ccf182af4d
--- /dev/null
+++ b/include/linux/platform_data/video-clcd-versatile.h
@@ -0,0 +1,27 @@
1#ifndef PLAT_CLCD_H
2#define PLAT_CLCD_H
3
4#ifdef CONFIG_PLAT_VERSATILE_CLCD
5struct clcd_panel *versatile_clcd_get_panel(const char *);
6int versatile_clcd_setup_dma(struct clcd_fb *, unsigned long);
7int versatile_clcd_mmap_dma(struct clcd_fb *, struct vm_area_struct *);
8void versatile_clcd_remove_dma(struct clcd_fb *);
9#else
10static inline struct clcd_panel *versatile_clcd_get_panel(const char *s)
11{
12 return NULL;
13}
14static inline int versatile_clcd_setup_dma(struct clcd_fb *fb, unsigned long framesize)
15{
16 return -ENODEV;
17}
18static inline int versatile_clcd_mmap_dma(struct clcd_fb *fb, struct vm_area_struct *vm)
19{
20 return -ENODEV;
21}
22static inline void versatile_clcd_remove_dma(struct clcd_fb *fb)
23{
24}
25#endif
26
27#endif
diff --git a/include/linux/printk.h b/include/linux/printk.h
index 319ff7e53efb..d78125f73ac4 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -10,6 +10,9 @@
10extern const char linux_banner[]; 10extern const char linux_banner[];
11extern const char linux_proc_banner[]; 11extern const char linux_proc_banner[];
12 12
13extern char *log_buf_addr_get(void);
14extern u32 log_buf_len_get(void);
15
13static inline int printk_get_level(const char *buffer) 16static inline int printk_get_level(const char *buffer)
14{ 17{
15 if (buffer[0] == KERN_SOH_ASCII && buffer[1]) { 18 if (buffer[0] == KERN_SOH_ASCII && buffer[1]) {
@@ -31,7 +34,7 @@ static inline const char *printk_skip_level(const char *buffer)
31} 34}
32 35
33/* printk's without a loglevel use this.. */ 36/* printk's without a loglevel use this.. */
34#define DEFAULT_MESSAGE_LOGLEVEL CONFIG_DEFAULT_MESSAGE_LOGLEVEL 37#define MESSAGE_LOGLEVEL_DEFAULT CONFIG_MESSAGE_LOGLEVEL_DEFAULT
35 38
36/* We show everything that is MORE important than this.. */ 39/* We show everything that is MORE important than this.. */
37#define CONSOLE_LOGLEVEL_SILENT 0 /* Mum's the word */ 40#define CONSOLE_LOGLEVEL_SILENT 0 /* Mum's the word */
diff --git a/include/linux/quota.h b/include/linux/quota.h
index 0f3c5d38da1f..80d345a3524c 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -390,7 +390,6 @@ struct quota_info {
390 unsigned int flags; /* Flags for diskquotas on this device */ 390 unsigned int flags; /* Flags for diskquotas on this device */
391 struct mutex dqio_mutex; /* lock device while I/O in progress */ 391 struct mutex dqio_mutex; /* lock device while I/O in progress */
392 struct mutex dqonoff_mutex; /* Serialize quotaon & quotaoff */ 392 struct mutex dqonoff_mutex; /* Serialize quotaon & quotaoff */
393 struct rw_semaphore dqptr_sem; /* serialize ops using quota_info struct, pointers from inode to dquots */
394 struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */ 393 struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */
395 struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */ 394 struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */
396 const struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ 395 const struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */
diff --git a/include/linux/rculist.h b/include/linux/rculist.h
index 8183b46fbaa2..372ad5e0dcb8 100644
--- a/include/linux/rculist.h
+++ b/include/linux/rculist.h
@@ -432,9 +432,9 @@ static inline void hlist_add_before_rcu(struct hlist_node *n,
432} 432}
433 433
434/** 434/**
435 * hlist_add_after_rcu 435 * hlist_add_behind_rcu
436 * @prev: the existing element to add the new element after.
437 * @n: the new element to add to the hash list. 436 * @n: the new element to add to the hash list.
437 * @prev: the existing element to add the new element after.
438 * 438 *
439 * Description: 439 * Description:
440 * Adds the specified element to the specified hlist 440 * Adds the specified element to the specified hlist
@@ -449,8 +449,8 @@ static inline void hlist_add_before_rcu(struct hlist_node *n,
449 * hlist_for_each_entry_rcu(), used to prevent memory-consistency 449 * hlist_for_each_entry_rcu(), used to prevent memory-consistency
450 * problems on Alpha CPUs. 450 * problems on Alpha CPUs.
451 */ 451 */
452static inline void hlist_add_after_rcu(struct hlist_node *prev, 452static inline void hlist_add_behind_rcu(struct hlist_node *n,
453 struct hlist_node *n) 453 struct hlist_node *prev)
454{ 454{
455 n->next = prev->next; 455 n->next = prev->next;
456 n->pprev = &prev->next; 456 n->pprev = &prev->next;
diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h
index 9cda293c867d..36826c0166c5 100644
--- a/include/linux/rhashtable.h
+++ b/include/linux/rhashtable.h
@@ -21,7 +21,7 @@
21#include <linux/rculist.h> 21#include <linux/rculist.h>
22 22
23struct rhash_head { 23struct rhash_head {
24 struct rhash_head *next; 24 struct rhash_head __rcu *next;
25}; 25};
26 26
27#define INIT_HASH_HEAD(ptr) ((ptr)->next = NULL) 27#define INIT_HASH_HEAD(ptr) ((ptr)->next = NULL)
@@ -97,7 +97,7 @@ u32 rhashtable_obj_hashfn(const struct rhashtable *ht, void *ptr);
97void rhashtable_insert(struct rhashtable *ht, struct rhash_head *node, gfp_t); 97void rhashtable_insert(struct rhashtable *ht, struct rhash_head *node, gfp_t);
98bool rhashtable_remove(struct rhashtable *ht, struct rhash_head *node, gfp_t); 98bool rhashtable_remove(struct rhashtable *ht, struct rhash_head *node, gfp_t);
99void rhashtable_remove_pprev(struct rhashtable *ht, struct rhash_head *obj, 99void rhashtable_remove_pprev(struct rhashtable *ht, struct rhash_head *obj,
100 struct rhash_head **pprev, gfp_t flags); 100 struct rhash_head __rcu **pprev, gfp_t flags);
101 101
102bool rht_grow_above_75(const struct rhashtable *ht, size_t new_size); 102bool rht_grow_above_75(const struct rhashtable *ht, size_t new_size);
103bool rht_shrink_below_30(const struct rhashtable *ht, size_t new_size); 103bool rht_shrink_below_30(const struct rhashtable *ht, size_t new_size);
@@ -117,18 +117,12 @@ void rhashtable_destroy(const struct rhashtable *ht);
117#define rht_dereference_rcu(p, ht) \ 117#define rht_dereference_rcu(p, ht) \
118 rcu_dereference_check(p, lockdep_rht_mutex_is_held(ht)) 118 rcu_dereference_check(p, lockdep_rht_mutex_is_held(ht))
119 119
120/* Internal, use rht_obj() instead */
121#define rht_entry(ptr, type, member) container_of(ptr, type, member) 120#define rht_entry(ptr, type, member) container_of(ptr, type, member)
122#define rht_entry_safe(ptr, type, member) \ 121#define rht_entry_safe(ptr, type, member) \
123({ \ 122({ \
124 typeof(ptr) __ptr = (ptr); \ 123 typeof(ptr) __ptr = (ptr); \
125 __ptr ? rht_entry(__ptr, type, member) : NULL; \ 124 __ptr ? rht_entry(__ptr, type, member) : NULL; \
126}) 125})
127#define rht_entry_safe_rcu(ptr, type, member) \
128({ \
129 typeof(*ptr) __rcu *__ptr = (typeof(*ptr) __rcu __force *)ptr; \
130 __ptr ? container_of((typeof(ptr))rcu_dereference_raw(__ptr), type, member) : NULL; \
131})
132 126
133#define rht_next_entry_safe(pos, ht, member) \ 127#define rht_next_entry_safe(pos, ht, member) \
134({ \ 128({ \
@@ -205,9 +199,10 @@ void rhashtable_destroy(const struct rhashtable *ht);
205 * traversal is guarded by rcu_read_lock(). 199 * traversal is guarded by rcu_read_lock().
206 */ 200 */
207#define rht_for_each_entry_rcu(pos, head, member) \ 201#define rht_for_each_entry_rcu(pos, head, member) \
208 for (pos = rht_entry_safe_rcu(head, typeof(*(pos)), member); \ 202 for (pos = rht_entry_safe(rcu_dereference_raw(head), \
203 typeof(*(pos)), member); \
209 pos; \ 204 pos; \
210 pos = rht_entry_safe_rcu((pos)->member.next, \ 205 pos = rht_entry_safe(rcu_dereference_raw((pos)->member.next), \
211 typeof(*(pos)), member)) 206 typeof(*(pos)), member))
212 207
213#endif /* _LINUX_RHASHTABLE_H */ 208#endif /* _LINUX_RHASHTABLE_H */
diff --git a/include/linux/rio_drv.h b/include/linux/rio_drv.h
index 5059994fe297..9fc2f213e74f 100644
--- a/include/linux/rio_drv.h
+++ b/include/linux/rio_drv.h
@@ -384,11 +384,16 @@ void rio_dev_put(struct rio_dev *);
384 384
385#ifdef CONFIG_RAPIDIO_DMA_ENGINE 385#ifdef CONFIG_RAPIDIO_DMA_ENGINE
386extern struct dma_chan *rio_request_dma(struct rio_dev *rdev); 386extern struct dma_chan *rio_request_dma(struct rio_dev *rdev);
387extern struct dma_chan *rio_request_mport_dma(struct rio_mport *mport);
387extern void rio_release_dma(struct dma_chan *dchan); 388extern void rio_release_dma(struct dma_chan *dchan);
388extern struct dma_async_tx_descriptor *rio_dma_prep_slave_sg( 389extern struct dma_async_tx_descriptor *rio_dma_prep_slave_sg(
389 struct rio_dev *rdev, struct dma_chan *dchan, 390 struct rio_dev *rdev, struct dma_chan *dchan,
390 struct rio_dma_data *data, 391 struct rio_dma_data *data,
391 enum dma_transfer_direction direction, unsigned long flags); 392 enum dma_transfer_direction direction, unsigned long flags);
393extern struct dma_async_tx_descriptor *rio_dma_prep_xfer(
394 struct dma_chan *dchan, u16 destid,
395 struct rio_dma_data *data,
396 enum dma_transfer_direction direction, unsigned long flags);
392#endif 397#endif
393 398
394/** 399/**
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h
index f4ec8bbcb372..ed8f9e70df9b 100644
--- a/include/linux/scatterlist.h
+++ b/include/linux/scatterlist.h
@@ -136,7 +136,7 @@ static inline void sg_set_buf(struct scatterlist *sg, const void *buf,
136static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents, 136static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents,
137 struct scatterlist *sgl) 137 struct scatterlist *sgl)
138{ 138{
139#ifndef ARCH_HAS_SG_CHAIN 139#ifndef CONFIG_ARCH_HAS_SG_CHAIN
140 BUG(); 140 BUG();
141#endif 141#endif
142 142
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 84729f7c472c..5c2c885ee52b 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -33,6 +33,7 @@ struct sched_param {
33 33
34#include <linux/smp.h> 34#include <linux/smp.h>
35#include <linux/sem.h> 35#include <linux/sem.h>
36#include <linux/shm.h>
36#include <linux/signal.h> 37#include <linux/signal.h>
37#include <linux/compiler.h> 38#include <linux/compiler.h>
38#include <linux/completion.h> 39#include <linux/completion.h>
@@ -1384,6 +1385,7 @@ struct task_struct {
1384#ifdef CONFIG_SYSVIPC 1385#ifdef CONFIG_SYSVIPC
1385/* ipc stuff */ 1386/* ipc stuff */
1386 struct sysv_sem sysvsem; 1387 struct sysv_sem sysvsem;
1388 struct sysv_shm sysvshm;
1387#endif 1389#endif
1388#ifdef CONFIG_DETECT_HUNG_TASK 1390#ifdef CONFIG_DETECT_HUNG_TASK
1389/* hung task detection */ 1391/* hung task detection */
@@ -1627,12 +1629,6 @@ struct task_struct {
1627 unsigned long trace_recursion; 1629 unsigned long trace_recursion;
1628#endif /* CONFIG_TRACING */ 1630#endif /* CONFIG_TRACING */
1629#ifdef CONFIG_MEMCG /* memcg uses this to do batch job */ 1631#ifdef CONFIG_MEMCG /* memcg uses this to do batch job */
1630 struct memcg_batch_info {
1631 int do_batch; /* incremented when batch uncharge started */
1632 struct mem_cgroup *memcg; /* target memcg of uncharge */
1633 unsigned long nr_pages; /* uncharged usage */
1634 unsigned long memsw_nr_pages; /* uncharged mem+swap usage */
1635 } memcg_batch;
1636 unsigned int memcg_kmem_skip_account; 1632 unsigned int memcg_kmem_skip_account;
1637 struct memcg_oom_info { 1633 struct memcg_oom_info {
1638 struct mem_cgroup *memcg; 1634 struct mem_cgroup *memcg;
@@ -2363,8 +2359,10 @@ static inline int on_sig_stack(unsigned long sp)
2363 2359
2364static inline int sas_ss_flags(unsigned long sp) 2360static inline int sas_ss_flags(unsigned long sp)
2365{ 2361{
2366 return (current->sas_ss_size == 0 ? SS_DISABLE 2362 if (!current->sas_ss_size)
2367 : on_sig_stack(sp) ? SS_ONSTACK : 0); 2363 return SS_DISABLE;
2364
2365 return on_sig_stack(sp) ? SS_ONSTACK : 0;
2368} 2366}
2369 2367
2370static inline unsigned long sigsp(unsigned long sp, struct ksignal *ksig) 2368static inline unsigned long sigsp(unsigned long sp, struct ksignal *ksig)
@@ -2966,15 +2964,10 @@ static inline void inc_syscw(struct task_struct *tsk)
2966 2964
2967#ifdef CONFIG_MEMCG 2965#ifdef CONFIG_MEMCG
2968extern void mm_update_next_owner(struct mm_struct *mm); 2966extern void mm_update_next_owner(struct mm_struct *mm);
2969extern void mm_init_owner(struct mm_struct *mm, struct task_struct *p);
2970#else 2967#else
2971static inline void mm_update_next_owner(struct mm_struct *mm) 2968static inline void mm_update_next_owner(struct mm_struct *mm)
2972{ 2969{
2973} 2970}
2974
2975static inline void mm_init_owner(struct mm_struct *mm, struct task_struct *p)
2976{
2977}
2978#endif /* CONFIG_MEMCG */ 2971#endif /* CONFIG_MEMCG */
2979 2972
2980static inline unsigned long task_rlimit(const struct task_struct *tsk, 2973static inline unsigned long task_rlimit(const struct task_struct *tsk,
diff --git a/include/linux/sh_dma.h b/include/linux/sh_dma.h
index b7b43b82231e..56b97eed28a4 100644
--- a/include/linux/sh_dma.h
+++ b/include/linux/sh_dma.h
@@ -95,19 +95,21 @@ struct sh_dmae_pdata {
95}; 95};
96 96
97/* DMAOR definitions */ 97/* DMAOR definitions */
98#define DMAOR_AE 0x00000004 98#define DMAOR_AE 0x00000004 /* Address Error Flag */
99#define DMAOR_NMIF 0x00000002 99#define DMAOR_NMIF 0x00000002
100#define DMAOR_DME 0x00000001 100#define DMAOR_DME 0x00000001 /* DMA Master Enable */
101 101
102/* Definitions for the SuperH DMAC */ 102/* Definitions for the SuperH DMAC */
103#define DM_INC 0x00004000 103#define DM_INC 0x00004000 /* Destination addresses are incremented */
104#define DM_DEC 0x00008000 104#define DM_DEC 0x00008000 /* Destination addresses are decremented */
105#define DM_FIX 0x0000c000 105#define DM_FIX 0x0000c000 /* Destination address is fixed */
106#define SM_INC 0x00001000 106#define SM_INC 0x00001000 /* Source addresses are incremented */
107#define SM_DEC 0x00002000 107#define SM_DEC 0x00002000 /* Source addresses are decremented */
108#define SM_FIX 0x00003000 108#define SM_FIX 0x00003000 /* Source address is fixed */
109#define CHCR_DE 0x00000001 109#define RS_AUTO 0x00000400 /* Auto Request */
110#define CHCR_TE 0x00000002 110#define RS_ERS 0x00000800 /* DMA extended resource selector */
111#define CHCR_IE 0x00000004 111#define CHCR_DE 0x00000001 /* DMA Enable */
112#define CHCR_TE 0x00000002 /* Transfer End Flag */
113#define CHCR_IE 0x00000004 /* Interrupt Enable */
112 114
113#endif 115#endif
diff --git a/include/linux/shm.h b/include/linux/shm.h
index 57d77709fbe2..6fb801686ad6 100644
--- a/include/linux/shm.h
+++ b/include/linux/shm.h
@@ -1,6 +1,7 @@
1#ifndef _LINUX_SHM_H_ 1#ifndef _LINUX_SHM_H_
2#define _LINUX_SHM_H_ 2#define _LINUX_SHM_H_
3 3
4#include <linux/list.h>
4#include <asm/page.h> 5#include <asm/page.h>
5#include <uapi/linux/shm.h> 6#include <uapi/linux/shm.h>
6#include <asm/shmparam.h> 7#include <asm/shmparam.h>
@@ -20,6 +21,7 @@ struct shmid_kernel /* private to the kernel */
20 21
21 /* The task created the shm object. NULL if the task is dead. */ 22 /* The task created the shm object. NULL if the task is dead. */
22 struct task_struct *shm_creator; 23 struct task_struct *shm_creator;
24 struct list_head shm_clist; /* list by creator */
23}; 25};
24 26
25/* shm_mode upper byte flags */ 27/* shm_mode upper byte flags */
@@ -44,11 +46,20 @@ struct shmid_kernel /* private to the kernel */
44#define SHM_HUGE_1GB (30 << SHM_HUGE_SHIFT) 46#define SHM_HUGE_1GB (30 << SHM_HUGE_SHIFT)
45 47
46#ifdef CONFIG_SYSVIPC 48#ifdef CONFIG_SYSVIPC
49struct sysv_shm {
50 struct list_head shm_clist;
51};
52
47long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr, 53long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr,
48 unsigned long shmlba); 54 unsigned long shmlba);
49extern int is_file_shm_hugepages(struct file *file); 55int is_file_shm_hugepages(struct file *file);
50extern void exit_shm(struct task_struct *task); 56void exit_shm(struct task_struct *task);
57#define shm_init_task(task) INIT_LIST_HEAD(&(task)->sysvshm.shm_clist)
51#else 58#else
59struct sysv_shm {
60 /* empty */
61};
62
52static inline long do_shmat(int shmid, char __user *shmaddr, 63static inline long do_shmat(int shmid, char __user *shmaddr,
53 int shmflg, unsigned long *addr, 64 int shmflg, unsigned long *addr,
54 unsigned long shmlba) 65 unsigned long shmlba)
@@ -62,6 +73,9 @@ static inline int is_file_shm_hugepages(struct file *file)
62static inline void exit_shm(struct task_struct *task) 73static inline void exit_shm(struct task_struct *task)
63{ 74{
64} 75}
76static inline void shm_init_task(struct task_struct *task)
77{
78}
65#endif 79#endif
66 80
67#endif /* _LINUX_SHM_H_ */ 81#endif /* _LINUX_SHM_H_ */
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h
index 4d1771c2d29f..50777b5b1e4c 100644
--- a/include/linux/shmem_fs.h
+++ b/include/linux/shmem_fs.h
@@ -1,6 +1,7 @@
1#ifndef __SHMEM_FS_H 1#ifndef __SHMEM_FS_H
2#define __SHMEM_FS_H 2#define __SHMEM_FS_H
3 3
4#include <linux/file.h>
4#include <linux/swap.h> 5#include <linux/swap.h>
5#include <linux/mempolicy.h> 6#include <linux/mempolicy.h>
6#include <linux/pagemap.h> 7#include <linux/pagemap.h>
@@ -11,6 +12,7 @@
11 12
12struct shmem_inode_info { 13struct shmem_inode_info {
13 spinlock_t lock; 14 spinlock_t lock;
15 unsigned int seals; /* shmem seals */
14 unsigned long flags; 16 unsigned long flags;
15 unsigned long alloced; /* data pages alloced to file */ 17 unsigned long alloced; /* data pages alloced to file */
16 union { 18 union {
@@ -65,4 +67,19 @@ static inline struct page *shmem_read_mapping_page(
65 mapping_gfp_mask(mapping)); 67 mapping_gfp_mask(mapping));
66} 68}
67 69
70#ifdef CONFIG_TMPFS
71
72extern int shmem_add_seals(struct file *file, unsigned int seals);
73extern int shmem_get_seals(struct file *file);
74extern long shmem_fcntl(struct file *file, unsigned int cmd, unsigned long arg);
75
76#else
77
78static inline long shmem_fcntl(struct file *f, unsigned int c, unsigned long a)
79{
80 return -EINVAL;
81}
82
83#endif
84
68#endif 85#endif
diff --git a/include/linux/signal.h b/include/linux/signal.h
index c9e65360c49a..750196fcc0a5 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -280,9 +280,8 @@ struct ksignal {
280 int sig; 280 int sig;
281}; 281};
282 282
283extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); 283extern int get_signal(struct ksignal *ksig);
284extern void signal_setup_done(int failed, struct ksignal *ksig, int stepping); 284extern void signal_setup_done(int failed, struct ksignal *ksig, int stepping);
285extern void signal_delivered(int sig, siginfo_t *info, struct k_sigaction *ka, struct pt_regs *regs, int stepping);
286extern void exit_signals(struct task_struct *tsk); 285extern void exit_signals(struct task_struct *tsk);
287extern void kernel_sigaction(int, __sighandler_t); 286extern void kernel_sigaction(int, __sighandler_t);
288 287
@@ -301,18 +300,6 @@ static inline void disallow_signal(int sig)
301 kernel_sigaction(sig, SIG_IGN); 300 kernel_sigaction(sig, SIG_IGN);
302} 301}
303 302
304/*
305 * Eventually that'll replace get_signal_to_deliver(); macro for now,
306 * to avoid nastiness with include order.
307 */
308#define get_signal(ksig) \
309({ \
310 struct ksignal *p = (ksig); \
311 p->sig = get_signal_to_deliver(&p->info, &p->ka, \
312 signal_pt_regs(), NULL);\
313 p->sig > 0; \
314})
315
316extern struct kmem_cache *sighand_cachep; 303extern struct kmem_cache *sighand_cachep;
317 304
318int unhandled_signal(struct task_struct *tsk, int sig); 305int unhandled_signal(struct task_struct *tsk, int sig);
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 11c270551d25..abde271c18ae 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2555,6 +2555,7 @@ int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, int shiftlen);
2555void skb_scrub_packet(struct sk_buff *skb, bool xnet); 2555void skb_scrub_packet(struct sk_buff *skb, bool xnet);
2556unsigned int skb_gso_transport_seglen(const struct sk_buff *skb); 2556unsigned int skb_gso_transport_seglen(const struct sk_buff *skb);
2557struct sk_buff *skb_segment(struct sk_buff *skb, netdev_features_t features); 2557struct sk_buff *skb_segment(struct sk_buff *skb, netdev_features_t features);
2558struct sk_buff *skb_vlan_untag(struct sk_buff *skb);
2558 2559
2559struct skb_checksum_ops { 2560struct skb_checksum_ops {
2560 __wsum (*update)(const void *mem, int len, __wsum wsum); 2561 __wsum (*update)(const void *mem, int len, __wsum wsum);
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h
index 790be1472792..8e030075fe79 100644
--- a/include/linux/sunrpc/auth.h
+++ b/include/linux/sunrpc/auth.h
@@ -103,6 +103,7 @@ struct rpc_auth_create_args {
103 103
104/* Flags for rpcauth_lookupcred() */ 104/* Flags for rpcauth_lookupcred() */
105#define RPCAUTH_LOOKUP_NEW 0x01 /* Accept an uninitialised cred */ 105#define RPCAUTH_LOOKUP_NEW 0x01 /* Accept an uninitialised cred */
106#define RPCAUTH_LOOKUP_RCU 0x02 /* lock-less lookup */
106 107
107/* 108/*
108 * Client authentication ops 109 * Client authentication ops
@@ -140,6 +141,7 @@ struct rpc_credops {
140 void *, __be32 *, void *); 141 void *, __be32 *, void *);
141 int (*crkey_timeout)(struct rpc_cred *); 142 int (*crkey_timeout)(struct rpc_cred *);
142 bool (*crkey_to_expire)(struct rpc_cred *); 143 bool (*crkey_to_expire)(struct rpc_cred *);
144 char * (*crstringify_acceptor)(struct rpc_cred *);
143}; 145};
144 146
145extern const struct rpc_authops authunix_ops; 147extern const struct rpc_authops authunix_ops;
@@ -153,6 +155,7 @@ void rpc_destroy_generic_auth(void);
153void rpc_destroy_authunix(void); 155void rpc_destroy_authunix(void);
154 156
155struct rpc_cred * rpc_lookup_cred(void); 157struct rpc_cred * rpc_lookup_cred(void);
158struct rpc_cred * rpc_lookup_cred_nonblock(void);
156struct rpc_cred * rpc_lookup_machine_cred(const char *service_name); 159struct rpc_cred * rpc_lookup_machine_cred(const char *service_name);
157int rpcauth_register(const struct rpc_authops *); 160int rpcauth_register(const struct rpc_authops *);
158int rpcauth_unregister(const struct rpc_authops *); 161int rpcauth_unregister(const struct rpc_authops *);
@@ -182,6 +185,7 @@ void rpcauth_clear_credcache(struct rpc_cred_cache *);
182int rpcauth_key_timeout_notify(struct rpc_auth *, 185int rpcauth_key_timeout_notify(struct rpc_auth *,
183 struct rpc_cred *); 186 struct rpc_cred *);
184bool rpcauth_cred_key_to_expire(struct rpc_cred *); 187bool rpcauth_cred_key_to_expire(struct rpc_cred *);
188char * rpcauth_stringify_acceptor(struct rpc_cred *);
185 189
186static inline 190static inline
187struct rpc_cred * get_rpccred(struct rpc_cred *cred) 191struct rpc_cred * get_rpccred(struct rpc_cred *cred)
diff --git a/include/linux/sunrpc/auth_gss.h b/include/linux/sunrpc/auth_gss.h
index f1cfd4c85cd0..36eebc451b41 100644
--- a/include/linux/sunrpc/auth_gss.h
+++ b/include/linux/sunrpc/auth_gss.h
@@ -69,8 +69,9 @@ struct gss_cl_ctx {
69 enum rpc_gss_proc gc_proc; 69 enum rpc_gss_proc gc_proc;
70 u32 gc_seq; 70 u32 gc_seq;
71 spinlock_t gc_seq_lock; 71 spinlock_t gc_seq_lock;
72 struct gss_ctx __rcu *gc_gss_ctx; 72 struct gss_ctx *gc_gss_ctx;
73 struct xdr_netobj gc_wire_ctx; 73 struct xdr_netobj gc_wire_ctx;
74 struct xdr_netobj gc_acceptor;
74 u32 gc_win; 75 u32 gc_win;
75 unsigned long gc_expiry; 76 unsigned long gc_expiry;
76 struct rcu_head gc_rcu; 77 struct rcu_head gc_rcu;
diff --git a/include/linux/sunrpc/gss_krb5.h b/include/linux/sunrpc/gss_krb5.h
index 5af2931cf58d..df02a4188487 100644
--- a/include/linux/sunrpc/gss_krb5.h
+++ b/include/linux/sunrpc/gss_krb5.h
@@ -81,7 +81,7 @@ struct gss_krb5_enctype {
81 struct xdr_netobj *in, 81 struct xdr_netobj *in,
82 struct xdr_netobj *out); /* complete key generation */ 82 struct xdr_netobj *out); /* complete key generation */
83 u32 (*encrypt_v2) (struct krb5_ctx *kctx, u32 offset, 83 u32 (*encrypt_v2) (struct krb5_ctx *kctx, u32 offset,
84 struct xdr_buf *buf, int ec, 84 struct xdr_buf *buf,
85 struct page **pages); /* v2 encryption function */ 85 struct page **pages); /* v2 encryption function */
86 u32 (*decrypt_v2) (struct krb5_ctx *kctx, u32 offset, 86 u32 (*decrypt_v2) (struct krb5_ctx *kctx, u32 offset,
87 struct xdr_buf *buf, u32 *headskip, 87 struct xdr_buf *buf, u32 *headskip,
@@ -310,7 +310,7 @@ gss_krb5_aes_make_key(const struct gss_krb5_enctype *gk5e,
310 310
311u32 311u32
312gss_krb5_aes_encrypt(struct krb5_ctx *kctx, u32 offset, 312gss_krb5_aes_encrypt(struct krb5_ctx *kctx, u32 offset,
313 struct xdr_buf *buf, int ec, 313 struct xdr_buf *buf,
314 struct page **pages); 314 struct page **pages);
315 315
316u32 316u32
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 1bc7cd05b22e..cf61ecd148e0 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -236,7 +236,7 @@ struct svc_rqst {
236 struct svc_cred rq_cred; /* auth info */ 236 struct svc_cred rq_cred; /* auth info */
237 void * rq_xprt_ctxt; /* transport specific context ptr */ 237 void * rq_xprt_ctxt; /* transport specific context ptr */
238 struct svc_deferred_req*rq_deferred; /* deferred request we are replaying */ 238 struct svc_deferred_req*rq_deferred; /* deferred request we are replaying */
239 int rq_usedeferral; /* use deferral */ 239 bool rq_usedeferral; /* use deferral */
240 240
241 size_t rq_xprt_hlen; /* xprt header len */ 241 size_t rq_xprt_hlen; /* xprt header len */
242 struct xdr_buf rq_arg; 242 struct xdr_buf rq_arg;
@@ -277,7 +277,7 @@ struct svc_rqst {
277 struct auth_domain * rq_gssclient; /* "gss/"-style peer info */ 277 struct auth_domain * rq_gssclient; /* "gss/"-style peer info */
278 int rq_cachetype; 278 int rq_cachetype;
279 struct svc_cacherep * rq_cacherep; /* cache info */ 279 struct svc_cacherep * rq_cacherep; /* cache info */
280 int rq_splice_ok; /* turned off in gss privacy 280 bool rq_splice_ok; /* turned off in gss privacy
281 * to prevent encrypting page 281 * to prevent encrypting page
282 * cache pages */ 282 * cache pages */
283 wait_queue_head_t rq_wait; /* synchronization */ 283 wait_queue_head_t rq_wait; /* synchronization */
diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h
index 5cf99a016368..975da754c778 100644
--- a/include/linux/sunrpc/svc_rdma.h
+++ b/include/linux/sunrpc/svc_rdma.h
@@ -174,8 +174,7 @@ struct svcxprt_rdma {
174 * page size of 4k, or 32k * 2 ops / 4k = 16 outstanding RDMA_READ. */ 174 * page size of 4k, or 32k * 2 ops / 4k = 16 outstanding RDMA_READ. */
175#define RPCRDMA_ORD (64/4) 175#define RPCRDMA_ORD (64/4)
176#define RPCRDMA_SQ_DEPTH_MULT 8 176#define RPCRDMA_SQ_DEPTH_MULT 8
177#define RPCRDMA_MAX_THREADS 16 177#define RPCRDMA_MAX_REQUESTS 32
178#define RPCRDMA_MAX_REQUESTS 16
179#define RPCRDMA_MAX_REQ_SIZE 4096 178#define RPCRDMA_MAX_REQ_SIZE 4096
180 179
181/* svc_rdma_marshal.c */ 180/* svc_rdma_marshal.c */
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h
index 7235040a19b2..ce6e4182a5b2 100644
--- a/include/linux/sunrpc/svc_xprt.h
+++ b/include/linux/sunrpc/svc_xprt.h
@@ -25,6 +25,7 @@ struct svc_xprt_ops {
25 void (*xpo_detach)(struct svc_xprt *); 25 void (*xpo_detach)(struct svc_xprt *);
26 void (*xpo_free)(struct svc_xprt *); 26 void (*xpo_free)(struct svc_xprt *);
27 int (*xpo_secure_port)(struct svc_rqst *); 27 int (*xpo_secure_port)(struct svc_rqst *);
28 void (*xpo_adjust_wspace)(struct svc_xprt *);
28}; 29};
29 30
30struct svc_xprt_class { 31struct svc_xprt_class {
@@ -33,6 +34,7 @@ struct svc_xprt_class {
33 struct svc_xprt_ops *xcl_ops; 34 struct svc_xprt_ops *xcl_ops;
34 struct list_head xcl_list; 35 struct list_head xcl_list;
35 u32 xcl_max_payload; 36 u32 xcl_max_payload;
37 int xcl_ident;
36}; 38};
37 39
38/* 40/*
diff --git a/include/linux/sunrpc/xprtrdma.h b/include/linux/sunrpc/xprtrdma.h
index c2f04e1ae159..64a0a0a97b23 100644
--- a/include/linux/sunrpc/xprtrdma.h
+++ b/include/linux/sunrpc/xprtrdma.h
@@ -62,8 +62,6 @@
62#define RPCRDMA_INLINE_PAD_THRESH (512)/* payload threshold to pad (bytes) */ 62#define RPCRDMA_INLINE_PAD_THRESH (512)/* payload threshold to pad (bytes) */
63 63
64/* memory registration strategies */ 64/* memory registration strategies */
65#define RPCRDMA_PERSISTENT_REGISTRATION (1)
66
67enum rpcrdma_memreg { 65enum rpcrdma_memreg {
68 RPCRDMA_BOUNCEBUFFERS = 0, 66 RPCRDMA_BOUNCEBUFFERS = 0,
69 RPCRDMA_REGISTER, 67 RPCRDMA_REGISTER,
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 4bdbee80eede..1b72060f093a 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -311,7 +311,6 @@ extern void lru_add_page_tail(struct page *page, struct page *page_tail,
311 struct lruvec *lruvec, struct list_head *head); 311 struct lruvec *lruvec, struct list_head *head);
312extern void activate_page(struct page *); 312extern void activate_page(struct page *);
313extern void mark_page_accessed(struct page *); 313extern void mark_page_accessed(struct page *);
314extern void init_page_accessed(struct page *page);
315extern void lru_add_drain(void); 314extern void lru_add_drain(void);
316extern void lru_add_drain_cpu(int cpu); 315extern void lru_add_drain_cpu(int cpu);
317extern void lru_add_drain_all(void); 316extern void lru_add_drain_all(void);
@@ -321,6 +320,9 @@ extern void swap_setup(void);
321 320
322extern void add_page_to_unevictable_list(struct page *page); 321extern void add_page_to_unevictable_list(struct page *page);
323 322
323extern void lru_cache_add_active_or_unevictable(struct page *page,
324 struct vm_area_struct *vma);
325
324/* linux/mm/vmscan.c */ 326/* linux/mm/vmscan.c */
325extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order, 327extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order,
326 gfp_t gfp_mask, nodemask_t *mask); 328 gfp_t gfp_mask, nodemask_t *mask);
@@ -379,9 +381,13 @@ static inline int mem_cgroup_swappiness(struct mem_cgroup *mem)
379} 381}
380#endif 382#endif
381#ifdef CONFIG_MEMCG_SWAP 383#ifdef CONFIG_MEMCG_SWAP
382extern void mem_cgroup_uncharge_swap(swp_entry_t ent); 384extern void mem_cgroup_swapout(struct page *page, swp_entry_t entry);
385extern void mem_cgroup_uncharge_swap(swp_entry_t entry);
383#else 386#else
384static inline void mem_cgroup_uncharge_swap(swp_entry_t ent) 387static inline void mem_cgroup_swapout(struct page *page, swp_entry_t entry)
388{
389}
390static inline void mem_cgroup_uncharge_swap(swp_entry_t entry)
385{ 391{
386} 392}
387#endif 393#endif
@@ -441,7 +447,7 @@ extern void swap_shmem_alloc(swp_entry_t);
441extern int swap_duplicate(swp_entry_t); 447extern int swap_duplicate(swp_entry_t);
442extern int swapcache_prepare(swp_entry_t); 448extern int swapcache_prepare(swp_entry_t);
443extern void swap_free(swp_entry_t); 449extern void swap_free(swp_entry_t);
444extern void swapcache_free(swp_entry_t, struct page *page); 450extern void swapcache_free(swp_entry_t);
445extern int free_swap_and_cache(swp_entry_t); 451extern int free_swap_and_cache(swp_entry_t);
446extern int swap_type_of(dev_t, sector_t, struct block_device **); 452extern int swap_type_of(dev_t, sector_t, struct block_device **);
447extern unsigned int count_swap_pages(int, int); 453extern unsigned int count_swap_pages(int, int);
@@ -505,7 +511,7 @@ static inline void swap_free(swp_entry_t swp)
505{ 511{
506} 512}
507 513
508static inline void swapcache_free(swp_entry_t swp, struct page *page) 514static inline void swapcache_free(swp_entry_t swp)
509{ 515{
510} 516}
511 517
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 701daff5d899..0f86d85a9ce4 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -317,6 +317,10 @@ asmlinkage long sys_restart_syscall(void);
317asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments, 317asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments,
318 struct kexec_segment __user *segments, 318 struct kexec_segment __user *segments,
319 unsigned long flags); 319 unsigned long flags);
320asmlinkage long sys_kexec_file_load(int kernel_fd, int initrd_fd,
321 unsigned long cmdline_len,
322 const char __user *cmdline_ptr,
323 unsigned long flags);
320 324
321asmlinkage long sys_exit(int error_code); 325asmlinkage long sys_exit(int error_code);
322asmlinkage long sys_exit_group(int error_code); 326asmlinkage long sys_exit_group(int error_code);
@@ -802,6 +806,7 @@ asmlinkage long sys_timerfd_settime(int ufd, int flags,
802asmlinkage long sys_timerfd_gettime(int ufd, struct itimerspec __user *otmr); 806asmlinkage long sys_timerfd_gettime(int ufd, struct itimerspec __user *otmr);
803asmlinkage long sys_eventfd(unsigned int count); 807asmlinkage long sys_eventfd(unsigned int count);
804asmlinkage long sys_eventfd2(unsigned int count, int flags); 808asmlinkage long sys_eventfd2(unsigned int count, int flags);
809asmlinkage long sys_memfd_create(const char __user *uname_ptr, unsigned int flags);
805asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len); 810asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len);
806asmlinkage long sys_old_readdir(unsigned int, struct old_linux_dirent __user *, unsigned int); 811asmlinkage long sys_old_readdir(unsigned int, struct old_linux_dirent __user *, unsigned int);
807asmlinkage long sys_pselect6(int, fd_set __user *, fd_set __user *, 812asmlinkage long sys_pselect6(int, fd_set __user *, fd_set __user *,
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 14a8ff2de11e..b7361f831226 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -34,8 +34,6 @@ struct ctl_table_root;
34struct ctl_table_header; 34struct ctl_table_header;
35struct ctl_dir; 35struct ctl_dir;
36 36
37typedef struct ctl_table ctl_table;
38
39typedef int proc_handler (struct ctl_table *ctl, int write, 37typedef int proc_handler (struct ctl_table *ctl, int write,
40 void __user *buffer, size_t *lenp, loff_t *ppos); 38 void __user *buffer, size_t *lenp, loff_t *ppos);
41 39
diff --git a/include/linux/tegra-ahb.h b/include/linux/tegra-ahb.h
deleted file mode 100644
index f1cd075ceee1..000000000000
--- a/include/linux/tegra-ahb.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 */
13
14#ifndef __LINUX_AHB_H__
15#define __LINUX_AHB_H__
16
17extern int tegra_ahb_enable_smmu(struct device_node *ahb);
18
19#endif /* __LINUX_AHB_H__ */
diff --git a/include/linux/tegra-cpuidle.h b/include/linux/tegra-cpuidle.h
deleted file mode 100644
index 9c6286bbf662..000000000000
--- a/include/linux/tegra-cpuidle.h
+++ /dev/null
@@ -1,25 +0,0 @@
1/*
2 * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 */
13
14#ifndef __LINUX_TEGRA_CPUIDLE_H__
15#define __LINUX_TEGRA_CPUIDLE_H__
16
17#ifdef CONFIG_CPU_IDLE
18void tegra_cpuidle_pcie_irqs_in_use(void);
19#else
20static inline void tegra_cpuidle_pcie_irqs_in_use(void)
21{
22}
23#endif
24
25#endif
diff --git a/include/linux/tegra-powergate.h b/include/linux/tegra-powergate.h
deleted file mode 100644
index 46f0a07812b4..000000000000
--- a/include/linux/tegra-powergate.h
+++ /dev/null
@@ -1,134 +0,0 @@
1/*
2 * Copyright (c) 2010 Google, Inc
3 *
4 * Author:
5 * Colin Cross <ccross@google.com>
6 *
7 * This software is licensed under the terms of the GNU General Public
8 * License version 2, as published by the Free Software Foundation, and
9 * may be copied, distributed, and modified under those terms.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 */
17
18#ifndef _MACH_TEGRA_POWERGATE_H_
19#define _MACH_TEGRA_POWERGATE_H_
20
21struct clk;
22struct reset_control;
23
24#define TEGRA_POWERGATE_CPU 0
25#define TEGRA_POWERGATE_3D 1
26#define TEGRA_POWERGATE_VENC 2
27#define TEGRA_POWERGATE_PCIE 3
28#define TEGRA_POWERGATE_VDEC 4
29#define TEGRA_POWERGATE_L2 5
30#define TEGRA_POWERGATE_MPE 6
31#define TEGRA_POWERGATE_HEG 7
32#define TEGRA_POWERGATE_SATA 8
33#define TEGRA_POWERGATE_CPU1 9
34#define TEGRA_POWERGATE_CPU2 10
35#define TEGRA_POWERGATE_CPU3 11
36#define TEGRA_POWERGATE_CELP 12
37#define TEGRA_POWERGATE_3D1 13
38#define TEGRA_POWERGATE_CPU0 14
39#define TEGRA_POWERGATE_C0NC 15
40#define TEGRA_POWERGATE_C1NC 16
41#define TEGRA_POWERGATE_SOR 17
42#define TEGRA_POWERGATE_DIS 18
43#define TEGRA_POWERGATE_DISB 19
44#define TEGRA_POWERGATE_XUSBA 20
45#define TEGRA_POWERGATE_XUSBB 21
46#define TEGRA_POWERGATE_XUSBC 22
47#define TEGRA_POWERGATE_VIC 23
48#define TEGRA_POWERGATE_IRAM 24
49
50#define TEGRA_POWERGATE_3D0 TEGRA_POWERGATE_3D
51
52#define TEGRA_IO_RAIL_CSIA 0
53#define TEGRA_IO_RAIL_CSIB 1
54#define TEGRA_IO_RAIL_DSI 2
55#define TEGRA_IO_RAIL_MIPI_BIAS 3
56#define TEGRA_IO_RAIL_PEX_BIAS 4
57#define TEGRA_IO_RAIL_PEX_CLK1 5
58#define TEGRA_IO_RAIL_PEX_CLK2 6
59#define TEGRA_IO_RAIL_USB0 9
60#define TEGRA_IO_RAIL_USB1 10
61#define TEGRA_IO_RAIL_USB2 11
62#define TEGRA_IO_RAIL_USB_BIAS 12
63#define TEGRA_IO_RAIL_NAND 13
64#define TEGRA_IO_RAIL_UART 14
65#define TEGRA_IO_RAIL_BB 15
66#define TEGRA_IO_RAIL_AUDIO 17
67#define TEGRA_IO_RAIL_HSIC 19
68#define TEGRA_IO_RAIL_COMP 22
69#define TEGRA_IO_RAIL_HDMI 28
70#define TEGRA_IO_RAIL_PEX_CNTRL 32
71#define TEGRA_IO_RAIL_SDMMC1 33
72#define TEGRA_IO_RAIL_SDMMC3 34
73#define TEGRA_IO_RAIL_SDMMC4 35
74#define TEGRA_IO_RAIL_CAM 36
75#define TEGRA_IO_RAIL_RES 37
76#define TEGRA_IO_RAIL_HV 38
77#define TEGRA_IO_RAIL_DSIB 39
78#define TEGRA_IO_RAIL_DSIC 40
79#define TEGRA_IO_RAIL_DSID 41
80#define TEGRA_IO_RAIL_CSIE 44
81#define TEGRA_IO_RAIL_LVDS 57
82#define TEGRA_IO_RAIL_SYS_DDC 58
83
84#ifdef CONFIG_ARCH_TEGRA
85int tegra_powergate_is_powered(int id);
86int tegra_powergate_power_on(int id);
87int tegra_powergate_power_off(int id);
88int tegra_powergate_remove_clamping(int id);
89
90/* Must be called with clk disabled, and returns with clk enabled */
91int tegra_powergate_sequence_power_up(int id, struct clk *clk,
92 struct reset_control *rst);
93
94int tegra_io_rail_power_on(int id);
95int tegra_io_rail_power_off(int id);
96#else
97static inline int tegra_powergate_is_powered(int id)
98{
99 return -ENOSYS;
100}
101
102static inline int tegra_powergate_power_on(int id)
103{
104 return -ENOSYS;
105}
106
107static inline int tegra_powergate_power_off(int id)
108{
109 return -ENOSYS;
110}
111
112static inline int tegra_powergate_remove_clamping(int id)
113{
114 return -ENOSYS;
115}
116
117static inline int tegra_powergate_sequence_power_up(int id, struct clk *clk,
118 struct reset_control *rst)
119{
120 return -ENOSYS;
121}
122
123static inline int tegra_io_rail_power_on(int id)
124{
125 return -ENOSYS;
126}
127
128static inline int tegra_io_rail_power_off(int id)
129{
130 return -ENOSYS;
131}
132#endif
133
134#endif /* _MACH_TEGRA_POWERGATE_H_ */
diff --git a/include/linux/tegra-soc.h b/include/linux/tegra-soc.h
deleted file mode 100644
index 95f611d78f3a..000000000000
--- a/include/linux/tegra-soc.h
+++ /dev/null
@@ -1,22 +0,0 @@
1/*
2 * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef __LINUX_TEGRA_SOC_H_
18#define __LINUX_TEGRA_SOC_H_
19
20u32 tegra_read_chipid(void);
21
22#endif /* __LINUX_TEGRA_SOC_H_ */
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index f7e11c7ea7d9..0305cde21a74 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -158,6 +158,42 @@ struct thermal_attr {
158 char name[THERMAL_NAME_LENGTH]; 158 char name[THERMAL_NAME_LENGTH];
159}; 159};
160 160
161/**
162 * struct thermal_zone_device - structure for a thermal zone
163 * @id: unique id number for each thermal zone
164 * @type: the thermal zone device type
165 * @device: &struct device for this thermal zone
166 * @trip_temp_attrs: attributes for trip points for sysfs: trip temperature
167 * @trip_type_attrs: attributes for trip points for sysfs: trip type
168 * @trip_hyst_attrs: attributes for trip points for sysfs: trip hysteresis
169 * @devdata: private pointer for device private data
170 * @trips: number of trip points the thermal zone supports
171 * @passive_delay: number of milliseconds to wait between polls when
172 * performing passive cooling. Currenty only used by the
173 * step-wise governor
174 * @polling_delay: number of milliseconds to wait between polls when
175 * checking whether trip points have been crossed (0 for
176 * interrupt driven systems)
177 * @temperature: current temperature. This is only for core code,
178 * drivers should use thermal_zone_get_temp() to get the
179 * current temperature
180 * @last_temperature: previous temperature read
181 * @emul_temperature: emulated temperature when using CONFIG_THERMAL_EMULATION
182 * @passive: 1 if you've crossed a passive trip point, 0 otherwise.
183 * Currenty only used by the step-wise governor.
184 * @forced_passive: If > 0, temperature at which to switch on all ACPI
185 * processor cooling devices. Currently only used by the
186 * step-wise governor.
187 * @ops: operations this &thermal_zone_device supports
188 * @tzp: thermal zone parameters
189 * @governor: pointer to the governor for this thermal zone
190 * @thermal_instances: list of &struct thermal_instance of this thermal zone
191 * @idr: &struct idr to generate unique id for this zone's cooling
192 * devices
193 * @lock: lock to protect thermal_instances list
194 * @node: node in thermal_tz_list (in thermal_core.c)
195 * @poll_queue: delayed work for polling
196 */
161struct thermal_zone_device { 197struct thermal_zone_device {
162 int id; 198 int id;
163 char type[THERMAL_NAME_LENGTH]; 199 char type[THERMAL_NAME_LENGTH];
@@ -179,12 +215,18 @@ struct thermal_zone_device {
179 struct thermal_governor *governor; 215 struct thermal_governor *governor;
180 struct list_head thermal_instances; 216 struct list_head thermal_instances;
181 struct idr idr; 217 struct idr idr;
182 struct mutex lock; /* protect thermal_instances list */ 218 struct mutex lock;
183 struct list_head node; 219 struct list_head node;
184 struct delayed_work poll_queue; 220 struct delayed_work poll_queue;
185}; 221};
186 222
187/* Structure that holds thermal governor information */ 223/**
224 * struct thermal_governor - structure that holds thermal governor information
225 * @name: name of the governor
226 * @throttle: callback called for every trip point even if temperature is
227 * below the trip point temperature
228 * @governor_list: node in thermal_governor_list (in thermal_core.c)
229 */
188struct thermal_governor { 230struct thermal_governor {
189 char name[THERMAL_NAME_LENGTH]; 231 char name[THERMAL_NAME_LENGTH];
190 int (*throttle)(struct thermal_zone_device *tz, int trip); 232 int (*throttle)(struct thermal_zone_device *tz, int trip);
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
index 6f8ab7da27c4..84d497297c5f 100644
--- a/include/linux/tracehook.h
+++ b/include/linux/tracehook.h
@@ -133,10 +133,6 @@ static inline void tracehook_report_syscall_exit(struct pt_regs *regs, int step)
133 133
134/** 134/**
135 * tracehook_signal_handler - signal handler setup is complete 135 * tracehook_signal_handler - signal handler setup is complete
136 * @sig: number of signal being delivered
137 * @info: siginfo_t of signal being delivered
138 * @ka: sigaction setting that chose the handler
139 * @regs: user register state
140 * @stepping: nonzero if debugger single-step or block-step in use 136 * @stepping: nonzero if debugger single-step or block-step in use
141 * 137 *
142 * Called by the arch code after a signal handler has been set up. 138 * Called by the arch code after a signal handler has been set up.
@@ -146,9 +142,7 @@ static inline void tracehook_report_syscall_exit(struct pt_regs *regs, int step)
146 * Called without locks, shortly before returning to user mode 142 * Called without locks, shortly before returning to user mode
147 * (or handling more signals). 143 * (or handling more signals).
148 */ 144 */
149static inline void tracehook_signal_handler(int sig, siginfo_t *info, 145static inline void tracehook_signal_handler(int stepping)
150 const struct k_sigaction *ka,
151 struct pt_regs *regs, int stepping)
152{ 146{
153 if (stepping) 147 if (stepping)
154 ptrace_notify(SIGTRAP); 148 ptrace_notify(SIGTRAP);
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
index 2e2a5f7717e5..b1293f15f592 100644
--- a/include/linux/tracepoint.h
+++ b/include/linux/tracepoint.h
@@ -249,6 +249,50 @@ extern void syscall_unregfunc(void);
249 249
250#endif /* CONFIG_TRACEPOINTS */ 250#endif /* CONFIG_TRACEPOINTS */
251 251
252#ifdef CONFIG_TRACING
253/**
254 * tracepoint_string - register constant persistent string to trace system
255 * @str - a constant persistent string that will be referenced in tracepoints
256 *
257 * If constant strings are being used in tracepoints, it is faster and
258 * more efficient to just save the pointer to the string and reference
259 * that with a printf "%s" instead of saving the string in the ring buffer
260 * and wasting space and time.
261 *
262 * The problem with the above approach is that userspace tools that read
263 * the binary output of the trace buffers do not have access to the string.
264 * Instead they just show the address of the string which is not very
265 * useful to users.
266 *
267 * With tracepoint_string(), the string will be registered to the tracing
268 * system and exported to userspace via the debugfs/tracing/printk_formats
269 * file that maps the string address to the string text. This way userspace
270 * tools that read the binary buffers have a way to map the pointers to
271 * the ASCII strings they represent.
272 *
273 * The @str used must be a constant string and persistent as it would not
274 * make sense to show a string that no longer exists. But it is still fine
275 * to be used with modules, because when modules are unloaded, if they
276 * had tracepoints, the ring buffers are cleared too. As long as the string
277 * does not change during the life of the module, it is fine to use
278 * tracepoint_string() within a module.
279 */
280#define tracepoint_string(str) \
281 ({ \
282 static const char *___tp_str __tracepoint_string = str; \
283 ___tp_str; \
284 })
285#define __tracepoint_string __attribute__((section("__tracepoint_str")))
286#else
287/*
288 * tracepoint_string() is used to save the string address for userspace
289 * tracing tools. When tracing isn't configured, there's no need to save
290 * anything.
291 */
292# define tracepoint_string(str) str
293# define __tracepoint_string
294#endif
295
252/* 296/*
253 * The need for the DECLARE_TRACE_NOARGS() is to handle the prototype 297 * The need for the DECLARE_TRACE_NOARGS() is to handle the prototype
254 * (void). "void" is a special value in a function prototype and can 298 * (void). "void" is a special value in a function prototype and can
diff --git a/include/linux/uio.h b/include/linux/uio.h
index 09a7cffc224e..48d64e6ab292 100644
--- a/include/linux/uio.h
+++ b/include/linux/uio.h
@@ -84,7 +84,7 @@ unsigned long iov_iter_alignment(const struct iov_iter *i);
84void iov_iter_init(struct iov_iter *i, int direction, const struct iovec *iov, 84void iov_iter_init(struct iov_iter *i, int direction, const struct iovec *iov,
85 unsigned long nr_segs, size_t count); 85 unsigned long nr_segs, size_t count);
86ssize_t iov_iter_get_pages(struct iov_iter *i, struct page **pages, 86ssize_t iov_iter_get_pages(struct iov_iter *i, struct page **pages,
87 size_t maxsize, size_t *start); 87 unsigned maxpages, size_t *start);
88ssize_t iov_iter_get_pages_alloc(struct iov_iter *i, struct page ***pages, 88ssize_t iov_iter_get_pages_alloc(struct iov_iter *i, struct page ***pages,
89 size_t maxsize, size_t *start); 89 size_t maxsize, size_t *start);
90int iov_iter_npages(const struct iov_iter *i, int maxpages); 90int iov_iter_npages(const struct iov_iter *i, int maxpages);
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
index 4836ba3c1cd8..e95372654f09 100644
--- a/include/linux/user_namespace.h
+++ b/include/linux/user_namespace.h
@@ -57,9 +57,9 @@ static inline void put_user_ns(struct user_namespace *ns)
57} 57}
58 58
59struct seq_operations; 59struct seq_operations;
60extern struct seq_operations proc_uid_seq_operations; 60extern const struct seq_operations proc_uid_seq_operations;
61extern struct seq_operations proc_gid_seq_operations; 61extern const struct seq_operations proc_gid_seq_operations;
62extern struct seq_operations proc_projid_seq_operations; 62extern const struct seq_operations proc_projid_seq_operations;
63extern ssize_t proc_uid_map_write(struct file *, const char __user *, size_t, loff_t *); 63extern ssize_t proc_uid_map_write(struct file *, const char __user *, size_t, loff_t *);
64extern ssize_t proc_gid_map_write(struct file *, const char __user *, size_t, loff_t *); 64extern ssize_t proc_gid_map_write(struct file *, const char __user *, size_t, loff_t *);
65extern ssize_t proc_projid_map_write(struct file *, const char __user *, size_t, loff_t *); 65extern ssize_t proc_projid_map_write(struct file *, const char __user *, size_t, loff_t *);
diff --git a/include/linux/vfio.h b/include/linux/vfio.h
index 8ec980b5e3af..d3204115f15d 100644
--- a/include/linux/vfio.h
+++ b/include/linux/vfio.h
@@ -98,4 +98,27 @@ extern int vfio_external_user_iommu_id(struct vfio_group *group);
98extern long vfio_external_check_extension(struct vfio_group *group, 98extern long vfio_external_check_extension(struct vfio_group *group,
99 unsigned long arg); 99 unsigned long arg);
100 100
101struct pci_dev;
102#ifdef CONFIG_EEH
103extern void vfio_spapr_pci_eeh_open(struct pci_dev *pdev);
104extern void vfio_spapr_pci_eeh_release(struct pci_dev *pdev);
105extern long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group,
106 unsigned int cmd,
107 unsigned long arg);
108#else
109static inline void vfio_spapr_pci_eeh_open(struct pci_dev *pdev)
110{
111}
112
113static inline void vfio_spapr_pci_eeh_release(struct pci_dev *pdev)
114{
115}
116
117static inline long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group,
118 unsigned int cmd,
119 unsigned long arg)
120{
121 return -ENOTTY;
122}
123#endif /* CONFIG_EEH */
101#endif /* VFIO_H */ 124#endif /* VFIO_H */
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 4b8a89189a29..b87696fdf06a 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -113,7 +113,7 @@ extern struct vm_struct *remove_vm_area(const void *addr);
113extern struct vm_struct *find_vm_area(const void *addr); 113extern struct vm_struct *find_vm_area(const void *addr);
114 114
115extern int map_vm_area(struct vm_struct *area, pgprot_t prot, 115extern int map_vm_area(struct vm_struct *area, pgprot_t prot,
116 struct page ***pages); 116 struct page **pages);
117#ifdef CONFIG_MMU 117#ifdef CONFIG_MMU
118extern int map_kernel_range_noflush(unsigned long start, unsigned long size, 118extern int map_kernel_range_noflush(unsigned long start, unsigned long size,
119 pgprot_t prot, struct page **pages); 119 pgprot_t prot, struct page **pages);
diff --git a/include/linux/zbud.h b/include/linux/zbud.h
index 13af0d450bf6..f9d41a6e361f 100644
--- a/include/linux/zbud.h
+++ b/include/linux/zbud.h
@@ -11,7 +11,7 @@ struct zbud_ops {
11 11
12struct zbud_pool *zbud_create_pool(gfp_t gfp, struct zbud_ops *ops); 12struct zbud_pool *zbud_create_pool(gfp_t gfp, struct zbud_ops *ops);
13void zbud_destroy_pool(struct zbud_pool *pool); 13void zbud_destroy_pool(struct zbud_pool *pool);
14int zbud_alloc(struct zbud_pool *pool, unsigned int size, gfp_t gfp, 14int zbud_alloc(struct zbud_pool *pool, size_t size, gfp_t gfp,
15 unsigned long *handle); 15 unsigned long *handle);
16void zbud_free(struct zbud_pool *pool, unsigned long handle); 16void zbud_free(struct zbud_pool *pool, unsigned long handle);
17int zbud_reclaim_page(struct zbud_pool *pool, unsigned int retries); 17int zbud_reclaim_page(struct zbud_pool *pool, unsigned int retries);
diff --git a/include/linux/zlib.h b/include/linux/zlib.h
index 9c5a6b4de0a3..92dbbd3f6c75 100644
--- a/include/linux/zlib.h
+++ b/include/linux/zlib.h
@@ -83,11 +83,11 @@ struct internal_state;
83 83
84typedef struct z_stream_s { 84typedef struct z_stream_s {
85 const Byte *next_in; /* next input byte */ 85 const Byte *next_in; /* next input byte */
86 uInt avail_in; /* number of bytes available at next_in */ 86 uLong avail_in; /* number of bytes available at next_in */
87 uLong total_in; /* total nb of input bytes read so far */ 87 uLong total_in; /* total nb of input bytes read so far */
88 88
89 Byte *next_out; /* next output byte should be put there */ 89 Byte *next_out; /* next output byte should be put there */
90 uInt avail_out; /* remaining free space at next_out */ 90 uLong avail_out; /* remaining free space at next_out */
91 uLong total_out; /* total nb of bytes output so far */ 91 uLong total_out; /* total nb of bytes output so far */
92 92
93 char *msg; /* last error message, NULL if no error */ 93 char *msg; /* last error message, NULL if no error */
@@ -493,64 +493,6 @@ extern int deflateInit2 (z_streamp strm,
493 method). msg is set to null if there is no error message. deflateInit2 does 493 method). msg is set to null if there is no error message. deflateInit2 does
494 not perform any compression: this will be done by deflate(). 494 not perform any compression: this will be done by deflate().
495*/ 495*/
496
497#if 0
498extern int zlib_deflateSetDictionary (z_streamp strm,
499 const Byte *dictionary,
500 uInt dictLength);
501#endif
502/*
503 Initializes the compression dictionary from the given byte sequence
504 without producing any compressed output. This function must be called
505 immediately after deflateInit, deflateInit2 or deflateReset, before any
506 call of deflate. The compressor and decompressor must use exactly the same
507 dictionary (see inflateSetDictionary).
508
509 The dictionary should consist of strings (byte sequences) that are likely
510 to be encountered later in the data to be compressed, with the most commonly
511 used strings preferably put towards the end of the dictionary. Using a
512 dictionary is most useful when the data to be compressed is short and can be
513 predicted with good accuracy; the data can then be compressed better than
514 with the default empty dictionary.
515
516 Depending on the size of the compression data structures selected by
517 deflateInit or deflateInit2, a part of the dictionary may in effect be
518 discarded, for example if the dictionary is larger than the window size in
519 deflate or deflate2. Thus the strings most likely to be useful should be
520 put at the end of the dictionary, not at the front.
521
522 Upon return of this function, strm->adler is set to the Adler32 value
523 of the dictionary; the decompressor may later use this value to determine
524 which dictionary has been used by the compressor. (The Adler32 value
525 applies to the whole dictionary even if only a subset of the dictionary is
526 actually used by the compressor.)
527
528 deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
529 parameter is invalid (such as NULL dictionary) or the stream state is
530 inconsistent (for example if deflate has already been called for this stream
531 or if the compression method is bsort). deflateSetDictionary does not
532 perform any compression: this will be done by deflate().
533*/
534
535#if 0
536extern int zlib_deflateCopy (z_streamp dest, z_streamp source);
537#endif
538
539/*
540 Sets the destination stream as a complete copy of the source stream.
541
542 This function can be useful when several compression strategies will be
543 tried, for example when there are several ways of pre-processing the input
544 data with a filter. The streams that will be discarded should then be freed
545 by calling deflateEnd. Note that deflateCopy duplicates the internal
546 compression state which can be quite large, so this strategy is slow and
547 can consume lots of memory.
548
549 deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
550 enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
551 (such as zalloc being NULL). msg is left unchanged in both source and
552 destination.
553*/
554 496
555extern int zlib_deflateReset (z_streamp strm); 497extern int zlib_deflateReset (z_streamp strm);
556/* 498/*
@@ -568,27 +510,6 @@ static inline unsigned long deflateBound(unsigned long s)
568 return s + ((s + 7) >> 3) + ((s + 63) >> 6) + 11; 510 return s + ((s + 7) >> 3) + ((s + 63) >> 6) + 11;
569} 511}
570 512
571#if 0
572extern int zlib_deflateParams (z_streamp strm, int level, int strategy);
573#endif
574/*
575 Dynamically update the compression level and compression strategy. The
576 interpretation of level and strategy is as in deflateInit2. This can be
577 used to switch between compression and straight copy of the input data, or
578 to switch to a different kind of input data requiring a different
579 strategy. If the compression level is changed, the input available so far
580 is compressed with the old level (and may be flushed); the new level will
581 take effect only at the next call of deflate().
582
583 Before the call of deflateParams, the stream state must be set as for
584 a call of deflate(), since the currently available input may have to
585 be compressed and flushed. In particular, strm->avail_out must be non-zero.
586
587 deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
588 stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR
589 if strm->avail_out was zero.
590*/
591
592/* 513/*
593extern int inflateInit2 (z_streamp strm, int windowBits); 514extern int inflateInit2 (z_streamp strm, int windowBits);
594 515
@@ -631,45 +552,6 @@ extern int inflateInit2 (z_streamp strm, int windowBits);
631 and avail_out are unchanged.) 552 and avail_out are unchanged.)
632*/ 553*/
633 554
634extern int zlib_inflateSetDictionary (z_streamp strm,
635 const Byte *dictionary,
636 uInt dictLength);
637/*
638 Initializes the decompression dictionary from the given uncompressed byte
639 sequence. This function must be called immediately after a call of inflate,
640 if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
641 can be determined from the adler32 value returned by that call of inflate.
642 The compressor and decompressor must use exactly the same dictionary (see
643 deflateSetDictionary). For raw inflate, this function can be called
644 immediately after inflateInit2() or inflateReset() and before any call of
645 inflate() to set the dictionary. The application must insure that the
646 dictionary that was used for compression is provided.
647
648 inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
649 parameter is invalid (such as NULL dictionary) or the stream state is
650 inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
651 expected one (incorrect adler32 value). inflateSetDictionary does not
652 perform any decompression: this will be done by subsequent calls of
653 inflate().
654*/
655
656#if 0
657extern int zlib_inflateSync (z_streamp strm);
658#endif
659/*
660 Skips invalid compressed data until a full flush point (see above the
661 description of deflate with Z_FULL_FLUSH) can be found, or until all
662 available input is skipped. No output is provided.
663
664 inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
665 if no more input was provided, Z_DATA_ERROR if no flush point has been found,
666 or Z_STREAM_ERROR if the stream structure was inconsistent. In the success
667 case, the application may save the current current value of total_in which
668 indicates where valid compressed data was found. In the error case, the
669 application may repeatedly call inflateSync, providing more input each time,
670 until success or end of the input data.
671*/
672
673extern int zlib_inflateReset (z_streamp strm); 555extern int zlib_inflateReset (z_streamp strm);
674/* 556/*
675 This function is equivalent to inflateEnd followed by inflateInit, 557 This function is equivalent to inflateEnd followed by inflateInit,
diff --git a/include/linux/zpool.h b/include/linux/zpool.h
new file mode 100644
index 000000000000..f14bd75f08b3
--- /dev/null
+++ b/include/linux/zpool.h
@@ -0,0 +1,106 @@
1/*
2 * zpool memory storage api
3 *
4 * Copyright (C) 2014 Dan Streetman
5 *
6 * This is a common frontend for the zbud and zsmalloc memory
7 * storage pool implementations. Typically, this is used to
8 * store compressed memory.
9 */
10
11#ifndef _ZPOOL_H_
12#define _ZPOOL_H_
13
14struct zpool;
15
16struct zpool_ops {
17 int (*evict)(struct zpool *pool, unsigned long handle);
18};
19
20/*
21 * Control how a handle is mapped. It will be ignored if the
22 * implementation does not support it. Its use is optional.
23 * Note that this does not refer to memory protection, it
24 * refers to how the memory will be copied in/out if copying
25 * is necessary during mapping; read-write is the safest as
26 * it copies the existing memory in on map, and copies the
27 * changed memory back out on unmap. Write-only does not copy
28 * in the memory and should only be used for initialization.
29 * If in doubt, use ZPOOL_MM_DEFAULT which is read-write.
30 */
31enum zpool_mapmode {
32 ZPOOL_MM_RW, /* normal read-write mapping */
33 ZPOOL_MM_RO, /* read-only (no copy-out at unmap time) */
34 ZPOOL_MM_WO, /* write-only (no copy-in at map time) */
35
36 ZPOOL_MM_DEFAULT = ZPOOL_MM_RW
37};
38
39struct zpool *zpool_create_pool(char *type, gfp_t gfp, struct zpool_ops *ops);
40
41char *zpool_get_type(struct zpool *pool);
42
43void zpool_destroy_pool(struct zpool *pool);
44
45int zpool_malloc(struct zpool *pool, size_t size, gfp_t gfp,
46 unsigned long *handle);
47
48void zpool_free(struct zpool *pool, unsigned long handle);
49
50int zpool_shrink(struct zpool *pool, unsigned int pages,
51 unsigned int *reclaimed);
52
53void *zpool_map_handle(struct zpool *pool, unsigned long handle,
54 enum zpool_mapmode mm);
55
56void zpool_unmap_handle(struct zpool *pool, unsigned long handle);
57
58u64 zpool_get_total_size(struct zpool *pool);
59
60
61/**
62 * struct zpool_driver - driver implementation for zpool
63 * @type: name of the driver.
64 * @list: entry in the list of zpool drivers.
65 * @create: create a new pool.
66 * @destroy: destroy a pool.
67 * @malloc: allocate mem from a pool.
68 * @free: free mem from a pool.
69 * @shrink: shrink the pool.
70 * @map: map a handle.
71 * @unmap: unmap a handle.
72 * @total_size: get total size of a pool.
73 *
74 * This is created by a zpool implementation and registered
75 * with zpool.
76 */
77struct zpool_driver {
78 char *type;
79 struct module *owner;
80 atomic_t refcount;
81 struct list_head list;
82
83 void *(*create)(gfp_t gfp, struct zpool_ops *ops);
84 void (*destroy)(void *pool);
85
86 int (*malloc)(void *pool, size_t size, gfp_t gfp,
87 unsigned long *handle);
88 void (*free)(void *pool, unsigned long handle);
89
90 int (*shrink)(void *pool, unsigned int pages,
91 unsigned int *reclaimed);
92
93 void *(*map)(void *pool, unsigned long handle,
94 enum zpool_mapmode mm);
95 void (*unmap)(void *pool, unsigned long handle);
96
97 u64 (*total_size)(void *pool);
98};
99
100void zpool_register_driver(struct zpool_driver *driver);
101
102int zpool_unregister_driver(struct zpool_driver *driver);
103
104int zpool_evict(void *pool, unsigned long handle);
105
106#endif