aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/amba/bus.h1
-rw-r--r--include/linux/cgroup.h15
-rw-r--r--include/linux/dcache.h2
-rw-r--r--include/linux/device.h11
-rw-r--r--include/linux/dmaengine.h1
-rw-r--r--include/linux/filter.h1
-rw-r--r--include/linux/fs.h2
-rw-r--r--include/linux/ftrace.h2
-rw-r--r--include/linux/hugetlb.h10
-rw-r--r--include/linux/hyperv.h4
-rw-r--r--include/linux/if_macvlan.h1
-rw-r--r--include/linux/if_vlan.h15
-rw-r--r--include/linux/interrupt.h40
-rw-r--r--include/linux/ipmi.h2
-rw-r--r--include/linux/ipmi_smi.h11
-rw-r--r--include/linux/irq.h5
-rw-r--r--include/linux/kernfs.h19
-rw-r--r--include/linux/libata.h1
-rw-r--r--include/linux/linkage.h4
-rw-r--r--include/linux/mdio-gpio.h5
-rw-r--r--include/linux/mfd/rtsx_common.h1
-rw-r--r--include/linux/mfd/rtsx_pci.h6
-rw-r--r--include/linux/mlx4/qp.h11
-rw-r--r--include/linux/mlx5/device.h1
-rw-r--r--include/linux/mlx5/qp.h1
-rw-r--r--include/linux/mm.h2
-rw-r--r--include/linux/mtd/spear_smi.h2
-rw-r--r--include/linux/net.h15
-rw-r--r--include/linux/netdevice.h34
-rw-r--r--include/linux/netfilter/nf_conntrack_proto_gre.h1
-rw-r--r--include/linux/netlink.h7
-rw-r--r--include/linux/of.h7
-rw-r--r--include/linux/of_irq.h5
-rw-r--r--include/linux/of_mdio.h7
-rw-r--r--include/linux/omap-dma.h2
-rw-r--r--include/linux/perf_event.h2
-rw-r--r--include/linux/phy.h3
-rw-r--r--include/linux/phy/phy.h16
-rw-r--r--include/linux/reboot.h14
-rw-r--r--include/linux/regulator/consumer.h4
-rw-r--r--include/linux/rtnetlink.h5
-rw-r--r--include/linux/sched.h9
-rw-r--r--include/linux/serio.h1
-rw-r--r--include/linux/slub_def.h9
-rw-r--r--include/linux/sock_diag.h2
-rw-r--r--include/linux/spi/adi_spi3.h254
-rw-r--r--include/linux/sysfs.h9
-rw-r--r--include/linux/wait.h14
48 files changed, 521 insertions, 75 deletions
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h
index 63b5eff0a80f..fdd7e1b61f60 100644
--- a/include/linux/amba/bus.h
+++ b/include/linux/amba/bus.h
@@ -47,6 +47,7 @@ struct amba_driver {
47enum amba_vendor { 47enum amba_vendor {
48 AMBA_VENDOR_ARM = 0x41, 48 AMBA_VENDOR_ARM = 0x41,
49 AMBA_VENDOR_ST = 0x80, 49 AMBA_VENDOR_ST = 0x80,
50 AMBA_VENDOR_QCOM = 0x51,
50}; 51};
51 52
52extern struct bus_type amba_bustype; 53extern struct bus_type amba_bustype;
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index c2515851c1aa..d60904b9e505 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -473,6 +473,7 @@ struct cftype {
473}; 473};
474 474
475extern struct cgroup_root cgrp_dfl_root; 475extern struct cgroup_root cgrp_dfl_root;
476extern struct css_set init_css_set;
476 477
477static inline bool cgroup_on_dfl(const struct cgroup *cgrp) 478static inline bool cgroup_on_dfl(const struct cgroup *cgrp)
478{ 479{
@@ -700,6 +701,20 @@ static inline struct cgroup_subsys_state *task_css(struct task_struct *task,
700 return task_css_check(task, subsys_id, false); 701 return task_css_check(task, subsys_id, false);
701} 702}
702 703
704/**
705 * task_css_is_root - test whether a task belongs to the root css
706 * @task: the target task
707 * @subsys_id: the target subsystem ID
708 *
709 * Test whether @task belongs to the root css on the specified subsystem.
710 * May be invoked in any context.
711 */
712static inline bool task_css_is_root(struct task_struct *task, int subsys_id)
713{
714 return task_css_check(task, subsys_id, true) ==
715 init_css_set.subsys[subsys_id];
716}
717
703static inline struct cgroup *task_cgroup(struct task_struct *task, 718static inline struct cgroup *task_cgroup(struct task_struct *task,
704 int subsys_id) 719 int subsys_id)
705{ 720{
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 3b9bfdb83ba6..3c7ec327ebd2 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -221,6 +221,8 @@ struct dentry_operations {
221#define DCACHE_SYMLINK_TYPE 0x00300000 /* Symlink */ 221#define DCACHE_SYMLINK_TYPE 0x00300000 /* Symlink */
222#define DCACHE_FILE_TYPE 0x00400000 /* Other file type */ 222#define DCACHE_FILE_TYPE 0x00400000 /* Other file type */
223 223
224#define DCACHE_MAY_FREE 0x00800000
225
224extern seqlock_t rename_lock; 226extern seqlock_t rename_lock;
225 227
226static inline int dname_external(const struct dentry *dentry) 228static inline int dname_external(const struct dentry *dentry)
diff --git a/include/linux/device.h b/include/linux/device.h
index 233bbbeb768d..d1d1c055b48e 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -566,12 +566,6 @@ extern int __must_check device_create_bin_file(struct device *dev,
566 const struct bin_attribute *attr); 566 const struct bin_attribute *attr);
567extern void device_remove_bin_file(struct device *dev, 567extern void device_remove_bin_file(struct device *dev,
568 const struct bin_attribute *attr); 568 const struct bin_attribute *attr);
569extern int device_schedule_callback_owner(struct device *dev,
570 void (*func)(struct device *dev), struct module *owner);
571
572/* This is a macro to avoid include problems with THIS_MODULE */
573#define device_schedule_callback(dev, func) \
574 device_schedule_callback_owner(dev, func, THIS_MODULE)
575 569
576/* device resource management */ 570/* device resource management */
577typedef void (*dr_release_t)(struct device *dev, void *res); 571typedef void (*dr_release_t)(struct device *dev, void *res);
@@ -932,10 +926,7 @@ extern int device_online(struct device *dev);
932extern struct device *__root_device_register(const char *name, 926extern struct device *__root_device_register(const char *name,
933 struct module *owner); 927 struct module *owner);
934 928
935/* 929/* This is a macro to avoid include problems with THIS_MODULE */
936 * This is a macro to avoid include problems with THIS_MODULE,
937 * just as per what is done for device_schedule_callback() above.
938 */
939#define root_device_register(name) \ 930#define root_device_register(name) \
940 __root_device_register(name, THIS_MODULE) 931 __root_device_register(name, THIS_MODULE)
941 932
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 8300fb87b84a..72cb0ddb9678 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -429,6 +429,7 @@ typedef bool (*dma_filter_fn)(struct dma_chan *chan, void *filter_param);
429typedef void (*dma_async_tx_callback)(void *dma_async_param); 429typedef void (*dma_async_tx_callback)(void *dma_async_param);
430 430
431struct dmaengine_unmap_data { 431struct dmaengine_unmap_data {
432 u8 map_cnt;
432 u8 to_cnt; 433 u8 to_cnt;
433 u8 from_cnt; 434 u8 from_cnt;
434 u8 bidi_cnt; 435 u8 bidi_cnt;
diff --git a/include/linux/filter.h b/include/linux/filter.h
index 262dcbb75ffe..024fd03e5d18 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -220,7 +220,6 @@ enum {
220 BPF_S_ANC_RXHASH, 220 BPF_S_ANC_RXHASH,
221 BPF_S_ANC_CPU, 221 BPF_S_ANC_CPU,
222 BPF_S_ANC_ALU_XOR_X, 222 BPF_S_ANC_ALU_XOR_X,
223 BPF_S_ANC_SECCOMP_LD_W,
224 BPF_S_ANC_VLAN_TAG, 223 BPF_S_ANC_VLAN_TAG,
225 BPF_S_ANC_VLAN_TAG_PRESENT, 224 BPF_S_ANC_VLAN_TAG_PRESENT,
226 BPF_S_ANC_PAY_OFFSET, 225 BPF_S_ANC_PAY_OFFSET,
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 7a9c5bca2b76..878031227c57 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -815,7 +815,7 @@ static inline struct file *get_file(struct file *f)
815#define FL_SLEEP 128 /* A blocking lock */ 815#define FL_SLEEP 128 /* A blocking lock */
816#define FL_DOWNGRADE_PENDING 256 /* Lease is being downgraded */ 816#define FL_DOWNGRADE_PENDING 256 /* Lease is being downgraded */
817#define FL_UNLOCK_PENDING 512 /* Lease is being broken */ 817#define FL_UNLOCK_PENDING 512 /* Lease is being broken */
818#define FL_FILE_PVT 1024 /* lock is private to the file */ 818#define FL_OFDLCK 1024 /* lock is "owned" by struct file */
819 819
820/* 820/*
821 * Special return value from posix_lock_file() and vfs_lock_file() for 821 * Special return value from posix_lock_file() and vfs_lock_file() for
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 9212b017bc72..ae9504b4b67d 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -535,6 +535,7 @@ static inline int ftrace_modify_call(struct dyn_ftrace *rec, unsigned long old_a
535extern int ftrace_arch_read_dyn_info(char *buf, int size); 535extern int ftrace_arch_read_dyn_info(char *buf, int size);
536 536
537extern int skip_trace(unsigned long ip); 537extern int skip_trace(unsigned long ip);
538extern void ftrace_module_init(struct module *mod);
538 539
539extern void ftrace_disable_daemon(void); 540extern void ftrace_disable_daemon(void);
540extern void ftrace_enable_daemon(void); 541extern void ftrace_enable_daemon(void);
@@ -544,6 +545,7 @@ static inline int ftrace_force_update(void) { return 0; }
544static inline void ftrace_disable_daemon(void) { } 545static inline void ftrace_disable_daemon(void) { }
545static inline void ftrace_enable_daemon(void) { } 546static inline void ftrace_enable_daemon(void) { }
546static inline void ftrace_release_mod(struct module *mod) {} 547static inline void ftrace_release_mod(struct module *mod) {}
548static inline void ftrace_module_init(struct module *mod) {}
547static inline __init int register_ftrace_command(struct ftrace_func_command *cmd) 549static inline __init int register_ftrace_command(struct ftrace_func_command *cmd)
548{ 550{
549 return -EINVAL; 551 return -EINVAL;
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 5b337cf8fb86..b65166de1d9d 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -412,6 +412,16 @@ static inline spinlock_t *huge_pte_lockptr(struct hstate *h,
412 return &mm->page_table_lock; 412 return &mm->page_table_lock;
413} 413}
414 414
415static inline bool hugepages_supported(void)
416{
417 /*
418 * Some platform decide whether they support huge pages at boot
419 * time. On these, such as powerpc, HPAGE_SHIFT is set to 0 when
420 * there is no such support
421 */
422 return HPAGE_SHIFT != 0;
423}
424
415#else /* CONFIG_HUGETLB_PAGE */ 425#else /* CONFIG_HUGETLB_PAGE */
416struct hstate {}; 426struct hstate {};
417#define alloc_huge_page_node(h, nid) NULL 427#define alloc_huge_page_node(h, nid) NULL
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index ab7359fde987..2d7b4f139c32 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -147,15 +147,17 @@ hv_get_ringbuffer_availbytes(struct hv_ring_buffer_info *rbi,
147 * 0 . 13 (Windows Server 2008) 147 * 0 . 13 (Windows Server 2008)
148 * 1 . 1 (Windows 7) 148 * 1 . 1 (Windows 7)
149 * 2 . 4 (Windows 8) 149 * 2 . 4 (Windows 8)
150 * 3 . 0 (Windows 8 R2)
150 */ 151 */
151 152
152#define VERSION_WS2008 ((0 << 16) | (13)) 153#define VERSION_WS2008 ((0 << 16) | (13))
153#define VERSION_WIN7 ((1 << 16) | (1)) 154#define VERSION_WIN7 ((1 << 16) | (1))
154#define VERSION_WIN8 ((2 << 16) | (4)) 155#define VERSION_WIN8 ((2 << 16) | (4))
156#define VERSION_WIN8_1 ((3 << 16) | (0))
155 157
156#define VERSION_INVAL -1 158#define VERSION_INVAL -1
157 159
158#define VERSION_CURRENT VERSION_WIN8 160#define VERSION_CURRENT VERSION_WIN8_1
159 161
160/* Make maximum size of pipe payload of 16K */ 162/* Make maximum size of pipe payload of 16K */
161#define MAX_PIPE_DATA_PAYLOAD (sizeof(u8) * 16384) 163#define MAX_PIPE_DATA_PAYLOAD (sizeof(u8) * 16384)
diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h
index 7c8b20b120ea..a9a53b12397b 100644
--- a/include/linux/if_macvlan.h
+++ b/include/linux/if_macvlan.h
@@ -56,6 +56,7 @@ struct macvlan_dev {
56 int numqueues; 56 int numqueues;
57 netdev_features_t tap_features; 57 netdev_features_t tap_features;
58 int minor; 58 int minor;
59 int nest_level;
59}; 60};
60 61
61static inline void macvlan_count_rx(const struct macvlan_dev *vlan, 62static inline void macvlan_count_rx(const struct macvlan_dev *vlan,
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 13bbbde00e68..b2acc4a1b13c 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -73,7 +73,7 @@ static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb)
73/* found in socket.c */ 73/* found in socket.c */
74extern void vlan_ioctl_set(int (*hook)(struct net *, void __user *)); 74extern void vlan_ioctl_set(int (*hook)(struct net *, void __user *));
75 75
76static inline int is_vlan_dev(struct net_device *dev) 76static inline bool is_vlan_dev(struct net_device *dev)
77{ 77{
78 return dev->priv_flags & IFF_802_1Q_VLAN; 78 return dev->priv_flags & IFF_802_1Q_VLAN;
79} 79}
@@ -159,6 +159,7 @@ struct vlan_dev_priv {
159#ifdef CONFIG_NET_POLL_CONTROLLER 159#ifdef CONFIG_NET_POLL_CONTROLLER
160 struct netpoll *netpoll; 160 struct netpoll *netpoll;
161#endif 161#endif
162 unsigned int nest_level;
162}; 163};
163 164
164static inline struct vlan_dev_priv *vlan_dev_priv(const struct net_device *dev) 165static inline struct vlan_dev_priv *vlan_dev_priv(const struct net_device *dev)
@@ -197,6 +198,12 @@ extern void vlan_vids_del_by_dev(struct net_device *dev,
197 const struct net_device *by_dev); 198 const struct net_device *by_dev);
198 199
199extern bool vlan_uses_dev(const struct net_device *dev); 200extern bool vlan_uses_dev(const struct net_device *dev);
201
202static inline int vlan_get_encap_level(struct net_device *dev)
203{
204 BUG_ON(!is_vlan_dev(dev));
205 return vlan_dev_priv(dev)->nest_level;
206}
200#else 207#else
201static inline struct net_device * 208static inline struct net_device *
202__vlan_find_dev_deep(struct net_device *real_dev, 209__vlan_find_dev_deep(struct net_device *real_dev,
@@ -263,6 +270,11 @@ static inline bool vlan_uses_dev(const struct net_device *dev)
263{ 270{
264 return false; 271 return false;
265} 272}
273static inline int vlan_get_encap_level(struct net_device *dev)
274{
275 BUG();
276 return 0;
277}
266#endif 278#endif
267 279
268static inline bool vlan_hw_offload_capable(netdev_features_t features, 280static inline bool vlan_hw_offload_capable(netdev_features_t features,
@@ -483,4 +495,5 @@ static inline void vlan_set_encap_proto(struct sk_buff *skb,
483 */ 495 */
484 skb->protocol = htons(ETH_P_802_2); 496 skb->protocol = htons(ETH_P_802_2);
485} 497}
498
486#endif /* !(_LINUX_IF_VLAN_H_) */ 499#endif /* !(_LINUX_IF_VLAN_H_) */
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index c7bfac1c4a7b..051c85032f48 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -203,7 +203,40 @@ static inline int check_wakeup_irqs(void) { return 0; }
203 203
204extern cpumask_var_t irq_default_affinity; 204extern cpumask_var_t irq_default_affinity;
205 205
206extern int irq_set_affinity(unsigned int irq, const struct cpumask *cpumask); 206/* Internal implementation. Use the helpers below */
207extern int __irq_set_affinity(unsigned int irq, const struct cpumask *cpumask,
208 bool force);
209
210/**
211 * irq_set_affinity - Set the irq affinity of a given irq
212 * @irq: Interrupt to set affinity
213 * @cpumask: cpumask
214 *
215 * Fails if cpumask does not contain an online CPU
216 */
217static inline int
218irq_set_affinity(unsigned int irq, const struct cpumask *cpumask)
219{
220 return __irq_set_affinity(irq, cpumask, false);
221}
222
223/**
224 * irq_force_affinity - Force the irq affinity of a given irq
225 * @irq: Interrupt to set affinity
226 * @cpumask: cpumask
227 *
228 * Same as irq_set_affinity, but without checking the mask against
229 * online cpus.
230 *
231 * Solely for low level cpu hotplug code, where we need to make per
232 * cpu interrupts affine before the cpu becomes online.
233 */
234static inline int
235irq_force_affinity(unsigned int irq, const struct cpumask *cpumask)
236{
237 return __irq_set_affinity(irq, cpumask, true);
238}
239
207extern int irq_can_set_affinity(unsigned int irq); 240extern int irq_can_set_affinity(unsigned int irq);
208extern int irq_select_affinity(unsigned int irq); 241extern int irq_select_affinity(unsigned int irq);
209 242
@@ -239,6 +272,11 @@ static inline int irq_set_affinity(unsigned int irq, const struct cpumask *m)
239 return -EINVAL; 272 return -EINVAL;
240} 273}
241 274
275static inline int irq_force_affinity(unsigned int irq, const struct cpumask *cpumask)
276{
277 return 0;
278}
279
242static inline int irq_can_set_affinity(unsigned int irq) 280static inline int irq_can_set_affinity(unsigned int irq)
243{ 281{
244 return 0; 282 return 0;
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h
index 1f9f56e28851..76d2acbfa7c6 100644
--- a/include/linux/ipmi.h
+++ b/include/linux/ipmi.h
@@ -237,7 +237,7 @@ int ipmi_set_maintenance_mode(ipmi_user_t user, int mode);
237 * The first user that sets this to TRUE will receive all events that 237 * The first user that sets this to TRUE will receive all events that
238 * have been queued while no one was waiting for events. 238 * have been queued while no one was waiting for events.
239 */ 239 */
240int ipmi_set_gets_events(ipmi_user_t user, int val); 240int ipmi_set_gets_events(ipmi_user_t user, bool val);
241 241
242/* 242/*
243 * Called when a new SMI is registered. This will also be called on 243 * Called when a new SMI is registered. This will also be called on
diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h
index 8ea3fe0b9759..bd349240d50e 100644
--- a/include/linux/ipmi_smi.h
+++ b/include/linux/ipmi_smi.h
@@ -109,12 +109,19 @@ struct ipmi_smi_handlers {
109 events from the BMC we are attached to. */ 109 events from the BMC we are attached to. */
110 void (*request_events)(void *send_info); 110 void (*request_events)(void *send_info);
111 111
112 /* Called by the upper layer when some user requires that the
113 interface watch for events, received messages, watchdog
114 pretimeouts, or not. Used by the SMI to know if it should
115 watch for these. This may be NULL if the SMI does not
116 implement it. */
117 void (*set_need_watch)(void *send_info, bool enable);
118
112 /* Called when the interface should go into "run to 119 /* Called when the interface should go into "run to
113 completion" mode. If this call sets the value to true, the 120 completion" mode. If this call sets the value to true, the
114 interface should make sure that all messages are flushed 121 interface should make sure that all messages are flushed
115 out and that none are pending, and any new requests are run 122 out and that none are pending, and any new requests are run
116 to completion immediately. */ 123 to completion immediately. */
117 void (*set_run_to_completion)(void *send_info, int run_to_completion); 124 void (*set_run_to_completion)(void *send_info, bool run_to_completion);
118 125
119 /* Called to poll for work to do. This is so upper layers can 126 /* Called to poll for work to do. This is so upper layers can
120 poll for operations during things like crash dumps. */ 127 poll for operations during things like crash dumps. */
@@ -125,7 +132,7 @@ struct ipmi_smi_handlers {
125 setting. The message handler does the mode handling. Note 132 setting. The message handler does the mode handling. Note
126 that this is called from interrupt context, so it cannot 133 that this is called from interrupt context, so it cannot
127 block. */ 134 block. */
128 void (*set_maintenance_mode)(void *send_info, int enable); 135 void (*set_maintenance_mode)(void *send_info, bool enable);
129 136
130 /* Tell the handler that we are using it/not using it. The 137 /* Tell the handler that we are using it/not using it. The
131 message handler get the modules that this handler belongs 138 message handler get the modules that this handler belongs
diff --git a/include/linux/irq.h b/include/linux/irq.h
index d278838908cb..5c57efb863d0 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -394,7 +394,8 @@ extern void remove_percpu_irq(unsigned int irq, struct irqaction *act);
394 394
395extern void irq_cpu_online(void); 395extern void irq_cpu_online(void);
396extern void irq_cpu_offline(void); 396extern void irq_cpu_offline(void);
397extern int __irq_set_affinity_locked(struct irq_data *data, const struct cpumask *cpumask); 397extern int irq_set_affinity_locked(struct irq_data *data,
398 const struct cpumask *cpumask, bool force);
398 399
399#if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ) 400#if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ)
400void irq_move_irq(struct irq_data *data); 401void irq_move_irq(struct irq_data *data);
@@ -602,6 +603,8 @@ static inline u32 irq_get_trigger_type(unsigned int irq)
602 return d ? irqd_get_trigger_type(d) : 0; 603 return d ? irqd_get_trigger_type(d) : 0;
603} 604}
604 605
606unsigned int arch_dynirq_lower_bound(unsigned int from);
607
605int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node, 608int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node,
606 struct module *owner); 609 struct module *owner);
607 610
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h
index b0122dc6f96a..ca1be5c9136c 100644
--- a/include/linux/kernfs.h
+++ b/include/linux/kernfs.h
@@ -50,7 +50,24 @@ enum kernfs_node_flag {
50 50
51/* @flags for kernfs_create_root() */ 51/* @flags for kernfs_create_root() */
52enum kernfs_root_flag { 52enum kernfs_root_flag {
53 KERNFS_ROOT_CREATE_DEACTIVATED = 0x0001, 53 /*
54 * kernfs_nodes are created in the deactivated state and invisible.
55 * They require explicit kernfs_activate() to become visible. This
56 * can be used to make related nodes become visible atomically
57 * after all nodes are created successfully.
58 */
59 KERNFS_ROOT_CREATE_DEACTIVATED = 0x0001,
60
61 /*
62 * For regular flies, if the opener has CAP_DAC_OVERRIDE, open(2)
63 * succeeds regardless of the RW permissions. sysfs had an extra
64 * layer of enforcement where open(2) fails with -EACCES regardless
65 * of CAP_DAC_OVERRIDE if the permission doesn't have the
66 * respective read or write access at all (none of S_IRUGO or
67 * S_IWUGO) or the respective operation isn't implemented. The
68 * following flag enables that behavior.
69 */
70 KERNFS_ROOT_EXTRA_OPEN_PERM_CHECK = 0x0002,
54}; 71};
55 72
56/* type-specific structures for kernfs_node union members */ 73/* type-specific structures for kernfs_node union members */
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 1de36be64df4..5ab4e3a76721 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -822,6 +822,7 @@ struct ata_port {
822 unsigned long qc_allocated; 822 unsigned long qc_allocated;
823 unsigned int qc_active; 823 unsigned int qc_active;
824 int nr_active_links; /* #links with active qcs */ 824 int nr_active_links; /* #links with active qcs */
825 unsigned int last_tag; /* track next tag hw expects */
825 826
826 struct ata_link link; /* host default link */ 827 struct ata_link link; /* host default link */
827 struct ata_link *slave_link; /* see ata_slave_link_init() */ 828 struct ata_link *slave_link; /* see ata_slave_link_init() */
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index 34a513a2727b..a6a42dd02466 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -12,9 +12,9 @@
12#endif 12#endif
13 13
14#ifdef __cplusplus 14#ifdef __cplusplus
15#define CPP_ASMLINKAGE extern "C" __visible 15#define CPP_ASMLINKAGE extern "C"
16#else 16#else
17#define CPP_ASMLINKAGE __visible 17#define CPP_ASMLINKAGE
18#endif 18#endif
19 19
20#ifndef asmlinkage 20#ifndef asmlinkage
diff --git a/include/linux/mdio-gpio.h b/include/linux/mdio-gpio.h
index 7c9fe3c2be73..66c30a763b10 100644
--- a/include/linux/mdio-gpio.h
+++ b/include/linux/mdio-gpio.h
@@ -17,6 +17,11 @@ struct mdio_gpio_platform_data {
17 /* GPIO numbers for bus pins */ 17 /* GPIO numbers for bus pins */
18 unsigned int mdc; 18 unsigned int mdc;
19 unsigned int mdio; 19 unsigned int mdio;
20 unsigned int mdo;
21
22 bool mdc_active_low;
23 bool mdio_active_low;
24 bool mdo_active_low;
20 25
21 unsigned int phy_mask; 26 unsigned int phy_mask;
22 int irqs[PHY_MAX_ADDR]; 27 int irqs[PHY_MAX_ADDR];
diff --git a/include/linux/mfd/rtsx_common.h b/include/linux/mfd/rtsx_common.h
index 7c36cc55d2c7..443176ee1ab0 100644
--- a/include/linux/mfd/rtsx_common.h
+++ b/include/linux/mfd/rtsx_common.h
@@ -45,7 +45,6 @@ struct platform_device;
45struct rtsx_slot { 45struct rtsx_slot {
46 struct platform_device *p_dev; 46 struct platform_device *p_dev;
47 void (*card_event)(struct platform_device *p_dev); 47 void (*card_event)(struct platform_device *p_dev);
48 void (*done_transfer)(struct platform_device *p_dev);
49}; 48};
50 49
51#endif 50#endif
diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h
index 8d6bbd609ad9..a3835976f7c6 100644
--- a/include/linux/mfd/rtsx_pci.h
+++ b/include/linux/mfd/rtsx_pci.h
@@ -943,12 +943,6 @@ 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);
948int 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 sg_count, bool read);
952int rtsx_pci_read_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len); 946int rtsx_pci_read_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len);
953int rtsx_pci_write_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len); 947int rtsx_pci_write_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len);
954int rtsx_pci_card_pull_ctl_enable(struct rtsx_pcr *pcr, int card); 948int rtsx_pci_card_pull_ctl_enable(struct rtsx_pcr *pcr, int card);
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h
index b66e7610d4ee..7040dc98ff8b 100644
--- a/include/linux/mlx4/qp.h
+++ b/include/linux/mlx4/qp.h
@@ -421,6 +421,17 @@ struct mlx4_wqe_inline_seg {
421 __be32 byte_count; 421 __be32 byte_count;
422}; 422};
423 423
424enum mlx4_update_qp_attr {
425 MLX4_UPDATE_QP_SMAC = 1 << 0,
426};
427
428struct mlx4_update_qp_params {
429 u8 smac_index;
430};
431
432int mlx4_update_qp(struct mlx4_dev *dev, struct mlx4_qp *qp,
433 enum mlx4_update_qp_attr attr,
434 struct mlx4_update_qp_params *params);
424int mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt, 435int mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
425 enum mlx4_qp_state cur_state, enum mlx4_qp_state new_state, 436 enum mlx4_qp_state cur_state, enum mlx4_qp_state new_state,
426 struct mlx4_qp_context *context, enum mlx4_qp_optpar optpar, 437 struct mlx4_qp_context *context, enum mlx4_qp_optpar optpar,
diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h
index 407bdb67fd4f..3406cfb1267a 100644
--- a/include/linux/mlx5/device.h
+++ b/include/linux/mlx5/device.h
@@ -179,6 +179,7 @@ enum {
179 MLX5_DEV_CAP_FLAG_BAD_QKEY_CNTR = 1LL << 9, 179 MLX5_DEV_CAP_FLAG_BAD_QKEY_CNTR = 1LL << 9,
180 MLX5_DEV_CAP_FLAG_APM = 1LL << 17, 180 MLX5_DEV_CAP_FLAG_APM = 1LL << 17,
181 MLX5_DEV_CAP_FLAG_ATOMIC = 1LL << 18, 181 MLX5_DEV_CAP_FLAG_ATOMIC = 1LL << 18,
182 MLX5_DEV_CAP_FLAG_BLOCK_MCAST = 1LL << 23,
182 MLX5_DEV_CAP_FLAG_ON_DMND_PG = 1LL << 24, 183 MLX5_DEV_CAP_FLAG_ON_DMND_PG = 1LL << 24,
183 MLX5_DEV_CAP_FLAG_CQ_MODER = 1LL << 29, 184 MLX5_DEV_CAP_FLAG_CQ_MODER = 1LL << 29,
184 MLX5_DEV_CAP_FLAG_RESIZE_CQ = 1LL << 30, 185 MLX5_DEV_CAP_FLAG_RESIZE_CQ = 1LL << 30,
diff --git a/include/linux/mlx5/qp.h b/include/linux/mlx5/qp.h
index f829ad80ff28..9709b30e2d69 100644
--- a/include/linux/mlx5/qp.h
+++ b/include/linux/mlx5/qp.h
@@ -146,6 +146,7 @@ enum {
146 146
147enum { 147enum {
148 MLX5_QP_LAT_SENSITIVE = 1 << 28, 148 MLX5_QP_LAT_SENSITIVE = 1 << 28,
149 MLX5_QP_BLOCK_MCAST = 1 << 30,
149 MLX5_QP_ENABLE_SIG = 1 << 31, 150 MLX5_QP_ENABLE_SIG = 1 << 31,
150}; 151};
151 152
diff --git a/include/linux/mm.h b/include/linux/mm.h
index bf9811e1321a..d6777060449f 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -370,6 +370,8 @@ static inline int is_vmalloc_or_module_addr(const void *x)
370} 370}
371#endif 371#endif
372 372
373extern void kvfree(const void *addr);
374
373static inline void compound_lock(struct page *page) 375static inline void compound_lock(struct page *page)
374{ 376{
375#ifdef CONFIG_TRANSPARENT_HUGEPAGE 377#ifdef CONFIG_TRANSPARENT_HUGEPAGE
diff --git a/include/linux/mtd/spear_smi.h b/include/linux/mtd/spear_smi.h
index 8ae1726044c3..581603ac1277 100644
--- a/include/linux/mtd/spear_smi.h
+++ b/include/linux/mtd/spear_smi.h
@@ -1,6 +1,6 @@
1/* 1/*
2 * Copyright © 2010 ST Microelectronics 2 * Copyright © 2010 ST Microelectronics
3 * Shiraz Hashim <shiraz.hashim@st.com> 3 * Shiraz Hashim <shiraz.linux.kernel@gmail.com>
4 * 4 *
5 * This file is licensed under the terms of the GNU General Public 5 * This file is licensed under the terms of the GNU General Public
6 * License version 2. This program is licensed "as is" without any 6 * License version 2. This program is licensed "as is" without any
diff --git a/include/linux/net.h b/include/linux/net.h
index 94734a6259a4..17d83393afcc 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -248,24 +248,17 @@ do { \
248bool __net_get_random_once(void *buf, int nbytes, bool *done, 248bool __net_get_random_once(void *buf, int nbytes, bool *done,
249 struct static_key *done_key); 249 struct static_key *done_key);
250 250
251#ifdef HAVE_JUMP_LABEL
252#define ___NET_RANDOM_STATIC_KEY_INIT ((struct static_key) \
253 { .enabled = ATOMIC_INIT(0), .entries = (void *)1 })
254#else /* !HAVE_JUMP_LABEL */
255#define ___NET_RANDOM_STATIC_KEY_INIT STATIC_KEY_INIT_FALSE
256#endif /* HAVE_JUMP_LABEL */
257
258#define net_get_random_once(buf, nbytes) \ 251#define net_get_random_once(buf, nbytes) \
259 ({ \ 252 ({ \
260 bool ___ret = false; \ 253 bool ___ret = false; \
261 static bool ___done = false; \ 254 static bool ___done = false; \
262 static struct static_key ___done_key = \ 255 static struct static_key ___once_key = \
263 ___NET_RANDOM_STATIC_KEY_INIT; \ 256 STATIC_KEY_INIT_TRUE; \
264 if (!static_key_true(&___done_key)) \ 257 if (static_key_true(&___once_key)) \
265 ___ret = __net_get_random_once(buf, \ 258 ___ret = __net_get_random_once(buf, \
266 nbytes, \ 259 nbytes, \
267 &___done, \ 260 &___done, \
268 &___done_key); \ 261 &___once_key); \
269 ___ret; \ 262 ___ret; \
270 }) 263 })
271 264
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 7ed3a3aa6604..b42d07b0390b 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1144,6 +1144,7 @@ struct net_device_ops {
1144 netdev_tx_t (*ndo_dfwd_start_xmit) (struct sk_buff *skb, 1144 netdev_tx_t (*ndo_dfwd_start_xmit) (struct sk_buff *skb,
1145 struct net_device *dev, 1145 struct net_device *dev,
1146 void *priv); 1146 void *priv);
1147 int (*ndo_get_lock_subclass)(struct net_device *dev);
1147}; 1148};
1148 1149
1149/** 1150/**
@@ -2950,7 +2951,12 @@ static inline void netif_addr_lock(struct net_device *dev)
2950 2951
2951static inline void netif_addr_lock_nested(struct net_device *dev) 2952static inline void netif_addr_lock_nested(struct net_device *dev)
2952{ 2953{
2953 spin_lock_nested(&dev->addr_list_lock, SINGLE_DEPTH_NESTING); 2954 int subclass = SINGLE_DEPTH_NESTING;
2955
2956 if (dev->netdev_ops->ndo_get_lock_subclass)
2957 subclass = dev->netdev_ops->ndo_get_lock_subclass(dev);
2958
2959 spin_lock_nested(&dev->addr_list_lock, subclass);
2954} 2960}
2955 2961
2956static inline void netif_addr_lock_bh(struct net_device *dev) 2962static inline void netif_addr_lock_bh(struct net_device *dev)
@@ -3050,10 +3056,19 @@ extern int weight_p;
3050extern int bpf_jit_enable; 3056extern int bpf_jit_enable;
3051 3057
3052bool netdev_has_upper_dev(struct net_device *dev, struct net_device *upper_dev); 3058bool netdev_has_upper_dev(struct net_device *dev, struct net_device *upper_dev);
3059struct net_device *netdev_upper_get_next_dev_rcu(struct net_device *dev,
3060 struct list_head **iter);
3053struct net_device *netdev_all_upper_get_next_dev_rcu(struct net_device *dev, 3061struct net_device *netdev_all_upper_get_next_dev_rcu(struct net_device *dev,
3054 struct list_head **iter); 3062 struct list_head **iter);
3055 3063
3056/* iterate through upper list, must be called under RCU read lock */ 3064/* iterate through upper list, must be called under RCU read lock */
3065#define netdev_for_each_upper_dev_rcu(dev, updev, iter) \
3066 for (iter = &(dev)->adj_list.upper, \
3067 updev = netdev_upper_get_next_dev_rcu(dev, &(iter)); \
3068 updev; \
3069 updev = netdev_upper_get_next_dev_rcu(dev, &(iter)))
3070
3071/* iterate through upper list, must be called under RCU read lock */
3057#define netdev_for_each_all_upper_dev_rcu(dev, updev, iter) \ 3072#define netdev_for_each_all_upper_dev_rcu(dev, updev, iter) \
3058 for (iter = &(dev)->all_adj_list.upper, \ 3073 for (iter = &(dev)->all_adj_list.upper, \
3059 updev = netdev_all_upper_get_next_dev_rcu(dev, &(iter)); \ 3074 updev = netdev_all_upper_get_next_dev_rcu(dev, &(iter)); \
@@ -3077,6 +3092,14 @@ void *netdev_lower_get_next_private_rcu(struct net_device *dev,
3077 priv; \ 3092 priv; \
3078 priv = netdev_lower_get_next_private_rcu(dev, &(iter))) 3093 priv = netdev_lower_get_next_private_rcu(dev, &(iter)))
3079 3094
3095void *netdev_lower_get_next(struct net_device *dev,
3096 struct list_head **iter);
3097#define netdev_for_each_lower_dev(dev, ldev, iter) \
3098 for (iter = &(dev)->adj_list.lower, \
3099 ldev = netdev_lower_get_next(dev, &(iter)); \
3100 ldev; \
3101 ldev = netdev_lower_get_next(dev, &(iter)))
3102
3080void *netdev_adjacent_get_private(struct list_head *adj_list); 3103void *netdev_adjacent_get_private(struct list_head *adj_list);
3081void *netdev_lower_get_first_private_rcu(struct net_device *dev); 3104void *netdev_lower_get_first_private_rcu(struct net_device *dev);
3082struct net_device *netdev_master_upper_dev_get(struct net_device *dev); 3105struct net_device *netdev_master_upper_dev_get(struct net_device *dev);
@@ -3092,6 +3115,8 @@ void netdev_upper_dev_unlink(struct net_device *dev,
3092void netdev_adjacent_rename_links(struct net_device *dev, char *oldname); 3115void netdev_adjacent_rename_links(struct net_device *dev, char *oldname);
3093void *netdev_lower_dev_get_private(struct net_device *dev, 3116void *netdev_lower_dev_get_private(struct net_device *dev,
3094 struct net_device *lower_dev); 3117 struct net_device *lower_dev);
3118int dev_get_nest_level(struct net_device *dev,
3119 bool (*type_check)(struct net_device *dev));
3095int skb_checksum_help(struct sk_buff *skb); 3120int skb_checksum_help(struct sk_buff *skb);
3096struct sk_buff *__skb_gso_segment(struct sk_buff *skb, 3121struct sk_buff *__skb_gso_segment(struct sk_buff *skb,
3097 netdev_features_t features, bool tx_path); 3122 netdev_features_t features, bool tx_path);
@@ -3180,12 +3205,7 @@ void netdev_change_features(struct net_device *dev);
3180void netif_stacked_transfer_operstate(const struct net_device *rootdev, 3205void netif_stacked_transfer_operstate(const struct net_device *rootdev,
3181 struct net_device *dev); 3206 struct net_device *dev);
3182 3207
3183netdev_features_t netif_skb_dev_features(struct sk_buff *skb, 3208netdev_features_t netif_skb_features(struct sk_buff *skb);
3184 const struct net_device *dev);
3185static inline netdev_features_t netif_skb_features(struct sk_buff *skb)
3186{
3187 return netif_skb_dev_features(skb, skb->dev);
3188}
3189 3209
3190static inline bool net_gso_ok(netdev_features_t features, int gso_type) 3210static inline bool net_gso_ok(netdev_features_t features, int gso_type)
3191{ 3211{
diff --git a/include/linux/netfilter/nf_conntrack_proto_gre.h b/include/linux/netfilter/nf_conntrack_proto_gre.h
index ec2ffaf418c8..df78dc2b5524 100644
--- a/include/linux/netfilter/nf_conntrack_proto_gre.h
+++ b/include/linux/netfilter/nf_conntrack_proto_gre.h
@@ -87,7 +87,6 @@ int nf_ct_gre_keymap_add(struct nf_conn *ct, enum ip_conntrack_dir dir,
87/* delete keymap entries */ 87/* delete keymap entries */
88void nf_ct_gre_keymap_destroy(struct nf_conn *ct); 88void nf_ct_gre_keymap_destroy(struct nf_conn *ct);
89 89
90void nf_ct_gre_keymap_flush(struct net *net);
91void nf_nat_need_gre(void); 90void nf_nat_need_gre(void);
92 91
93#endif /* __KERNEL__ */ 92#endif /* __KERNEL__ */
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index aad8eeaf416d..f64b01787ddc 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -169,4 +169,11 @@ struct netlink_tap {
169extern int netlink_add_tap(struct netlink_tap *nt); 169extern int netlink_add_tap(struct netlink_tap *nt);
170extern int netlink_remove_tap(struct netlink_tap *nt); 170extern int netlink_remove_tap(struct netlink_tap *nt);
171 171
172bool __netlink_ns_capable(const struct netlink_skb_parms *nsp,
173 struct user_namespace *ns, int cap);
174bool netlink_ns_capable(const struct sk_buff *skb,
175 struct user_namespace *ns, int cap);
176bool netlink_capable(const struct sk_buff *skb, int cap);
177bool netlink_net_capable(const struct sk_buff *skb, int cap);
178
172#endif /* __LINUX_NETLINK_H */ 179#endif /* __LINUX_NETLINK_H */
diff --git a/include/linux/of.h b/include/linux/of.h
index 919bf211877d..e6f0988c1c68 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -349,7 +349,7 @@ int of_device_is_stdout_path(struct device_node *dn);
349 349
350#else /* CONFIG_OF */ 350#else /* CONFIG_OF */
351 351
352static inline const char* of_node_full_name(struct device_node *np) 352static inline const char* of_node_full_name(const struct device_node *np)
353{ 353{
354 return "<no-node>"; 354 return "<no-node>";
355} 355}
@@ -374,6 +374,11 @@ static inline struct device_node *of_find_matching_node_and_match(
374 return NULL; 374 return NULL;
375} 375}
376 376
377static inline struct device_node *of_find_node_by_path(const char *path)
378{
379 return NULL;
380}
381
377static inline struct device_node *of_get_parent(const struct device_node *node) 382static inline struct device_node *of_get_parent(const struct device_node *node)
378{ 383{
379 return NULL; 384 return NULL;
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
index 3f23b4472c31..6404253d810d 100644
--- a/include/linux/of_irq.h
+++ b/include/linux/of_irq.h
@@ -44,11 +44,16 @@ extern void of_irq_init(const struct of_device_id *matches);
44 44
45#ifdef CONFIG_OF_IRQ 45#ifdef CONFIG_OF_IRQ
46extern int of_irq_count(struct device_node *dev); 46extern int of_irq_count(struct device_node *dev);
47extern int of_irq_get(struct device_node *dev, int index);
47#else 48#else
48static inline int of_irq_count(struct device_node *dev) 49static inline int of_irq_count(struct device_node *dev)
49{ 50{
50 return 0; 51 return 0;
51} 52}
53static inline int of_irq_get(struct device_node *dev, int index)
54{
55 return 0;
56}
52#endif 57#endif
53 58
54#if defined(CONFIG_OF) 59#if defined(CONFIG_OF)
diff --git a/include/linux/of_mdio.h b/include/linux/of_mdio.h
index 6fe8464ed767..881a7c3571f4 100644
--- a/include/linux/of_mdio.h
+++ b/include/linux/of_mdio.h
@@ -31,7 +31,12 @@ extern struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np);
31#else /* CONFIG_OF */ 31#else /* CONFIG_OF */
32static inline int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) 32static inline int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
33{ 33{
34 return -ENOSYS; 34 /*
35 * Fall back to the non-DT function to register a bus.
36 * This way, we don't have to keep compat bits around in drivers.
37 */
38
39 return mdiobus_register(mdio);
35} 40}
36 41
37static inline struct phy_device *of_phy_find_device(struct device_node *phy_np) 42static inline struct phy_device *of_phy_find_device(struct device_node *phy_np)
diff --git a/include/linux/omap-dma.h b/include/linux/omap-dma.h
index 41a13e70f41f..7944cdc27bed 100644
--- a/include/linux/omap-dma.h
+++ b/include/linux/omap-dma.h
@@ -10,7 +10,7 @@
10 10
11struct dma_chan; 11struct dma_chan;
12 12
13#if defined(CONFIG_DMA_OMAP) || defined(CONFIG_DMA_OMAP_MODULE) 13#if defined(CONFIG_DMA_OMAP) || (defined(CONFIG_DMA_OMAP_MODULE) && defined(MODULE))
14bool omap_dma_filter_fn(struct dma_chan *, void *); 14bool omap_dma_filter_fn(struct dma_chan *, void *);
15#else 15#else
16static inline bool omap_dma_filter_fn(struct dma_chan *c, void *d) 16static inline bool omap_dma_filter_fn(struct dma_chan *c, void *d)
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 3356abcfff18..3ef6ea12806a 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -402,6 +402,8 @@ struct perf_event {
402 402
403 struct ring_buffer *rb; 403 struct ring_buffer *rb;
404 struct list_head rb_entry; 404 struct list_head rb_entry;
405 unsigned long rcu_batches;
406 int rcu_pending;
405 407
406 /* poll related */ 408 /* poll related */
407 wait_queue_head_t waitq; 409 wait_queue_head_t waitq;
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 24126c4b27b5..4d0221fd0688 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -75,6 +75,7 @@ typedef enum {
75 PHY_INTERFACE_MODE_SMII, 75 PHY_INTERFACE_MODE_SMII,
76 PHY_INTERFACE_MODE_XGMII, 76 PHY_INTERFACE_MODE_XGMII,
77 PHY_INTERFACE_MODE_MOCA, 77 PHY_INTERFACE_MODE_MOCA,
78 PHY_INTERFACE_MODE_QSGMII,
78 PHY_INTERFACE_MODE_MAX, 79 PHY_INTERFACE_MODE_MAX,
79} phy_interface_t; 80} phy_interface_t;
80 81
@@ -116,6 +117,8 @@ static inline const char *phy_modes(phy_interface_t interface)
116 return "xgmii"; 117 return "xgmii";
117 case PHY_INTERFACE_MODE_MOCA: 118 case PHY_INTERFACE_MODE_MOCA:
118 return "moca"; 119 return "moca";
120 case PHY_INTERFACE_MODE_QSGMII:
121 return "qsgmii";
119 default: 122 default:
120 return "unknown"; 123 return "unknown";
121 } 124 }
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
index e2f5ca96cddc..2760744cb2a7 100644
--- a/include/linux/phy/phy.h
+++ b/include/linux/phy/phy.h
@@ -174,21 +174,29 @@ void devm_of_phy_provider_unregister(struct device *dev,
174#else 174#else
175static inline int phy_pm_runtime_get(struct phy *phy) 175static inline int phy_pm_runtime_get(struct phy *phy)
176{ 176{
177 if (!phy)
178 return 0;
177 return -ENOSYS; 179 return -ENOSYS;
178} 180}
179 181
180static inline int phy_pm_runtime_get_sync(struct phy *phy) 182static inline int phy_pm_runtime_get_sync(struct phy *phy)
181{ 183{
184 if (!phy)
185 return 0;
182 return -ENOSYS; 186 return -ENOSYS;
183} 187}
184 188
185static inline int phy_pm_runtime_put(struct phy *phy) 189static inline int phy_pm_runtime_put(struct phy *phy)
186{ 190{
191 if (!phy)
192 return 0;
187 return -ENOSYS; 193 return -ENOSYS;
188} 194}
189 195
190static inline int phy_pm_runtime_put_sync(struct phy *phy) 196static inline int phy_pm_runtime_put_sync(struct phy *phy)
191{ 197{
198 if (!phy)
199 return 0;
192 return -ENOSYS; 200 return -ENOSYS;
193} 201}
194 202
@@ -204,21 +212,29 @@ static inline void phy_pm_runtime_forbid(struct phy *phy)
204 212
205static inline int phy_init(struct phy *phy) 213static inline int phy_init(struct phy *phy)
206{ 214{
215 if (!phy)
216 return 0;
207 return -ENOSYS; 217 return -ENOSYS;
208} 218}
209 219
210static inline int phy_exit(struct phy *phy) 220static inline int phy_exit(struct phy *phy)
211{ 221{
222 if (!phy)
223 return 0;
212 return -ENOSYS; 224 return -ENOSYS;
213} 225}
214 226
215static inline int phy_power_on(struct phy *phy) 227static inline int phy_power_on(struct phy *phy)
216{ 228{
229 if (!phy)
230 return 0;
217 return -ENOSYS; 231 return -ENOSYS;
218} 232}
219 233
220static inline int phy_power_off(struct phy *phy) 234static inline int phy_power_off(struct phy *phy)
221{ 235{
236 if (!phy)
237 return 0;
222 return -ENOSYS; 238 return -ENOSYS;
223} 239}
224 240
diff --git a/include/linux/reboot.h b/include/linux/reboot.h
index 9e7db9e73cc1..48bf152761c7 100644
--- a/include/linux/reboot.h
+++ b/include/linux/reboot.h
@@ -20,13 +20,13 @@ enum reboot_mode {
20extern enum reboot_mode reboot_mode; 20extern enum reboot_mode reboot_mode;
21 21
22enum reboot_type { 22enum reboot_type {
23 BOOT_TRIPLE = 't', 23 BOOT_TRIPLE = 't',
24 BOOT_KBD = 'k', 24 BOOT_KBD = 'k',
25 BOOT_BIOS = 'b', 25 BOOT_BIOS = 'b',
26 BOOT_ACPI = 'a', 26 BOOT_ACPI = 'a',
27 BOOT_EFI = 'e', 27 BOOT_EFI = 'e',
28 BOOT_CF9 = 'p', 28 BOOT_CF9_FORCE = 'p',
29 BOOT_CF9_COND = 'q', 29 BOOT_CF9_SAFE = 'q',
30}; 30};
31extern enum reboot_type reboot_type; 31extern enum reboot_type reboot_type;
32 32
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index e530681bea70..1a4a8c157b31 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -258,14 +258,14 @@ regulator_get_exclusive(struct device *dev, const char *id)
258static inline struct regulator *__must_check 258static inline struct regulator *__must_check
259regulator_get_optional(struct device *dev, const char *id) 259regulator_get_optional(struct device *dev, const char *id)
260{ 260{
261 return NULL; 261 return ERR_PTR(-ENODEV);
262} 262}
263 263
264 264
265static inline struct regulator *__must_check 265static inline struct regulator *__must_check
266devm_regulator_get_optional(struct device *dev, const char *id) 266devm_regulator_get_optional(struct device *dev, const char *id)
267{ 267{
268 return NULL; 268 return ERR_PTR(-ENODEV);
269} 269}
270 270
271static inline void regulator_put(struct regulator *regulator) 271static inline void regulator_put(struct regulator *regulator)
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 8e3e66ac0a52..953937ea5233 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -4,6 +4,7 @@
4 4
5#include <linux/mutex.h> 5#include <linux/mutex.h>
6#include <linux/netdevice.h> 6#include <linux/netdevice.h>
7#include <linux/wait.h>
7#include <uapi/linux/rtnetlink.h> 8#include <uapi/linux/rtnetlink.h>
8 9
9extern int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, u32 group, int echo); 10extern int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, u32 group, int echo);
@@ -22,6 +23,10 @@ extern void rtnl_lock(void);
22extern void rtnl_unlock(void); 23extern void rtnl_unlock(void);
23extern int rtnl_trylock(void); 24extern int rtnl_trylock(void);
24extern int rtnl_is_locked(void); 25extern int rtnl_is_locked(void);
26
27extern wait_queue_head_t netdev_unregistering_wq;
28extern struct mutex net_mutex;
29
25#ifdef CONFIG_PROVE_LOCKING 30#ifdef CONFIG_PROVE_LOCKING
26extern int lockdep_rtnl_is_held(void); 31extern int lockdep_rtnl_is_held(void);
27#else 32#else
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 25f54c79f757..221b2bde3723 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -220,7 +220,7 @@ print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq);
220#define TASK_PARKED 512 220#define TASK_PARKED 512
221#define TASK_STATE_MAX 1024 221#define TASK_STATE_MAX 1024
222 222
223#define TASK_STATE_TO_CHAR_STR "RSDTtZXxKWP" 223#define TASK_STATE_TO_CHAR_STR "RSDTtXZxKWP"
224 224
225extern char ___assert_task_state[1 - 2*!!( 225extern char ___assert_task_state[1 - 2*!!(
226 sizeof(TASK_STATE_TO_CHAR_STR)-1 != ilog2(TASK_STATE_MAX)+1)]; 226 sizeof(TASK_STATE_TO_CHAR_STR)-1 != ilog2(TASK_STATE_MAX)+1)];
@@ -1153,9 +1153,12 @@ struct sched_dl_entity {
1153 * 1153 *
1154 * @dl_boosted tells if we are boosted due to DI. If so we are 1154 * @dl_boosted tells if we are boosted due to DI. If so we are
1155 * outside bandwidth enforcement mechanism (but only until we 1155 * outside bandwidth enforcement mechanism (but only until we
1156 * exit the critical section). 1156 * exit the critical section);
1157 *
1158 * @dl_yielded tells if task gave up the cpu before consuming
1159 * all its available runtime during the last job.
1157 */ 1160 */
1158 int dl_throttled, dl_new, dl_boosted; 1161 int dl_throttled, dl_new, dl_boosted, dl_yielded;
1159 1162
1160 /* 1163 /*
1161 * Bandwidth enforcement timer. Each -deadline task has its 1164 * Bandwidth enforcement timer. Each -deadline task has its
diff --git a/include/linux/serio.h b/include/linux/serio.h
index 36aac733840a..9f779c7a2da4 100644
--- a/include/linux/serio.h
+++ b/include/linux/serio.h
@@ -23,6 +23,7 @@ struct serio {
23 23
24 char name[32]; 24 char name[32];
25 char phys[32]; 25 char phys[32];
26 char firmware_id[128];
26 27
27 bool manual_bind; 28 bool manual_bind;
28 29
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index f2f7398848cf..d82abd40a3c0 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -101,4 +101,13 @@ struct kmem_cache {
101 struct kmem_cache_node *node[MAX_NUMNODES]; 101 struct kmem_cache_node *node[MAX_NUMNODES];
102}; 102};
103 103
104#ifdef CONFIG_SYSFS
105#define SLAB_SUPPORTS_SYSFS
106void sysfs_slab_remove(struct kmem_cache *);
107#else
108static inline void sysfs_slab_remove(struct kmem_cache *s)
109{
110}
111#endif
112
104#endif /* _LINUX_SLUB_DEF_H */ 113#endif /* _LINUX_SLUB_DEF_H */
diff --git a/include/linux/sock_diag.h b/include/linux/sock_diag.h
index 54f91d35e5fd..46cca4c06848 100644
--- a/include/linux/sock_diag.h
+++ b/include/linux/sock_diag.h
@@ -23,7 +23,7 @@ int sock_diag_check_cookie(void *sk, __u32 *cookie);
23void sock_diag_save_cookie(void *sk, __u32 *cookie); 23void sock_diag_save_cookie(void *sk, __u32 *cookie);
24 24
25int sock_diag_put_meminfo(struct sock *sk, struct sk_buff *skb, int attr); 25int sock_diag_put_meminfo(struct sock *sk, struct sk_buff *skb, int attr);
26int sock_diag_put_filterinfo(struct user_namespace *user_ns, struct sock *sk, 26int sock_diag_put_filterinfo(bool may_report_filterinfo, struct sock *sk,
27 struct sk_buff *skb, int attrtype); 27 struct sk_buff *skb, int attrtype);
28 28
29#endif 29#endif
diff --git a/include/linux/spi/adi_spi3.h b/include/linux/spi/adi_spi3.h
new file mode 100644
index 000000000000..c84123aa1d06
--- /dev/null
+++ b/include/linux/spi/adi_spi3.h
@@ -0,0 +1,254 @@
1/*
2 * Analog Devices SPI3 controller driver
3 *
4 * Copyright (c) 2014 Analog Devices Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * 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
16#ifndef _ADI_SPI3_H_
17#define _ADI_SPI3_H_
18
19#include <linux/types.h>
20
21/* SPI_CONTROL */
22#define SPI_CTL_EN 0x00000001 /* Enable */
23#define SPI_CTL_MSTR 0x00000002 /* Master/Slave */
24#define SPI_CTL_PSSE 0x00000004 /* controls modf error in master mode */
25#define SPI_CTL_ODM 0x00000008 /* Open Drain Mode */
26#define SPI_CTL_CPHA 0x00000010 /* Clock Phase */
27#define SPI_CTL_CPOL 0x00000020 /* Clock Polarity */
28#define SPI_CTL_ASSEL 0x00000040 /* Slave Select Pin Control */
29#define SPI_CTL_SELST 0x00000080 /* Slave Select Polarity in-between transfers */
30#define SPI_CTL_EMISO 0x00000100 /* Enable MISO */
31#define SPI_CTL_SIZE 0x00000600 /* Word Transfer Size */
32#define SPI_CTL_SIZE08 0x00000000 /* SIZE: 8 bits */
33#define SPI_CTL_SIZE16 0x00000200 /* SIZE: 16 bits */
34#define SPI_CTL_SIZE32 0x00000400 /* SIZE: 32 bits */
35#define SPI_CTL_LSBF 0x00001000 /* LSB First */
36#define SPI_CTL_FCEN 0x00002000 /* Flow-Control Enable */
37#define SPI_CTL_FCCH 0x00004000 /* Flow-Control Channel Selection */
38#define SPI_CTL_FCPL 0x00008000 /* Flow-Control Polarity */
39#define SPI_CTL_FCWM 0x00030000 /* Flow-Control Water-Mark */
40#define SPI_CTL_FIFO0 0x00000000 /* FCWM: TFIFO empty or RFIFO Full */
41#define SPI_CTL_FIFO1 0x00010000 /* FCWM: TFIFO 75% or more empty or RFIFO 75% or more full */
42#define SPI_CTL_FIFO2 0x00020000 /* FCWM: TFIFO 50% or more empty or RFIFO 50% or more full */
43#define SPI_CTL_FMODE 0x00040000 /* Fast-mode Enable */
44#define SPI_CTL_MIOM 0x00300000 /* Multiple I/O Mode */
45#define SPI_CTL_MIO_DIS 0x00000000 /* MIOM: Disable */
46#define SPI_CTL_MIO_DUAL 0x00100000 /* MIOM: Enable DIOM (Dual I/O Mode) */
47#define SPI_CTL_MIO_QUAD 0x00200000 /* MIOM: Enable QUAD (Quad SPI Mode) */
48#define SPI_CTL_SOSI 0x00400000 /* Start on MOSI */
49/* SPI_RX_CONTROL */
50#define SPI_RXCTL_REN 0x00000001 /* Receive Channel Enable */
51#define SPI_RXCTL_RTI 0x00000004 /* Receive Transfer Initiate */
52#define SPI_RXCTL_RWCEN 0x00000008 /* Receive Word Counter Enable */
53#define SPI_RXCTL_RDR 0x00000070 /* Receive Data Request */
54#define SPI_RXCTL_RDR_DIS 0x00000000 /* RDR: Disabled */
55#define SPI_RXCTL_RDR_NE 0x00000010 /* RDR: RFIFO not empty */
56#define SPI_RXCTL_RDR_25 0x00000020 /* RDR: RFIFO 25% full */
57#define SPI_RXCTL_RDR_50 0x00000030 /* RDR: RFIFO 50% full */
58#define SPI_RXCTL_RDR_75 0x00000040 /* RDR: RFIFO 75% full */
59#define SPI_RXCTL_RDR_FULL 0x00000050 /* RDR: RFIFO full */
60#define SPI_RXCTL_RDO 0x00000100 /* Receive Data Over-Run */
61#define SPI_RXCTL_RRWM 0x00003000 /* FIFO Regular Water-Mark */
62#define SPI_RXCTL_RWM_0 0x00000000 /* RRWM: RFIFO Empty */
63#define SPI_RXCTL_RWM_25 0x00001000 /* RRWM: RFIFO 25% full */
64#define SPI_RXCTL_RWM_50 0x00002000 /* RRWM: RFIFO 50% full */
65#define SPI_RXCTL_RWM_75 0x00003000 /* RRWM: RFIFO 75% full */
66#define SPI_RXCTL_RUWM 0x00070000 /* FIFO Urgent Water-Mark */
67#define SPI_RXCTL_UWM_DIS 0x00000000 /* RUWM: Disabled */
68#define SPI_RXCTL_UWM_25 0x00010000 /* RUWM: RFIFO 25% full */
69#define SPI_RXCTL_UWM_50 0x00020000 /* RUWM: RFIFO 50% full */
70#define SPI_RXCTL_UWM_75 0x00030000 /* RUWM: RFIFO 75% full */
71#define SPI_RXCTL_UWM_FULL 0x00040000 /* RUWM: RFIFO full */
72/* SPI_TX_CONTROL */
73#define SPI_TXCTL_TEN 0x00000001 /* Transmit Channel Enable */
74#define SPI_TXCTL_TTI 0x00000004 /* Transmit Transfer Initiate */
75#define SPI_TXCTL_TWCEN 0x00000008 /* Transmit Word Counter Enable */
76#define SPI_TXCTL_TDR 0x00000070 /* Transmit Data Request */
77#define SPI_TXCTL_TDR_DIS 0x00000000 /* TDR: Disabled */
78#define SPI_TXCTL_TDR_NF 0x00000010 /* TDR: TFIFO not full */
79#define SPI_TXCTL_TDR_25 0x00000020 /* TDR: TFIFO 25% empty */
80#define SPI_TXCTL_TDR_50 0x00000030 /* TDR: TFIFO 50% empty */
81#define SPI_TXCTL_TDR_75 0x00000040 /* TDR: TFIFO 75% empty */
82#define SPI_TXCTL_TDR_EMPTY 0x00000050 /* TDR: TFIFO empty */
83#define SPI_TXCTL_TDU 0x00000100 /* Transmit Data Under-Run */
84#define SPI_TXCTL_TRWM 0x00003000 /* FIFO Regular Water-Mark */
85#define SPI_TXCTL_RWM_FULL 0x00000000 /* TRWM: TFIFO full */
86#define SPI_TXCTL_RWM_25 0x00001000 /* TRWM: TFIFO 25% empty */
87#define SPI_TXCTL_RWM_50 0x00002000 /* TRWM: TFIFO 50% empty */
88#define SPI_TXCTL_RWM_75 0x00003000 /* TRWM: TFIFO 75% empty */
89#define SPI_TXCTL_TUWM 0x00070000 /* FIFO Urgent Water-Mark */
90#define SPI_TXCTL_UWM_DIS 0x00000000 /* TUWM: Disabled */
91#define SPI_TXCTL_UWM_25 0x00010000 /* TUWM: TFIFO 25% empty */
92#define SPI_TXCTL_UWM_50 0x00020000 /* TUWM: TFIFO 50% empty */
93#define SPI_TXCTL_UWM_75 0x00030000 /* TUWM: TFIFO 75% empty */
94#define SPI_TXCTL_UWM_EMPTY 0x00040000 /* TUWM: TFIFO empty */
95/* SPI_CLOCK */
96#define SPI_CLK_BAUD 0x0000FFFF /* Baud Rate */
97/* SPI_DELAY */
98#define SPI_DLY_STOP 0x000000FF /* Transfer delay time in multiples of SCK period */
99#define SPI_DLY_LEADX 0x00000100 /* Extended (1 SCK) LEAD Control */
100#define SPI_DLY_LAGX 0x00000200 /* Extended (1 SCK) LAG control */
101/* SPI_SSEL */
102#define SPI_SLVSEL_SSE1 0x00000002 /* SPISSEL1 Enable */
103#define SPI_SLVSEL_SSE2 0x00000004 /* SPISSEL2 Enable */
104#define SPI_SLVSEL_SSE3 0x00000008 /* SPISSEL3 Enable */
105#define SPI_SLVSEL_SSE4 0x00000010 /* SPISSEL4 Enable */
106#define SPI_SLVSEL_SSE5 0x00000020 /* SPISSEL5 Enable */
107#define SPI_SLVSEL_SSE6 0x00000040 /* SPISSEL6 Enable */
108#define SPI_SLVSEL_SSE7 0x00000080 /* SPISSEL7 Enable */
109#define SPI_SLVSEL_SSEL1 0x00000200 /* SPISSEL1 Value */
110#define SPI_SLVSEL_SSEL2 0x00000400 /* SPISSEL2 Value */
111#define SPI_SLVSEL_SSEL3 0x00000800 /* SPISSEL3 Value */
112#define SPI_SLVSEL_SSEL4 0x00001000 /* SPISSEL4 Value */
113#define SPI_SLVSEL_SSEL5 0x00002000 /* SPISSEL5 Value */
114#define SPI_SLVSEL_SSEL6 0x00004000 /* SPISSEL6 Value */
115#define SPI_SLVSEL_SSEL7 0x00008000 /* SPISSEL7 Value */
116/* SPI_RWC */
117#define SPI_RWC_VALUE 0x0000FFFF /* Received Word-Count */
118/* SPI_RWCR */
119#define SPI_RWCR_VALUE 0x0000FFFF /* Received Word-Count Reload */
120/* SPI_TWC */
121#define SPI_TWC_VALUE 0x0000FFFF /* Transmitted Word-Count */
122/* SPI_TWCR */
123#define SPI_TWCR_VALUE 0x0000FFFF /* Transmitted Word-Count Reload */
124/* SPI_IMASK */
125#define SPI_IMSK_RUWM 0x00000002 /* Receive Urgent Water-Mark Interrupt Mask */
126#define SPI_IMSK_TUWM 0x00000004 /* Transmit Urgent Water-Mark Interrupt Mask */
127#define SPI_IMSK_ROM 0x00000010 /* Receive Over-Run Error Interrupt Mask */
128#define SPI_IMSK_TUM 0x00000020 /* Transmit Under-Run Error Interrupt Mask */
129#define SPI_IMSK_TCM 0x00000040 /* Transmit Collision Error Interrupt Mask */
130#define SPI_IMSK_MFM 0x00000080 /* Mode Fault Error Interrupt Mask */
131#define SPI_IMSK_RSM 0x00000100 /* Receive Start Interrupt Mask */
132#define SPI_IMSK_TSM 0x00000200 /* Transmit Start Interrupt Mask */
133#define SPI_IMSK_RFM 0x00000400 /* Receive Finish Interrupt Mask */
134#define SPI_IMSK_TFM 0x00000800 /* Transmit Finish Interrupt Mask */
135/* SPI_IMASKCL */
136#define SPI_IMSK_CLR_RUW 0x00000002 /* Receive Urgent Water-Mark Interrupt Mask */
137#define SPI_IMSK_CLR_TUWM 0x00000004 /* Transmit Urgent Water-Mark Interrupt Mask */
138#define SPI_IMSK_CLR_ROM 0x00000010 /* Receive Over-Run Error Interrupt Mask */
139#define SPI_IMSK_CLR_TUM 0x00000020 /* Transmit Under-Run Error Interrupt Mask */
140#define SPI_IMSK_CLR_TCM 0x00000040 /* Transmit Collision Error Interrupt Mask */
141#define SPI_IMSK_CLR_MFM 0x00000080 /* Mode Fault Error Interrupt Mask */
142#define SPI_IMSK_CLR_RSM 0x00000100 /* Receive Start Interrupt Mask */
143#define SPI_IMSK_CLR_TSM 0x00000200 /* Transmit Start Interrupt Mask */
144#define SPI_IMSK_CLR_RFM 0x00000400 /* Receive Finish Interrupt Mask */
145#define SPI_IMSK_CLR_TFM 0x00000800 /* Transmit Finish Interrupt Mask */
146/* SPI_IMASKST */
147#define SPI_IMSK_SET_RUWM 0x00000002 /* Receive Urgent Water-Mark Interrupt Mask */
148#define SPI_IMSK_SET_TUWM 0x00000004 /* Transmit Urgent Water-Mark Interrupt Mask */
149#define SPI_IMSK_SET_ROM 0x00000010 /* Receive Over-Run Error Interrupt Mask */
150#define SPI_IMSK_SET_TUM 0x00000020 /* Transmit Under-Run Error Interrupt Mask */
151#define SPI_IMSK_SET_TCM 0x00000040 /* Transmit Collision Error Interrupt Mask */
152#define SPI_IMSK_SET_MFM 0x00000080 /* Mode Fault Error Interrupt Mask */
153#define SPI_IMSK_SET_RSM 0x00000100 /* Receive Start Interrupt Mask */
154#define SPI_IMSK_SET_TSM 0x00000200 /* Transmit Start Interrupt Mask */
155#define SPI_IMSK_SET_RFM 0x00000400 /* Receive Finish Interrupt Mask */
156#define SPI_IMSK_SET_TFM 0x00000800 /* Transmit Finish Interrupt Mask */
157/* SPI_STATUS */
158#define SPI_STAT_SPIF 0x00000001 /* SPI Finished */
159#define SPI_STAT_RUWM 0x00000002 /* Receive Urgent Water-Mark Breached */
160#define SPI_STAT_TUWM 0x00000004 /* Transmit Urgent Water-Mark Breached */
161#define SPI_STAT_ROE 0x00000010 /* Receive Over-Run Error Indication */
162#define SPI_STAT_TUE 0x00000020 /* Transmit Under-Run Error Indication */
163#define SPI_STAT_TCE 0x00000040 /* Transmit Collision Error Indication */
164#define SPI_STAT_MODF 0x00000080 /* Mode Fault Error Indication */
165#define SPI_STAT_RS 0x00000100 /* Receive Start Indication */
166#define SPI_STAT_TS 0x00000200 /* Transmit Start Indication */
167#define SPI_STAT_RF 0x00000400 /* Receive Finish Indication */
168#define SPI_STAT_TF 0x00000800 /* Transmit Finish Indication */
169#define SPI_STAT_RFS 0x00007000 /* SPI_RFIFO status */
170#define SPI_STAT_RFIFO_EMPTY 0x00000000 /* RFS: RFIFO Empty */
171#define SPI_STAT_RFIFO_25 0x00001000 /* RFS: RFIFO 25% Full */
172#define SPI_STAT_RFIFO_50 0x00002000 /* RFS: RFIFO 50% Full */
173#define SPI_STAT_RFIFO_75 0x00003000 /* RFS: RFIFO 75% Full */
174#define SPI_STAT_RFIFO_FULL 0x00004000 /* RFS: RFIFO Full */
175#define SPI_STAT_TFS 0x00070000 /* SPI_TFIFO status */
176#define SPI_STAT_TFIFO_FULL 0x00000000 /* TFS: TFIFO full */
177#define SPI_STAT_TFIFO_25 0x00010000 /* TFS: TFIFO 25% empty */
178#define SPI_STAT_TFIFO_50 0x00020000 /* TFS: TFIFO 50% empty */
179#define SPI_STAT_TFIFO_75 0x00030000 /* TFS: TFIFO 75% empty */
180#define SPI_STAT_TFIFO_EMPTY 0x00040000 /* TFS: TFIFO empty */
181#define SPI_STAT_FCS 0x00100000 /* Flow-Control Stall Indication */
182#define SPI_STAT_RFE 0x00400000 /* SPI_RFIFO Empty */
183#define SPI_STAT_TFF 0x00800000 /* SPI_TFIFO Full */
184/* SPI_ILAT */
185#define SPI_ILAT_RUWMI 0x00000002 /* Receive Urgent Water Mark Interrupt */
186#define SPI_ILAT_TUWMI 0x00000004 /* Transmit Urgent Water Mark Interrupt */
187#define SPI_ILAT_ROI 0x00000010 /* Receive Over-Run Error Indication */
188#define SPI_ILAT_TUI 0x00000020 /* Transmit Under-Run Error Indication */
189#define SPI_ILAT_TCI 0x00000040 /* Transmit Collision Error Indication */
190#define SPI_ILAT_MFI 0x00000080 /* Mode Fault Error Indication */
191#define SPI_ILAT_RSI 0x00000100 /* Receive Start Indication */
192#define SPI_ILAT_TSI 0x00000200 /* Transmit Start Indication */
193#define SPI_ILAT_RFI 0x00000400 /* Receive Finish Indication */
194#define SPI_ILAT_TFI 0x00000800 /* Transmit Finish Indication */
195/* SPI_ILATCL */
196#define SPI_ILAT_CLR_RUWMI 0x00000002 /* Receive Urgent Water Mark Interrupt */
197#define SPI_ILAT_CLR_TUWMI 0x00000004 /* Transmit Urgent Water Mark Interrupt */
198#define SPI_ILAT_CLR_ROI 0x00000010 /* Receive Over-Run Error Indication */
199#define SPI_ILAT_CLR_TUI 0x00000020 /* Transmit Under-Run Error Indication */
200#define SPI_ILAT_CLR_TCI 0x00000040 /* Transmit Collision Error Indication */
201#define SPI_ILAT_CLR_MFI 0x00000080 /* Mode Fault Error Indication */
202#define SPI_ILAT_CLR_RSI 0x00000100 /* Receive Start Indication */
203#define SPI_ILAT_CLR_TSI 0x00000200 /* Transmit Start Indication */
204#define SPI_ILAT_CLR_RFI 0x00000400 /* Receive Finish Indication */
205#define SPI_ILAT_CLR_TFI 0x00000800 /* Transmit Finish Indication */
206
207/*
208 * adi spi3 registers layout
209 */
210struct adi_spi_regs {
211 u32 revid;
212 u32 control;
213 u32 rx_control;
214 u32 tx_control;
215 u32 clock;
216 u32 delay;
217 u32 ssel;
218 u32 rwc;
219 u32 rwcr;
220 u32 twc;
221 u32 twcr;
222 u32 reserved0;
223 u32 emask;
224 u32 emaskcl;
225 u32 emaskst;
226 u32 reserved1;
227 u32 status;
228 u32 elat;
229 u32 elatcl;
230 u32 reserved2;
231 u32 rfifo;
232 u32 reserved3;
233 u32 tfifo;
234};
235
236#define MAX_CTRL_CS 8 /* cs in spi controller */
237
238/* device.platform_data for SSP controller devices */
239struct adi_spi3_master {
240 u16 num_chipselect;
241 u16 pin_req[7];
242};
243
244/* spi_board_info.controller_data for SPI slave devices,
245 * copied to spi_device.platform_data ... mostly for dma tuning
246 */
247struct adi_spi3_chip {
248 u32 control;
249 u16 cs_chg_udelay; /* Some devices require 16-bit delays */
250 u32 tx_dummy_val; /* tx value for rx only transfer */
251 bool enable_dma;
252};
253
254#endif /* _ADI_SPI3_H_ */
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 084354b0e814..5ffaa3443712 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -179,9 +179,6 @@ struct sysfs_ops {
179 179
180#ifdef CONFIG_SYSFS 180#ifdef CONFIG_SYSFS
181 181
182int sysfs_schedule_callback(struct kobject *kobj, void (*func)(void *),
183 void *data, struct module *owner);
184
185int __must_check sysfs_create_dir_ns(struct kobject *kobj, const void *ns); 182int __must_check sysfs_create_dir_ns(struct kobject *kobj, const void *ns);
186void sysfs_remove_dir(struct kobject *kobj); 183void sysfs_remove_dir(struct kobject *kobj);
187int __must_check sysfs_rename_dir_ns(struct kobject *kobj, const char *new_name, 184int __must_check sysfs_rename_dir_ns(struct kobject *kobj, const char *new_name,
@@ -255,12 +252,6 @@ static inline void sysfs_enable_ns(struct kernfs_node *kn)
255 252
256#else /* CONFIG_SYSFS */ 253#else /* CONFIG_SYSFS */
257 254
258static inline int sysfs_schedule_callback(struct kobject *kobj,
259 void (*func)(void *), void *data, struct module *owner)
260{
261 return -ENOSYS;
262}
263
264static inline int sysfs_create_dir_ns(struct kobject *kobj, const void *ns) 255static inline int sysfs_create_dir_ns(struct kobject *kobj, const void *ns)
265{ 256{
266 return 0; 257 return 0;
diff --git a/include/linux/wait.h b/include/linux/wait.h
index e7d9d9ed14f5..bd68819f0815 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -191,11 +191,23 @@ wait_queue_head_t *bit_waitqueue(void *, int);
191 (!__builtin_constant_p(state) || \ 191 (!__builtin_constant_p(state) || \
192 state == TASK_INTERRUPTIBLE || state == TASK_KILLABLE) \ 192 state == TASK_INTERRUPTIBLE || state == TASK_KILLABLE) \
193 193
194/*
195 * The below macro ___wait_event() has an explicit shadow of the __ret
196 * variable when used from the wait_event_*() macros.
197 *
198 * This is so that both can use the ___wait_cond_timeout() construct
199 * to wrap the condition.
200 *
201 * The type inconsistency of the wait_event_*() __ret variable is also
202 * on purpose; we use long where we can return timeout values and int
203 * otherwise.
204 */
205
194#define ___wait_event(wq, condition, state, exclusive, ret, cmd) \ 206#define ___wait_event(wq, condition, state, exclusive, ret, cmd) \
195({ \ 207({ \
196 __label__ __out; \ 208 __label__ __out; \
197 wait_queue_t __wait; \ 209 wait_queue_t __wait; \
198 long __ret = ret; \ 210 long __ret = ret; /* explicit shadow */ \
199 \ 211 \
200 INIT_LIST_HEAD(&__wait.task_list); \ 212 INIT_LIST_HEAD(&__wait.task_list); \
201 if (exclusive) \ 213 if (exclusive) \