aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/drm/exynos_drm.h5
-rw-r--r--include/linux/amba/bus.h7
-rw-r--r--include/linux/amba/pl022.h2
-rw-r--r--include/linux/blkdev.h18
-rw-r--r--include/linux/dma-attrs.h2
-rw-r--r--include/linux/dma-mapping.h13
-rw-r--r--include/linux/dmaengine.h1
-rw-r--r--include/linux/fs.h6
-rw-r--r--include/linux/fuse.h2
-rw-r--r--include/linux/i2c/twl.h12
-rw-r--r--include/linux/irq.h12
-rw-r--r--include/linux/irqdomain.h12
-rw-r--r--include/linux/kconfig.h22
-rw-r--r--include/linux/kgdb.h7
-rw-r--r--include/linux/kmod.h27
-rw-r--r--include/linux/kvm_host.h6
-rw-r--r--include/linux/lsm_audit.h96
-rw-r--r--include/linux/mfd/db5500-prcmu.h88
-rw-r--r--include/linux/mfd/rc5t583.h47
-rw-r--r--include/linux/mfd/twl6040.h27
-rw-r--r--include/linux/mm.h27
-rw-r--r--include/linux/mmc/card.h2
-rw-r--r--include/linux/netfilter_bridge.h9
-rw-r--r--include/linux/nfsd/Kbuild1
-rw-r--r--include/linux/pinctrl/machine.h4
-rw-r--r--include/linux/pm_qos.h4
-rw-r--r--include/linux/regulator/machine.h8
-rw-r--r--include/linux/serial_core.h2
-rw-r--r--include/linux/skbuff.h20
-rw-r--r--include/linux/stddef.h8
-rw-r--r--include/linux/swap.h14
-rw-r--r--include/linux/types.h6
-rw-r--r--include/linux/usb/otg.h1
-rw-r--r--include/linux/usb/serial.h8
-rw-r--r--include/linux/vgaarb.h2
-rw-r--r--include/net/bluetooth/hci.h3
-rw-r--r--include/net/bluetooth/hci_core.h12
-rw-r--r--include/net/bluetooth/mgmt.h2
-rw-r--r--include/net/dst.h7
-rw-r--r--include/net/ip6_fib.h48
-rw-r--r--include/net/mac80211.h2
-rw-r--r--include/net/red.h6
-rw-r--r--include/net/sock.h1
-rw-r--r--include/scsi/scsi_cmnd.h3
-rw-r--r--include/sound/core.h10
-rw-r--r--include/trace/events/sched.h2
-rw-r--r--include/xen/swiotlb-xen.h6
47 files changed, 378 insertions, 252 deletions
diff --git a/include/drm/exynos_drm.h b/include/drm/exynos_drm.h
index 3963116083ae..e478de4e5d56 100644
--- a/include/drm/exynos_drm.h
+++ b/include/drm/exynos_drm.h
@@ -85,7 +85,7 @@ struct drm_exynos_gem_mmap {
85struct drm_exynos_vidi_connection { 85struct drm_exynos_vidi_connection {
86 unsigned int connection; 86 unsigned int connection;
87 unsigned int extensions; 87 unsigned int extensions;
88 uint64_t *edid; 88 uint64_t edid;
89}; 89};
90 90
91struct drm_exynos_plane_set_zpos { 91struct drm_exynos_plane_set_zpos {
@@ -96,7 +96,8 @@ struct drm_exynos_plane_set_zpos {
96/* memory type definitions. */ 96/* memory type definitions. */
97enum e_drm_exynos_gem_mem_type { 97enum e_drm_exynos_gem_mem_type {
98 /* Physically Non-Continuous memory. */ 98 /* Physically Non-Continuous memory. */
99 EXYNOS_BO_NONCONTIG = 1 << 0 99 EXYNOS_BO_NONCONTIG = 1 << 0,
100 EXYNOS_BO_MASK = EXYNOS_BO_NONCONTIG
100}; 101};
101 102
102#define DRM_EXYNOS_GEM_CREATE 0x00 103#define DRM_EXYNOS_GEM_CREATE 0x00
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h
index 7847e197730a..8d54f79457ba 100644
--- a/include/linux/amba/bus.h
+++ b/include/linux/amba/bus.h
@@ -30,7 +30,6 @@ struct amba_device {
30 struct device dev; 30 struct device dev;
31 struct resource res; 31 struct resource res;
32 struct clk *pclk; 32 struct clk *pclk;
33 struct regulator *vcore;
34 u64 dma_mask; 33 u64 dma_mask;
35 unsigned int periphid; 34 unsigned int periphid;
36 unsigned int irq[AMBA_NR_IRQS]; 35 unsigned int irq[AMBA_NR_IRQS];
@@ -75,12 +74,6 @@ void amba_release_regions(struct amba_device *);
75#define amba_pclk_disable(d) \ 74#define amba_pclk_disable(d) \
76 do { if (!IS_ERR((d)->pclk)) clk_disable((d)->pclk); } while (0) 75 do { if (!IS_ERR((d)->pclk)) clk_disable((d)->pclk); } while (0)
77 76
78#define amba_vcore_enable(d) \
79 (IS_ERR((d)->vcore) ? 0 : regulator_enable((d)->vcore))
80
81#define amba_vcore_disable(d) \
82 do { if (!IS_ERR((d)->vcore)) regulator_disable((d)->vcore); } while (0)
83
84/* Some drivers don't use the struct amba_device */ 77/* Some drivers don't use the struct amba_device */
85#define AMBA_CONFIG_BITS(a) (((a) >> 24) & 0xff) 78#define AMBA_CONFIG_BITS(a) (((a) >> 24) & 0xff)
86#define AMBA_REV_BITS(a) (((a) >> 20) & 0x0f) 79#define AMBA_REV_BITS(a) (((a) >> 20) & 0x0f)
diff --git a/include/linux/amba/pl022.h b/include/linux/amba/pl022.h
index b8c51124ed19..76dd1b199a1b 100644
--- a/include/linux/amba/pl022.h
+++ b/include/linux/amba/pl022.h
@@ -25,6 +25,8 @@
25#ifndef _SSP_PL022_H 25#ifndef _SSP_PL022_H
26#define _SSP_PL022_H 26#define _SSP_PL022_H
27 27
28#include <linux/types.h>
29
28/** 30/**
29 * whether SSP is in loopback mode or not 31 * whether SSP is in loopback mode or not
30 */ 32 */
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 606cf339bb56..2aa24664a5b5 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -426,14 +426,10 @@ struct request_queue {
426 (1 << QUEUE_FLAG_SAME_COMP) | \ 426 (1 << QUEUE_FLAG_SAME_COMP) | \
427 (1 << QUEUE_FLAG_ADD_RANDOM)) 427 (1 << QUEUE_FLAG_ADD_RANDOM))
428 428
429static inline int queue_is_locked(struct request_queue *q) 429static inline void queue_lockdep_assert_held(struct request_queue *q)
430{ 430{
431#ifdef CONFIG_SMP 431 if (q->queue_lock)
432 spinlock_t *lock = q->queue_lock; 432 lockdep_assert_held(q->queue_lock);
433 return lock && spin_is_locked(lock);
434#else
435 return 1;
436#endif
437} 433}
438 434
439static inline void queue_flag_set_unlocked(unsigned int flag, 435static inline void queue_flag_set_unlocked(unsigned int flag,
@@ -445,7 +441,7 @@ static inline void queue_flag_set_unlocked(unsigned int flag,
445static inline int queue_flag_test_and_clear(unsigned int flag, 441static inline int queue_flag_test_and_clear(unsigned int flag,
446 struct request_queue *q) 442 struct request_queue *q)
447{ 443{
448 WARN_ON_ONCE(!queue_is_locked(q)); 444 queue_lockdep_assert_held(q);
449 445
450 if (test_bit(flag, &q->queue_flags)) { 446 if (test_bit(flag, &q->queue_flags)) {
451 __clear_bit(flag, &q->queue_flags); 447 __clear_bit(flag, &q->queue_flags);
@@ -458,7 +454,7 @@ static inline int queue_flag_test_and_clear(unsigned int flag,
458static inline int queue_flag_test_and_set(unsigned int flag, 454static inline int queue_flag_test_and_set(unsigned int flag,
459 struct request_queue *q) 455 struct request_queue *q)
460{ 456{
461 WARN_ON_ONCE(!queue_is_locked(q)); 457 queue_lockdep_assert_held(q);
462 458
463 if (!test_bit(flag, &q->queue_flags)) { 459 if (!test_bit(flag, &q->queue_flags)) {
464 __set_bit(flag, &q->queue_flags); 460 __set_bit(flag, &q->queue_flags);
@@ -470,7 +466,7 @@ static inline int queue_flag_test_and_set(unsigned int flag,
470 466
471static inline void queue_flag_set(unsigned int flag, struct request_queue *q) 467static inline void queue_flag_set(unsigned int flag, struct request_queue *q)
472{ 468{
473 WARN_ON_ONCE(!queue_is_locked(q)); 469 queue_lockdep_assert_held(q);
474 __set_bit(flag, &q->queue_flags); 470 __set_bit(flag, &q->queue_flags);
475} 471}
476 472
@@ -487,7 +483,7 @@ static inline int queue_in_flight(struct request_queue *q)
487 483
488static inline void queue_flag_clear(unsigned int flag, struct request_queue *q) 484static inline void queue_flag_clear(unsigned int flag, struct request_queue *q)
489{ 485{
490 WARN_ON_ONCE(!queue_is_locked(q)); 486 queue_lockdep_assert_held(q);
491 __clear_bit(flag, &q->queue_flags); 487 __clear_bit(flag, &q->queue_flags);
492} 488}
493 489
diff --git a/include/linux/dma-attrs.h b/include/linux/dma-attrs.h
index 71ad34eca6e3..547ab568d3ae 100644
--- a/include/linux/dma-attrs.h
+++ b/include/linux/dma-attrs.h
@@ -13,6 +13,8 @@
13enum dma_attr { 13enum dma_attr {
14 DMA_ATTR_WRITE_BARRIER, 14 DMA_ATTR_WRITE_BARRIER,
15 DMA_ATTR_WEAK_ORDERING, 15 DMA_ATTR_WEAK_ORDERING,
16 DMA_ATTR_WRITE_COMBINE,
17 DMA_ATTR_NON_CONSISTENT,
16 DMA_ATTR_MAX, 18 DMA_ATTR_MAX,
17}; 19};
18 20
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 5a736af3cc7a..dfc099e56a66 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -9,10 +9,15 @@
9#include <linux/scatterlist.h> 9#include <linux/scatterlist.h>
10 10
11struct dma_map_ops { 11struct dma_map_ops {
12 void* (*alloc_coherent)(struct device *dev, size_t size, 12 void* (*alloc)(struct device *dev, size_t size,
13 dma_addr_t *dma_handle, gfp_t gfp); 13 dma_addr_t *dma_handle, gfp_t gfp,
14 void (*free_coherent)(struct device *dev, size_t size, 14 struct dma_attrs *attrs);
15 void *vaddr, dma_addr_t dma_handle); 15 void (*free)(struct device *dev, size_t size,
16 void *vaddr, dma_addr_t dma_handle,
17 struct dma_attrs *attrs);
18 int (*mmap)(struct device *, struct vm_area_struct *,
19 void *, dma_addr_t, size_t, struct dma_attrs *attrs);
20
16 dma_addr_t (*map_page)(struct device *dev, struct page *page, 21 dma_addr_t (*map_page)(struct device *dev, struct page *page,
17 unsigned long offset, size_t size, 22 unsigned long offset, size_t size,
18 enum dma_data_direction dir, 23 enum dma_data_direction dir,
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 676f967390ae..f9a2e5e67a54 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -974,6 +974,7 @@ int dma_async_device_register(struct dma_device *device);
974void dma_async_device_unregister(struct dma_device *device); 974void dma_async_device_unregister(struct dma_device *device);
975void dma_run_dependencies(struct dma_async_tx_descriptor *tx); 975void dma_run_dependencies(struct dma_async_tx_descriptor *tx);
976struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type); 976struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type);
977struct dma_chan *net_dma_find_channel(void);
977#define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y) 978#define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y)
978 979
979/* --- Helper iov-locking functions --- */ 980/* --- Helper iov-locking functions --- */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 135693e79f2b..8de675523e46 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1215,6 +1215,7 @@ extern int vfs_setlease(struct file *, long, struct file_lock **);
1215extern int lease_modify(struct file_lock **, int); 1215extern int lease_modify(struct file_lock **, int);
1216extern int lock_may_read(struct inode *, loff_t start, unsigned long count); 1216extern int lock_may_read(struct inode *, loff_t start, unsigned long count);
1217extern int lock_may_write(struct inode *, loff_t start, unsigned long count); 1217extern int lock_may_write(struct inode *, loff_t start, unsigned long count);
1218extern void locks_delete_block(struct file_lock *waiter);
1218extern void lock_flocks(void); 1219extern void lock_flocks(void);
1219extern void unlock_flocks(void); 1220extern void unlock_flocks(void);
1220#else /* !CONFIG_FILE_LOCKING */ 1221#else /* !CONFIG_FILE_LOCKING */
@@ -1359,6 +1360,10 @@ static inline int lock_may_write(struct inode *inode, loff_t start,
1359 return 1; 1360 return 1;
1360} 1361}
1361 1362
1363static inline void locks_delete_block(struct file_lock *waiter)
1364{
1365}
1366
1362static inline void lock_flocks(void) 1367static inline void lock_flocks(void)
1363{ 1368{
1364} 1369}
@@ -2506,6 +2511,7 @@ extern int dcache_readdir(struct file *, void *, filldir_t);
2506extern int simple_setattr(struct dentry *, struct iattr *); 2511extern int simple_setattr(struct dentry *, struct iattr *);
2507extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *); 2512extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *);
2508extern int simple_statfs(struct dentry *, struct kstatfs *); 2513extern int simple_statfs(struct dentry *, struct kstatfs *);
2514extern int simple_open(struct inode *inode, struct file *file);
2509extern int simple_link(struct dentry *, struct inode *, struct dentry *); 2515extern int simple_link(struct dentry *, struct inode *, struct dentry *);
2510extern int simple_unlink(struct inode *, struct dentry *); 2516extern int simple_unlink(struct inode *, struct dentry *);
2511extern int simple_rmdir(struct inode *, struct dentry *); 2517extern int simple_rmdir(struct inode *, struct dentry *);
diff --git a/include/linux/fuse.h b/include/linux/fuse.h
index 8ba2c9460b28..8f2ab8fef929 100644
--- a/include/linux/fuse.h
+++ b/include/linux/fuse.h
@@ -593,7 +593,7 @@ struct fuse_dirent {
593 __u64 off; 593 __u64 off;
594 __u32 namelen; 594 __u32 namelen;
595 __u32 type; 595 __u32 type;
596 char name[0]; 596 char name[];
597}; 597};
598 598
599#define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name) 599#define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name)
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index 2463b6100333..1f90de0cfdbe 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -666,23 +666,11 @@ struct twl4030_codec_data {
666 unsigned int check_defaults:1; 666 unsigned int check_defaults:1;
667 unsigned int reset_registers:1; 667 unsigned int reset_registers:1;
668 unsigned int hs_extmute:1; 668 unsigned int hs_extmute:1;
669 u16 hs_left_step;
670 u16 hs_right_step;
671 u16 hf_left_step;
672 u16 hf_right_step;
673 void (*set_hs_extmute)(int mute); 669 void (*set_hs_extmute)(int mute);
674}; 670};
675 671
676struct twl4030_vibra_data { 672struct twl4030_vibra_data {
677 unsigned int coexist; 673 unsigned int coexist;
678
679 /* twl6040 */
680 unsigned int vibldrv_res; /* left driver resistance */
681 unsigned int vibrdrv_res; /* right driver resistance */
682 unsigned int viblmotor_res; /* left motor resistance */
683 unsigned int vibrmotor_res; /* right motor resistance */
684 int vddvibl_uV; /* VDDVIBL volt, set 0 for fixed reg */
685 int vddvibr_uV; /* VDDVIBR volt, set 0 for fixed reg */
686}; 674};
687 675
688struct twl4030_audio_data { 676struct twl4030_audio_data {
diff --git a/include/linux/irq.h b/include/linux/irq.h
index bff29c58da23..b27cfcfd3a59 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -49,6 +49,12 @@ typedef void (*irq_preflow_handler_t)(struct irq_data *data);
49 * IRQ_TYPE_LEVEL_LOW - low level triggered 49 * IRQ_TYPE_LEVEL_LOW - low level triggered
50 * IRQ_TYPE_LEVEL_MASK - Mask to filter out the level bits 50 * IRQ_TYPE_LEVEL_MASK - Mask to filter out the level bits
51 * IRQ_TYPE_SENSE_MASK - Mask for all the above bits 51 * IRQ_TYPE_SENSE_MASK - Mask for all the above bits
52 * IRQ_TYPE_DEFAULT - For use by some PICs to ask irq_set_type
53 * to setup the HW to a sane default (used
54 * by irqdomain map() callbacks to synchronize
55 * the HW state and SW flags for a newly
56 * allocated descriptor).
57 *
52 * IRQ_TYPE_PROBE - Special flag for probing in progress 58 * IRQ_TYPE_PROBE - Special flag for probing in progress
53 * 59 *
54 * Bits which can be modified via irq_set/clear/modify_status_flags() 60 * Bits which can be modified via irq_set/clear/modify_status_flags()
@@ -77,6 +83,7 @@ enum {
77 IRQ_TYPE_LEVEL_LOW = 0x00000008, 83 IRQ_TYPE_LEVEL_LOW = 0x00000008,
78 IRQ_TYPE_LEVEL_MASK = (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH), 84 IRQ_TYPE_LEVEL_MASK = (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH),
79 IRQ_TYPE_SENSE_MASK = 0x0000000f, 85 IRQ_TYPE_SENSE_MASK = 0x0000000f,
86 IRQ_TYPE_DEFAULT = IRQ_TYPE_SENSE_MASK,
80 87
81 IRQ_TYPE_PROBE = 0x00000010, 88 IRQ_TYPE_PROBE = 0x00000010,
82 89
@@ -263,6 +270,11 @@ static inline void irqd_clr_chained_irq_inprogress(struct irq_data *d)
263 d->state_use_accessors &= ~IRQD_IRQ_INPROGRESS; 270 d->state_use_accessors &= ~IRQD_IRQ_INPROGRESS;
264} 271}
265 272
273static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d)
274{
275 return d->hwirq;
276}
277
266/** 278/**
267 * struct irq_chip - hardware interrupt chip descriptor 279 * struct irq_chip - hardware interrupt chip descriptor
268 * 280 *
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index ead4a4215797..c65740d76e66 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -42,12 +42,6 @@ struct of_device_id;
42/* Number of irqs reserved for a legacy isa controller */ 42/* Number of irqs reserved for a legacy isa controller */
43#define NUM_ISA_INTERRUPTS 16 43#define NUM_ISA_INTERRUPTS 16
44 44
45/* This type is the placeholder for a hardware interrupt number. It has to
46 * be big enough to enclose whatever representation is used by a given
47 * platform.
48 */
49typedef unsigned long irq_hw_number_t;
50
51/** 45/**
52 * struct irq_domain_ops - Methods for irq_domain objects 46 * struct irq_domain_ops - Methods for irq_domain objects
53 * @match: Match an interrupt controller device node to a host, returns 47 * @match: Match an interrupt controller device node to a host, returns
@@ -104,6 +98,9 @@ struct irq_domain {
104 unsigned int size; 98 unsigned int size;
105 unsigned int *revmap; 99 unsigned int *revmap;
106 } linear; 100 } linear;
101 struct {
102 unsigned int max_irq;
103 } nomap;
107 struct radix_tree_root tree; 104 struct radix_tree_root tree;
108 } revmap_data; 105 } revmap_data;
109 const struct irq_domain_ops *ops; 106 const struct irq_domain_ops *ops;
@@ -126,6 +123,7 @@ struct irq_domain *irq_domain_add_linear(struct device_node *of_node,
126 const struct irq_domain_ops *ops, 123 const struct irq_domain_ops *ops,
127 void *host_data); 124 void *host_data);
128struct irq_domain *irq_domain_add_nomap(struct device_node *of_node, 125struct irq_domain *irq_domain_add_nomap(struct device_node *of_node,
126 unsigned int max_irq,
129 const struct irq_domain_ops *ops, 127 const struct irq_domain_ops *ops,
130 void *host_data); 128 void *host_data);
131struct irq_domain *irq_domain_add_tree(struct device_node *of_node, 129struct irq_domain *irq_domain_add_tree(struct device_node *of_node,
@@ -134,7 +132,6 @@ struct irq_domain *irq_domain_add_tree(struct device_node *of_node,
134 132
135extern struct irq_domain *irq_find_host(struct device_node *node); 133extern struct irq_domain *irq_find_host(struct device_node *node);
136extern void irq_set_default_host(struct irq_domain *host); 134extern void irq_set_default_host(struct irq_domain *host);
137extern void irq_set_virq_count(unsigned int count);
138 135
139static inline struct irq_domain *irq_domain_add_legacy_isa( 136static inline struct irq_domain *irq_domain_add_legacy_isa(
140 struct device_node *of_node, 137 struct device_node *of_node,
@@ -146,7 +143,6 @@ static inline struct irq_domain *irq_domain_add_legacy_isa(
146} 143}
147extern struct irq_domain *irq_find_host(struct device_node *node); 144extern struct irq_domain *irq_find_host(struct device_node *node);
148extern void irq_set_default_host(struct irq_domain *host); 145extern void irq_set_default_host(struct irq_domain *host);
149extern void irq_set_virq_count(unsigned int count);
150 146
151 147
152extern unsigned int irq_create_mapping(struct irq_domain *host, 148extern unsigned int irq_create_mapping(struct irq_domain *host,
diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h
index 067eda0e4b32..be342b94c640 100644
--- a/include/linux/kconfig.h
+++ b/include/linux/kconfig.h
@@ -4,29 +4,43 @@
4#include <generated/autoconf.h> 4#include <generated/autoconf.h>
5 5
6/* 6/*
7 * Helper macros to use CONFIG_ options in C expressions. Note that 7 * Helper macros to use CONFIG_ options in C/CPP expressions. Note that
8 * these only work with boolean and tristate options. 8 * these only work with boolean and tristate options.
9 */ 9 */
10 10
11/* 11/*
12 * Getting something that works in C and CPP for an arg that may or may
13 * not be defined is tricky. Here, if we have "#define CONFIG_BOOGER 1"
14 * we match on the placeholder define, insert the "0," for arg1 and generate
15 * the triplet (0, 1, 0). Then the last step cherry picks the 2nd arg (a one).
16 * When CONFIG_BOOGER is not defined, we generate a (... 1, 0) pair, and when
17 * the last step cherry picks the 2nd arg, we get a zero.
18 */
19#define __ARG_PLACEHOLDER_1 0,
20#define config_enabled(cfg) _config_enabled(cfg)
21#define _config_enabled(value) __config_enabled(__ARG_PLACEHOLDER_##value)
22#define __config_enabled(arg1_or_junk) ___config_enabled(arg1_or_junk 1, 0)
23#define ___config_enabled(__ignored, val, ...) val
24
25/*
12 * IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm', 26 * IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',
13 * 0 otherwise. 27 * 0 otherwise.
14 * 28 *
15 */ 29 */
16#define IS_ENABLED(option) \ 30#define IS_ENABLED(option) \
17 (__enabled_ ## option || __enabled_ ## option ## _MODULE) 31 (config_enabled(option) || config_enabled(option##_MODULE))
18 32
19/* 33/*
20 * IS_BUILTIN(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y', 0 34 * IS_BUILTIN(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y', 0
21 * otherwise. For boolean options, this is equivalent to 35 * otherwise. For boolean options, this is equivalent to
22 * IS_ENABLED(CONFIG_FOO). 36 * IS_ENABLED(CONFIG_FOO).
23 */ 37 */
24#define IS_BUILTIN(option) __enabled_ ## option 38#define IS_BUILTIN(option) config_enabled(option)
25 39
26/* 40/*
27 * IS_MODULE(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'm', 0 41 * IS_MODULE(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'm', 0
28 * otherwise. 42 * otherwise.
29 */ 43 */
30#define IS_MODULE(option) __enabled_ ## option ## _MODULE 44#define IS_MODULE(option) config_enabled(option##_MODULE)
31 45
32#endif /* __LINUX_KCONFIG_H */ 46#endif /* __LINUX_KCONFIG_H */
diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h
index fa391835508d..c4d2fc194ede 100644
--- a/include/linux/kgdb.h
+++ b/include/linux/kgdb.h
@@ -63,7 +63,8 @@ enum kgdb_bptype {
63 BP_HARDWARE_BREAKPOINT, 63 BP_HARDWARE_BREAKPOINT,
64 BP_WRITE_WATCHPOINT, 64 BP_WRITE_WATCHPOINT,
65 BP_READ_WATCHPOINT, 65 BP_READ_WATCHPOINT,
66 BP_ACCESS_WATCHPOINT 66 BP_ACCESS_WATCHPOINT,
67 BP_POKE_BREAKPOINT,
67}; 68};
68 69
69enum kgdb_bpstate { 70enum kgdb_bpstate {
@@ -207,8 +208,8 @@ extern void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc);
207 208
208/* Optional functions. */ 209/* Optional functions. */
209extern int kgdb_validate_break_address(unsigned long addr); 210extern int kgdb_validate_break_address(unsigned long addr);
210extern int kgdb_arch_set_breakpoint(unsigned long addr, char *saved_instr); 211extern int kgdb_arch_set_breakpoint(struct kgdb_bkpt *bpt);
211extern int kgdb_arch_remove_breakpoint(unsigned long addr, char *bundle); 212extern int kgdb_arch_remove_breakpoint(struct kgdb_bkpt *bpt);
212 213
213/** 214/**
214 * kgdb_arch_late - Perform any architecture specific initalization. 215 * kgdb_arch_late - Perform any architecture specific initalization.
diff --git a/include/linux/kmod.h b/include/linux/kmod.h
index 9efeae679106..dd99c329e161 100644
--- a/include/linux/kmod.h
+++ b/include/linux/kmod.h
@@ -110,12 +110,29 @@ call_usermodehelper(char *path, char **argv, char **envp, int wait)
110 110
111extern struct ctl_table usermodehelper_table[]; 111extern struct ctl_table usermodehelper_table[];
112 112
113enum umh_disable_depth {
114 UMH_ENABLED = 0,
115 UMH_FREEZING,
116 UMH_DISABLED,
117};
118
113extern void usermodehelper_init(void); 119extern void usermodehelper_init(void);
114 120
115extern int usermodehelper_disable(void); 121extern int __usermodehelper_disable(enum umh_disable_depth depth);
116extern void usermodehelper_enable(void); 122extern void __usermodehelper_set_disable_depth(enum umh_disable_depth depth);
117extern bool usermodehelper_is_disabled(void); 123
118extern void read_lock_usermodehelper(void); 124static inline int usermodehelper_disable(void)
119extern void read_unlock_usermodehelper(void); 125{
126 return __usermodehelper_disable(UMH_DISABLED);
127}
128
129static inline void usermodehelper_enable(void)
130{
131 __usermodehelper_set_disable_depth(UMH_ENABLED);
132}
133
134extern int usermodehelper_read_trylock(void);
135extern long usermodehelper_read_lock_wait(long timeout);
136extern void usermodehelper_read_unlock(void);
120 137
121#endif /* __LINUX_KMOD_H__ */ 138#endif /* __LINUX_KMOD_H__ */
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 665a260c7e09..72cbf08d45fb 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -596,6 +596,7 @@ void kvm_free_irq_source_id(struct kvm *kvm, int irq_source_id);
596 596
597#ifdef CONFIG_IOMMU_API 597#ifdef CONFIG_IOMMU_API
598int kvm_iommu_map_pages(struct kvm *kvm, struct kvm_memory_slot *slot); 598int kvm_iommu_map_pages(struct kvm *kvm, struct kvm_memory_slot *slot);
599void kvm_iommu_unmap_pages(struct kvm *kvm, struct kvm_memory_slot *slot);
599int kvm_iommu_map_guest(struct kvm *kvm); 600int kvm_iommu_map_guest(struct kvm *kvm);
600int kvm_iommu_unmap_guest(struct kvm *kvm); 601int kvm_iommu_unmap_guest(struct kvm *kvm);
601int kvm_assign_device(struct kvm *kvm, 602int kvm_assign_device(struct kvm *kvm,
@@ -609,6 +610,11 @@ static inline int kvm_iommu_map_pages(struct kvm *kvm,
609 return 0; 610 return 0;
610} 611}
611 612
613static inline void kvm_iommu_unmap_pages(struct kvm *kvm,
614 struct kvm_memory_slot *slot)
615{
616}
617
612static inline int kvm_iommu_map_guest(struct kvm *kvm) 618static inline int kvm_iommu_map_guest(struct kvm *kvm)
613{ 619{
614 return -ENODEV; 620 return -ENODEV;
diff --git a/include/linux/lsm_audit.h b/include/linux/lsm_audit.h
index eab507f2b1cb..fad48aab893b 100644
--- a/include/linux/lsm_audit.h
+++ b/include/linux/lsm_audit.h
@@ -22,6 +22,23 @@
22#include <linux/key.h> 22#include <linux/key.h>
23#include <linux/skbuff.h> 23#include <linux/skbuff.h>
24 24
25struct lsm_network_audit {
26 int netif;
27 struct sock *sk;
28 u16 family;
29 __be16 dport;
30 __be16 sport;
31 union {
32 struct {
33 __be32 daddr;
34 __be32 saddr;
35 } v4;
36 struct {
37 struct in6_addr daddr;
38 struct in6_addr saddr;
39 } v6;
40 } fam;
41};
25 42
26/* Auxiliary data to use in generating the audit record. */ 43/* Auxiliary data to use in generating the audit record. */
27struct common_audit_data { 44struct common_audit_data {
@@ -41,23 +58,7 @@ struct common_audit_data {
41 struct path path; 58 struct path path;
42 struct dentry *dentry; 59 struct dentry *dentry;
43 struct inode *inode; 60 struct inode *inode;
44 struct { 61 struct lsm_network_audit *net;
45 int netif;
46 struct sock *sk;
47 u16 family;
48 __be16 dport;
49 __be16 sport;
50 union {
51 struct {
52 __be32 daddr;
53 __be32 saddr;
54 } v4;
55 struct {
56 struct in6_addr daddr;
57 struct in6_addr saddr;
58 } v6;
59 } fam;
60 } net;
61 int cap; 62 int cap;
62 int ipc_id; 63 int ipc_id;
63 struct task_struct *tsk; 64 struct task_struct *tsk;
@@ -72,64 +73,15 @@ struct common_audit_data {
72 /* this union contains LSM specific data */ 73 /* this union contains LSM specific data */
73 union { 74 union {
74#ifdef CONFIG_SECURITY_SMACK 75#ifdef CONFIG_SECURITY_SMACK
75 /* SMACK data */ 76 struct smack_audit_data *smack_audit_data;
76 struct smack_audit_data {
77 const char *function;
78 char *subject;
79 char *object;
80 char *request;
81 int result;
82 } smack_audit_data;
83#endif 77#endif
84#ifdef CONFIG_SECURITY_SELINUX 78#ifdef CONFIG_SECURITY_SELINUX
85 /* SELinux data */ 79 struct selinux_audit_data *selinux_audit_data;
86 struct {
87 u32 ssid;
88 u32 tsid;
89 u16 tclass;
90 u32 requested;
91 u32 audited;
92 u32 denied;
93 /*
94 * auditdeny is a bit tricky and unintuitive. See the
95 * comments in avc.c for it's meaning and usage.
96 */
97 u32 auditdeny;
98 struct av_decision *avd;
99 int result;
100 } selinux_audit_data;
101#endif 80#endif
102#ifdef CONFIG_SECURITY_APPARMOR 81#ifdef CONFIG_SECURITY_APPARMOR
103 struct { 82 struct apparmor_audit_data *apparmor_audit_data;
104 int error;
105 int op;
106 int type;
107 void *profile;
108 const char *name;
109 const char *info;
110 union {
111 void *target;
112 struct {
113 long pos;
114 void *target;
115 } iface;
116 struct {
117 int rlim;
118 unsigned long max;
119 } rlim;
120 struct {
121 const char *target;
122 u32 request;
123 u32 denied;
124 uid_t ouid;
125 } fs;
126 };
127 } apparmor_audit_data;
128#endif 83#endif
129 }; 84 }; /* per LSM data pointer union */
130 /* these callback will be implemented by a specific LSM */
131 void (*lsm_pre_audit)(struct audit_buffer *, void *);
132 void (*lsm_post_audit)(struct audit_buffer *, void *);
133}; 85};
134 86
135#define v4info fam.v4 87#define v4info fam.v4
@@ -146,6 +98,8 @@ int ipv6_skb_to_auditdata(struct sk_buff *skb,
146 { memset((_d), 0, sizeof(struct common_audit_data)); \ 98 { memset((_d), 0, sizeof(struct common_audit_data)); \
147 (_d)->type = LSM_AUDIT_DATA_##_t; } 99 (_d)->type = LSM_AUDIT_DATA_##_t; }
148 100
149void common_lsm_audit(struct common_audit_data *a); 101void common_lsm_audit(struct common_audit_data *a,
102 void (*pre_audit)(struct audit_buffer *, void *),
103 void (*post_audit)(struct audit_buffer *, void *));
150 104
151#endif 105#endif
diff --git a/include/linux/mfd/db5500-prcmu.h b/include/linux/mfd/db5500-prcmu.h
index 9890687f582d..5a049dfaf153 100644
--- a/include/linux/mfd/db5500-prcmu.h
+++ b/include/linux/mfd/db5500-prcmu.h
@@ -8,41 +8,14 @@
8#ifndef __MFD_DB5500_PRCMU_H 8#ifndef __MFD_DB5500_PRCMU_H
9#define __MFD_DB5500_PRCMU_H 9#define __MFD_DB5500_PRCMU_H
10 10
11#ifdef CONFIG_MFD_DB5500_PRCMU 11static inline int prcmu_resetout(u8 resoutn, u8 state)
12
13void db5500_prcmu_early_init(void);
14int db5500_prcmu_set_epod(u16 epod_id, u8 epod_state);
15int db5500_prcmu_set_display_clocks(void);
16int db5500_prcmu_disable_dsipll(void);
17int db5500_prcmu_enable_dsipll(void);
18int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size);
19int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size);
20void db5500_prcmu_enable_wakeups(u32 wakeups);
21int db5500_prcmu_request_clock(u8 clock, bool enable);
22void db5500_prcmu_config_abb_event_readout(u32 abb_events);
23void db5500_prcmu_get_abb_event_buffer(void __iomem **buf);
24int prcmu_resetout(u8 resoutn, u8 state);
25int db5500_prcmu_set_power_state(u8 state, bool keep_ulp_clk,
26 bool keep_ap_pll);
27int db5500_prcmu_config_esram0_deep_sleep(u8 state);
28void db5500_prcmu_system_reset(u16 reset_code);
29u16 db5500_prcmu_get_reset_code(void);
30bool db5500_prcmu_is_ac_wake_requested(void);
31int db5500_prcmu_set_arm_opp(u8 opp);
32int db5500_prcmu_get_arm_opp(void);
33
34#else /* !CONFIG_UX500_SOC_DB5500 */
35
36static inline void db5500_prcmu_early_init(void) {}
37
38static inline int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
39{ 12{
40 return -ENOSYS; 13 return 0;
41} 14}
42 15
43static inline int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size) 16static inline int db5500_prcmu_set_epod(u16 epod_id, u8 epod_state)
44{ 17{
45 return -ENOSYS; 18 return 0;
46} 19}
47 20
48static inline int db5500_prcmu_request_clock(u8 clock, bool enable) 21static inline int db5500_prcmu_request_clock(u8 clock, bool enable)
@@ -50,69 +23,82 @@ static inline int db5500_prcmu_request_clock(u8 clock, bool enable)
50 return 0; 23 return 0;
51} 24}
52 25
53static inline int db5500_prcmu_set_display_clocks(void) 26static inline int db5500_prcmu_set_power_state(u8 state, bool keep_ulp_clk,
27 bool keep_ap_pll)
54{ 28{
55 return 0; 29 return 0;
56} 30}
57 31
58static inline int db5500_prcmu_disable_dsipll(void) 32static inline int db5500_prcmu_config_esram0_deep_sleep(u8 state)
59{ 33{
60 return 0; 34 return 0;
61} 35}
62 36
63static inline int db5500_prcmu_enable_dsipll(void) 37static inline u16 db5500_prcmu_get_reset_code(void)
64{ 38{
65 return 0; 39 return 0;
66} 40}
67 41
68static inline int db5500_prcmu_config_esram0_deep_sleep(u8 state) 42static inline bool db5500_prcmu_is_ac_wake_requested(void)
69{ 43{
70 return 0; 44 return 0;
71} 45}
72 46
73static inline void db5500_prcmu_enable_wakeups(u32 wakeups) {} 47static inline int db5500_prcmu_set_arm_opp(u8 opp)
74
75static inline int prcmu_resetout(u8 resoutn, u8 state)
76{ 48{
77 return 0; 49 return 0;
78} 50}
79 51
80static inline int db5500_prcmu_set_epod(u16 epod_id, u8 epod_state) 52static inline int db5500_prcmu_get_arm_opp(void)
81{ 53{
82 return 0; 54 return 0;
83} 55}
84 56
85static inline void db5500_prcmu_get_abb_event_buffer(void __iomem **buf) {}
86static inline void db5500_prcmu_config_abb_event_readout(u32 abb_events) {} 57static inline void db5500_prcmu_config_abb_event_readout(u32 abb_events) {}
87 58
88static inline int db5500_prcmu_set_power_state(u8 state, bool keep_ulp_clk, 59static inline void db5500_prcmu_get_abb_event_buffer(void __iomem **buf) {}
89 bool keep_ap_pll)
90{
91 return 0;
92}
93 60
94static inline void db5500_prcmu_system_reset(u16 reset_code) {} 61static inline void db5500_prcmu_system_reset(u16 reset_code) {}
95 62
96static inline u16 db5500_prcmu_get_reset_code(void) 63static inline void db5500_prcmu_enable_wakeups(u32 wakeups) {}
64
65#ifdef CONFIG_MFD_DB5500_PRCMU
66
67void db5500_prcmu_early_init(void);
68int db5500_prcmu_set_display_clocks(void);
69int db5500_prcmu_disable_dsipll(void);
70int db5500_prcmu_enable_dsipll(void);
71int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size);
72int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size);
73
74#else /* !CONFIG_UX500_SOC_DB5500 */
75
76static inline void db5500_prcmu_early_init(void) {}
77
78static inline int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
97{ 79{
98 return 0; 80 return -ENOSYS;
99} 81}
100 82
101static inline bool db5500_prcmu_is_ac_wake_requested(void) 83static inline int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size)
102{ 84{
103 return 0; 85 return -ENOSYS;
104} 86}
105 87
106static inline int db5500_prcmu_set_arm_opp(u8 opp) 88static inline int db5500_prcmu_set_display_clocks(void)
107{ 89{
108 return 0; 90 return 0;
109} 91}
110 92
111static inline int db5500_prcmu_get_arm_opp(void) 93static inline int db5500_prcmu_disable_dsipll(void)
112{ 94{
113 return 0; 95 return 0;
114} 96}
115 97
98static inline int db5500_prcmu_enable_dsipll(void)
99{
100 return 0;
101}
116 102
117#endif /* CONFIG_MFD_DB5500_PRCMU */ 103#endif /* CONFIG_MFD_DB5500_PRCMU */
118 104
diff --git a/include/linux/mfd/rc5t583.h b/include/linux/mfd/rc5t583.h
index a2c61609d21d..0b64b19d81ab 100644
--- a/include/linux/mfd/rc5t583.h
+++ b/include/linux/mfd/rc5t583.h
@@ -26,6 +26,7 @@
26 26
27#include <linux/mutex.h> 27#include <linux/mutex.h>
28#include <linux/types.h> 28#include <linux/types.h>
29#include <linux/regmap.h>
29 30
30#define RC5T583_MAX_REGS 0xF8 31#define RC5T583_MAX_REGS 0xF8
31 32
@@ -279,14 +280,44 @@ struct rc5t583_platform_data {
279 bool enable_shutdown; 280 bool enable_shutdown;
280}; 281};
281 282
282int rc5t583_write(struct device *dev, u8 reg, uint8_t val); 283static inline int rc5t583_write(struct device *dev, uint8_t reg, uint8_t val)
283int rc5t583_read(struct device *dev, uint8_t reg, uint8_t *val); 284{
284int rc5t583_set_bits(struct device *dev, unsigned int reg, 285 struct rc5t583 *rc5t583 = dev_get_drvdata(dev);
285 unsigned int bit_mask); 286 return regmap_write(rc5t583->regmap, reg, val);
286int rc5t583_clear_bits(struct device *dev, unsigned int reg, 287}
287 unsigned int bit_mask); 288
288int rc5t583_update(struct device *dev, unsigned int reg, 289static inline int rc5t583_read(struct device *dev, uint8_t reg, uint8_t *val)
289 unsigned int val, unsigned int mask); 290{
291 struct rc5t583 *rc5t583 = dev_get_drvdata(dev);
292 unsigned int ival;
293 int ret;
294 ret = regmap_read(rc5t583->regmap, reg, &ival);
295 if (!ret)
296 *val = (uint8_t)ival;
297 return ret;
298}
299
300static inline int rc5t583_set_bits(struct device *dev, unsigned int reg,
301 unsigned int bit_mask)
302{
303 struct rc5t583 *rc5t583 = dev_get_drvdata(dev);
304 return regmap_update_bits(rc5t583->regmap, reg, bit_mask, bit_mask);
305}
306
307static inline int rc5t583_clear_bits(struct device *dev, unsigned int reg,
308 unsigned int bit_mask)
309{
310 struct rc5t583 *rc5t583 = dev_get_drvdata(dev);
311 return regmap_update_bits(rc5t583->regmap, reg, bit_mask, 0);
312}
313
314static inline int rc5t583_update(struct device *dev, unsigned int reg,
315 unsigned int val, unsigned int mask)
316{
317 struct rc5t583 *rc5t583 = dev_get_drvdata(dev);
318 return regmap_update_bits(rc5t583->regmap, reg, mask, val);
319}
320
290int rc5t583_ext_power_req_config(struct device *dev, int deepsleep_id, 321int rc5t583_ext_power_req_config(struct device *dev, int deepsleep_id,
291 int ext_pwr_req, int deepsleep_slot_nr); 322 int ext_pwr_req, int deepsleep_slot_nr);
292int rc5t583_irq_init(struct rc5t583 *rc5t583, int irq, int irq_base); 323int rc5t583_irq_init(struct rc5t583 *rc5t583, int irq, int irq_base);
diff --git a/include/linux/mfd/twl6040.h b/include/linux/mfd/twl6040.h
index 9bc9ac651dad..b15b5f03f5c4 100644
--- a/include/linux/mfd/twl6040.h
+++ b/include/linux/mfd/twl6040.h
@@ -174,8 +174,35 @@
174#define TWL6040_SYSCLK_SEL_LPPLL 0 174#define TWL6040_SYSCLK_SEL_LPPLL 0
175#define TWL6040_SYSCLK_SEL_HPPLL 1 175#define TWL6040_SYSCLK_SEL_HPPLL 1
176 176
177struct twl6040_codec_data {
178 u16 hs_left_step;
179 u16 hs_right_step;
180 u16 hf_left_step;
181 u16 hf_right_step;
182};
183
184struct twl6040_vibra_data {
185 unsigned int vibldrv_res; /* left driver resistance */
186 unsigned int vibrdrv_res; /* right driver resistance */
187 unsigned int viblmotor_res; /* left motor resistance */
188 unsigned int vibrmotor_res; /* right motor resistance */
189 int vddvibl_uV; /* VDDVIBL volt, set 0 for fixed reg */
190 int vddvibr_uV; /* VDDVIBR volt, set 0 for fixed reg */
191};
192
193struct twl6040_platform_data {
194 int audpwron_gpio; /* audio power-on gpio */
195 unsigned int irq_base;
196
197 struct twl6040_codec_data *codec;
198 struct twl6040_vibra_data *vibra;
199};
200
201struct regmap;
202
177struct twl6040 { 203struct twl6040 {
178 struct device *dev; 204 struct device *dev;
205 struct regmap *regmap;
179 struct mutex mutex; 206 struct mutex mutex;
180 struct mutex io_mutex; 207 struct mutex io_mutex;
181 struct mutex irq_mutex; 208 struct mutex irq_mutex;
diff --git a/include/linux/mm.h b/include/linux/mm.h
index d8738a464b94..74aa71bea1e4 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1393,29 +1393,20 @@ extern int install_special_mapping(struct mm_struct *mm,
1393 1393
1394extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); 1394extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
1395 1395
1396extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
1397 unsigned long len, unsigned long prot,
1398 unsigned long flag, unsigned long pgoff);
1399extern unsigned long mmap_region(struct file *file, unsigned long addr, 1396extern unsigned long mmap_region(struct file *file, unsigned long addr,
1400 unsigned long len, unsigned long flags, 1397 unsigned long len, unsigned long flags,
1401 vm_flags_t vm_flags, unsigned long pgoff); 1398 vm_flags_t vm_flags, unsigned long pgoff);
1402 1399extern unsigned long do_mmap(struct file *, unsigned long,
1403static inline unsigned long do_mmap(struct file *file, unsigned long addr, 1400 unsigned long, unsigned long,
1404 unsigned long len, unsigned long prot, 1401 unsigned long, unsigned long);
1405 unsigned long flag, unsigned long offset)
1406{
1407 unsigned long ret = -EINVAL;
1408 if ((offset + PAGE_ALIGN(len)) < offset)
1409 goto out;
1410 if (!(offset & ~PAGE_MASK))
1411 ret = do_mmap_pgoff(file, addr, len, prot, flag, offset >> PAGE_SHIFT);
1412out:
1413 return ret;
1414}
1415
1416extern int do_munmap(struct mm_struct *, unsigned long, size_t); 1402extern int do_munmap(struct mm_struct *, unsigned long, size_t);
1417 1403
1418extern unsigned long do_brk(unsigned long, unsigned long); 1404/* These take the mm semaphore themselves */
1405extern unsigned long vm_brk(unsigned long, unsigned long);
1406extern int vm_munmap(unsigned long, size_t);
1407extern unsigned long vm_mmap(struct file *, unsigned long,
1408 unsigned long, unsigned long,
1409 unsigned long, unsigned long);
1419 1410
1420/* truncate.c */ 1411/* truncate.c */
1421extern void truncate_inode_pages(struct address_space *, loff_t); 1412extern void truncate_inode_pages(struct address_space *, loff_t);
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index 01beae78f079..629b823f8836 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -481,7 +481,7 @@ struct mmc_driver {
481 struct device_driver drv; 481 struct device_driver drv;
482 int (*probe)(struct mmc_card *); 482 int (*probe)(struct mmc_card *);
483 void (*remove)(struct mmc_card *); 483 void (*remove)(struct mmc_card *);
484 int (*suspend)(struct mmc_card *, pm_message_t); 484 int (*suspend)(struct mmc_card *);
485 int (*resume)(struct mmc_card *); 485 int (*resume)(struct mmc_card *);
486}; 486};
487 487
diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h
index 0ddd161f3b06..31d2844e6572 100644
--- a/include/linux/netfilter_bridge.h
+++ b/include/linux/netfilter_bridge.h
@@ -104,9 +104,18 @@ struct bridge_skb_cb {
104 } daddr; 104 } daddr;
105}; 105};
106 106
107static inline void br_drop_fake_rtable(struct sk_buff *skb)
108{
109 struct dst_entry *dst = skb_dst(skb);
110
111 if (dst && (dst->flags & DST_FAKE_RTABLE))
112 skb_dst_drop(skb);
113}
114
107#else 115#else
108#define nf_bridge_maybe_copy_header(skb) (0) 116#define nf_bridge_maybe_copy_header(skb) (0)
109#define nf_bridge_pad(skb) (0) 117#define nf_bridge_pad(skb) (0)
118#define br_drop_fake_rtable(skb) do { } while (0)
110#endif /* CONFIG_BRIDGE_NETFILTER */ 119#endif /* CONFIG_BRIDGE_NETFILTER */
111 120
112#endif /* __KERNEL__ */ 121#endif /* __KERNEL__ */
diff --git a/include/linux/nfsd/Kbuild b/include/linux/nfsd/Kbuild
index b8d4001212b3..5b7d84ac954a 100644
--- a/include/linux/nfsd/Kbuild
+++ b/include/linux/nfsd/Kbuild
@@ -1,3 +1,4 @@
1header-y += cld.h
1header-y += debug.h 2header-y += debug.h
2header-y += export.h 3header-y += export.h
3header-y += nfsfh.h 4header-y += nfsfh.h
diff --git a/include/linux/pinctrl/machine.h b/include/linux/pinctrl/machine.h
index fee4349364f7..e4d1de742502 100644
--- a/include/linux/pinctrl/machine.h
+++ b/include/linux/pinctrl/machine.h
@@ -12,6 +12,8 @@
12#ifndef __LINUX_PINCTRL_MACHINE_H 12#ifndef __LINUX_PINCTRL_MACHINE_H
13#define __LINUX_PINCTRL_MACHINE_H 13#define __LINUX_PINCTRL_MACHINE_H
14 14
15#include <linux/bug.h>
16
15#include "pinctrl-state.h" 17#include "pinctrl-state.h"
16 18
17enum pinctrl_map_type { 19enum pinctrl_map_type {
@@ -148,7 +150,7 @@ struct pinctrl_map {
148#define PIN_MAP_CONFIGS_GROUP_HOG_DEFAULT(dev, grp, cfgs) \ 150#define PIN_MAP_CONFIGS_GROUP_HOG_DEFAULT(dev, grp, cfgs) \
149 PIN_MAP_CONFIGS_GROUP(dev, PINCTRL_STATE_DEFAULT, dev, grp, cfgs) 151 PIN_MAP_CONFIGS_GROUP(dev, PINCTRL_STATE_DEFAULT, dev, grp, cfgs)
150 152
151#ifdef CONFIG_PINMUX 153#ifdef CONFIG_PINCTRL
152 154
153extern int pinctrl_register_mappings(struct pinctrl_map const *map, 155extern int pinctrl_register_mappings(struct pinctrl_map const *map,
154 unsigned num_maps); 156 unsigned num_maps);
diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
index 2e9191a712f3..233149cb19f4 100644
--- a/include/linux/pm_qos.h
+++ b/include/linux/pm_qos.h
@@ -8,6 +8,7 @@
8#include <linux/notifier.h> 8#include <linux/notifier.h>
9#include <linux/miscdevice.h> 9#include <linux/miscdevice.h>
10#include <linux/device.h> 10#include <linux/device.h>
11#include <linux/workqueue.h>
11 12
12enum { 13enum {
13 PM_QOS_RESERVED = 0, 14 PM_QOS_RESERVED = 0,
@@ -29,6 +30,7 @@ enum {
29struct pm_qos_request { 30struct pm_qos_request {
30 struct plist_node node; 31 struct plist_node node;
31 int pm_qos_class; 32 int pm_qos_class;
33 struct delayed_work work; /* for pm_qos_update_request_timeout */
32}; 34};
33 35
34struct dev_pm_qos_request { 36struct dev_pm_qos_request {
@@ -73,6 +75,8 @@ void pm_qos_add_request(struct pm_qos_request *req, int pm_qos_class,
73 s32 value); 75 s32 value);
74void pm_qos_update_request(struct pm_qos_request *req, 76void pm_qos_update_request(struct pm_qos_request *req,
75 s32 new_value); 77 s32 new_value);
78void pm_qos_update_request_timeout(struct pm_qos_request *req,
79 s32 new_value, unsigned long timeout_us);
76void pm_qos_remove_request(struct pm_qos_request *req); 80void pm_qos_remove_request(struct pm_qos_request *req);
77 81
78int pm_qos_request(int pm_qos_class); 82int pm_qos_request(int pm_qos_class);
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h
index 7abb16093312..b02108446be7 100644
--- a/include/linux/regulator/machine.h
+++ b/include/linux/regulator/machine.h
@@ -71,7 +71,7 @@ struct regulator_state {
71 * @uV_offset: Offset applied to voltages from consumer to compensate for 71 * @uV_offset: Offset applied to voltages from consumer to compensate for
72 * voltage drops. 72 * voltage drops.
73 * 73 *
74 * @min_uA: Smallest consumers consumers may set. 74 * @min_uA: Smallest current consumers may set.
75 * @max_uA: Largest current consumers may set. 75 * @max_uA: Largest current consumers may set.
76 * 76 *
77 * @valid_modes_mask: Mask of modes which may be configured by consumers. 77 * @valid_modes_mask: Mask of modes which may be configured by consumers.
@@ -134,10 +134,8 @@ struct regulation_constraints {
134/** 134/**
135 * struct regulator_consumer_supply - supply -> device mapping 135 * struct regulator_consumer_supply - supply -> device mapping
136 * 136 *
137 * This maps a supply name to a device. Only one of dev or dev_name 137 * This maps a supply name to a device. Use of dev_name allows support for
138 * can be specified. Use of dev_name allows support for buses which 138 * buses which make struct device available late such as I2C.
139 * make struct device available late such as I2C and is the preferred
140 * form.
141 * 139 *
142 * @dev_name: Result of dev_name() for the consumer. 140 * @dev_name: Result of dev_name() for the consumer.
143 * @supply: Name for the supply. 141 * @supply: Name for the supply.
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index f51bf2e70c69..2db407a40051 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -357,7 +357,7 @@ struct uart_port {
357#define UPF_CONS_FLOW ((__force upf_t) (1 << 23)) 357#define UPF_CONS_FLOW ((__force upf_t) (1 << 23))
358#define UPF_SHARE_IRQ ((__force upf_t) (1 << 24)) 358#define UPF_SHARE_IRQ ((__force upf_t) (1 << 24))
359#define UPF_EXAR_EFR ((__force upf_t) (1 << 25)) 359#define UPF_EXAR_EFR ((__force upf_t) (1 << 25))
360#define UPF_IIR_ONCE ((__force upf_t) (1 << 26)) 360#define UPF_BUG_THRE ((__force upf_t) (1 << 26))
361/* The exact UART type is known and should not be probed. */ 361/* The exact UART type is known and should not be probed. */
362#define UPF_FIXED_TYPE ((__force upf_t) (1 << 27)) 362#define UPF_FIXED_TYPE ((__force upf_t) (1 << 27))
363#define UPF_BOOT_AUTOCONF ((__force upf_t) (1 << 28)) 363#define UPF_BOOT_AUTOCONF ((__force upf_t) (1 << 28))
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 33370271b8b2..775292a66fa4 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -238,11 +238,12 @@ enum {
238/* 238/*
239 * The callback notifies userspace to release buffers when skb DMA is done in 239 * The callback notifies userspace to release buffers when skb DMA is done in
240 * lower device, the skb last reference should be 0 when calling this. 240 * lower device, the skb last reference should be 0 when calling this.
241 * The desc is used to track userspace buffer index. 241 * The ctx field is used to track device context.
242 * The desc field is used to track userspace buffer index.
242 */ 243 */
243struct ubuf_info { 244struct ubuf_info {
244 void (*callback)(void *); 245 void (*callback)(struct ubuf_info *);
245 void *arg; 246 void *ctx;
246 unsigned long desc; 247 unsigned long desc;
247}; 248};
248 249
@@ -481,6 +482,7 @@ struct sk_buff {
481 union { 482 union {
482 __u32 mark; 483 __u32 mark;
483 __u32 dropcount; 484 __u32 dropcount;
485 __u32 avail_size;
484 }; 486 };
485 487
486 sk_buff_data_t transport_header; 488 sk_buff_data_t transport_header;
@@ -1366,6 +1368,18 @@ static inline int skb_tailroom(const struct sk_buff *skb)
1366} 1368}
1367 1369
1368/** 1370/**
1371 * skb_availroom - bytes at buffer end
1372 * @skb: buffer to check
1373 *
1374 * Return the number of bytes of free space at the tail of an sk_buff
1375 * allocated by sk_stream_alloc()
1376 */
1377static inline int skb_availroom(const struct sk_buff *skb)
1378{
1379 return skb_is_nonlinear(skb) ? 0 : skb->avail_size - skb->len;
1380}
1381
1382/**
1369 * skb_reserve - adjust headroom 1383 * skb_reserve - adjust headroom
1370 * @skb: buffer to alter 1384 * @skb: buffer to alter
1371 * @len: bytes to move 1385 * @len: bytes to move
diff --git a/include/linux/stddef.h b/include/linux/stddef.h
index 6a40c76bdcf1..1747b6787b9e 100644
--- a/include/linux/stddef.h
+++ b/include/linux/stddef.h
@@ -3,14 +3,10 @@
3 3
4#include <linux/compiler.h> 4#include <linux/compiler.h>
5 5
6#ifdef __KERNEL__
7
6#undef NULL 8#undef NULL
7#if defined(__cplusplus)
8#define NULL 0
9#else
10#define NULL ((void *)0) 9#define NULL ((void *)0)
11#endif
12
13#ifdef __KERNEL__
14 10
15enum { 11enum {
16 false = 0, 12 false = 0,
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 8dc0ea7caf02..b1fd5c7925fe 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -305,6 +305,13 @@ static inline int mem_cgroup_swappiness(struct mem_cgroup *mem)
305 return vm_swappiness; 305 return vm_swappiness;
306} 306}
307#endif 307#endif
308#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
309extern void mem_cgroup_uncharge_swap(swp_entry_t ent);
310#else
311static inline void mem_cgroup_uncharge_swap(swp_entry_t ent)
312{
313}
314#endif
308#ifdef CONFIG_SWAP 315#ifdef CONFIG_SWAP
309/* linux/mm/page_io.c */ 316/* linux/mm/page_io.c */
310extern int swap_readpage(struct page *); 317extern int swap_readpage(struct page *);
@@ -375,13 +382,6 @@ mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout)
375{ 382{
376} 383}
377#endif 384#endif
378#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
379extern void mem_cgroup_uncharge_swap(swp_entry_t ent);
380#else
381static inline void mem_cgroup_uncharge_swap(swp_entry_t ent)
382{
383}
384#endif
385 385
386#else /* CONFIG_SWAP */ 386#else /* CONFIG_SWAP */
387 387
diff --git a/include/linux/types.h b/include/linux/types.h
index e5fa50345516..7f480db60231 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -210,6 +210,12 @@ typedef u32 phys_addr_t;
210 210
211typedef phys_addr_t resource_size_t; 211typedef phys_addr_t resource_size_t;
212 212
213/*
214 * This type is the placeholder for a hardware interrupt number. It has to be
215 * big enough to enclose whatever representation is used by a given platform.
216 */
217typedef unsigned long irq_hw_number_t;
218
213typedef struct { 219typedef struct {
214 int counter; 220 int counter;
215} atomic_t; 221} atomic_t;
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
index f67810f8f21b..38ab3f46346f 100644
--- a/include/linux/usb/otg.h
+++ b/include/linux/usb/otg.h
@@ -94,6 +94,7 @@ struct usb_phy {
94 94
95 struct usb_otg *otg; 95 struct usb_otg *otg;
96 96
97 struct device *io_dev;
97 struct usb_phy_io_ops *io_ops; 98 struct usb_phy_io_ops *io_ops;
98 void __iomem *io_priv; 99 void __iomem *io_priv;
99 100
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index fbb666b1b670..474283888233 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -28,13 +28,6 @@
28/* parity check flag */ 28/* parity check flag */
29#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK)) 29#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
30 30
31enum port_dev_state {
32 PORT_UNREGISTERED,
33 PORT_REGISTERING,
34 PORT_REGISTERED,
35 PORT_UNREGISTERING,
36};
37
38/* USB serial flags */ 31/* USB serial flags */
39#define USB_SERIAL_WRITE_BUSY 0 32#define USB_SERIAL_WRITE_BUSY 0
40 33
@@ -124,7 +117,6 @@ struct usb_serial_port {
124 char throttle_req; 117 char throttle_req;
125 unsigned long sysrq; /* sysrq timeout */ 118 unsigned long sysrq; /* sysrq timeout */
126 struct device dev; 119 struct device dev;
127 enum port_dev_state dev_state;
128}; 120};
129#define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev) 121#define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev)
130 122
diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h
index 9c3120dca294..b572f80bdfd5 100644
--- a/include/linux/vgaarb.h
+++ b/include/linux/vgaarb.h
@@ -47,6 +47,8 @@
47 */ 47 */
48#define VGA_DEFAULT_DEVICE (NULL) 48#define VGA_DEFAULT_DEVICE (NULL)
49 49
50struct pci_dev;
51
50/* For use by clients */ 52/* For use by clients */
51 53
52/** 54/**
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 344b0f972828..d47e523c9d83 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -92,6 +92,7 @@ enum {
92 HCI_SERVICE_CACHE, 92 HCI_SERVICE_CACHE,
93 HCI_LINK_KEYS, 93 HCI_LINK_KEYS,
94 HCI_DEBUG_KEYS, 94 HCI_DEBUG_KEYS,
95 HCI_UNREGISTER,
95 96
96 HCI_LE_SCAN, 97 HCI_LE_SCAN,
97 HCI_SSP_ENABLED, 98 HCI_SSP_ENABLED,
@@ -1327,8 +1328,8 @@ struct sockaddr_hci {
1327#define HCI_DEV_NONE 0xffff 1328#define HCI_DEV_NONE 0xffff
1328 1329
1329#define HCI_CHANNEL_RAW 0 1330#define HCI_CHANNEL_RAW 0
1330#define HCI_CHANNEL_CONTROL 1
1331#define HCI_CHANNEL_MONITOR 2 1331#define HCI_CHANNEL_MONITOR 2
1332#define HCI_CHANNEL_CONTROL 3
1332 1333
1333struct hci_filter { 1334struct hci_filter {
1334 unsigned long type_mask; 1335 unsigned long type_mask;
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index daefaac51131..6822d2595aff 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -427,7 +427,7 @@ enum {
427static inline bool hci_conn_ssp_enabled(struct hci_conn *conn) 427static inline bool hci_conn_ssp_enabled(struct hci_conn *conn)
428{ 428{
429 struct hci_dev *hdev = conn->hdev; 429 struct hci_dev *hdev = conn->hdev;
430 return (test_bit(HCI_SSP_ENABLED, &hdev->flags) && 430 return (test_bit(HCI_SSP_ENABLED, &hdev->dev_flags) &&
431 test_bit(HCI_CONN_SSP_ENABLED, &conn->flags)); 431 test_bit(HCI_CONN_SSP_ENABLED, &conn->flags));
432} 432}
433 433
@@ -907,11 +907,13 @@ static inline void hci_role_switch_cfm(struct hci_conn *conn, __u8 status,
907 907
908static inline bool eir_has_data_type(u8 *data, size_t data_len, u8 type) 908static inline bool eir_has_data_type(u8 *data, size_t data_len, u8 type)
909{ 909{
910 u8 field_len; 910 size_t parsed = 0;
911 size_t parsed;
912 911
913 for (parsed = 0; parsed < data_len - 1; parsed += field_len) { 912 if (data_len < 2)
914 field_len = data[0]; 913 return false;
914
915 while (parsed < data_len - 1) {
916 u8 field_len = data[0];
915 917
916 if (field_len == 0) 918 if (field_len == 0)
917 break; 919 break;
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
index ffc1377e092e..ebfd91fc20f8 100644
--- a/include/net/bluetooth/mgmt.h
+++ b/include/net/bluetooth/mgmt.h
@@ -117,7 +117,7 @@ struct mgmt_mode {
117#define MGMT_OP_SET_DISCOVERABLE 0x0006 117#define MGMT_OP_SET_DISCOVERABLE 0x0006
118struct mgmt_cp_set_discoverable { 118struct mgmt_cp_set_discoverable {
119 __u8 val; 119 __u8 val;
120 __u16 timeout; 120 __le16 timeout;
121} __packed; 121} __packed;
122#define MGMT_SET_DISCOVERABLE_SIZE 3 122#define MGMT_SET_DISCOVERABLE_SIZE 3
123 123
diff --git a/include/net/dst.h b/include/net/dst.h
index 59c5d18cc385..bed833d9796a 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -36,7 +36,11 @@ struct dst_entry {
36 struct net_device *dev; 36 struct net_device *dev;
37 struct dst_ops *ops; 37 struct dst_ops *ops;
38 unsigned long _metrics; 38 unsigned long _metrics;
39 unsigned long expires; 39 union {
40 unsigned long expires;
41 /* point to where the dst_entry copied from */
42 struct dst_entry *from;
43 };
40 struct dst_entry *path; 44 struct dst_entry *path;
41 struct neighbour __rcu *_neighbour; 45 struct neighbour __rcu *_neighbour;
42#ifdef CONFIG_XFRM 46#ifdef CONFIG_XFRM
@@ -55,6 +59,7 @@ struct dst_entry {
55#define DST_NOCACHE 0x0010 59#define DST_NOCACHE 0x0010
56#define DST_NOCOUNT 0x0020 60#define DST_NOCOUNT 0x0020
57#define DST_NOPEER 0x0040 61#define DST_NOPEER 0x0040
62#define DST_FAKE_RTABLE 0x0080
58 63
59 short error; 64 short error;
60 short obsolete; 65 short obsolete;
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index b26bb8101981..0ae759a6c76e 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -123,6 +123,54 @@ static inline struct inet6_dev *ip6_dst_idev(struct dst_entry *dst)
123 return ((struct rt6_info *)dst)->rt6i_idev; 123 return ((struct rt6_info *)dst)->rt6i_idev;
124} 124}
125 125
126static inline void rt6_clean_expires(struct rt6_info *rt)
127{
128 if (!(rt->rt6i_flags & RTF_EXPIRES) && rt->dst.from)
129 dst_release(rt->dst.from);
130
131 rt->rt6i_flags &= ~RTF_EXPIRES;
132 rt->dst.from = NULL;
133}
134
135static inline void rt6_set_expires(struct rt6_info *rt, unsigned long expires)
136{
137 if (!(rt->rt6i_flags & RTF_EXPIRES) && rt->dst.from)
138 dst_release(rt->dst.from);
139
140 rt->rt6i_flags |= RTF_EXPIRES;
141 rt->dst.expires = expires;
142}
143
144static inline void rt6_update_expires(struct rt6_info *rt, int timeout)
145{
146 if (!(rt->rt6i_flags & RTF_EXPIRES)) {
147 if (rt->dst.from)
148 dst_release(rt->dst.from);
149 /* dst_set_expires relies on expires == 0
150 * if it has not been set previously.
151 */
152 rt->dst.expires = 0;
153 }
154
155 dst_set_expires(&rt->dst, timeout);
156 rt->rt6i_flags |= RTF_EXPIRES;
157}
158
159static inline void rt6_set_from(struct rt6_info *rt, struct rt6_info *from)
160{
161 struct dst_entry *new = (struct dst_entry *) from;
162
163 if (!(rt->rt6i_flags & RTF_EXPIRES) && rt->dst.from) {
164 if (new == rt->dst.from)
165 return;
166 dst_release(rt->dst.from);
167 }
168
169 rt->rt6i_flags &= ~RTF_EXPIRES;
170 rt->dst.from = new;
171 dst_hold(new);
172}
173
126struct fib6_walker_t { 174struct fib6_walker_t {
127 struct list_head lh; 175 struct list_head lh;
128 struct fib6_node *root, *node; 176 struct fib6_node *root, *node;
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 87d203ff7a8a..9210bdc7bd8d 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1327,7 +1327,7 @@ static inline struct ieee80211_rate *
1327ieee80211_get_tx_rate(const struct ieee80211_hw *hw, 1327ieee80211_get_tx_rate(const struct ieee80211_hw *hw,
1328 const struct ieee80211_tx_info *c) 1328 const struct ieee80211_tx_info *c)
1329{ 1329{
1330 if (WARN_ON(c->control.rates[0].idx < 0)) 1330 if (WARN_ON_ONCE(c->control.rates[0].idx < 0))
1331 return NULL; 1331 return NULL;
1332 return &hw->wiphy->bands[c->band]->bitrates[c->control.rates[0].idx]; 1332 return &hw->wiphy->bands[c->band]->bitrates[c->control.rates[0].idx];
1333} 1333}
diff --git a/include/net/red.h b/include/net/red.h
index 77d4c3745cb5..ef46058d35bf 100644
--- a/include/net/red.h
+++ b/include/net/red.h
@@ -245,7 +245,7 @@ static inline unsigned long red_calc_qavg_from_idle_time(const struct red_parms
245 * 245 *
246 * dummy packets as a burst after idle time, i.e. 246 * dummy packets as a burst after idle time, i.e.
247 * 247 *
248 * p->qavg *= (1-W)^m 248 * v->qavg *= (1-W)^m
249 * 249 *
250 * This is an apparently overcomplicated solution (f.e. we have to 250 * This is an apparently overcomplicated solution (f.e. we have to
251 * precompute a table to make this calculation in reasonable time) 251 * precompute a table to make this calculation in reasonable time)
@@ -279,7 +279,7 @@ static inline unsigned long red_calc_qavg_no_idle_time(const struct red_parms *p
279 unsigned int backlog) 279 unsigned int backlog)
280{ 280{
281 /* 281 /*
282 * NOTE: p->qavg is fixed point number with point at Wlog. 282 * NOTE: v->qavg is fixed point number with point at Wlog.
283 * The formula below is equvalent to floating point 283 * The formula below is equvalent to floating point
284 * version: 284 * version:
285 * 285 *
@@ -390,7 +390,7 @@ static inline void red_adaptative_algo(struct red_parms *p, struct red_vars *v)
390 if (red_is_idling(v)) 390 if (red_is_idling(v))
391 qavg = red_calc_qavg_from_idle_time(p, v); 391 qavg = red_calc_qavg_from_idle_time(p, v);
392 392
393 /* p->qavg is fixed point number with point at Wlog */ 393 /* v->qavg is fixed point number with point at Wlog */
394 qavg >>= p->Wlog; 394 qavg >>= p->Wlog;
395 395
396 if (qavg > p->target_max && p->max_P <= MAX_P_MAX) 396 if (qavg > p->target_max && p->max_P <= MAX_P_MAX)
diff --git a/include/net/sock.h b/include/net/sock.h
index a6ba1f8871fd..188532ee88b6 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -246,6 +246,7 @@ struct cg_proto;
246 * @sk_user_data: RPC layer private data 246 * @sk_user_data: RPC layer private data
247 * @sk_sndmsg_page: cached page for sendmsg 247 * @sk_sndmsg_page: cached page for sendmsg
248 * @sk_sndmsg_off: cached offset for sendmsg 248 * @sk_sndmsg_off: cached offset for sendmsg
249 * @sk_peek_off: current peek_offset value
249 * @sk_send_head: front of stuff to transmit 250 * @sk_send_head: front of stuff to transmit
250 * @sk_security: used by security modules 251 * @sk_security: used by security modules
251 * @sk_mark: generic packet mark 252 * @sk_mark: generic packet mark
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index 377df4a28512..1e1198546c72 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -134,6 +134,9 @@ struct scsi_cmnd {
134 134
135static inline struct scsi_driver *scsi_cmd_to_driver(struct scsi_cmnd *cmd) 135static inline struct scsi_driver *scsi_cmd_to_driver(struct scsi_cmnd *cmd)
136{ 136{
137 if (!cmd->request->rq_disk)
138 return NULL;
139
137 return *(struct scsi_driver **)cmd->request->rq_disk->private_data; 140 return *(struct scsi_driver **)cmd->request->rq_disk->private_data;
138} 141}
139 142
diff --git a/include/sound/core.h b/include/sound/core.h
index b6e0f57d451d..bc056687f647 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -325,6 +325,13 @@ void release_and_free_resource(struct resource *res);
325 325
326/* --- */ 326/* --- */
327 327
328/* sound printk debug levels */
329enum {
330 SND_PR_ALWAYS,
331 SND_PR_DEBUG,
332 SND_PR_VERBOSE,
333};
334
328#if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK) 335#if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK)
329__printf(4, 5) 336__printf(4, 5)
330void __snd_printk(unsigned int level, const char *file, int line, 337void __snd_printk(unsigned int level, const char *file, int line,
@@ -354,6 +361,8 @@ void __snd_printk(unsigned int level, const char *file, int line,
354 */ 361 */
355#define snd_printd(fmt, args...) \ 362#define snd_printd(fmt, args...) \
356 __snd_printk(1, __FILE__, __LINE__, fmt, ##args) 363 __snd_printk(1, __FILE__, __LINE__, fmt, ##args)
364#define _snd_printd(level, fmt, args...) \
365 __snd_printk(level, __FILE__, __LINE__, fmt, ##args)
357 366
358/** 367/**
359 * snd_BUG - give a BUG warning message and stack trace 368 * snd_BUG - give a BUG warning message and stack trace
@@ -383,6 +392,7 @@ void __snd_printk(unsigned int level, const char *file, int line,
383#else /* !CONFIG_SND_DEBUG */ 392#else /* !CONFIG_SND_DEBUG */
384 393
385#define snd_printd(fmt, args...) do { } while (0) 394#define snd_printd(fmt, args...) do { } while (0)
395#define _snd_printd(level, fmt, args...) do { } while (0)
386#define snd_BUG() do { } while (0) 396#define snd_BUG() do { } while (0)
387static inline int __snd_bug_on(int cond) 397static inline int __snd_bug_on(int cond)
388{ 398{
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index fbc7b1ad929b..ea7a2035456d 100644
--- a/include/trace/events/sched.h
+++ b/include/trace/events/sched.h
@@ -295,7 +295,7 @@ TRACE_EVENT(sched_process_exec,
295 TP_fast_assign( 295 TP_fast_assign(
296 __assign_str(filename, bprm->filename); 296 __assign_str(filename, bprm->filename);
297 __entry->pid = p->pid; 297 __entry->pid = p->pid;
298 __entry->old_pid = p->pid; 298 __entry->old_pid = old_pid;
299 ), 299 ),
300 300
301 TP_printk("filename=%s pid=%d old_pid=%d", __get_str(filename), 301 TP_printk("filename=%s pid=%d old_pid=%d", __get_str(filename),
diff --git a/include/xen/swiotlb-xen.h b/include/xen/swiotlb-xen.h
index 2ea2fdc79c16..4f4d449f00f6 100644
--- a/include/xen/swiotlb-xen.h
+++ b/include/xen/swiotlb-xen.h
@@ -7,11 +7,13 @@ extern void xen_swiotlb_init(int verbose);
7 7
8extern void 8extern void
9*xen_swiotlb_alloc_coherent(struct device *hwdev, size_t size, 9*xen_swiotlb_alloc_coherent(struct device *hwdev, size_t size,
10 dma_addr_t *dma_handle, gfp_t flags); 10 dma_addr_t *dma_handle, gfp_t flags,
11 struct dma_attrs *attrs);
11 12
12extern void 13extern void
13xen_swiotlb_free_coherent(struct device *hwdev, size_t size, 14xen_swiotlb_free_coherent(struct device *hwdev, size_t size,
14 void *vaddr, dma_addr_t dma_handle); 15 void *vaddr, dma_addr_t dma_handle,
16 struct dma_attrs *attrs);
15 17
16extern dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page, 18extern dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page,
17 unsigned long offset, size_t size, 19 unsigned long offset, size_t size,