diff options
Diffstat (limited to 'include/linux')
31 files changed, 549 insertions, 68 deletions
diff --git a/include/linux/aer.h b/include/linux/aer.h index ec10e1b24c1c..737f90ab4b62 100644 --- a/include/linux/aer.h +++ b/include/linux/aer.h | |||
@@ -49,10 +49,11 @@ static inline int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev) | |||
49 | } | 49 | } |
50 | #endif | 50 | #endif |
51 | 51 | ||
52 | extern void cper_print_aer(const char *prefix, struct pci_dev *dev, | 52 | extern void cper_print_aer(struct pci_dev *dev, |
53 | int cper_severity, struct aer_capability_regs *aer); | 53 | int cper_severity, struct aer_capability_regs *aer); |
54 | extern int cper_severity_to_aer(int cper_severity); | 54 | extern int cper_severity_to_aer(int cper_severity); |
55 | extern void aer_recover_queue(int domain, unsigned int bus, unsigned int devfn, | 55 | extern void aer_recover_queue(int domain, unsigned int bus, unsigned int devfn, |
56 | int severity); | 56 | int severity, |
57 | struct aer_capability_regs *aer_regs); | ||
57 | #endif //_AER_H_ | 58 | #endif //_AER_H_ |
58 | 59 | ||
diff --git a/include/linux/arm-cci.h b/include/linux/arm-cci.h new file mode 100644 index 000000000000..79d6edf446d5 --- /dev/null +++ b/include/linux/arm-cci.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * CCI cache coherent interconnect support | ||
3 | * | ||
4 | * Copyright (C) 2013 ARM Ltd. | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #ifndef __LINUX_ARM_CCI_H | ||
22 | #define __LINUX_ARM_CCI_H | ||
23 | |||
24 | #include <linux/errno.h> | ||
25 | #include <linux/types.h> | ||
26 | |||
27 | struct device_node; | ||
28 | |||
29 | #ifdef CONFIG_ARM_CCI | ||
30 | extern bool cci_probed(void); | ||
31 | extern int cci_ace_get_port(struct device_node *dn); | ||
32 | extern int cci_disable_port_by_cpu(u64 mpidr); | ||
33 | extern int __cci_control_port_by_device(struct device_node *dn, bool enable); | ||
34 | extern int __cci_control_port_by_index(u32 port, bool enable); | ||
35 | #else | ||
36 | static inline bool cci_probed(void) { return false; } | ||
37 | static inline int cci_ace_get_port(struct device_node *dn) | ||
38 | { | ||
39 | return -ENODEV; | ||
40 | } | ||
41 | static inline int cci_disable_port_by_cpu(u64 mpidr) { return -ENODEV; } | ||
42 | static inline int __cci_control_port_by_device(struct device_node *dn, | ||
43 | bool enable) | ||
44 | { | ||
45 | return -ENODEV; | ||
46 | } | ||
47 | static inline int __cci_control_port_by_index(u32 port, bool enable) | ||
48 | { | ||
49 | return -ENODEV; | ||
50 | } | ||
51 | #endif | ||
52 | #define cci_disable_port_by_device(dev) \ | ||
53 | __cci_control_port_by_device(dev, false) | ||
54 | #define cci_enable_port_by_device(dev) \ | ||
55 | __cci_control_port_by_device(dev, true) | ||
56 | #define cci_disable_port_by_index(dev) \ | ||
57 | __cci_control_port_by_index(dev, false) | ||
58 | #define cci_enable_port_by_index(dev) \ | ||
59 | __cci_control_port_by_index(dev, true) | ||
60 | |||
61 | #endif | ||
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 5047355b9a0f..8bda1294c035 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -707,7 +707,7 @@ struct cgroup *cgroup_rightmost_descendant(struct cgroup *pos); | |||
707 | * | 707 | * |
708 | * If a subsystem synchronizes against the parent in its ->css_online() and | 708 | * If a subsystem synchronizes against the parent in its ->css_online() and |
709 | * before starting iterating, and synchronizes against @pos on each | 709 | * before starting iterating, and synchronizes against @pos on each |
710 | * iteration, any descendant cgroup which finished ->css_offline() is | 710 | * iteration, any descendant cgroup which finished ->css_online() is |
711 | * guaranteed to be visible in the future iterations. | 711 | * guaranteed to be visible in the future iterations. |
712 | * | 712 | * |
713 | * In other words, the following guarantees that a descendant can't escape | 713 | * In other words, the following guarantees that a descendant can't escape |
diff --git a/include/linux/clk/mvebu.h b/include/linux/clk/mvebu.h deleted file mode 100644 index 8c4ae713b063..000000000000 --- a/include/linux/clk/mvebu.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify | ||
3 | * it under the terms of the GNU General Public License as published by | ||
4 | * the Free Software Foundation; either version 2 of the License, or | ||
5 | * (at your option) any later version. | ||
6 | * | ||
7 | * This program is distributed in the hope that it will be useful, | ||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | * GNU General Public License for more details. | ||
11 | * | ||
12 | * You should have received a copy of the GNU General Public License | ||
13 | * along with this program; if not, write to the Free Software | ||
14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
15 | */ | ||
16 | |||
17 | #ifndef __CLK_MVEBU_H_ | ||
18 | #define __CLK_MVEBU_H_ | ||
19 | |||
20 | void __init mvebu_clocks_init(void); | ||
21 | |||
22 | #endif | ||
diff --git a/include/linux/clk/zynq.h b/include/linux/clk/zynq.h index 56be7cd9aa8b..e062d317ccce 100644 --- a/include/linux/clk/zynq.h +++ b/include/linux/clk/zynq.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2013 Xilinx Inc. | ||
2 | * Copyright (C) 2012 National Instruments | 3 | * Copyright (C) 2012 National Instruments |
3 | * | 4 | * |
4 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
@@ -19,6 +20,11 @@ | |||
19 | #ifndef __LINUX_CLK_ZYNQ_H_ | 20 | #ifndef __LINUX_CLK_ZYNQ_H_ |
20 | #define __LINUX_CLK_ZYNQ_H_ | 21 | #define __LINUX_CLK_ZYNQ_H_ |
21 | 22 | ||
22 | void __init xilinx_zynq_clocks_init(void __iomem *slcr); | 23 | #include <linux/spinlock.h> |
23 | 24 | ||
25 | void zynq_clock_init(void __iomem *slcr); | ||
26 | |||
27 | struct clk *clk_register_zynq_pll(const char *name, const char *parent, | ||
28 | void __iomem *pll_ctrl, void __iomem *pll_status, u8 lock_index, | ||
29 | spinlock_t *lock); | ||
24 | #endif | 30 | #endif |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index c6f6e0839b61..9f3c7e81270a 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -175,6 +175,8 @@ extern struct bus_type cpu_subsys; | |||
175 | 175 | ||
176 | extern void get_online_cpus(void); | 176 | extern void get_online_cpus(void); |
177 | extern void put_online_cpus(void); | 177 | extern void put_online_cpus(void); |
178 | extern void cpu_hotplug_disable(void); | ||
179 | extern void cpu_hotplug_enable(void); | ||
178 | #define hotcpu_notifier(fn, pri) cpu_notifier(fn, pri) | 180 | #define hotcpu_notifier(fn, pri) cpu_notifier(fn, pri) |
179 | #define register_hotcpu_notifier(nb) register_cpu_notifier(nb) | 181 | #define register_hotcpu_notifier(nb) register_cpu_notifier(nb) |
180 | #define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb) | 182 | #define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb) |
@@ -198,6 +200,8 @@ static inline void cpu_hotplug_driver_unlock(void) | |||
198 | 200 | ||
199 | #define get_online_cpus() do { } while (0) | 201 | #define get_online_cpus() do { } while (0) |
200 | #define put_online_cpus() do { } while (0) | 202 | #define put_online_cpus() do { } while (0) |
203 | #define cpu_hotplug_disable() do { } while (0) | ||
204 | #define cpu_hotplug_enable() do { } while (0) | ||
201 | #define hotcpu_notifier(fn, pri) do { (void)(fn); } while (0) | 205 | #define hotcpu_notifier(fn, pri) do { (void)(fn); } while (0) |
202 | /* These aren't inline functions due to a GCC bug. */ | 206 | /* These aren't inline functions due to a GCC bug. */ |
203 | #define register_hotcpu_notifier(nb) ({ (void)(nb); 0; }) | 207 | #define register_hotcpu_notifier(nb) ({ (void)(nb); 0; }) |
diff --git a/include/linux/filter.h b/include/linux/filter.h index c050dcc322a4..f65f5a69db8f 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
@@ -46,6 +46,7 @@ extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); | |||
46 | extern int sk_detach_filter(struct sock *sk); | 46 | extern int sk_detach_filter(struct sock *sk); |
47 | extern int sk_chk_filter(struct sock_filter *filter, unsigned int flen); | 47 | extern int sk_chk_filter(struct sock_filter *filter, unsigned int flen); |
48 | extern int sk_get_filter(struct sock *sk, struct sock_filter __user *filter, unsigned len); | 48 | extern int sk_get_filter(struct sock *sk, struct sock_filter __user *filter, unsigned len); |
49 | extern void sk_decode_filter(struct sock_filter *filt, struct sock_filter *to); | ||
49 | 50 | ||
50 | #ifdef CONFIG_BPF_JIT | 51 | #ifdef CONFIG_BPF_JIT |
51 | #include <stdarg.h> | 52 | #include <stdarg.h> |
diff --git a/include/linux/if_team.h b/include/linux/if_team.h index 4474557904f6..16fae6436d0e 100644 --- a/include/linux/if_team.h +++ b/include/linux/if_team.h | |||
@@ -249,12 +249,12 @@ team_get_first_port_txable_rcu(struct team *team, struct team_port *port) | |||
249 | return port; | 249 | return port; |
250 | cur = port; | 250 | cur = port; |
251 | list_for_each_entry_continue_rcu(cur, &team->port_list, list) | 251 | list_for_each_entry_continue_rcu(cur, &team->port_list, list) |
252 | if (team_port_txable(port)) | 252 | if (team_port_txable(cur)) |
253 | return cur; | 253 | return cur; |
254 | list_for_each_entry_rcu(cur, &team->port_list, list) { | 254 | list_for_each_entry_rcu(cur, &team->port_list, list) { |
255 | if (cur == port) | 255 | if (cur == port) |
256 | break; | 256 | break; |
257 | if (team_port_txable(port)) | 257 | if (team_port_txable(cur)) |
258 | return cur; | 258 | return cur; |
259 | } | 259 | } |
260 | return NULL; | 260 | return NULL; |
diff --git a/include/linux/list.h b/include/linux/list.h index 6a1f8df9144b..b83e5657365a 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -362,6 +362,17 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
362 | list_entry((ptr)->next, type, member) | 362 | list_entry((ptr)->next, type, member) |
363 | 363 | ||
364 | /** | 364 | /** |
365 | * list_first_entry_or_null - get the first element from a list | ||
366 | * @ptr: the list head to take the element from. | ||
367 | * @type: the type of the struct this is embedded in. | ||
368 | * @member: the name of the list_struct within the struct. | ||
369 | * | ||
370 | * Note that if the list is empty, it returns NULL. | ||
371 | */ | ||
372 | #define list_first_entry_or_null(ptr, type, member) \ | ||
373 | (!list_empty(ptr) ? list_first_entry(ptr, type, member) : NULL) | ||
374 | |||
375 | /** | ||
365 | * list_for_each - iterate over a list | 376 | * list_for_each - iterate over a list |
366 | * @pos: the &struct list_head to use as a loop cursor. | 377 | * @pos: the &struct list_head to use as a loop cursor. |
367 | * @head: the head for your list. | 378 | * @head: the head for your list. |
diff --git a/include/linux/math64.h b/include/linux/math64.h index b8ba85544721..2913b86eb12a 100644 --- a/include/linux/math64.h +++ b/include/linux/math64.h | |||
@@ -6,7 +6,8 @@ | |||
6 | 6 | ||
7 | #if BITS_PER_LONG == 64 | 7 | #if BITS_PER_LONG == 64 |
8 | 8 | ||
9 | #define div64_long(x,y) div64_s64((x),(y)) | 9 | #define div64_long(x, y) div64_s64((x), (y)) |
10 | #define div64_ul(x, y) div64_u64((x), (y)) | ||
10 | 11 | ||
11 | /** | 12 | /** |
12 | * div_u64_rem - unsigned 64bit divide with 32bit divisor with remainder | 13 | * div_u64_rem - unsigned 64bit divide with 32bit divisor with remainder |
@@ -47,7 +48,8 @@ static inline s64 div64_s64(s64 dividend, s64 divisor) | |||
47 | 48 | ||
48 | #elif BITS_PER_LONG == 32 | 49 | #elif BITS_PER_LONG == 32 |
49 | 50 | ||
50 | #define div64_long(x,y) div_s64((x),(y)) | 51 | #define div64_long(x, y) div_s64((x), (y)) |
52 | #define div64_ul(x, y) div_u64((x), (y)) | ||
51 | 53 | ||
52 | #ifndef div_u64_rem | 54 | #ifndef div_u64_rem |
53 | static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) | 55 | static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) |
diff --git a/include/linux/mfd/davinci_voicecodec.h b/include/linux/mfd/davinci_voicecodec.h index 0ab61320ffa8..7dd6524d2aac 100644 --- a/include/linux/mfd/davinci_voicecodec.h +++ b/include/linux/mfd/davinci_voicecodec.h | |||
@@ -26,8 +26,7 @@ | |||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/mfd/core.h> | 28 | #include <linux/mfd/core.h> |
29 | 29 | #include <linux/platform_data/edma.h> | |
30 | #include <mach/edma.h> | ||
31 | 30 | ||
32 | /* | 31 | /* |
33 | * Register values. | 32 | * Register values. |
diff --git a/include/linux/mfd/syscon/clps711x.h b/include/linux/mfd/syscon/clps711x.h new file mode 100644 index 000000000000..26355abae515 --- /dev/null +++ b/include/linux/mfd/syscon/clps711x.h | |||
@@ -0,0 +1,94 @@ | |||
1 | /* | ||
2 | * CLPS711X system register bits definitions | ||
3 | * | ||
4 | * Copyright (C) 2013 Alexander Shiyan <shc_work@mail.ru> | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef _LINUX_MFD_SYSCON_CLPS711X_H_ | ||
13 | #define _LINUX_MFD_SYSCON_CLPS711X_H_ | ||
14 | |||
15 | #define SYSCON_OFFSET (0x00) | ||
16 | #define SYSFLG_OFFSET (0x40) | ||
17 | |||
18 | #define SYSCON1_KBDSCAN(x) ((x) & 15) | ||
19 | #define SYSCON1_KBDSCAN_MASK (15) | ||
20 | #define SYSCON1_TC1M (1 << 4) | ||
21 | #define SYSCON1_TC1S (1 << 5) | ||
22 | #define SYSCON1_TC2M (1 << 6) | ||
23 | #define SYSCON1_TC2S (1 << 7) | ||
24 | #define SYSCON1_BZTOG (1 << 9) | ||
25 | #define SYSCON1_BZMOD (1 << 10) | ||
26 | #define SYSCON1_DBGEN (1 << 11) | ||
27 | #define SYSCON1_LCDEN (1 << 12) | ||
28 | #define SYSCON1_CDENTX (1 << 13) | ||
29 | #define SYSCON1_CDENRX (1 << 14) | ||
30 | #define SYSCON1_SIREN (1 << 15) | ||
31 | #define SYSCON1_ADCKSEL(x) (((x) & 3) << 16) | ||
32 | #define SYSCON1_ADCKSEL_MASK (3 << 16) | ||
33 | #define SYSCON1_EXCKEN (1 << 18) | ||
34 | #define SYSCON1_WAKEDIS (1 << 19) | ||
35 | #define SYSCON1_IRTXM (1 << 20) | ||
36 | |||
37 | #define SYSCON2_SERSEL (1 << 0) | ||
38 | #define SYSCON2_KBD6 (1 << 1) | ||
39 | #define SYSCON2_DRAMZ (1 << 2) | ||
40 | #define SYSCON2_KBWEN (1 << 3) | ||
41 | #define SYSCON2_SS2TXEN (1 << 4) | ||
42 | #define SYSCON2_PCCARD1 (1 << 5) | ||
43 | #define SYSCON2_PCCARD2 (1 << 6) | ||
44 | #define SYSCON2_SS2RXEN (1 << 7) | ||
45 | #define SYSCON2_SS2MAEN (1 << 9) | ||
46 | #define SYSCON2_OSTB (1 << 12) | ||
47 | #define SYSCON2_CLKENSL (1 << 13) | ||
48 | #define SYSCON2_BUZFREQ (1 << 14) | ||
49 | |||
50 | #define SYSCON3_ADCCON (1 << 0) | ||
51 | #define SYSCON3_CLKCTL0 (1 << 1) | ||
52 | #define SYSCON3_CLKCTL1 (1 << 2) | ||
53 | #define SYSCON3_DAISEL (1 << 3) | ||
54 | #define SYSCON3_ADCCKNSEN (1 << 4) | ||
55 | #define SYSCON3_VERSN(x) (((x) >> 5) & 7) | ||
56 | #define SYSCON3_VERSN_MASK (7 << 5) | ||
57 | #define SYSCON3_FASTWAKE (1 << 8) | ||
58 | #define SYSCON3_DAIEN (1 << 9) | ||
59 | #define SYSCON3_128FS SYSCON3_DAIEN | ||
60 | #define SYSCON3_ENPD67 (1 << 10) | ||
61 | |||
62 | #define SYSCON_UARTEN (1 << 8) | ||
63 | |||
64 | #define SYSFLG1_MCDR (1 << 0) | ||
65 | #define SYSFLG1_DCDET (1 << 1) | ||
66 | #define SYSFLG1_WUDR (1 << 2) | ||
67 | #define SYSFLG1_WUON (1 << 3) | ||
68 | #define SYSFLG1_CTS (1 << 8) | ||
69 | #define SYSFLG1_DSR (1 << 9) | ||
70 | #define SYSFLG1_DCD (1 << 10) | ||
71 | #define SYSFLG1_NBFLG (1 << 12) | ||
72 | #define SYSFLG1_RSTFLG (1 << 13) | ||
73 | #define SYSFLG1_PFFLG (1 << 14) | ||
74 | #define SYSFLG1_CLDFLG (1 << 15) | ||
75 | #define SYSFLG1_CRXFE (1 << 24) | ||
76 | #define SYSFLG1_CTXFF (1 << 25) | ||
77 | #define SYSFLG1_SSIBUSY (1 << 26) | ||
78 | #define SYSFLG1_ID (1 << 29) | ||
79 | #define SYSFLG1_VERID(x) (((x) >> 30) & 3) | ||
80 | #define SYSFLG1_VERID_MASK (3 << 30) | ||
81 | |||
82 | #define SYSFLG2_SSRXOF (1 << 0) | ||
83 | #define SYSFLG2_RESVAL (1 << 1) | ||
84 | #define SYSFLG2_RESFRM (1 << 2) | ||
85 | #define SYSFLG2_SS2RXFE (1 << 3) | ||
86 | #define SYSFLG2_SS2TXFF (1 << 4) | ||
87 | #define SYSFLG2_SS2TXUF (1 << 5) | ||
88 | #define SYSFLG2_CKMODE (1 << 6) | ||
89 | |||
90 | #define SYSFLG_UBUSY (1 << 11) | ||
91 | #define SYSFLG_URXFE (1 << 22) | ||
92 | #define SYSFLG_UTXFF (1 << 23) | ||
93 | |||
94 | #endif | ||
diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h index 98ffb54988b6..2d4df6ce043e 100644 --- a/include/linux/netfilter_ipv6.h +++ b/include/linux/netfilter_ipv6.h | |||
@@ -17,6 +17,22 @@ extern __sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, | |||
17 | 17 | ||
18 | extern int ipv6_netfilter_init(void); | 18 | extern int ipv6_netfilter_init(void); |
19 | extern void ipv6_netfilter_fini(void); | 19 | extern void ipv6_netfilter_fini(void); |
20 | |||
21 | /* | ||
22 | * Hook functions for ipv6 to allow xt_* modules to be built-in even | ||
23 | * if IPv6 is a module. | ||
24 | */ | ||
25 | struct nf_ipv6_ops { | ||
26 | int (*chk_addr)(struct net *net, const struct in6_addr *addr, | ||
27 | const struct net_device *dev, int strict); | ||
28 | }; | ||
29 | |||
30 | extern const struct nf_ipv6_ops __rcu *nf_ipv6_ops; | ||
31 | static inline const struct nf_ipv6_ops *nf_get_ipv6_ops(void) | ||
32 | { | ||
33 | return rcu_dereference(nf_ipv6_ops); | ||
34 | } | ||
35 | |||
20 | #else /* CONFIG_NETFILTER */ | 36 | #else /* CONFIG_NETFILTER */ |
21 | static inline int ipv6_netfilter_init(void) { return 0; } | 37 | static inline int ipv6_netfilter_init(void) { return 0; } |
22 | static inline void ipv6_netfilter_fini(void) { return; } | 38 | static inline void ipv6_netfilter_fini(void) { return; } |
diff --git a/include/linux/of_address.h b/include/linux/of_address.h index 0506eb53519b..4c2e6f26432c 100644 --- a/include/linux/of_address.h +++ b/include/linux/of_address.h | |||
@@ -4,6 +4,36 @@ | |||
4 | #include <linux/errno.h> | 4 | #include <linux/errno.h> |
5 | #include <linux/of.h> | 5 | #include <linux/of.h> |
6 | 6 | ||
7 | struct of_pci_range_parser { | ||
8 | struct device_node *node; | ||
9 | const __be32 *range; | ||
10 | const __be32 *end; | ||
11 | int np; | ||
12 | int pna; | ||
13 | }; | ||
14 | |||
15 | struct of_pci_range { | ||
16 | u32 pci_space; | ||
17 | u64 pci_addr; | ||
18 | u64 cpu_addr; | ||
19 | u64 size; | ||
20 | u32 flags; | ||
21 | }; | ||
22 | |||
23 | #define for_each_of_pci_range(parser, range) \ | ||
24 | for (; of_pci_range_parser_one(parser, range);) | ||
25 | |||
26 | static inline void of_pci_range_to_resource(struct of_pci_range *range, | ||
27 | struct device_node *np, | ||
28 | struct resource *res) | ||
29 | { | ||
30 | res->flags = range->flags; | ||
31 | res->start = range->cpu_addr; | ||
32 | res->end = range->cpu_addr + range->size - 1; | ||
33 | res->parent = res->child = res->sibling = NULL; | ||
34 | res->name = np->full_name; | ||
35 | } | ||
36 | |||
7 | #ifdef CONFIG_OF_ADDRESS | 37 | #ifdef CONFIG_OF_ADDRESS |
8 | extern u64 of_translate_address(struct device_node *np, const __be32 *addr); | 38 | extern u64 of_translate_address(struct device_node *np, const __be32 *addr); |
9 | extern bool of_can_translate_address(struct device_node *dev); | 39 | extern bool of_can_translate_address(struct device_node *dev); |
@@ -27,6 +57,11 @@ static inline unsigned long pci_address_to_pio(phys_addr_t addr) { return -1; } | |||
27 | #define pci_address_to_pio pci_address_to_pio | 57 | #define pci_address_to_pio pci_address_to_pio |
28 | #endif | 58 | #endif |
29 | 59 | ||
60 | extern int of_pci_range_parser_init(struct of_pci_range_parser *parser, | ||
61 | struct device_node *node); | ||
62 | extern struct of_pci_range *of_pci_range_parser_one( | ||
63 | struct of_pci_range_parser *parser, | ||
64 | struct of_pci_range *range); | ||
30 | #else /* CONFIG_OF_ADDRESS */ | 65 | #else /* CONFIG_OF_ADDRESS */ |
31 | #ifndef of_address_to_resource | 66 | #ifndef of_address_to_resource |
32 | static inline int of_address_to_resource(struct device_node *dev, int index, | 67 | static inline int of_address_to_resource(struct device_node *dev, int index, |
@@ -53,6 +88,19 @@ static inline const __be32 *of_get_address(struct device_node *dev, int index, | |||
53 | { | 88 | { |
54 | return NULL; | 89 | return NULL; |
55 | } | 90 | } |
91 | |||
92 | static inline int of_pci_range_parser_init(struct of_pci_range_parser *parser, | ||
93 | struct device_node *node) | ||
94 | { | ||
95 | return -1; | ||
96 | } | ||
97 | |||
98 | static inline struct of_pci_range *of_pci_range_parser_one( | ||
99 | struct of_pci_range_parser *parser, | ||
100 | struct of_pci_range *range) | ||
101 | { | ||
102 | return NULL; | ||
103 | } | ||
56 | #endif /* CONFIG_OF_ADDRESS */ | 104 | #endif /* CONFIG_OF_ADDRESS */ |
57 | 105 | ||
58 | 106 | ||
diff --git a/include/linux/of_pci.h b/include/linux/of_pci.h index bb115deb7612..7a04826018c0 100644 --- a/include/linux/of_pci.h +++ b/include/linux/of_pci.h | |||
@@ -10,5 +10,7 @@ int of_irq_map_pci(const struct pci_dev *pdev, struct of_irq *out_irq); | |||
10 | struct device_node; | 10 | struct device_node; |
11 | struct device_node *of_pci_find_child_device(struct device_node *parent, | 11 | struct device_node *of_pci_find_child_device(struct device_node *parent, |
12 | unsigned int devfn); | 12 | unsigned int devfn); |
13 | int of_pci_get_devfn(struct device_node *np); | ||
14 | int of_pci_parse_bus_range(struct device_node *node, struct resource *res); | ||
13 | 15 | ||
14 | #endif | 16 | #endif |
diff --git a/include/linux/platform_data/edma.h b/include/linux/platform_data/edma.h new file mode 100644 index 000000000000..2344ea2675ad --- /dev/null +++ b/include/linux/platform_data/edma.h | |||
@@ -0,0 +1,182 @@ | |||
1 | /* | ||
2 | * TI EDMA definitions | ||
3 | * | ||
4 | * Copyright (C) 2006-2013 Texas Instruments. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | /* | ||
13 | * This EDMA3 programming framework exposes two basic kinds of resource: | ||
14 | * | ||
15 | * Channel Triggers transfers, usually from a hardware event but | ||
16 | * also manually or by "chaining" from DMA completions. | ||
17 | * Each channel is coupled to a Parameter RAM (PaRAM) slot. | ||
18 | * | ||
19 | * Slot Each PaRAM slot holds a DMA transfer descriptor (PaRAM | ||
20 | * "set"), source and destination addresses, a link to a | ||
21 | * next PaRAM slot (if any), options for the transfer, and | ||
22 | * instructions for updating those addresses. There are | ||
23 | * more than twice as many slots as event channels. | ||
24 | * | ||
25 | * Each PaRAM set describes a sequence of transfers, either for one large | ||
26 | * buffer or for several discontiguous smaller buffers. An EDMA transfer | ||
27 | * is driven only from a channel, which performs the transfers specified | ||
28 | * in its PaRAM slot until there are no more transfers. When that last | ||
29 | * transfer completes, the "link" field may be used to reload the channel's | ||
30 | * PaRAM slot with a new transfer descriptor. | ||
31 | * | ||
32 | * The EDMA Channel Controller (CC) maps requests from channels into physical | ||
33 | * Transfer Controller (TC) requests when the channel triggers (by hardware | ||
34 | * or software events, or by chaining). The two physical DMA channels provided | ||
35 | * by the TCs are thus shared by many logical channels. | ||
36 | * | ||
37 | * DaVinci hardware also has a "QDMA" mechanism which is not currently | ||
38 | * supported through this interface. (DSP firmware uses it though.) | ||
39 | */ | ||
40 | |||
41 | #ifndef EDMA_H_ | ||
42 | #define EDMA_H_ | ||
43 | |||
44 | /* PaRAM slots are laid out like this */ | ||
45 | struct edmacc_param { | ||
46 | unsigned int opt; | ||
47 | unsigned int src; | ||
48 | unsigned int a_b_cnt; | ||
49 | unsigned int dst; | ||
50 | unsigned int src_dst_bidx; | ||
51 | unsigned int link_bcntrld; | ||
52 | unsigned int src_dst_cidx; | ||
53 | unsigned int ccnt; | ||
54 | }; | ||
55 | |||
56 | /* fields in edmacc_param.opt */ | ||
57 | #define SAM BIT(0) | ||
58 | #define DAM BIT(1) | ||
59 | #define SYNCDIM BIT(2) | ||
60 | #define STATIC BIT(3) | ||
61 | #define EDMA_FWID (0x07 << 8) | ||
62 | #define TCCMODE BIT(11) | ||
63 | #define EDMA_TCC(t) ((t) << 12) | ||
64 | #define TCINTEN BIT(20) | ||
65 | #define ITCINTEN BIT(21) | ||
66 | #define TCCHEN BIT(22) | ||
67 | #define ITCCHEN BIT(23) | ||
68 | |||
69 | /*ch_status paramater of callback function possible values*/ | ||
70 | #define DMA_COMPLETE 1 | ||
71 | #define DMA_CC_ERROR 2 | ||
72 | #define DMA_TC1_ERROR 3 | ||
73 | #define DMA_TC2_ERROR 4 | ||
74 | |||
75 | enum address_mode { | ||
76 | INCR = 0, | ||
77 | FIFO = 1 | ||
78 | }; | ||
79 | |||
80 | enum fifo_width { | ||
81 | W8BIT = 0, | ||
82 | W16BIT = 1, | ||
83 | W32BIT = 2, | ||
84 | W64BIT = 3, | ||
85 | W128BIT = 4, | ||
86 | W256BIT = 5 | ||
87 | }; | ||
88 | |||
89 | enum dma_event_q { | ||
90 | EVENTQ_0 = 0, | ||
91 | EVENTQ_1 = 1, | ||
92 | EVENTQ_2 = 2, | ||
93 | EVENTQ_3 = 3, | ||
94 | EVENTQ_DEFAULT = -1 | ||
95 | }; | ||
96 | |||
97 | enum sync_dimension { | ||
98 | ASYNC = 0, | ||
99 | ABSYNC = 1 | ||
100 | }; | ||
101 | |||
102 | #define EDMA_CTLR_CHAN(ctlr, chan) (((ctlr) << 16) | (chan)) | ||
103 | #define EDMA_CTLR(i) ((i) >> 16) | ||
104 | #define EDMA_CHAN_SLOT(i) ((i) & 0xffff) | ||
105 | |||
106 | #define EDMA_CHANNEL_ANY -1 /* for edma_alloc_channel() */ | ||
107 | #define EDMA_SLOT_ANY -1 /* for edma_alloc_slot() */ | ||
108 | #define EDMA_CONT_PARAMS_ANY 1001 | ||
109 | #define EDMA_CONT_PARAMS_FIXED_EXACT 1002 | ||
110 | #define EDMA_CONT_PARAMS_FIXED_NOT_EXACT 1003 | ||
111 | |||
112 | #define EDMA_MAX_CC 2 | ||
113 | |||
114 | /* alloc/free DMA channels and their dedicated parameter RAM slots */ | ||
115 | int edma_alloc_channel(int channel, | ||
116 | void (*callback)(unsigned channel, u16 ch_status, void *data), | ||
117 | void *data, enum dma_event_q); | ||
118 | void edma_free_channel(unsigned channel); | ||
119 | |||
120 | /* alloc/free parameter RAM slots */ | ||
121 | int edma_alloc_slot(unsigned ctlr, int slot); | ||
122 | void edma_free_slot(unsigned slot); | ||
123 | |||
124 | /* alloc/free a set of contiguous parameter RAM slots */ | ||
125 | int edma_alloc_cont_slots(unsigned ctlr, unsigned int id, int slot, int count); | ||
126 | int edma_free_cont_slots(unsigned slot, int count); | ||
127 | |||
128 | /* calls that operate on part of a parameter RAM slot */ | ||
129 | void edma_set_src(unsigned slot, dma_addr_t src_port, | ||
130 | enum address_mode mode, enum fifo_width); | ||
131 | void edma_set_dest(unsigned slot, dma_addr_t dest_port, | ||
132 | enum address_mode mode, enum fifo_width); | ||
133 | void edma_get_position(unsigned slot, dma_addr_t *src, dma_addr_t *dst); | ||
134 | void edma_set_src_index(unsigned slot, s16 src_bidx, s16 src_cidx); | ||
135 | void edma_set_dest_index(unsigned slot, s16 dest_bidx, s16 dest_cidx); | ||
136 | void edma_set_transfer_params(unsigned slot, u16 acnt, u16 bcnt, u16 ccnt, | ||
137 | u16 bcnt_rld, enum sync_dimension sync_mode); | ||
138 | void edma_link(unsigned from, unsigned to); | ||
139 | void edma_unlink(unsigned from); | ||
140 | |||
141 | /* calls that operate on an entire parameter RAM slot */ | ||
142 | void edma_write_slot(unsigned slot, const struct edmacc_param *params); | ||
143 | void edma_read_slot(unsigned slot, struct edmacc_param *params); | ||
144 | |||
145 | /* channel control operations */ | ||
146 | int edma_start(unsigned channel); | ||
147 | void edma_stop(unsigned channel); | ||
148 | void edma_clean_channel(unsigned channel); | ||
149 | void edma_clear_event(unsigned channel); | ||
150 | void edma_pause(unsigned channel); | ||
151 | void edma_resume(unsigned channel); | ||
152 | |||
153 | struct edma_rsv_info { | ||
154 | |||
155 | const s16 (*rsv_chans)[2]; | ||
156 | const s16 (*rsv_slots)[2]; | ||
157 | }; | ||
158 | |||
159 | /* platform_data for EDMA driver */ | ||
160 | struct edma_soc_info { | ||
161 | |||
162 | /* how many dma resources of each type */ | ||
163 | unsigned n_channel; | ||
164 | unsigned n_region; | ||
165 | unsigned n_slot; | ||
166 | unsigned n_tc; | ||
167 | unsigned n_cc; | ||
168 | /* | ||
169 | * Default queue is expected to be a low-priority queue. | ||
170 | * This way, long transfers on the default queue started | ||
171 | * by the codec engine will not cause audio defects. | ||
172 | */ | ||
173 | enum dma_event_q default_queue; | ||
174 | |||
175 | /* Resource reservation for other cores */ | ||
176 | struct edma_rsv_info *rsv; | ||
177 | |||
178 | const s8 (*queue_tc_mapping)[2]; | ||
179 | const s8 (*queue_priority_mapping)[2]; | ||
180 | }; | ||
181 | |||
182 | #endif | ||
diff --git a/include/linux/platform_data/gpio-rcar.h b/include/linux/platform_data/gpio-rcar.h index b253f77a7ddf..2d8d69432813 100644 --- a/include/linux/platform_data/gpio-rcar.h +++ b/include/linux/platform_data/gpio-rcar.h | |||
@@ -17,10 +17,13 @@ | |||
17 | #define __GPIO_RCAR_H__ | 17 | #define __GPIO_RCAR_H__ |
18 | 18 | ||
19 | struct gpio_rcar_config { | 19 | struct gpio_rcar_config { |
20 | unsigned int gpio_base; | 20 | int gpio_base; |
21 | unsigned int irq_base; | 21 | unsigned int irq_base; |
22 | unsigned int number_of_pins; | 22 | unsigned int number_of_pins; |
23 | const char *pctl_name; | 23 | const char *pctl_name; |
24 | unsigned has_both_edge_trigger:1; | ||
24 | }; | 25 | }; |
25 | 26 | ||
27 | #define RCAR_GP_PIN(bank, pin) (((bank) * 32) + (pin)) | ||
28 | |||
26 | #endif /* __GPIO_RCAR_H__ */ | 29 | #endif /* __GPIO_RCAR_H__ */ |
diff --git a/include/linux/platform_data/pinctrl-coh901.h b/include/linux/platform_data/pinctrl-coh901.h deleted file mode 100644 index dfbc65d10484..000000000000 --- a/include/linux/platform_data/pinctrl-coh901.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007-2012 ST-Ericsson AB | ||
3 | * License terms: GNU General Public License (GPL) version 2 | ||
4 | * GPIO block resgister definitions and inline macros for | ||
5 | * U300 GPIO COH 901 335 or COH 901 571/3 | ||
6 | * Author: Linus Walleij <linus.walleij@stericsson.com> | ||
7 | */ | ||
8 | |||
9 | #ifndef __MACH_U300_GPIO_U300_H | ||
10 | #define __MACH_U300_GPIO_U300_H | ||
11 | |||
12 | /** | ||
13 | * struct u300_gpio_platform - U300 GPIO platform data | ||
14 | * @ports: number of GPIO block ports | ||
15 | * @gpio_base: first GPIO number for this block (use a free range) | ||
16 | */ | ||
17 | struct u300_gpio_platform { | ||
18 | u8 ports; | ||
19 | int gpio_base; | ||
20 | }; | ||
21 | |||
22 | #endif /* __MACH_U300_GPIO_U300_H */ | ||
diff --git a/include/linux/platform_data/spi-davinci.h b/include/linux/platform_data/spi-davinci.h index 7af305b37868..8dc2fa47a2aa 100644 --- a/include/linux/platform_data/spi-davinci.h +++ b/include/linux/platform_data/spi-davinci.h | |||
@@ -19,7 +19,7 @@ | |||
19 | #ifndef __ARCH_ARM_DAVINCI_SPI_H | 19 | #ifndef __ARCH_ARM_DAVINCI_SPI_H |
20 | #define __ARCH_ARM_DAVINCI_SPI_H | 20 | #define __ARCH_ARM_DAVINCI_SPI_H |
21 | 21 | ||
22 | #include <mach/edma.h> | 22 | #include <linux/platform_data/edma.h> |
23 | 23 | ||
24 | #define SPI_INTERN_CS 0xFF | 24 | #define SPI_INTERN_CS 0xFF |
25 | 25 | ||
diff --git a/include/linux/platform_data/usb-rcar-phy.h b/include/linux/platform_data/usb-rcar-phy.h new file mode 100644 index 000000000000..8ec6964a32a5 --- /dev/null +++ b/include/linux/platform_data/usb-rcar-phy.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 Renesas Solutions Corp. | ||
3 | * Copyright (C) 2013 Cogent Embedded, Inc. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | */ | ||
9 | |||
10 | #ifndef __USB_RCAR_PHY_H | ||
11 | #define __USB_RCAR_PHY_H | ||
12 | |||
13 | #include <linux/types.h> | ||
14 | |||
15 | struct rcar_phy_platform_data { | ||
16 | bool ferrite_bead:1; /* (R8A7778 only) */ | ||
17 | |||
18 | bool port1_func:1; /* true: port 1 used by function, false: host */ | ||
19 | unsigned penc1:1; /* Output of the PENC1 pin in function mode */ | ||
20 | struct { /* Overcurrent pin control for ports 0..2 */ | ||
21 | bool select_3_3v:1; /* true: USB_OVCn pin, false: OVCn pin */ | ||
22 | /* Set to false on port 1 in function mode */ | ||
23 | bool active_high:1; /* true: active high, false: active low */ | ||
24 | /* Set to true on port 1 in function mode */ | ||
25 | } ovc_pin[3]; /* (R8A7778 only has 2 ports) */ | ||
26 | }; | ||
27 | |||
28 | #endif /* __USB_RCAR_PHY_H */ | ||
diff --git a/include/linux/rculist.h b/include/linux/rculist.h index 8089e35d47ac..f4b1001a4676 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h | |||
@@ -461,6 +461,26 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, | |||
461 | &(pos)->member)), typeof(*(pos)), member)) | 461 | &(pos)->member)), typeof(*(pos)), member)) |
462 | 462 | ||
463 | /** | 463 | /** |
464 | * hlist_for_each_entry_rcu_notrace - iterate over rcu list of given type (for tracing) | ||
465 | * @pos: the type * to use as a loop cursor. | ||
466 | * @head: the head for your list. | ||
467 | * @member: the name of the hlist_node within the struct. | ||
468 | * | ||
469 | * This list-traversal primitive may safely run concurrently with | ||
470 | * the _rcu list-mutation primitives such as hlist_add_head_rcu() | ||
471 | * as long as the traversal is guarded by rcu_read_lock(). | ||
472 | * | ||
473 | * This is the same as hlist_for_each_entry_rcu() except that it does | ||
474 | * not do any RCU debugging or tracing. | ||
475 | */ | ||
476 | #define hlist_for_each_entry_rcu_notrace(pos, head, member) \ | ||
477 | for (pos = hlist_entry_safe (rcu_dereference_raw_notrace(hlist_first_rcu(head)),\ | ||
478 | typeof(*(pos)), member); \ | ||
479 | pos; \ | ||
480 | pos = hlist_entry_safe(rcu_dereference_raw_notrace(hlist_next_rcu(\ | ||
481 | &(pos)->member)), typeof(*(pos)), member)) | ||
482 | |||
483 | /** | ||
464 | * hlist_for_each_entry_rcu_bh - iterate over rcu list of given type | 484 | * hlist_for_each_entry_rcu_bh - iterate over rcu list of given type |
465 | * @pos: the type * to use as a loop cursor. | 485 | * @pos: the type * to use as a loop cursor. |
466 | * @head: the head for your list. | 486 | * @head: the head for your list. |
diff --git a/include/linux/rculist_nulls.h b/include/linux/rculist_nulls.h index 2ae13714828b..1c33dd7da4a7 100644 --- a/include/linux/rculist_nulls.h +++ b/include/linux/rculist_nulls.h | |||
@@ -105,9 +105,14 @@ static inline void hlist_nulls_add_head_rcu(struct hlist_nulls_node *n, | |||
105 | * @head: the head for your list. | 105 | * @head: the head for your list. |
106 | * @member: the name of the hlist_nulls_node within the struct. | 106 | * @member: the name of the hlist_nulls_node within the struct. |
107 | * | 107 | * |
108 | * The barrier() is needed to make sure compiler doesn't cache first element [1], | ||
109 | * as this loop can be restarted [2] | ||
110 | * [1] Documentation/atomic_ops.txt around line 114 | ||
111 | * [2] Documentation/RCU/rculist_nulls.txt around line 146 | ||
108 | */ | 112 | */ |
109 | #define hlist_nulls_for_each_entry_rcu(tpos, pos, head, member) \ | 113 | #define hlist_nulls_for_each_entry_rcu(tpos, pos, head, member) \ |
110 | for (pos = rcu_dereference_raw(hlist_nulls_first_rcu(head)); \ | 114 | for (({barrier();}), \ |
115 | pos = rcu_dereference_raw(hlist_nulls_first_rcu(head)); \ | ||
111 | (!is_a_nulls(pos)) && \ | 116 | (!is_a_nulls(pos)) && \ |
112 | ({ tpos = hlist_nulls_entry(pos, typeof(*tpos), member); 1; }); \ | 117 | ({ tpos = hlist_nulls_entry(pos, typeof(*tpos), member); 1; }); \ |
113 | pos = rcu_dereference_raw(hlist_nulls_next_rcu(pos))) | 118 | pos = rcu_dereference_raw(hlist_nulls_next_rcu(pos))) |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 4ccd68e49b00..ddcc7826d907 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -640,6 +640,15 @@ static inline void rcu_preempt_sleep_check(void) | |||
640 | 640 | ||
641 | #define rcu_dereference_raw(p) rcu_dereference_check(p, 1) /*@@@ needed? @@@*/ | 641 | #define rcu_dereference_raw(p) rcu_dereference_check(p, 1) /*@@@ needed? @@@*/ |
642 | 642 | ||
643 | /* | ||
644 | * The tracing infrastructure traces RCU (we want that), but unfortunately | ||
645 | * some of the RCU checks causes tracing to lock up the system. | ||
646 | * | ||
647 | * The tracing version of rcu_dereference_raw() must not call | ||
648 | * rcu_read_lock_held(). | ||
649 | */ | ||
650 | #define rcu_dereference_raw_notrace(p) __rcu_dereference_check((p), 1, __rcu) | ||
651 | |||
643 | /** | 652 | /** |
644 | * rcu_access_index() - fetch RCU index with no dereferencing | 653 | * rcu_access_index() - fetch RCU index with no dereferencing |
645 | * @p: The index to read | 654 | * @p: The index to read |
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index 5951e3f38878..26806775b11b 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h | |||
@@ -111,6 +111,9 @@ static inline struct page *sg_page(struct scatterlist *sg) | |||
111 | static inline void sg_set_buf(struct scatterlist *sg, const void *buf, | 111 | static inline void sg_set_buf(struct scatterlist *sg, const void *buf, |
112 | unsigned int buflen) | 112 | unsigned int buflen) |
113 | { | 113 | { |
114 | #ifdef CONFIG_DEBUG_SG | ||
115 | BUG_ON(!virt_addr_valid(buf)); | ||
116 | #endif | ||
114 | sg_set_page(sg, virt_to_page(buf), buflen, offset_in_page(buf)); | 117 | sg_set_page(sg, virt_to_page(buf), buflen, offset_in_page(buf)); |
115 | } | 118 | } |
116 | 119 | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 2e0ced1af3b1..9c676eae3968 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -2852,6 +2852,21 @@ static inline int skb_tnl_header_len(const struct sk_buff *inner_skb) | |||
2852 | SKB_GSO_CB(inner_skb)->mac_offset; | 2852 | SKB_GSO_CB(inner_skb)->mac_offset; |
2853 | } | 2853 | } |
2854 | 2854 | ||
2855 | static inline int gso_pskb_expand_head(struct sk_buff *skb, int extra) | ||
2856 | { | ||
2857 | int new_headroom, headroom; | ||
2858 | int ret; | ||
2859 | |||
2860 | headroom = skb_headroom(skb); | ||
2861 | ret = pskb_expand_head(skb, extra, 0, GFP_ATOMIC); | ||
2862 | if (ret) | ||
2863 | return ret; | ||
2864 | |||
2865 | new_headroom = skb_headroom(skb); | ||
2866 | SKB_GSO_CB(skb)->mac_offset += (new_headroom - headroom); | ||
2867 | return 0; | ||
2868 | } | ||
2869 | |||
2855 | static inline bool skb_is_gso(const struct sk_buff *skb) | 2870 | static inline bool skb_is_gso(const struct sk_buff *skb) |
2856 | { | 2871 | { |
2857 | return skb_shinfo(skb)->gso_size; | 2872 | return skb_shinfo(skb)->gso_size; |
diff --git a/include/linux/smp.h b/include/linux/smp.h index e6564c1dc552..c8488763277f 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/list.h> | 11 | #include <linux/list.h> |
12 | #include <linux/cpumask.h> | 12 | #include <linux/cpumask.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/irqflags.h> | ||
14 | 15 | ||
15 | extern void cpu_idle(void); | 16 | extern void cpu_idle(void); |
16 | 17 | ||
@@ -139,13 +140,17 @@ static inline int up_smp_call_function(smp_call_func_t func, void *info) | |||
139 | } | 140 | } |
140 | #define smp_call_function(func, info, wait) \ | 141 | #define smp_call_function(func, info, wait) \ |
141 | (up_smp_call_function(func, info)) | 142 | (up_smp_call_function(func, info)) |
142 | #define on_each_cpu(func,info,wait) \ | 143 | |
143 | ({ \ | 144 | static inline int on_each_cpu(smp_call_func_t func, void *info, int wait) |
144 | local_irq_disable(); \ | 145 | { |
145 | func(info); \ | 146 | unsigned long flags; |
146 | local_irq_enable(); \ | 147 | |
147 | 0; \ | 148 | local_irq_save(flags); |
148 | }) | 149 | func(info); |
150 | local_irq_restore(flags); | ||
151 | return 0; | ||
152 | } | ||
153 | |||
149 | /* | 154 | /* |
150 | * Note we still need to test the mask even for UP | 155 | * Note we still need to test the mask even for UP |
151 | * because we actually can get an empty mask from | 156 | * because we actually can get an empty mask from |
diff --git a/include/linux/socket.h b/include/linux/socket.h index 33bf2dfab19d..b10ce4b341ea 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -320,6 +320,9 @@ extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data); | |||
320 | 320 | ||
321 | struct timespec; | 321 | struct timespec; |
322 | 322 | ||
323 | /* The __sys_...msg variants allow MSG_CMSG_COMPAT */ | ||
324 | extern long __sys_recvmsg(int fd, struct msghdr __user *msg, unsigned flags); | ||
325 | extern long __sys_sendmsg(int fd, struct msghdr __user *msg, unsigned flags); | ||
323 | extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, | 326 | extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, |
324 | unsigned int flags, struct timespec *timeout); | 327 | unsigned int flags, struct timespec *timeout); |
325 | extern int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, | 328 | extern int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, |
diff --git a/include/linux/swapops.h b/include/linux/swapops.h index 47ead515c811..c5fd30d2a415 100644 --- a/include/linux/swapops.h +++ b/include/linux/swapops.h | |||
@@ -137,6 +137,7 @@ static inline void make_migration_entry_read(swp_entry_t *entry) | |||
137 | 137 | ||
138 | extern void migration_entry_wait(struct mm_struct *mm, pmd_t *pmd, | 138 | extern void migration_entry_wait(struct mm_struct *mm, pmd_t *pmd, |
139 | unsigned long address); | 139 | unsigned long address); |
140 | extern void migration_entry_wait_huge(struct mm_struct *mm, pte_t *pte); | ||
140 | #else | 141 | #else |
141 | 142 | ||
142 | #define make_migration_entry(page, write) swp_entry(0, 0) | 143 | #define make_migration_entry(page, write) swp_entry(0, 0) |
@@ -148,6 +149,8 @@ static inline int is_migration_entry(swp_entry_t swp) | |||
148 | static inline void make_migration_entry_read(swp_entry_t *entryp) { } | 149 | static inline void make_migration_entry_read(swp_entry_t *entryp) { } |
149 | static inline void migration_entry_wait(struct mm_struct *mm, pmd_t *pmd, | 150 | static inline void migration_entry_wait(struct mm_struct *mm, pmd_t *pmd, |
150 | unsigned long address) { } | 151 | unsigned long address) { } |
152 | static inline void migration_entry_wait_huge(struct mm_struct *mm, | ||
153 | pte_t *pte) { } | ||
151 | static inline int is_write_migration_entry(swp_entry_t entry) | 154 | static inline int is_write_migration_entry(swp_entry_t entry) |
152 | { | 155 | { |
153 | return 0; | 156 | return 0; |
diff --git a/include/linux/syslog.h b/include/linux/syslog.h index 38911391a139..98a3153c0f96 100644 --- a/include/linux/syslog.h +++ b/include/linux/syslog.h | |||
@@ -44,8 +44,8 @@ | |||
44 | /* Return size of the log buffer */ | 44 | /* Return size of the log buffer */ |
45 | #define SYSLOG_ACTION_SIZE_BUFFER 10 | 45 | #define SYSLOG_ACTION_SIZE_BUFFER 10 |
46 | 46 | ||
47 | #define SYSLOG_FROM_CALL 0 | 47 | #define SYSLOG_FROM_READER 0 |
48 | #define SYSLOG_FROM_FILE 1 | 48 | #define SYSLOG_FROM_PROC 1 |
49 | 49 | ||
50 | int do_syslog(int type, char __user *buf, int count, bool from_file); | 50 | int do_syslog(int type, char __user *buf, int count, bool from_file); |
51 | 51 | ||
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index 2f322c38bd4d..f8e084d0fc77 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
@@ -145,8 +145,8 @@ static inline void tracepoint_synchronize_unregister(void) | |||
145 | TP_PROTO(data_proto), \ | 145 | TP_PROTO(data_proto), \ |
146 | TP_ARGS(data_args), \ | 146 | TP_ARGS(data_args), \ |
147 | TP_CONDITION(cond), \ | 147 | TP_CONDITION(cond), \ |
148 | rcu_idle_exit(), \ | 148 | rcu_irq_enter(), \ |
149 | rcu_idle_enter()); \ | 149 | rcu_irq_exit()); \ |
150 | } | 150 | } |
151 | #else | 151 | #else |
152 | #define __DECLARE_TRACE_RCU(name, proto, args, cond, data_proto, data_args) | 152 | #define __DECLARE_TRACE_RCU(name, proto, args, cond, data_proto, data_args) |
diff --git a/include/linux/usb/ehci_pdriver.h b/include/linux/usb/ehci_pdriver.h index 99238b096f7e..7eb4dcd0d386 100644 --- a/include/linux/usb/ehci_pdriver.h +++ b/include/linux/usb/ehci_pdriver.h | |||
@@ -19,6 +19,9 @@ | |||
19 | #ifndef __USB_CORE_EHCI_PDRIVER_H | 19 | #ifndef __USB_CORE_EHCI_PDRIVER_H |
20 | #define __USB_CORE_EHCI_PDRIVER_H | 20 | #define __USB_CORE_EHCI_PDRIVER_H |
21 | 21 | ||
22 | struct platform_device; | ||
23 | struct usb_hcd; | ||
24 | |||
22 | /** | 25 | /** |
23 | * struct usb_ehci_pdata - platform_data for generic ehci driver | 26 | * struct usb_ehci_pdata - platform_data for generic ehci driver |
24 | * | 27 | * |
@@ -50,6 +53,7 @@ struct usb_ehci_pdata { | |||
50 | /* Turn on only VBUS suspend power and hotplug detection, | 53 | /* Turn on only VBUS suspend power and hotplug detection, |
51 | * turn off everything else */ | 54 | * turn off everything else */ |
52 | void (*power_suspend)(struct platform_device *pdev); | 55 | void (*power_suspend)(struct platform_device *pdev); |
56 | int (*pre_setup)(struct usb_hcd *hcd); | ||
53 | }; | 57 | }; |
54 | 58 | ||
55 | #endif /* __USB_CORE_EHCI_PDRIVER_H */ | 59 | #endif /* __USB_CORE_EHCI_PDRIVER_H */ |