diff options
Diffstat (limited to 'include/linux')
172 files changed, 4148 insertions, 1367 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 97319a8fc1e0..d1580c17cab3 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -20,15 +20,18 @@ header-y += wimax/ | |||
20 | objhdr-y += version.h | 20 | objhdr-y += version.h |
21 | 21 | ||
22 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ | 22 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ |
23 | $(srctree)/include/asm-$(SRCARCH)/a.out.h),) | 23 | $(srctree)/include/asm-$(SRCARCH)/a.out.h \ |
24 | $(INSTALL_HDR_PATH)/include/asm-*/a.out.h),) | ||
24 | header-y += a.out.h | 25 | header-y += a.out.h |
25 | endif | 26 | endif |
26 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \ | 27 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \ |
27 | $(srctree)/include/asm-$(SRCARCH)/kvm.h),) | 28 | $(srctree)/include/asm-$(SRCARCH)/kvm.h \ |
29 | $(INSTALL_HDR_PATH)/include/asm-*/kvm.h),) | ||
28 | header-y += kvm.h | 30 | header-y += kvm.h |
29 | endif | 31 | endif |
30 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \ | 32 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \ |
31 | $(srctree)/include/asm-$(SRCARCH)/kvm_para.h),) | 33 | $(srctree)/include/asm-$(SRCARCH)/kvm_para.h \ |
34 | $(INSTALL_HDR_PATH)/include/asm-*/kvm_para.h),) | ||
32 | header-y += kvm_para.h | 35 | header-y += kvm_para.h |
33 | endif | 36 | endif |
34 | 37 | ||
@@ -367,7 +370,6 @@ header-y += utime.h | |||
367 | header-y += utsname.h | 370 | header-y += utsname.h |
368 | header-y += veth.h | 371 | header-y += veth.h |
369 | header-y += vhost.h | 372 | header-y += vhost.h |
370 | header-y += videodev.h | ||
371 | header-y += videodev2.h | 373 | header-y += videodev2.h |
372 | header-y += virtio_9p.h | 374 | header-y += virtio_9p.h |
373 | header-y += virtio_balloon.h | 375 | header-y += virtio_balloon.h |
diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h index 09ea4a1e9505..eaf6cd75a1b1 100644 --- a/include/linux/agp_backend.h +++ b/include/linux/agp_backend.h | |||
@@ -102,10 +102,8 @@ extern struct agp_memory *agp_allocate_memory(struct agp_bridge_data *, size_t, | |||
102 | extern int agp_copy_info(struct agp_bridge_data *, struct agp_kern_info *); | 102 | extern int agp_copy_info(struct agp_bridge_data *, struct agp_kern_info *); |
103 | extern int agp_bind_memory(struct agp_memory *, off_t); | 103 | extern int agp_bind_memory(struct agp_memory *, off_t); |
104 | extern int agp_unbind_memory(struct agp_memory *); | 104 | extern int agp_unbind_memory(struct agp_memory *); |
105 | extern int agp_rebind_memory(void); | ||
106 | extern void agp_enable(struct agp_bridge_data *, u32); | 105 | extern void agp_enable(struct agp_bridge_data *, u32); |
107 | extern struct agp_bridge_data *agp_backend_acquire(struct pci_dev *); | 106 | extern struct agp_bridge_data *agp_backend_acquire(struct pci_dev *); |
108 | extern void agp_backend_release(struct agp_bridge_data *); | 107 | extern void agp_backend_release(struct agp_bridge_data *); |
109 | extern void agp_flush_chipset(struct agp_bridge_data *); | ||
110 | 108 | ||
111 | #endif /* _AGP_BACKEND_H */ | 109 | #endif /* _AGP_BACKEND_H */ |
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index c6454cca0447..9e7f259346e1 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/device.h> | 18 | #include <linux/device.h> |
19 | #include <linux/err.h> | 19 | #include <linux/err.h> |
20 | #include <linux/resource.h> | 20 | #include <linux/resource.h> |
21 | #include <linux/regulator/consumer.h> | ||
21 | 22 | ||
22 | #define AMBA_NR_IRQS 2 | 23 | #define AMBA_NR_IRQS 2 |
23 | #define AMBA_CID 0xb105f00d | 24 | #define AMBA_CID 0xb105f00d |
@@ -28,6 +29,7 @@ struct amba_device { | |||
28 | struct device dev; | 29 | struct device dev; |
29 | struct resource res; | 30 | struct resource res; |
30 | struct clk *pclk; | 31 | struct clk *pclk; |
32 | struct regulator *vcore; | ||
31 | u64 dma_mask; | 33 | u64 dma_mask; |
32 | unsigned int periphid; | 34 | unsigned int periphid; |
33 | unsigned int irq[AMBA_NR_IRQS]; | 35 | unsigned int irq[AMBA_NR_IRQS]; |
@@ -71,6 +73,12 @@ void amba_release_regions(struct amba_device *); | |||
71 | #define amba_pclk_disable(d) \ | 73 | #define amba_pclk_disable(d) \ |
72 | do { if (!IS_ERR((d)->pclk)) clk_disable((d)->pclk); } while (0) | 74 | do { if (!IS_ERR((d)->pclk)) clk_disable((d)->pclk); } while (0) |
73 | 75 | ||
76 | #define amba_vcore_enable(d) \ | ||
77 | (IS_ERR((d)->vcore) ? 0 : regulator_enable((d)->vcore)) | ||
78 | |||
79 | #define amba_vcore_disable(d) \ | ||
80 | do { if (!IS_ERR((d)->vcore)) regulator_disable((d)->vcore); } while (0) | ||
81 | |||
74 | /* Some drivers don't use the struct amba_device */ | 82 | /* Some drivers don't use the struct amba_device */ |
75 | #define AMBA_CONFIG_BITS(a) (((a) >> 24) & 0xff) | 83 | #define AMBA_CONFIG_BITS(a) (((a) >> 24) & 0xff) |
76 | #define AMBA_REV_BITS(a) (((a) >> 20) & 0x0f) | 84 | #define AMBA_REV_BITS(a) (((a) >> 20) & 0x0f) |
diff --git a/include/linux/amba/serial.h b/include/linux/amba/serial.h index 6021588ba0a8..5479fdc849e9 100644 --- a/include/linux/amba/serial.h +++ b/include/linux/amba/serial.h | |||
@@ -113,6 +113,21 @@ | |||
113 | #define UART01x_LCRH_PEN 0x02 | 113 | #define UART01x_LCRH_PEN 0x02 |
114 | #define UART01x_LCRH_BRK 0x01 | 114 | #define UART01x_LCRH_BRK 0x01 |
115 | 115 | ||
116 | #define ST_UART011_DMAWM_RX_1 (0 << 3) | ||
117 | #define ST_UART011_DMAWM_RX_2 (1 << 3) | ||
118 | #define ST_UART011_DMAWM_RX_4 (2 << 3) | ||
119 | #define ST_UART011_DMAWM_RX_8 (3 << 3) | ||
120 | #define ST_UART011_DMAWM_RX_16 (4 << 3) | ||
121 | #define ST_UART011_DMAWM_RX_32 (5 << 3) | ||
122 | #define ST_UART011_DMAWM_RX_48 (6 << 3) | ||
123 | #define ST_UART011_DMAWM_TX_1 0 | ||
124 | #define ST_UART011_DMAWM_TX_2 1 | ||
125 | #define ST_UART011_DMAWM_TX_4 2 | ||
126 | #define ST_UART011_DMAWM_TX_8 3 | ||
127 | #define ST_UART011_DMAWM_TX_16 4 | ||
128 | #define ST_UART011_DMAWM_TX_32 5 | ||
129 | #define ST_UART011_DMAWM_TX_48 6 | ||
130 | |||
116 | #define UART010_IIR_RTIS 0x08 | 131 | #define UART010_IIR_RTIS 0x08 |
117 | #define UART010_IIR_TIS 0x04 | 132 | #define UART010_IIR_TIS 0x04 |
118 | #define UART010_IIR_RIS 0x02 | 133 | #define UART010_IIR_RIS 0x02 |
@@ -180,6 +195,13 @@ struct amba_device; /* in uncompress this is included but amba/bus.h is not */ | |||
180 | struct amba_pl010_data { | 195 | struct amba_pl010_data { |
181 | void (*set_mctrl)(struct amba_device *dev, void __iomem *base, unsigned int mctrl); | 196 | void (*set_mctrl)(struct amba_device *dev, void __iomem *base, unsigned int mctrl); |
182 | }; | 197 | }; |
198 | |||
199 | struct dma_chan; | ||
200 | struct amba_pl011_data { | ||
201 | bool (*dma_filter)(struct dma_chan *chan, void *filter_param); | ||
202 | void *dma_rx_param; | ||
203 | void *dma_tx_param; | ||
204 | }; | ||
183 | #endif | 205 | #endif |
184 | 206 | ||
185 | #endif | 207 | #endif |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 8b5c0620abf9..359df0487690 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -372,6 +372,7 @@ struct audit_buffer; | |||
372 | struct audit_context; | 372 | struct audit_context; |
373 | struct inode; | 373 | struct inode; |
374 | struct netlink_skb_parms; | 374 | struct netlink_skb_parms; |
375 | struct path; | ||
375 | struct linux_binprm; | 376 | struct linux_binprm; |
376 | struct mq_attr; | 377 | struct mq_attr; |
377 | struct mqstat; | 378 | struct mqstat; |
diff --git a/include/linux/average.h b/include/linux/average.h new file mode 100644 index 000000000000..c6028fd742c1 --- /dev/null +++ b/include/linux/average.h | |||
@@ -0,0 +1,30 @@ | |||
1 | #ifndef _LINUX_AVERAGE_H | ||
2 | #define _LINUX_AVERAGE_H | ||
3 | |||
4 | /* Exponentially weighted moving average (EWMA) */ | ||
5 | |||
6 | /* For more documentation see lib/average.c */ | ||
7 | |||
8 | struct ewma { | ||
9 | unsigned long internal; | ||
10 | unsigned long factor; | ||
11 | unsigned long weight; | ||
12 | }; | ||
13 | |||
14 | extern void ewma_init(struct ewma *avg, unsigned long factor, | ||
15 | unsigned long weight); | ||
16 | |||
17 | extern struct ewma *ewma_add(struct ewma *avg, unsigned long val); | ||
18 | |||
19 | /** | ||
20 | * ewma_read() - Get average value | ||
21 | * @avg: Average structure | ||
22 | * | ||
23 | * Returns the average value held in @avg. | ||
24 | */ | ||
25 | static inline unsigned long ewma_read(const struct ewma *avg) | ||
26 | { | ||
27 | return avg->internal >> avg->factor; | ||
28 | } | ||
29 | |||
30 | #endif /* _LINUX_AVERAGE_H */ | ||
diff --git a/include/linux/bfin_mac.h b/include/linux/bfin_mac.h index 904dec7d03a1..a69554ef8476 100644 --- a/include/linux/bfin_mac.h +++ b/include/linux/bfin_mac.h | |||
@@ -24,6 +24,7 @@ struct bfin_mii_bus_platform_data { | |||
24 | const unsigned short *mac_peripherals; | 24 | const unsigned short *mac_peripherals; |
25 | int phy_mode; | 25 | int phy_mode; |
26 | unsigned int phy_mask; | 26 | unsigned int phy_mask; |
27 | unsigned short vlan1_mask, vlan2_mask; | ||
27 | }; | 28 | }; |
28 | 29 | ||
29 | #endif | 30 | #endif |
diff --git a/include/linux/bit_spinlock.h b/include/linux/bit_spinlock.h index 7113a32a86ea..e612575a2596 100644 --- a/include/linux/bit_spinlock.h +++ b/include/linux/bit_spinlock.h | |||
@@ -1,6 +1,10 @@ | |||
1 | #ifndef __LINUX_BIT_SPINLOCK_H | 1 | #ifndef __LINUX_BIT_SPINLOCK_H |
2 | #define __LINUX_BIT_SPINLOCK_H | 2 | #define __LINUX_BIT_SPINLOCK_H |
3 | 3 | ||
4 | #include <linux/kernel.h> | ||
5 | #include <linux/preempt.h> | ||
6 | #include <asm/atomic.h> | ||
7 | |||
4 | /* | 8 | /* |
5 | * bit-based spin_lock() | 9 | * bit-based spin_lock() |
6 | * | 10 | * |
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 827cc95711ef..2184c6b97aeb 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
@@ -109,6 +109,17 @@ static inline __u8 ror8(__u8 word, unsigned int shift) | |||
109 | return (word >> shift) | (word << (8 - shift)); | 109 | return (word >> shift) | (word << (8 - shift)); |
110 | } | 110 | } |
111 | 111 | ||
112 | /** | ||
113 | * sign_extend32 - sign extend a 32-bit value using specified bit as sign-bit | ||
114 | * @value: value to sign extend | ||
115 | * @index: 0 based bit index (0<=index<32) to sign bit | ||
116 | */ | ||
117 | static inline __s32 sign_extend32(__u32 value, int index) | ||
118 | { | ||
119 | __u8 shift = 31 - index; | ||
120 | return (__s32)(value << shift) >> shift; | ||
121 | } | ||
122 | |||
112 | static inline unsigned fls_long(unsigned long l) | 123 | static inline unsigned fls_long(unsigned long l) |
113 | { | 124 | { |
114 | if (sizeof(l) == 4) | 125 | if (sizeof(l) == 4) |
diff --git a/include/linux/capability.h b/include/linux/capability.h index 90012b9ddbf3..fb16a3699b99 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -246,7 +246,6 @@ struct cpu_vfs_cap_data { | |||
246 | /* Allow configuration of the secure attention key */ | 246 | /* Allow configuration of the secure attention key */ |
247 | /* Allow administration of the random device */ | 247 | /* Allow administration of the random device */ |
248 | /* Allow examination and configuration of disk quotas */ | 248 | /* Allow examination and configuration of disk quotas */ |
249 | /* Allow configuring the kernel's syslog (printk behaviour) */ | ||
250 | /* Allow setting the domainname */ | 249 | /* Allow setting the domainname */ |
251 | /* Allow setting the hostname */ | 250 | /* Allow setting the hostname */ |
252 | /* Allow calling bdflush() */ | 251 | /* Allow calling bdflush() */ |
@@ -352,7 +351,11 @@ struct cpu_vfs_cap_data { | |||
352 | 351 | ||
353 | #define CAP_MAC_ADMIN 33 | 352 | #define CAP_MAC_ADMIN 33 |
354 | 353 | ||
355 | #define CAP_LAST_CAP CAP_MAC_ADMIN | 354 | /* Allow configuring the kernel's syslog (printk behaviour) */ |
355 | |||
356 | #define CAP_SYSLOG 34 | ||
357 | |||
358 | #define CAP_LAST_CAP CAP_SYSLOG | ||
356 | 359 | ||
357 | #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP) | 360 | #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP) |
358 | 361 | ||
diff --git a/include/linux/clkdev.h b/include/linux/clkdev.h new file mode 100644 index 000000000000..457bcb0a310a --- /dev/null +++ b/include/linux/clkdev.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * include/linux/clkdev.h | ||
3 | * | ||
4 | * Copyright (C) 2008 Russell King. | ||
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 | * Helper for the clk API to assist looking up a struct clk. | ||
11 | */ | ||
12 | #ifndef __CLKDEV_H | ||
13 | #define __CLKDEV_H | ||
14 | |||
15 | #include <asm/clkdev.h> | ||
16 | |||
17 | struct clk; | ||
18 | struct device; | ||
19 | |||
20 | struct clk_lookup { | ||
21 | struct list_head node; | ||
22 | const char *dev_id; | ||
23 | const char *con_id; | ||
24 | struct clk *clk; | ||
25 | }; | ||
26 | |||
27 | struct clk_lookup *clkdev_alloc(struct clk *clk, const char *con_id, | ||
28 | const char *dev_fmt, ...); | ||
29 | |||
30 | void clkdev_add(struct clk_lookup *cl); | ||
31 | void clkdev_drop(struct clk_lookup *cl); | ||
32 | |||
33 | void clkdev_add_table(struct clk_lookup *, size_t); | ||
34 | int clk_add_alias(const char *, const char *, char *, struct device *); | ||
35 | |||
36 | #endif | ||
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h index 2e914d0771b9..4ccc59c1ea82 100644 --- a/include/linux/coda_linux.h +++ b/include/linux/coda_linux.h | |||
@@ -37,7 +37,7 @@ extern const struct file_operations coda_ioctl_operations; | |||
37 | /* operations shared over more than one file */ | 37 | /* operations shared over more than one file */ |
38 | int coda_open(struct inode *i, struct file *f); | 38 | int coda_open(struct inode *i, struct file *f); |
39 | int coda_release(struct inode *i, struct file *f); | 39 | int coda_release(struct inode *i, struct file *f); |
40 | int coda_permission(struct inode *inode, int mask); | 40 | int coda_permission(struct inode *inode, int mask, unsigned int flags); |
41 | int coda_revalidate_inode(struct dentry *); | 41 | int coda_revalidate_inode(struct dentry *); |
42 | int coda_getattr(struct vfsmount *, struct dentry *, struct kstat *); | 42 | int coda_getattr(struct vfsmount *, struct dentry *, struct kstat *); |
43 | int coda_setattr(struct dentry *, struct iattr *); | 43 | int coda_setattr(struct dentry *, struct iattr *); |
diff --git a/include/linux/completion.h b/include/linux/completion.h index 36d57f74cd01..51494e6b5548 100644 --- a/include/linux/completion.h +++ b/include/linux/completion.h | |||
@@ -81,10 +81,10 @@ extern int wait_for_completion_interruptible(struct completion *x); | |||
81 | extern int wait_for_completion_killable(struct completion *x); | 81 | extern int wait_for_completion_killable(struct completion *x); |
82 | extern unsigned long wait_for_completion_timeout(struct completion *x, | 82 | extern unsigned long wait_for_completion_timeout(struct completion *x, |
83 | unsigned long timeout); | 83 | unsigned long timeout); |
84 | extern unsigned long wait_for_completion_interruptible_timeout( | 84 | extern long wait_for_completion_interruptible_timeout( |
85 | struct completion *x, unsigned long timeout); | 85 | struct completion *x, unsigned long timeout); |
86 | extern unsigned long wait_for_completion_killable_timeout( | 86 | extern long wait_for_completion_killable_timeout( |
87 | struct completion *x, unsigned long timeout); | 87 | struct completion *x, unsigned long timeout); |
88 | extern bool try_wait_for_completion(struct completion *x); | 88 | extern bool try_wait_for_completion(struct completion *x); |
89 | extern bool completion_done(struct completion *x); | 89 | extern bool completion_done(struct completion *x); |
90 | 90 | ||
diff --git a/include/linux/console.h b/include/linux/console.h index 95cf6f08a59d..9774fe6a1a97 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
@@ -126,6 +126,12 @@ struct console { | |||
126 | struct console *next; | 126 | struct console *next; |
127 | }; | 127 | }; |
128 | 128 | ||
129 | /* | ||
130 | * for_each_console() allows you to iterate on each console | ||
131 | */ | ||
132 | #define for_each_console(con) \ | ||
133 | for (con = console_drivers; con != NULL; con = con->next) | ||
134 | |||
129 | extern int console_set_on_cmdline; | 135 | extern int console_set_on_cmdline; |
130 | 136 | ||
131 | extern int add_preferred_console(char *name, int idx, char *options); | 137 | extern int add_preferred_console(char *name, int idx, char *options); |
@@ -145,7 +151,7 @@ extern int is_console_locked(void); | |||
145 | extern int braille_register_console(struct console *, int index, | 151 | extern int braille_register_console(struct console *, int index, |
146 | char *console_options, char *braille_options); | 152 | char *console_options, char *braille_options); |
147 | extern int braille_unregister_console(struct console *); | 153 | extern int braille_unregister_console(struct console *); |
148 | 154 | extern void console_sysfs_notify(void); | |
149 | extern int console_suspend_enabled; | 155 | extern int console_suspend_enabled; |
150 | 156 | ||
151 | /* Suspend and resume console messages over PM events */ | 157 | /* Suspend and resume console messages over PM events */ |
diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h index 0026f267da20..088cd4ace4ef 100644 --- a/include/linux/crash_dump.h +++ b/include/linux/crash_dump.h | |||
@@ -20,7 +20,14 @@ extern ssize_t copy_oldmem_page(unsigned long, char *, size_t, | |||
20 | #define vmcore_elf_check_arch_cross(x) 0 | 20 | #define vmcore_elf_check_arch_cross(x) 0 |
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #define vmcore_elf_check_arch(x) (elf_check_arch(x) || vmcore_elf_check_arch_cross(x)) | 23 | /* |
24 | * Architecture code can redefine this if there are any special checks | ||
25 | * needed for 64-bit ELF vmcores. In case of 32-bit only architecture, | ||
26 | * this can be set to zero. | ||
27 | */ | ||
28 | #ifndef vmcore_elf64_check_arch | ||
29 | #define vmcore_elf64_check_arch(x) (elf_check_arch(x) || vmcore_elf_check_arch_cross(x)) | ||
30 | #endif | ||
24 | 31 | ||
25 | /* | 32 | /* |
26 | * is_kdump_kernel() checks whether this kernel is booting after a panic of | 33 | * is_kdump_kernel() checks whether this kernel is booting after a panic of |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 6a4aea30aa09..59fcd24b1468 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -4,7 +4,9 @@ | |||
4 | #include <asm/atomic.h> | 4 | #include <asm/atomic.h> |
5 | #include <linux/list.h> | 5 | #include <linux/list.h> |
6 | #include <linux/rculist.h> | 6 | #include <linux/rculist.h> |
7 | #include <linux/rculist_bl.h> | ||
7 | #include <linux/spinlock.h> | 8 | #include <linux/spinlock.h> |
9 | #include <linux/seqlock.h> | ||
8 | #include <linux/cache.h> | 10 | #include <linux/cache.h> |
9 | #include <linux/rcupdate.h> | 11 | #include <linux/rcupdate.h> |
10 | 12 | ||
@@ -45,6 +47,27 @@ struct dentry_stat_t { | |||
45 | }; | 47 | }; |
46 | extern struct dentry_stat_t dentry_stat; | 48 | extern struct dentry_stat_t dentry_stat; |
47 | 49 | ||
50 | /* | ||
51 | * Compare 2 name strings, return 0 if they match, otherwise non-zero. | ||
52 | * The strings are both count bytes long, and count is non-zero. | ||
53 | */ | ||
54 | static inline int dentry_cmp(const unsigned char *cs, size_t scount, | ||
55 | const unsigned char *ct, size_t tcount) | ||
56 | { | ||
57 | int ret; | ||
58 | if (scount != tcount) | ||
59 | return 1; | ||
60 | do { | ||
61 | ret = (*cs != *ct); | ||
62 | if (ret) | ||
63 | break; | ||
64 | cs++; | ||
65 | ct++; | ||
66 | tcount--; | ||
67 | } while (tcount); | ||
68 | return ret; | ||
69 | } | ||
70 | |||
48 | /* Name hashing routines. Initial hash value */ | 71 | /* Name hashing routines. Initial hash value */ |
49 | /* Hash courtesy of the R5 hash in reiserfs modulo sign bits */ | 72 | /* Hash courtesy of the R5 hash in reiserfs modulo sign bits */ |
50 | #define init_name_hash() 0 | 73 | #define init_name_hash() 0 |
@@ -81,25 +104,33 @@ full_name_hash(const unsigned char *name, unsigned int len) | |||
81 | * large memory footprint increase). | 104 | * large memory footprint increase). |
82 | */ | 105 | */ |
83 | #ifdef CONFIG_64BIT | 106 | #ifdef CONFIG_64BIT |
84 | #define DNAME_INLINE_LEN_MIN 32 /* 192 bytes */ | 107 | # define DNAME_INLINE_LEN 32 /* 192 bytes */ |
85 | #else | 108 | #else |
86 | #define DNAME_INLINE_LEN_MIN 40 /* 128 bytes */ | 109 | # ifdef CONFIG_SMP |
110 | # define DNAME_INLINE_LEN 36 /* 128 bytes */ | ||
111 | # else | ||
112 | # define DNAME_INLINE_LEN 40 /* 128 bytes */ | ||
113 | # endif | ||
87 | #endif | 114 | #endif |
88 | 115 | ||
89 | struct dentry { | 116 | struct dentry { |
90 | atomic_t d_count; | 117 | /* RCU lookup touched fields */ |
91 | unsigned int d_flags; /* protected by d_lock */ | 118 | unsigned int d_flags; /* protected by d_lock */ |
92 | spinlock_t d_lock; /* per dentry lock */ | 119 | seqcount_t d_seq; /* per dentry seqlock */ |
93 | int d_mounted; | 120 | struct hlist_bl_node d_hash; /* lookup hash list */ |
94 | struct inode *d_inode; /* Where the name belongs to - NULL is | ||
95 | * negative */ | ||
96 | /* | ||
97 | * The next three fields are touched by __d_lookup. Place them here | ||
98 | * so they all fit in a cache line. | ||
99 | */ | ||
100 | struct hlist_node d_hash; /* lookup hash list */ | ||
101 | struct dentry *d_parent; /* parent directory */ | 121 | struct dentry *d_parent; /* parent directory */ |
102 | struct qstr d_name; | 122 | struct qstr d_name; |
123 | struct inode *d_inode; /* Where the name belongs to - NULL is | ||
124 | * negative */ | ||
125 | unsigned char d_iname[DNAME_INLINE_LEN]; /* small names */ | ||
126 | |||
127 | /* Ref lookup also touches following */ | ||
128 | unsigned int d_count; /* protected by d_lock */ | ||
129 | spinlock_t d_lock; /* per dentry lock */ | ||
130 | const struct dentry_operations *d_op; | ||
131 | struct super_block *d_sb; /* The root of the dentry tree */ | ||
132 | unsigned long d_time; /* used by d_revalidate */ | ||
133 | void *d_fsdata; /* fs-specific data */ | ||
103 | 134 | ||
104 | struct list_head d_lru; /* LRU list */ | 135 | struct list_head d_lru; /* LRU list */ |
105 | /* | 136 | /* |
@@ -111,12 +142,6 @@ struct dentry { | |||
111 | } d_u; | 142 | } d_u; |
112 | struct list_head d_subdirs; /* our children */ | 143 | struct list_head d_subdirs; /* our children */ |
113 | struct list_head d_alias; /* inode alias list */ | 144 | struct list_head d_alias; /* inode alias list */ |
114 | unsigned long d_time; /* used by d_revalidate */ | ||
115 | const struct dentry_operations *d_op; | ||
116 | struct super_block *d_sb; /* The root of the dentry tree */ | ||
117 | void *d_fsdata; /* fs-specific data */ | ||
118 | |||
119 | unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */ | ||
120 | }; | 145 | }; |
121 | 146 | ||
122 | /* | 147 | /* |
@@ -133,96 +158,61 @@ enum dentry_d_lock_class | |||
133 | 158 | ||
134 | struct dentry_operations { | 159 | struct dentry_operations { |
135 | int (*d_revalidate)(struct dentry *, struct nameidata *); | 160 | int (*d_revalidate)(struct dentry *, struct nameidata *); |
136 | int (*d_hash) (struct dentry *, struct qstr *); | 161 | int (*d_hash)(const struct dentry *, const struct inode *, |
137 | int (*d_compare) (struct dentry *, struct qstr *, struct qstr *); | 162 | struct qstr *); |
138 | int (*d_delete)(struct dentry *); | 163 | int (*d_compare)(const struct dentry *, const struct inode *, |
164 | const struct dentry *, const struct inode *, | ||
165 | unsigned int, const char *, const struct qstr *); | ||
166 | int (*d_delete)(const struct dentry *); | ||
139 | void (*d_release)(struct dentry *); | 167 | void (*d_release)(struct dentry *); |
140 | void (*d_iput)(struct dentry *, struct inode *); | 168 | void (*d_iput)(struct dentry *, struct inode *); |
141 | char *(*d_dname)(struct dentry *, char *, int); | 169 | char *(*d_dname)(struct dentry *, char *, int); |
142 | }; | 170 | } ____cacheline_aligned; |
143 | |||
144 | /* the dentry parameter passed to d_hash and d_compare is the parent | ||
145 | * directory of the entries to be compared. It is used in case these | ||
146 | * functions need any directory specific information for determining | ||
147 | * equivalency classes. Using the dentry itself might not work, as it | ||
148 | * might be a negative dentry which has no information associated with | ||
149 | * it */ | ||
150 | 171 | ||
151 | /* | 172 | /* |
152 | locking rules: | 173 | * Locking rules for dentry_operations callbacks are to be found in |
153 | big lock dcache_lock d_lock may block | 174 | * Documentation/filesystems/Locking. Keep it updated! |
154 | d_revalidate: no no no yes | 175 | * |
155 | d_hash no no no yes | 176 | * FUrther descriptions are found in Documentation/filesystems/vfs.txt. |
156 | d_compare: no yes yes no | 177 | * Keep it updated too! |
157 | d_delete: no yes no no | ||
158 | d_release: no no no yes | ||
159 | d_iput: no no no yes | ||
160 | */ | 178 | */ |
161 | 179 | ||
162 | /* d_flags entries */ | 180 | /* d_flags entries */ |
163 | #define DCACHE_AUTOFS_PENDING 0x0001 /* autofs: "under construction" */ | 181 | #define DCACHE_AUTOFS_PENDING 0x0001 /* autofs: "under construction" */ |
164 | #define DCACHE_NFSFS_RENAMED 0x0002 /* this dentry has been "silly | 182 | #define DCACHE_NFSFS_RENAMED 0x0002 |
165 | * renamed" and has to be | 183 | /* this dentry has been "silly renamed" and has to be deleted on the last |
166 | * deleted on the last dput() | 184 | * dput() */ |
167 | */ | 185 | |
168 | #define DCACHE_DISCONNECTED 0x0004 | 186 | #define DCACHE_DISCONNECTED 0x0004 |
169 | /* This dentry is possibly not currently connected to the dcache tree, | 187 | /* This dentry is possibly not currently connected to the dcache tree, in |
170 | * in which case its parent will either be itself, or will have this | 188 | * which case its parent will either be itself, or will have this flag as |
171 | * flag as well. nfsd will not use a dentry with this bit set, but will | 189 | * well. nfsd will not use a dentry with this bit set, but will first |
172 | * first endeavour to clear the bit either by discovering that it is | 190 | * endeavour to clear the bit either by discovering that it is connected, |
173 | * connected, or by performing lookup operations. Any filesystem which | 191 | * or by performing lookup operations. Any filesystem which supports |
174 | * supports nfsd_operations MUST have a lookup function which, if it finds | 192 | * nfsd_operations MUST have a lookup function which, if it finds a |
175 | * a directory inode with a DCACHE_DISCONNECTED dentry, will d_move | 193 | * directory inode with a DCACHE_DISCONNECTED dentry, will d_move that |
176 | * that dentry into place and return that dentry rather than the passed one, | 194 | * dentry into place and return that dentry rather than the passed one, |
177 | * typically using d_splice_alias. | 195 | * typically using d_splice_alias. */ |
178 | */ | ||
179 | 196 | ||
180 | #define DCACHE_REFERENCED 0x0008 /* Recently used, don't discard. */ | 197 | #define DCACHE_REFERENCED 0x0008 /* Recently used, don't discard. */ |
181 | #define DCACHE_UNHASHED 0x0010 | 198 | #define DCACHE_UNHASHED 0x0010 |
182 | 199 | #define DCACHE_INOTIFY_PARENT_WATCHED 0x0020 | |
183 | #define DCACHE_INOTIFY_PARENT_WATCHED 0x0020 /* Parent inode is watched by inotify */ | 200 | /* Parent inode is watched by inotify */ |
184 | 201 | ||
185 | #define DCACHE_COOKIE 0x0040 /* For use by dcookie subsystem */ | 202 | #define DCACHE_COOKIE 0x0040 /* For use by dcookie subsystem */ |
186 | 203 | #define DCACHE_FSNOTIFY_PARENT_WATCHED 0x0080 | |
187 | #define DCACHE_FSNOTIFY_PARENT_WATCHED 0x0080 /* Parent inode is watched by some fsnotify listener */ | 204 | /* Parent inode is watched by some fsnotify listener */ |
188 | 205 | ||
189 | #define DCACHE_CANT_MOUNT 0x0100 | 206 | #define DCACHE_CANT_MOUNT 0x0100 |
207 | #define DCACHE_GENOCIDE 0x0200 | ||
208 | #define DCACHE_MOUNTED 0x0400 /* is a mountpoint */ | ||
190 | 209 | ||
191 | extern spinlock_t dcache_lock; | 210 | #define DCACHE_OP_HASH 0x1000 |
192 | extern seqlock_t rename_lock; | 211 | #define DCACHE_OP_COMPARE 0x2000 |
193 | 212 | #define DCACHE_OP_REVALIDATE 0x4000 | |
194 | /** | 213 | #define DCACHE_OP_DELETE 0x8000 |
195 | * d_drop - drop a dentry | ||
196 | * @dentry: dentry to drop | ||
197 | * | ||
198 | * d_drop() unhashes the entry from the parent dentry hashes, so that it won't | ||
199 | * be found through a VFS lookup any more. Note that this is different from | ||
200 | * deleting the dentry - d_delete will try to mark the dentry negative if | ||
201 | * possible, giving a successful _negative_ lookup, while d_drop will | ||
202 | * just make the cache lookup fail. | ||
203 | * | ||
204 | * d_drop() is used mainly for stuff that wants to invalidate a dentry for some | ||
205 | * reason (NFS timeouts or autofs deletes). | ||
206 | * | ||
207 | * __d_drop requires dentry->d_lock. | ||
208 | */ | ||
209 | |||
210 | static inline void __d_drop(struct dentry *dentry) | ||
211 | { | ||
212 | if (!(dentry->d_flags & DCACHE_UNHASHED)) { | ||
213 | dentry->d_flags |= DCACHE_UNHASHED; | ||
214 | hlist_del_rcu(&dentry->d_hash); | ||
215 | } | ||
216 | } | ||
217 | 214 | ||
218 | static inline void d_drop(struct dentry *dentry) | 215 | extern seqlock_t rename_lock; |
219 | { | ||
220 | spin_lock(&dcache_lock); | ||
221 | spin_lock(&dentry->d_lock); | ||
222 | __d_drop(dentry); | ||
223 | spin_unlock(&dentry->d_lock); | ||
224 | spin_unlock(&dcache_lock); | ||
225 | } | ||
226 | 216 | ||
227 | static inline int dname_external(struct dentry *dentry) | 217 | static inline int dname_external(struct dentry *dentry) |
228 | { | 218 | { |
@@ -235,10 +225,14 @@ static inline int dname_external(struct dentry *dentry) | |||
235 | extern void d_instantiate(struct dentry *, struct inode *); | 225 | extern void d_instantiate(struct dentry *, struct inode *); |
236 | extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *); | 226 | extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *); |
237 | extern struct dentry * d_materialise_unique(struct dentry *, struct inode *); | 227 | extern struct dentry * d_materialise_unique(struct dentry *, struct inode *); |
228 | extern void __d_drop(struct dentry *dentry); | ||
229 | extern void d_drop(struct dentry *dentry); | ||
238 | extern void d_delete(struct dentry *); | 230 | extern void d_delete(struct dentry *); |
231 | extern void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op); | ||
239 | 232 | ||
240 | /* allocate/de-allocate */ | 233 | /* allocate/de-allocate */ |
241 | extern struct dentry * d_alloc(struct dentry *, const struct qstr *); | 234 | extern struct dentry * d_alloc(struct dentry *, const struct qstr *); |
235 | extern struct dentry * d_alloc_pseudo(struct super_block *, const struct qstr *); | ||
242 | extern struct dentry * d_splice_alias(struct inode *, struct dentry *); | 236 | extern struct dentry * d_splice_alias(struct inode *, struct dentry *); |
243 | extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *); | 237 | extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *); |
244 | extern struct dentry * d_obtain_alias(struct inode *); | 238 | extern struct dentry * d_obtain_alias(struct inode *); |
@@ -296,14 +290,40 @@ static inline struct dentry *d_add_unique(struct dentry *entry, struct inode *in | |||
296 | return res; | 290 | return res; |
297 | } | 291 | } |
298 | 292 | ||
293 | extern void dentry_update_name_case(struct dentry *, struct qstr *); | ||
294 | |||
299 | /* used for rename() and baskets */ | 295 | /* used for rename() and baskets */ |
300 | extern void d_move(struct dentry *, struct dentry *); | 296 | extern void d_move(struct dentry *, struct dentry *); |
301 | extern struct dentry *d_ancestor(struct dentry *, struct dentry *); | 297 | extern struct dentry *d_ancestor(struct dentry *, struct dentry *); |
302 | 298 | ||
303 | /* appendix may either be NULL or be used for transname suffixes */ | 299 | /* appendix may either be NULL or be used for transname suffixes */ |
304 | extern struct dentry * d_lookup(struct dentry *, struct qstr *); | 300 | extern struct dentry *d_lookup(struct dentry *, struct qstr *); |
305 | extern struct dentry * __d_lookup(struct dentry *, struct qstr *); | 301 | extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *); |
306 | extern struct dentry * d_hash_and_lookup(struct dentry *, struct qstr *); | 302 | extern struct dentry *__d_lookup(struct dentry *, struct qstr *); |
303 | extern struct dentry *__d_lookup_rcu(struct dentry *parent, struct qstr *name, | ||
304 | unsigned *seq, struct inode **inode); | ||
305 | |||
306 | /** | ||
307 | * __d_rcu_to_refcount - take a refcount on dentry if sequence check is ok | ||
308 | * @dentry: dentry to take a ref on | ||
309 | * @seq: seqcount to verify against | ||
310 | * Returns: 0 on failure, else 1. | ||
311 | * | ||
312 | * __d_rcu_to_refcount operates on a dentry,seq pair that was returned | ||
313 | * by __d_lookup_rcu, to get a reference on an rcu-walk dentry. | ||
314 | */ | ||
315 | static inline int __d_rcu_to_refcount(struct dentry *dentry, unsigned seq) | ||
316 | { | ||
317 | int ret = 0; | ||
318 | |||
319 | assert_spin_locked(&dentry->d_lock); | ||
320 | if (!read_seqcount_retry(&dentry->d_seq, seq)) { | ||
321 | ret = 1; | ||
322 | dentry->d_count++; | ||
323 | } | ||
324 | |||
325 | return ret; | ||
326 | } | ||
307 | 327 | ||
308 | /* validate "insecure" dentry pointer */ | 328 | /* validate "insecure" dentry pointer */ |
309 | extern int d_validate(struct dentry *, struct dentry *); | 329 | extern int d_validate(struct dentry *, struct dentry *); |
@@ -316,34 +336,37 @@ extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); | |||
316 | extern char *__d_path(const struct path *path, struct path *root, char *, int); | 336 | extern char *__d_path(const struct path *path, struct path *root, char *, int); |
317 | extern char *d_path(const struct path *, char *, int); | 337 | extern char *d_path(const struct path *, char *, int); |
318 | extern char *d_path_with_unreachable(const struct path *, char *, int); | 338 | extern char *d_path_with_unreachable(const struct path *, char *, int); |
319 | extern char *__dentry_path(struct dentry *, char *, int); | 339 | extern char *dentry_path_raw(struct dentry *, char *, int); |
320 | extern char *dentry_path(struct dentry *, char *, int); | 340 | extern char *dentry_path(struct dentry *, char *, int); |
321 | 341 | ||
322 | /* Allocation counts.. */ | 342 | /* Allocation counts.. */ |
323 | 343 | ||
324 | /** | 344 | /** |
325 | * dget, dget_locked - get a reference to a dentry | 345 | * dget, dget_dlock - get a reference to a dentry |
326 | * @dentry: dentry to get a reference to | 346 | * @dentry: dentry to get a reference to |
327 | * | 347 | * |
328 | * Given a dentry or %NULL pointer increment the reference count | 348 | * Given a dentry or %NULL pointer increment the reference count |
329 | * if appropriate and return the dentry. A dentry will not be | 349 | * if appropriate and return the dentry. A dentry will not be |
330 | * destroyed when it has references. dget() should never be | 350 | * destroyed when it has references. |
331 | * called for dentries with zero reference counter. For these cases | ||
332 | * (preferably none, functions in dcache.c are sufficient for normal | ||
333 | * needs and they take necessary precautions) you should hold dcache_lock | ||
334 | * and call dget_locked() instead of dget(). | ||
335 | */ | 351 | */ |
336 | 352 | static inline struct dentry *dget_dlock(struct dentry *dentry) | |
353 | { | ||
354 | if (dentry) | ||
355 | dentry->d_count++; | ||
356 | return dentry; | ||
357 | } | ||
358 | |||
337 | static inline struct dentry *dget(struct dentry *dentry) | 359 | static inline struct dentry *dget(struct dentry *dentry) |
338 | { | 360 | { |
339 | if (dentry) { | 361 | if (dentry) { |
340 | BUG_ON(!atomic_read(&dentry->d_count)); | 362 | spin_lock(&dentry->d_lock); |
341 | atomic_inc(&dentry->d_count); | 363 | dget_dlock(dentry); |
364 | spin_unlock(&dentry->d_lock); | ||
342 | } | 365 | } |
343 | return dentry; | 366 | return dentry; |
344 | } | 367 | } |
345 | 368 | ||
346 | extern struct dentry * dget_locked(struct dentry *); | 369 | extern struct dentry *dget_parent(struct dentry *dentry); |
347 | 370 | ||
348 | /** | 371 | /** |
349 | * d_unhashed - is dentry hashed | 372 | * d_unhashed - is dentry hashed |
@@ -374,21 +397,11 @@ static inline void dont_mount(struct dentry *dentry) | |||
374 | spin_unlock(&dentry->d_lock); | 397 | spin_unlock(&dentry->d_lock); |
375 | } | 398 | } |
376 | 399 | ||
377 | static inline struct dentry *dget_parent(struct dentry *dentry) | ||
378 | { | ||
379 | struct dentry *ret; | ||
380 | |||
381 | spin_lock(&dentry->d_lock); | ||
382 | ret = dget(dentry->d_parent); | ||
383 | spin_unlock(&dentry->d_lock); | ||
384 | return ret; | ||
385 | } | ||
386 | |||
387 | extern void dput(struct dentry *); | 400 | extern void dput(struct dentry *); |
388 | 401 | ||
389 | static inline int d_mountpoint(struct dentry *dentry) | 402 | static inline int d_mountpoint(struct dentry *dentry) |
390 | { | 403 | { |
391 | return dentry->d_mounted; | 404 | return dentry->d_flags & DCACHE_MOUNTED; |
392 | } | 405 | } |
393 | 406 | ||
394 | extern struct vfsmount *lookup_mnt(struct path *); | 407 | extern struct vfsmount *lookup_mnt(struct path *); |
diff --git a/include/linux/dcbnl.h b/include/linux/dcbnl.h index 8723491f7dfd..68cd248f6d3e 100644 --- a/include/linux/dcbnl.h +++ b/include/linux/dcbnl.h | |||
@@ -22,6 +22,89 @@ | |||
22 | 22 | ||
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | 24 | ||
25 | /* IEEE 802.1Qaz std supported values */ | ||
26 | #define IEEE_8021QAZ_MAX_TCS 8 | ||
27 | |||
28 | /* This structure contains the IEEE 802.1Qaz ETS managed object | ||
29 | * | ||
30 | * @willing: willing bit in ETS configuratin TLV | ||
31 | * @ets_cap: indicates supported capacity of ets feature | ||
32 | * @cbs: credit based shaper ets algorithm supported | ||
33 | * @tc_tx_bw: tc tx bandwidth indexed by traffic class | ||
34 | * @tc_rx_bw: tc rx bandwidth indexed by traffic class | ||
35 | * @tc_tsa: TSA Assignment table, indexed by traffic class | ||
36 | * @prio_tc: priority assignment table mapping 8021Qp to traffic class | ||
37 | * @tc_reco_bw: recommended tc bandwidth indexed by traffic class for TLV | ||
38 | * @tc_reco_tsa: recommended tc bandwidth indexed by traffic class for TLV | ||
39 | * @reco_prio_tc: recommended tc tx bandwidth indexed by traffic class for TLV | ||
40 | * | ||
41 | * Recommended values are used to set fields in the ETS recommendation TLV | ||
42 | * with hardware offloaded LLDP. | ||
43 | * | ||
44 | * ---- | ||
45 | * TSA Assignment 8 bit identifiers | ||
46 | * 0 strict priority | ||
47 | * 1 credit-based shaper | ||
48 | * 2 enhanced transmission selection | ||
49 | * 3-254 reserved | ||
50 | * 255 vendor specific | ||
51 | */ | ||
52 | struct ieee_ets { | ||
53 | __u8 willing; | ||
54 | __u8 ets_cap; | ||
55 | __u8 cbs; | ||
56 | __u8 tc_tx_bw[IEEE_8021QAZ_MAX_TCS]; | ||
57 | __u8 tc_rx_bw[IEEE_8021QAZ_MAX_TCS]; | ||
58 | __u8 tc_tsa[IEEE_8021QAZ_MAX_TCS]; | ||
59 | __u8 prio_tc[IEEE_8021QAZ_MAX_TCS]; | ||
60 | __u8 tc_reco_bw[IEEE_8021QAZ_MAX_TCS]; | ||
61 | __u8 tc_reco_tsa[IEEE_8021QAZ_MAX_TCS]; | ||
62 | __u8 reco_prio_tc[IEEE_8021QAZ_MAX_TCS]; | ||
63 | }; | ||
64 | |||
65 | /* This structure contains the IEEE 802.1Qaz PFC managed object | ||
66 | * | ||
67 | * @pfc_cap: Indicates the number of traffic classes on the local device | ||
68 | * that may simultaneously have PFC enabled. | ||
69 | * @pfc_en: bitmap indicating pfc enabled traffic classes | ||
70 | * @mbc: enable macsec bypass capability | ||
71 | * @delay: the allowance made for a round-trip propagation delay of the | ||
72 | * link in bits. | ||
73 | * @requests: count of the sent pfc frames | ||
74 | * @indications: count of the received pfc frames | ||
75 | */ | ||
76 | struct ieee_pfc { | ||
77 | __u8 pfc_cap; | ||
78 | __u8 pfc_en; | ||
79 | __u8 mbc; | ||
80 | __u16 delay; | ||
81 | __u64 requests[IEEE_8021QAZ_MAX_TCS]; | ||
82 | __u64 indications[IEEE_8021QAZ_MAX_TCS]; | ||
83 | }; | ||
84 | |||
85 | /* This structure contains the IEEE 802.1Qaz APP managed object. This | ||
86 | * object is also used for the CEE std as well. There is no difference | ||
87 | * between the objects. | ||
88 | * | ||
89 | * @selector: protocol identifier type | ||
90 | * @protocol: protocol of type indicated | ||
91 | * @priority: 3-bit unsigned integer indicating priority | ||
92 | * | ||
93 | * ---- | ||
94 | * Selector field values | ||
95 | * 0 Reserved | ||
96 | * 1 Ethertype | ||
97 | * 2 Well known port number over TCP or SCTP | ||
98 | * 3 Well known port number over UDP or DCCP | ||
99 | * 4 Well known port number over TCP, SCTP, UDP, or DCCP | ||
100 | * 5-7 Reserved | ||
101 | */ | ||
102 | struct dcb_app { | ||
103 | __u8 selector; | ||
104 | __u32 protocol; | ||
105 | __u8 priority; | ||
106 | }; | ||
107 | |||
25 | struct dcbmsg { | 108 | struct dcbmsg { |
26 | __u8 dcb_family; | 109 | __u8 dcb_family; |
27 | __u8 cmd; | 110 | __u8 cmd; |
@@ -50,6 +133,12 @@ struct dcbmsg { | |||
50 | * @DCB_CMD_SBCN: get backward congestion notification configration. | 133 | * @DCB_CMD_SBCN: get backward congestion notification configration. |
51 | * @DCB_CMD_GAPP: get application protocol configuration | 134 | * @DCB_CMD_GAPP: get application protocol configuration |
52 | * @DCB_CMD_SAPP: set application protocol configuration | 135 | * @DCB_CMD_SAPP: set application protocol configuration |
136 | * @DCB_CMD_IEEE_SET: set IEEE 802.1Qaz configuration | ||
137 | * @DCB_CMD_IEEE_GET: get IEEE 802.1Qaz configuration | ||
138 | * @DCB_CMD_GDCBX: get DCBX engine configuration | ||
139 | * @DCB_CMD_SDCBX: set DCBX engine configuration | ||
140 | * @DCB_CMD_GFEATCFG: get DCBX features flags | ||
141 | * @DCB_CMD_SFEATCFG: set DCBX features negotiation flags | ||
53 | */ | 142 | */ |
54 | enum dcbnl_commands { | 143 | enum dcbnl_commands { |
55 | DCB_CMD_UNDEFINED, | 144 | DCB_CMD_UNDEFINED, |
@@ -83,6 +172,15 @@ enum dcbnl_commands { | |||
83 | DCB_CMD_GAPP, | 172 | DCB_CMD_GAPP, |
84 | DCB_CMD_SAPP, | 173 | DCB_CMD_SAPP, |
85 | 174 | ||
175 | DCB_CMD_IEEE_SET, | ||
176 | DCB_CMD_IEEE_GET, | ||
177 | |||
178 | DCB_CMD_GDCBX, | ||
179 | DCB_CMD_SDCBX, | ||
180 | |||
181 | DCB_CMD_GFEATCFG, | ||
182 | DCB_CMD_SFEATCFG, | ||
183 | |||
86 | __DCB_CMD_ENUM_MAX, | 184 | __DCB_CMD_ENUM_MAX, |
87 | DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1, | 185 | DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1, |
88 | }; | 186 | }; |
@@ -102,6 +200,9 @@ enum dcbnl_commands { | |||
102 | * @DCB_ATTR_CAP: DCB capabilities of the device (NLA_NESTED) | 200 | * @DCB_ATTR_CAP: DCB capabilities of the device (NLA_NESTED) |
103 | * @DCB_ATTR_NUMTCS: number of traffic classes supported (NLA_NESTED) | 201 | * @DCB_ATTR_NUMTCS: number of traffic classes supported (NLA_NESTED) |
104 | * @DCB_ATTR_BCN: backward congestion notification configuration (NLA_NESTED) | 202 | * @DCB_ATTR_BCN: backward congestion notification configuration (NLA_NESTED) |
203 | * @DCB_ATTR_IEEE: IEEE 802.1Qaz supported attributes (NLA_NESTED) | ||
204 | * @DCB_ATTR_DCBX: DCBX engine configuration in the device (NLA_U8) | ||
205 | * @DCB_ATTR_FEATCFG: DCBX features flags (NLA_NESTED) | ||
105 | */ | 206 | */ |
106 | enum dcbnl_attrs { | 207 | enum dcbnl_attrs { |
107 | DCB_ATTR_UNDEFINED, | 208 | DCB_ATTR_UNDEFINED, |
@@ -119,10 +220,32 @@ enum dcbnl_attrs { | |||
119 | DCB_ATTR_BCN, | 220 | DCB_ATTR_BCN, |
120 | DCB_ATTR_APP, | 221 | DCB_ATTR_APP, |
121 | 222 | ||
223 | /* IEEE std attributes */ | ||
224 | DCB_ATTR_IEEE, | ||
225 | |||
226 | DCB_ATTR_DCBX, | ||
227 | DCB_ATTR_FEATCFG, | ||
228 | |||
122 | __DCB_ATTR_ENUM_MAX, | 229 | __DCB_ATTR_ENUM_MAX, |
123 | DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1, | 230 | DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1, |
124 | }; | 231 | }; |
125 | 232 | ||
233 | enum ieee_attrs { | ||
234 | DCB_ATTR_IEEE_UNSPEC, | ||
235 | DCB_ATTR_IEEE_ETS, | ||
236 | DCB_ATTR_IEEE_PFC, | ||
237 | DCB_ATTR_IEEE_APP_TABLE, | ||
238 | __DCB_ATTR_IEEE_MAX | ||
239 | }; | ||
240 | #define DCB_ATTR_IEEE_MAX (__DCB_ATTR_IEEE_MAX - 1) | ||
241 | |||
242 | enum ieee_attrs_app { | ||
243 | DCB_ATTR_IEEE_APP_UNSPEC, | ||
244 | DCB_ATTR_IEEE_APP, | ||
245 | __DCB_ATTR_IEEE_APP_MAX | ||
246 | }; | ||
247 | #define DCB_ATTR_IEEE_APP_MAX (__DCB_ATTR_IEEE_APP_MAX - 1) | ||
248 | |||
126 | /** | 249 | /** |
127 | * enum dcbnl_pfc_attrs - DCB Priority Flow Control user priority nested attrs | 250 | * enum dcbnl_pfc_attrs - DCB Priority Flow Control user priority nested attrs |
128 | * | 251 | * |
@@ -262,6 +385,8 @@ enum dcbnl_tc_attrs { | |||
262 | * @DCB_CAP_ATTR_GSP: (NLA_U8) device supports group strict priority | 385 | * @DCB_CAP_ATTR_GSP: (NLA_U8) device supports group strict priority |
263 | * @DCB_CAP_ATTR_BCN: (NLA_U8) device supports Backwards Congestion | 386 | * @DCB_CAP_ATTR_BCN: (NLA_U8) device supports Backwards Congestion |
264 | * Notification | 387 | * Notification |
388 | * @DCB_CAP_ATTR_DCBX: (NLA_U8) device supports DCBX engine | ||
389 | * | ||
265 | */ | 390 | */ |
266 | enum dcbnl_cap_attrs { | 391 | enum dcbnl_cap_attrs { |
267 | DCB_CAP_ATTR_UNDEFINED, | 392 | DCB_CAP_ATTR_UNDEFINED, |
@@ -273,12 +398,45 @@ enum dcbnl_cap_attrs { | |||
273 | DCB_CAP_ATTR_PFC_TCS, | 398 | DCB_CAP_ATTR_PFC_TCS, |
274 | DCB_CAP_ATTR_GSP, | 399 | DCB_CAP_ATTR_GSP, |
275 | DCB_CAP_ATTR_BCN, | 400 | DCB_CAP_ATTR_BCN, |
401 | DCB_CAP_ATTR_DCBX, | ||
276 | 402 | ||
277 | __DCB_CAP_ATTR_ENUM_MAX, | 403 | __DCB_CAP_ATTR_ENUM_MAX, |
278 | DCB_CAP_ATTR_MAX = __DCB_CAP_ATTR_ENUM_MAX - 1, | 404 | DCB_CAP_ATTR_MAX = __DCB_CAP_ATTR_ENUM_MAX - 1, |
279 | }; | 405 | }; |
280 | 406 | ||
281 | /** | 407 | /** |
408 | * DCBX capability flags | ||
409 | * | ||
410 | * @DCB_CAP_DCBX_HOST: DCBX negotiation is performed by the host LLDP agent. | ||
411 | * 'set' routines are used to configure the device with | ||
412 | * the negotiated parameters | ||
413 | * | ||
414 | * @DCB_CAP_DCBX_LLD_MANAGED: DCBX negotiation is not performed in the host but | ||
415 | * by another entity | ||
416 | * 'get' routines are used to retrieve the | ||
417 | * negotiated parameters | ||
418 | * 'set' routines can be used to set the initial | ||
419 | * negotiation configuration | ||
420 | * | ||
421 | * @DCB_CAP_DCBX_VER_CEE: for a non-host DCBX engine, indicates the engine | ||
422 | * supports the CEE protocol flavor | ||
423 | * | ||
424 | * @DCB_CAP_DCBX_VER_IEEE: for a non-host DCBX engine, indicates the engine | ||
425 | * supports the IEEE protocol flavor | ||
426 | * | ||
427 | * @DCB_CAP_DCBX_STATIC: for a non-host DCBX engine, indicates the engine | ||
428 | * supports static configuration (i.e no actual | ||
429 | * negotiation is performed negotiated parameters equal | ||
430 | * the initial configuration) | ||
431 | * | ||
432 | */ | ||
433 | #define DCB_CAP_DCBX_HOST 0x01 | ||
434 | #define DCB_CAP_DCBX_LLD_MANAGED 0x02 | ||
435 | #define DCB_CAP_DCBX_VER_CEE 0x04 | ||
436 | #define DCB_CAP_DCBX_VER_IEEE 0x08 | ||
437 | #define DCB_CAP_DCBX_STATIC 0x10 | ||
438 | |||
439 | /** | ||
282 | * enum dcbnl_numtcs_attrs - number of traffic classes | 440 | * enum dcbnl_numtcs_attrs - number of traffic classes |
283 | * | 441 | * |
284 | * @DCB_NUMTCS_ATTR_UNDEFINED: unspecified attribute to catch errors | 442 | * @DCB_NUMTCS_ATTR_UNDEFINED: unspecified attribute to catch errors |
@@ -355,4 +513,30 @@ enum dcbnl_app_attrs { | |||
355 | DCB_APP_ATTR_MAX = __DCB_APP_ATTR_ENUM_MAX - 1, | 513 | DCB_APP_ATTR_MAX = __DCB_APP_ATTR_ENUM_MAX - 1, |
356 | }; | 514 | }; |
357 | 515 | ||
516 | /** | ||
517 | * enum dcbnl_featcfg_attrs - features conifiguration flags | ||
518 | * | ||
519 | * @DCB_FEATCFG_ATTR_UNDEFINED: unspecified attribute to catch errors | ||
520 | * @DCB_FEATCFG_ATTR_ALL: (NLA_FLAG) all features configuration attributes | ||
521 | * @DCB_FEATCFG_ATTR_PG: (NLA_U8) configuration flags for priority groups | ||
522 | * @DCB_FEATCFG_ATTR_PFC: (NLA_U8) configuration flags for priority | ||
523 | * flow control | ||
524 | * @DCB_FEATCFG_ATTR_APP: (NLA_U8) configuration flags for application TLV | ||
525 | * | ||
526 | */ | ||
527 | #define DCB_FEATCFG_ERROR 0x01 /* error in feature resolution */ | ||
528 | #define DCB_FEATCFG_ENABLE 0x02 /* enable feature */ | ||
529 | #define DCB_FEATCFG_WILLING 0x04 /* feature is willing */ | ||
530 | #define DCB_FEATCFG_ADVERTISE 0x08 /* advertise feature */ | ||
531 | enum dcbnl_featcfg_attrs { | ||
532 | DCB_FEATCFG_ATTR_UNDEFINED, | ||
533 | DCB_FEATCFG_ATTR_ALL, | ||
534 | DCB_FEATCFG_ATTR_PG, | ||
535 | DCB_FEATCFG_ATTR_PFC, | ||
536 | DCB_FEATCFG_ATTR_APP, | ||
537 | |||
538 | __DCB_FEATCFG_ATTR_ENUM_MAX, | ||
539 | DCB_FEATCFG_ATTR_MAX = __DCB_FEATCFG_ATTR_ENUM_MAX - 1, | ||
540 | }; | ||
541 | |||
358 | #endif /* __LINUX_DCBNL_H__ */ | 542 | #endif /* __LINUX_DCBNL_H__ */ |
diff --git a/include/linux/dccp.h b/include/linux/dccp.h index 749f01ccd26e..010e2d87ed75 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h | |||
@@ -197,6 +197,21 @@ enum dccp_feature_numbers { | |||
197 | DCCPF_MAX_CCID_SPECIFIC = 255, | 197 | DCCPF_MAX_CCID_SPECIFIC = 255, |
198 | }; | 198 | }; |
199 | 199 | ||
200 | /* DCCP socket control message types for cmsg */ | ||
201 | enum dccp_cmsg_type { | ||
202 | DCCP_SCM_PRIORITY = 1, | ||
203 | DCCP_SCM_QPOLICY_MAX = 0xFFFF, | ||
204 | /* ^-- Up to here reserved exclusively for qpolicy parameters */ | ||
205 | DCCP_SCM_MAX | ||
206 | }; | ||
207 | |||
208 | /* DCCP priorities for outgoing/queued packets */ | ||
209 | enum dccp_packet_dequeueing_policy { | ||
210 | DCCPQ_POLICY_SIMPLE, | ||
211 | DCCPQ_POLICY_PRIO, | ||
212 | DCCPQ_POLICY_MAX | ||
213 | }; | ||
214 | |||
200 | /* DCCP socket options */ | 215 | /* DCCP socket options */ |
201 | #define DCCP_SOCKOPT_PACKET_SIZE 1 /* XXX deprecated, without effect */ | 216 | #define DCCP_SOCKOPT_PACKET_SIZE 1 /* XXX deprecated, without effect */ |
202 | #define DCCP_SOCKOPT_SERVICE 2 | 217 | #define DCCP_SOCKOPT_SERVICE 2 |
@@ -210,6 +225,8 @@ enum dccp_feature_numbers { | |||
210 | #define DCCP_SOCKOPT_CCID 13 | 225 | #define DCCP_SOCKOPT_CCID 13 |
211 | #define DCCP_SOCKOPT_TX_CCID 14 | 226 | #define DCCP_SOCKOPT_TX_CCID 14 |
212 | #define DCCP_SOCKOPT_RX_CCID 15 | 227 | #define DCCP_SOCKOPT_RX_CCID 15 |
228 | #define DCCP_SOCKOPT_QPOLICY_ID 16 | ||
229 | #define DCCP_SOCKOPT_QPOLICY_TXQLEN 17 | ||
213 | #define DCCP_SOCKOPT_CCID_RX_INFO 128 | 230 | #define DCCP_SOCKOPT_CCID_RX_INFO 128 |
214 | #define DCCP_SOCKOPT_CCID_TX_INFO 192 | 231 | #define DCCP_SOCKOPT_CCID_TX_INFO 192 |
215 | 232 | ||
@@ -458,10 +475,13 @@ struct dccp_ackvec; | |||
458 | * @dccps_hc_rx_ccid - CCID used for the receiver (or receiving half-connection) | 475 | * @dccps_hc_rx_ccid - CCID used for the receiver (or receiving half-connection) |
459 | * @dccps_hc_tx_ccid - CCID used for the sender (or sending half-connection) | 476 | * @dccps_hc_tx_ccid - CCID used for the sender (or sending half-connection) |
460 | * @dccps_options_received - parsed set of retrieved options | 477 | * @dccps_options_received - parsed set of retrieved options |
478 | * @dccps_qpolicy - TX dequeueing policy, one of %dccp_packet_dequeueing_policy | ||
479 | * @dccps_tx_qlen - maximum length of the TX queue | ||
461 | * @dccps_role - role of this sock, one of %dccp_role | 480 | * @dccps_role - role of this sock, one of %dccp_role |
462 | * @dccps_hc_rx_insert_options - receiver wants to add options when acking | 481 | * @dccps_hc_rx_insert_options - receiver wants to add options when acking |
463 | * @dccps_hc_tx_insert_options - sender wants to add options when sending | 482 | * @dccps_hc_tx_insert_options - sender wants to add options when sending |
464 | * @dccps_server_timewait - server holds timewait state on close (RFC 4340, 8.3) | 483 | * @dccps_server_timewait - server holds timewait state on close (RFC 4340, 8.3) |
484 | * @dccps_sync_scheduled - flag which signals "send out-of-band message soon" | ||
465 | * @dccps_xmitlet - tasklet scheduled by the TX CCID to dequeue data packets | 485 | * @dccps_xmitlet - tasklet scheduled by the TX CCID to dequeue data packets |
466 | * @dccps_xmit_timer - used by the TX CCID to delay sending (rate-based pacing) | 486 | * @dccps_xmit_timer - used by the TX CCID to delay sending (rate-based pacing) |
467 | * @dccps_syn_rtt - RTT sample from Request/Response exchange (in usecs) | 487 | * @dccps_syn_rtt - RTT sample from Request/Response exchange (in usecs) |
@@ -499,10 +519,13 @@ struct dccp_sock { | |||
499 | struct ccid *dccps_hc_rx_ccid; | 519 | struct ccid *dccps_hc_rx_ccid; |
500 | struct ccid *dccps_hc_tx_ccid; | 520 | struct ccid *dccps_hc_tx_ccid; |
501 | struct dccp_options_received dccps_options_received; | 521 | struct dccp_options_received dccps_options_received; |
522 | __u8 dccps_qpolicy; | ||
523 | __u32 dccps_tx_qlen; | ||
502 | enum dccp_role dccps_role:2; | 524 | enum dccp_role dccps_role:2; |
503 | __u8 dccps_hc_rx_insert_options:1; | 525 | __u8 dccps_hc_rx_insert_options:1; |
504 | __u8 dccps_hc_tx_insert_options:1; | 526 | __u8 dccps_hc_tx_insert_options:1; |
505 | __u8 dccps_server_timewait:1; | 527 | __u8 dccps_server_timewait:1; |
528 | __u8 dccps_sync_scheduled:1; | ||
506 | struct tasklet_struct dccps_xmitlet; | 529 | struct tasklet_struct dccps_xmitlet; |
507 | struct timer_list dccps_xmit_timer; | 530 | struct timer_list dccps_xmit_timer; |
508 | }; | 531 | }; |
diff --git a/include/linux/dcookies.h b/include/linux/dcookies.h index 24c806f12a6c..5ac3bdd5cee6 100644 --- a/include/linux/dcookies.h +++ b/include/linux/dcookies.h | |||
@@ -13,10 +13,10 @@ | |||
13 | #ifdef CONFIG_PROFILING | 13 | #ifdef CONFIG_PROFILING |
14 | 14 | ||
15 | #include <linux/dcache.h> | 15 | #include <linux/dcache.h> |
16 | #include <linux/path.h> | ||
17 | #include <linux/types.h> | 16 | #include <linux/types.h> |
18 | 17 | ||
19 | struct dcookie_user; | 18 | struct dcookie_user; |
19 | struct path; | ||
20 | 20 | ||
21 | /** | 21 | /** |
22 | * dcookie_register - register a user of dcookies | 22 | * dcookie_register - register a user of dcookies |
diff --git a/include/linux/device.h b/include/linux/device.h index dd4895313468..1bf5cf0b4513 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -30,9 +30,8 @@ struct device_private; | |||
30 | struct device_driver; | 30 | struct device_driver; |
31 | struct driver_private; | 31 | struct driver_private; |
32 | struct class; | 32 | struct class; |
33 | struct class_private; | 33 | struct subsys_private; |
34 | struct bus_type; | 34 | struct bus_type; |
35 | struct bus_type_private; | ||
36 | struct device_node; | 35 | struct device_node; |
37 | 36 | ||
38 | struct bus_attribute { | 37 | struct bus_attribute { |
@@ -65,7 +64,7 @@ struct bus_type { | |||
65 | 64 | ||
66 | const struct dev_pm_ops *pm; | 65 | const struct dev_pm_ops *pm; |
67 | 66 | ||
68 | struct bus_type_private *p; | 67 | struct subsys_private *p; |
69 | }; | 68 | }; |
70 | 69 | ||
71 | extern int __must_check bus_register(struct bus_type *bus); | 70 | extern int __must_check bus_register(struct bus_type *bus); |
@@ -197,6 +196,7 @@ struct class { | |||
197 | 196 | ||
198 | struct class_attribute *class_attrs; | 197 | struct class_attribute *class_attrs; |
199 | struct device_attribute *dev_attrs; | 198 | struct device_attribute *dev_attrs; |
199 | struct bin_attribute *dev_bin_attrs; | ||
200 | struct kobject *dev_kobj; | 200 | struct kobject *dev_kobj; |
201 | 201 | ||
202 | int (*dev_uevent)(struct device *dev, struct kobj_uevent_env *env); | 202 | int (*dev_uevent)(struct device *dev, struct kobj_uevent_env *env); |
@@ -213,7 +213,7 @@ struct class { | |||
213 | 213 | ||
214 | const struct dev_pm_ops *pm; | 214 | const struct dev_pm_ops *pm; |
215 | 215 | ||
216 | struct class_private *p; | 216 | struct subsys_private *p; |
217 | }; | 217 | }; |
218 | 218 | ||
219 | struct class_dev_iter { | 219 | struct class_dev_iter { |
@@ -508,13 +508,13 @@ static inline int device_is_registered(struct device *dev) | |||
508 | 508 | ||
509 | static inline void device_enable_async_suspend(struct device *dev) | 509 | static inline void device_enable_async_suspend(struct device *dev) |
510 | { | 510 | { |
511 | if (dev->power.status == DPM_ON) | 511 | if (!dev->power.in_suspend) |
512 | dev->power.async_suspend = true; | 512 | dev->power.async_suspend = true; |
513 | } | 513 | } |
514 | 514 | ||
515 | static inline void device_disable_async_suspend(struct device *dev) | 515 | static inline void device_disable_async_suspend(struct device *dev) |
516 | { | 516 | { |
517 | if (dev->power.status == DPM_ON) | 517 | if (!dev->power.in_suspend) |
518 | dev->power.async_suspend = false; | 518 | dev->power.async_suspend = false; |
519 | } | 519 | } |
520 | 520 | ||
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index a90b3892074a..1c70028f81f9 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h | |||
@@ -44,34 +44,24 @@ int ddebug_add_module(struct _ddebug *tab, unsigned int n, | |||
44 | extern int ddebug_remove_module(const char *mod_name); | 44 | extern int ddebug_remove_module(const char *mod_name); |
45 | 45 | ||
46 | #define dynamic_pr_debug(fmt, ...) do { \ | 46 | #define dynamic_pr_debug(fmt, ...) do { \ |
47 | __label__ do_printk; \ | ||
48 | __label__ out; \ | ||
49 | static struct _ddebug descriptor \ | 47 | static struct _ddebug descriptor \ |
50 | __used \ | 48 | __used \ |
51 | __attribute__((section("__verbose"), aligned(8))) = \ | 49 | __attribute__((section("__verbose"), aligned(8))) = \ |
52 | { KBUILD_MODNAME, __func__, __FILE__, fmt, __LINE__, \ | 50 | { KBUILD_MODNAME, __func__, __FILE__, fmt, __LINE__, \ |
53 | _DPRINTK_FLAGS_DEFAULT }; \ | 51 | _DPRINTK_FLAGS_DEFAULT }; \ |
54 | JUMP_LABEL(&descriptor.enabled, do_printk); \ | 52 | if (unlikely(descriptor.enabled)) \ |
55 | goto out; \ | 53 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); \ |
56 | do_printk: \ | ||
57 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); \ | ||
58 | out: ; \ | ||
59 | } while (0) | 54 | } while (0) |
60 | 55 | ||
61 | 56 | ||
62 | #define dynamic_dev_dbg(dev, fmt, ...) do { \ | 57 | #define dynamic_dev_dbg(dev, fmt, ...) do { \ |
63 | __label__ do_printk; \ | ||
64 | __label__ out; \ | ||
65 | static struct _ddebug descriptor \ | 58 | static struct _ddebug descriptor \ |
66 | __used \ | 59 | __used \ |
67 | __attribute__((section("__verbose"), aligned(8))) = \ | 60 | __attribute__((section("__verbose"), aligned(8))) = \ |
68 | { KBUILD_MODNAME, __func__, __FILE__, fmt, __LINE__, \ | 61 | { KBUILD_MODNAME, __func__, __FILE__, fmt, __LINE__, \ |
69 | _DPRINTK_FLAGS_DEFAULT }; \ | 62 | _DPRINTK_FLAGS_DEFAULT }; \ |
70 | JUMP_LABEL(&descriptor.enabled, do_printk); \ | 63 | if (unlikely(descriptor.enabled)) \ |
71 | goto out; \ | 64 | dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); \ |
72 | do_printk: \ | ||
73 | dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); \ | ||
74 | out: ; \ | ||
75 | } while (0) | 65 | } while (0) |
76 | 66 | ||
77 | #else | 67 | #else |
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 4fd978e7eb83..4d857973d2c9 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -195,15 +195,9 @@ enum { | |||
195 | /* | 195 | /* |
196 | * io context count accounting | 196 | * io context count accounting |
197 | */ | 197 | */ |
198 | #define elv_ioc_count_mod(name, __val) \ | 198 | #define elv_ioc_count_mod(name, __val) this_cpu_add(name, __val) |
199 | do { \ | 199 | #define elv_ioc_count_inc(name) this_cpu_inc(name) |
200 | preempt_disable(); \ | 200 | #define elv_ioc_count_dec(name) this_cpu_dec(name) |
201 | __get_cpu_var(name) += (__val); \ | ||
202 | preempt_enable(); \ | ||
203 | } while (0) | ||
204 | |||
205 | #define elv_ioc_count_inc(name) elv_ioc_count_mod(name, 1) | ||
206 | #define elv_ioc_count_dec(name) elv_ioc_count_mod(name, -1) | ||
207 | 201 | ||
208 | #define elv_ioc_count_read(name) \ | 202 | #define elv_ioc_count_read(name) \ |
209 | ({ \ | 203 | ({ \ |
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index f16a01081e15..bec8b82889bf 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
@@ -48,8 +48,10 @@ extern int eth_validate_addr(struct net_device *dev); | |||
48 | 48 | ||
49 | 49 | ||
50 | 50 | ||
51 | extern struct net_device *alloc_etherdev_mq(int sizeof_priv, unsigned int queue_count); | 51 | extern struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs, |
52 | unsigned int rxqs); | ||
52 | #define alloc_etherdev(sizeof_priv) alloc_etherdev_mq(sizeof_priv, 1) | 53 | #define alloc_etherdev(sizeof_priv) alloc_etherdev_mq(sizeof_priv, 1) |
54 | #define alloc_etherdev_mq(sizeof_priv, count) alloc_etherdev_mqs(sizeof_priv, count, count) | ||
53 | 55 | ||
54 | /** | 56 | /** |
55 | * is_zero_ether_addr - Determine if give Ethernet address is all zeros. | 57 | * is_zero_ether_addr - Determine if give Ethernet address is all zeros. |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index 6628a507fd3b..1908929204a9 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -691,7 +691,9 @@ struct ethtool_ops { | |||
691 | #define ETHTOOL_GMSGLVL 0x00000007 /* Get driver message level */ | 691 | #define ETHTOOL_GMSGLVL 0x00000007 /* Get driver message level */ |
692 | #define ETHTOOL_SMSGLVL 0x00000008 /* Set driver msg level. */ | 692 | #define ETHTOOL_SMSGLVL 0x00000008 /* Set driver msg level. */ |
693 | #define ETHTOOL_NWAY_RST 0x00000009 /* Restart autonegotiation. */ | 693 | #define ETHTOOL_NWAY_RST 0x00000009 /* Restart autonegotiation. */ |
694 | #define ETHTOOL_GLINK 0x0000000a /* Get link status (ethtool_value) */ | 694 | /* Get link status for host, i.e. whether the interface *and* the |
695 | * physical port (if there is one) are up (ethtool_value). */ | ||
696 | #define ETHTOOL_GLINK 0x0000000a | ||
695 | #define ETHTOOL_GEEPROM 0x0000000b /* Get EEPROM data */ | 697 | #define ETHTOOL_GEEPROM 0x0000000b /* Get EEPROM data */ |
696 | #define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data. */ | 698 | #define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data. */ |
697 | #define ETHTOOL_GCOALESCE 0x0000000e /* Get coalesce config */ | 699 | #define ETHTOOL_GCOALESCE 0x0000000e /* Get coalesce config */ |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 6ce1bca01724..65990ef612f5 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -724,21 +724,30 @@ struct ext3_dir_entry_2 { | |||
724 | ~EXT3_DIR_ROUND) | 724 | ~EXT3_DIR_ROUND) |
725 | #define EXT3_MAX_REC_LEN ((1<<16)-1) | 725 | #define EXT3_MAX_REC_LEN ((1<<16)-1) |
726 | 726 | ||
727 | /* | ||
728 | * Tests against MAX_REC_LEN etc were put in place for 64k block | ||
729 | * sizes; if that is not possible on this arch, we can skip | ||
730 | * those tests and speed things up. | ||
731 | */ | ||
727 | static inline unsigned ext3_rec_len_from_disk(__le16 dlen) | 732 | static inline unsigned ext3_rec_len_from_disk(__le16 dlen) |
728 | { | 733 | { |
729 | unsigned len = le16_to_cpu(dlen); | 734 | unsigned len = le16_to_cpu(dlen); |
730 | 735 | ||
736 | #if (PAGE_CACHE_SIZE >= 65536) | ||
731 | if (len == EXT3_MAX_REC_LEN) | 737 | if (len == EXT3_MAX_REC_LEN) |
732 | return 1 << 16; | 738 | return 1 << 16; |
739 | #endif | ||
733 | return len; | 740 | return len; |
734 | } | 741 | } |
735 | 742 | ||
736 | static inline __le16 ext3_rec_len_to_disk(unsigned len) | 743 | static inline __le16 ext3_rec_len_to_disk(unsigned len) |
737 | { | 744 | { |
745 | #if (PAGE_CACHE_SIZE >= 65536) | ||
738 | if (len == (1 << 16)) | 746 | if (len == (1 << 16)) |
739 | return cpu_to_le16(EXT3_MAX_REC_LEN); | 747 | return cpu_to_le16(EXT3_MAX_REC_LEN); |
740 | else if (len > (1 << 16)) | 748 | else if (len > (1 << 16)) |
741 | BUG(); | 749 | BUG(); |
750 | #endif | ||
742 | return cpu_to_le16(len); | 751 | return cpu_to_le16(len); |
743 | } | 752 | } |
744 | 753 | ||
@@ -856,6 +865,7 @@ extern struct ext3_group_desc * ext3_get_group_desc(struct super_block * sb, | |||
856 | extern int ext3_should_retry_alloc(struct super_block *sb, int *retries); | 865 | extern int ext3_should_retry_alloc(struct super_block *sb, int *retries); |
857 | extern void ext3_init_block_alloc_info(struct inode *); | 866 | extern void ext3_init_block_alloc_info(struct inode *); |
858 | extern void ext3_rsv_window_add(struct super_block *sb, struct ext3_reserve_window_node *rsv); | 867 | extern void ext3_rsv_window_add(struct super_block *sb, struct ext3_reserve_window_node *rsv); |
868 | extern int ext3_trim_fs(struct super_block *sb, struct fstrim_range *range); | ||
859 | 869 | ||
860 | /* dir.c */ | 870 | /* dir.c */ |
861 | extern int ext3_check_dir_entry(const char *, struct inode *, | 871 | extern int ext3_check_dir_entry(const char *, struct inode *, |
diff --git a/include/linux/fb.h b/include/linux/fb.h index d1631d37e9e0..68ba85a00c06 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -1092,6 +1092,8 @@ extern int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var); | |||
1092 | extern const unsigned char *fb_firmware_edid(struct device *device); | 1092 | extern const unsigned char *fb_firmware_edid(struct device *device); |
1093 | extern void fb_edid_to_monspecs(unsigned char *edid, | 1093 | extern void fb_edid_to_monspecs(unsigned char *edid, |
1094 | struct fb_monspecs *specs); | 1094 | struct fb_monspecs *specs); |
1095 | extern void fb_edid_add_monspecs(unsigned char *edid, | ||
1096 | struct fb_monspecs *specs); | ||
1095 | extern void fb_destroy_modedb(struct fb_videomode *modedb); | 1097 | extern void fb_destroy_modedb(struct fb_videomode *modedb); |
1096 | extern int fb_find_mode_cvt(struct fb_videomode *mode, int margins, int rb); | 1098 | extern int fb_find_mode_cvt(struct fb_videomode *mode, int margins, int rb); |
1097 | extern unsigned char *fb_ddc_read(struct i2c_adapter *adapter); | 1099 | extern unsigned char *fb_ddc_read(struct i2c_adapter *adapter); |
@@ -1150,6 +1152,7 @@ struct fb_videomode { | |||
1150 | 1152 | ||
1151 | extern const char *fb_mode_option; | 1153 | extern const char *fb_mode_option; |
1152 | extern const struct fb_videomode vesa_modes[]; | 1154 | extern const struct fb_videomode vesa_modes[]; |
1155 | extern const struct fb_videomode cea_modes[64]; | ||
1153 | 1156 | ||
1154 | struct fb_modelist { | 1157 | struct fb_modelist { |
1155 | struct list_head list; | 1158 | struct list_head list; |
diff --git a/include/linux/fec.h b/include/linux/fec.h index 5d3523d8dd0c..bcff455d1d53 100644 --- a/include/linux/fec.h +++ b/include/linux/fec.h | |||
@@ -3,6 +3,8 @@ | |||
3 | * Copyright (c) 2009 Orex Computed Radiography | 3 | * Copyright (c) 2009 Orex Computed Radiography |
4 | * Baruch Siach <baruch@tkos.co.il> | 4 | * Baruch Siach <baruch@tkos.co.il> |
5 | * | 5 | * |
6 | * Copyright (C) 2010 Freescale Semiconductor, Inc. | ||
7 | * | ||
6 | * Header file for the FEC platform data | 8 | * Header file for the FEC platform data |
7 | * | 9 | * |
8 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
@@ -16,6 +18,7 @@ | |||
16 | 18 | ||
17 | struct fec_platform_data { | 19 | struct fec_platform_data { |
18 | phy_interface_t phy; | 20 | phy_interface_t phy; |
21 | unsigned char mac[ETH_ALEN]; | ||
19 | }; | 22 | }; |
20 | 23 | ||
21 | #endif | 24 | #endif |
diff --git a/include/linux/filter.h b/include/linux/filter.h index 69b43dbea6c6..45266b75409a 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
@@ -91,54 +91,6 @@ struct sock_fprog { /* Required for SO_ATTACH_FILTER. */ | |||
91 | #define BPF_TAX 0x00 | 91 | #define BPF_TAX 0x00 |
92 | #define BPF_TXA 0x80 | 92 | #define BPF_TXA 0x80 |
93 | 93 | ||
94 | enum { | ||
95 | BPF_S_RET_K = 0, | ||
96 | BPF_S_RET_A, | ||
97 | BPF_S_ALU_ADD_K, | ||
98 | BPF_S_ALU_ADD_X, | ||
99 | BPF_S_ALU_SUB_K, | ||
100 | BPF_S_ALU_SUB_X, | ||
101 | BPF_S_ALU_MUL_K, | ||
102 | BPF_S_ALU_MUL_X, | ||
103 | BPF_S_ALU_DIV_X, | ||
104 | BPF_S_ALU_AND_K, | ||
105 | BPF_S_ALU_AND_X, | ||
106 | BPF_S_ALU_OR_K, | ||
107 | BPF_S_ALU_OR_X, | ||
108 | BPF_S_ALU_LSH_K, | ||
109 | BPF_S_ALU_LSH_X, | ||
110 | BPF_S_ALU_RSH_K, | ||
111 | BPF_S_ALU_RSH_X, | ||
112 | BPF_S_ALU_NEG, | ||
113 | BPF_S_LD_W_ABS, | ||
114 | BPF_S_LD_H_ABS, | ||
115 | BPF_S_LD_B_ABS, | ||
116 | BPF_S_LD_W_LEN, | ||
117 | BPF_S_LD_W_IND, | ||
118 | BPF_S_LD_H_IND, | ||
119 | BPF_S_LD_B_IND, | ||
120 | BPF_S_LD_IMM, | ||
121 | BPF_S_LDX_W_LEN, | ||
122 | BPF_S_LDX_B_MSH, | ||
123 | BPF_S_LDX_IMM, | ||
124 | BPF_S_MISC_TAX, | ||
125 | BPF_S_MISC_TXA, | ||
126 | BPF_S_ALU_DIV_K, | ||
127 | BPF_S_LD_MEM, | ||
128 | BPF_S_LDX_MEM, | ||
129 | BPF_S_ST, | ||
130 | BPF_S_STX, | ||
131 | BPF_S_JMP_JA, | ||
132 | BPF_S_JMP_JEQ_K, | ||
133 | BPF_S_JMP_JEQ_X, | ||
134 | BPF_S_JMP_JGE_K, | ||
135 | BPF_S_JMP_JGE_X, | ||
136 | BPF_S_JMP_JGT_K, | ||
137 | BPF_S_JMP_JGT_X, | ||
138 | BPF_S_JMP_JSET_K, | ||
139 | BPF_S_JMP_JSET_X, | ||
140 | }; | ||
141 | |||
142 | #ifndef BPF_MAXINSNS | 94 | #ifndef BPF_MAXINSNS |
143 | #define BPF_MAXINSNS 4096 | 95 | #define BPF_MAXINSNS 4096 |
144 | #endif | 96 | #endif |
@@ -172,7 +124,9 @@ enum { | |||
172 | #define SKF_AD_MARK 20 | 124 | #define SKF_AD_MARK 20 |
173 | #define SKF_AD_QUEUE 24 | 125 | #define SKF_AD_QUEUE 24 |
174 | #define SKF_AD_HATYPE 28 | 126 | #define SKF_AD_HATYPE 28 |
175 | #define SKF_AD_MAX 32 | 127 | #define SKF_AD_RXHASH 32 |
128 | #define SKF_AD_CPU 36 | ||
129 | #define SKF_AD_MAX 40 | ||
176 | #define SKF_NET_OFF (-0x100000) | 130 | #define SKF_NET_OFF (-0x100000) |
177 | #define SKF_LL_OFF (-0x200000) | 131 | #define SKF_LL_OFF (-0x200000) |
178 | 132 | ||
@@ -194,8 +148,8 @@ struct sk_buff; | |||
194 | struct sock; | 148 | struct sock; |
195 | 149 | ||
196 | extern int sk_filter(struct sock *sk, struct sk_buff *skb); | 150 | extern int sk_filter(struct sock *sk, struct sk_buff *skb); |
197 | extern unsigned int sk_run_filter(struct sk_buff *skb, | 151 | extern unsigned int sk_run_filter(const struct sk_buff *skb, |
198 | struct sock_filter *filter, int flen); | 152 | const struct sock_filter *filter); |
199 | extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); | 153 | extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); |
200 | extern int sk_detach_filter(struct sock *sk); | 154 | extern int sk_detach_filter(struct sock *sk); |
201 | extern int sk_chk_filter(struct sock_filter *filter, int flen); | 155 | extern int sk_chk_filter(struct sock_filter *filter, int flen); |
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index 1cd637ef62d2..9a3f5f9383f6 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
@@ -302,9 +302,9 @@ struct fw_packet { | |||
302 | struct fw_transaction { | 302 | struct fw_transaction { |
303 | int node_id; /* The generation is implied; it is always the current. */ | 303 | int node_id; /* The generation is implied; it is always the current. */ |
304 | int tlabel; | 304 | int tlabel; |
305 | int timestamp; | ||
306 | struct list_head link; | 305 | struct list_head link; |
307 | struct fw_card *card; | 306 | struct fw_card *card; |
307 | bool is_split_transaction; | ||
308 | struct timer_list split_timeout_timer; | 308 | struct timer_list split_timeout_timer; |
309 | 309 | ||
310 | struct fw_packet packet; | 310 | struct fw_packet packet; |
diff --git a/include/linux/firmware-map.h b/include/linux/firmware-map.h index c6dcc1dfe781..43fe52fcef0f 100644 --- a/include/linux/firmware-map.h +++ b/include/linux/firmware-map.h | |||
@@ -17,7 +17,6 @@ | |||
17 | #define _LINUX_FIRMWARE_MAP_H | 17 | #define _LINUX_FIRMWARE_MAP_H |
18 | 18 | ||
19 | #include <linux/list.h> | 19 | #include <linux/list.h> |
20 | #include <linux/kobject.h> | ||
21 | 20 | ||
22 | /* | 21 | /* |
23 | * provide a dummy interface if CONFIG_FIRMWARE_MEMMAP is disabled | 22 | * provide a dummy interface if CONFIG_FIRMWARE_MEMMAP is disabled |
diff --git a/include/linux/flex_array.h b/include/linux/flex_array.h index 631b77f2ac70..70e4efabe0fb 100644 --- a/include/linux/flex_array.h +++ b/include/linux/flex_array.h | |||
@@ -71,7 +71,7 @@ void *flex_array_get(struct flex_array *fa, unsigned int element_nr); | |||
71 | int flex_array_shrink(struct flex_array *fa); | 71 | int flex_array_shrink(struct flex_array *fa); |
72 | 72 | ||
73 | #define flex_array_put_ptr(fa, nr, src, gfp) \ | 73 | #define flex_array_put_ptr(fa, nr, src, gfp) \ |
74 | flex_array_put(fa, nr, &(void *)(src), gfp) | 74 | flex_array_put(fa, nr, (void *)&(src), gfp) |
75 | 75 | ||
76 | void *flex_array_get_ptr(struct flex_array *fa, unsigned int element_nr); | 76 | void *flex_array_get_ptr(struct flex_array *fa, unsigned int element_nr); |
77 | 77 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 090f0eacde29..f84d9928bdb1 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -382,7 +382,6 @@ struct inodes_stat_t { | |||
382 | #include <linux/path.h> | 382 | #include <linux/path.h> |
383 | #include <linux/stat.h> | 383 | #include <linux/stat.h> |
384 | #include <linux/cache.h> | 384 | #include <linux/cache.h> |
385 | #include <linux/kobject.h> | ||
386 | #include <linux/list.h> | 385 | #include <linux/list.h> |
387 | #include <linux/radix-tree.h> | 386 | #include <linux/radix-tree.h> |
388 | #include <linux/prio_tree.h> | 387 | #include <linux/prio_tree.h> |
@@ -392,6 +391,7 @@ struct inodes_stat_t { | |||
392 | #include <linux/capability.h> | 391 | #include <linux/capability.h> |
393 | #include <linux/semaphore.h> | 392 | #include <linux/semaphore.h> |
394 | #include <linux/fiemap.h> | 393 | #include <linux/fiemap.h> |
394 | #include <linux/rculist_bl.h> | ||
395 | 395 | ||
396 | #include <asm/atomic.h> | 396 | #include <asm/atomic.h> |
397 | #include <asm/byteorder.h> | 397 | #include <asm/byteorder.h> |
@@ -401,6 +401,7 @@ struct hd_geometry; | |||
401 | struct iovec; | 401 | struct iovec; |
402 | struct nameidata; | 402 | struct nameidata; |
403 | struct kiocb; | 403 | struct kiocb; |
404 | struct kobject; | ||
404 | struct pipe_inode_info; | 405 | struct pipe_inode_info; |
405 | struct poll_table_struct; | 406 | struct poll_table_struct; |
406 | struct kstatfs; | 407 | struct kstatfs; |
@@ -733,16 +734,31 @@ struct posix_acl; | |||
733 | #define ACL_NOT_CACHED ((void *)(-1)) | 734 | #define ACL_NOT_CACHED ((void *)(-1)) |
734 | 735 | ||
735 | struct inode { | 736 | struct inode { |
737 | /* RCU path lookup touches following: */ | ||
738 | umode_t i_mode; | ||
739 | uid_t i_uid; | ||
740 | gid_t i_gid; | ||
741 | const struct inode_operations *i_op; | ||
742 | struct super_block *i_sb; | ||
743 | |||
744 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ | ||
745 | unsigned int i_flags; | ||
746 | struct mutex i_mutex; | ||
747 | |||
748 | unsigned long i_state; | ||
749 | unsigned long dirtied_when; /* jiffies of first dirtying */ | ||
750 | |||
736 | struct hlist_node i_hash; | 751 | struct hlist_node i_hash; |
737 | struct list_head i_wb_list; /* backing dev IO list */ | 752 | struct list_head i_wb_list; /* backing dev IO list */ |
738 | struct list_head i_lru; /* inode LRU list */ | 753 | struct list_head i_lru; /* inode LRU list */ |
739 | struct list_head i_sb_list; | 754 | struct list_head i_sb_list; |
740 | struct list_head i_dentry; | 755 | union { |
756 | struct list_head i_dentry; | ||
757 | struct rcu_head i_rcu; | ||
758 | }; | ||
741 | unsigned long i_ino; | 759 | unsigned long i_ino; |
742 | atomic_t i_count; | 760 | atomic_t i_count; |
743 | unsigned int i_nlink; | 761 | unsigned int i_nlink; |
744 | uid_t i_uid; | ||
745 | gid_t i_gid; | ||
746 | dev_t i_rdev; | 762 | dev_t i_rdev; |
747 | unsigned int i_blkbits; | 763 | unsigned int i_blkbits; |
748 | u64 i_version; | 764 | u64 i_version; |
@@ -755,13 +771,8 @@ struct inode { | |||
755 | struct timespec i_ctime; | 771 | struct timespec i_ctime; |
756 | blkcnt_t i_blocks; | 772 | blkcnt_t i_blocks; |
757 | unsigned short i_bytes; | 773 | unsigned short i_bytes; |
758 | umode_t i_mode; | ||
759 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ | ||
760 | struct mutex i_mutex; | ||
761 | struct rw_semaphore i_alloc_sem; | 774 | struct rw_semaphore i_alloc_sem; |
762 | const struct inode_operations *i_op; | ||
763 | const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ | 775 | const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ |
764 | struct super_block *i_sb; | ||
765 | struct file_lock *i_flock; | 776 | struct file_lock *i_flock; |
766 | struct address_space *i_mapping; | 777 | struct address_space *i_mapping; |
767 | struct address_space i_data; | 778 | struct address_space i_data; |
@@ -782,11 +793,6 @@ struct inode { | |||
782 | struct hlist_head i_fsnotify_marks; | 793 | struct hlist_head i_fsnotify_marks; |
783 | #endif | 794 | #endif |
784 | 795 | ||
785 | unsigned long i_state; | ||
786 | unsigned long dirtied_when; /* jiffies of first dirtying */ | ||
787 | |||
788 | unsigned int i_flags; | ||
789 | |||
790 | #ifdef CONFIG_IMA | 796 | #ifdef CONFIG_IMA |
791 | /* protected by i_lock */ | 797 | /* protected by i_lock */ |
792 | unsigned int i_readcount; /* struct files open RO */ | 798 | unsigned int i_readcount; /* struct files open RO */ |
@@ -1372,13 +1378,13 @@ struct super_block { | |||
1372 | const struct xattr_handler **s_xattr; | 1378 | const struct xattr_handler **s_xattr; |
1373 | 1379 | ||
1374 | struct list_head s_inodes; /* all inodes */ | 1380 | struct list_head s_inodes; /* all inodes */ |
1375 | struct hlist_head s_anon; /* anonymous dentries for (nfs) exporting */ | 1381 | struct hlist_bl_head s_anon; /* anonymous dentries for (nfs) exporting */ |
1376 | #ifdef CONFIG_SMP | 1382 | #ifdef CONFIG_SMP |
1377 | struct list_head __percpu *s_files; | 1383 | struct list_head __percpu *s_files; |
1378 | #else | 1384 | #else |
1379 | struct list_head s_files; | 1385 | struct list_head s_files; |
1380 | #endif | 1386 | #endif |
1381 | /* s_dentry_lru and s_nr_dentry_unused are protected by dcache_lock */ | 1387 | /* s_dentry_lru, s_nr_dentry_unused protected by dcache.c lru locks */ |
1382 | struct list_head s_dentry_lru; /* unused dentry lru */ | 1388 | struct list_head s_dentry_lru; /* unused dentry lru */ |
1383 | int s_nr_dentry_unused; /* # of dentry on lru */ | 1389 | int s_nr_dentry_unused; /* # of dentry on lru */ |
1384 | 1390 | ||
@@ -1545,9 +1551,18 @@ struct file_operations { | |||
1545 | int (*setlease)(struct file *, long, struct file_lock **); | 1551 | int (*setlease)(struct file *, long, struct file_lock **); |
1546 | }; | 1552 | }; |
1547 | 1553 | ||
1554 | #define IPERM_FLAG_RCU 0x0001 | ||
1555 | |||
1548 | struct inode_operations { | 1556 | struct inode_operations { |
1549 | int (*create) (struct inode *,struct dentry *,int, struct nameidata *); | ||
1550 | struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); | 1557 | struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); |
1558 | void * (*follow_link) (struct dentry *, struct nameidata *); | ||
1559 | int (*permission) (struct inode *, int, unsigned int); | ||
1560 | int (*check_acl)(struct inode *, int, unsigned int); | ||
1561 | |||
1562 | int (*readlink) (struct dentry *, char __user *,int); | ||
1563 | void (*put_link) (struct dentry *, struct nameidata *, void *); | ||
1564 | |||
1565 | int (*create) (struct inode *,struct dentry *,int, struct nameidata *); | ||
1551 | int (*link) (struct dentry *,struct inode *,struct dentry *); | 1566 | int (*link) (struct dentry *,struct inode *,struct dentry *); |
1552 | int (*unlink) (struct inode *,struct dentry *); | 1567 | int (*unlink) (struct inode *,struct dentry *); |
1553 | int (*symlink) (struct inode *,struct dentry *,const char *); | 1568 | int (*symlink) (struct inode *,struct dentry *,const char *); |
@@ -1556,12 +1571,7 @@ struct inode_operations { | |||
1556 | int (*mknod) (struct inode *,struct dentry *,int,dev_t); | 1571 | int (*mknod) (struct inode *,struct dentry *,int,dev_t); |
1557 | int (*rename) (struct inode *, struct dentry *, | 1572 | int (*rename) (struct inode *, struct dentry *, |
1558 | struct inode *, struct dentry *); | 1573 | struct inode *, struct dentry *); |
1559 | int (*readlink) (struct dentry *, char __user *,int); | ||
1560 | void * (*follow_link) (struct dentry *, struct nameidata *); | ||
1561 | void (*put_link) (struct dentry *, struct nameidata *, void *); | ||
1562 | void (*truncate) (struct inode *); | 1574 | void (*truncate) (struct inode *); |
1563 | int (*permission) (struct inode *, int); | ||
1564 | int (*check_acl)(struct inode *, int); | ||
1565 | int (*setattr) (struct dentry *, struct iattr *); | 1575 | int (*setattr) (struct dentry *, struct iattr *); |
1566 | int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); | 1576 | int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); |
1567 | int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); | 1577 | int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); |
@@ -1573,7 +1583,7 @@ struct inode_operations { | |||
1573 | loff_t len); | 1583 | loff_t len); |
1574 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, | 1584 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, |
1575 | u64 len); | 1585 | u64 len); |
1576 | }; | 1586 | } ____cacheline_aligned; |
1577 | 1587 | ||
1578 | struct seq_file; | 1588 | struct seq_file; |
1579 | 1589 | ||
@@ -2158,8 +2168,8 @@ extern sector_t bmap(struct inode *, sector_t); | |||
2158 | #endif | 2168 | #endif |
2159 | extern int notify_change(struct dentry *, struct iattr *); | 2169 | extern int notify_change(struct dentry *, struct iattr *); |
2160 | extern int inode_permission(struct inode *, int); | 2170 | extern int inode_permission(struct inode *, int); |
2161 | extern int generic_permission(struct inode *, int, | 2171 | extern int generic_permission(struct inode *, int, unsigned int, |
2162 | int (*check_acl)(struct inode *, int)); | 2172 | int (*check_acl)(struct inode *, int, unsigned int)); |
2163 | 2173 | ||
2164 | static inline bool execute_ok(struct inode *inode) | 2174 | static inline bool execute_ok(struct inode *inode) |
2165 | { | 2175 | { |
@@ -2230,6 +2240,7 @@ extern void iget_failed(struct inode *); | |||
2230 | extern void end_writeback(struct inode *); | 2240 | extern void end_writeback(struct inode *); |
2231 | extern void __destroy_inode(struct inode *); | 2241 | extern void __destroy_inode(struct inode *); |
2232 | extern struct inode *new_inode(struct super_block *); | 2242 | extern struct inode *new_inode(struct super_block *); |
2243 | extern void free_inode_nonrcu(struct inode *inode); | ||
2233 | extern int should_remove_suid(struct dentry *); | 2244 | extern int should_remove_suid(struct dentry *); |
2234 | extern int file_remove_suid(struct file *); | 2245 | extern int file_remove_suid(struct file *); |
2235 | 2246 | ||
@@ -2446,6 +2457,10 @@ static inline ino_t parent_ino(struct dentry *dentry) | |||
2446 | { | 2457 | { |
2447 | ino_t res; | 2458 | ino_t res; |
2448 | 2459 | ||
2460 | /* | ||
2461 | * Don't strictly need d_lock here? If the parent ino could change | ||
2462 | * then surely we'd have a deeper race in the caller? | ||
2463 | */ | ||
2449 | spin_lock(&dentry->d_lock); | 2464 | spin_lock(&dentry->d_lock); |
2450 | res = dentry->d_parent->d_inode->i_ino; | 2465 | res = dentry->d_parent->d_inode->i_ino; |
2451 | spin_unlock(&dentry->d_lock); | 2466 | spin_unlock(&dentry->d_lock); |
diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h index a42b5bf02f8b..003dc0fd7347 100644 --- a/include/linux/fs_struct.h +++ b/include/linux/fs_struct.h | |||
@@ -2,10 +2,13 @@ | |||
2 | #define _LINUX_FS_STRUCT_H | 2 | #define _LINUX_FS_STRUCT_H |
3 | 3 | ||
4 | #include <linux/path.h> | 4 | #include <linux/path.h> |
5 | #include <linux/spinlock.h> | ||
6 | #include <linux/seqlock.h> | ||
5 | 7 | ||
6 | struct fs_struct { | 8 | struct fs_struct { |
7 | int users; | 9 | int users; |
8 | spinlock_t lock; | 10 | spinlock_t lock; |
11 | seqcount_t seq; | ||
9 | int umask; | 12 | int umask; |
10 | int in_exec; | 13 | int in_exec; |
11 | struct path root, pwd; | 14 | struct path root, pwd; |
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index b10bcdeaef76..2a53f10712b3 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
@@ -17,7 +17,6 @@ | |||
17 | 17 | ||
18 | /* | 18 | /* |
19 | * fsnotify_d_instantiate - instantiate a dentry for inode | 19 | * fsnotify_d_instantiate - instantiate a dentry for inode |
20 | * Called with dcache_lock held. | ||
21 | */ | 20 | */ |
22 | static inline void fsnotify_d_instantiate(struct dentry *dentry, | 21 | static inline void fsnotify_d_instantiate(struct dentry *dentry, |
23 | struct inode *inode) | 22 | struct inode *inode) |
@@ -62,7 +61,6 @@ static inline int fsnotify_perm(struct file *file, int mask) | |||
62 | 61 | ||
63 | /* | 62 | /* |
64 | * fsnotify_d_move - dentry has been moved | 63 | * fsnotify_d_move - dentry has been moved |
65 | * Called with dcache_lock and dentry->d_lock held. | ||
66 | */ | 64 | */ |
67 | static inline void fsnotify_d_move(struct dentry *dentry) | 65 | static inline void fsnotify_d_move(struct dentry *dentry) |
68 | { | 66 | { |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 7380763595d3..69ad89b50489 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
@@ -329,9 +329,15 @@ static inline void __fsnotify_update_dcache_flags(struct dentry *dentry) | |||
329 | { | 329 | { |
330 | struct dentry *parent; | 330 | struct dentry *parent; |
331 | 331 | ||
332 | assert_spin_locked(&dcache_lock); | ||
333 | assert_spin_locked(&dentry->d_lock); | 332 | assert_spin_locked(&dentry->d_lock); |
334 | 333 | ||
334 | /* | ||
335 | * Serialisation of setting PARENT_WATCHED on the dentries is provided | ||
336 | * by d_lock. If inotify_inode_watched changes after we have taken | ||
337 | * d_lock, the following __fsnotify_update_child_dentry_flags call will | ||
338 | * find our entry, so it will spin until we complete here, and update | ||
339 | * us with the new state. | ||
340 | */ | ||
335 | parent = dentry->d_parent; | 341 | parent = dentry->d_parent; |
336 | if (parent->d_inode && fsnotify_inode_watches_children(parent->d_inode)) | 342 | if (parent->d_inode && fsnotify_inode_watches_children(parent->d_inode)) |
337 | dentry->d_flags |= DCACHE_FSNOTIFY_PARENT_WATCHED; | 343 | dentry->d_flags |= DCACHE_FSNOTIFY_PARENT_WATCHED; |
@@ -341,15 +347,12 @@ static inline void __fsnotify_update_dcache_flags(struct dentry *dentry) | |||
341 | 347 | ||
342 | /* | 348 | /* |
343 | * fsnotify_d_instantiate - instantiate a dentry for inode | 349 | * fsnotify_d_instantiate - instantiate a dentry for inode |
344 | * Called with dcache_lock held. | ||
345 | */ | 350 | */ |
346 | static inline void __fsnotify_d_instantiate(struct dentry *dentry, struct inode *inode) | 351 | static inline void __fsnotify_d_instantiate(struct dentry *dentry, struct inode *inode) |
347 | { | 352 | { |
348 | if (!inode) | 353 | if (!inode) |
349 | return; | 354 | return; |
350 | 355 | ||
351 | assert_spin_locked(&dcache_lock); | ||
352 | |||
353 | spin_lock(&dentry->d_lock); | 356 | spin_lock(&dentry->d_lock); |
354 | __fsnotify_update_dcache_flags(dentry); | 357 | __fsnotify_update_dcache_flags(dentry); |
355 | spin_unlock(&dentry->d_lock); | 358 | spin_unlock(&dentry->d_lock); |
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 8beabb958f61..47e3997f7b5c 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -154,12 +154,14 @@ enum { | |||
154 | TRACE_EVENT_FL_ENABLED_BIT, | 154 | TRACE_EVENT_FL_ENABLED_BIT, |
155 | TRACE_EVENT_FL_FILTERED_BIT, | 155 | TRACE_EVENT_FL_FILTERED_BIT, |
156 | TRACE_EVENT_FL_RECORDED_CMD_BIT, | 156 | TRACE_EVENT_FL_RECORDED_CMD_BIT, |
157 | TRACE_EVENT_FL_CAP_ANY_BIT, | ||
157 | }; | 158 | }; |
158 | 159 | ||
159 | enum { | 160 | enum { |
160 | TRACE_EVENT_FL_ENABLED = (1 << TRACE_EVENT_FL_ENABLED_BIT), | 161 | TRACE_EVENT_FL_ENABLED = (1 << TRACE_EVENT_FL_ENABLED_BIT), |
161 | TRACE_EVENT_FL_FILTERED = (1 << TRACE_EVENT_FL_FILTERED_BIT), | 162 | TRACE_EVENT_FL_FILTERED = (1 << TRACE_EVENT_FL_FILTERED_BIT), |
162 | TRACE_EVENT_FL_RECORDED_CMD = (1 << TRACE_EVENT_FL_RECORDED_CMD_BIT), | 163 | TRACE_EVENT_FL_RECORDED_CMD = (1 << TRACE_EVENT_FL_RECORDED_CMD_BIT), |
164 | TRACE_EVENT_FL_CAP_ANY = (1 << TRACE_EVENT_FL_CAP_ANY_BIT), | ||
163 | }; | 165 | }; |
164 | 166 | ||
165 | struct ftrace_event_call { | 167 | struct ftrace_event_call { |
@@ -196,6 +198,14 @@ struct ftrace_event_call { | |||
196 | #endif | 198 | #endif |
197 | }; | 199 | }; |
198 | 200 | ||
201 | #define __TRACE_EVENT_FLAGS(name, value) \ | ||
202 | static int __init trace_init_flags_##name(void) \ | ||
203 | { \ | ||
204 | event_##name.flags = value; \ | ||
205 | return 0; \ | ||
206 | } \ | ||
207 | early_initcall(trace_init_flags_##name); | ||
208 | |||
199 | #define PERF_MAX_TRACE_SIZE 2048 | 209 | #define PERF_MAX_TRACE_SIZE 2048 |
200 | 210 | ||
201 | #define MAX_FILTER_PRED 32 | 211 | #define MAX_FILTER_PRED 32 |
@@ -215,6 +225,10 @@ enum { | |||
215 | FILTER_PTR_STRING, | 225 | FILTER_PTR_STRING, |
216 | }; | 226 | }; |
217 | 227 | ||
228 | #define EVENT_STORAGE_SIZE 128 | ||
229 | extern struct mutex event_storage_mutex; | ||
230 | extern char event_storage[EVENT_STORAGE_SIZE]; | ||
231 | |||
218 | extern int trace_event_raw_init(struct ftrace_event_call *call); | 232 | extern int trace_event_raw_init(struct ftrace_event_call *call); |
219 | extern int trace_define_field(struct ftrace_event_call *call, const char *type, | 233 | extern int trace_define_field(struct ftrace_event_call *call, const char *type, |
220 | const char *name, int offset, int size, | 234 | const char *name, int offset, int size, |
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index c3c578e09833..d464de53db43 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
@@ -41,6 +41,12 @@ | |||
41 | * 7.15 | 41 | * 7.15 |
42 | * - add store notify | 42 | * - add store notify |
43 | * - add retrieve notify | 43 | * - add retrieve notify |
44 | * | ||
45 | * 7.16 | ||
46 | * - add BATCH_FORGET request | ||
47 | * - FUSE_IOCTL_UNRESTRICTED shall now return with array of 'struct | ||
48 | * fuse_ioctl_iovec' instead of ambiguous 'struct iovec' | ||
49 | * - add FUSE_IOCTL_32BIT flag | ||
44 | */ | 50 | */ |
45 | 51 | ||
46 | #ifndef _LINUX_FUSE_H | 52 | #ifndef _LINUX_FUSE_H |
@@ -72,7 +78,7 @@ | |||
72 | #define FUSE_KERNEL_VERSION 7 | 78 | #define FUSE_KERNEL_VERSION 7 |
73 | 79 | ||
74 | /** Minor version number of this interface */ | 80 | /** Minor version number of this interface */ |
75 | #define FUSE_KERNEL_MINOR_VERSION 15 | 81 | #define FUSE_KERNEL_MINOR_VERSION 16 |
76 | 82 | ||
77 | /** The node ID of the root inode */ | 83 | /** The node ID of the root inode */ |
78 | #define FUSE_ROOT_ID 1 | 84 | #define FUSE_ROOT_ID 1 |
@@ -200,12 +206,14 @@ struct fuse_file_lock { | |||
200 | * FUSE_IOCTL_COMPAT: 32bit compat ioctl on 64bit machine | 206 | * FUSE_IOCTL_COMPAT: 32bit compat ioctl on 64bit machine |
201 | * FUSE_IOCTL_UNRESTRICTED: not restricted to well-formed ioctls, retry allowed | 207 | * FUSE_IOCTL_UNRESTRICTED: not restricted to well-formed ioctls, retry allowed |
202 | * FUSE_IOCTL_RETRY: retry with new iovecs | 208 | * FUSE_IOCTL_RETRY: retry with new iovecs |
209 | * FUSE_IOCTL_32BIT: 32bit ioctl | ||
203 | * | 210 | * |
204 | * FUSE_IOCTL_MAX_IOV: maximum of in_iovecs + out_iovecs | 211 | * FUSE_IOCTL_MAX_IOV: maximum of in_iovecs + out_iovecs |
205 | */ | 212 | */ |
206 | #define FUSE_IOCTL_COMPAT (1 << 0) | 213 | #define FUSE_IOCTL_COMPAT (1 << 0) |
207 | #define FUSE_IOCTL_UNRESTRICTED (1 << 1) | 214 | #define FUSE_IOCTL_UNRESTRICTED (1 << 1) |
208 | #define FUSE_IOCTL_RETRY (1 << 2) | 215 | #define FUSE_IOCTL_RETRY (1 << 2) |
216 | #define FUSE_IOCTL_32BIT (1 << 3) | ||
209 | 217 | ||
210 | #define FUSE_IOCTL_MAX_IOV 256 | 218 | #define FUSE_IOCTL_MAX_IOV 256 |
211 | 219 | ||
@@ -256,6 +264,7 @@ enum fuse_opcode { | |||
256 | FUSE_IOCTL = 39, | 264 | FUSE_IOCTL = 39, |
257 | FUSE_POLL = 40, | 265 | FUSE_POLL = 40, |
258 | FUSE_NOTIFY_REPLY = 41, | 266 | FUSE_NOTIFY_REPLY = 41, |
267 | FUSE_BATCH_FORGET = 42, | ||
259 | 268 | ||
260 | /* CUSE specific operations */ | 269 | /* CUSE specific operations */ |
261 | CUSE_INIT = 4096, | 270 | CUSE_INIT = 4096, |
@@ -290,6 +299,16 @@ struct fuse_forget_in { | |||
290 | __u64 nlookup; | 299 | __u64 nlookup; |
291 | }; | 300 | }; |
292 | 301 | ||
302 | struct fuse_forget_one { | ||
303 | __u64 nodeid; | ||
304 | __u64 nlookup; | ||
305 | }; | ||
306 | |||
307 | struct fuse_batch_forget_in { | ||
308 | __u32 count; | ||
309 | __u32 dummy; | ||
310 | }; | ||
311 | |||
293 | struct fuse_getattr_in { | 312 | struct fuse_getattr_in { |
294 | __u32 getattr_flags; | 313 | __u32 getattr_flags; |
295 | __u32 dummy; | 314 | __u32 dummy; |
@@ -510,6 +529,11 @@ struct fuse_ioctl_in { | |||
510 | __u32 out_size; | 529 | __u32 out_size; |
511 | }; | 530 | }; |
512 | 531 | ||
532 | struct fuse_ioctl_iovec { | ||
533 | __u64 base; | ||
534 | __u64 len; | ||
535 | }; | ||
536 | |||
513 | struct fuse_ioctl_out { | 537 | struct fuse_ioctl_out { |
514 | __s32 result; | 538 | __s32 result; |
515 | __u32 flags; | 539 | __u32 flags; |
diff --git a/include/linux/generic_acl.h b/include/linux/generic_acl.h index 574bea4013b6..0437e377b555 100644 --- a/include/linux/generic_acl.h +++ b/include/linux/generic_acl.h | |||
@@ -10,6 +10,6 @@ extern const struct xattr_handler generic_acl_default_handler; | |||
10 | 10 | ||
11 | int generic_acl_init(struct inode *, struct inode *); | 11 | int generic_acl_init(struct inode *, struct inode *); |
12 | int generic_acl_chmod(struct inode *); | 12 | int generic_acl_chmod(struct inode *); |
13 | int generic_check_acl(struct inode *inode, int mask); | 13 | int generic_check_acl(struct inode *inode, int mask, unsigned int flags); |
14 | 14 | ||
15 | #endif /* LINUX_GENERIC_ACL_H */ | 15 | #endif /* LINUX_GENERIC_ACL_H */ |
diff --git a/include/linux/gpio-i2cmux.h b/include/linux/gpio-i2cmux.h new file mode 100644 index 000000000000..4a333bb0bd0d --- /dev/null +++ b/include/linux/gpio-i2cmux.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * gpio-i2cmux interface to platform code | ||
3 | * | ||
4 | * Peter Korsgaard <peter.korsgaard@barco.com> | ||
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 | |||
11 | #ifndef _LINUX_GPIO_I2CMUX_H | ||
12 | #define _LINUX_GPIO_I2CMUX_H | ||
13 | |||
14 | /* MUX has no specific idle mode */ | ||
15 | #define GPIO_I2CMUX_NO_IDLE ((unsigned)-1) | ||
16 | |||
17 | /** | ||
18 | * struct gpio_i2cmux_platform_data - Platform-dependent data for gpio-i2cmux | ||
19 | * @parent: Parent I2C bus adapter number | ||
20 | * @base_nr: Base I2C bus number to number adapters from or zero for dynamic | ||
21 | * @values: Array of bitmasks of GPIO settings (low/high) for each | ||
22 | * position | ||
23 | * @n_values: Number of multiplexer positions (busses to instantiate) | ||
24 | * @gpios: Array of GPIO numbers used to control MUX | ||
25 | * @n_gpios: Number of GPIOs used to control MUX | ||
26 | * @idle: Bitmask to write to MUX when idle or GPIO_I2CMUX_NO_IDLE if not used | ||
27 | */ | ||
28 | struct gpio_i2cmux_platform_data { | ||
29 | int parent; | ||
30 | int base_nr; | ||
31 | const unsigned *values; | ||
32 | int n_values; | ||
33 | const unsigned *gpios; | ||
34 | int n_gpios; | ||
35 | unsigned idle; | ||
36 | }; | ||
37 | |||
38 | #endif /* _LINUX_GPIO_I2CMUX_H */ | ||
diff --git a/include/linux/hid.h b/include/linux/hid.h index bb0f56f5c01e..20b9801f669b 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -820,6 +820,49 @@ static inline void hid_hw_stop(struct hid_device *hdev) | |||
820 | hdev->ll_driver->stop(hdev); | 820 | hdev->ll_driver->stop(hdev); |
821 | } | 821 | } |
822 | 822 | ||
823 | /** | ||
824 | * hid_hw_open - signal underlaying HW to start delivering events | ||
825 | * | ||
826 | * @hdev: hid device | ||
827 | * | ||
828 | * Tell underlying HW to start delivering events from the device. | ||
829 | * This function should be called sometime after successful call | ||
830 | * to hid_hiw_start(). | ||
831 | */ | ||
832 | static inline int __must_check hid_hw_open(struct hid_device *hdev) | ||
833 | { | ||
834 | return hdev->ll_driver->open(hdev); | ||
835 | } | ||
836 | |||
837 | /** | ||
838 | * hid_hw_close - signal underlaying HW to stop delivering events | ||
839 | * | ||
840 | * @hdev: hid device | ||
841 | * | ||
842 | * This function indicates that we are not interested in the events | ||
843 | * from this device anymore. Delivery of events may or may not stop, | ||
844 | * depending on the number of users still outstanding. | ||
845 | */ | ||
846 | static inline void hid_hw_close(struct hid_device *hdev) | ||
847 | { | ||
848 | hdev->ll_driver->close(hdev); | ||
849 | } | ||
850 | |||
851 | /** | ||
852 | * hid_hw_power - requests underlying HW to go into given power mode | ||
853 | * | ||
854 | * @hdev: hid device | ||
855 | * @level: requested power level (one of %PM_HINT_* defines) | ||
856 | * | ||
857 | * This function requests underlying hardware to enter requested power | ||
858 | * mode. | ||
859 | */ | ||
860 | |||
861 | static inline int hid_hw_power(struct hid_device *hdev, int level) | ||
862 | { | ||
863 | return hdev->ll_driver->power ? hdev->ll_driver->power(hdev, level) : 0; | ||
864 | } | ||
865 | |||
823 | void hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size, | 866 | void hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size, |
824 | int interrupt); | 867 | int interrupt); |
825 | 868 | ||
@@ -838,12 +881,32 @@ int hid_pidff_init(struct hid_device *hid); | |||
838 | #define hid_pidff_init NULL | 881 | #define hid_pidff_init NULL |
839 | #endif | 882 | #endif |
840 | 883 | ||
841 | #define dbg_hid(format, arg...) if (hid_debug) \ | 884 | #define dbg_hid(format, arg...) \ |
842 | printk(KERN_DEBUG "%s: " format ,\ | 885 | do { \ |
843 | __FILE__ , ## arg) | 886 | if (hid_debug) \ |
844 | #define err_hid(format, arg...) printk(KERN_ERR "%s: " format "\n" , \ | 887 | printk(KERN_DEBUG "%s: " format, __FILE__, ##arg); \ |
845 | __FILE__ , ## arg) | 888 | } while (0) |
846 | #endif /* HID_FF */ | 889 | |
890 | #define hid_printk(level, hid, fmt, arg...) \ | ||
891 | dev_printk(level, &(hid)->dev, fmt, ##arg) | ||
892 | #define hid_emerg(hid, fmt, arg...) \ | ||
893 | dev_emerg(&(hid)->dev, fmt, ##arg) | ||
894 | #define hid_crit(hid, fmt, arg...) \ | ||
895 | dev_crit(&(hid)->dev, fmt, ##arg) | ||
896 | #define hid_alert(hid, fmt, arg...) \ | ||
897 | dev_alert(&(hid)->dev, fmt, ##arg) | ||
898 | #define hid_err(hid, fmt, arg...) \ | ||
899 | dev_err(&(hid)->dev, fmt, ##arg) | ||
900 | #define hid_notice(hid, fmt, arg...) \ | ||
901 | dev_notice(&(hid)->dev, fmt, ##arg) | ||
902 | #define hid_warn(hid, fmt, arg...) \ | ||
903 | dev_warn(&(hid)->dev, fmt, ##arg) | ||
904 | #define hid_info(hid, fmt, arg...) \ | ||
905 | dev_info(&(hid)->dev, fmt, ##arg) | ||
906 | #define hid_dbg(hid, fmt, arg...) \ | ||
907 | dev_dbg(&(hid)->dev, fmt, ##arg) | ||
908 | |||
909 | #endif /* __KERNEL__ */ | ||
847 | 910 | ||
848 | #endif | 911 | #endif |
849 | 912 | ||
diff --git a/include/linux/highmem.h b/include/linux/highmem.h index b676c585574e..3a93f73a8acc 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h | |||
@@ -81,7 +81,8 @@ DECLARE_PER_CPU(int, __kmap_atomic_idx); | |||
81 | 81 | ||
82 | static inline int kmap_atomic_idx_push(void) | 82 | static inline int kmap_atomic_idx_push(void) |
83 | { | 83 | { |
84 | int idx = __get_cpu_var(__kmap_atomic_idx)++; | 84 | int idx = __this_cpu_inc_return(__kmap_atomic_idx) - 1; |
85 | |||
85 | #ifdef CONFIG_DEBUG_HIGHMEM | 86 | #ifdef CONFIG_DEBUG_HIGHMEM |
86 | WARN_ON_ONCE(in_irq() && !irqs_disabled()); | 87 | WARN_ON_ONCE(in_irq() && !irqs_disabled()); |
87 | BUG_ON(idx > KM_TYPE_NR); | 88 | BUG_ON(idx > KM_TYPE_NR); |
@@ -91,16 +92,18 @@ static inline int kmap_atomic_idx_push(void) | |||
91 | 92 | ||
92 | static inline int kmap_atomic_idx(void) | 93 | static inline int kmap_atomic_idx(void) |
93 | { | 94 | { |
94 | return __get_cpu_var(__kmap_atomic_idx) - 1; | 95 | return __this_cpu_read(__kmap_atomic_idx) - 1; |
95 | } | 96 | } |
96 | 97 | ||
97 | static inline int kmap_atomic_idx_pop(void) | 98 | static inline void kmap_atomic_idx_pop(void) |
98 | { | 99 | { |
99 | int idx = --__get_cpu_var(__kmap_atomic_idx); | ||
100 | #ifdef CONFIG_DEBUG_HIGHMEM | 100 | #ifdef CONFIG_DEBUG_HIGHMEM |
101 | int idx = __this_cpu_dec_return(__kmap_atomic_idx); | ||
102 | |||
101 | BUG_ON(idx < 0); | 103 | BUG_ON(idx < 0); |
104 | #else | ||
105 | __this_cpu_dec(__kmap_atomic_idx); | ||
102 | #endif | 106 | #endif |
103 | return idx; | ||
104 | } | 107 | } |
105 | 108 | ||
106 | #endif | 109 | #endif |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index fd0c1b857d3d..f376ddc64c4d 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <linux/wait.h> | 22 | #include <linux/wait.h> |
23 | #include <linux/percpu.h> | 23 | #include <linux/percpu.h> |
24 | #include <linux/timer.h> | 24 | #include <linux/timer.h> |
25 | 25 | #include <linux/timerqueue.h> | |
26 | 26 | ||
27 | struct hrtimer_clock_base; | 27 | struct hrtimer_clock_base; |
28 | struct hrtimer_cpu_base; | 28 | struct hrtimer_cpu_base; |
@@ -79,8 +79,8 @@ enum hrtimer_restart { | |||
79 | 79 | ||
80 | /** | 80 | /** |
81 | * struct hrtimer - the basic hrtimer structure | 81 | * struct hrtimer - the basic hrtimer structure |
82 | * @node: red black tree node for time ordered insertion | 82 | * @node: timerqueue node, which also manages node.expires, |
83 | * @_expires: the absolute expiry time in the hrtimers internal | 83 | * the absolute expiry time in the hrtimers internal |
84 | * representation. The time is related to the clock on | 84 | * representation. The time is related to the clock on |
85 | * which the timer is based. Is setup by adding | 85 | * which the timer is based. Is setup by adding |
86 | * slack to the _softexpires value. For non range timers | 86 | * slack to the _softexpires value. For non range timers |
@@ -101,8 +101,7 @@ enum hrtimer_restart { | |||
101 | * The hrtimer structure must be initialized by hrtimer_init() | 101 | * The hrtimer structure must be initialized by hrtimer_init() |
102 | */ | 102 | */ |
103 | struct hrtimer { | 103 | struct hrtimer { |
104 | struct rb_node node; | 104 | struct timerqueue_node node; |
105 | ktime_t _expires; | ||
106 | ktime_t _softexpires; | 105 | ktime_t _softexpires; |
107 | enum hrtimer_restart (*function)(struct hrtimer *); | 106 | enum hrtimer_restart (*function)(struct hrtimer *); |
108 | struct hrtimer_clock_base *base; | 107 | struct hrtimer_clock_base *base; |
@@ -132,7 +131,6 @@ struct hrtimer_sleeper { | |||
132 | * @index: clock type index for per_cpu support when moving a | 131 | * @index: clock type index for per_cpu support when moving a |
133 | * timer to a base on another cpu. | 132 | * timer to a base on another cpu. |
134 | * @active: red black tree root node for the active timers | 133 | * @active: red black tree root node for the active timers |
135 | * @first: pointer to the timer node which expires first | ||
136 | * @resolution: the resolution of the clock, in nanoseconds | 134 | * @resolution: the resolution of the clock, in nanoseconds |
137 | * @get_time: function to retrieve the current time of the clock | 135 | * @get_time: function to retrieve the current time of the clock |
138 | * @softirq_time: the time when running the hrtimer queue in the softirq | 136 | * @softirq_time: the time when running the hrtimer queue in the softirq |
@@ -141,8 +139,7 @@ struct hrtimer_sleeper { | |||
141 | struct hrtimer_clock_base { | 139 | struct hrtimer_clock_base { |
142 | struct hrtimer_cpu_base *cpu_base; | 140 | struct hrtimer_cpu_base *cpu_base; |
143 | clockid_t index; | 141 | clockid_t index; |
144 | struct rb_root active; | 142 | struct timerqueue_head active; |
145 | struct rb_node *first; | ||
146 | ktime_t resolution; | 143 | ktime_t resolution; |
147 | ktime_t (*get_time)(void); | 144 | ktime_t (*get_time)(void); |
148 | ktime_t softirq_time; | 145 | ktime_t softirq_time; |
@@ -158,7 +155,6 @@ struct hrtimer_clock_base { | |||
158 | * @lock: lock protecting the base and associated clock bases | 155 | * @lock: lock protecting the base and associated clock bases |
159 | * and timers | 156 | * and timers |
160 | * @clock_base: array of clock bases for this cpu | 157 | * @clock_base: array of clock bases for this cpu |
161 | * @curr_timer: the timer which is executing a callback right now | ||
162 | * @expires_next: absolute time of the next event which was scheduled | 158 | * @expires_next: absolute time of the next event which was scheduled |
163 | * via clock_set_next_event() | 159 | * via clock_set_next_event() |
164 | * @hres_active: State of high resolution mode | 160 | * @hres_active: State of high resolution mode |
@@ -184,43 +180,43 @@ struct hrtimer_cpu_base { | |||
184 | 180 | ||
185 | static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) | 181 | static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) |
186 | { | 182 | { |
187 | timer->_expires = time; | 183 | timer->node.expires = time; |
188 | timer->_softexpires = time; | 184 | timer->_softexpires = time; |
189 | } | 185 | } |
190 | 186 | ||
191 | static inline void hrtimer_set_expires_range(struct hrtimer *timer, ktime_t time, ktime_t delta) | 187 | static inline void hrtimer_set_expires_range(struct hrtimer *timer, ktime_t time, ktime_t delta) |
192 | { | 188 | { |
193 | timer->_softexpires = time; | 189 | timer->_softexpires = time; |
194 | timer->_expires = ktime_add_safe(time, delta); | 190 | timer->node.expires = ktime_add_safe(time, delta); |
195 | } | 191 | } |
196 | 192 | ||
197 | static inline void hrtimer_set_expires_range_ns(struct hrtimer *timer, ktime_t time, unsigned long delta) | 193 | static inline void hrtimer_set_expires_range_ns(struct hrtimer *timer, ktime_t time, unsigned long delta) |
198 | { | 194 | { |
199 | timer->_softexpires = time; | 195 | timer->_softexpires = time; |
200 | timer->_expires = ktime_add_safe(time, ns_to_ktime(delta)); | 196 | timer->node.expires = ktime_add_safe(time, ns_to_ktime(delta)); |
201 | } | 197 | } |
202 | 198 | ||
203 | static inline void hrtimer_set_expires_tv64(struct hrtimer *timer, s64 tv64) | 199 | static inline void hrtimer_set_expires_tv64(struct hrtimer *timer, s64 tv64) |
204 | { | 200 | { |
205 | timer->_expires.tv64 = tv64; | 201 | timer->node.expires.tv64 = tv64; |
206 | timer->_softexpires.tv64 = tv64; | 202 | timer->_softexpires.tv64 = tv64; |
207 | } | 203 | } |
208 | 204 | ||
209 | static inline void hrtimer_add_expires(struct hrtimer *timer, ktime_t time) | 205 | static inline void hrtimer_add_expires(struct hrtimer *timer, ktime_t time) |
210 | { | 206 | { |
211 | timer->_expires = ktime_add_safe(timer->_expires, time); | 207 | timer->node.expires = ktime_add_safe(timer->node.expires, time); |
212 | timer->_softexpires = ktime_add_safe(timer->_softexpires, time); | 208 | timer->_softexpires = ktime_add_safe(timer->_softexpires, time); |
213 | } | 209 | } |
214 | 210 | ||
215 | static inline void hrtimer_add_expires_ns(struct hrtimer *timer, u64 ns) | 211 | static inline void hrtimer_add_expires_ns(struct hrtimer *timer, u64 ns) |
216 | { | 212 | { |
217 | timer->_expires = ktime_add_ns(timer->_expires, ns); | 213 | timer->node.expires = ktime_add_ns(timer->node.expires, ns); |
218 | timer->_softexpires = ktime_add_ns(timer->_softexpires, ns); | 214 | timer->_softexpires = ktime_add_ns(timer->_softexpires, ns); |
219 | } | 215 | } |
220 | 216 | ||
221 | static inline ktime_t hrtimer_get_expires(const struct hrtimer *timer) | 217 | static inline ktime_t hrtimer_get_expires(const struct hrtimer *timer) |
222 | { | 218 | { |
223 | return timer->_expires; | 219 | return timer->node.expires; |
224 | } | 220 | } |
225 | 221 | ||
226 | static inline ktime_t hrtimer_get_softexpires(const struct hrtimer *timer) | 222 | static inline ktime_t hrtimer_get_softexpires(const struct hrtimer *timer) |
@@ -230,7 +226,7 @@ static inline ktime_t hrtimer_get_softexpires(const struct hrtimer *timer) | |||
230 | 226 | ||
231 | static inline s64 hrtimer_get_expires_tv64(const struct hrtimer *timer) | 227 | static inline s64 hrtimer_get_expires_tv64(const struct hrtimer *timer) |
232 | { | 228 | { |
233 | return timer->_expires.tv64; | 229 | return timer->node.expires.tv64; |
234 | } | 230 | } |
235 | static inline s64 hrtimer_get_softexpires_tv64(const struct hrtimer *timer) | 231 | static inline s64 hrtimer_get_softexpires_tv64(const struct hrtimer *timer) |
236 | { | 232 | { |
@@ -239,12 +235,12 @@ static inline s64 hrtimer_get_softexpires_tv64(const struct hrtimer *timer) | |||
239 | 235 | ||
240 | static inline s64 hrtimer_get_expires_ns(const struct hrtimer *timer) | 236 | static inline s64 hrtimer_get_expires_ns(const struct hrtimer *timer) |
241 | { | 237 | { |
242 | return ktime_to_ns(timer->_expires); | 238 | return ktime_to_ns(timer->node.expires); |
243 | } | 239 | } |
244 | 240 | ||
245 | static inline ktime_t hrtimer_expires_remaining(const struct hrtimer *timer) | 241 | static inline ktime_t hrtimer_expires_remaining(const struct hrtimer *timer) |
246 | { | 242 | { |
247 | return ktime_sub(timer->_expires, timer->base->get_time()); | 243 | return ktime_sub(timer->node.expires, timer->base->get_time()); |
248 | } | 244 | } |
249 | 245 | ||
250 | #ifdef CONFIG_HIGH_RES_TIMERS | 246 | #ifdef CONFIG_HIGH_RES_TIMERS |
diff --git a/include/linux/i2c-omap.h b/include/linux/i2c-omap.h index 78ebf507ce56..7472449cbb74 100644 --- a/include/linux/i2c-omap.h +++ b/include/linux/i2c-omap.h | |||
@@ -1,9 +1,14 @@ | |||
1 | #ifndef __I2C_OMAP_H__ | 1 | #ifndef __I2C_OMAP_H__ |
2 | #define __I2C_OMAP_H__ | 2 | #define __I2C_OMAP_H__ |
3 | 3 | ||
4 | #include <linux/platform_device.h> | ||
5 | |||
4 | struct omap_i2c_bus_platform_data { | 6 | struct omap_i2c_bus_platform_data { |
5 | u32 clkrate; | 7 | u32 clkrate; |
6 | void (*set_mpu_wkup_lat)(struct device *dev, long set); | 8 | void (*set_mpu_wkup_lat)(struct device *dev, long set); |
9 | int (*device_enable) (struct platform_device *pdev); | ||
10 | int (*device_shutdown) (struct platform_device *pdev); | ||
11 | int (*device_idle) (struct platform_device *pdev); | ||
7 | }; | 12 | }; |
8 | 13 | ||
9 | #endif | 14 | #endif |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 56cfe23ffb39..903576df88dc 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -57,9 +57,10 @@ struct i2c_board_info; | |||
57 | * transmit an arbitrary number of messages without interruption. | 57 | * transmit an arbitrary number of messages without interruption. |
58 | * @count must be be less than 64k since msg.len is u16. | 58 | * @count must be be less than 64k since msg.len is u16. |
59 | */ | 59 | */ |
60 | extern int i2c_master_send(struct i2c_client *client, const char *buf, | 60 | extern int i2c_master_send(const struct i2c_client *client, const char *buf, |
61 | int count); | ||
62 | extern int i2c_master_recv(const struct i2c_client *client, char *buf, | ||
61 | int count); | 63 | int count); |
62 | extern int i2c_master_recv(struct i2c_client *client, char *buf, int count); | ||
63 | 64 | ||
64 | /* Transfer num messages. | 65 | /* Transfer num messages. |
65 | */ | 66 | */ |
@@ -78,23 +79,25 @@ extern s32 i2c_smbus_xfer(struct i2c_adapter *adapter, u16 addr, | |||
78 | /* Now follow the 'nice' access routines. These also document the calling | 79 | /* Now follow the 'nice' access routines. These also document the calling |
79 | conventions of i2c_smbus_xfer. */ | 80 | conventions of i2c_smbus_xfer. */ |
80 | 81 | ||
81 | extern s32 i2c_smbus_read_byte(struct i2c_client *client); | 82 | extern s32 i2c_smbus_read_byte(const struct i2c_client *client); |
82 | extern s32 i2c_smbus_write_byte(struct i2c_client *client, u8 value); | 83 | extern s32 i2c_smbus_write_byte(const struct i2c_client *client, u8 value); |
83 | extern s32 i2c_smbus_read_byte_data(struct i2c_client *client, u8 command); | 84 | extern s32 i2c_smbus_read_byte_data(const struct i2c_client *client, |
84 | extern s32 i2c_smbus_write_byte_data(struct i2c_client *client, | 85 | u8 command); |
86 | extern s32 i2c_smbus_write_byte_data(const struct i2c_client *client, | ||
85 | u8 command, u8 value); | 87 | u8 command, u8 value); |
86 | extern s32 i2c_smbus_read_word_data(struct i2c_client *client, u8 command); | 88 | extern s32 i2c_smbus_read_word_data(const struct i2c_client *client, |
87 | extern s32 i2c_smbus_write_word_data(struct i2c_client *client, | 89 | u8 command); |
90 | extern s32 i2c_smbus_write_word_data(const struct i2c_client *client, | ||
88 | u8 command, u16 value); | 91 | u8 command, u16 value); |
89 | /* Returns the number of read bytes */ | 92 | /* Returns the number of read bytes */ |
90 | extern s32 i2c_smbus_read_block_data(struct i2c_client *client, | 93 | extern s32 i2c_smbus_read_block_data(const struct i2c_client *client, |
91 | u8 command, u8 *values); | 94 | u8 command, u8 *values); |
92 | extern s32 i2c_smbus_write_block_data(struct i2c_client *client, | 95 | extern s32 i2c_smbus_write_block_data(const struct i2c_client *client, |
93 | u8 command, u8 length, const u8 *values); | 96 | u8 command, u8 length, const u8 *values); |
94 | /* Returns the number of read bytes */ | 97 | /* Returns the number of read bytes */ |
95 | extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client *client, | 98 | extern s32 i2c_smbus_read_i2c_block_data(const struct i2c_client *client, |
96 | u8 command, u8 length, u8 *values); | 99 | u8 command, u8 length, u8 *values); |
97 | extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client *client, | 100 | extern s32 i2c_smbus_write_i2c_block_data(const struct i2c_client *client, |
98 | u8 command, u8 length, | 101 | u8 command, u8 length, |
99 | const u8 *values); | 102 | const u8 *values); |
100 | #endif /* I2C */ | 103 | #endif /* I2C */ |
diff --git a/include/linux/i2c/ds620.h b/include/linux/i2c/ds620.h new file mode 100644 index 000000000000..736bb87ac0fc --- /dev/null +++ b/include/linux/i2c/ds620.h | |||
@@ -0,0 +1,21 @@ | |||
1 | #ifndef _LINUX_DS620_H | ||
2 | #define _LINUX_DS620_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | #include <linux/i2c.h> | ||
6 | |||
7 | /* platform data for the DS620 temperature sensor and thermostat */ | ||
8 | |||
9 | struct ds620_platform_data { | ||
10 | /* | ||
11 | * Thermostat output pin PO mode: | ||
12 | * 0 = always low (default) | ||
13 | * 1 = PO_LOW | ||
14 | * 2 = PO_HIGH | ||
15 | * | ||
16 | * (see Documentation/hwmon/ds620) | ||
17 | */ | ||
18 | int pomode; | ||
19 | }; | ||
20 | |||
21 | #endif /* _LINUX_DS620_H */ | ||
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index c760991b354a..61b9609e55f2 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
@@ -593,6 +593,13 @@ enum twl4030_usb_mode { | |||
593 | 593 | ||
594 | struct twl4030_usb_data { | 594 | struct twl4030_usb_data { |
595 | enum twl4030_usb_mode usb_mode; | 595 | enum twl4030_usb_mode usb_mode; |
596 | |||
597 | int (*phy_init)(struct device *dev); | ||
598 | int (*phy_exit)(struct device *dev); | ||
599 | /* Power on/off the PHY */ | ||
600 | int (*phy_power)(struct device *dev, int iD, int on); | ||
601 | /* enable/disable phy clocks */ | ||
602 | int (*phy_set_clock)(struct device *dev, int on); | ||
596 | }; | 603 | }; |
597 | 604 | ||
598 | struct twl4030_ins { | 605 | struct twl4030_ins { |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index ed5a03cbe184..6042228954a7 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -122,6 +122,7 @@ | |||
122 | 122 | ||
123 | /* U-APSD queue for WMM IEs sent by AP */ | 123 | /* U-APSD queue for WMM IEs sent by AP */ |
124 | #define IEEE80211_WMM_IE_AP_QOSINFO_UAPSD (1<<7) | 124 | #define IEEE80211_WMM_IE_AP_QOSINFO_UAPSD (1<<7) |
125 | #define IEEE80211_WMM_IE_AP_QOSINFO_PARAM_SET_CNT_MASK 0x0f | ||
125 | 126 | ||
126 | /* U-APSD queues for WMM IEs sent by STA */ | 127 | /* U-APSD queues for WMM IEs sent by STA */ |
127 | #define IEEE80211_WMM_IE_STA_QOSINFO_AC_VO (1<<0) | 128 | #define IEEE80211_WMM_IE_STA_QOSINFO_AC_VO (1<<0) |
@@ -535,7 +536,6 @@ struct ieee80211s_hdr { | |||
535 | __le32 seqnum; | 536 | __le32 seqnum; |
536 | u8 eaddr1[6]; | 537 | u8 eaddr1[6]; |
537 | u8 eaddr2[6]; | 538 | u8 eaddr2[6]; |
538 | u8 eaddr3[6]; | ||
539 | } __attribute__ ((packed)); | 539 | } __attribute__ ((packed)); |
540 | 540 | ||
541 | /* Mesh flags */ | 541 | /* Mesh flags */ |
@@ -1223,6 +1223,9 @@ enum ieee80211_eid { | |||
1223 | WLAN_EID_BSS_AC_ACCESS_DELAY = 68, | 1223 | WLAN_EID_BSS_AC_ACCESS_DELAY = 68, |
1224 | WLAN_EID_RRM_ENABLED_CAPABILITIES = 70, | 1224 | WLAN_EID_RRM_ENABLED_CAPABILITIES = 70, |
1225 | WLAN_EID_MULTIPLE_BSSID = 71, | 1225 | WLAN_EID_MULTIPLE_BSSID = 71, |
1226 | WLAN_EID_BSS_COEX_2040 = 72, | ||
1227 | WLAN_EID_OVERLAP_BSS_SCAN_PARAM = 74, | ||
1228 | WLAN_EID_EXT_CAPABILITY = 127, | ||
1226 | 1229 | ||
1227 | WLAN_EID_MOBILITY_DOMAIN = 54, | 1230 | WLAN_EID_MOBILITY_DOMAIN = 54, |
1228 | WLAN_EID_FAST_BSS_TRANSITION = 55, | 1231 | WLAN_EID_FAST_BSS_TRANSITION = 55, |
@@ -1287,6 +1290,31 @@ enum ieee80211_key_len { | |||
1287 | WLAN_KEY_LEN_AES_CMAC = 16, | 1290 | WLAN_KEY_LEN_AES_CMAC = 16, |
1288 | }; | 1291 | }; |
1289 | 1292 | ||
1293 | /** | ||
1294 | * enum - mesh path selection protocol identifier | ||
1295 | * | ||
1296 | * @IEEE80211_PATH_PROTOCOL_HWMP: the default path selection protocol | ||
1297 | * @IEEE80211_PATH_PROTOCOL_VENDOR: a vendor specific protocol that will | ||
1298 | * be specified in a vendor specific information element | ||
1299 | */ | ||
1300 | enum { | ||
1301 | IEEE80211_PATH_PROTOCOL_HWMP = 0, | ||
1302 | IEEE80211_PATH_PROTOCOL_VENDOR = 255, | ||
1303 | }; | ||
1304 | |||
1305 | /** | ||
1306 | * enum - mesh path selection metric identifier | ||
1307 | * | ||
1308 | * @IEEE80211_PATH_METRIC_AIRTIME: the default path selection metric | ||
1309 | * @IEEE80211_PATH_METRIC_VENDOR: a vendor specific metric that will be | ||
1310 | * specified in a vendor specific information element | ||
1311 | */ | ||
1312 | enum { | ||
1313 | IEEE80211_PATH_METRIC_AIRTIME = 0, | ||
1314 | IEEE80211_PATH_METRIC_VENDOR = 255, | ||
1315 | }; | ||
1316 | |||
1317 | |||
1290 | /* | 1318 | /* |
1291 | * IEEE 802.11-2007 7.3.2.9 Country information element | 1319 | * IEEE 802.11-2007 7.3.2.9 Country information element |
1292 | * | 1320 | * |
diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h index 0d241a5c4909..dd3f20139640 100644 --- a/include/linux/if_bridge.h +++ b/include/linux/if_bridge.h | |||
@@ -102,7 +102,9 @@ struct __fdb_entry { | |||
102 | #include <linux/netdevice.h> | 102 | #include <linux/netdevice.h> |
103 | 103 | ||
104 | extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *)); | 104 | extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *)); |
105 | extern int (*br_should_route_hook)(struct sk_buff *skb); | 105 | |
106 | typedef int br_should_route_hook_t(struct sk_buff *skb); | ||
107 | extern br_should_route_hook_t __rcu *br_should_route_hook; | ||
106 | 108 | ||
107 | #endif | 109 | #endif |
108 | 110 | ||
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index f9c3df03db0f..be69043d2896 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
@@ -72,6 +72,7 @@ | |||
72 | #define ETH_P_MPLS_UC 0x8847 /* MPLS Unicast traffic */ | 72 | #define ETH_P_MPLS_UC 0x8847 /* MPLS Unicast traffic */ |
73 | #define ETH_P_MPLS_MC 0x8848 /* MPLS Multicast traffic */ | 73 | #define ETH_P_MPLS_MC 0x8848 /* MPLS Multicast traffic */ |
74 | #define ETH_P_ATMMPOA 0x884c /* MultiProtocol Over ATM */ | 74 | #define ETH_P_ATMMPOA 0x884c /* MultiProtocol Over ATM */ |
75 | #define ETH_P_LINK_CTL 0x886c /* HPNA, wlan link local tunnel */ | ||
75 | #define ETH_P_ATMFATE 0x8884 /* Frame-based ATM Transport | 76 | #define ETH_P_ATMFATE 0x8884 /* Frame-based ATM Transport |
76 | * over Ethernet | 77 | * over Ethernet |
77 | */ | 78 | */ |
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index 2fc66dd783ee..6485d2a89bec 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
@@ -80,6 +80,24 @@ struct rtnl_link_ifmap { | |||
80 | __u8 port; | 80 | __u8 port; |
81 | }; | 81 | }; |
82 | 82 | ||
83 | /* | ||
84 | * IFLA_AF_SPEC | ||
85 | * Contains nested attributes for address family specific attributes. | ||
86 | * Each address family may create a attribute with the address family | ||
87 | * number as type and create its own attribute structure in it. | ||
88 | * | ||
89 | * Example: | ||
90 | * [IFLA_AF_SPEC] = { | ||
91 | * [AF_INET] = { | ||
92 | * [IFLA_INET_CONF] = ..., | ||
93 | * }, | ||
94 | * [AF_INET6] = { | ||
95 | * [IFLA_INET6_FLAGS] = ..., | ||
96 | * [IFLA_INET6_CONF] = ..., | ||
97 | * } | ||
98 | * } | ||
99 | */ | ||
100 | |||
83 | enum { | 101 | enum { |
84 | IFLA_UNSPEC, | 102 | IFLA_UNSPEC, |
85 | IFLA_ADDRESS, | 103 | IFLA_ADDRESS, |
@@ -116,6 +134,7 @@ enum { | |||
116 | IFLA_STATS64, | 134 | IFLA_STATS64, |
117 | IFLA_VF_PORTS, | 135 | IFLA_VF_PORTS, |
118 | IFLA_PORT_SELF, | 136 | IFLA_PORT_SELF, |
137 | IFLA_AF_SPEC, | ||
119 | __IFLA_MAX | 138 | __IFLA_MAX |
120 | }; | 139 | }; |
121 | 140 | ||
@@ -128,6 +147,14 @@ enum { | |||
128 | #define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg)) | 147 | #define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg)) |
129 | #endif | 148 | #endif |
130 | 149 | ||
150 | enum { | ||
151 | IFLA_INET_UNSPEC, | ||
152 | IFLA_INET_CONF, | ||
153 | __IFLA_INET_MAX, | ||
154 | }; | ||
155 | |||
156 | #define IFLA_INET_MAX (__IFLA_INET_MAX - 1) | ||
157 | |||
131 | /* ifi_flags. | 158 | /* ifi_flags. |
132 | 159 | ||
133 | IFF_* flags. | 160 | IFF_* flags. |
@@ -232,6 +259,7 @@ enum macvlan_mode { | |||
232 | MACVLAN_MODE_PRIVATE = 1, /* don't talk to other macvlans */ | 259 | MACVLAN_MODE_PRIVATE = 1, /* don't talk to other macvlans */ |
233 | MACVLAN_MODE_VEPA = 2, /* talk to other ports through ext bridge */ | 260 | MACVLAN_MODE_VEPA = 2, /* talk to other ports through ext bridge */ |
234 | MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */ | 261 | MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */ |
262 | MACVLAN_MODE_PASSTHRU = 8,/* take over the underlying device */ | ||
235 | }; | 263 | }; |
236 | 264 | ||
237 | /* SR-IOV virtual function management section */ | 265 | /* SR-IOV virtual function management section */ |
diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h index 8a2fd66a8b5f..e28b2e4959d4 100644 --- a/include/linux/if_macvlan.h +++ b/include/linux/if_macvlan.h | |||
@@ -25,19 +25,25 @@ struct macvlan_port; | |||
25 | struct macvtap_queue; | 25 | struct macvtap_queue; |
26 | 26 | ||
27 | /** | 27 | /** |
28 | * struct macvlan_rx_stats - MACVLAN percpu rx stats | 28 | * struct macvlan_pcpu_stats - MACVLAN percpu stats |
29 | * @rx_packets: number of received packets | 29 | * @rx_packets: number of received packets |
30 | * @rx_bytes: number of received bytes | 30 | * @rx_bytes: number of received bytes |
31 | * @rx_multicast: number of received multicast packets | 31 | * @rx_multicast: number of received multicast packets |
32 | * @tx_packets: number of transmitted packets | ||
33 | * @tx_bytes: number of transmitted bytes | ||
32 | * @syncp: synchronization point for 64bit counters | 34 | * @syncp: synchronization point for 64bit counters |
33 | * @rx_errors: number of errors | 35 | * @rx_errors: number of rx errors |
36 | * @tx_dropped: number of tx dropped packets | ||
34 | */ | 37 | */ |
35 | struct macvlan_rx_stats { | 38 | struct macvlan_pcpu_stats { |
36 | u64 rx_packets; | 39 | u64 rx_packets; |
37 | u64 rx_bytes; | 40 | u64 rx_bytes; |
38 | u64 rx_multicast; | 41 | u64 rx_multicast; |
42 | u64 tx_packets; | ||
43 | u64 tx_bytes; | ||
39 | struct u64_stats_sync syncp; | 44 | struct u64_stats_sync syncp; |
40 | unsigned long rx_errors; | 45 | u32 rx_errors; |
46 | u32 tx_dropped; | ||
41 | }; | 47 | }; |
42 | 48 | ||
43 | /* | 49 | /* |
@@ -52,7 +58,7 @@ struct macvlan_dev { | |||
52 | struct hlist_node hlist; | 58 | struct hlist_node hlist; |
53 | struct macvlan_port *port; | 59 | struct macvlan_port *port; |
54 | struct net_device *lowerdev; | 60 | struct net_device *lowerdev; |
55 | struct macvlan_rx_stats __percpu *rx_stats; | 61 | struct macvlan_pcpu_stats __percpu *pcpu_stats; |
56 | enum macvlan_mode mode; | 62 | enum macvlan_mode mode; |
57 | int (*receive)(struct sk_buff *skb); | 63 | int (*receive)(struct sk_buff *skb); |
58 | int (*forward)(struct net_device *dev, struct sk_buff *skb); | 64 | int (*forward)(struct net_device *dev, struct sk_buff *skb); |
@@ -64,18 +70,18 @@ static inline void macvlan_count_rx(const struct macvlan_dev *vlan, | |||
64 | unsigned int len, bool success, | 70 | unsigned int len, bool success, |
65 | bool multicast) | 71 | bool multicast) |
66 | { | 72 | { |
67 | struct macvlan_rx_stats *rx_stats; | ||
68 | |||
69 | rx_stats = this_cpu_ptr(vlan->rx_stats); | ||
70 | if (likely(success)) { | 73 | if (likely(success)) { |
71 | u64_stats_update_begin(&rx_stats->syncp); | 74 | struct macvlan_pcpu_stats *pcpu_stats; |
72 | rx_stats->rx_packets++;; | 75 | |
73 | rx_stats->rx_bytes += len; | 76 | pcpu_stats = this_cpu_ptr(vlan->pcpu_stats); |
77 | u64_stats_update_begin(&pcpu_stats->syncp); | ||
78 | pcpu_stats->rx_packets++; | ||
79 | pcpu_stats->rx_bytes += len; | ||
74 | if (multicast) | 80 | if (multicast) |
75 | rx_stats->rx_multicast++; | 81 | pcpu_stats->rx_multicast++; |
76 | u64_stats_update_end(&rx_stats->syncp); | 82 | u64_stats_update_end(&pcpu_stats->syncp); |
77 | } else { | 83 | } else { |
78 | rx_stats->rx_errors++; | 84 | this_cpu_inc(vlan->pcpu_stats->rx_errors); |
79 | } | 85 | } |
80 | } | 86 | } |
81 | 87 | ||
diff --git a/include/linux/igmp.h b/include/linux/igmp.h index 93fc2449af10..74cfcff0148b 100644 --- a/include/linux/igmp.h +++ b/include/linux/igmp.h | |||
@@ -85,9 +85,9 @@ struct igmpv3_query { | |||
85 | #define IGMP_DVMRP 0x13 /* DVMRP routing */ | 85 | #define IGMP_DVMRP 0x13 /* DVMRP routing */ |
86 | #define IGMP_PIM 0x14 /* PIM routing */ | 86 | #define IGMP_PIM 0x14 /* PIM routing */ |
87 | #define IGMP_TRACE 0x15 | 87 | #define IGMP_TRACE 0x15 |
88 | #define IGMPV2_HOST_MEMBERSHIP_REPORT 0x16 /* V2 version of 0x11 */ | 88 | #define IGMPV2_HOST_MEMBERSHIP_REPORT 0x16 /* V2 version of 0x12 */ |
89 | #define IGMP_HOST_LEAVE_MESSAGE 0x17 | 89 | #define IGMP_HOST_LEAVE_MESSAGE 0x17 |
90 | #define IGMPV3_HOST_MEMBERSHIP_REPORT 0x22 /* V3 version of 0x11 */ | 90 | #define IGMPV3_HOST_MEMBERSHIP_REPORT 0x22 /* V3 version of 0x12 */ |
91 | 91 | ||
92 | #define IGMP_MTRACE_RESP 0x1e | 92 | #define IGMP_MTRACE_RESP 0x1e |
93 | #define IGMP_MTRACE 0x1f | 93 | #define IGMP_MTRACE 0x1f |
@@ -167,10 +167,10 @@ struct ip_sf_socklist { | |||
167 | */ | 167 | */ |
168 | 168 | ||
169 | struct ip_mc_socklist { | 169 | struct ip_mc_socklist { |
170 | struct ip_mc_socklist *next; | 170 | struct ip_mc_socklist __rcu *next_rcu; |
171 | struct ip_mreqn multi; | 171 | struct ip_mreqn multi; |
172 | unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */ | 172 | unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */ |
173 | struct ip_sf_socklist *sflist; | 173 | struct ip_sf_socklist __rcu *sflist; |
174 | struct rcu_head rcu; | 174 | struct rcu_head rcu; |
175 | }; | 175 | }; |
176 | 176 | ||
@@ -186,11 +186,14 @@ struct ip_sf_list { | |||
186 | struct ip_mc_list { | 186 | struct ip_mc_list { |
187 | struct in_device *interface; | 187 | struct in_device *interface; |
188 | __be32 multiaddr; | 188 | __be32 multiaddr; |
189 | unsigned int sfmode; | ||
189 | struct ip_sf_list *sources; | 190 | struct ip_sf_list *sources; |
190 | struct ip_sf_list *tomb; | 191 | struct ip_sf_list *tomb; |
191 | unsigned int sfmode; | ||
192 | unsigned long sfcount[2]; | 192 | unsigned long sfcount[2]; |
193 | struct ip_mc_list *next; | 193 | union { |
194 | struct ip_mc_list *next; | ||
195 | struct ip_mc_list __rcu *next_rcu; | ||
196 | }; | ||
194 | struct timer_list timer; | 197 | struct timer_list timer; |
195 | int users; | 198 | int users; |
196 | atomic_t refcnt; | 199 | atomic_t refcnt; |
@@ -201,6 +204,7 @@ struct ip_mc_list { | |||
201 | char loaded; | 204 | char loaded; |
202 | unsigned char gsquery; /* check source marks? */ | 205 | unsigned char gsquery; /* check source marks? */ |
203 | unsigned char crcount; | 206 | unsigned char crcount; |
207 | struct rcu_head rcu; | ||
204 | }; | 208 | }; |
205 | 209 | ||
206 | /* V3 exponential field decoding */ | 210 | /* V3 exponential field decoding */ |
@@ -234,7 +238,7 @@ extern void ip_mc_unmap(struct in_device *); | |||
234 | extern void ip_mc_remap(struct in_device *); | 238 | extern void ip_mc_remap(struct in_device *); |
235 | extern void ip_mc_dec_group(struct in_device *in_dev, __be32 addr); | 239 | extern void ip_mc_dec_group(struct in_device *in_dev, __be32 addr); |
236 | extern void ip_mc_inc_group(struct in_device *in_dev, __be32 addr); | 240 | extern void ip_mc_inc_group(struct in_device *in_dev, __be32 addr); |
237 | extern void ip_mc_rejoin_group(struct ip_mc_list *im); | 241 | extern void ip_mc_rejoin_groups(struct in_device *in_dev); |
238 | 242 | ||
239 | #endif | 243 | #endif |
240 | #endif | 244 | #endif |
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index ccd5b07d678d..ae8fdc54e0c0 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -41,10 +41,12 @@ enum | |||
41 | __IPV4_DEVCONF_MAX | 41 | __IPV4_DEVCONF_MAX |
42 | }; | 42 | }; |
43 | 43 | ||
44 | #define IPV4_DEVCONF_MAX (__IPV4_DEVCONF_MAX - 1) | ||
45 | |||
44 | struct ipv4_devconf { | 46 | struct ipv4_devconf { |
45 | void *sysctl; | 47 | void *sysctl; |
46 | int data[__IPV4_DEVCONF_MAX - 1]; | 48 | int data[IPV4_DEVCONF_MAX]; |
47 | DECLARE_BITMAP(state, __IPV4_DEVCONF_MAX - 1); | 49 | DECLARE_BITMAP(state, IPV4_DEVCONF_MAX); |
48 | }; | 50 | }; |
49 | 51 | ||
50 | struct in_device { | 52 | struct in_device { |
@@ -52,9 +54,8 @@ struct in_device { | |||
52 | atomic_t refcnt; | 54 | atomic_t refcnt; |
53 | int dead; | 55 | int dead; |
54 | struct in_ifaddr *ifa_list; /* IP ifaddr chain */ | 56 | struct in_ifaddr *ifa_list; /* IP ifaddr chain */ |
55 | rwlock_t mc_list_lock; | 57 | struct ip_mc_list __rcu *mc_list; /* IP multicast filter chain */ |
56 | struct ip_mc_list *mc_list; /* IP multicast filter chain */ | 58 | int mc_count; /* Number of installed mcasts */ |
57 | int mc_count; /* Number of installed mcasts */ | ||
58 | spinlock_t mc_tomb_lock; | 59 | spinlock_t mc_tomb_lock; |
59 | struct ip_mc_list *mc_tomb; | 60 | struct ip_mc_list *mc_tomb; |
60 | unsigned long mr_v1_seen; | 61 | unsigned long mr_v1_seen; |
@@ -91,7 +92,7 @@ static inline void ipv4_devconf_set(struct in_device *in_dev, int index, | |||
91 | 92 | ||
92 | static inline void ipv4_devconf_setall(struct in_device *in_dev) | 93 | static inline void ipv4_devconf_setall(struct in_device *in_dev) |
93 | { | 94 | { |
94 | bitmap_fill(in_dev->cnf.state, __IPV4_DEVCONF_MAX - 1); | 95 | bitmap_fill(in_dev->cnf.state, IPV4_DEVCONF_MAX); |
95 | } | 96 | } |
96 | 97 | ||
97 | #define IN_DEV_CONF_GET(in_dev, attr) \ | 98 | #define IN_DEV_CONF_GET(in_dev, attr) \ |
@@ -221,7 +222,7 @@ static inline struct in_device *in_dev_get(const struct net_device *dev) | |||
221 | 222 | ||
222 | static inline struct in_device *__in_dev_get_rtnl(const struct net_device *dev) | 223 | static inline struct in_device *__in_dev_get_rtnl(const struct net_device *dev) |
223 | { | 224 | { |
224 | return rcu_dereference_check(dev->ip_ptr, lockdep_rtnl_is_held()); | 225 | return rtnl_dereference(dev->ip_ptr); |
225 | } | 226 | } |
226 | 227 | ||
227 | extern void in_dev_finish_destroy(struct in_device *idev); | 228 | extern void in_dev_finish_destroy(struct in_device *idev); |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 1f8c06ce0fa6..caa151fbebb7 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -12,6 +12,13 @@ | |||
12 | #include <linux/securebits.h> | 12 | #include <linux/securebits.h> |
13 | #include <net/net_namespace.h> | 13 | #include <net/net_namespace.h> |
14 | 14 | ||
15 | #ifdef CONFIG_SMP | ||
16 | # define INIT_PUSHABLE_TASKS(tsk) \ | ||
17 | .pushable_tasks = PLIST_NODE_INIT(tsk.pushable_tasks, MAX_PRIO), | ||
18 | #else | ||
19 | # define INIT_PUSHABLE_TASKS(tsk) | ||
20 | #endif | ||
21 | |||
15 | extern struct files_struct init_files; | 22 | extern struct files_struct init_files; |
16 | extern struct fs_struct init_fs; | 23 | extern struct fs_struct init_fs; |
17 | 24 | ||
@@ -83,6 +90,12 @@ extern struct group_info init_groups; | |||
83 | */ | 90 | */ |
84 | # define CAP_INIT_BSET CAP_FULL_SET | 91 | # define CAP_INIT_BSET CAP_FULL_SET |
85 | 92 | ||
93 | #ifdef CONFIG_RCU_BOOST | ||
94 | #define INIT_TASK_RCU_BOOST() \ | ||
95 | .rcu_boost_mutex = NULL, | ||
96 | #else | ||
97 | #define INIT_TASK_RCU_BOOST() | ||
98 | #endif | ||
86 | #ifdef CONFIG_TREE_PREEMPT_RCU | 99 | #ifdef CONFIG_TREE_PREEMPT_RCU |
87 | #define INIT_TASK_RCU_TREE_PREEMPT() \ | 100 | #define INIT_TASK_RCU_TREE_PREEMPT() \ |
88 | .rcu_blocked_node = NULL, | 101 | .rcu_blocked_node = NULL, |
@@ -94,7 +107,8 @@ extern struct group_info init_groups; | |||
94 | .rcu_read_lock_nesting = 0, \ | 107 | .rcu_read_lock_nesting = 0, \ |
95 | .rcu_read_unlock_special = 0, \ | 108 | .rcu_read_unlock_special = 0, \ |
96 | .rcu_node_entry = LIST_HEAD_INIT(tsk.rcu_node_entry), \ | 109 | .rcu_node_entry = LIST_HEAD_INIT(tsk.rcu_node_entry), \ |
97 | INIT_TASK_RCU_TREE_PREEMPT() | 110 | INIT_TASK_RCU_TREE_PREEMPT() \ |
111 | INIT_TASK_RCU_BOOST() | ||
98 | #else | 112 | #else |
99 | #define INIT_TASK_RCU_PREEMPT(tsk) | 113 | #define INIT_TASK_RCU_PREEMPT(tsk) |
100 | #endif | 114 | #endif |
@@ -137,7 +151,7 @@ extern struct cred init_cred; | |||
137 | .nr_cpus_allowed = NR_CPUS, \ | 151 | .nr_cpus_allowed = NR_CPUS, \ |
138 | }, \ | 152 | }, \ |
139 | .tasks = LIST_HEAD_INIT(tsk.tasks), \ | 153 | .tasks = LIST_HEAD_INIT(tsk.tasks), \ |
140 | .pushable_tasks = PLIST_NODE_INIT(tsk.pushable_tasks, MAX_PRIO), \ | 154 | INIT_PUSHABLE_TASKS(tsk) \ |
141 | .ptraced = LIST_HEAD_INIT(tsk.ptraced), \ | 155 | .ptraced = LIST_HEAD_INIT(tsk.ptraced), \ |
142 | .ptrace_entry = LIST_HEAD_INIT(tsk.ptrace_entry), \ | 156 | .ptrace_entry = LIST_HEAD_INIT(tsk.ptrace_entry), \ |
143 | .real_parent = &tsk, \ | 157 | .real_parent = &tsk, \ |
diff --git a/include/linux/input.h b/include/linux/input.h index 9777668883be..c4e9d91ec979 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -112,6 +112,7 @@ struct input_keymap_entry { | |||
112 | #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ | 112 | #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ |
113 | #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ | 113 | #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ |
114 | #define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len) /* get unique identifier */ | 114 | #define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len) /* get unique identifier */ |
115 | #define EVIOCGPROP(len) _IOC(_IOC_READ, 'E', 0x09, len) /* get device properties */ | ||
115 | 116 | ||
116 | #define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global key state */ | 117 | #define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global key state */ |
117 | #define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */ | 118 | #define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */ |
@@ -129,6 +130,18 @@ struct input_keymap_entry { | |||
129 | #define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */ | 130 | #define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */ |
130 | 131 | ||
131 | /* | 132 | /* |
133 | * Device properties and quirks | ||
134 | */ | ||
135 | |||
136 | #define INPUT_PROP_POINTER 0x00 /* needs a pointer */ | ||
137 | #define INPUT_PROP_DIRECT 0x01 /* direct input devices */ | ||
138 | #define INPUT_PROP_BUTTONPAD 0x02 /* has button(s) under pad */ | ||
139 | #define INPUT_PROP_SEMI_MT 0x03 /* touch rectangle only */ | ||
140 | |||
141 | #define INPUT_PROP_MAX 0x1f | ||
142 | #define INPUT_PROP_CNT (INPUT_PROP_MAX + 1) | ||
143 | |||
144 | /* | ||
132 | * Event types | 145 | * Event types |
133 | */ | 146 | */ |
134 | 147 | ||
@@ -590,6 +603,8 @@ struct input_keymap_entry { | |||
590 | #define KEY_FRAMEFORWARD 0x1b5 | 603 | #define KEY_FRAMEFORWARD 0x1b5 |
591 | #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ | 604 | #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ |
592 | #define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ | 605 | #define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ |
606 | #define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */ | ||
607 | #define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */ | ||
593 | 608 | ||
594 | #define KEY_DEL_EOL 0x1c0 | 609 | #define KEY_DEL_EOL 0x1c0 |
595 | #define KEY_DEL_EOS 0x1c1 | 610 | #define KEY_DEL_EOS 0x1c1 |
@@ -758,11 +773,12 @@ struct input_keymap_entry { | |||
758 | #define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ | 773 | #define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ |
759 | #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ | 774 | #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ |
760 | #define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ | 775 | #define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ |
776 | #define ABS_MT_DISTANCE 0x3b /* Contact hover distance */ | ||
761 | 777 | ||
762 | #ifdef __KERNEL__ | 778 | #ifdef __KERNEL__ |
763 | /* Implementation details, userspace should not care about these */ | 779 | /* Implementation details, userspace should not care about these */ |
764 | #define ABS_MT_FIRST ABS_MT_TOUCH_MAJOR | 780 | #define ABS_MT_FIRST ABS_MT_TOUCH_MAJOR |
765 | #define ABS_MT_LAST ABS_MT_PRESSURE | 781 | #define ABS_MT_LAST ABS_MT_DISTANCE |
766 | #endif | 782 | #endif |
767 | 783 | ||
768 | #define ABS_MAX 0x3f | 784 | #define ABS_MAX 0x3f |
@@ -873,6 +889,7 @@ struct input_keymap_entry { | |||
873 | */ | 889 | */ |
874 | #define MT_TOOL_FINGER 0 | 890 | #define MT_TOOL_FINGER 0 |
875 | #define MT_TOOL_PEN 1 | 891 | #define MT_TOOL_PEN 1 |
892 | #define MT_TOOL_MAX 1 | ||
876 | 893 | ||
877 | /* | 894 | /* |
878 | * Values describing the status of a force-feedback effect | 895 | * Values describing the status of a force-feedback effect |
@@ -1108,19 +1125,12 @@ struct ff_effect { | |||
1108 | #include <linux/mod_devicetable.h> | 1125 | #include <linux/mod_devicetable.h> |
1109 | 1126 | ||
1110 | /** | 1127 | /** |
1111 | * struct input_mt_slot - represents the state of an input MT slot | ||
1112 | * @abs: holds current values of ABS_MT axes for this slot | ||
1113 | */ | ||
1114 | struct input_mt_slot { | ||
1115 | int abs[ABS_MT_LAST - ABS_MT_FIRST + 1]; | ||
1116 | }; | ||
1117 | |||
1118 | /** | ||
1119 | * struct input_dev - represents an input device | 1128 | * struct input_dev - represents an input device |
1120 | * @name: name of the device | 1129 | * @name: name of the device |
1121 | * @phys: physical path to the device in the system hierarchy | 1130 | * @phys: physical path to the device in the system hierarchy |
1122 | * @uniq: unique identification code for the device (if device has it) | 1131 | * @uniq: unique identification code for the device (if device has it) |
1123 | * @id: id of the device (struct input_id) | 1132 | * @id: id of the device (struct input_id) |
1133 | * @propbit: bitmap of device properties and quirks | ||
1124 | * @evbit: bitmap of types of events supported by the device (EV_KEY, | 1134 | * @evbit: bitmap of types of events supported by the device (EV_KEY, |
1125 | * EV_REL, etc.) | 1135 | * EV_REL, etc.) |
1126 | * @keybit: bitmap of keys/buttons this device has | 1136 | * @keybit: bitmap of keys/buttons this device has |
@@ -1155,6 +1165,7 @@ struct input_mt_slot { | |||
1155 | * of tracked contacts | 1165 | * of tracked contacts |
1156 | * @mtsize: number of MT slots the device uses | 1166 | * @mtsize: number of MT slots the device uses |
1157 | * @slot: MT slot currently being transmitted | 1167 | * @slot: MT slot currently being transmitted |
1168 | * @trkid: stores MT tracking ID for the current contact | ||
1158 | * @absinfo: array of &struct input_absinfo elements holding information | 1169 | * @absinfo: array of &struct input_absinfo elements holding information |
1159 | * about absolute axes (current value, min, max, flat, fuzz, | 1170 | * about absolute axes (current value, min, max, flat, fuzz, |
1160 | * resolution) | 1171 | * resolution) |
@@ -1203,6 +1214,8 @@ struct input_dev { | |||
1203 | const char *uniq; | 1214 | const char *uniq; |
1204 | struct input_id id; | 1215 | struct input_id id; |
1205 | 1216 | ||
1217 | unsigned long propbit[BITS_TO_LONGS(INPUT_PROP_CNT)]; | ||
1218 | |||
1206 | unsigned long evbit[BITS_TO_LONGS(EV_CNT)]; | 1219 | unsigned long evbit[BITS_TO_LONGS(EV_CNT)]; |
1207 | unsigned long keybit[BITS_TO_LONGS(KEY_CNT)]; | 1220 | unsigned long keybit[BITS_TO_LONGS(KEY_CNT)]; |
1208 | unsigned long relbit[BITS_TO_LONGS(REL_CNT)]; | 1221 | unsigned long relbit[BITS_TO_LONGS(REL_CNT)]; |
@@ -1239,6 +1252,7 @@ struct input_dev { | |||
1239 | struct input_mt_slot *mt; | 1252 | struct input_mt_slot *mt; |
1240 | int mtsize; | 1253 | int mtsize; |
1241 | int slot; | 1254 | int slot; |
1255 | int trkid; | ||
1242 | 1256 | ||
1243 | struct input_absinfo *absinfo; | 1257 | struct input_absinfo *absinfo; |
1244 | 1258 | ||
@@ -1488,11 +1502,6 @@ static inline void input_mt_sync(struct input_dev *dev) | |||
1488 | input_event(dev, EV_SYN, SYN_MT_REPORT, 0); | 1502 | input_event(dev, EV_SYN, SYN_MT_REPORT, 0); |
1489 | } | 1503 | } |
1490 | 1504 | ||
1491 | static inline void input_mt_slot(struct input_dev *dev, int slot) | ||
1492 | { | ||
1493 | input_event(dev, EV_ABS, ABS_MT_SLOT, slot); | ||
1494 | } | ||
1495 | |||
1496 | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code); | 1505 | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code); |
1497 | 1506 | ||
1498 | /** | 1507 | /** |
@@ -1605,8 +1614,5 @@ int input_ff_erase(struct input_dev *dev, int effect_id, struct file *file); | |||
1605 | int input_ff_create_memless(struct input_dev *dev, void *data, | 1614 | int input_ff_create_memless(struct input_dev *dev, void *data, |
1606 | int (*play_effect)(struct input_dev *, void *, struct ff_effect *)); | 1615 | int (*play_effect)(struct input_dev *, void *, struct ff_effect *)); |
1607 | 1616 | ||
1608 | int input_mt_create_slots(struct input_dev *dev, unsigned int num_slots); | ||
1609 | void input_mt_destroy_slots(struct input_dev *dev); | ||
1610 | |||
1611 | #endif | 1617 | #endif |
1612 | #endif | 1618 | #endif |
diff --git a/include/linux/input/cma3000.h b/include/linux/input/cma3000.h new file mode 100644 index 000000000000..cbbaac27d311 --- /dev/null +++ b/include/linux/input/cma3000.h | |||
@@ -0,0 +1,59 @@ | |||
1 | /* | ||
2 | * VTI CMA3000_Dxx Accelerometer driver | ||
3 | * | ||
4 | * Copyright (C) 2010 Texas Instruments | ||
5 | * Author: Hemanth V <hemanthv@ti.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
14 | * more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along with | ||
17 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
18 | */ | ||
19 | |||
20 | #ifndef _LINUX_CMA3000_H | ||
21 | #define _LINUX_CMA3000_H | ||
22 | |||
23 | #define CMAMODE_DEFAULT 0 | ||
24 | #define CMAMODE_MEAS100 1 | ||
25 | #define CMAMODE_MEAS400 2 | ||
26 | #define CMAMODE_MEAS40 3 | ||
27 | #define CMAMODE_MOTDET 4 | ||
28 | #define CMAMODE_FF100 5 | ||
29 | #define CMAMODE_FF400 6 | ||
30 | #define CMAMODE_POFF 7 | ||
31 | |||
32 | #define CMARANGE_2G 2000 | ||
33 | #define CMARANGE_8G 8000 | ||
34 | |||
35 | /** | ||
36 | * struct cma3000_i2c_platform_data - CMA3000 Platform data | ||
37 | * @fuzz_x: Noise on X Axis | ||
38 | * @fuzz_y: Noise on Y Axis | ||
39 | * @fuzz_z: Noise on Z Axis | ||
40 | * @g_range: G range in milli g i.e 2000 or 8000 | ||
41 | * @mode: Operating mode | ||
42 | * @mdthr: Motion detect threshold value | ||
43 | * @mdfftmr: Motion detect and free fall time value | ||
44 | * @ffthr: Free fall threshold value | ||
45 | */ | ||
46 | |||
47 | struct cma3000_platform_data { | ||
48 | int fuzz_x; | ||
49 | int fuzz_y; | ||
50 | int fuzz_z; | ||
51 | int g_range; | ||
52 | uint8_t mode; | ||
53 | uint8_t mdthr; | ||
54 | uint8_t mdfftmr; | ||
55 | uint8_t ffthr; | ||
56 | unsigned long irqflags; | ||
57 | }; | ||
58 | |||
59 | #endif | ||
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h index 80352ad6581a..697474691749 100644 --- a/include/linux/input/matrix_keypad.h +++ b/include/linux/input/matrix_keypad.h | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | #define KEY(row, col, val) ((((row) & (MATRIX_MAX_ROWS - 1)) << 24) |\ | 10 | #define KEY(row, col, val) ((((row) & (MATRIX_MAX_ROWS - 1)) << 24) |\ |
11 | (((col) & (MATRIX_MAX_COLS - 1)) << 16) |\ | 11 | (((col) & (MATRIX_MAX_COLS - 1)) << 16) |\ |
12 | (val & 0xffff)) | 12 | ((val) & 0xffff)) |
13 | 13 | ||
14 | #define KEY_ROW(k) (((k) >> 24) & 0xff) | 14 | #define KEY_ROW(k) (((k) >> 24) & 0xff) |
15 | #define KEY_COL(k) (((k) >> 16) & 0xff) | 15 | #define KEY_COL(k) (((k) >> 16) & 0xff) |
diff --git a/include/linux/input/mt.h b/include/linux/input/mt.h new file mode 100644 index 000000000000..b3ac06a4435d --- /dev/null +++ b/include/linux/input/mt.h | |||
@@ -0,0 +1,57 @@ | |||
1 | #ifndef _INPUT_MT_H | ||
2 | #define _INPUT_MT_H | ||
3 | |||
4 | /* | ||
5 | * Input Multitouch Library | ||
6 | * | ||
7 | * Copyright (c) 2010 Henrik Rydberg | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License version 2 as published by | ||
11 | * the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include <linux/input.h> | ||
15 | |||
16 | #define TRKID_MAX 0xffff | ||
17 | |||
18 | /** | ||
19 | * struct input_mt_slot - represents the state of an input MT slot | ||
20 | * @abs: holds current values of ABS_MT axes for this slot | ||
21 | */ | ||
22 | struct input_mt_slot { | ||
23 | int abs[ABS_MT_LAST - ABS_MT_FIRST + 1]; | ||
24 | }; | ||
25 | |||
26 | static inline void input_mt_set_value(struct input_mt_slot *slot, | ||
27 | unsigned code, int value) | ||
28 | { | ||
29 | slot->abs[code - ABS_MT_FIRST] = value; | ||
30 | } | ||
31 | |||
32 | static inline int input_mt_get_value(const struct input_mt_slot *slot, | ||
33 | unsigned code) | ||
34 | { | ||
35 | return slot->abs[code - ABS_MT_FIRST]; | ||
36 | } | ||
37 | |||
38 | int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots); | ||
39 | void input_mt_destroy_slots(struct input_dev *dev); | ||
40 | |||
41 | static inline int input_mt_new_trkid(struct input_dev *dev) | ||
42 | { | ||
43 | return dev->trkid++ & TRKID_MAX; | ||
44 | } | ||
45 | |||
46 | static inline void input_mt_slot(struct input_dev *dev, int slot) | ||
47 | { | ||
48 | input_event(dev, EV_ABS, ABS_MT_SLOT, slot); | ||
49 | } | ||
50 | |||
51 | void input_mt_report_slot_state(struct input_dev *dev, | ||
52 | unsigned int tool_type, bool active); | ||
53 | |||
54 | void input_mt_report_finger_count(struct input_dev *dev, int count); | ||
55 | void input_mt_report_pointer_emulation(struct input_dev *dev, bool use_count); | ||
56 | |||
57 | #endif | ||
diff --git a/include/linux/intel-gtt.h b/include/linux/intel-gtt.h deleted file mode 100644 index 1d19ab2afa39..000000000000 --- a/include/linux/intel-gtt.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * Common Intel AGPGART and GTT definitions. | ||
3 | */ | ||
4 | #ifndef _INTEL_GTT_H | ||
5 | #define _INTEL_GTT_H | ||
6 | |||
7 | #include <linux/agp_backend.h> | ||
8 | |||
9 | /* This is for Intel only GTT controls. | ||
10 | * | ||
11 | * Sandybridge: AGP_USER_CACHED_MEMORY default to LLC only | ||
12 | */ | ||
13 | |||
14 | #define AGP_USER_CACHED_MEMORY_LLC_MLC (AGP_USER_TYPES + 2) | ||
15 | #define AGP_USER_UNCACHED_MEMORY (AGP_USER_TYPES + 4) | ||
16 | |||
17 | /* flag for GFDT type */ | ||
18 | #define AGP_USER_CACHED_MEMORY_GFDT (1 << 3) | ||
19 | |||
20 | #endif | ||
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 79d0c4f6d071..55e0d4253e49 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -114,15 +114,15 @@ typedef irqreturn_t (*irq_handler_t)(int, void *); | |||
114 | struct irqaction { | 114 | struct irqaction { |
115 | irq_handler_t handler; | 115 | irq_handler_t handler; |
116 | unsigned long flags; | 116 | unsigned long flags; |
117 | const char *name; | ||
118 | void *dev_id; | 117 | void *dev_id; |
119 | struct irqaction *next; | 118 | struct irqaction *next; |
120 | int irq; | 119 | int irq; |
121 | struct proc_dir_entry *dir; | ||
122 | irq_handler_t thread_fn; | 120 | irq_handler_t thread_fn; |
123 | struct task_struct *thread; | 121 | struct task_struct *thread; |
124 | unsigned long thread_flags; | 122 | unsigned long thread_flags; |
125 | }; | 123 | const char *name; |
124 | struct proc_dir_entry *dir; | ||
125 | } ____cacheline_internodealigned_in_smp; | ||
126 | 126 | ||
127 | extern irqreturn_t no_action(int cpl, void *dev_id); | 127 | extern irqreturn_t no_action(int cpl, void *dev_id); |
128 | 128 | ||
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 8e429d0e0405..0c997767429a 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -364,7 +364,7 @@ struct ipv6_pinfo { | |||
364 | 364 | ||
365 | __u32 dst_cookie; | 365 | __u32 dst_cookie; |
366 | 366 | ||
367 | struct ipv6_mc_socklist *ipv6_mc_list; | 367 | struct ipv6_mc_socklist __rcu *ipv6_mc_list; |
368 | struct ipv6_ac_socklist *ipv6_ac_list; | 368 | struct ipv6_ac_socklist *ipv6_ac_list; |
369 | struct ipv6_fl_socklist *ipv6_fl_list; | 369 | struct ipv6_fl_socklist *ipv6_fl_list; |
370 | 370 | ||
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 2ae86aa21fce..27e79c27ba08 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -94,7 +94,7 @@ extern void jbd2_free(void *ptr, size_t size); | |||
94 | * | 94 | * |
95 | * This is an opaque datatype. | 95 | * This is an opaque datatype. |
96 | **/ | 96 | **/ |
97 | typedef struct handle_s handle_t; /* Atomic operation type */ | 97 | typedef struct jbd2_journal_handle handle_t; /* Atomic operation type */ |
98 | 98 | ||
99 | 99 | ||
100 | /** | 100 | /** |
@@ -416,7 +416,7 @@ struct jbd2_revoke_table_s; | |||
416 | * in so it can be fixed later. | 416 | * in so it can be fixed later. |
417 | */ | 417 | */ |
418 | 418 | ||
419 | struct handle_s | 419 | struct jbd2_journal_handle |
420 | { | 420 | { |
421 | /* Which compound transaction is this update a part of? */ | 421 | /* Which compound transaction is this update a part of? */ |
422 | transaction_t *h_transaction; | 422 | transaction_t *h_transaction; |
@@ -1158,6 +1158,22 @@ static inline void jbd2_free_handle(handle_t *handle) | |||
1158 | kmem_cache_free(jbd2_handle_cache, handle); | 1158 | kmem_cache_free(jbd2_handle_cache, handle); |
1159 | } | 1159 | } |
1160 | 1160 | ||
1161 | /* | ||
1162 | * jbd2_inode management (optional, for those file systems that want to use | ||
1163 | * dynamically allocated jbd2_inode structures) | ||
1164 | */ | ||
1165 | extern struct kmem_cache *jbd2_inode_cache; | ||
1166 | |||
1167 | static inline struct jbd2_inode *jbd2_alloc_inode(gfp_t gfp_flags) | ||
1168 | { | ||
1169 | return kmem_cache_alloc(jbd2_inode_cache, gfp_flags); | ||
1170 | } | ||
1171 | |||
1172 | static inline void jbd2_free_inode(struct jbd2_inode *jinode) | ||
1173 | { | ||
1174 | kmem_cache_free(jbd2_inode_cache, jinode); | ||
1175 | } | ||
1176 | |||
1161 | /* Primary revoke support */ | 1177 | /* Primary revoke support */ |
1162 | #define JOURNAL_REVOKE_DEFAULT_HASH 256 | 1178 | #define JOURNAL_REVOKE_DEFAULT_HASH 256 |
1163 | extern int jbd2_journal_init_revoke(journal_t *, int); | 1179 | extern int jbd2_journal_init_revoke(journal_t *, int); |
diff --git a/include/linux/jhash.h b/include/linux/jhash.h index ced1159fa4f2..47cb09edec1a 100644 --- a/include/linux/jhash.h +++ b/include/linux/jhash.h | |||
@@ -3,129 +3,156 @@ | |||
3 | 3 | ||
4 | /* jhash.h: Jenkins hash support. | 4 | /* jhash.h: Jenkins hash support. |
5 | * | 5 | * |
6 | * Copyright (C) 1996 Bob Jenkins (bob_jenkins@burtleburtle.net) | 6 | * Copyright (C) 2006. Bob Jenkins (bob_jenkins@burtleburtle.net) |
7 | * | 7 | * |
8 | * http://burtleburtle.net/bob/hash/ | 8 | * http://burtleburtle.net/bob/hash/ |
9 | * | 9 | * |
10 | * These are the credits from Bob's sources: | 10 | * These are the credits from Bob's sources: |
11 | * | 11 | * |
12 | * lookup2.c, by Bob Jenkins, December 1996, Public Domain. | 12 | * lookup3.c, by Bob Jenkins, May 2006, Public Domain. |
13 | * hash(), hash2(), hash3, and mix() are externally useful functions. | ||
14 | * Routines to test the hash are included if SELF_TEST is defined. | ||
15 | * You can use this free for any purpose. It has no warranty. | ||
16 | * | 13 | * |
17 | * Copyright (C) 2003 David S. Miller (davem@redhat.com) | 14 | * These are functions for producing 32-bit hashes for hash table lookup. |
15 | * hashword(), hashlittle(), hashlittle2(), hashbig(), mix(), and final() | ||
16 | * are externally useful functions. Routines to test the hash are included | ||
17 | * if SELF_TEST is defined. You can use this free for any purpose. It's in | ||
18 | * the public domain. It has no warranty. | ||
19 | * | ||
20 | * Copyright (C) 2009-2010 Jozsef Kadlecsik (kadlec@blackhole.kfki.hu) | ||
18 | * | 21 | * |
19 | * I've modified Bob's hash to be useful in the Linux kernel, and | 22 | * I've modified Bob's hash to be useful in the Linux kernel, and |
20 | * any bugs present are surely my fault. -DaveM | 23 | * any bugs present are my fault. |
24 | * Jozsef | ||
21 | */ | 25 | */ |
26 | #include <linux/bitops.h> | ||
27 | #include <linux/unaligned/packed_struct.h> | ||
28 | |||
29 | /* Best hash sizes are of power of two */ | ||
30 | #define jhash_size(n) ((u32)1<<(n)) | ||
31 | /* Mask the hash value, i.e (value & jhash_mask(n)) instead of (value % n) */ | ||
32 | #define jhash_mask(n) (jhash_size(n)-1) | ||
33 | |||
34 | /* __jhash_mix -- mix 3 32-bit values reversibly. */ | ||
35 | #define __jhash_mix(a, b, c) \ | ||
36 | { \ | ||
37 | a -= c; a ^= rol32(c, 4); c += b; \ | ||
38 | b -= a; b ^= rol32(a, 6); a += c; \ | ||
39 | c -= b; c ^= rol32(b, 8); b += a; \ | ||
40 | a -= c; a ^= rol32(c, 16); c += b; \ | ||
41 | b -= a; b ^= rol32(a, 19); a += c; \ | ||
42 | c -= b; c ^= rol32(b, 4); b += a; \ | ||
43 | } | ||
22 | 44 | ||
23 | /* NOTE: Arguments are modified. */ | 45 | /* __jhash_final - final mixing of 3 32-bit values (a,b,c) into c */ |
24 | #define __jhash_mix(a, b, c) \ | 46 | #define __jhash_final(a, b, c) \ |
25 | { \ | 47 | { \ |
26 | a -= b; a -= c; a ^= (c>>13); \ | 48 | c ^= b; c -= rol32(b, 14); \ |
27 | b -= c; b -= a; b ^= (a<<8); \ | 49 | a ^= c; a -= rol32(c, 11); \ |
28 | c -= a; c -= b; c ^= (b>>13); \ | 50 | b ^= a; b -= rol32(a, 25); \ |
29 | a -= b; a -= c; a ^= (c>>12); \ | 51 | c ^= b; c -= rol32(b, 16); \ |
30 | b -= c; b -= a; b ^= (a<<16); \ | 52 | a ^= c; a -= rol32(c, 4); \ |
31 | c -= a; c -= b; c ^= (b>>5); \ | 53 | b ^= a; b -= rol32(a, 14); \ |
32 | a -= b; a -= c; a ^= (c>>3); \ | 54 | c ^= b; c -= rol32(b, 24); \ |
33 | b -= c; b -= a; b ^= (a<<10); \ | ||
34 | c -= a; c -= b; c ^= (b>>15); \ | ||
35 | } | 55 | } |
36 | 56 | ||
37 | /* The golden ration: an arbitrary value */ | 57 | /* An arbitrary initial parameter */ |
38 | #define JHASH_GOLDEN_RATIO 0x9e3779b9 | 58 | #define JHASH_INITVAL 0xdeadbeef |
39 | 59 | ||
40 | /* The most generic version, hashes an arbitrary sequence | 60 | /* jhash - hash an arbitrary key |
41 | * of bytes. No alignment or length assumptions are made about | 61 | * @k: sequence of bytes as key |
42 | * the input key. | 62 | * @length: the length of the key |
63 | * @initval: the previous hash, or an arbitray value | ||
64 | * | ||
65 | * The generic version, hashes an arbitrary sequence of bytes. | ||
66 | * No alignment or length assumptions are made about the input key. | ||
67 | * | ||
68 | * Returns the hash value of the key. The result depends on endianness. | ||
43 | */ | 69 | */ |
44 | static inline u32 jhash(const void *key, u32 length, u32 initval) | 70 | static inline u32 jhash(const void *key, u32 length, u32 initval) |
45 | { | 71 | { |
46 | u32 a, b, c, len; | 72 | u32 a, b, c; |
47 | const u8 *k = key; | 73 | const u8 *k = key; |
48 | 74 | ||
49 | len = length; | 75 | /* Set up the internal state */ |
50 | a = b = JHASH_GOLDEN_RATIO; | 76 | a = b = c = JHASH_INITVAL + length + initval; |
51 | c = initval; | ||
52 | |||
53 | while (len >= 12) { | ||
54 | a += (k[0] +((u32)k[1]<<8) +((u32)k[2]<<16) +((u32)k[3]<<24)); | ||
55 | b += (k[4] +((u32)k[5]<<8) +((u32)k[6]<<16) +((u32)k[7]<<24)); | ||
56 | c += (k[8] +((u32)k[9]<<8) +((u32)k[10]<<16)+((u32)k[11]<<24)); | ||
57 | |||
58 | __jhash_mix(a,b,c); | ||
59 | 77 | ||
78 | /* All but the last block: affect some 32 bits of (a,b,c) */ | ||
79 | while (length > 12) { | ||
80 | a += __get_unaligned_cpu32(k); | ||
81 | b += __get_unaligned_cpu32(k + 4); | ||
82 | c += __get_unaligned_cpu32(k + 8); | ||
83 | __jhash_mix(a, b, c); | ||
84 | length -= 12; | ||
60 | k += 12; | 85 | k += 12; |
61 | len -= 12; | ||
62 | } | 86 | } |
63 | 87 | /* Last block: affect all 32 bits of (c) */ | |
64 | c += length; | 88 | /* All the case statements fall through */ |
65 | switch (len) { | 89 | switch (length) { |
66 | case 11: c += ((u32)k[10]<<24); | 90 | case 12: c += (u32)k[11]<<24; |
67 | case 10: c += ((u32)k[9]<<16); | 91 | case 11: c += (u32)k[10]<<16; |
68 | case 9 : c += ((u32)k[8]<<8); | 92 | case 10: c += (u32)k[9]<<8; |
69 | case 8 : b += ((u32)k[7]<<24); | 93 | case 9: c += k[8]; |
70 | case 7 : b += ((u32)k[6]<<16); | 94 | case 8: b += (u32)k[7]<<24; |
71 | case 6 : b += ((u32)k[5]<<8); | 95 | case 7: b += (u32)k[6]<<16; |
72 | case 5 : b += k[4]; | 96 | case 6: b += (u32)k[5]<<8; |
73 | case 4 : a += ((u32)k[3]<<24); | 97 | case 5: b += k[4]; |
74 | case 3 : a += ((u32)k[2]<<16); | 98 | case 4: a += (u32)k[3]<<24; |
75 | case 2 : a += ((u32)k[1]<<8); | 99 | case 3: a += (u32)k[2]<<16; |
76 | case 1 : a += k[0]; | 100 | case 2: a += (u32)k[1]<<8; |
77 | }; | 101 | case 1: a += k[0]; |
78 | 102 | __jhash_final(a, b, c); | |
79 | __jhash_mix(a,b,c); | 103 | case 0: /* Nothing left to add */ |
104 | break; | ||
105 | } | ||
80 | 106 | ||
81 | return c; | 107 | return c; |
82 | } | 108 | } |
83 | 109 | ||
84 | /* A special optimized version that handles 1 or more of u32s. | 110 | /* jhash2 - hash an array of u32's |
85 | * The length parameter here is the number of u32s in the key. | 111 | * @k: the key which must be an array of u32's |
112 | * @length: the number of u32's in the key | ||
113 | * @initval: the previous hash, or an arbitray value | ||
114 | * | ||
115 | * Returns the hash value of the key. | ||
86 | */ | 116 | */ |
87 | static inline u32 jhash2(const u32 *k, u32 length, u32 initval) | 117 | static inline u32 jhash2(const u32 *k, u32 length, u32 initval) |
88 | { | 118 | { |
89 | u32 a, b, c, len; | 119 | u32 a, b, c; |
90 | 120 | ||
91 | a = b = JHASH_GOLDEN_RATIO; | 121 | /* Set up the internal state */ |
92 | c = initval; | 122 | a = b = c = JHASH_INITVAL + (length<<2) + initval; |
93 | len = length; | ||
94 | 123 | ||
95 | while (len >= 3) { | 124 | /* Handle most of the key */ |
125 | while (length > 3) { | ||
96 | a += k[0]; | 126 | a += k[0]; |
97 | b += k[1]; | 127 | b += k[1]; |
98 | c += k[2]; | 128 | c += k[2]; |
99 | __jhash_mix(a, b, c); | 129 | __jhash_mix(a, b, c); |
100 | k += 3; len -= 3; | 130 | length -= 3; |
131 | k += 3; | ||
101 | } | 132 | } |
102 | 133 | ||
103 | c += length * 4; | 134 | /* Handle the last 3 u32's: all the case statements fall through */ |
104 | 135 | switch (length) { | |
105 | switch (len) { | 136 | case 3: c += k[2]; |
106 | case 2 : b += k[1]; | 137 | case 2: b += k[1]; |
107 | case 1 : a += k[0]; | 138 | case 1: a += k[0]; |
108 | }; | 139 | __jhash_final(a, b, c); |
109 | 140 | case 0: /* Nothing left to add */ | |
110 | __jhash_mix(a,b,c); | 141 | break; |
142 | } | ||
111 | 143 | ||
112 | return c; | 144 | return c; |
113 | } | 145 | } |
114 | 146 | ||
115 | 147 | ||
116 | /* A special ultra-optimized versions that knows they are hashing exactly | 148 | /* jhash_3words - hash exactly 3, 2 or 1 word(s) */ |
117 | * 3, 2 or 1 word(s). | ||
118 | * | ||
119 | * NOTE: In particular the "c += length; __jhash_mix(a,b,c);" normally | ||
120 | * done at the end is not done here. | ||
121 | */ | ||
122 | static inline u32 jhash_3words(u32 a, u32 b, u32 c, u32 initval) | 149 | static inline u32 jhash_3words(u32 a, u32 b, u32 c, u32 initval) |
123 | { | 150 | { |
124 | a += JHASH_GOLDEN_RATIO; | 151 | a += JHASH_INITVAL; |
125 | b += JHASH_GOLDEN_RATIO; | 152 | b += JHASH_INITVAL; |
126 | c += initval; | 153 | c += initval; |
127 | 154 | ||
128 | __jhash_mix(a, b, c); | 155 | __jhash_final(a, b, c); |
129 | 156 | ||
130 | return c; | 157 | return c; |
131 | } | 158 | } |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index b6de9a6f7018..d0fbc043de60 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -56,6 +56,8 @@ | |||
56 | 56 | ||
57 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) | 57 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) |
58 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) | 58 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) |
59 | |||
60 | /* The `const' in roundup() prevents gcc-3.3 from calling __divdi3 */ | ||
59 | #define roundup(x, y) ( \ | 61 | #define roundup(x, y) ( \ |
60 | { \ | 62 | { \ |
61 | const typeof(y) __y = y; \ | 63 | const typeof(y) __y = y; \ |
@@ -263,6 +265,7 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
263 | } | 265 | } |
264 | 266 | ||
265 | extern int hex_to_bin(char ch); | 267 | extern int hex_to_bin(char ch); |
268 | extern void hex2bin(u8 *dst, const char *src, size_t count); | ||
266 | 269 | ||
267 | /* | 270 | /* |
268 | * General tracing related utility functions - trace_printk(), | 271 | * General tracing related utility functions - trace_printk(), |
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index ad54c846911b..44e83ba12b5b 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
@@ -47,7 +47,7 @@ extern unsigned long long nr_context_switches(void); | |||
47 | 47 | ||
48 | #ifndef CONFIG_GENERIC_HARDIRQS | 48 | #ifndef CONFIG_GENERIC_HARDIRQS |
49 | #define kstat_irqs_this_cpu(irq) \ | 49 | #define kstat_irqs_this_cpu(irq) \ |
50 | (kstat_this_cpu.irqs[irq]) | 50 | (this_cpu_read(kstat.irqs[irq]) |
51 | 51 | ||
52 | struct irq_desc; | 52 | struct irq_desc; |
53 | 53 | ||
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index e7d1b2e0070d..dd7c12e875bc 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -275,7 +275,9 @@ extern int arch_prepared_optinsn(struct arch_optimized_insn *optinsn); | |||
275 | extern int arch_check_optimized_kprobe(struct optimized_kprobe *op); | 275 | extern int arch_check_optimized_kprobe(struct optimized_kprobe *op); |
276 | extern int arch_prepare_optimized_kprobe(struct optimized_kprobe *op); | 276 | extern int arch_prepare_optimized_kprobe(struct optimized_kprobe *op); |
277 | extern void arch_remove_optimized_kprobe(struct optimized_kprobe *op); | 277 | extern void arch_remove_optimized_kprobe(struct optimized_kprobe *op); |
278 | extern int arch_optimize_kprobe(struct optimized_kprobe *op); | 278 | extern void arch_optimize_kprobes(struct list_head *oplist); |
279 | extern void arch_unoptimize_kprobes(struct list_head *oplist, | ||
280 | struct list_head *done_list); | ||
279 | extern void arch_unoptimize_kprobe(struct optimized_kprobe *op); | 281 | extern void arch_unoptimize_kprobe(struct optimized_kprobe *op); |
280 | extern kprobe_opcode_t *get_optinsn_slot(void); | 282 | extern kprobe_opcode_t *get_optinsn_slot(void); |
281 | extern void free_optinsn_slot(kprobe_opcode_t *slot, int dirty); | 283 | extern void free_optinsn_slot(kprobe_opcode_t *slot, int dirty); |
@@ -303,12 +305,12 @@ struct hlist_head * kretprobe_inst_table_head(struct task_struct *tsk); | |||
303 | /* kprobe_running() will just return the current_kprobe on this CPU */ | 305 | /* kprobe_running() will just return the current_kprobe on this CPU */ |
304 | static inline struct kprobe *kprobe_running(void) | 306 | static inline struct kprobe *kprobe_running(void) |
305 | { | 307 | { |
306 | return (__get_cpu_var(current_kprobe)); | 308 | return (__this_cpu_read(current_kprobe)); |
307 | } | 309 | } |
308 | 310 | ||
309 | static inline void reset_current_kprobe(void) | 311 | static inline void reset_current_kprobe(void) |
310 | { | 312 | { |
311 | __get_cpu_var(current_kprobe) = NULL; | 313 | __this_cpu_write(current_kprobe, NULL); |
312 | } | 314 | } |
313 | 315 | ||
314 | static inline struct kprobe_ctlblk *get_kprobe_ctlblk(void) | 316 | static inline struct kprobe_ctlblk *get_kprobe_ctlblk(void) |
diff --git a/include/linux/kref.h b/include/linux/kref.h index 6cc38fc07ab7..d4a62ab2ee5e 100644 --- a/include/linux/kref.h +++ b/include/linux/kref.h | |||
@@ -24,5 +24,7 @@ struct kref { | |||
24 | void kref_init(struct kref *kref); | 24 | void kref_init(struct kref *kref); |
25 | void kref_get(struct kref *kref); | 25 | void kref_get(struct kref *kref); |
26 | int kref_put(struct kref *kref, void (*release) (struct kref *kref)); | 26 | int kref_put(struct kref *kref, void (*release) (struct kref *kref)); |
27 | int kref_sub(struct kref *kref, unsigned int count, | ||
28 | void (*release) (struct kref *kref)); | ||
27 | 29 | ||
28 | #endif /* _KREF_H_ */ | 30 | #endif /* _KREF_H_ */ |
diff --git a/include/linux/libata.h b/include/linux/libata.h index d947b1231662..c9c5d7ad1a2b 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -996,8 +996,7 @@ extern int ata_sas_port_init(struct ata_port *); | |||
996 | extern int ata_sas_port_start(struct ata_port *ap); | 996 | extern int ata_sas_port_start(struct ata_port *ap); |
997 | extern void ata_sas_port_stop(struct ata_port *ap); | 997 | extern void ata_sas_port_stop(struct ata_port *ap); |
998 | extern int ata_sas_slave_configure(struct scsi_device *, struct ata_port *); | 998 | extern int ata_sas_slave_configure(struct scsi_device *, struct ata_port *); |
999 | extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), | 999 | extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, struct ata_port *ap); |
1000 | struct ata_port *ap); | ||
1001 | extern int sata_scr_valid(struct ata_link *link); | 1000 | extern int sata_scr_valid(struct ata_link *link); |
1002 | extern int sata_scr_read(struct ata_link *link, int reg, u32 *val); | 1001 | extern int sata_scr_read(struct ata_link *link, int reg, u32 *val); |
1003 | extern int sata_scr_write(struct ata_link *link, int reg, u32 val); | 1002 | extern int sata_scr_write(struct ata_link *link, int reg, u32 val); |
@@ -1040,8 +1039,7 @@ extern unsigned int ata_do_dev_read_id(struct ata_device *dev, | |||
1040 | struct ata_taskfile *tf, u16 *id); | 1039 | struct ata_taskfile *tf, u16 *id); |
1041 | extern void ata_qc_complete(struct ata_queued_cmd *qc); | 1040 | extern void ata_qc_complete(struct ata_queued_cmd *qc); |
1042 | extern int ata_qc_complete_multiple(struct ata_port *ap, u32 qc_active); | 1041 | extern int ata_qc_complete_multiple(struct ata_port *ap, u32 qc_active); |
1043 | extern void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd, | 1042 | extern void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd); |
1044 | void (*done)(struct scsi_cmnd *)); | ||
1045 | extern int ata_std_bios_param(struct scsi_device *sdev, | 1043 | extern int ata_std_bios_param(struct scsi_device *sdev, |
1046 | struct block_device *bdev, | 1044 | struct block_device *bdev, |
1047 | sector_t capacity, int geom[]); | 1045 | sector_t capacity, int geom[]); |
diff --git a/include/linux/list_bl.h b/include/linux/list_bl.h new file mode 100644 index 000000000000..9ee97e7f2be4 --- /dev/null +++ b/include/linux/list_bl.h | |||
@@ -0,0 +1,144 @@ | |||
1 | #ifndef _LINUX_LIST_BL_H | ||
2 | #define _LINUX_LIST_BL_H | ||
3 | |||
4 | #include <linux/list.h> | ||
5 | |||
6 | /* | ||
7 | * Special version of lists, where head of the list has a lock in the lowest | ||
8 | * bit. This is useful for scalable hash tables without increasing memory | ||
9 | * footprint overhead. | ||
10 | * | ||
11 | * For modification operations, the 0 bit of hlist_bl_head->first | ||
12 | * pointer must be set. | ||
13 | * | ||
14 | * With some small modifications, this can easily be adapted to store several | ||
15 | * arbitrary bits (not just a single lock bit), if the need arises to store | ||
16 | * some fast and compact auxiliary data. | ||
17 | */ | ||
18 | |||
19 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) | ||
20 | #define LIST_BL_LOCKMASK 1UL | ||
21 | #else | ||
22 | #define LIST_BL_LOCKMASK 0UL | ||
23 | #endif | ||
24 | |||
25 | #ifdef CONFIG_DEBUG_LIST | ||
26 | #define LIST_BL_BUG_ON(x) BUG_ON(x) | ||
27 | #else | ||
28 | #define LIST_BL_BUG_ON(x) | ||
29 | #endif | ||
30 | |||
31 | |||
32 | struct hlist_bl_head { | ||
33 | struct hlist_bl_node *first; | ||
34 | }; | ||
35 | |||
36 | struct hlist_bl_node { | ||
37 | struct hlist_bl_node *next, **pprev; | ||
38 | }; | ||
39 | #define INIT_HLIST_BL_HEAD(ptr) \ | ||
40 | ((ptr)->first = NULL) | ||
41 | |||
42 | static inline void INIT_HLIST_BL_NODE(struct hlist_bl_node *h) | ||
43 | { | ||
44 | h->next = NULL; | ||
45 | h->pprev = NULL; | ||
46 | } | ||
47 | |||
48 | #define hlist_bl_entry(ptr, type, member) container_of(ptr,type,member) | ||
49 | |||
50 | static inline int hlist_bl_unhashed(const struct hlist_bl_node *h) | ||
51 | { | ||
52 | return !h->pprev; | ||
53 | } | ||
54 | |||
55 | static inline struct hlist_bl_node *hlist_bl_first(struct hlist_bl_head *h) | ||
56 | { | ||
57 | return (struct hlist_bl_node *) | ||
58 | ((unsigned long)h->first & ~LIST_BL_LOCKMASK); | ||
59 | } | ||
60 | |||
61 | static inline void hlist_bl_set_first(struct hlist_bl_head *h, | ||
62 | struct hlist_bl_node *n) | ||
63 | { | ||
64 | LIST_BL_BUG_ON((unsigned long)n & LIST_BL_LOCKMASK); | ||
65 | LIST_BL_BUG_ON(!((unsigned long)h->first & LIST_BL_LOCKMASK)); | ||
66 | h->first = (struct hlist_bl_node *)((unsigned long)n | LIST_BL_LOCKMASK); | ||
67 | } | ||
68 | |||
69 | static inline int hlist_bl_empty(const struct hlist_bl_head *h) | ||
70 | { | ||
71 | return !((unsigned long)h->first & ~LIST_BL_LOCKMASK); | ||
72 | } | ||
73 | |||
74 | static inline void hlist_bl_add_head(struct hlist_bl_node *n, | ||
75 | struct hlist_bl_head *h) | ||
76 | { | ||
77 | struct hlist_bl_node *first = hlist_bl_first(h); | ||
78 | |||
79 | n->next = first; | ||
80 | if (first) | ||
81 | first->pprev = &n->next; | ||
82 | n->pprev = &h->first; | ||
83 | hlist_bl_set_first(h, n); | ||
84 | } | ||
85 | |||
86 | static inline void __hlist_bl_del(struct hlist_bl_node *n) | ||
87 | { | ||
88 | struct hlist_bl_node *next = n->next; | ||
89 | struct hlist_bl_node **pprev = n->pprev; | ||
90 | |||
91 | LIST_BL_BUG_ON((unsigned long)n & LIST_BL_LOCKMASK); | ||
92 | |||
93 | /* pprev may be `first`, so be careful not to lose the lock bit */ | ||
94 | *pprev = (struct hlist_bl_node *) | ||
95 | ((unsigned long)next | | ||
96 | ((unsigned long)*pprev & LIST_BL_LOCKMASK)); | ||
97 | if (next) | ||
98 | next->pprev = pprev; | ||
99 | } | ||
100 | |||
101 | static inline void hlist_bl_del(struct hlist_bl_node *n) | ||
102 | { | ||
103 | __hlist_bl_del(n); | ||
104 | n->next = LIST_POISON1; | ||
105 | n->pprev = LIST_POISON2; | ||
106 | } | ||
107 | |||
108 | static inline void hlist_bl_del_init(struct hlist_bl_node *n) | ||
109 | { | ||
110 | if (!hlist_bl_unhashed(n)) { | ||
111 | __hlist_bl_del(n); | ||
112 | INIT_HLIST_BL_NODE(n); | ||
113 | } | ||
114 | } | ||
115 | |||
116 | /** | ||
117 | * hlist_bl_for_each_entry - iterate over list of given type | ||
118 | * @tpos: the type * to use as a loop cursor. | ||
119 | * @pos: the &struct hlist_node to use as a loop cursor. | ||
120 | * @head: the head for your list. | ||
121 | * @member: the name of the hlist_node within the struct. | ||
122 | * | ||
123 | */ | ||
124 | #define hlist_bl_for_each_entry(tpos, pos, head, member) \ | ||
125 | for (pos = hlist_bl_first(head); \ | ||
126 | pos && \ | ||
127 | ({ tpos = hlist_bl_entry(pos, typeof(*tpos), member); 1;}); \ | ||
128 | pos = pos->next) | ||
129 | |||
130 | /** | ||
131 | * hlist_bl_for_each_entry_safe - iterate over list of given type safe against removal of list entry | ||
132 | * @tpos: the type * to use as a loop cursor. | ||
133 | * @pos: the &struct hlist_node to use as a loop cursor. | ||
134 | * @n: another &struct hlist_node to use as temporary storage | ||
135 | * @head: the head for your list. | ||
136 | * @member: the name of the hlist_node within the struct. | ||
137 | */ | ||
138 | #define hlist_bl_for_each_entry_safe(tpos, pos, n, head, member) \ | ||
139 | for (pos = hlist_bl_first(head); \ | ||
140 | pos && ({ n = pos->next; 1; }) && \ | ||
141 | ({ tpos = hlist_bl_entry(pos, typeof(*tpos), member); 1;}); \ | ||
142 | pos = n) | ||
143 | |||
144 | #endif | ||
diff --git a/include/linux/lockd/debug.h b/include/linux/lockd/debug.h index 34b2b7f33c3b..257d3779f2ab 100644 --- a/include/linux/lockd/debug.h +++ b/include/linux/lockd/debug.h | |||
@@ -44,14 +44,4 @@ | |||
44 | #define NLMDBG_XDR 0x0100 | 44 | #define NLMDBG_XDR 0x0100 |
45 | #define NLMDBG_ALL 0x7fff | 45 | #define NLMDBG_ALL 0x7fff |
46 | 46 | ||
47 | |||
48 | /* | ||
49 | * Support for printing NLM cookies in dprintk() | ||
50 | */ | ||
51 | #ifdef RPC_DEBUG | ||
52 | struct nlm_cookie; | ||
53 | /* Call this function with the BKL held (it uses a static buffer) */ | ||
54 | extern const char *nlmdbg_cookie2a(const struct nlm_cookie *); | ||
55 | #endif | ||
56 | |||
57 | #endif /* LINUX_LOCKD_DEBUG_H */ | 47 | #endif /* LINUX_LOCKD_DEBUG_H */ |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 2dee05e5119a..ff9abff55aa0 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -202,9 +202,9 @@ extern u32 nsm_local_state; | |||
202 | * Lockd client functions | 202 | * Lockd client functions |
203 | */ | 203 | */ |
204 | struct nlm_rqst * nlm_alloc_call(struct nlm_host *host); | 204 | struct nlm_rqst * nlm_alloc_call(struct nlm_host *host); |
205 | void nlm_release_call(struct nlm_rqst *); | ||
206 | int nlm_async_call(struct nlm_rqst *, u32, const struct rpc_call_ops *); | 205 | int nlm_async_call(struct nlm_rqst *, u32, const struct rpc_call_ops *); |
207 | int nlm_async_reply(struct nlm_rqst *, u32, const struct rpc_call_ops *); | 206 | int nlm_async_reply(struct nlm_rqst *, u32, const struct rpc_call_ops *); |
207 | void nlmclnt_release_call(struct nlm_rqst *); | ||
208 | struct nlm_wait * nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl); | 208 | struct nlm_wait * nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl); |
209 | void nlmclnt_finish_block(struct nlm_wait *block); | 209 | void nlmclnt_finish_block(struct nlm_wait *block); |
210 | int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout); | 210 | int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout); |
@@ -223,13 +223,14 @@ struct nlm_host *nlmclnt_lookup_host(const struct sockaddr *sap, | |||
223 | const u32 version, | 223 | const u32 version, |
224 | const char *hostname, | 224 | const char *hostname, |
225 | int noresvport); | 225 | int noresvport); |
226 | void nlmclnt_release_host(struct nlm_host *); | ||
226 | struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp, | 227 | struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp, |
227 | const char *hostname, | 228 | const char *hostname, |
228 | const size_t hostname_len); | 229 | const size_t hostname_len); |
230 | void nlmsvc_release_host(struct nlm_host *); | ||
229 | struct rpc_clnt * nlm_bind_host(struct nlm_host *); | 231 | struct rpc_clnt * nlm_bind_host(struct nlm_host *); |
230 | void nlm_rebind_host(struct nlm_host *); | 232 | void nlm_rebind_host(struct nlm_host *); |
231 | struct nlm_host * nlm_get_host(struct nlm_host *); | 233 | struct nlm_host * nlm_get_host(struct nlm_host *); |
232 | void nlm_release_host(struct nlm_host *); | ||
233 | void nlm_shutdown_hosts(void); | 234 | void nlm_shutdown_hosts(void); |
234 | void nlm_host_rebooted(const struct nlm_reboot *); | 235 | void nlm_host_rebooted(const struct nlm_reboot *); |
235 | 236 | ||
@@ -267,6 +268,7 @@ unsigned long nlmsvc_retry_blocked(void); | |||
267 | void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *, | 268 | void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *, |
268 | nlm_host_match_fn_t match); | 269 | nlm_host_match_fn_t match); |
269 | void nlmsvc_grant_reply(struct nlm_cookie *, __be32); | 270 | void nlmsvc_grant_reply(struct nlm_cookie *, __be32); |
271 | void nlmsvc_release_call(struct nlm_rqst *); | ||
270 | 272 | ||
271 | /* | 273 | /* |
272 | * File handling for the server personality | 274 | * File handling for the server personality |
diff --git a/include/linux/mbcache.h b/include/linux/mbcache.h index 54cbbac1e71d..5525d370701d 100644 --- a/include/linux/mbcache.h +++ b/include/linux/mbcache.h | |||
@@ -18,6 +18,17 @@ struct mb_cache_entry { | |||
18 | } e_index; | 18 | } e_index; |
19 | }; | 19 | }; |
20 | 20 | ||
21 | struct mb_cache { | ||
22 | struct list_head c_cache_list; | ||
23 | const char *c_name; | ||
24 | atomic_t c_entry_count; | ||
25 | int c_max_entries; | ||
26 | int c_bucket_bits; | ||
27 | struct kmem_cache *c_entry_cache; | ||
28 | struct list_head *c_block_hash; | ||
29 | struct list_head *c_index_hash; | ||
30 | }; | ||
31 | |||
21 | /* Functions on caches */ | 32 | /* Functions on caches */ |
22 | 33 | ||
23 | struct mb_cache *mb_cache_create(const char *, int); | 34 | struct mb_cache *mb_cache_create(const char *, int); |
diff --git a/include/linux/mdio.h b/include/linux/mdio.h index c779b49a1fda..b1494aced217 100644 --- a/include/linux/mdio.h +++ b/include/linux/mdio.h | |||
@@ -55,6 +55,7 @@ | |||
55 | #define MDIO_PCS_10GBRT_STAT2 33 /* 10GBASE-R/-T PCS status 2 */ | 55 | #define MDIO_PCS_10GBRT_STAT2 33 /* 10GBASE-R/-T PCS status 2 */ |
56 | #define MDIO_AN_10GBT_CTRL 32 /* 10GBASE-T auto-negotiation control */ | 56 | #define MDIO_AN_10GBT_CTRL 32 /* 10GBASE-T auto-negotiation control */ |
57 | #define MDIO_AN_10GBT_STAT 33 /* 10GBASE-T auto-negotiation status */ | 57 | #define MDIO_AN_10GBT_STAT 33 /* 10GBASE-T auto-negotiation status */ |
58 | #define MDIO_AN_EEE_ADV 60 /* EEE advertisement */ | ||
58 | 59 | ||
59 | /* LASI (Link Alarm Status Interrupt) registers, defined by XENPAK MSA. */ | 60 | /* LASI (Link Alarm Status Interrupt) registers, defined by XENPAK MSA. */ |
60 | #define MDIO_PMA_LASI_RXCTRL 0x9000 /* RX_ALARM control */ | 61 | #define MDIO_PMA_LASI_RXCTRL 0x9000 /* RX_ALARM control */ |
@@ -235,6 +236,10 @@ | |||
235 | #define MDIO_AN_10GBT_STAT_MS 0x4000 /* Master/slave config */ | 236 | #define MDIO_AN_10GBT_STAT_MS 0x4000 /* Master/slave config */ |
236 | #define MDIO_AN_10GBT_STAT_MSFLT 0x8000 /* Master/slave config fault */ | 237 | #define MDIO_AN_10GBT_STAT_MSFLT 0x8000 /* Master/slave config fault */ |
237 | 238 | ||
239 | /* AN EEE Advertisement register. */ | ||
240 | #define MDIO_AN_EEE_ADV_100TX 0x0002 /* Advertise 100TX EEE cap */ | ||
241 | #define MDIO_AN_EEE_ADV_1000T 0x0004 /* Advertise 1000T EEE cap */ | ||
242 | |||
238 | /* LASI RX_ALARM control/status registers. */ | 243 | /* LASI RX_ALARM control/status registers. */ |
239 | #define MDIO_PMA_LASI_RX_PHYXSLFLT 0x0001 /* PHY XS RX local fault */ | 244 | #define MDIO_PMA_LASI_RX_PHYXSLFLT 0x0001 /* PHY XS RX local fault */ |
240 | #define MDIO_PMA_LASI_RX_PCSLFLT 0x0008 /* PCS RX local fault */ | 245 | #define MDIO_PMA_LASI_RX_PCSLFLT 0x0008 /* PCS RX local fault */ |
diff --git a/include/linux/mfd/tc35892.h b/include/linux/mfd/tc35892.h deleted file mode 100644 index eff3094ca84e..000000000000 --- a/include/linux/mfd/tc35892.h +++ /dev/null | |||
@@ -1,136 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * License Terms: GNU General Public License, version 2 | ||
5 | */ | ||
6 | |||
7 | #ifndef __LINUX_MFD_TC35892_H | ||
8 | #define __LINUX_MFD_TC35892_H | ||
9 | |||
10 | #include <linux/device.h> | ||
11 | |||
12 | #define TC35892_RSTCTRL_IRQRST (1 << 4) | ||
13 | #define TC35892_RSTCTRL_TIMRST (1 << 3) | ||
14 | #define TC35892_RSTCTRL_ROTRST (1 << 2) | ||
15 | #define TC35892_RSTCTRL_KBDRST (1 << 1) | ||
16 | #define TC35892_RSTCTRL_GPIRST (1 << 0) | ||
17 | |||
18 | #define TC35892_IRQST 0x91 | ||
19 | |||
20 | #define TC35892_MANFCODE_MAGIC 0x03 | ||
21 | #define TC35892_MANFCODE 0x80 | ||
22 | #define TC35892_VERSION 0x81 | ||
23 | #define TC35892_IOCFG 0xA7 | ||
24 | |||
25 | #define TC35892_CLKMODE 0x88 | ||
26 | #define TC35892_CLKCFG 0x89 | ||
27 | #define TC35892_CLKEN 0x8A | ||
28 | |||
29 | #define TC35892_RSTCTRL 0x82 | ||
30 | #define TC35892_EXTRSTN 0x83 | ||
31 | #define TC35892_RSTINTCLR 0x84 | ||
32 | |||
33 | #define TC35892_GPIOIS0 0xC9 | ||
34 | #define TC35892_GPIOIS1 0xCA | ||
35 | #define TC35892_GPIOIS2 0xCB | ||
36 | #define TC35892_GPIOIBE0 0xCC | ||
37 | #define TC35892_GPIOIBE1 0xCD | ||
38 | #define TC35892_GPIOIBE2 0xCE | ||
39 | #define TC35892_GPIOIEV0 0xCF | ||
40 | #define TC35892_GPIOIEV1 0xD0 | ||
41 | #define TC35892_GPIOIEV2 0xD1 | ||
42 | #define TC35892_GPIOIE0 0xD2 | ||
43 | #define TC35892_GPIOIE1 0xD3 | ||
44 | #define TC35892_GPIOIE2 0xD4 | ||
45 | #define TC35892_GPIORIS0 0xD6 | ||
46 | #define TC35892_GPIORIS1 0xD7 | ||
47 | #define TC35892_GPIORIS2 0xD8 | ||
48 | #define TC35892_GPIOMIS0 0xD9 | ||
49 | #define TC35892_GPIOMIS1 0xDA | ||
50 | #define TC35892_GPIOMIS2 0xDB | ||
51 | #define TC35892_GPIOIC0 0xDC | ||
52 | #define TC35892_GPIOIC1 0xDD | ||
53 | #define TC35892_GPIOIC2 0xDE | ||
54 | |||
55 | #define TC35892_GPIODATA0 0xC0 | ||
56 | #define TC35892_GPIOMASK0 0xc1 | ||
57 | #define TC35892_GPIODATA1 0xC2 | ||
58 | #define TC35892_GPIOMASK1 0xc3 | ||
59 | #define TC35892_GPIODATA2 0xC4 | ||
60 | #define TC35892_GPIOMASK2 0xC5 | ||
61 | |||
62 | #define TC35892_GPIODIR0 0xC6 | ||
63 | #define TC35892_GPIODIR1 0xC7 | ||
64 | #define TC35892_GPIODIR2 0xC8 | ||
65 | |||
66 | #define TC35892_GPIOSYNC0 0xE6 | ||
67 | #define TC35892_GPIOSYNC1 0xE7 | ||
68 | #define TC35892_GPIOSYNC2 0xE8 | ||
69 | |||
70 | #define TC35892_GPIOWAKE0 0xE9 | ||
71 | #define TC35892_GPIOWAKE1 0xEA | ||
72 | #define TC35892_GPIOWAKE2 0xEB | ||
73 | |||
74 | #define TC35892_GPIOODM0 0xE0 | ||
75 | #define TC35892_GPIOODE0 0xE1 | ||
76 | #define TC35892_GPIOODM1 0xE2 | ||
77 | #define TC35892_GPIOODE1 0xE3 | ||
78 | #define TC35892_GPIOODM2 0xE4 | ||
79 | #define TC35892_GPIOODE2 0xE5 | ||
80 | |||
81 | #define TC35892_INT_GPIIRQ 0 | ||
82 | #define TC35892_INT_TI0IRQ 1 | ||
83 | #define TC35892_INT_TI1IRQ 2 | ||
84 | #define TC35892_INT_TI2IRQ 3 | ||
85 | #define TC35892_INT_ROTIRQ 5 | ||
86 | #define TC35892_INT_KBDIRQ 6 | ||
87 | #define TC35892_INT_PORIRQ 7 | ||
88 | |||
89 | #define TC35892_NR_INTERNAL_IRQS 8 | ||
90 | #define TC35892_INT_GPIO(x) (TC35892_NR_INTERNAL_IRQS + (x)) | ||
91 | |||
92 | struct tc35892 { | ||
93 | struct mutex lock; | ||
94 | struct device *dev; | ||
95 | struct i2c_client *i2c; | ||
96 | |||
97 | int irq_base; | ||
98 | int num_gpio; | ||
99 | struct tc35892_platform_data *pdata; | ||
100 | }; | ||
101 | |||
102 | extern int tc35892_reg_write(struct tc35892 *tc35892, u8 reg, u8 data); | ||
103 | extern int tc35892_reg_read(struct tc35892 *tc35892, u8 reg); | ||
104 | extern int tc35892_block_read(struct tc35892 *tc35892, u8 reg, u8 length, | ||
105 | u8 *values); | ||
106 | extern int tc35892_block_write(struct tc35892 *tc35892, u8 reg, u8 length, | ||
107 | const u8 *values); | ||
108 | extern int tc35892_set_bits(struct tc35892 *tc35892, u8 reg, u8 mask, u8 val); | ||
109 | |||
110 | /** | ||
111 | * struct tc35892_gpio_platform_data - TC35892 GPIO platform data | ||
112 | * @gpio_base: first gpio number assigned to TC35892. A maximum of | ||
113 | * %TC35892_NR_GPIOS GPIOs will be allocated. | ||
114 | * @setup: callback for board-specific initialization | ||
115 | * @remove: callback for board-specific teardown | ||
116 | */ | ||
117 | struct tc35892_gpio_platform_data { | ||
118 | int gpio_base; | ||
119 | void (*setup)(struct tc35892 *tc35892, unsigned gpio_base); | ||
120 | void (*remove)(struct tc35892 *tc35892, unsigned gpio_base); | ||
121 | }; | ||
122 | |||
123 | /** | ||
124 | * struct tc35892_platform_data - TC35892 platform data | ||
125 | * @irq_base: base IRQ number. %TC35892_NR_IRQS irqs will be used. | ||
126 | * @gpio: GPIO-specific platform data | ||
127 | */ | ||
128 | struct tc35892_platform_data { | ||
129 | int irq_base; | ||
130 | struct tc35892_gpio_platform_data *gpio; | ||
131 | }; | ||
132 | |||
133 | #define TC35892_NR_GPIOS 24 | ||
134 | #define TC35892_NR_IRQS TC35892_INT_GPIO(TC35892_NR_GPIOS) | ||
135 | |||
136 | #endif | ||
diff --git a/include/linux/mfd/tc3589x.h b/include/linux/mfd/tc3589x.h new file mode 100644 index 000000000000..16c76e124f9c --- /dev/null +++ b/include/linux/mfd/tc3589x.h | |||
@@ -0,0 +1,195 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * License Terms: GNU General Public License, version 2 | ||
5 | */ | ||
6 | |||
7 | #ifndef __LINUX_MFD_TC3589x_H | ||
8 | #define __LINUX_MFD_TC3589x_H | ||
9 | |||
10 | #include <linux/device.h> | ||
11 | |||
12 | enum tx3589x_block { | ||
13 | TC3589x_BLOCK_GPIO = 1 << 0, | ||
14 | TC3589x_BLOCK_KEYPAD = 1 << 1, | ||
15 | }; | ||
16 | |||
17 | #define TC3589x_RSTCTRL_IRQRST (1 << 4) | ||
18 | #define TC3589x_RSTCTRL_TIMRST (1 << 3) | ||
19 | #define TC3589x_RSTCTRL_ROTRST (1 << 2) | ||
20 | #define TC3589x_RSTCTRL_KBDRST (1 << 1) | ||
21 | #define TC3589x_RSTCTRL_GPIRST (1 << 0) | ||
22 | |||
23 | /* Keyboard Configuration Registers */ | ||
24 | #define TC3589x_KBDSETTLE_REG 0x01 | ||
25 | #define TC3589x_KBDBOUNCE 0x02 | ||
26 | #define TC3589x_KBDSIZE 0x03 | ||
27 | #define TC3589x_KBCFG_LSB 0x04 | ||
28 | #define TC3589x_KBCFG_MSB 0x05 | ||
29 | #define TC3589x_KBDIC 0x08 | ||
30 | #define TC3589x_KBDMSK 0x09 | ||
31 | #define TC3589x_EVTCODE_FIFO 0x10 | ||
32 | #define TC3589x_KBDMFS 0x8F | ||
33 | |||
34 | #define TC3589x_IRQST 0x91 | ||
35 | |||
36 | #define TC3589x_MANFCODE_MAGIC 0x03 | ||
37 | #define TC3589x_MANFCODE 0x80 | ||
38 | #define TC3589x_VERSION 0x81 | ||
39 | #define TC3589x_IOCFG 0xA7 | ||
40 | |||
41 | #define TC3589x_CLKMODE 0x88 | ||
42 | #define TC3589x_CLKCFG 0x89 | ||
43 | #define TC3589x_CLKEN 0x8A | ||
44 | |||
45 | #define TC3589x_RSTCTRL 0x82 | ||
46 | #define TC3589x_EXTRSTN 0x83 | ||
47 | #define TC3589x_RSTINTCLR 0x84 | ||
48 | |||
49 | /* Pull up/down configuration registers */ | ||
50 | #define TC3589x_IOCFG 0xA7 | ||
51 | #define TC3589x_IOPULLCFG0_LSB 0xAA | ||
52 | #define TC3589x_IOPULLCFG0_MSB 0xAB | ||
53 | #define TC3589x_IOPULLCFG1_LSB 0xAC | ||
54 | #define TC3589x_IOPULLCFG1_MSB 0xAD | ||
55 | #define TC3589x_IOPULLCFG2_LSB 0xAE | ||
56 | |||
57 | #define TC3589x_GPIOIS0 0xC9 | ||
58 | #define TC3589x_GPIOIS1 0xCA | ||
59 | #define TC3589x_GPIOIS2 0xCB | ||
60 | #define TC3589x_GPIOIBE0 0xCC | ||
61 | #define TC3589x_GPIOIBE1 0xCD | ||
62 | #define TC3589x_GPIOIBE2 0xCE | ||
63 | #define TC3589x_GPIOIEV0 0xCF | ||
64 | #define TC3589x_GPIOIEV1 0xD0 | ||
65 | #define TC3589x_GPIOIEV2 0xD1 | ||
66 | #define TC3589x_GPIOIE0 0xD2 | ||
67 | #define TC3589x_GPIOIE1 0xD3 | ||
68 | #define TC3589x_GPIOIE2 0xD4 | ||
69 | #define TC3589x_GPIORIS0 0xD6 | ||
70 | #define TC3589x_GPIORIS1 0xD7 | ||
71 | #define TC3589x_GPIORIS2 0xD8 | ||
72 | #define TC3589x_GPIOMIS0 0xD9 | ||
73 | #define TC3589x_GPIOMIS1 0xDA | ||
74 | #define TC3589x_GPIOMIS2 0xDB | ||
75 | #define TC3589x_GPIOIC0 0xDC | ||
76 | #define TC3589x_GPIOIC1 0xDD | ||
77 | #define TC3589x_GPIOIC2 0xDE | ||
78 | |||
79 | #define TC3589x_GPIODATA0 0xC0 | ||
80 | #define TC3589x_GPIOMASK0 0xc1 | ||
81 | #define TC3589x_GPIODATA1 0xC2 | ||
82 | #define TC3589x_GPIOMASK1 0xc3 | ||
83 | #define TC3589x_GPIODATA2 0xC4 | ||
84 | #define TC3589x_GPIOMASK2 0xC5 | ||
85 | |||
86 | #define TC3589x_GPIODIR0 0xC6 | ||
87 | #define TC3589x_GPIODIR1 0xC7 | ||
88 | #define TC3589x_GPIODIR2 0xC8 | ||
89 | |||
90 | #define TC3589x_GPIOSYNC0 0xE6 | ||
91 | #define TC3589x_GPIOSYNC1 0xE7 | ||
92 | #define TC3589x_GPIOSYNC2 0xE8 | ||
93 | |||
94 | #define TC3589x_GPIOWAKE0 0xE9 | ||
95 | #define TC3589x_GPIOWAKE1 0xEA | ||
96 | #define TC3589x_GPIOWAKE2 0xEB | ||
97 | |||
98 | #define TC3589x_GPIOODM0 0xE0 | ||
99 | #define TC3589x_GPIOODE0 0xE1 | ||
100 | #define TC3589x_GPIOODM1 0xE2 | ||
101 | #define TC3589x_GPIOODE1 0xE3 | ||
102 | #define TC3589x_GPIOODM2 0xE4 | ||
103 | #define TC3589x_GPIOODE2 0xE5 | ||
104 | |||
105 | #define TC3589x_INT_GPIIRQ 0 | ||
106 | #define TC3589x_INT_TI0IRQ 1 | ||
107 | #define TC3589x_INT_TI1IRQ 2 | ||
108 | #define TC3589x_INT_TI2IRQ 3 | ||
109 | #define TC3589x_INT_ROTIRQ 5 | ||
110 | #define TC3589x_INT_KBDIRQ 6 | ||
111 | #define TC3589x_INT_PORIRQ 7 | ||
112 | |||
113 | #define TC3589x_NR_INTERNAL_IRQS 8 | ||
114 | #define TC3589x_INT_GPIO(x) (TC3589x_NR_INTERNAL_IRQS + (x)) | ||
115 | |||
116 | struct tc3589x { | ||
117 | struct mutex lock; | ||
118 | struct device *dev; | ||
119 | struct i2c_client *i2c; | ||
120 | |||
121 | int irq_base; | ||
122 | int num_gpio; | ||
123 | struct tc3589x_platform_data *pdata; | ||
124 | }; | ||
125 | |||
126 | extern int tc3589x_reg_write(struct tc3589x *tc3589x, u8 reg, u8 data); | ||
127 | extern int tc3589x_reg_read(struct tc3589x *tc3589x, u8 reg); | ||
128 | extern int tc3589x_block_read(struct tc3589x *tc3589x, u8 reg, u8 length, | ||
129 | u8 *values); | ||
130 | extern int tc3589x_block_write(struct tc3589x *tc3589x, u8 reg, u8 length, | ||
131 | const u8 *values); | ||
132 | extern int tc3589x_set_bits(struct tc3589x *tc3589x, u8 reg, u8 mask, u8 val); | ||
133 | |||
134 | /* | ||
135 | * Keypad related platform specific constants | ||
136 | * These values may be modified for fine tuning | ||
137 | */ | ||
138 | #define TC_KPD_ROWS 0x8 | ||
139 | #define TC_KPD_COLUMNS 0x8 | ||
140 | #define TC_KPD_DEBOUNCE_PERIOD 0xA3 | ||
141 | #define TC_KPD_SETTLE_TIME 0xA3 | ||
142 | |||
143 | /** | ||
144 | * struct tc35893_platform_data - data structure for platform specific data | ||
145 | * @keymap_data: matrix scan code table for keycodes | ||
146 | * @krow: mask for available rows, value is 0xFF | ||
147 | * @kcol: mask for available columns, value is 0xFF | ||
148 | * @debounce_period: platform specific debounce time | ||
149 | * @settle_time: platform specific settle down time | ||
150 | * @irqtype: type of interrupt, falling or rising edge | ||
151 | * @enable_wakeup: specifies if keypad event can wake up system from sleep | ||
152 | * @no_autorepeat: flag for auto repetition | ||
153 | */ | ||
154 | struct tc3589x_keypad_platform_data { | ||
155 | const struct matrix_keymap_data *keymap_data; | ||
156 | u8 krow; | ||
157 | u8 kcol; | ||
158 | u8 debounce_period; | ||
159 | u8 settle_time; | ||
160 | unsigned long irqtype; | ||
161 | bool enable_wakeup; | ||
162 | bool no_autorepeat; | ||
163 | }; | ||
164 | |||
165 | /** | ||
166 | * struct tc3589x_gpio_platform_data - TC3589x GPIO platform data | ||
167 | * @gpio_base: first gpio number assigned to TC3589x. A maximum of | ||
168 | * %TC3589x_NR_GPIOS GPIOs will be allocated. | ||
169 | * @setup: callback for board-specific initialization | ||
170 | * @remove: callback for board-specific teardown | ||
171 | */ | ||
172 | struct tc3589x_gpio_platform_data { | ||
173 | int gpio_base; | ||
174 | void (*setup)(struct tc3589x *tc3589x, unsigned gpio_base); | ||
175 | void (*remove)(struct tc3589x *tc3589x, unsigned gpio_base); | ||
176 | }; | ||
177 | |||
178 | /** | ||
179 | * struct tc3589x_platform_data - TC3589x platform data | ||
180 | * @block: bitmask of blocks to enable (use TC3589x_BLOCK_*) | ||
181 | * @irq_base: base IRQ number. %TC3589x_NR_IRQS irqs will be used. | ||
182 | * @gpio: GPIO-specific platform data | ||
183 | * @keypad: keypad-specific platform data | ||
184 | */ | ||
185 | struct tc3589x_platform_data { | ||
186 | unsigned int block; | ||
187 | int irq_base; | ||
188 | struct tc3589x_gpio_platform_data *gpio; | ||
189 | const struct tc3589x_keypad_platform_data *keypad; | ||
190 | }; | ||
191 | |||
192 | #define TC3589x_NR_GPIOS 24 | ||
193 | #define TC3589x_NR_IRQS TC3589x_INT_GPIO(TC3589x_NR_GPIOS) | ||
194 | |||
195 | #endif | ||
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h index 085f041197dc..8e70310ee945 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h | |||
@@ -57,6 +57,10 @@ | |||
57 | * is configured in 4-bit mode. | 57 | * is configured in 4-bit mode. |
58 | */ | 58 | */ |
59 | #define TMIO_MMC_BLKSZ_2BYTES (1 << 1) | 59 | #define TMIO_MMC_BLKSZ_2BYTES (1 << 1) |
60 | /* | ||
61 | * Some controllers can support SDIO IRQ signalling. | ||
62 | */ | ||
63 | #define TMIO_MMC_SDIO_IRQ (1 << 2) | ||
60 | 64 | ||
61 | int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base); | 65 | int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base); |
62 | int tmio_core_mmc_resume(void __iomem *cnf, int shift, unsigned long base); | 66 | int tmio_core_mmc_resume(void __iomem *cnf, int shift, unsigned long base); |
@@ -66,6 +70,7 @@ void tmio_core_mmc_clk_div(void __iomem *cnf, int shift, int state); | |||
66 | struct tmio_mmc_dma { | 70 | struct tmio_mmc_dma { |
67 | void *chan_priv_tx; | 71 | void *chan_priv_tx; |
68 | void *chan_priv_rx; | 72 | void *chan_priv_rx; |
73 | int alignment_shift; | ||
69 | }; | 74 | }; |
70 | 75 | ||
71 | /* | 76 | /* |
diff --git a/include/linux/mfd/wl1273-core.h b/include/linux/mfd/wl1273-core.h new file mode 100644 index 000000000000..9787293eae5f --- /dev/null +++ b/include/linux/mfd/wl1273-core.h | |||
@@ -0,0 +1,288 @@ | |||
1 | /* | ||
2 | * include/linux/mfd/wl1273-core.h | ||
3 | * | ||
4 | * Some definitions for the wl1273 radio receiver/transmitter chip. | ||
5 | * | ||
6 | * Copyright (C) 2010 Nokia Corporation | ||
7 | * Author: Matti J. Aaltonen <matti.j.aaltonen@nokia.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * version 2 as published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, but | ||
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
21 | * 02110-1301 USA | ||
22 | */ | ||
23 | |||
24 | #ifndef WL1273_CORE_H | ||
25 | #define WL1273_CORE_H | ||
26 | |||
27 | #include <linux/i2c.h> | ||
28 | #include <linux/mfd/core.h> | ||
29 | |||
30 | #define WL1273_FM_DRIVER_NAME "wl1273-fm" | ||
31 | #define RX71_FM_I2C_ADDR 0x22 | ||
32 | |||
33 | #define WL1273_STEREO_GET 0 | ||
34 | #define WL1273_RSSI_LVL_GET 1 | ||
35 | #define WL1273_IF_COUNT_GET 2 | ||
36 | #define WL1273_FLAG_GET 3 | ||
37 | #define WL1273_RDS_SYNC_GET 4 | ||
38 | #define WL1273_RDS_DATA_GET 5 | ||
39 | #define WL1273_FREQ_SET 10 | ||
40 | #define WL1273_AF_FREQ_SET 11 | ||
41 | #define WL1273_MOST_MODE_SET 12 | ||
42 | #define WL1273_MOST_BLEND_SET 13 | ||
43 | #define WL1273_DEMPH_MODE_SET 14 | ||
44 | #define WL1273_SEARCH_LVL_SET 15 | ||
45 | #define WL1273_BAND_SET 16 | ||
46 | #define WL1273_MUTE_STATUS_SET 17 | ||
47 | #define WL1273_RDS_PAUSE_LVL_SET 18 | ||
48 | #define WL1273_RDS_PAUSE_DUR_SET 19 | ||
49 | #define WL1273_RDS_MEM_SET 20 | ||
50 | #define WL1273_RDS_BLK_B_SET 21 | ||
51 | #define WL1273_RDS_MSK_B_SET 22 | ||
52 | #define WL1273_RDS_PI_MASK_SET 23 | ||
53 | #define WL1273_RDS_PI_SET 24 | ||
54 | #define WL1273_RDS_SYSTEM_SET 25 | ||
55 | #define WL1273_INT_MASK_SET 26 | ||
56 | #define WL1273_SEARCH_DIR_SET 27 | ||
57 | #define WL1273_VOLUME_SET 28 | ||
58 | #define WL1273_AUDIO_ENABLE 29 | ||
59 | #define WL1273_PCM_MODE_SET 30 | ||
60 | #define WL1273_I2S_MODE_CONFIG_SET 31 | ||
61 | #define WL1273_POWER_SET 32 | ||
62 | #define WL1273_INTX_CONFIG_SET 33 | ||
63 | #define WL1273_PULL_EN_SET 34 | ||
64 | #define WL1273_HILO_SET 35 | ||
65 | #define WL1273_SWITCH2FREF 36 | ||
66 | #define WL1273_FREQ_DRIFT_REPORT 37 | ||
67 | |||
68 | #define WL1273_PCE_GET 40 | ||
69 | #define WL1273_FIRM_VER_GET 41 | ||
70 | #define WL1273_ASIC_VER_GET 42 | ||
71 | #define WL1273_ASIC_ID_GET 43 | ||
72 | #define WL1273_MAN_ID_GET 44 | ||
73 | #define WL1273_TUNER_MODE_SET 45 | ||
74 | #define WL1273_STOP_SEARCH 46 | ||
75 | #define WL1273_RDS_CNTRL_SET 47 | ||
76 | |||
77 | #define WL1273_WRITE_HARDWARE_REG 100 | ||
78 | #define WL1273_CODE_DOWNLOAD 101 | ||
79 | #define WL1273_RESET 102 | ||
80 | |||
81 | #define WL1273_FM_POWER_MODE 254 | ||
82 | #define WL1273_FM_INTERRUPT 255 | ||
83 | |||
84 | /* Transmitter API */ | ||
85 | |||
86 | #define WL1273_CHANL_SET 55 | ||
87 | #define WL1273_SCAN_SPACING_SET 56 | ||
88 | #define WL1273_REF_SET 57 | ||
89 | #define WL1273_POWER_ENB_SET 90 | ||
90 | #define WL1273_POWER_ATT_SET 58 | ||
91 | #define WL1273_POWER_LEV_SET 59 | ||
92 | #define WL1273_AUDIO_DEV_SET 60 | ||
93 | #define WL1273_PILOT_DEV_SET 61 | ||
94 | #define WL1273_RDS_DEV_SET 62 | ||
95 | #define WL1273_PUPD_SET 91 | ||
96 | #define WL1273_AUDIO_IO_SET 63 | ||
97 | #define WL1273_PREMPH_SET 64 | ||
98 | #define WL1273_MONO_SET 66 | ||
99 | #define WL1273_MUTE 92 | ||
100 | #define WL1273_MPX_LMT_ENABLE 67 | ||
101 | #define WL1273_PI_SET 93 | ||
102 | #define WL1273_ECC_SET 69 | ||
103 | #define WL1273_PTY 70 | ||
104 | #define WL1273_AF 71 | ||
105 | #define WL1273_DISPLAY_MODE 74 | ||
106 | #define WL1273_RDS_REP_SET 77 | ||
107 | #define WL1273_RDS_CONFIG_DATA_SET 98 | ||
108 | #define WL1273_RDS_DATA_SET 99 | ||
109 | #define WL1273_RDS_DATA_ENB 94 | ||
110 | #define WL1273_TA_SET 78 | ||
111 | #define WL1273_TP_SET 79 | ||
112 | #define WL1273_DI_SET 80 | ||
113 | #define WL1273_MS_SET 81 | ||
114 | #define WL1273_PS_SCROLL_SPEED 82 | ||
115 | #define WL1273_TX_AUDIO_LEVEL_TEST 96 | ||
116 | #define WL1273_TX_AUDIO_LEVEL_TEST_THRESHOLD 73 | ||
117 | #define WL1273_TX_AUDIO_INPUT_LEVEL_RANGE_SET 54 | ||
118 | #define WL1273_RX_ANTENNA_SELECT 87 | ||
119 | #define WL1273_I2C_DEV_ADDR_SET 86 | ||
120 | #define WL1273_REF_ERR_CALIB_PARAM_SET 88 | ||
121 | #define WL1273_REF_ERR_CALIB_PERIODICITY_SET 89 | ||
122 | #define WL1273_SOC_INT_TRIGGER 52 | ||
123 | #define WL1273_SOC_AUDIO_PATH_SET 83 | ||
124 | #define WL1273_SOC_PCMI_OVERRIDE 84 | ||
125 | #define WL1273_SOC_I2S_OVERRIDE 85 | ||
126 | #define WL1273_RSSI_BLOCK_SCAN_FREQ_SET 95 | ||
127 | #define WL1273_RSSI_BLOCK_SCAN_START 97 | ||
128 | #define WL1273_RSSI_BLOCK_SCAN_DATA_GET 5 | ||
129 | #define WL1273_READ_FMANT_TUNE_VALUE 104 | ||
130 | |||
131 | #define WL1273_RDS_OFF 0 | ||
132 | #define WL1273_RDS_ON 1 | ||
133 | #define WL1273_RDS_RESET 2 | ||
134 | |||
135 | #define WL1273_AUDIO_DIGITAL 0 | ||
136 | #define WL1273_AUDIO_ANALOG 1 | ||
137 | |||
138 | #define WL1273_MODE_RX BIT(0) | ||
139 | #define WL1273_MODE_TX BIT(1) | ||
140 | #define WL1273_MODE_OFF BIT(2) | ||
141 | #define WL1273_MODE_SUSPENDED BIT(3) | ||
142 | |||
143 | #define WL1273_RADIO_CHILD BIT(0) | ||
144 | #define WL1273_CODEC_CHILD BIT(1) | ||
145 | |||
146 | #define WL1273_RX_MONO 1 | ||
147 | #define WL1273_RX_STEREO 0 | ||
148 | #define WL1273_TX_MONO 0 | ||
149 | #define WL1273_TX_STEREO 1 | ||
150 | |||
151 | #define WL1273_MAX_VOLUME 0xffff | ||
152 | #define WL1273_DEFAULT_VOLUME 0x78b8 | ||
153 | |||
154 | /* I2S protocol, left channel first, data width 16 bits */ | ||
155 | #define WL1273_PCM_DEF_MODE 0x00 | ||
156 | |||
157 | /* Rx */ | ||
158 | #define WL1273_AUDIO_ENABLE_I2S BIT(0) | ||
159 | #define WL1273_AUDIO_ENABLE_ANALOG BIT(1) | ||
160 | |||
161 | /* Tx */ | ||
162 | #define WL1273_AUDIO_IO_SET_ANALOG 0 | ||
163 | #define WL1273_AUDIO_IO_SET_I2S 1 | ||
164 | |||
165 | #define WL1273_PUPD_SET_OFF 0x00 | ||
166 | #define WL1273_PUPD_SET_ON 0x01 | ||
167 | #define WL1273_PUPD_SET_RETENTION 0x10 | ||
168 | |||
169 | /* I2S mode */ | ||
170 | #define WL1273_IS2_WIDTH_32 0x0 | ||
171 | #define WL1273_IS2_WIDTH_40 0x1 | ||
172 | #define WL1273_IS2_WIDTH_22_23 0x2 | ||
173 | #define WL1273_IS2_WIDTH_23_22 0x3 | ||
174 | #define WL1273_IS2_WIDTH_48 0x4 | ||
175 | #define WL1273_IS2_WIDTH_50 0x5 | ||
176 | #define WL1273_IS2_WIDTH_60 0x6 | ||
177 | #define WL1273_IS2_WIDTH_64 0x7 | ||
178 | #define WL1273_IS2_WIDTH_80 0x8 | ||
179 | #define WL1273_IS2_WIDTH_96 0x9 | ||
180 | #define WL1273_IS2_WIDTH_128 0xa | ||
181 | #define WL1273_IS2_WIDTH 0xf | ||
182 | |||
183 | #define WL1273_IS2_FORMAT_STD (0x0 << 4) | ||
184 | #define WL1273_IS2_FORMAT_LEFT (0x1 << 4) | ||
185 | #define WL1273_IS2_FORMAT_RIGHT (0x2 << 4) | ||
186 | #define WL1273_IS2_FORMAT_USER (0x3 << 4) | ||
187 | |||
188 | #define WL1273_IS2_MASTER (0x0 << 6) | ||
189 | #define WL1273_IS2_SLAVEW (0x1 << 6) | ||
190 | |||
191 | #define WL1273_IS2_TRI_AFTER_SENDING (0x0 << 7) | ||
192 | #define WL1273_IS2_TRI_ALWAYS_ACTIVE (0x1 << 7) | ||
193 | |||
194 | #define WL1273_IS2_SDOWS_RR (0x0 << 8) | ||
195 | #define WL1273_IS2_SDOWS_RF (0x1 << 8) | ||
196 | #define WL1273_IS2_SDOWS_FR (0x2 << 8) | ||
197 | #define WL1273_IS2_SDOWS_FF (0x3 << 8) | ||
198 | |||
199 | #define WL1273_IS2_TRI_OPT (0x0 << 10) | ||
200 | #define WL1273_IS2_TRI_ALWAYS (0x1 << 10) | ||
201 | |||
202 | #define WL1273_IS2_RATE_48K (0x0 << 12) | ||
203 | #define WL1273_IS2_RATE_44_1K (0x1 << 12) | ||
204 | #define WL1273_IS2_RATE_32K (0x2 << 12) | ||
205 | #define WL1273_IS2_RATE_22_05K (0x4 << 12) | ||
206 | #define WL1273_IS2_RATE_16K (0x5 << 12) | ||
207 | #define WL1273_IS2_RATE_12K (0x8 << 12) | ||
208 | #define WL1273_IS2_RATE_11_025 (0x9 << 12) | ||
209 | #define WL1273_IS2_RATE_8K (0xa << 12) | ||
210 | #define WL1273_IS2_RATE (0xf << 12) | ||
211 | |||
212 | #define WL1273_I2S_DEF_MODE (WL1273_IS2_WIDTH_32 | \ | ||
213 | WL1273_IS2_FORMAT_STD | \ | ||
214 | WL1273_IS2_MASTER | \ | ||
215 | WL1273_IS2_TRI_AFTER_SENDING | \ | ||
216 | WL1273_IS2_SDOWS_RR | \ | ||
217 | WL1273_IS2_TRI_OPT | \ | ||
218 | WL1273_IS2_RATE_48K) | ||
219 | |||
220 | #define SCHAR_MIN (-128) | ||
221 | #define SCHAR_MAX 127 | ||
222 | |||
223 | #define WL1273_FR_EVENT BIT(0) | ||
224 | #define WL1273_BL_EVENT BIT(1) | ||
225 | #define WL1273_RDS_EVENT BIT(2) | ||
226 | #define WL1273_BBLK_EVENT BIT(3) | ||
227 | #define WL1273_LSYNC_EVENT BIT(4) | ||
228 | #define WL1273_LEV_EVENT BIT(5) | ||
229 | #define WL1273_IFFR_EVENT BIT(6) | ||
230 | #define WL1273_PI_EVENT BIT(7) | ||
231 | #define WL1273_PD_EVENT BIT(8) | ||
232 | #define WL1273_STIC_EVENT BIT(9) | ||
233 | #define WL1273_MAL_EVENT BIT(10) | ||
234 | #define WL1273_POW_ENB_EVENT BIT(11) | ||
235 | #define WL1273_SCAN_OVER_EVENT BIT(12) | ||
236 | #define WL1273_ERROR_EVENT BIT(13) | ||
237 | |||
238 | #define TUNER_MODE_STOP_SEARCH 0 | ||
239 | #define TUNER_MODE_PRESET 1 | ||
240 | #define TUNER_MODE_AUTO_SEEK 2 | ||
241 | #define TUNER_MODE_AF 3 | ||
242 | #define TUNER_MODE_AUTO_SEEK_PI 4 | ||
243 | #define TUNER_MODE_AUTO_SEEK_BULK 5 | ||
244 | |||
245 | #define RDS_BLOCK_SIZE 3 | ||
246 | |||
247 | struct wl1273_fm_platform_data { | ||
248 | int (*request_resources) (struct i2c_client *client); | ||
249 | void (*free_resources) (void); | ||
250 | void (*enable) (void); | ||
251 | void (*disable) (void); | ||
252 | |||
253 | u8 forbidden_modes; | ||
254 | unsigned int children; | ||
255 | }; | ||
256 | |||
257 | #define WL1273_FM_CORE_CELLS 2 | ||
258 | |||
259 | #define WL1273_BAND_OTHER 0 | ||
260 | #define WL1273_BAND_JAPAN 1 | ||
261 | |||
262 | #define WL1273_BAND_JAPAN_LOW 76000 | ||
263 | #define WL1273_BAND_JAPAN_HIGH 90000 | ||
264 | #define WL1273_BAND_OTHER_LOW 87500 | ||
265 | #define WL1273_BAND_OTHER_HIGH 108000 | ||
266 | |||
267 | #define WL1273_BAND_TX_LOW 76000 | ||
268 | #define WL1273_BAND_TX_HIGH 108000 | ||
269 | |||
270 | struct wl1273_core { | ||
271 | struct mfd_cell cells[WL1273_FM_CORE_CELLS]; | ||
272 | struct wl1273_fm_platform_data *pdata; | ||
273 | |||
274 | unsigned int mode; | ||
275 | unsigned int i2s_mode; | ||
276 | unsigned int volume; | ||
277 | unsigned int audio_mode; | ||
278 | unsigned int channel_number; | ||
279 | struct mutex lock; /* for serializing fm radio operations */ | ||
280 | |||
281 | struct i2c_client *client; | ||
282 | |||
283 | int (*write)(struct wl1273_core *core, u8, u16); | ||
284 | int (*set_audio)(struct wl1273_core *core, unsigned int); | ||
285 | int (*set_volume)(struct wl1273_core *core, unsigned int); | ||
286 | }; | ||
287 | |||
288 | #endif /* ifndef WL1273_CORE_H */ | ||
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h new file mode 100644 index 000000000000..16b0261763ed --- /dev/null +++ b/include/linux/mmc/dw_mmc.h | |||
@@ -0,0 +1,217 @@ | |||
1 | /* | ||
2 | * Synopsys DesignWare Multimedia Card Interface driver | ||
3 | * (Based on NXP driver for lpc 31xx) | ||
4 | * | ||
5 | * Copyright (C) 2009 NXP Semiconductors | ||
6 | * Copyright (C) 2009, 2010 Imagination Technologies Ltd. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | */ | ||
13 | |||
14 | #ifndef _LINUX_MMC_DW_MMC_H_ | ||
15 | #define _LINUX_MMC_DW_MMC_H_ | ||
16 | |||
17 | #define MAX_MCI_SLOTS 2 | ||
18 | |||
19 | enum dw_mci_state { | ||
20 | STATE_IDLE = 0, | ||
21 | STATE_SENDING_CMD, | ||
22 | STATE_SENDING_DATA, | ||
23 | STATE_DATA_BUSY, | ||
24 | STATE_SENDING_STOP, | ||
25 | STATE_DATA_ERROR, | ||
26 | }; | ||
27 | |||
28 | enum { | ||
29 | EVENT_CMD_COMPLETE = 0, | ||
30 | EVENT_XFER_COMPLETE, | ||
31 | EVENT_DATA_COMPLETE, | ||
32 | EVENT_DATA_ERROR, | ||
33 | EVENT_XFER_ERROR | ||
34 | }; | ||
35 | |||
36 | struct mmc_data; | ||
37 | |||
38 | /** | ||
39 | * struct dw_mci - MMC controller state shared between all slots | ||
40 | * @lock: Spinlock protecting the queue and associated data. | ||
41 | * @regs: Pointer to MMIO registers. | ||
42 | * @sg: Scatterlist entry currently being processed by PIO code, if any. | ||
43 | * @pio_offset: Offset into the current scatterlist entry. | ||
44 | * @cur_slot: The slot which is currently using the controller. | ||
45 | * @mrq: The request currently being processed on @cur_slot, | ||
46 | * or NULL if the controller is idle. | ||
47 | * @cmd: The command currently being sent to the card, or NULL. | ||
48 | * @data: The data currently being transferred, or NULL if no data | ||
49 | * transfer is in progress. | ||
50 | * @use_dma: Whether DMA channel is initialized or not. | ||
51 | * @sg_dma: Bus address of DMA buffer. | ||
52 | * @sg_cpu: Virtual address of DMA buffer. | ||
53 | * @dma_ops: Pointer to platform-specific DMA callbacks. | ||
54 | * @cmd_status: Snapshot of SR taken upon completion of the current | ||
55 | * command. Only valid when EVENT_CMD_COMPLETE is pending. | ||
56 | * @data_status: Snapshot of SR taken upon completion of the current | ||
57 | * data transfer. Only valid when EVENT_DATA_COMPLETE or | ||
58 | * EVENT_DATA_ERROR is pending. | ||
59 | * @stop_cmdr: Value to be loaded into CMDR when the stop command is | ||
60 | * to be sent. | ||
61 | * @dir_status: Direction of current transfer. | ||
62 | * @tasklet: Tasklet running the request state machine. | ||
63 | * @card_tasklet: Tasklet handling card detect. | ||
64 | * @pending_events: Bitmask of events flagged by the interrupt handler | ||
65 | * to be processed by the tasklet. | ||
66 | * @completed_events: Bitmask of events which the state machine has | ||
67 | * processed. | ||
68 | * @state: Tasklet state. | ||
69 | * @queue: List of slots waiting for access to the controller. | ||
70 | * @bus_hz: The rate of @mck in Hz. This forms the basis for MMC bus | ||
71 | * rate and timeout calculations. | ||
72 | * @current_speed: Configured rate of the controller. | ||
73 | * @num_slots: Number of slots available. | ||
74 | * @pdev: Platform device associated with the MMC controller. | ||
75 | * @pdata: Platform data associated with the MMC controller. | ||
76 | * @slot: Slots sharing this MMC controller. | ||
77 | * @data_shift: log2 of FIFO item size. | ||
78 | * @push_data: Pointer to FIFO push function. | ||
79 | * @pull_data: Pointer to FIFO pull function. | ||
80 | * @quirks: Set of quirks that apply to specific versions of the IP. | ||
81 | * | ||
82 | * Locking | ||
83 | * ======= | ||
84 | * | ||
85 | * @lock is a softirq-safe spinlock protecting @queue as well as | ||
86 | * @cur_slot, @mrq and @state. These must always be updated | ||
87 | * at the same time while holding @lock. | ||
88 | * | ||
89 | * The @mrq field of struct dw_mci_slot is also protected by @lock, | ||
90 | * and must always be written at the same time as the slot is added to | ||
91 | * @queue. | ||
92 | * | ||
93 | * @pending_events and @completed_events are accessed using atomic bit | ||
94 | * operations, so they don't need any locking. | ||
95 | * | ||
96 | * None of the fields touched by the interrupt handler need any | ||
97 | * locking. However, ordering is important: Before EVENT_DATA_ERROR or | ||
98 | * EVENT_DATA_COMPLETE is set in @pending_events, all data-related | ||
99 | * interrupts must be disabled and @data_status updated with a | ||
100 | * snapshot of SR. Similarly, before EVENT_CMD_COMPLETE is set, the | ||
101 | * CMDRDY interupt must be disabled and @cmd_status updated with a | ||
102 | * snapshot of SR, and before EVENT_XFER_COMPLETE can be set, the | ||
103 | * bytes_xfered field of @data must be written. This is ensured by | ||
104 | * using barriers. | ||
105 | */ | ||
106 | struct dw_mci { | ||
107 | spinlock_t lock; | ||
108 | void __iomem *regs; | ||
109 | |||
110 | struct scatterlist *sg; | ||
111 | unsigned int pio_offset; | ||
112 | |||
113 | struct dw_mci_slot *cur_slot; | ||
114 | struct mmc_request *mrq; | ||
115 | struct mmc_command *cmd; | ||
116 | struct mmc_data *data; | ||
117 | |||
118 | /* DMA interface members*/ | ||
119 | int use_dma; | ||
120 | |||
121 | dma_addr_t sg_dma; | ||
122 | void *sg_cpu; | ||
123 | struct dw_mci_dma_ops *dma_ops; | ||
124 | #ifdef CONFIG_MMC_DW_IDMAC | ||
125 | unsigned int ring_size; | ||
126 | #else | ||
127 | struct dw_mci_dma_data *dma_data; | ||
128 | #endif | ||
129 | u32 cmd_status; | ||
130 | u32 data_status; | ||
131 | u32 stop_cmdr; | ||
132 | u32 dir_status; | ||
133 | struct tasklet_struct tasklet; | ||
134 | struct tasklet_struct card_tasklet; | ||
135 | unsigned long pending_events; | ||
136 | unsigned long completed_events; | ||
137 | enum dw_mci_state state; | ||
138 | struct list_head queue; | ||
139 | |||
140 | u32 bus_hz; | ||
141 | u32 current_speed; | ||
142 | u32 num_slots; | ||
143 | struct platform_device *pdev; | ||
144 | struct dw_mci_board *pdata; | ||
145 | struct dw_mci_slot *slot[MAX_MCI_SLOTS]; | ||
146 | |||
147 | /* FIFO push and pull */ | ||
148 | int data_shift; | ||
149 | void (*push_data)(struct dw_mci *host, void *buf, int cnt); | ||
150 | void (*pull_data)(struct dw_mci *host, void *buf, int cnt); | ||
151 | |||
152 | /* Workaround flags */ | ||
153 | u32 quirks; | ||
154 | }; | ||
155 | |||
156 | /* DMA ops for Internal/External DMAC interface */ | ||
157 | struct dw_mci_dma_ops { | ||
158 | /* DMA Ops */ | ||
159 | int (*init)(struct dw_mci *host); | ||
160 | void (*start)(struct dw_mci *host, unsigned int sg_len); | ||
161 | void (*complete)(struct dw_mci *host); | ||
162 | void (*stop)(struct dw_mci *host); | ||
163 | void (*cleanup)(struct dw_mci *host); | ||
164 | void (*exit)(struct dw_mci *host); | ||
165 | }; | ||
166 | |||
167 | /* IP Quirks/flags. */ | ||
168 | /* No special quirks or flags to cater for */ | ||
169 | #define DW_MCI_QUIRK_NONE 0 | ||
170 | /* DTO fix for command transmission with IDMAC configured */ | ||
171 | #define DW_MCI_QUIRK_IDMAC_DTO 1 | ||
172 | /* delay needed between retries on some 2.11a implementations */ | ||
173 | #define DW_MCI_QUIRK_RETRY_DELAY 2 | ||
174 | /* High Speed Capable - Supports HS cards (upto 50MHz) */ | ||
175 | #define DW_MCI_QUIRK_HIGHSPEED 4 | ||
176 | |||
177 | |||
178 | struct dma_pdata; | ||
179 | |||
180 | struct block_settings { | ||
181 | unsigned short max_segs; /* see blk_queue_max_segments */ | ||
182 | unsigned int max_blk_size; /* maximum size of one mmc block */ | ||
183 | unsigned int max_blk_count; /* maximum number of blocks in one req*/ | ||
184 | unsigned int max_req_size; /* maximum number of bytes in one req*/ | ||
185 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ | ||
186 | }; | ||
187 | |||
188 | /* Board platform data */ | ||
189 | struct dw_mci_board { | ||
190 | u32 num_slots; | ||
191 | |||
192 | u32 quirks; /* Workaround / Quirk flags */ | ||
193 | unsigned int bus_hz; /* Bus speed */ | ||
194 | |||
195 | /* delay in mS before detecting cards after interrupt */ | ||
196 | u32 detect_delay_ms; | ||
197 | |||
198 | int (*init)(u32 slot_id, irq_handler_t , void *); | ||
199 | int (*get_ro)(u32 slot_id); | ||
200 | int (*get_cd)(u32 slot_id); | ||
201 | int (*get_ocr)(u32 slot_id); | ||
202 | int (*get_bus_wd)(u32 slot_id); | ||
203 | /* | ||
204 | * Enable power to selected slot and set voltage to desired level. | ||
205 | * Voltage levels are specified using MMC_VDD_xxx defines defined | ||
206 | * in linux/mmc/host.h file. | ||
207 | */ | ||
208 | void (*setpower)(u32 slot_id, u32 volt); | ||
209 | void (*exit)(u32 slot_id); | ||
210 | void (*select_slot)(u32 slot_id); | ||
211 | |||
212 | struct dw_mci_dma_ops *dma_ops; | ||
213 | struct dma_pdata *data; | ||
214 | struct block_settings *blk_settings; | ||
215 | }; | ||
216 | |||
217 | #endif /* _LINUX_MMC_DW_MMC_H_ */ | ||
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 30f6fad99a58..bcb793ec7374 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -131,6 +131,9 @@ struct mmc_host { | |||
131 | unsigned int f_max; | 131 | unsigned int f_max; |
132 | unsigned int f_init; | 132 | unsigned int f_init; |
133 | u32 ocr_avail; | 133 | u32 ocr_avail; |
134 | u32 ocr_avail_sdio; /* SDIO-specific OCR */ | ||
135 | u32 ocr_avail_sd; /* SD-specific OCR */ | ||
136 | u32 ocr_avail_mmc; /* MMC-specific OCR */ | ||
134 | struct notifier_block pm_notify; | 137 | struct notifier_block pm_notify; |
135 | 138 | ||
136 | #define MMC_VDD_165_195 0x00000080 /* VDD voltage 1.65 - 1.95 */ | 139 | #define MMC_VDD_165_195 0x00000080 /* VDD voltage 1.65 - 1.95 */ |
@@ -169,9 +172,20 @@ struct mmc_host { | |||
169 | #define MMC_CAP_1_2V_DDR (1 << 12) /* can support */ | 172 | #define MMC_CAP_1_2V_DDR (1 << 12) /* can support */ |
170 | /* DDR mode at 1.2V */ | 173 | /* DDR mode at 1.2V */ |
171 | #define MMC_CAP_POWER_OFF_CARD (1 << 13) /* Can power off after boot */ | 174 | #define MMC_CAP_POWER_OFF_CARD (1 << 13) /* Can power off after boot */ |
175 | #define MMC_CAP_BUS_WIDTH_TEST (1 << 14) /* CMD14/CMD19 bus width ok */ | ||
172 | 176 | ||
173 | mmc_pm_flag_t pm_caps; /* supported pm features */ | 177 | mmc_pm_flag_t pm_caps; /* supported pm features */ |
174 | 178 | ||
179 | #ifdef CONFIG_MMC_CLKGATE | ||
180 | int clk_requests; /* internal reference counter */ | ||
181 | unsigned int clk_delay; /* number of MCI clk hold cycles */ | ||
182 | bool clk_gated; /* clock gated */ | ||
183 | struct work_struct clk_gate_work; /* delayed clock gate */ | ||
184 | unsigned int clk_old; /* old clock value cache */ | ||
185 | spinlock_t clk_lock; /* lock for clk fields */ | ||
186 | struct mutex clk_gate_mutex; /* mutex for clock gating */ | ||
187 | #endif | ||
188 | |||
175 | /* host specific block data */ | 189 | /* host specific block data */ |
176 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ | 190 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ |
177 | unsigned short max_segs; /* see blk_queue_max_segments */ | 191 | unsigned short max_segs; /* see blk_queue_max_segments */ |
@@ -307,5 +321,10 @@ static inline int mmc_card_is_removable(struct mmc_host *host) | |||
307 | return !(host->caps & MMC_CAP_NONREMOVABLE) && mmc_assume_removable; | 321 | return !(host->caps & MMC_CAP_NONREMOVABLE) && mmc_assume_removable; |
308 | } | 322 | } |
309 | 323 | ||
324 | static inline int mmc_card_is_powered_resumed(struct mmc_host *host) | ||
325 | { | ||
326 | return host->pm_flags & MMC_PM_KEEP_POWER; | ||
327 | } | ||
328 | |||
310 | #endif | 329 | #endif |
311 | 330 | ||
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index 956fbd877692..612301f85d14 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -40,7 +40,9 @@ | |||
40 | #define MMC_READ_DAT_UNTIL_STOP 11 /* adtc [31:0] dadr R1 */ | 40 | #define MMC_READ_DAT_UNTIL_STOP 11 /* adtc [31:0] dadr R1 */ |
41 | #define MMC_STOP_TRANSMISSION 12 /* ac R1b */ | 41 | #define MMC_STOP_TRANSMISSION 12 /* ac R1b */ |
42 | #define MMC_SEND_STATUS 13 /* ac [31:16] RCA R1 */ | 42 | #define MMC_SEND_STATUS 13 /* ac [31:16] RCA R1 */ |
43 | #define MMC_BUS_TEST_R 14 /* adtc R1 */ | ||
43 | #define MMC_GO_INACTIVE_STATE 15 /* ac [31:16] RCA */ | 44 | #define MMC_GO_INACTIVE_STATE 15 /* ac [31:16] RCA */ |
45 | #define MMC_BUS_TEST_W 19 /* adtc R1 */ | ||
44 | #define MMC_SPI_READ_OCR 58 /* spi spi_R3 */ | 46 | #define MMC_SPI_READ_OCR 58 /* spi spi_R3 */ |
45 | #define MMC_SPI_CRC_ON_OFF 59 /* spi [0:0] flag spi_R1 */ | 47 | #define MMC_SPI_CRC_ON_OFF 59 /* spi [0:0] flag spi_R1 */ |
46 | 48 | ||
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index 1fdc673f2396..83bd9f76709a 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h | |||
@@ -83,6 +83,8 @@ struct sdhci_host { | |||
83 | #define SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 (1<<28) | 83 | #define SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 (1<<28) |
84 | /* Controller doesn't have HISPD bit field in HI-SPEED SD card */ | 84 | /* Controller doesn't have HISPD bit field in HI-SPEED SD card */ |
85 | #define SDHCI_QUIRK_NO_HISPD_BIT (1<<29) | 85 | #define SDHCI_QUIRK_NO_HISPD_BIT (1<<29) |
86 | /* Controller treats ADMA descriptors with length 0000h incorrectly */ | ||
87 | #define SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC (1<<30) | ||
86 | 88 | ||
87 | int irq; /* Device IRQ */ | 89 | int irq; /* Device IRQ */ |
88 | void __iomem *ioaddr; /* Mapped address */ | 90 | void __iomem *ioaddr; /* Mapped address */ |
@@ -139,6 +141,10 @@ struct sdhci_host { | |||
139 | 141 | ||
140 | unsigned int caps; /* Alternative capabilities */ | 142 | unsigned int caps; /* Alternative capabilities */ |
141 | 143 | ||
144 | unsigned int ocr_avail_sdio; /* OCR bit masks */ | ||
145 | unsigned int ocr_avail_sd; | ||
146 | unsigned int ocr_avail_mmc; | ||
147 | |||
142 | unsigned long private[0] ____cacheline_aligned; | 148 | unsigned long private[0] ____cacheline_aligned; |
143 | }; | 149 | }; |
144 | #endif /* __SDHCI_H */ | 150 | #endif /* __SDHCI_H */ |
diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h index 5c99da1078aa..44fc5348fd5d 100644 --- a/include/linux/mmc/sh_mmcif.h +++ b/include/linux/mmc/sh_mmcif.h | |||
@@ -14,8 +14,9 @@ | |||
14 | #ifndef __SH_MMCIF_H__ | 14 | #ifndef __SH_MMCIF_H__ |
15 | #define __SH_MMCIF_H__ | 15 | #define __SH_MMCIF_H__ |
16 | 16 | ||
17 | #include <linux/platform_device.h> | ||
18 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/platform_device.h> | ||
19 | #include <linux/sh_dma.h> | ||
19 | 20 | ||
20 | /* | 21 | /* |
21 | * MMCIF : CE_CLK_CTRL [19:16] | 22 | * MMCIF : CE_CLK_CTRL [19:16] |
@@ -31,13 +32,19 @@ | |||
31 | * 1111 : Peripheral clock (sup_pclk set '1') | 32 | * 1111 : Peripheral clock (sup_pclk set '1') |
32 | */ | 33 | */ |
33 | 34 | ||
35 | struct sh_mmcif_dma { | ||
36 | struct sh_dmae_slave chan_priv_tx; | ||
37 | struct sh_dmae_slave chan_priv_rx; | ||
38 | }; | ||
39 | |||
34 | struct sh_mmcif_plat_data { | 40 | struct sh_mmcif_plat_data { |
35 | void (*set_pwr)(struct platform_device *pdev, int state); | 41 | void (*set_pwr)(struct platform_device *pdev, int state); |
36 | void (*down_pwr)(struct platform_device *pdev); | 42 | void (*down_pwr)(struct platform_device *pdev); |
37 | int (*get_cd)(struct platform_device *pdef); | 43 | int (*get_cd)(struct platform_device *pdef); |
38 | u8 sup_pclk; /* 1 :SH7757, 0: SH7724/SH7372 */ | 44 | struct sh_mmcif_dma *dma; |
39 | unsigned long caps; | 45 | u8 sup_pclk; /* 1 :SH7757, 0: SH7724/SH7372 */ |
40 | u32 ocr; | 46 | unsigned long caps; |
47 | u32 ocr; | ||
41 | }; | 48 | }; |
42 | 49 | ||
43 | #define MMCIF_CE_CMD_SET 0x00000000 | 50 | #define MMCIF_CE_CMD_SET 0x00000000 |
@@ -59,6 +66,32 @@ struct sh_mmcif_plat_data { | |||
59 | #define MMCIF_CE_HOST_STS2 0x0000004C | 66 | #define MMCIF_CE_HOST_STS2 0x0000004C |
60 | #define MMCIF_CE_VERSION 0x0000007C | 67 | #define MMCIF_CE_VERSION 0x0000007C |
61 | 68 | ||
69 | /* CE_BUF_ACC */ | ||
70 | #define BUF_ACC_DMAWEN (1 << 25) | ||
71 | #define BUF_ACC_DMAREN (1 << 24) | ||
72 | #define BUF_ACC_BUSW_32 (0 << 17) | ||
73 | #define BUF_ACC_BUSW_16 (1 << 17) | ||
74 | #define BUF_ACC_ATYP (1 << 16) | ||
75 | |||
76 | /* CE_CLK_CTRL */ | ||
77 | #define CLK_ENABLE (1 << 24) /* 1: output mmc clock */ | ||
78 | #define CLK_CLEAR ((1 << 19) | (1 << 18) | (1 << 17) | (1 << 16)) | ||
79 | #define CLK_SUP_PCLK ((1 << 19) | (1 << 18) | (1 << 17) | (1 << 16)) | ||
80 | #define CLKDIV_4 (1<<16) /* mmc clock frequency. | ||
81 | * n: bus clock/(2^(n+1)) */ | ||
82 | #define CLKDIV_256 (7<<16) /* mmc clock frequency. (see above) */ | ||
83 | #define SRSPTO_256 ((1 << 13) | (0 << 12)) /* resp timeout */ | ||
84 | #define SRBSYTO_29 ((1 << 11) | (1 << 10) | \ | ||
85 | (1 << 9) | (1 << 8)) /* resp busy timeout */ | ||
86 | #define SRWDTO_29 ((1 << 7) | (1 << 6) | \ | ||
87 | (1 << 5) | (1 << 4)) /* read/write timeout */ | ||
88 | #define SCCSTO_29 ((1 << 3) | (1 << 2) | \ | ||
89 | (1 << 1) | (1 << 0)) /* ccs timeout */ | ||
90 | |||
91 | /* CE_VERSION */ | ||
92 | #define SOFT_RST_ON (1 << 31) | ||
93 | #define SOFT_RST_OFF 0 | ||
94 | |||
62 | static inline u32 sh_mmcif_readl(void __iomem *addr, int reg) | 95 | static inline u32 sh_mmcif_readl(void __iomem *addr, int reg) |
63 | { | 96 | { |
64 | return readl(addr + reg); | 97 | return readl(addr + reg); |
@@ -145,21 +178,20 @@ static inline int sh_mmcif_boot_do_read(void __iomem *base, | |||
145 | 178 | ||
146 | static inline void sh_mmcif_boot_init(void __iomem *base) | 179 | static inline void sh_mmcif_boot_init(void __iomem *base) |
147 | { | 180 | { |
148 | unsigned long tmp; | ||
149 | |||
150 | /* reset */ | 181 | /* reset */ |
151 | tmp = sh_mmcif_readl(base, MMCIF_CE_VERSION); | 182 | sh_mmcif_writel(base, MMCIF_CE_VERSION, SOFT_RST_ON); |
152 | sh_mmcif_writel(base, MMCIF_CE_VERSION, tmp | 0x80000000); | 183 | sh_mmcif_writel(base, MMCIF_CE_VERSION, SOFT_RST_OFF); |
153 | sh_mmcif_writel(base, MMCIF_CE_VERSION, tmp & ~0x80000000); | ||
154 | 184 | ||
155 | /* byte swap */ | 185 | /* byte swap */ |
156 | sh_mmcif_writel(base, MMCIF_CE_BUF_ACC, 0x00010000); | 186 | sh_mmcif_writel(base, MMCIF_CE_BUF_ACC, BUF_ACC_ATYP); |
157 | 187 | ||
158 | /* Set block size in MMCIF hardware */ | 188 | /* Set block size in MMCIF hardware */ |
159 | sh_mmcif_writel(base, MMCIF_CE_BLOCK_SET, SH_MMCIF_BBS); | 189 | sh_mmcif_writel(base, MMCIF_CE_BLOCK_SET, SH_MMCIF_BBS); |
160 | 190 | ||
161 | /* Enable the clock, set it to Bus clock/256 (about 325Khz)*/ | 191 | /* Enable the clock, set it to Bus clock/256 (about 325Khz). */ |
162 | sh_mmcif_writel(base, MMCIF_CE_CLK_CTRL, 0x01072fff); | 192 | sh_mmcif_writel(base, MMCIF_CE_CLK_CTRL, |
193 | CLK_ENABLE | CLKDIV_256 | SRSPTO_256 | | ||
194 | SRBSYTO_29 | SRWDTO_29 | SCCSTO_29); | ||
163 | 195 | ||
164 | /* CMD0 */ | 196 | /* CMD0 */ |
165 | sh_mmcif_boot_cmd(base, 0x00000040, 0); | 197 | sh_mmcif_boot_cmd(base, 0x00000040, 0); |
@@ -184,7 +216,9 @@ static inline void sh_mmcif_boot_slurp(void __iomem *base, | |||
184 | unsigned long tmp; | 216 | unsigned long tmp; |
185 | 217 | ||
186 | /* In data transfer mode: Set clock to Bus clock/4 (about 20Mhz) */ | 218 | /* In data transfer mode: Set clock to Bus clock/4 (about 20Mhz) */ |
187 | sh_mmcif_writel(base, MMCIF_CE_CLK_CTRL, 0x01012fff); | 219 | sh_mmcif_writel(base, MMCIF_CE_CLK_CTRL, |
220 | CLK_ENABLE | CLKDIV_4 | SRSPTO_256 | | ||
221 | SRBSYTO_29 | SRWDTO_29 | SCCSTO_29); | ||
188 | 222 | ||
189 | /* CMD9 - Get CSD */ | 223 | /* CMD9 - Get CSD */ |
190 | sh_mmcif_boot_cmd(base, 0x09806000, 0x00010000); | 224 | sh_mmcif_boot_cmd(base, 0x09806000, 0x00010000); |
diff --git a/include/linux/module.h b/include/linux/module.h index 7575bbbdf2a2..8b17fd8c790d 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -308,6 +308,9 @@ struct module | |||
308 | /* The size of the executable code in each section. */ | 308 | /* The size of the executable code in each section. */ |
309 | unsigned int init_text_size, core_text_size; | 309 | unsigned int init_text_size, core_text_size; |
310 | 310 | ||
311 | /* Size of RO sections of the module (text+rodata) */ | ||
312 | unsigned int init_ro_size, core_ro_size; | ||
313 | |||
311 | /* Arch-specific module values */ | 314 | /* Arch-specific module values */ |
312 | struct mod_arch_specific arch; | 315 | struct mod_arch_specific arch; |
313 | 316 | ||
@@ -672,7 +675,6 @@ static inline int module_get_iter_tracepoints(struct tracepoint_iter *iter) | |||
672 | { | 675 | { |
673 | return 0; | 676 | return 0; |
674 | } | 677 | } |
675 | |||
676 | #endif /* CONFIG_MODULES */ | 678 | #endif /* CONFIG_MODULES */ |
677 | 679 | ||
678 | #ifdef CONFIG_SYSFS | 680 | #ifdef CONFIG_SYSFS |
@@ -687,6 +689,13 @@ extern int module_sysfs_initialized; | |||
687 | 689 | ||
688 | #define __MODULE_STRING(x) __stringify(x) | 690 | #define __MODULE_STRING(x) __stringify(x) |
689 | 691 | ||
692 | #ifdef CONFIG_DEBUG_SET_MODULE_RONX | ||
693 | extern void set_all_modules_text_rw(void); | ||
694 | extern void set_all_modules_text_ro(void); | ||
695 | #else | ||
696 | static inline void set_all_modules_text_rw(void) { } | ||
697 | static inline void set_all_modules_text_ro(void) { } | ||
698 | #endif | ||
690 | 699 | ||
691 | #ifdef CONFIG_GENERIC_BUG | 700 | #ifdef CONFIG_GENERIC_BUG |
692 | void module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *, | 701 | void module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *, |
diff --git a/include/linux/mount.h b/include/linux/mount.h index 5e7a59408dd4..1869ea24a739 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
14 | #include <linux/nodemask.h> | 14 | #include <linux/nodemask.h> |
15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
16 | #include <linux/seqlock.h> | ||
16 | #include <asm/atomic.h> | 17 | #include <asm/atomic.h> |
17 | 18 | ||
18 | struct super_block; | 19 | struct super_block; |
@@ -46,12 +47,24 @@ struct mnt_namespace; | |||
46 | 47 | ||
47 | #define MNT_INTERNAL 0x4000 | 48 | #define MNT_INTERNAL 0x4000 |
48 | 49 | ||
50 | struct mnt_pcp { | ||
51 | int mnt_count; | ||
52 | int mnt_writers; | ||
53 | }; | ||
54 | |||
49 | struct vfsmount { | 55 | struct vfsmount { |
50 | struct list_head mnt_hash; | 56 | struct list_head mnt_hash; |
51 | struct vfsmount *mnt_parent; /* fs we are mounted on */ | 57 | struct vfsmount *mnt_parent; /* fs we are mounted on */ |
52 | struct dentry *mnt_mountpoint; /* dentry of mountpoint */ | 58 | struct dentry *mnt_mountpoint; /* dentry of mountpoint */ |
53 | struct dentry *mnt_root; /* root of the mounted tree */ | 59 | struct dentry *mnt_root; /* root of the mounted tree */ |
54 | struct super_block *mnt_sb; /* pointer to superblock */ | 60 | struct super_block *mnt_sb; /* pointer to superblock */ |
61 | #ifdef CONFIG_SMP | ||
62 | struct mnt_pcp __percpu *mnt_pcp; | ||
63 | atomic_t mnt_longrefs; | ||
64 | #else | ||
65 | int mnt_count; | ||
66 | int mnt_writers; | ||
67 | #endif | ||
55 | struct list_head mnt_mounts; /* list of children, anchored here */ | 68 | struct list_head mnt_mounts; /* list of children, anchored here */ |
56 | struct list_head mnt_child; /* and going through their mnt_child */ | 69 | struct list_head mnt_child; /* and going through their mnt_child */ |
57 | int mnt_flags; | 70 | int mnt_flags; |
@@ -70,57 +83,25 @@ struct vfsmount { | |||
70 | struct mnt_namespace *mnt_ns; /* containing namespace */ | 83 | struct mnt_namespace *mnt_ns; /* containing namespace */ |
71 | int mnt_id; /* mount identifier */ | 84 | int mnt_id; /* mount identifier */ |
72 | int mnt_group_id; /* peer group identifier */ | 85 | int mnt_group_id; /* peer group identifier */ |
73 | /* | ||
74 | * We put mnt_count & mnt_expiry_mark at the end of struct vfsmount | ||
75 | * to let these frequently modified fields in a separate cache line | ||
76 | * (so that reads of mnt_flags wont ping-pong on SMP machines) | ||
77 | */ | ||
78 | atomic_t mnt_count; | ||
79 | int mnt_expiry_mark; /* true if marked for expiry */ | 86 | int mnt_expiry_mark; /* true if marked for expiry */ |
80 | int mnt_pinned; | 87 | int mnt_pinned; |
81 | int mnt_ghosts; | 88 | int mnt_ghosts; |
82 | #ifdef CONFIG_SMP | ||
83 | int __percpu *mnt_writers; | ||
84 | #else | ||
85 | int mnt_writers; | ||
86 | #endif | ||
87 | }; | 89 | }; |
88 | 90 | ||
89 | static inline int *get_mnt_writers_ptr(struct vfsmount *mnt) | ||
90 | { | ||
91 | #ifdef CONFIG_SMP | ||
92 | return mnt->mnt_writers; | ||
93 | #else | ||
94 | return &mnt->mnt_writers; | ||
95 | #endif | ||
96 | } | ||
97 | |||
98 | static inline struct vfsmount *mntget(struct vfsmount *mnt) | ||
99 | { | ||
100 | if (mnt) | ||
101 | atomic_inc(&mnt->mnt_count); | ||
102 | return mnt; | ||
103 | } | ||
104 | |||
105 | struct file; /* forward dec */ | 91 | struct file; /* forward dec */ |
106 | 92 | ||
107 | extern int mnt_want_write(struct vfsmount *mnt); | 93 | extern int mnt_want_write(struct vfsmount *mnt); |
108 | extern int mnt_want_write_file(struct file *file); | 94 | extern int mnt_want_write_file(struct file *file); |
109 | extern int mnt_clone_write(struct vfsmount *mnt); | 95 | extern int mnt_clone_write(struct vfsmount *mnt); |
110 | extern void mnt_drop_write(struct vfsmount *mnt); | 96 | extern void mnt_drop_write(struct vfsmount *mnt); |
111 | extern void mntput_no_expire(struct vfsmount *mnt); | 97 | extern void mntput(struct vfsmount *mnt); |
98 | extern struct vfsmount *mntget(struct vfsmount *mnt); | ||
99 | extern void mntput_long(struct vfsmount *mnt); | ||
100 | extern struct vfsmount *mntget_long(struct vfsmount *mnt); | ||
112 | extern void mnt_pin(struct vfsmount *mnt); | 101 | extern void mnt_pin(struct vfsmount *mnt); |
113 | extern void mnt_unpin(struct vfsmount *mnt); | 102 | extern void mnt_unpin(struct vfsmount *mnt); |
114 | extern int __mnt_is_readonly(struct vfsmount *mnt); | 103 | extern int __mnt_is_readonly(struct vfsmount *mnt); |
115 | 104 | ||
116 | static inline void mntput(struct vfsmount *mnt) | ||
117 | { | ||
118 | if (mnt) { | ||
119 | mnt->mnt_expiry_mark = 0; | ||
120 | mntput_no_expire(mnt); | ||
121 | } | ||
122 | } | ||
123 | |||
124 | extern struct vfsmount *do_kern_mount(const char *fstype, int flags, | 105 | extern struct vfsmount *do_kern_mount(const char *fstype, int flags, |
125 | const char *name, void *data); | 106 | const char *name, void *data); |
126 | 107 | ||
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index f363bc8fdc74..94b48bd40dd7 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h | |||
@@ -160,4 +160,8 @@ extern int mutex_trylock(struct mutex *lock); | |||
160 | extern void mutex_unlock(struct mutex *lock); | 160 | extern void mutex_unlock(struct mutex *lock); |
161 | extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); | 161 | extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); |
162 | 162 | ||
163 | #ifndef CONFIG_HAVE_ARCH_MUTEX_CPU_RELAX | ||
164 | #define arch_mutex_cpu_relax() cpu_relax() | ||
165 | #endif | ||
166 | |||
163 | #endif | 167 | #endif |
diff --git a/include/linux/namei.h b/include/linux/namei.h index 05b441d93642..18d06add0a40 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
@@ -19,7 +19,10 @@ struct nameidata { | |||
19 | struct path path; | 19 | struct path path; |
20 | struct qstr last; | 20 | struct qstr last; |
21 | struct path root; | 21 | struct path root; |
22 | struct file *file; | ||
23 | struct inode *inode; /* path.dentry.d_inode */ | ||
22 | unsigned int flags; | 24 | unsigned int flags; |
25 | unsigned seq; | ||
23 | int last_type; | 26 | int last_type; |
24 | unsigned depth; | 27 | unsigned depth; |
25 | char *saved_names[MAX_NESTED_LINKS + 1]; | 28 | char *saved_names[MAX_NESTED_LINKS + 1]; |
@@ -41,14 +44,15 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND}; | |||
41 | * - require a directory | 44 | * - require a directory |
42 | * - ending slashes ok even for nonexistent files | 45 | * - ending slashes ok even for nonexistent files |
43 | * - internal "there are more path components" flag | 46 | * - internal "there are more path components" flag |
44 | * - locked when lookup done with dcache_lock held | ||
45 | * - dentry cache is untrusted; force a real lookup | 47 | * - dentry cache is untrusted; force a real lookup |
46 | */ | 48 | */ |
47 | #define LOOKUP_FOLLOW 1 | 49 | #define LOOKUP_FOLLOW 0x0001 |
48 | #define LOOKUP_DIRECTORY 2 | 50 | #define LOOKUP_DIRECTORY 0x0002 |
49 | #define LOOKUP_CONTINUE 4 | 51 | #define LOOKUP_CONTINUE 0x0004 |
50 | #define LOOKUP_PARENT 16 | 52 | |
51 | #define LOOKUP_REVAL 64 | 53 | #define LOOKUP_PARENT 0x0010 |
54 | #define LOOKUP_REVAL 0x0020 | ||
55 | #define LOOKUP_RCU 0x0040 | ||
52 | /* | 56 | /* |
53 | * Intent data | 57 | * Intent data |
54 | */ | 58 | */ |
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h index ef663061d5ac..1c27f201c856 100644 --- a/include/linux/ncp_fs.h +++ b/include/linux/ncp_fs.h | |||
@@ -184,13 +184,13 @@ struct ncp_entry_info { | |||
184 | __u8 file_handle[6]; | 184 | __u8 file_handle[6]; |
185 | }; | 185 | }; |
186 | 186 | ||
187 | static inline struct ncp_server *NCP_SBP(struct super_block *sb) | 187 | static inline struct ncp_server *NCP_SBP(const struct super_block *sb) |
188 | { | 188 | { |
189 | return sb->s_fs_info; | 189 | return sb->s_fs_info; |
190 | } | 190 | } |
191 | 191 | ||
192 | #define NCP_SERVER(inode) NCP_SBP((inode)->i_sb) | 192 | #define NCP_SERVER(inode) NCP_SBP((inode)->i_sb) |
193 | static inline struct ncp_inode_info *NCP_FINFO(struct inode *inode) | 193 | static inline struct ncp_inode_info *NCP_FINFO(const struct inode *inode) |
194 | { | 194 | { |
195 | return container_of(inode, struct ncp_inode_info, vfs_inode); | 195 | return container_of(inode, struct ncp_inode_info, vfs_inode); |
196 | } | 196 | } |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index d8fd2c23a1b9..be4957cf6511 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -493,6 +493,8 @@ static inline void napi_synchronize(const struct napi_struct *n) | |||
493 | enum netdev_queue_state_t { | 493 | enum netdev_queue_state_t { |
494 | __QUEUE_STATE_XOFF, | 494 | __QUEUE_STATE_XOFF, |
495 | __QUEUE_STATE_FROZEN, | 495 | __QUEUE_STATE_FROZEN, |
496 | #define QUEUE_STATE_XOFF_OR_FROZEN ((1 << __QUEUE_STATE_XOFF) | \ | ||
497 | (1 << __QUEUE_STATE_FROZEN)) | ||
496 | }; | 498 | }; |
497 | 499 | ||
498 | struct netdev_queue { | 500 | struct netdev_queue { |
@@ -503,6 +505,12 @@ struct netdev_queue { | |||
503 | struct Qdisc *qdisc; | 505 | struct Qdisc *qdisc; |
504 | unsigned long state; | 506 | unsigned long state; |
505 | struct Qdisc *qdisc_sleeping; | 507 | struct Qdisc *qdisc_sleeping; |
508 | #ifdef CONFIG_RPS | ||
509 | struct kobject kobj; | ||
510 | #endif | ||
511 | #if defined(CONFIG_XPS) && defined(CONFIG_NUMA) | ||
512 | int numa_node; | ||
513 | #endif | ||
506 | /* | 514 | /* |
507 | * write mostly part | 515 | * write mostly part |
508 | */ | 516 | */ |
@@ -517,6 +525,22 @@ struct netdev_queue { | |||
517 | u64 tx_dropped; | 525 | u64 tx_dropped; |
518 | } ____cacheline_aligned_in_smp; | 526 | } ____cacheline_aligned_in_smp; |
519 | 527 | ||
528 | static inline int netdev_queue_numa_node_read(const struct netdev_queue *q) | ||
529 | { | ||
530 | #if defined(CONFIG_XPS) && defined(CONFIG_NUMA) | ||
531 | return q->numa_node; | ||
532 | #else | ||
533 | return NUMA_NO_NODE; | ||
534 | #endif | ||
535 | } | ||
536 | |||
537 | static inline void netdev_queue_numa_node_write(struct netdev_queue *q, int node) | ||
538 | { | ||
539 | #if defined(CONFIG_XPS) && defined(CONFIG_NUMA) | ||
540 | q->numa_node = node; | ||
541 | #endif | ||
542 | } | ||
543 | |||
520 | #ifdef CONFIG_RPS | 544 | #ifdef CONFIG_RPS |
521 | /* | 545 | /* |
522 | * This structure holds an RPS map which can be of variable length. The | 546 | * This structure holds an RPS map which can be of variable length. The |
@@ -592,11 +616,36 @@ struct netdev_rx_queue { | |||
592 | struct rps_map __rcu *rps_map; | 616 | struct rps_map __rcu *rps_map; |
593 | struct rps_dev_flow_table __rcu *rps_flow_table; | 617 | struct rps_dev_flow_table __rcu *rps_flow_table; |
594 | struct kobject kobj; | 618 | struct kobject kobj; |
595 | struct netdev_rx_queue *first; | 619 | struct net_device *dev; |
596 | atomic_t count; | ||
597 | } ____cacheline_aligned_in_smp; | 620 | } ____cacheline_aligned_in_smp; |
598 | #endif /* CONFIG_RPS */ | 621 | #endif /* CONFIG_RPS */ |
599 | 622 | ||
623 | #ifdef CONFIG_XPS | ||
624 | /* | ||
625 | * This structure holds an XPS map which can be of variable length. The | ||
626 | * map is an array of queues. | ||
627 | */ | ||
628 | struct xps_map { | ||
629 | unsigned int len; | ||
630 | unsigned int alloc_len; | ||
631 | struct rcu_head rcu; | ||
632 | u16 queues[0]; | ||
633 | }; | ||
634 | #define XPS_MAP_SIZE(_num) (sizeof(struct xps_map) + (_num * sizeof(u16))) | ||
635 | #define XPS_MIN_MAP_ALLOC ((L1_CACHE_BYTES - sizeof(struct xps_map)) \ | ||
636 | / sizeof(u16)) | ||
637 | |||
638 | /* | ||
639 | * This structure holds all XPS maps for device. Maps are indexed by CPU. | ||
640 | */ | ||
641 | struct xps_dev_maps { | ||
642 | struct rcu_head rcu; | ||
643 | struct xps_map __rcu *cpu_map[0]; | ||
644 | }; | ||
645 | #define XPS_DEV_MAPS_SIZE (sizeof(struct xps_dev_maps) + \ | ||
646 | (nr_cpu_ids * sizeof(struct xps_map *))) | ||
647 | #endif /* CONFIG_XPS */ | ||
648 | |||
600 | /* | 649 | /* |
601 | * This structure defines the management hooks for network devices. | 650 | * This structure defines the management hooks for network devices. |
602 | * The following hooks can be defined; unless noted otherwise, they are | 651 | * The following hooks can be defined; unless noted otherwise, they are |
@@ -683,7 +732,7 @@ struct netdev_rx_queue { | |||
683 | * neither operation. | 732 | * neither operation. |
684 | * | 733 | * |
685 | * void (*ndo_vlan_rx_register)(struct net_device *dev, struct vlan_group *grp); | 734 | * void (*ndo_vlan_rx_register)(struct net_device *dev, struct vlan_group *grp); |
686 | * If device support VLAN receive accleration | 735 | * If device support VLAN receive acceleration |
687 | * (ie. dev->features & NETIF_F_HW_VLAN_RX), then this function is called | 736 | * (ie. dev->features & NETIF_F_HW_VLAN_RX), then this function is called |
688 | * when vlan groups for the device changes. Note: grp is NULL | 737 | * when vlan groups for the device changes. Note: grp is NULL |
689 | * if no vlan's groups are being used. | 738 | * if no vlan's groups are being used. |
@@ -951,7 +1000,7 @@ struct net_device { | |||
951 | #endif | 1000 | #endif |
952 | void *atalk_ptr; /* AppleTalk link */ | 1001 | void *atalk_ptr; /* AppleTalk link */ |
953 | struct in_device __rcu *ip_ptr; /* IPv4 specific data */ | 1002 | struct in_device __rcu *ip_ptr; /* IPv4 specific data */ |
954 | void *dn_ptr; /* DECnet specific data */ | 1003 | struct dn_dev __rcu *dn_ptr; /* DECnet specific data */ |
955 | struct inet6_dev __rcu *ip6_ptr; /* IPv6 specific data */ | 1004 | struct inet6_dev __rcu *ip6_ptr; /* IPv6 specific data */ |
956 | void *ec_ptr; /* Econet specific data */ | 1005 | void *ec_ptr; /* Econet specific data */ |
957 | void *ax25_ptr; /* AX.25 specific data */ | 1006 | void *ax25_ptr; /* AX.25 specific data */ |
@@ -995,8 +1044,8 @@ struct net_device { | |||
995 | unsigned int real_num_rx_queues; | 1044 | unsigned int real_num_rx_queues; |
996 | #endif | 1045 | #endif |
997 | 1046 | ||
998 | rx_handler_func_t *rx_handler; | 1047 | rx_handler_func_t __rcu *rx_handler; |
999 | void *rx_handler_data; | 1048 | void __rcu *rx_handler_data; |
1000 | 1049 | ||
1001 | struct netdev_queue __rcu *ingress_queue; | 1050 | struct netdev_queue __rcu *ingress_queue; |
1002 | 1051 | ||
@@ -1017,6 +1066,10 @@ struct net_device { | |||
1017 | unsigned long tx_queue_len; /* Max frames per queue allowed */ | 1066 | unsigned long tx_queue_len; /* Max frames per queue allowed */ |
1018 | spinlock_t tx_global_lock; | 1067 | spinlock_t tx_global_lock; |
1019 | 1068 | ||
1069 | #ifdef CONFIG_XPS | ||
1070 | struct xps_dev_maps __rcu *xps_maps; | ||
1071 | #endif | ||
1072 | |||
1020 | /* These may be needed for future network-power-down code. */ | 1073 | /* These may be needed for future network-power-down code. */ |
1021 | 1074 | ||
1022 | /* | 1075 | /* |
@@ -1307,7 +1360,8 @@ static inline struct net_device *first_net_device(struct net *net) | |||
1307 | 1360 | ||
1308 | extern int netdev_boot_setup_check(struct net_device *dev); | 1361 | extern int netdev_boot_setup_check(struct net_device *dev); |
1309 | extern unsigned long netdev_boot_base(const char *prefix, int unit); | 1362 | extern unsigned long netdev_boot_base(const char *prefix, int unit); |
1310 | extern struct net_device *dev_getbyhwaddr(struct net *net, unsigned short type, char *hwaddr); | 1363 | extern struct net_device *dev_getbyhwaddr_rcu(struct net *net, unsigned short type, |
1364 | const char *hwaddr); | ||
1311 | extern struct net_device *dev_getfirstbyhwtype(struct net *net, unsigned short type); | 1365 | extern struct net_device *dev_getfirstbyhwtype(struct net *net, unsigned short type); |
1312 | extern struct net_device *__dev_getfirstbyhwtype(struct net *net, unsigned short type); | 1366 | extern struct net_device *__dev_getfirstbyhwtype(struct net *net, unsigned short type); |
1313 | extern void dev_add_pack(struct packet_type *pt); | 1367 | extern void dev_add_pack(struct packet_type *pt); |
@@ -1600,9 +1654,9 @@ static inline int netif_queue_stopped(const struct net_device *dev) | |||
1600 | return netif_tx_queue_stopped(netdev_get_tx_queue(dev, 0)); | 1654 | return netif_tx_queue_stopped(netdev_get_tx_queue(dev, 0)); |
1601 | } | 1655 | } |
1602 | 1656 | ||
1603 | static inline int netif_tx_queue_frozen(const struct netdev_queue *dev_queue) | 1657 | static inline int netif_tx_queue_frozen_or_stopped(const struct netdev_queue *dev_queue) |
1604 | { | 1658 | { |
1605 | return test_bit(__QUEUE_STATE_FROZEN, &dev_queue->state); | 1659 | return dev_queue->state & QUEUE_STATE_XOFF_OR_FROZEN; |
1606 | } | 1660 | } |
1607 | 1661 | ||
1608 | /** | 1662 | /** |
@@ -1693,6 +1747,16 @@ static inline void netif_wake_subqueue(struct net_device *dev, u16 queue_index) | |||
1693 | __netif_schedule(txq->qdisc); | 1747 | __netif_schedule(txq->qdisc); |
1694 | } | 1748 | } |
1695 | 1749 | ||
1750 | /* | ||
1751 | * Returns a Tx hash for the given packet when dev->real_num_tx_queues is used | ||
1752 | * as a distribution range limit for the returned value. | ||
1753 | */ | ||
1754 | static inline u16 skb_tx_hash(const struct net_device *dev, | ||
1755 | const struct sk_buff *skb) | ||
1756 | { | ||
1757 | return __skb_tx_hash(dev, skb, dev->real_num_tx_queues); | ||
1758 | } | ||
1759 | |||
1696 | /** | 1760 | /** |
1697 | * netif_is_multiqueue - test if device has multiple transmit queues | 1761 | * netif_is_multiqueue - test if device has multiple transmit queues |
1698 | * @dev: network device | 1762 | * @dev: network device |
@@ -2127,11 +2191,15 @@ static inline void netif_addr_unlock_bh(struct net_device *dev) | |||
2127 | extern void ether_setup(struct net_device *dev); | 2191 | extern void ether_setup(struct net_device *dev); |
2128 | 2192 | ||
2129 | /* Support for loadable net-drivers */ | 2193 | /* Support for loadable net-drivers */ |
2130 | extern struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, | 2194 | extern struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, |
2131 | void (*setup)(struct net_device *), | 2195 | void (*setup)(struct net_device *), |
2132 | unsigned int queue_count); | 2196 | unsigned int txqs, unsigned int rxqs); |
2133 | #define alloc_netdev(sizeof_priv, name, setup) \ | 2197 | #define alloc_netdev(sizeof_priv, name, setup) \ |
2134 | alloc_netdev_mq(sizeof_priv, name, setup, 1) | 2198 | alloc_netdev_mqs(sizeof_priv, name, setup, 1, 1) |
2199 | |||
2200 | #define alloc_netdev_mq(sizeof_priv, name, setup, count) \ | ||
2201 | alloc_netdev_mqs(sizeof_priv, name, setup, count, count) | ||
2202 | |||
2135 | extern int register_netdev(struct net_device *dev); | 2203 | extern int register_netdev(struct net_device *dev); |
2136 | extern void unregister_netdev(struct net_device *dev); | 2204 | extern void unregister_netdev(struct net_device *dev); |
2137 | 2205 | ||
@@ -2239,6 +2307,8 @@ unsigned long netdev_fix_features(unsigned long features, const char *name); | |||
2239 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, | 2307 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, |
2240 | struct net_device *dev); | 2308 | struct net_device *dev); |
2241 | 2309 | ||
2310 | int netif_skb_features(struct sk_buff *skb); | ||
2311 | |||
2242 | static inline int net_gso_ok(int features, int gso_type) | 2312 | static inline int net_gso_ok(int features, int gso_type) |
2243 | { | 2313 | { |
2244 | int feature = gso_type << NETIF_F_GSO_SHIFT; | 2314 | int feature = gso_type << NETIF_F_GSO_SHIFT; |
@@ -2251,19 +2321,10 @@ static inline int skb_gso_ok(struct sk_buff *skb, int features) | |||
2251 | (!skb_has_frag_list(skb) || (features & NETIF_F_FRAGLIST)); | 2321 | (!skb_has_frag_list(skb) || (features & NETIF_F_FRAGLIST)); |
2252 | } | 2322 | } |
2253 | 2323 | ||
2254 | static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) | 2324 | static inline int netif_needs_gso(struct sk_buff *skb, int features) |
2255 | { | 2325 | { |
2256 | if (skb_is_gso(skb)) { | 2326 | return skb_is_gso(skb) && (!skb_gso_ok(skb, features) || |
2257 | int features = dev->features; | 2327 | unlikely(skb->ip_summed != CHECKSUM_PARTIAL)); |
2258 | |||
2259 | if (skb->protocol == htons(ETH_P_8021Q) || skb->vlan_tci) | ||
2260 | features &= dev->vlan_features; | ||
2261 | |||
2262 | return (!skb_gso_ok(skb, features) || | ||
2263 | unlikely(skb->ip_summed != CHECKSUM_PARTIAL)); | ||
2264 | } | ||
2265 | |||
2266 | return 0; | ||
2267 | } | 2328 | } |
2268 | 2329 | ||
2269 | static inline void netif_set_gso_max_size(struct net_device *dev, | 2330 | static inline void netif_set_gso_max_size(struct net_device *dev, |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 03317c8d4077..1893837b3966 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -33,6 +33,8 @@ | |||
33 | 33 | ||
34 | #define NF_QUEUE_NR(x) ((((x) << NF_VERDICT_BITS) & NF_VERDICT_QMASK) | NF_QUEUE) | 34 | #define NF_QUEUE_NR(x) ((((x) << NF_VERDICT_BITS) & NF_VERDICT_QMASK) | NF_QUEUE) |
35 | 35 | ||
36 | #define NF_DROP_ERR(x) (((-x) << NF_VERDICT_BITS) | NF_DROP) | ||
37 | |||
36 | /* only for userspace compatibility */ | 38 | /* only for userspace compatibility */ |
37 | #ifndef __KERNEL__ | 39 | #ifndef __KERNEL__ |
38 | /* Generic cache responses from hook functions. | 40 | /* Generic cache responses from hook functions. |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 742bec051440..6712e713b299 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -472,7 +472,7 @@ extern void xt_free_table_info(struct xt_table_info *info); | |||
472 | * necessary for reading the counters. | 472 | * necessary for reading the counters. |
473 | */ | 473 | */ |
474 | struct xt_info_lock { | 474 | struct xt_info_lock { |
475 | spinlock_t lock; | 475 | seqlock_t lock; |
476 | unsigned char readers; | 476 | unsigned char readers; |
477 | }; | 477 | }; |
478 | DECLARE_PER_CPU(struct xt_info_lock, xt_info_locks); | 478 | DECLARE_PER_CPU(struct xt_info_lock, xt_info_locks); |
@@ -497,7 +497,7 @@ static inline void xt_info_rdlock_bh(void) | |||
497 | local_bh_disable(); | 497 | local_bh_disable(); |
498 | lock = &__get_cpu_var(xt_info_locks); | 498 | lock = &__get_cpu_var(xt_info_locks); |
499 | if (likely(!lock->readers++)) | 499 | if (likely(!lock->readers++)) |
500 | spin_lock(&lock->lock); | 500 | write_seqlock(&lock->lock); |
501 | } | 501 | } |
502 | 502 | ||
503 | static inline void xt_info_rdunlock_bh(void) | 503 | static inline void xt_info_rdunlock_bh(void) |
@@ -505,7 +505,7 @@ static inline void xt_info_rdunlock_bh(void) | |||
505 | struct xt_info_lock *lock = &__get_cpu_var(xt_info_locks); | 505 | struct xt_info_lock *lock = &__get_cpu_var(xt_info_locks); |
506 | 506 | ||
507 | if (likely(!--lock->readers)) | 507 | if (likely(!--lock->readers)) |
508 | spin_unlock(&lock->lock); | 508 | write_sequnlock(&lock->lock); |
509 | local_bh_enable(); | 509 | local_bh_enable(); |
510 | } | 510 | } |
511 | 511 | ||
@@ -516,12 +516,12 @@ static inline void xt_info_rdunlock_bh(void) | |||
516 | */ | 516 | */ |
517 | static inline void xt_info_wrlock(unsigned int cpu) | 517 | static inline void xt_info_wrlock(unsigned int cpu) |
518 | { | 518 | { |
519 | spin_lock(&per_cpu(xt_info_locks, cpu).lock); | 519 | write_seqlock(&per_cpu(xt_info_locks, cpu).lock); |
520 | } | 520 | } |
521 | 521 | ||
522 | static inline void xt_info_wrunlock(unsigned int cpu) | 522 | static inline void xt_info_wrunlock(unsigned int cpu) |
523 | { | 523 | { |
524 | spin_unlock(&per_cpu(xt_info_locks, cpu).lock); | 524 | write_sequnlock(&per_cpu(xt_info_locks, cpu).lock); |
525 | } | 525 | } |
526 | 526 | ||
527 | /* | 527 | /* |
diff --git a/include/linux/nfs3.h b/include/linux/nfs3.h index ac33806ec7f9..6ccfe3b641e1 100644 --- a/include/linux/nfs3.h +++ b/include/linux/nfs3.h | |||
@@ -11,6 +11,9 @@ | |||
11 | #define NFS3_MAXGROUPS 16 | 11 | #define NFS3_MAXGROUPS 16 |
12 | #define NFS3_FHSIZE 64 | 12 | #define NFS3_FHSIZE 64 |
13 | #define NFS3_COOKIESIZE 4 | 13 | #define NFS3_COOKIESIZE 4 |
14 | #define NFS3_CREATEVERFSIZE 8 | ||
15 | #define NFS3_COOKIEVERFSIZE 8 | ||
16 | #define NFS3_WRITEVERFSIZE 8 | ||
14 | #define NFS3_FIFO_DEV (-1) | 17 | #define NFS3_FIFO_DEV (-1) |
15 | #define NFS3MODE_FMT 0170000 | 18 | #define NFS3MODE_FMT 0170000 |
16 | #define NFS3MODE_DIR 0040000 | 19 | #define NFS3MODE_DIR 0040000 |
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 4925b22219d2..9b46300b4305 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
@@ -111,9 +111,13 @@ | |||
111 | 111 | ||
112 | #define EXCHGID4_FLAG_SUPP_MOVED_REFER 0x00000001 | 112 | #define EXCHGID4_FLAG_SUPP_MOVED_REFER 0x00000001 |
113 | #define EXCHGID4_FLAG_SUPP_MOVED_MIGR 0x00000002 | 113 | #define EXCHGID4_FLAG_SUPP_MOVED_MIGR 0x00000002 |
114 | #define EXCHGID4_FLAG_BIND_PRINC_STATEID 0x00000100 | ||
115 | |||
114 | #define EXCHGID4_FLAG_USE_NON_PNFS 0x00010000 | 116 | #define EXCHGID4_FLAG_USE_NON_PNFS 0x00010000 |
115 | #define EXCHGID4_FLAG_USE_PNFS_MDS 0x00020000 | 117 | #define EXCHGID4_FLAG_USE_PNFS_MDS 0x00020000 |
116 | #define EXCHGID4_FLAG_USE_PNFS_DS 0x00040000 | 118 | #define EXCHGID4_FLAG_USE_PNFS_DS 0x00040000 |
119 | #define EXCHGID4_FLAG_MASK_PNFS 0x00070000 | ||
120 | |||
117 | #define EXCHGID4_FLAG_UPD_CONFIRMED_REC_A 0x40000000 | 121 | #define EXCHGID4_FLAG_UPD_CONFIRMED_REC_A 0x40000000 |
118 | #define EXCHGID4_FLAG_CONFIRMED_R 0x80000000 | 122 | #define EXCHGID4_FLAG_CONFIRMED_R 0x80000000 |
119 | /* | 123 | /* |
@@ -121,8 +125,8 @@ | |||
121 | * they're set in the argument or response, have separate | 125 | * they're set in the argument or response, have separate |
122 | * invalid flag masks for arg (_A) and resp (_R). | 126 | * invalid flag masks for arg (_A) and resp (_R). |
123 | */ | 127 | */ |
124 | #define EXCHGID4_FLAG_MASK_A 0x40070003 | 128 | #define EXCHGID4_FLAG_MASK_A 0x40070103 |
125 | #define EXCHGID4_FLAG_MASK_R 0x80070003 | 129 | #define EXCHGID4_FLAG_MASK_R 0x80070103 |
126 | 130 | ||
127 | #define SEQ4_STATUS_CB_PATH_DOWN 0x00000001 | 131 | #define SEQ4_STATUS_CB_PATH_DOWN 0x00000001 |
128 | #define SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRING 0x00000002 | 132 | #define SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRING 0x00000002 |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 29d504d5d1c3..0779bb8f95be 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -351,7 +351,7 @@ extern int nfs_refresh_inode(struct inode *, struct nfs_fattr *); | |||
351 | extern int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr); | 351 | extern int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr); |
352 | extern int nfs_post_op_update_inode_force_wcc(struct inode *inode, struct nfs_fattr *fattr); | 352 | extern int nfs_post_op_update_inode_force_wcc(struct inode *inode, struct nfs_fattr *fattr); |
353 | extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); | 353 | extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); |
354 | extern int nfs_permission(struct inode *, int); | 354 | extern int nfs_permission(struct inode *, int, unsigned int); |
355 | extern int nfs_open(struct inode *, struct file *); | 355 | extern int nfs_open(struct inode *, struct file *); |
356 | extern int nfs_release(struct inode *, struct file *); | 356 | extern int nfs_release(struct inode *, struct file *); |
357 | extern int nfs_attribute_timeout(struct inode *inode); | 357 | extern int nfs_attribute_timeout(struct inode *inode); |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 452d96436d26..b197563913bf 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -47,11 +47,6 @@ struct nfs_client { | |||
47 | u64 cl_clientid; /* constant */ | 47 | u64 cl_clientid; /* constant */ |
48 | unsigned long cl_state; | 48 | unsigned long cl_state; |
49 | 49 | ||
50 | struct rb_root cl_openowner_id; | ||
51 | struct rb_root cl_lockowner_id; | ||
52 | |||
53 | struct list_head cl_delegations; | ||
54 | struct rb_root cl_state_owners; | ||
55 | spinlock_t cl_lock; | 50 | spinlock_t cl_lock; |
56 | 51 | ||
57 | unsigned long cl_lease_time; | 52 | unsigned long cl_lease_time; |
@@ -71,6 +66,7 @@ struct nfs_client { | |||
71 | */ | 66 | */ |
72 | char cl_ipaddr[48]; | 67 | char cl_ipaddr[48]; |
73 | unsigned char cl_id_uniquifier; | 68 | unsigned char cl_id_uniquifier; |
69 | u32 cl_cb_ident; /* v4.0 callback identifier */ | ||
74 | const struct nfs4_minor_version_ops *cl_mvops; | 70 | const struct nfs4_minor_version_ops *cl_mvops; |
75 | #endif /* CONFIG_NFS_V4 */ | 71 | #endif /* CONFIG_NFS_V4 */ |
76 | 72 | ||
@@ -148,7 +144,14 @@ struct nfs_server { | |||
148 | that are supported on this | 144 | that are supported on this |
149 | filesystem */ | 145 | filesystem */ |
150 | struct pnfs_layoutdriver_type *pnfs_curr_ld; /* Active layout driver */ | 146 | struct pnfs_layoutdriver_type *pnfs_curr_ld; /* Active layout driver */ |
147 | struct rpc_wait_queue roc_rpcwaitq; | ||
148 | |||
149 | /* the following fields are protected by nfs_client->cl_lock */ | ||
150 | struct rb_root state_owners; | ||
151 | struct rb_root openowner_id; | ||
152 | struct rb_root lockowner_id; | ||
151 | #endif | 153 | #endif |
154 | struct list_head delegations; | ||
152 | void (*destroy)(struct nfs_server *); | 155 | void (*destroy)(struct nfs_server *); |
153 | 156 | ||
154 | atomic_t active; /* Keep trace of any activity to this server */ | 157 | atomic_t active; /* Keep trace of any activity to this server */ |
@@ -196,6 +199,7 @@ struct nfs4_slot_table { | |||
196 | * op for dynamic resizing */ | 199 | * op for dynamic resizing */ |
197 | int target_max_slots; /* Set by CB_RECALL_SLOT as | 200 | int target_max_slots; /* Set by CB_RECALL_SLOT as |
198 | * the new max_slots */ | 201 | * the new max_slots */ |
202 | struct completion complete; | ||
199 | }; | 203 | }; |
200 | 204 | ||
201 | static inline int slot_idx(struct nfs4_slot_table *tbl, struct nfs4_slot *sp) | 205 | static inline int slot_idx(struct nfs4_slot_table *tbl, struct nfs4_slot *sp) |
@@ -212,7 +216,6 @@ struct nfs4_session { | |||
212 | unsigned long session_state; | 216 | unsigned long session_state; |
213 | u32 hash_alg; | 217 | u32 hash_alg; |
214 | u32 ssv_len; | 218 | u32 ssv_len; |
215 | struct completion complete; | ||
216 | 219 | ||
217 | /* The fore and back channel */ | 220 | /* The fore and back channel */ |
218 | struct nfs4_channel_attrs fc_attrs; | 221 | struct nfs4_channel_attrs fc_attrs; |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 80f07198a31a..b0068579bec2 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -208,6 +208,7 @@ struct nfs4_layoutget_args { | |||
208 | struct inode *inode; | 208 | struct inode *inode; |
209 | struct nfs_open_context *ctx; | 209 | struct nfs_open_context *ctx; |
210 | struct nfs4_sequence_args seq_args; | 210 | struct nfs4_sequence_args seq_args; |
211 | nfs4_stateid stateid; | ||
211 | }; | 212 | }; |
212 | 213 | ||
213 | struct nfs4_layoutget_res { | 214 | struct nfs4_layoutget_res { |
@@ -223,7 +224,6 @@ struct nfs4_layoutget { | |||
223 | struct nfs4_layoutget_args args; | 224 | struct nfs4_layoutget_args args; |
224 | struct nfs4_layoutget_res res; | 225 | struct nfs4_layoutget_res res; |
225 | struct pnfs_layout_segment **lsegpp; | 226 | struct pnfs_layout_segment **lsegpp; |
226 | int status; | ||
227 | }; | 227 | }; |
228 | 228 | ||
229 | struct nfs4_getdeviceinfo_args { | 229 | struct nfs4_getdeviceinfo_args { |
@@ -317,6 +317,7 @@ struct nfs_closeres { | |||
317 | struct nfs_lowner { | 317 | struct nfs_lowner { |
318 | __u64 clientid; | 318 | __u64 clientid; |
319 | __u64 id; | 319 | __u64 id; |
320 | dev_t s_dev; | ||
320 | }; | 321 | }; |
321 | 322 | ||
322 | struct nfs_lock_args { | 323 | struct nfs_lock_args { |
@@ -484,6 +485,7 @@ struct nfs_entry { | |||
484 | struct nfs_fh * fh; | 485 | struct nfs_fh * fh; |
485 | struct nfs_fattr * fattr; | 486 | struct nfs_fattr * fattr; |
486 | unsigned char d_type; | 487 | unsigned char d_type; |
488 | struct nfs_server * server; | ||
487 | }; | 489 | }; |
488 | 490 | ||
489 | /* | 491 | /* |
@@ -1089,7 +1091,7 @@ struct nfs_rpc_ops { | |||
1089 | int (*pathconf) (struct nfs_server *, struct nfs_fh *, | 1091 | int (*pathconf) (struct nfs_server *, struct nfs_fh *, |
1090 | struct nfs_pathconf *); | 1092 | struct nfs_pathconf *); |
1091 | int (*set_capabilities)(struct nfs_server *, struct nfs_fh *); | 1093 | int (*set_capabilities)(struct nfs_server *, struct nfs_fh *); |
1092 | __be32 *(*decode_dirent)(struct xdr_stream *, struct nfs_entry *, struct nfs_server *, int plus); | 1094 | int (*decode_dirent)(struct xdr_stream *, struct nfs_entry *, int); |
1093 | void (*read_setup) (struct nfs_read_data *, struct rpc_message *); | 1095 | void (*read_setup) (struct nfs_read_data *, struct rpc_message *); |
1094 | int (*read_done) (struct rpc_task *, struct nfs_read_data *); | 1096 | int (*read_done) (struct rpc_task *, struct nfs_read_data *); |
1095 | void (*write_setup) (struct nfs_write_data *, struct rpc_message *); | 1097 | void (*write_setup) (struct nfs_write_data *, struct rpc_message *); |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 0edb2566c14c..2b89b712565b 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -172,10 +172,10 @@ | |||
172 | * to the specified ISO/IEC 3166-1 alpha2 country code. The core will | 172 | * to the specified ISO/IEC 3166-1 alpha2 country code. The core will |
173 | * store this as a valid request and then query userspace for it. | 173 | * store this as a valid request and then query userspace for it. |
174 | * | 174 | * |
175 | * @NL80211_CMD_GET_MESH_PARAMS: Get mesh networking properties for the | 175 | * @NL80211_CMD_GET_MESH_CONFIG: Get mesh networking properties for the |
176 | * interface identified by %NL80211_ATTR_IFINDEX | 176 | * interface identified by %NL80211_ATTR_IFINDEX |
177 | * | 177 | * |
178 | * @NL80211_CMD_SET_MESH_PARAMS: Set mesh networking properties for the | 178 | * @NL80211_CMD_SET_MESH_CONFIG: Set mesh networking properties for the |
179 | * interface identified by %NL80211_ATTR_IFINDEX | 179 | * interface identified by %NL80211_ATTR_IFINDEX |
180 | * | 180 | * |
181 | * @NL80211_CMD_SET_MGMT_EXTRA_IE: Set extra IEs for management frames. The | 181 | * @NL80211_CMD_SET_MGMT_EXTRA_IE: Set extra IEs for management frames. The |
@@ -358,11 +358,16 @@ | |||
358 | * user space application). %NL80211_ATTR_FRAME is used to specify the | 358 | * user space application). %NL80211_ATTR_FRAME is used to specify the |
359 | * frame contents (including header). %NL80211_ATTR_WIPHY_FREQ (and | 359 | * frame contents (including header). %NL80211_ATTR_WIPHY_FREQ (and |
360 | * optionally %NL80211_ATTR_WIPHY_CHANNEL_TYPE) is used to indicate on | 360 | * optionally %NL80211_ATTR_WIPHY_CHANNEL_TYPE) is used to indicate on |
361 | * which channel the frame is to be transmitted or was received. This | 361 | * which channel the frame is to be transmitted or was received. If this |
362 | * channel has to be the current channel (remain-on-channel or the | 362 | * channel is not the current channel (remain-on-channel or the |
363 | * operational channel). When called, this operation returns a cookie | 363 | * operational channel) the device will switch to the given channel and |
364 | * (%NL80211_ATTR_COOKIE) that will be included with the TX status event | 364 | * transmit the frame, optionally waiting for a response for the time |
365 | * pertaining to the TX request. | 365 | * specified using %NL80211_ATTR_DURATION. When called, this operation |
366 | * returns a cookie (%NL80211_ATTR_COOKIE) that will be included with the | ||
367 | * TX status event pertaining to the TX request. | ||
368 | * @NL80211_CMD_FRAME_WAIT_CANCEL: When an off-channel TX was requested, this | ||
369 | * command may be used with the corresponding cookie to cancel the wait | ||
370 | * time if it is known that it is no longer necessary. | ||
366 | * @NL80211_CMD_ACTION: Alias for @NL80211_CMD_FRAME for backward compatibility. | 371 | * @NL80211_CMD_ACTION: Alias for @NL80211_CMD_FRAME for backward compatibility. |
367 | * @NL80211_CMD_FRAME_TX_STATUS: Report TX status of a management frame | 372 | * @NL80211_CMD_FRAME_TX_STATUS: Report TX status of a management frame |
368 | * transmitted with %NL80211_CMD_FRAME. %NL80211_ATTR_COOKIE identifies | 373 | * transmitted with %NL80211_CMD_FRAME. %NL80211_ATTR_COOKIE identifies |
@@ -389,6 +394,18 @@ | |||
389 | * | 394 | * |
390 | * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface. | 395 | * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface. |
391 | * | 396 | * |
397 | * @NL80211_CMD_JOIN_MESH: Join a mesh. The mesh ID must be given, and initial | ||
398 | * mesh config parameters may be given. | ||
399 | * @NL80211_CMD_LEAVE_MESH: Leave the mesh network -- no special arguments, the | ||
400 | * network is determined by the network interface. | ||
401 | * | ||
402 | * @NL80211_CMD_UNPROT_DEAUTHENTICATE: Unprotected deauthentication frame | ||
403 | * notification. This event is used to indicate that an unprotected | ||
404 | * deauthentication frame was dropped when MFP is in use. | ||
405 | * @NL80211_CMD_UNPROT_DISASSOCIATE: Unprotected disassociation frame | ||
406 | * notification. This event is used to indicate that an unprotected | ||
407 | * disassociation frame was dropped when MFP is in use. | ||
408 | * | ||
392 | * @NL80211_CMD_MAX: highest used command number | 409 | * @NL80211_CMD_MAX: highest used command number |
393 | * @__NL80211_CMD_AFTER_LAST: internal use | 410 | * @__NL80211_CMD_AFTER_LAST: internal use |
394 | */ | 411 | */ |
@@ -431,8 +448,8 @@ enum nl80211_commands { | |||
431 | NL80211_CMD_SET_REG, | 448 | NL80211_CMD_SET_REG, |
432 | NL80211_CMD_REQ_SET_REG, | 449 | NL80211_CMD_REQ_SET_REG, |
433 | 450 | ||
434 | NL80211_CMD_GET_MESH_PARAMS, | 451 | NL80211_CMD_GET_MESH_CONFIG, |
435 | NL80211_CMD_SET_MESH_PARAMS, | 452 | NL80211_CMD_SET_MESH_CONFIG, |
436 | 453 | ||
437 | NL80211_CMD_SET_MGMT_EXTRA_IE /* reserved; not used */, | 454 | NL80211_CMD_SET_MGMT_EXTRA_IE /* reserved; not used */, |
438 | 455 | ||
@@ -493,6 +510,14 @@ enum nl80211_commands { | |||
493 | NL80211_CMD_SET_CHANNEL, | 510 | NL80211_CMD_SET_CHANNEL, |
494 | NL80211_CMD_SET_WDS_PEER, | 511 | NL80211_CMD_SET_WDS_PEER, |
495 | 512 | ||
513 | NL80211_CMD_FRAME_WAIT_CANCEL, | ||
514 | |||
515 | NL80211_CMD_JOIN_MESH, | ||
516 | NL80211_CMD_LEAVE_MESH, | ||
517 | |||
518 | NL80211_CMD_UNPROT_DEAUTHENTICATE, | ||
519 | NL80211_CMD_UNPROT_DISASSOCIATE, | ||
520 | |||
496 | /* add new commands above here */ | 521 | /* add new commands above here */ |
497 | 522 | ||
498 | /* used to define NL80211_CMD_MAX below */ | 523 | /* used to define NL80211_CMD_MAX below */ |
@@ -513,6 +538,10 @@ enum nl80211_commands { | |||
513 | #define NL80211_CMD_DISASSOCIATE NL80211_CMD_DISASSOCIATE | 538 | #define NL80211_CMD_DISASSOCIATE NL80211_CMD_DISASSOCIATE |
514 | #define NL80211_CMD_REG_BEACON_HINT NL80211_CMD_REG_BEACON_HINT | 539 | #define NL80211_CMD_REG_BEACON_HINT NL80211_CMD_REG_BEACON_HINT |
515 | 540 | ||
541 | /* source-level API compatibility */ | ||
542 | #define NL80211_CMD_GET_MESH_PARAMS NL80211_CMD_GET_MESH_CONFIG | ||
543 | #define NL80211_CMD_SET_MESH_PARAMS NL80211_CMD_SET_MESH_CONFIG | ||
544 | |||
516 | /** | 545 | /** |
517 | * enum nl80211_attrs - nl80211 netlink attributes | 546 | * enum nl80211_attrs - nl80211 netlink attributes |
518 | * | 547 | * |
@@ -758,6 +787,9 @@ enum nl80211_commands { | |||
758 | * cache, a wiphy attribute. | 787 | * cache, a wiphy attribute. |
759 | * | 788 | * |
760 | * @NL80211_ATTR_DURATION: Duration of an operation in milliseconds, u32. | 789 | * @NL80211_ATTR_DURATION: Duration of an operation in milliseconds, u32. |
790 | * @NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION: Device attribute that | ||
791 | * specifies the maximum duration that can be requested with the | ||
792 | * remain-on-channel operation, in milliseconds, u32. | ||
761 | * | 793 | * |
762 | * @NL80211_ATTR_COOKIE: Generic 64-bit cookie to identify objects. | 794 | * @NL80211_ATTR_COOKIE: Generic 64-bit cookie to identify objects. |
763 | * | 795 | * |
@@ -804,6 +836,51 @@ enum nl80211_commands { | |||
804 | * @NL80211_ATTR_SUPPORT_IBSS_RSN: The device supports IBSS RSN, which mostly | 836 | * @NL80211_ATTR_SUPPORT_IBSS_RSN: The device supports IBSS RSN, which mostly |
805 | * means support for per-station GTKs. | 837 | * means support for per-station GTKs. |
806 | * | 838 | * |
839 | * @NL80211_ATTR_WIPHY_ANTENNA_TX: Bitmap of allowed antennas for transmitting. | ||
840 | * This can be used to mask out antennas which are not attached or should | ||
841 | * not be used for transmitting. If an antenna is not selected in this | ||
842 | * bitmap the hardware is not allowed to transmit on this antenna. | ||
843 | * | ||
844 | * Each bit represents one antenna, starting with antenna 1 at the first | ||
845 | * bit. Depending on which antennas are selected in the bitmap, 802.11n | ||
846 | * drivers can derive which chainmasks to use (if all antennas belonging to | ||
847 | * a particular chain are disabled this chain should be disabled) and if | ||
848 | * a chain has diversity antennas wether diversity should be used or not. | ||
849 | * HT capabilities (STBC, TX Beamforming, Antenna selection) can be | ||
850 | * derived from the available chains after applying the antenna mask. | ||
851 | * Non-802.11n drivers can derive wether to use diversity or not. | ||
852 | * Drivers may reject configurations or RX/TX mask combinations they cannot | ||
853 | * support by returning -EINVAL. | ||
854 | * | ||
855 | * @NL80211_ATTR_WIPHY_ANTENNA_RX: Bitmap of allowed antennas for receiving. | ||
856 | * This can be used to mask out antennas which are not attached or should | ||
857 | * not be used for receiving. If an antenna is not selected in this bitmap | ||
858 | * the hardware should not be configured to receive on this antenna. | ||
859 | * For a more detailed descripton see @NL80211_ATTR_WIPHY_ANTENNA_TX. | ||
860 | * | ||
861 | * @NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX: Bitmap of antennas which are available | ||
862 | * for configuration as TX antennas via the above parameters. | ||
863 | * | ||
864 | * @NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX: Bitmap of antennas which are available | ||
865 | * for configuration as RX antennas via the above parameters. | ||
866 | * | ||
867 | * @NL80211_ATTR_MCAST_RATE: Multicast tx rate (in 100 kbps) for IBSS | ||
868 | * | ||
869 | * @NL80211_ATTR_OFFCHANNEL_TX_OK: For management frame TX, the frame may be | ||
870 | * transmitted on another channel when the channel given doesn't match | ||
871 | * the current channel. If the current channel doesn't match and this | ||
872 | * flag isn't set, the frame will be rejected. This is also used as an | ||
873 | * nl80211 capability flag. | ||
874 | * | ||
875 | * @NL80211_ATTR_BSS_HTOPMODE: HT operation mode (u16) | ||
876 | * | ||
877 | * @NL80211_ATTR_KEY_DEFAULT_TYPES: A nested attribute containing flags | ||
878 | * attributes, specifying what a key should be set as default as. | ||
879 | * See &enum nl80211_key_default_types. | ||
880 | * | ||
881 | * @NL80211_ATTR_MESH_SETUP: Optional mesh setup parameters. These cannot be | ||
882 | * changed once the mesh is active. | ||
883 | * | ||
807 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 884 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
808 | * @__NL80211_ATTR_AFTER_LAST: internal use | 885 | * @__NL80211_ATTR_AFTER_LAST: internal use |
809 | */ | 886 | */ |
@@ -858,7 +935,7 @@ enum nl80211_attrs { | |||
858 | NL80211_ATTR_REG_ALPHA2, | 935 | NL80211_ATTR_REG_ALPHA2, |
859 | NL80211_ATTR_REG_RULES, | 936 | NL80211_ATTR_REG_RULES, |
860 | 937 | ||
861 | NL80211_ATTR_MESH_PARAMS, | 938 | NL80211_ATTR_MESH_CONFIG, |
862 | 939 | ||
863 | NL80211_ATTR_BSS_BASIC_RATES, | 940 | NL80211_ATTR_BSS_BASIC_RATES, |
864 | 941 | ||
@@ -973,6 +1050,24 @@ enum nl80211_attrs { | |||
973 | 1050 | ||
974 | NL80211_ATTR_SUPPORT_IBSS_RSN, | 1051 | NL80211_ATTR_SUPPORT_IBSS_RSN, |
975 | 1052 | ||
1053 | NL80211_ATTR_WIPHY_ANTENNA_TX, | ||
1054 | NL80211_ATTR_WIPHY_ANTENNA_RX, | ||
1055 | |||
1056 | NL80211_ATTR_MCAST_RATE, | ||
1057 | |||
1058 | NL80211_ATTR_OFFCHANNEL_TX_OK, | ||
1059 | |||
1060 | NL80211_ATTR_BSS_HT_OPMODE, | ||
1061 | |||
1062 | NL80211_ATTR_KEY_DEFAULT_TYPES, | ||
1063 | |||
1064 | NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION, | ||
1065 | |||
1066 | NL80211_ATTR_MESH_SETUP, | ||
1067 | |||
1068 | NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX, | ||
1069 | NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX, | ||
1070 | |||
976 | /* add attributes here, update the policy in nl80211.c */ | 1071 | /* add attributes here, update the policy in nl80211.c */ |
977 | 1072 | ||
978 | __NL80211_ATTR_AFTER_LAST, | 1073 | __NL80211_ATTR_AFTER_LAST, |
@@ -981,6 +1076,7 @@ enum nl80211_attrs { | |||
981 | 1076 | ||
982 | /* source-level API compatibility */ | 1077 | /* source-level API compatibility */ |
983 | #define NL80211_ATTR_SCAN_GENERATION NL80211_ATTR_GENERATION | 1078 | #define NL80211_ATTR_SCAN_GENERATION NL80211_ATTR_GENERATION |
1079 | #define NL80211_ATTR_MESH_PARAMS NL80211_ATTR_MESH_CONFIG | ||
984 | 1080 | ||
985 | /* | 1081 | /* |
986 | * Allow user space programs to use #ifdef on new attributes by defining them | 1082 | * Allow user space programs to use #ifdef on new attributes by defining them |
@@ -1139,6 +1235,7 @@ enum nl80211_rate_info { | |||
1139 | * station) | 1235 | * station) |
1140 | * @NL80211_STA_INFO_TX_RETRIES: total retries (u32, to this station) | 1236 | * @NL80211_STA_INFO_TX_RETRIES: total retries (u32, to this station) |
1141 | * @NL80211_STA_INFO_TX_FAILED: total failed packets (u32, to this station) | 1237 | * @NL80211_STA_INFO_TX_FAILED: total failed packets (u32, to this station) |
1238 | * @NL80211_STA_INFO_SIGNAL_AVG: signal strength average (u8, dBm) | ||
1142 | */ | 1239 | */ |
1143 | enum nl80211_sta_info { | 1240 | enum nl80211_sta_info { |
1144 | __NL80211_STA_INFO_INVALID, | 1241 | __NL80211_STA_INFO_INVALID, |
@@ -1154,6 +1251,7 @@ enum nl80211_sta_info { | |||
1154 | NL80211_STA_INFO_TX_PACKETS, | 1251 | NL80211_STA_INFO_TX_PACKETS, |
1155 | NL80211_STA_INFO_TX_RETRIES, | 1252 | NL80211_STA_INFO_TX_RETRIES, |
1156 | NL80211_STA_INFO_TX_FAILED, | 1253 | NL80211_STA_INFO_TX_FAILED, |
1254 | NL80211_STA_INFO_SIGNAL_AVG, | ||
1157 | 1255 | ||
1158 | /* keep last */ | 1256 | /* keep last */ |
1159 | __NL80211_STA_INFO_AFTER_LAST, | 1257 | __NL80211_STA_INFO_AFTER_LAST, |
@@ -1307,7 +1405,11 @@ enum nl80211_bitrate_attr { | |||
1307 | * wireless core it thinks its knows the regulatory domain we should be in. | 1405 | * wireless core it thinks its knows the regulatory domain we should be in. |
1308 | * @NL80211_REGDOM_SET_BY_COUNTRY_IE: the wireless core has received an | 1406 | * @NL80211_REGDOM_SET_BY_COUNTRY_IE: the wireless core has received an |
1309 | * 802.11 country information element with regulatory information it | 1407 | * 802.11 country information element with regulatory information it |
1310 | * thinks we should consider. | 1408 | * thinks we should consider. cfg80211 only processes the country |
1409 | * code from the IE, and relies on the regulatory domain information | ||
1410 | * structure pased by userspace (CRDA) from our wireless-regdb. | ||
1411 | * If a channel is enabled but the country code indicates it should | ||
1412 | * be disabled we disable the channel and re-enable it upon disassociation. | ||
1311 | */ | 1413 | */ |
1312 | enum nl80211_reg_initiator { | 1414 | enum nl80211_reg_initiator { |
1313 | NL80211_REGDOM_SET_BY_CORE, | 1415 | NL80211_REGDOM_SET_BY_CORE, |
@@ -1476,7 +1578,8 @@ enum nl80211_mntr_flags { | |||
1476 | /** | 1578 | /** |
1477 | * enum nl80211_meshconf_params - mesh configuration parameters | 1579 | * enum nl80211_meshconf_params - mesh configuration parameters |
1478 | * | 1580 | * |
1479 | * Mesh configuration parameters | 1581 | * Mesh configuration parameters. These can be changed while the mesh is |
1582 | * active. | ||
1480 | * | 1583 | * |
1481 | * @__NL80211_MESHCONF_INVALID: internal use | 1584 | * @__NL80211_MESHCONF_INVALID: internal use |
1482 | * | 1585 | * |
@@ -1525,6 +1628,9 @@ enum nl80211_mntr_flags { | |||
1525 | * | 1628 | * |
1526 | * @NL80211_MESHCONF_ROOTMODE: whether root mode is enabled or not | 1629 | * @NL80211_MESHCONF_ROOTMODE: whether root mode is enabled or not |
1527 | * | 1630 | * |
1631 | * @NL80211_MESHCONF_ELEMENT_TTL: specifies the value of TTL field set at a | ||
1632 | * source mesh point for path selection elements. | ||
1633 | * | ||
1528 | * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute | 1634 | * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute |
1529 | * | 1635 | * |
1530 | * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use | 1636 | * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use |
@@ -1545,6 +1651,7 @@ enum nl80211_meshconf_params { | |||
1545 | NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL, | 1651 | NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL, |
1546 | NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME, | 1652 | NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME, |
1547 | NL80211_MESHCONF_HWMP_ROOTMODE, | 1653 | NL80211_MESHCONF_HWMP_ROOTMODE, |
1654 | NL80211_MESHCONF_ELEMENT_TTL, | ||
1548 | 1655 | ||
1549 | /* keep last */ | 1656 | /* keep last */ |
1550 | __NL80211_MESHCONF_ATTR_AFTER_LAST, | 1657 | __NL80211_MESHCONF_ATTR_AFTER_LAST, |
@@ -1552,6 +1659,39 @@ enum nl80211_meshconf_params { | |||
1552 | }; | 1659 | }; |
1553 | 1660 | ||
1554 | /** | 1661 | /** |
1662 | * enum nl80211_mesh_setup_params - mesh setup parameters | ||
1663 | * | ||
1664 | * Mesh setup parameters. These are used to start/join a mesh and cannot be | ||
1665 | * changed while the mesh is active. | ||
1666 | * | ||
1667 | * @__NL80211_MESH_SETUP_INVALID: Internal use | ||
1668 | * | ||
1669 | * @NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL: Enable this option to use a | ||
1670 | * vendor specific path selection algorithm or disable it to use the default | ||
1671 | * HWMP. | ||
1672 | * | ||
1673 | * @NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC: Enable this option to use a | ||
1674 | * vendor specific path metric or disable it to use the default Airtime | ||
1675 | * metric. | ||
1676 | * | ||
1677 | * @NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE: A vendor specific information | ||
1678 | * element that vendors will use to identify the path selection methods and | ||
1679 | * metrics in use. | ||
1680 | * | ||
1681 | * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use | ||
1682 | */ | ||
1683 | enum nl80211_mesh_setup_params { | ||
1684 | __NL80211_MESH_SETUP_INVALID, | ||
1685 | NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL, | ||
1686 | NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC, | ||
1687 | NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE, | ||
1688 | |||
1689 | /* keep last */ | ||
1690 | __NL80211_MESH_SETUP_ATTR_AFTER_LAST, | ||
1691 | NL80211_MESH_SETUP_ATTR_MAX = __NL80211_MESH_SETUP_ATTR_AFTER_LAST - 1 | ||
1692 | }; | ||
1693 | |||
1694 | /** | ||
1555 | * enum nl80211_txq_attr - TX queue parameter attributes | 1695 | * enum nl80211_txq_attr - TX queue parameter attributes |
1556 | * @__NL80211_TXQ_ATTR_INVALID: Attribute number 0 is reserved | 1696 | * @__NL80211_TXQ_ATTR_INVALID: Attribute number 0 is reserved |
1557 | * @NL80211_TXQ_ATTR_QUEUE: TX queue identifier (NL80211_TXQ_Q_*) | 1697 | * @NL80211_TXQ_ATTR_QUEUE: TX queue identifier (NL80211_TXQ_Q_*) |
@@ -1709,6 +1849,23 @@ enum nl80211_wpa_versions { | |||
1709 | }; | 1849 | }; |
1710 | 1850 | ||
1711 | /** | 1851 | /** |
1852 | * enum nl80211_key_default_types - key default types | ||
1853 | * @__NL80211_KEY_DEFAULT_TYPE_INVALID: invalid | ||
1854 | * @NL80211_KEY_DEFAULT_TYPE_UNICAST: key should be used as default | ||
1855 | * unicast key | ||
1856 | * @NL80211_KEY_DEFAULT_TYPE_MULTICAST: key should be used as default | ||
1857 | * multicast key | ||
1858 | * @NUM_NL80211_KEY_DEFAULT_TYPES: number of default types | ||
1859 | */ | ||
1860 | enum nl80211_key_default_types { | ||
1861 | __NL80211_KEY_DEFAULT_TYPE_INVALID, | ||
1862 | NL80211_KEY_DEFAULT_TYPE_UNICAST, | ||
1863 | NL80211_KEY_DEFAULT_TYPE_MULTICAST, | ||
1864 | |||
1865 | NUM_NL80211_KEY_DEFAULT_TYPES | ||
1866 | }; | ||
1867 | |||
1868 | /** | ||
1712 | * enum nl80211_key_attributes - key attributes | 1869 | * enum nl80211_key_attributes - key attributes |
1713 | * @__NL80211_KEY_INVALID: invalid | 1870 | * @__NL80211_KEY_INVALID: invalid |
1714 | * @NL80211_KEY_DATA: (temporal) key data; for TKIP this consists of | 1871 | * @NL80211_KEY_DATA: (temporal) key data; for TKIP this consists of |
@@ -1724,6 +1881,9 @@ enum nl80211_wpa_versions { | |||
1724 | * @NL80211_KEY_TYPE: the key type from enum nl80211_key_type, if not | 1881 | * @NL80211_KEY_TYPE: the key type from enum nl80211_key_type, if not |
1725 | * specified the default depends on whether a MAC address was | 1882 | * specified the default depends on whether a MAC address was |
1726 | * given with the command using the key or not (u32) | 1883 | * given with the command using the key or not (u32) |
1884 | * @NL80211_KEY_DEFAULT_TYPES: A nested attribute containing flags | ||
1885 | * attributes, specifying what a key should be set as default as. | ||
1886 | * See &enum nl80211_key_default_types. | ||
1727 | * @__NL80211_KEY_AFTER_LAST: internal | 1887 | * @__NL80211_KEY_AFTER_LAST: internal |
1728 | * @NL80211_KEY_MAX: highest key attribute | 1888 | * @NL80211_KEY_MAX: highest key attribute |
1729 | */ | 1889 | */ |
@@ -1736,6 +1896,7 @@ enum nl80211_key_attributes { | |||
1736 | NL80211_KEY_DEFAULT, | 1896 | NL80211_KEY_DEFAULT, |
1737 | NL80211_KEY_DEFAULT_MGMT, | 1897 | NL80211_KEY_DEFAULT_MGMT, |
1738 | NL80211_KEY_TYPE, | 1898 | NL80211_KEY_TYPE, |
1899 | NL80211_KEY_DEFAULT_TYPES, | ||
1739 | 1900 | ||
1740 | /* keep last */ | 1901 | /* keep last */ |
1741 | __NL80211_KEY_AFTER_LAST, | 1902 | __NL80211_KEY_AFTER_LAST, |
@@ -1786,6 +1947,8 @@ enum nl80211_ps_state { | |||
1786 | * the minimum amount the RSSI level must change after an event before a | 1947 | * the minimum amount the RSSI level must change after an event before a |
1787 | * new event may be issued (to reduce effects of RSSI oscillation). | 1948 | * new event may be issued (to reduce effects of RSSI oscillation). |
1788 | * @NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT: RSSI threshold event | 1949 | * @NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT: RSSI threshold event |
1950 | * @NL80211_ATTR_CQM_PKT_LOSS_EVENT: a u32 value indicating that this many | ||
1951 | * consecutive packets were not acknowledged by the peer | ||
1789 | * @__NL80211_ATTR_CQM_AFTER_LAST: internal | 1952 | * @__NL80211_ATTR_CQM_AFTER_LAST: internal |
1790 | * @NL80211_ATTR_CQM_MAX: highest key attribute | 1953 | * @NL80211_ATTR_CQM_MAX: highest key attribute |
1791 | */ | 1954 | */ |
@@ -1794,6 +1957,7 @@ enum nl80211_attr_cqm { | |||
1794 | NL80211_ATTR_CQM_RSSI_THOLD, | 1957 | NL80211_ATTR_CQM_RSSI_THOLD, |
1795 | NL80211_ATTR_CQM_RSSI_HYST, | 1958 | NL80211_ATTR_CQM_RSSI_HYST, |
1796 | NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT, | 1959 | NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT, |
1960 | NL80211_ATTR_CQM_PKT_LOSS_EVENT, | ||
1797 | 1961 | ||
1798 | /* keep last */ | 1962 | /* keep last */ |
1799 | __NL80211_ATTR_CQM_AFTER_LAST, | 1963 | __NL80211_ATTR_CQM_AFTER_LAST, |
diff --git a/include/linux/nmi.h b/include/linux/nmi.h index 06aab5eee134..c536f8545f74 100644 --- a/include/linux/nmi.h +++ b/include/linux/nmi.h | |||
@@ -14,22 +14,14 @@ | |||
14 | * may be used to reset the timeout - for code which intentionally | 14 | * may be used to reset the timeout - for code which intentionally |
15 | * disables interrupts for a long time. This call is stateless. | 15 | * disables interrupts for a long time. This call is stateless. |
16 | */ | 16 | */ |
17 | #ifdef ARCH_HAS_NMI_WATCHDOG | 17 | #if defined(ARCH_HAS_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR) |
18 | #include <asm/nmi.h> | 18 | #include <asm/nmi.h> |
19 | extern void touch_nmi_watchdog(void); | 19 | extern void touch_nmi_watchdog(void); |
20 | extern void acpi_nmi_disable(void); | ||
21 | extern void acpi_nmi_enable(void); | ||
22 | #else | 20 | #else |
23 | #ifndef CONFIG_HARDLOCKUP_DETECTOR | ||
24 | static inline void touch_nmi_watchdog(void) | 21 | static inline void touch_nmi_watchdog(void) |
25 | { | 22 | { |
26 | touch_softlockup_watchdog(); | 23 | touch_softlockup_watchdog(); |
27 | } | 24 | } |
28 | #else | ||
29 | extern void touch_nmi_watchdog(void); | ||
30 | #endif | ||
31 | static inline void acpi_nmi_disable(void) { } | ||
32 | static inline void acpi_nmi_enable(void) { } | ||
33 | #endif | 25 | #endif |
34 | 26 | ||
35 | /* | 27 | /* |
diff --git a/include/linux/of_address.h b/include/linux/of_address.h index 8aea06f0564c..2feda6ee6140 100644 --- a/include/linux/of_address.h +++ b/include/linux/of_address.h | |||
@@ -3,7 +3,7 @@ | |||
3 | #include <linux/ioport.h> | 3 | #include <linux/ioport.h> |
4 | #include <linux/of.h> | 4 | #include <linux/of.h> |
5 | 5 | ||
6 | extern u64 of_translate_address(struct device_node *np, const u32 *addr); | 6 | extern u64 of_translate_address(struct device_node *np, const __be32 *addr); |
7 | extern int of_address_to_resource(struct device_node *dev, int index, | 7 | extern int of_address_to_resource(struct device_node *dev, int index, |
8 | struct resource *r); | 8 | struct resource *r); |
9 | extern void __iomem *of_iomap(struct device_node *device, int index); | 9 | extern void __iomem *of_iomap(struct device_node *device, int index); |
@@ -21,7 +21,7 @@ static inline unsigned long pci_address_to_pio(phys_addr_t addr) { return -1; } | |||
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #ifdef CONFIG_PCI | 23 | #ifdef CONFIG_PCI |
24 | extern const u32 *of_get_pci_address(struct device_node *dev, int bar_no, | 24 | extern const __be32 *of_get_pci_address(struct device_node *dev, int bar_no, |
25 | u64 *size, unsigned int *flags); | 25 | u64 *size, unsigned int *flags); |
26 | extern int of_pci_address_to_resource(struct device_node *dev, int bar, | 26 | extern int of_pci_address_to_resource(struct device_node *dev, int bar, |
27 | struct resource *r); | 27 | struct resource *r); |
@@ -32,7 +32,7 @@ static inline int of_pci_address_to_resource(struct device_node *dev, int bar, | |||
32 | return -ENOSYS; | 32 | return -ENOSYS; |
33 | } | 33 | } |
34 | 34 | ||
35 | static inline const u32 *of_get_pci_address(struct device_node *dev, | 35 | static inline const __be32 *of_get_pci_address(struct device_node *dev, |
36 | int bar_no, u64 *size, unsigned int *flags) | 36 | int bar_no, u64 *size, unsigned int *flags) |
37 | { | 37 | { |
38 | return NULL; | 38 | return NULL; |
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h index 7bbf5b328438..0ef22a1f129e 100644 --- a/include/linux/of_fdt.h +++ b/include/linux/of_fdt.h | |||
@@ -58,6 +58,23 @@ struct boot_param_header { | |||
58 | }; | 58 | }; |
59 | 59 | ||
60 | #if defined(CONFIG_OF_FLATTREE) | 60 | #if defined(CONFIG_OF_FLATTREE) |
61 | |||
62 | struct device_node; | ||
63 | |||
64 | /* For scanning an arbitrary device-tree at any time */ | ||
65 | extern char *of_fdt_get_string(struct boot_param_header *blob, u32 offset); | ||
66 | extern void *of_fdt_get_property(struct boot_param_header *blob, | ||
67 | unsigned long node, | ||
68 | const char *name, | ||
69 | unsigned long *size); | ||
70 | extern int of_fdt_is_compatible(struct boot_param_header *blob, | ||
71 | unsigned long node, | ||
72 | const char *compat); | ||
73 | extern int of_fdt_match(struct boot_param_header *blob, unsigned long node, | ||
74 | const char **compat); | ||
75 | extern void of_fdt_unflatten_tree(unsigned long *blob, | ||
76 | struct device_node **mynodes); | ||
77 | |||
61 | /* TBD: Temporary export of fdt globals - remove when code fully merged */ | 78 | /* TBD: Temporary export of fdt globals - remove when code fully merged */ |
62 | extern int __initdata dt_root_addr_cells; | 79 | extern int __initdata dt_root_addr_cells; |
63 | extern int __initdata dt_root_size_cells; | 80 | extern int __initdata dt_root_size_cells; |
@@ -71,6 +88,7 @@ extern int of_scan_flat_dt(int (*it)(unsigned long node, const char *uname, | |||
71 | extern void *of_get_flat_dt_prop(unsigned long node, const char *name, | 88 | extern void *of_get_flat_dt_prop(unsigned long node, const char *name, |
72 | unsigned long *size); | 89 | unsigned long *size); |
73 | extern int of_flat_dt_is_compatible(unsigned long node, const char *name); | 90 | extern int of_flat_dt_is_compatible(unsigned long node, const char *name); |
91 | extern int of_flat_dt_match(unsigned long node, const char **matches); | ||
74 | extern unsigned long of_get_flat_dt_root(void); | 92 | extern unsigned long of_get_flat_dt_root(void); |
75 | 93 | ||
76 | extern int early_init_dt_scan_chosen(unsigned long node, const char *uname, | 94 | extern int early_init_dt_scan_chosen(unsigned long node, const char *uname, |
diff --git a/include/linux/of_net.h b/include/linux/of_net.h new file mode 100644 index 000000000000..e913081fb52a --- /dev/null +++ b/include/linux/of_net.h | |||
@@ -0,0 +1,15 @@ | |||
1 | /* | ||
2 | * OF helpers for network devices. | ||
3 | * | ||
4 | * This file is released under the GPLv2 | ||
5 | */ | ||
6 | |||
7 | #ifndef __LINUX_OF_NET_H | ||
8 | #define __LINUX_OF_NET_H | ||
9 | |||
10 | #ifdef CONFIG_OF_NET | ||
11 | #include <linux/of.h> | ||
12 | extern const void *of_get_mac_address(struct device_node *np); | ||
13 | #endif | ||
14 | |||
15 | #endif /* __LINUX_OF_NET_H */ | ||
diff --git a/include/linux/path.h b/include/linux/path.h index edc98dec6266..a581e8c06533 100644 --- a/include/linux/path.h +++ b/include/linux/path.h | |||
@@ -10,7 +10,9 @@ struct path { | |||
10 | }; | 10 | }; |
11 | 11 | ||
12 | extern void path_get(struct path *); | 12 | extern void path_get(struct path *); |
13 | extern void path_get_long(struct path *); | ||
13 | extern void path_put(struct path *); | 14 | extern void path_put(struct path *); |
15 | extern void path_put_long(struct path *); | ||
14 | 16 | ||
15 | static inline int path_equal(const struct path *path1, const struct path *path2) | 17 | static inline int path_equal(const struct path *path1, const struct path *path2) |
16 | { | 18 | { |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index cb845c16ad7d..ab47732d81e0 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -518,6 +518,7 @@ | |||
518 | #define PCI_DEVICE_ID_AMD_11H_NB_MISC 0x1303 | 518 | #define PCI_DEVICE_ID_AMD_11H_NB_MISC 0x1303 |
519 | #define PCI_DEVICE_ID_AMD_11H_NB_LINK 0x1304 | 519 | #define PCI_DEVICE_ID_AMD_11H_NB_LINK 0x1304 |
520 | #define PCI_DEVICE_ID_AMD_15H_NB_MISC 0x1603 | 520 | #define PCI_DEVICE_ID_AMD_15H_NB_MISC 0x1603 |
521 | #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 | ||
521 | #define PCI_DEVICE_ID_AMD_LANCE 0x2000 | 522 | #define PCI_DEVICE_ID_AMD_LANCE 0x2000 |
522 | #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 | 523 | #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 |
523 | #define PCI_DEVICE_ID_AMD_SCSI 0x2020 | 524 | #define PCI_DEVICE_ID_AMD_SCSI 0x2020 |
@@ -1650,6 +1651,11 @@ | |||
1650 | #define PCI_DEVICE_ID_O2_6836 0x6836 | 1651 | #define PCI_DEVICE_ID_O2_6836 0x6836 |
1651 | #define PCI_DEVICE_ID_O2_6812 0x6872 | 1652 | #define PCI_DEVICE_ID_O2_6812 0x6872 |
1652 | #define PCI_DEVICE_ID_O2_6933 0x6933 | 1653 | #define PCI_DEVICE_ID_O2_6933 0x6933 |
1654 | #define PCI_DEVICE_ID_O2_8120 0x8120 | ||
1655 | #define PCI_DEVICE_ID_O2_8220 0x8220 | ||
1656 | #define PCI_DEVICE_ID_O2_8221 0x8221 | ||
1657 | #define PCI_DEVICE_ID_O2_8320 0x8320 | ||
1658 | #define PCI_DEVICE_ID_O2_8321 0x8321 | ||
1653 | 1659 | ||
1654 | #define PCI_VENDOR_ID_3DFX 0x121a | 1660 | #define PCI_VENDOR_ID_3DFX 0x121a |
1655 | #define PCI_DEVICE_ID_3DFX_VOODOO 0x0001 | 1661 | #define PCI_DEVICE_ID_3DFX_VOODOO 0x0001 |
@@ -2363,6 +2369,8 @@ | |||
2363 | #define PCI_DEVICE_ID_JMICRON_JMB38X_SD 0x2381 | 2369 | #define PCI_DEVICE_ID_JMICRON_JMB38X_SD 0x2381 |
2364 | #define PCI_DEVICE_ID_JMICRON_JMB38X_MMC 0x2382 | 2370 | #define PCI_DEVICE_ID_JMICRON_JMB38X_MMC 0x2382 |
2365 | #define PCI_DEVICE_ID_JMICRON_JMB38X_MS 0x2383 | 2371 | #define PCI_DEVICE_ID_JMICRON_JMB38X_MS 0x2383 |
2372 | #define PCI_DEVICE_ID_JMICRON_JMB388_SD 0x2391 | ||
2373 | #define PCI_DEVICE_ID_JMICRON_JMB388_ESD 0x2392 | ||
2366 | 2374 | ||
2367 | #define PCI_VENDOR_ID_KORENIX 0x1982 | 2375 | #define PCI_VENDOR_ID_KORENIX 0x1982 |
2368 | #define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600 | 2376 | #define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600 |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 5095b834a6fb..27c3c6fcfad3 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -240,6 +240,21 @@ extern void __bad_size_call_parameter(void); | |||
240 | pscr_ret__; \ | 240 | pscr_ret__; \ |
241 | }) | 241 | }) |
242 | 242 | ||
243 | #define __pcpu_size_call_return2(stem, variable, ...) \ | ||
244 | ({ \ | ||
245 | typeof(variable) pscr2_ret__; \ | ||
246 | __verify_pcpu_ptr(&(variable)); \ | ||
247 | switch(sizeof(variable)) { \ | ||
248 | case 1: pscr2_ret__ = stem##1(variable, __VA_ARGS__); break; \ | ||
249 | case 2: pscr2_ret__ = stem##2(variable, __VA_ARGS__); break; \ | ||
250 | case 4: pscr2_ret__ = stem##4(variable, __VA_ARGS__); break; \ | ||
251 | case 8: pscr2_ret__ = stem##8(variable, __VA_ARGS__); break; \ | ||
252 | default: \ | ||
253 | __bad_size_call_parameter(); break; \ | ||
254 | } \ | ||
255 | pscr2_ret__; \ | ||
256 | }) | ||
257 | |||
243 | #define __pcpu_size_call(stem, variable, ...) \ | 258 | #define __pcpu_size_call(stem, variable, ...) \ |
244 | do { \ | 259 | do { \ |
245 | __verify_pcpu_ptr(&(variable)); \ | 260 | __verify_pcpu_ptr(&(variable)); \ |
@@ -402,6 +417,89 @@ do { \ | |||
402 | # define this_cpu_xor(pcp, val) __pcpu_size_call(this_cpu_or_, (pcp), (val)) | 417 | # define this_cpu_xor(pcp, val) __pcpu_size_call(this_cpu_or_, (pcp), (val)) |
403 | #endif | 418 | #endif |
404 | 419 | ||
420 | #define _this_cpu_generic_add_return(pcp, val) \ | ||
421 | ({ \ | ||
422 | typeof(pcp) ret__; \ | ||
423 | preempt_disable(); \ | ||
424 | __this_cpu_add(pcp, val); \ | ||
425 | ret__ = __this_cpu_read(pcp); \ | ||
426 | preempt_enable(); \ | ||
427 | ret__; \ | ||
428 | }) | ||
429 | |||
430 | #ifndef this_cpu_add_return | ||
431 | # ifndef this_cpu_add_return_1 | ||
432 | # define this_cpu_add_return_1(pcp, val) _this_cpu_generic_add_return(pcp, val) | ||
433 | # endif | ||
434 | # ifndef this_cpu_add_return_2 | ||
435 | # define this_cpu_add_return_2(pcp, val) _this_cpu_generic_add_return(pcp, val) | ||
436 | # endif | ||
437 | # ifndef this_cpu_add_return_4 | ||
438 | # define this_cpu_add_return_4(pcp, val) _this_cpu_generic_add_return(pcp, val) | ||
439 | # endif | ||
440 | # ifndef this_cpu_add_return_8 | ||
441 | # define this_cpu_add_return_8(pcp, val) _this_cpu_generic_add_return(pcp, val) | ||
442 | # endif | ||
443 | # define this_cpu_add_return(pcp, val) __pcpu_size_call_return2(this_cpu_add_return_, pcp, val) | ||
444 | #endif | ||
445 | |||
446 | #define this_cpu_sub_return(pcp, val) this_cpu_add_return(pcp, -(val)) | ||
447 | #define this_cpu_inc_return(pcp) this_cpu_add_return(pcp, 1) | ||
448 | #define this_cpu_dec_return(pcp) this_cpu_add_return(pcp, -1) | ||
449 | |||
450 | #define _this_cpu_generic_xchg(pcp, nval) \ | ||
451 | ({ typeof(pcp) ret__; \ | ||
452 | preempt_disable(); \ | ||
453 | ret__ = __this_cpu_read(pcp); \ | ||
454 | __this_cpu_write(pcp, nval); \ | ||
455 | preempt_enable(); \ | ||
456 | ret__; \ | ||
457 | }) | ||
458 | |||
459 | #ifndef this_cpu_xchg | ||
460 | # ifndef this_cpu_xchg_1 | ||
461 | # define this_cpu_xchg_1(pcp, nval) _this_cpu_generic_xchg(pcp, nval) | ||
462 | # endif | ||
463 | # ifndef this_cpu_xchg_2 | ||
464 | # define this_cpu_xchg_2(pcp, nval) _this_cpu_generic_xchg(pcp, nval) | ||
465 | # endif | ||
466 | # ifndef this_cpu_xchg_4 | ||
467 | # define this_cpu_xchg_4(pcp, nval) _this_cpu_generic_xchg(pcp, nval) | ||
468 | # endif | ||
469 | # ifndef this_cpu_xchg_8 | ||
470 | # define this_cpu_xchg_8(pcp, nval) _this_cpu_generic_xchg(pcp, nval) | ||
471 | # endif | ||
472 | # define this_cpu_xchg(pcp, nval) \ | ||
473 | __pcpu_size_call_return2(this_cpu_xchg_, (pcp), nval) | ||
474 | #endif | ||
475 | |||
476 | #define _this_cpu_generic_cmpxchg(pcp, oval, nval) \ | ||
477 | ({ typeof(pcp) ret__; \ | ||
478 | preempt_disable(); \ | ||
479 | ret__ = __this_cpu_read(pcp); \ | ||
480 | if (ret__ == (oval)) \ | ||
481 | __this_cpu_write(pcp, nval); \ | ||
482 | preempt_enable(); \ | ||
483 | ret__; \ | ||
484 | }) | ||
485 | |||
486 | #ifndef this_cpu_cmpxchg | ||
487 | # ifndef this_cpu_cmpxchg_1 | ||
488 | # define this_cpu_cmpxchg_1(pcp, oval, nval) _this_cpu_generic_cmpxchg(pcp, oval, nval) | ||
489 | # endif | ||
490 | # ifndef this_cpu_cmpxchg_2 | ||
491 | # define this_cpu_cmpxchg_2(pcp, oval, nval) _this_cpu_generic_cmpxchg(pcp, oval, nval) | ||
492 | # endif | ||
493 | # ifndef this_cpu_cmpxchg_4 | ||
494 | # define this_cpu_cmpxchg_4(pcp, oval, nval) _this_cpu_generic_cmpxchg(pcp, oval, nval) | ||
495 | # endif | ||
496 | # ifndef this_cpu_cmpxchg_8 | ||
497 | # define this_cpu_cmpxchg_8(pcp, oval, nval) _this_cpu_generic_cmpxchg(pcp, oval, nval) | ||
498 | # endif | ||
499 | # define this_cpu_cmpxchg(pcp, oval, nval) \ | ||
500 | __pcpu_size_call_return2(this_cpu_cmpxchg_, pcp, oval, nval) | ||
501 | #endif | ||
502 | |||
405 | /* | 503 | /* |
406 | * Generic percpu operations that do not require preemption handling. | 504 | * Generic percpu operations that do not require preemption handling. |
407 | * Either we do not care about races or the caller has the | 505 | * Either we do not care about races or the caller has the |
@@ -529,11 +627,87 @@ do { \ | |||
529 | # define __this_cpu_xor(pcp, val) __pcpu_size_call(__this_cpu_xor_, (pcp), (val)) | 627 | # define __this_cpu_xor(pcp, val) __pcpu_size_call(__this_cpu_xor_, (pcp), (val)) |
530 | #endif | 628 | #endif |
531 | 629 | ||
630 | #define __this_cpu_generic_add_return(pcp, val) \ | ||
631 | ({ \ | ||
632 | __this_cpu_add(pcp, val); \ | ||
633 | __this_cpu_read(pcp); \ | ||
634 | }) | ||
635 | |||
636 | #ifndef __this_cpu_add_return | ||
637 | # ifndef __this_cpu_add_return_1 | ||
638 | # define __this_cpu_add_return_1(pcp, val) __this_cpu_generic_add_return(pcp, val) | ||
639 | # endif | ||
640 | # ifndef __this_cpu_add_return_2 | ||
641 | # define __this_cpu_add_return_2(pcp, val) __this_cpu_generic_add_return(pcp, val) | ||
642 | # endif | ||
643 | # ifndef __this_cpu_add_return_4 | ||
644 | # define __this_cpu_add_return_4(pcp, val) __this_cpu_generic_add_return(pcp, val) | ||
645 | # endif | ||
646 | # ifndef __this_cpu_add_return_8 | ||
647 | # define __this_cpu_add_return_8(pcp, val) __this_cpu_generic_add_return(pcp, val) | ||
648 | # endif | ||
649 | # define __this_cpu_add_return(pcp, val) __pcpu_size_call_return2(this_cpu_add_return_, pcp, val) | ||
650 | #endif | ||
651 | |||
652 | #define __this_cpu_sub_return(pcp, val) this_cpu_add_return(pcp, -(val)) | ||
653 | #define __this_cpu_inc_return(pcp) this_cpu_add_return(pcp, 1) | ||
654 | #define __this_cpu_dec_return(pcp) this_cpu_add_return(pcp, -1) | ||
655 | |||
656 | #define __this_cpu_generic_xchg(pcp, nval) \ | ||
657 | ({ typeof(pcp) ret__; \ | ||
658 | ret__ = __this_cpu_read(pcp); \ | ||
659 | __this_cpu_write(pcp, nval); \ | ||
660 | ret__; \ | ||
661 | }) | ||
662 | |||
663 | #ifndef __this_cpu_xchg | ||
664 | # ifndef __this_cpu_xchg_1 | ||
665 | # define __this_cpu_xchg_1(pcp, nval) __this_cpu_generic_xchg(pcp, nval) | ||
666 | # endif | ||
667 | # ifndef __this_cpu_xchg_2 | ||
668 | # define __this_cpu_xchg_2(pcp, nval) __this_cpu_generic_xchg(pcp, nval) | ||
669 | # endif | ||
670 | # ifndef __this_cpu_xchg_4 | ||
671 | # define __this_cpu_xchg_4(pcp, nval) __this_cpu_generic_xchg(pcp, nval) | ||
672 | # endif | ||
673 | # ifndef __this_cpu_xchg_8 | ||
674 | # define __this_cpu_xchg_8(pcp, nval) __this_cpu_generic_xchg(pcp, nval) | ||
675 | # endif | ||
676 | # define __this_cpu_xchg(pcp, nval) \ | ||
677 | __pcpu_size_call_return2(__this_cpu_xchg_, (pcp), nval) | ||
678 | #endif | ||
679 | |||
680 | #define __this_cpu_generic_cmpxchg(pcp, oval, nval) \ | ||
681 | ({ \ | ||
682 | typeof(pcp) ret__; \ | ||
683 | ret__ = __this_cpu_read(pcp); \ | ||
684 | if (ret__ == (oval)) \ | ||
685 | __this_cpu_write(pcp, nval); \ | ||
686 | ret__; \ | ||
687 | }) | ||
688 | |||
689 | #ifndef __this_cpu_cmpxchg | ||
690 | # ifndef __this_cpu_cmpxchg_1 | ||
691 | # define __this_cpu_cmpxchg_1(pcp, oval, nval) __this_cpu_generic_cmpxchg(pcp, oval, nval) | ||
692 | # endif | ||
693 | # ifndef __this_cpu_cmpxchg_2 | ||
694 | # define __this_cpu_cmpxchg_2(pcp, oval, nval) __this_cpu_generic_cmpxchg(pcp, oval, nval) | ||
695 | # endif | ||
696 | # ifndef __this_cpu_cmpxchg_4 | ||
697 | # define __this_cpu_cmpxchg_4(pcp, oval, nval) __this_cpu_generic_cmpxchg(pcp, oval, nval) | ||
698 | # endif | ||
699 | # ifndef __this_cpu_cmpxchg_8 | ||
700 | # define __this_cpu_cmpxchg_8(pcp, oval, nval) __this_cpu_generic_cmpxchg(pcp, oval, nval) | ||
701 | # endif | ||
702 | # define __this_cpu_cmpxchg(pcp, oval, nval) \ | ||
703 | __pcpu_size_call_return2(__this_cpu_cmpxchg_, pcp, oval, nval) | ||
704 | #endif | ||
705 | |||
532 | /* | 706 | /* |
533 | * IRQ safe versions of the per cpu RMW operations. Note that these operations | 707 | * IRQ safe versions of the per cpu RMW operations. Note that these operations |
534 | * are *not* safe against modification of the same variable from another | 708 | * are *not* safe against modification of the same variable from another |
535 | * processors (which one gets when using regular atomic operations) | 709 | * processors (which one gets when using regular atomic operations) |
536 | . They are guaranteed to be atomic vs. local interrupts and | 710 | * They are guaranteed to be atomic vs. local interrupts and |
537 | * preemption only. | 711 | * preemption only. |
538 | */ | 712 | */ |
539 | #define irqsafe_cpu_generic_to_op(pcp, val, op) \ | 713 | #define irqsafe_cpu_generic_to_op(pcp, val, op) \ |
@@ -620,4 +794,33 @@ do { \ | |||
620 | # define irqsafe_cpu_xor(pcp, val) __pcpu_size_call(irqsafe_cpu_xor_, (val)) | 794 | # define irqsafe_cpu_xor(pcp, val) __pcpu_size_call(irqsafe_cpu_xor_, (val)) |
621 | #endif | 795 | #endif |
622 | 796 | ||
797 | #define irqsafe_cpu_generic_cmpxchg(pcp, oval, nval) \ | ||
798 | ({ \ | ||
799 | typeof(pcp) ret__; \ | ||
800 | unsigned long flags; \ | ||
801 | local_irq_save(flags); \ | ||
802 | ret__ = __this_cpu_read(pcp); \ | ||
803 | if (ret__ == (oval)) \ | ||
804 | __this_cpu_write(pcp, nval); \ | ||
805 | local_irq_restore(flags); \ | ||
806 | ret__; \ | ||
807 | }) | ||
808 | |||
809 | #ifndef irqsafe_cpu_cmpxchg | ||
810 | # ifndef irqsafe_cpu_cmpxchg_1 | ||
811 | # define irqsafe_cpu_cmpxchg_1(pcp, oval, nval) irqsafe_cpu_generic_cmpxchg(pcp, oval, nval) | ||
812 | # endif | ||
813 | # ifndef irqsafe_cpu_cmpxchg_2 | ||
814 | # define irqsafe_cpu_cmpxchg_2(pcp, oval, nval) irqsafe_cpu_generic_cmpxchg(pcp, oval, nval) | ||
815 | # endif | ||
816 | # ifndef irqsafe_cpu_cmpxchg_4 | ||
817 | # define irqsafe_cpu_cmpxchg_4(pcp, oval, nval) irqsafe_cpu_generic_cmpxchg(pcp, oval, nval) | ||
818 | # endif | ||
819 | # ifndef irqsafe_cpu_cmpxchg_8 | ||
820 | # define irqsafe_cpu_cmpxchg_8(pcp, oval, nval) irqsafe_cpu_generic_cmpxchg(pcp, oval, nval) | ||
821 | # endif | ||
822 | # define irqsafe_cpu_cmpxchg(pcp, oval, nval) \ | ||
823 | __pcpu_size_call_return2(irqsafe_cpu_cmpxchg_, (pcp), oval, nval) | ||
824 | #endif | ||
825 | |||
623 | #endif /* __LINUX_PERCPU_H */ | 826 | #endif /* __LINUX_PERCPU_H */ |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 4f1279e105ee..dda5b0a3ff60 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -215,8 +215,9 @@ struct perf_event_attr { | |||
215 | */ | 215 | */ |
216 | precise_ip : 2, /* skid constraint */ | 216 | precise_ip : 2, /* skid constraint */ |
217 | mmap_data : 1, /* non-exec mmap data */ | 217 | mmap_data : 1, /* non-exec mmap data */ |
218 | sample_id_all : 1, /* sample_type all events */ | ||
218 | 219 | ||
219 | __reserved_1 : 46; | 220 | __reserved_1 : 45; |
220 | 221 | ||
221 | union { | 222 | union { |
222 | __u32 wakeup_events; /* wakeup every n events */ | 223 | __u32 wakeup_events; /* wakeup every n events */ |
@@ -327,6 +328,15 @@ struct perf_event_header { | |||
327 | enum perf_event_type { | 328 | enum perf_event_type { |
328 | 329 | ||
329 | /* | 330 | /* |
331 | * If perf_event_attr.sample_id_all is set then all event types will | ||
332 | * have the sample_type selected fields related to where/when | ||
333 | * (identity) an event took place (TID, TIME, ID, CPU, STREAM_ID) | ||
334 | * described in PERF_RECORD_SAMPLE below, it will be stashed just after | ||
335 | * the perf_event_header and the fields already present for the existing | ||
336 | * fields, i.e. at the end of the payload. That way a newer perf.data | ||
337 | * file will be supported by older perf tools, with these new optional | ||
338 | * fields being ignored. | ||
339 | * | ||
330 | * The MMAP events record the PROT_EXEC mappings so that we can | 340 | * The MMAP events record the PROT_EXEC mappings so that we can |
331 | * correlate userspace IPs to code. They have the following structure: | 341 | * correlate userspace IPs to code. They have the following structure: |
332 | * | 342 | * |
@@ -578,6 +588,10 @@ struct perf_event; | |||
578 | struct pmu { | 588 | struct pmu { |
579 | struct list_head entry; | 589 | struct list_head entry; |
580 | 590 | ||
591 | struct device *dev; | ||
592 | char *name; | ||
593 | int type; | ||
594 | |||
581 | int * __percpu pmu_disable_count; | 595 | int * __percpu pmu_disable_count; |
582 | struct perf_cpu_context * __percpu pmu_cpu_context; | 596 | struct perf_cpu_context * __percpu pmu_cpu_context; |
583 | int task_ctx_nr; | 597 | int task_ctx_nr; |
@@ -758,6 +772,9 @@ struct perf_event { | |||
758 | u64 shadow_ctx_time; | 772 | u64 shadow_ctx_time; |
759 | 773 | ||
760 | struct perf_event_attr attr; | 774 | struct perf_event_attr attr; |
775 | u16 header_size; | ||
776 | u16 id_header_size; | ||
777 | u16 read_size; | ||
761 | struct hw_perf_event hw; | 778 | struct hw_perf_event hw; |
762 | 779 | ||
763 | struct perf_event_context *ctx; | 780 | struct perf_event_context *ctx; |
@@ -903,7 +920,7 @@ struct perf_output_handle { | |||
903 | 920 | ||
904 | #ifdef CONFIG_PERF_EVENTS | 921 | #ifdef CONFIG_PERF_EVENTS |
905 | 922 | ||
906 | extern int perf_pmu_register(struct pmu *pmu); | 923 | extern int perf_pmu_register(struct pmu *pmu, char *name, int type); |
907 | extern void perf_pmu_unregister(struct pmu *pmu); | 924 | extern void perf_pmu_unregister(struct pmu *pmu); |
908 | 925 | ||
909 | extern int perf_num_counters(void); | 926 | extern int perf_num_counters(void); |
@@ -970,6 +987,11 @@ extern int perf_event_overflow(struct perf_event *event, int nmi, | |||
970 | struct perf_sample_data *data, | 987 | struct perf_sample_data *data, |
971 | struct pt_regs *regs); | 988 | struct pt_regs *regs); |
972 | 989 | ||
990 | static inline bool is_sampling_event(struct perf_event *event) | ||
991 | { | ||
992 | return event->attr.sample_period != 0; | ||
993 | } | ||
994 | |||
973 | /* | 995 | /* |
974 | * Return 1 for a software event, 0 for a hardware event | 996 | * Return 1 for a software event, 0 for a hardware event |
975 | */ | 997 | */ |
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index bb27d7ec2fb9..77257c92155a 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
@@ -30,6 +30,7 @@ struct pipe_buffer { | |||
30 | * struct pipe_inode_info - a linux kernel pipe | 30 | * struct pipe_inode_info - a linux kernel pipe |
31 | * @wait: reader/writer wait point in case of empty/full pipe | 31 | * @wait: reader/writer wait point in case of empty/full pipe |
32 | * @nrbufs: the number of non-empty pipe buffers in this pipe | 32 | * @nrbufs: the number of non-empty pipe buffers in this pipe |
33 | * @buffers: total number of buffers (should be a power of 2) | ||
33 | * @curbuf: the current pipe buffer entry | 34 | * @curbuf: the current pipe buffer entry |
34 | * @tmp_page: cached released page | 35 | * @tmp_page: cached released page |
35 | * @readers: number of current readers of this pipe | 36 | * @readers: number of current readers of this pipe |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 40f3f45702ba..dd9c7ab38270 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -367,45 +367,6 @@ extern struct dev_pm_ops generic_subsys_pm_ops; | |||
367 | { .event = PM_EVENT_AUTO_RESUME, }) | 367 | { .event = PM_EVENT_AUTO_RESUME, }) |
368 | 368 | ||
369 | /** | 369 | /** |
370 | * Device power management states | ||
371 | * | ||
372 | * These state labels are used internally by the PM core to indicate the current | ||
373 | * status of a device with respect to the PM core operations. | ||
374 | * | ||
375 | * DPM_ON Device is regarded as operational. Set this way | ||
376 | * initially and when ->complete() is about to be called. | ||
377 | * Also set when ->prepare() fails. | ||
378 | * | ||
379 | * DPM_PREPARING Device is going to be prepared for a PM transition. Set | ||
380 | * when ->prepare() is about to be called. | ||
381 | * | ||
382 | * DPM_RESUMING Device is going to be resumed. Set when ->resume(), | ||
383 | * ->thaw(), or ->restore() is about to be called. | ||
384 | * | ||
385 | * DPM_SUSPENDING Device has been prepared for a power transition. Set | ||
386 | * when ->prepare() has just succeeded. | ||
387 | * | ||
388 | * DPM_OFF Device is regarded as inactive. Set immediately after | ||
389 | * ->suspend(), ->freeze(), or ->poweroff() has succeeded. | ||
390 | * Also set when ->resume()_noirq, ->thaw_noirq(), or | ||
391 | * ->restore_noirq() is about to be called. | ||
392 | * | ||
393 | * DPM_OFF_IRQ Device is in a "deep sleep". Set immediately after | ||
394 | * ->suspend_noirq(), ->freeze_noirq(), or | ||
395 | * ->poweroff_noirq() has just succeeded. | ||
396 | */ | ||
397 | |||
398 | enum dpm_state { | ||
399 | DPM_INVALID, | ||
400 | DPM_ON, | ||
401 | DPM_PREPARING, | ||
402 | DPM_RESUMING, | ||
403 | DPM_SUSPENDING, | ||
404 | DPM_OFF, | ||
405 | DPM_OFF_IRQ, | ||
406 | }; | ||
407 | |||
408 | /** | ||
409 | * Device run-time power management status. | 370 | * Device run-time power management status. |
410 | * | 371 | * |
411 | * These status labels are used internally by the PM core to indicate the | 372 | * These status labels are used internally by the PM core to indicate the |
@@ -463,8 +424,8 @@ struct wakeup_source; | |||
463 | struct dev_pm_info { | 424 | struct dev_pm_info { |
464 | pm_message_t power_state; | 425 | pm_message_t power_state; |
465 | unsigned int can_wakeup:1; | 426 | unsigned int can_wakeup:1; |
466 | unsigned async_suspend:1; | 427 | unsigned int async_suspend:1; |
467 | enum dpm_state status; /* Owned by the PM core */ | 428 | unsigned int in_suspend:1; /* Owned by the PM core */ |
468 | spinlock_t lock; | 429 | spinlock_t lock; |
469 | #ifdef CONFIG_PM_SLEEP | 430 | #ifdef CONFIG_PM_SLEEP |
470 | struct list_head entry; | 431 | struct list_head entry; |
@@ -486,6 +447,7 @@ struct dev_pm_info { | |||
486 | unsigned int run_wake:1; | 447 | unsigned int run_wake:1; |
487 | unsigned int runtime_auto:1; | 448 | unsigned int runtime_auto:1; |
488 | unsigned int no_callbacks:1; | 449 | unsigned int no_callbacks:1; |
450 | unsigned int irq_safe:1; | ||
489 | unsigned int use_autosuspend:1; | 451 | unsigned int use_autosuspend:1; |
490 | unsigned int timer_autosuspends:1; | 452 | unsigned int timer_autosuspends:1; |
491 | enum rpm_request request; | 453 | enum rpm_request request; |
@@ -610,4 +572,11 @@ extern unsigned int pm_flags; | |||
610 | #define PM_APM 1 | 572 | #define PM_APM 1 |
611 | #define PM_ACPI 2 | 573 | #define PM_ACPI 2 |
612 | 574 | ||
575 | extern int pm_generic_suspend(struct device *dev); | ||
576 | extern int pm_generic_resume(struct device *dev); | ||
577 | extern int pm_generic_freeze(struct device *dev); | ||
578 | extern int pm_generic_thaw(struct device *dev); | ||
579 | extern int pm_generic_restore(struct device *dev); | ||
580 | extern int pm_generic_poweroff(struct device *dev); | ||
581 | |||
613 | #endif /* _LINUX_PM_H */ | 582 | #endif /* _LINUX_PM_H */ |
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index d19f1cca7f74..d34f067e2a7f 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
@@ -40,6 +40,7 @@ extern int pm_generic_runtime_idle(struct device *dev); | |||
40 | extern int pm_generic_runtime_suspend(struct device *dev); | 40 | extern int pm_generic_runtime_suspend(struct device *dev); |
41 | extern int pm_generic_runtime_resume(struct device *dev); | 41 | extern int pm_generic_runtime_resume(struct device *dev); |
42 | extern void pm_runtime_no_callbacks(struct device *dev); | 42 | extern void pm_runtime_no_callbacks(struct device *dev); |
43 | extern void pm_runtime_irq_safe(struct device *dev); | ||
43 | extern void __pm_runtime_use_autosuspend(struct device *dev, bool use); | 44 | extern void __pm_runtime_use_autosuspend(struct device *dev, bool use); |
44 | extern void pm_runtime_set_autosuspend_delay(struct device *dev, int delay); | 45 | extern void pm_runtime_set_autosuspend_delay(struct device *dev, int delay); |
45 | extern unsigned long pm_runtime_autosuspend_expiration(struct device *dev); | 46 | extern unsigned long pm_runtime_autosuspend_expiration(struct device *dev); |
@@ -81,6 +82,11 @@ static inline bool pm_runtime_suspended(struct device *dev) | |||
81 | && !dev->power.disable_depth; | 82 | && !dev->power.disable_depth; |
82 | } | 83 | } |
83 | 84 | ||
85 | static inline bool pm_runtime_enabled(struct device *dev) | ||
86 | { | ||
87 | return !dev->power.disable_depth; | ||
88 | } | ||
89 | |||
84 | static inline void pm_runtime_mark_last_busy(struct device *dev) | 90 | static inline void pm_runtime_mark_last_busy(struct device *dev) |
85 | { | 91 | { |
86 | ACCESS_ONCE(dev->power.last_busy) = jiffies; | 92 | ACCESS_ONCE(dev->power.last_busy) = jiffies; |
@@ -119,11 +125,13 @@ static inline void pm_runtime_put_noidle(struct device *dev) {} | |||
119 | static inline bool device_run_wake(struct device *dev) { return false; } | 125 | static inline bool device_run_wake(struct device *dev) { return false; } |
120 | static inline void device_set_run_wake(struct device *dev, bool enable) {} | 126 | static inline void device_set_run_wake(struct device *dev, bool enable) {} |
121 | static inline bool pm_runtime_suspended(struct device *dev) { return false; } | 127 | static inline bool pm_runtime_suspended(struct device *dev) { return false; } |
128 | static inline bool pm_runtime_enabled(struct device *dev) { return false; } | ||
122 | 129 | ||
123 | static inline int pm_generic_runtime_idle(struct device *dev) { return 0; } | 130 | static inline int pm_generic_runtime_idle(struct device *dev) { return 0; } |
124 | static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; } | 131 | static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; } |
125 | static inline int pm_generic_runtime_resume(struct device *dev) { return 0; } | 132 | static inline int pm_generic_runtime_resume(struct device *dev) { return 0; } |
126 | static inline void pm_runtime_no_callbacks(struct device *dev) {} | 133 | static inline void pm_runtime_no_callbacks(struct device *dev) {} |
134 | static inline void pm_runtime_irq_safe(struct device *dev) {} | ||
127 | 135 | ||
128 | static inline void pm_runtime_mark_last_busy(struct device *dev) {} | 136 | static inline void pm_runtime_mark_last_busy(struct device *dev) {} |
129 | static inline void __pm_runtime_use_autosuspend(struct device *dev, | 137 | static inline void __pm_runtime_use_autosuspend(struct device *dev, |
@@ -196,6 +204,11 @@ static inline int pm_runtime_put_sync(struct device *dev) | |||
196 | return __pm_runtime_idle(dev, RPM_GET_PUT); | 204 | return __pm_runtime_idle(dev, RPM_GET_PUT); |
197 | } | 205 | } |
198 | 206 | ||
207 | static inline int pm_runtime_put_sync_suspend(struct device *dev) | ||
208 | { | ||
209 | return __pm_runtime_suspend(dev, RPM_GET_PUT); | ||
210 | } | ||
211 | |||
199 | static inline int pm_runtime_put_sync_autosuspend(struct device *dev) | 212 | static inline int pm_runtime_put_sync_autosuspend(struct device *dev) |
200 | { | 213 | { |
201 | return __pm_runtime_suspend(dev, RPM_GET_PUT | RPM_AUTO); | 214 | return __pm_runtime_suspend(dev, RPM_GET_PUT | RPM_AUTO); |
diff --git a/include/linux/posix_acl.h b/include/linux/posix_acl.h index 67608161df6b..d68283a898bb 100644 --- a/include/linux/posix_acl.h +++ b/include/linux/posix_acl.h | |||
@@ -108,6 +108,25 @@ static inline struct posix_acl *get_cached_acl(struct inode *inode, int type) | |||
108 | return acl; | 108 | return acl; |
109 | } | 109 | } |
110 | 110 | ||
111 | static inline int negative_cached_acl(struct inode *inode, int type) | ||
112 | { | ||
113 | struct posix_acl **p, *acl; | ||
114 | switch (type) { | ||
115 | case ACL_TYPE_ACCESS: | ||
116 | p = &inode->i_acl; | ||
117 | break; | ||
118 | case ACL_TYPE_DEFAULT: | ||
119 | p = &inode->i_default_acl; | ||
120 | break; | ||
121 | default: | ||
122 | BUG(); | ||
123 | } | ||
124 | acl = ACCESS_ONCE(*p); | ||
125 | if (acl) | ||
126 | return 0; | ||
127 | return 1; | ||
128 | } | ||
129 | |||
111 | static inline void set_cached_acl(struct inode *inode, | 130 | static inline void set_cached_acl(struct inode *inode, |
112 | int type, | 131 | int type, |
113 | struct posix_acl *acl) | 132 | struct posix_acl *acl) |
diff --git a/include/linux/pxa2xx_ssp.h b/include/linux/pxa2xx_ssp.h new file mode 100644 index 000000000000..2f691e4e6222 --- /dev/null +++ b/include/linux/pxa2xx_ssp.h | |||
@@ -0,0 +1,209 @@ | |||
1 | /* | ||
2 | * pxa2xx_ssp.h | ||
3 | * | ||
4 | * Copyright (C) 2003 Russell King, All Rights Reserved. | ||
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 driver supports the following PXA CPU/SSP ports:- | ||
11 | * | ||
12 | * PXA250 SSP | ||
13 | * PXA255 SSP, NSSP | ||
14 | * PXA26x SSP, NSSP, ASSP | ||
15 | * PXA27x SSP1, SSP2, SSP3 | ||
16 | * PXA3xx SSP1, SSP2, SSP3, SSP4 | ||
17 | */ | ||
18 | |||
19 | #ifndef __LINUX_SSP_H | ||
20 | #define __LINUX_SSP_H | ||
21 | |||
22 | #include <linux/list.h> | ||
23 | #include <linux/io.h> | ||
24 | |||
25 | /* | ||
26 | * SSP Serial Port Registers | ||
27 | * PXA250, PXA255, PXA26x and PXA27x SSP controllers are all slightly different. | ||
28 | * PXA255, PXA26x and PXA27x have extra ports, registers and bits. | ||
29 | */ | ||
30 | |||
31 | #define SSCR0 (0x00) /* SSP Control Register 0 */ | ||
32 | #define SSCR1 (0x04) /* SSP Control Register 1 */ | ||
33 | #define SSSR (0x08) /* SSP Status Register */ | ||
34 | #define SSITR (0x0C) /* SSP Interrupt Test Register */ | ||
35 | #define SSDR (0x10) /* SSP Data Write/Data Read Register */ | ||
36 | |||
37 | #define SSTO (0x28) /* SSP Time Out Register */ | ||
38 | #define SSPSP (0x2C) /* SSP Programmable Serial Protocol */ | ||
39 | #define SSTSA (0x30) /* SSP Tx Timeslot Active */ | ||
40 | #define SSRSA (0x34) /* SSP Rx Timeslot Active */ | ||
41 | #define SSTSS (0x38) /* SSP Timeslot Status */ | ||
42 | #define SSACD (0x3C) /* SSP Audio Clock Divider */ | ||
43 | #define SSACDD (0x40) /* SSP Audio Clock Dither Divider */ | ||
44 | |||
45 | /* Common PXA2xx bits first */ | ||
46 | #define SSCR0_DSS (0x0000000f) /* Data Size Select (mask) */ | ||
47 | #define SSCR0_DataSize(x) ((x) - 1) /* Data Size Select [4..16] */ | ||
48 | #define SSCR0_FRF (0x00000030) /* FRame Format (mask) */ | ||
49 | #define SSCR0_Motorola (0x0 << 4) /* Motorola's Serial Peripheral Interface (SPI) */ | ||
50 | #define SSCR0_TI (0x1 << 4) /* Texas Instruments' Synchronous Serial Protocol (SSP) */ | ||
51 | #define SSCR0_National (0x2 << 4) /* National Microwire */ | ||
52 | #define SSCR0_ECS (1 << 6) /* External clock select */ | ||
53 | #define SSCR0_SSE (1 << 7) /* Synchronous Serial Port Enable */ | ||
54 | #define SSCR0_SCR(x) ((x) << 8) /* Serial Clock Rate (mask) */ | ||
55 | |||
56 | /* PXA27x, PXA3xx */ | ||
57 | #define SSCR0_EDSS (1 << 20) /* Extended data size select */ | ||
58 | #define SSCR0_NCS (1 << 21) /* Network clock select */ | ||
59 | #define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */ | ||
60 | #define SSCR0_TUM (1 << 23) /* Transmit FIFO underrun interrupt mask */ | ||
61 | #define SSCR0_FRDC (0x07000000) /* Frame rate divider control (mask) */ | ||
62 | #define SSCR0_SlotsPerFrm(x) (((x) - 1) << 24) /* Time slots per frame [1..8] */ | ||
63 | #define SSCR0_FPCKE (1 << 29) /* FIFO packing enable */ | ||
64 | #define SSCR0_ACS (1 << 30) /* Audio clock select */ | ||
65 | #define SSCR0_MOD (1 << 31) /* Mode (normal or network) */ | ||
66 | |||
67 | |||
68 | #define SSCR1_RIE (1 << 0) /* Receive FIFO Interrupt Enable */ | ||
69 | #define SSCR1_TIE (1 << 1) /* Transmit FIFO Interrupt Enable */ | ||
70 | #define SSCR1_LBM (1 << 2) /* Loop-Back Mode */ | ||
71 | #define SSCR1_SPO (1 << 3) /* Motorola SPI SSPSCLK polarity setting */ | ||
72 | #define SSCR1_SPH (1 << 4) /* Motorola SPI SSPSCLK phase setting */ | ||
73 | #define SSCR1_MWDS (1 << 5) /* Microwire Transmit Data Size */ | ||
74 | |||
75 | #define SSSR_ALT_FRM_MASK 3 /* Masks the SFRM signal number */ | ||
76 | #define SSSR_TNF (1 << 2) /* Transmit FIFO Not Full */ | ||
77 | #define SSSR_RNE (1 << 3) /* Receive FIFO Not Empty */ | ||
78 | #define SSSR_BSY (1 << 4) /* SSP Busy */ | ||
79 | #define SSSR_TFS (1 << 5) /* Transmit FIFO Service Request */ | ||
80 | #define SSSR_RFS (1 << 6) /* Receive FIFO Service Request */ | ||
81 | #define SSSR_ROR (1 << 7) /* Receive FIFO Overrun */ | ||
82 | |||
83 | #ifdef CONFIG_ARCH_PXA | ||
84 | #define RX_THRESH_DFLT 8 | ||
85 | #define TX_THRESH_DFLT 8 | ||
86 | |||
87 | #define SSSR_TFL_MASK (0xf << 8) /* Transmit FIFO Level mask */ | ||
88 | #define SSSR_RFL_MASK (0xf << 12) /* Receive FIFO Level mask */ | ||
89 | |||
90 | #define SSCR1_TFT (0x000003c0) /* Transmit FIFO Threshold (mask) */ | ||
91 | #define SSCR1_TxTresh(x) (((x) - 1) << 6) /* level [1..16] */ | ||
92 | #define SSCR1_RFT (0x00003c00) /* Receive FIFO Threshold (mask) */ | ||
93 | #define SSCR1_RxTresh(x) (((x) - 1) << 10) /* level [1..16] */ | ||
94 | |||
95 | #else | ||
96 | |||
97 | #define RX_THRESH_DFLT 2 | ||
98 | #define TX_THRESH_DFLT 2 | ||
99 | |||
100 | #define SSSR_TFL_MASK (0x3 << 8) /* Transmit FIFO Level mask */ | ||
101 | #define SSSR_RFL_MASK (0x3 << 12) /* Receive FIFO Level mask */ | ||
102 | |||
103 | #define SSCR1_TFT (0x000000c0) /* Transmit FIFO Threshold (mask) */ | ||
104 | #define SSCR1_TxTresh(x) (((x) - 1) << 6) /* level [1..4] */ | ||
105 | #define SSCR1_RFT (0x00000c00) /* Receive FIFO Threshold (mask) */ | ||
106 | #define SSCR1_RxTresh(x) (((x) - 1) << 10) /* level [1..4] */ | ||
107 | #endif | ||
108 | |||
109 | /* extra bits in PXA255, PXA26x and PXA27x SSP ports */ | ||
110 | #define SSCR0_TISSP (1 << 4) /* TI Sync Serial Protocol */ | ||
111 | #define SSCR0_PSP (3 << 4) /* PSP - Programmable Serial Protocol */ | ||
112 | #define SSCR1_TTELP (1 << 31) /* TXD Tristate Enable Last Phase */ | ||
113 | #define SSCR1_TTE (1 << 30) /* TXD Tristate Enable */ | ||
114 | #define SSCR1_EBCEI (1 << 29) /* Enable Bit Count Error interrupt */ | ||
115 | #define SSCR1_SCFR (1 << 28) /* Slave Clock free Running */ | ||
116 | #define SSCR1_ECRA (1 << 27) /* Enable Clock Request A */ | ||
117 | #define SSCR1_ECRB (1 << 26) /* Enable Clock request B */ | ||
118 | #define SSCR1_SCLKDIR (1 << 25) /* Serial Bit Rate Clock Direction */ | ||
119 | #define SSCR1_SFRMDIR (1 << 24) /* Frame Direction */ | ||
120 | #define SSCR1_RWOT (1 << 23) /* Receive Without Transmit */ | ||
121 | #define SSCR1_TRAIL (1 << 22) /* Trailing Byte */ | ||
122 | #define SSCR1_TSRE (1 << 21) /* Transmit Service Request Enable */ | ||
123 | #define SSCR1_RSRE (1 << 20) /* Receive Service Request Enable */ | ||
124 | #define SSCR1_TINTE (1 << 19) /* Receiver Time-out Interrupt enable */ | ||
125 | #define SSCR1_PINTE (1 << 18) /* Peripheral Trailing Byte Interupt Enable */ | ||
126 | #define SSCR1_IFS (1 << 16) /* Invert Frame Signal */ | ||
127 | #define SSCR1_STRF (1 << 15) /* Select FIFO or EFWR */ | ||
128 | #define SSCR1_EFWR (1 << 14) /* Enable FIFO Write/Read */ | ||
129 | |||
130 | #define SSSR_BCE (1 << 23) /* Bit Count Error */ | ||
131 | #define SSSR_CSS (1 << 22) /* Clock Synchronisation Status */ | ||
132 | #define SSSR_TUR (1 << 21) /* Transmit FIFO Under Run */ | ||
133 | #define SSSR_EOC (1 << 20) /* End Of Chain */ | ||
134 | #define SSSR_TINT (1 << 19) /* Receiver Time-out Interrupt */ | ||
135 | #define SSSR_PINT (1 << 18) /* Peripheral Trailing Byte Interrupt */ | ||
136 | |||
137 | |||
138 | #define SSPSP_SCMODE(x) ((x) << 0) /* Serial Bit Rate Clock Mode */ | ||
139 | #define SSPSP_SFRMP (1 << 2) /* Serial Frame Polarity */ | ||
140 | #define SSPSP_ETDS (1 << 3) /* End of Transfer data State */ | ||
141 | #define SSPSP_STRTDLY(x) ((x) << 4) /* Start Delay */ | ||
142 | #define SSPSP_DMYSTRT(x) ((x) << 7) /* Dummy Start */ | ||
143 | #define SSPSP_SFRMDLY(x) ((x) << 9) /* Serial Frame Delay */ | ||
144 | #define SSPSP_SFRMWDTH(x) ((x) << 16) /* Serial Frame Width */ | ||
145 | #define SSPSP_DMYSTOP(x) ((x) << 23) /* Dummy Stop */ | ||
146 | #define SSPSP_FSRT (1 << 25) /* Frame Sync Relative Timing */ | ||
147 | |||
148 | /* PXA3xx */ | ||
149 | #define SSPSP_EDMYSTRT(x) ((x) << 26) /* Extended Dummy Start */ | ||
150 | #define SSPSP_EDMYSTOP(x) ((x) << 28) /* Extended Dummy Stop */ | ||
151 | #define SSPSP_TIMING_MASK (0x7f8001f0) | ||
152 | |||
153 | #define SSACD_SCDB (1 << 3) /* SSPSYSCLK Divider Bypass */ | ||
154 | #define SSACD_ACPS(x) ((x) << 4) /* Audio clock PLL select */ | ||
155 | #define SSACD_ACDS(x) ((x) << 0) /* Audio clock divider select */ | ||
156 | #define SSACD_SCDX8 (1 << 7) /* SYSCLK division ratio select */ | ||
157 | |||
158 | enum pxa_ssp_type { | ||
159 | SSP_UNDEFINED = 0, | ||
160 | PXA25x_SSP, /* pxa 210, 250, 255, 26x */ | ||
161 | PXA25x_NSSP, /* pxa 255, 26x (including ASSP) */ | ||
162 | PXA27x_SSP, | ||
163 | PXA168_SSP, | ||
164 | CE4100_SSP, | ||
165 | }; | ||
166 | |||
167 | struct ssp_device { | ||
168 | struct platform_device *pdev; | ||
169 | struct list_head node; | ||
170 | |||
171 | struct clk *clk; | ||
172 | void __iomem *mmio_base; | ||
173 | unsigned long phys_base; | ||
174 | |||
175 | const char *label; | ||
176 | int port_id; | ||
177 | int type; | ||
178 | int use_count; | ||
179 | int irq; | ||
180 | int drcmr_rx; | ||
181 | int drcmr_tx; | ||
182 | }; | ||
183 | |||
184 | /** | ||
185 | * pxa_ssp_write_reg - Write to a SSP register | ||
186 | * | ||
187 | * @dev: SSP device to access | ||
188 | * @reg: Register to write to | ||
189 | * @val: Value to be written. | ||
190 | */ | ||
191 | static inline void pxa_ssp_write_reg(struct ssp_device *dev, u32 reg, u32 val) | ||
192 | { | ||
193 | __raw_writel(val, dev->mmio_base + reg); | ||
194 | } | ||
195 | |||
196 | /** | ||
197 | * pxa_ssp_read_reg - Read from a SSP register | ||
198 | * | ||
199 | * @dev: SSP device to access | ||
200 | * @reg: Register to read from | ||
201 | */ | ||
202 | static inline u32 pxa_ssp_read_reg(struct ssp_device *dev, u32 reg) | ||
203 | { | ||
204 | return __raw_readl(dev->mmio_base + reg); | ||
205 | } | ||
206 | |||
207 | struct ssp_device *pxa_ssp_request(int port, const char *label); | ||
208 | void pxa_ssp_free(struct ssp_device *); | ||
209 | #endif | ||
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index d1a9193960f1..223b14cd129c 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
@@ -31,8 +31,9 @@ static inline bool is_quota_modification(struct inode *inode, struct iattr *ia) | |||
31 | #define quota_error(sb, fmt, args...) \ | 31 | #define quota_error(sb, fmt, args...) \ |
32 | __quota_error((sb), __func__, fmt , ## args) | 32 | __quota_error((sb), __func__, fmt , ## args) |
33 | 33 | ||
34 | extern void __quota_error(struct super_block *sb, const char *func, | 34 | extern __attribute__((format (printf, 3, 4))) |
35 | const char *fmt, ...); | 35 | void __quota_error(struct super_block *sb, const char *func, |
36 | const char *fmt, ...); | ||
36 | 37 | ||
37 | /* | 38 | /* |
38 | * declaration of quota_function calls in kernel. | 39 | * declaration of quota_function calls in kernel. |
diff --git a/include/linux/rar_register.h b/include/linux/rar_register.h index ffa805780f85..5c6118189363 100644 --- a/include/linux/rar_register.h +++ b/include/linux/rar_register.h | |||
@@ -34,11 +34,27 @@ | |||
34 | 34 | ||
35 | struct rar_device; | 35 | struct rar_device; |
36 | 36 | ||
37 | #if defined(CONFIG_RAR_REGISTER) | ||
37 | int register_rar(int num, | 38 | int register_rar(int num, |
38 | int (*callback)(unsigned long data), unsigned long data); | 39 | int (*callback)(unsigned long data), unsigned long data); |
39 | void unregister_rar(int num); | 40 | void unregister_rar(int num); |
40 | int rar_get_address(int rar_index, dma_addr_t *start, dma_addr_t *end); | 41 | int rar_get_address(int rar_index, dma_addr_t *start, dma_addr_t *end); |
41 | int rar_lock(int rar_index); | 42 | int rar_lock(int rar_index); |
43 | #else | ||
44 | extern void unregister_rar(int num) { } | ||
45 | extern int rar_lock(int rar_index) { return -EIO; } | ||
46 | |||
47 | extern inline int register_rar(int num, | ||
48 | int (*callback)(unsigned long data), unsigned long data) | ||
49 | { | ||
50 | return -ENODEV; | ||
51 | } | ||
52 | |||
53 | extern int rar_get_address(int rar_index, dma_addr_t *start, dma_addr_t *end) | ||
54 | { | ||
55 | return -ENODEV; | ||
56 | } | ||
57 | #endif /* RAR_REGISTER */ | ||
42 | 58 | ||
43 | #endif /* __KERNEL__ */ | 59 | #endif /* __KERNEL__ */ |
44 | #endif /* _RAR_REGISTER_H */ | 60 | #endif /* _RAR_REGISTER_H */ |
diff --git a/include/linux/rculist.h b/include/linux/rculist.h index f31ef61f1c65..2dea94fc4402 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h | |||
@@ -241,11 +241,6 @@ static inline void list_splice_init_rcu(struct list_head *list, | |||
241 | #define list_first_entry_rcu(ptr, type, member) \ | 241 | #define list_first_entry_rcu(ptr, type, member) \ |
242 | list_entry_rcu((ptr)->next, type, member) | 242 | list_entry_rcu((ptr)->next, type, member) |
243 | 243 | ||
244 | #define __list_for_each_rcu(pos, head) \ | ||
245 | for (pos = rcu_dereference_raw(list_next_rcu(head)); \ | ||
246 | pos != (head); \ | ||
247 | pos = rcu_dereference_raw(list_next_rcu((pos))) | ||
248 | |||
249 | /** | 244 | /** |
250 | * list_for_each_entry_rcu - iterate over rcu list of given type | 245 | * list_for_each_entry_rcu - iterate over rcu list of given type |
251 | * @pos: the type * to use as a loop cursor. | 246 | * @pos: the type * to use as a loop cursor. |
diff --git a/include/linux/rculist_bl.h b/include/linux/rculist_bl.h new file mode 100644 index 000000000000..b872b493724d --- /dev/null +++ b/include/linux/rculist_bl.h | |||
@@ -0,0 +1,127 @@ | |||
1 | #ifndef _LINUX_RCULIST_BL_H | ||
2 | #define _LINUX_RCULIST_BL_H | ||
3 | |||
4 | /* | ||
5 | * RCU-protected bl list version. See include/linux/list_bl.h. | ||
6 | */ | ||
7 | #include <linux/list_bl.h> | ||
8 | #include <linux/rcupdate.h> | ||
9 | |||
10 | static inline void hlist_bl_set_first_rcu(struct hlist_bl_head *h, | ||
11 | struct hlist_bl_node *n) | ||
12 | { | ||
13 | LIST_BL_BUG_ON((unsigned long)n & LIST_BL_LOCKMASK); | ||
14 | LIST_BL_BUG_ON(!((unsigned long)h->first & LIST_BL_LOCKMASK)); | ||
15 | rcu_assign_pointer(h->first, | ||
16 | (struct hlist_bl_node *)((unsigned long)n | LIST_BL_LOCKMASK)); | ||
17 | } | ||
18 | |||
19 | static inline struct hlist_bl_node *hlist_bl_first_rcu(struct hlist_bl_head *h) | ||
20 | { | ||
21 | return (struct hlist_bl_node *) | ||
22 | ((unsigned long)rcu_dereference(h->first) & ~LIST_BL_LOCKMASK); | ||
23 | } | ||
24 | |||
25 | /** | ||
26 | * hlist_bl_del_init_rcu - deletes entry from hash list with re-initialization | ||
27 | * @n: the element to delete from the hash list. | ||
28 | * | ||
29 | * Note: hlist_bl_unhashed() on the node returns true after this. It is | ||
30 | * useful for RCU based read lockfree traversal if the writer side | ||
31 | * must know if the list entry is still hashed or already unhashed. | ||
32 | * | ||
33 | * In particular, it means that we can not poison the forward pointers | ||
34 | * that may still be used for walking the hash list and we can only | ||
35 | * zero the pprev pointer so list_unhashed() will return true after | ||
36 | * this. | ||
37 | * | ||
38 | * The caller must take whatever precautions are necessary (such as | ||
39 | * holding appropriate locks) to avoid racing with another | ||
40 | * list-mutation primitive, such as hlist_bl_add_head_rcu() or | ||
41 | * hlist_bl_del_rcu(), running on this same list. However, it is | ||
42 | * perfectly legal to run concurrently with the _rcu list-traversal | ||
43 | * primitives, such as hlist_bl_for_each_entry_rcu(). | ||
44 | */ | ||
45 | static inline void hlist_bl_del_init_rcu(struct hlist_bl_node *n) | ||
46 | { | ||
47 | if (!hlist_bl_unhashed(n)) { | ||
48 | __hlist_bl_del(n); | ||
49 | n->pprev = NULL; | ||
50 | } | ||
51 | } | ||
52 | |||
53 | /** | ||
54 | * hlist_bl_del_rcu - deletes entry from hash list without re-initialization | ||
55 | * @n: the element to delete from the hash list. | ||
56 | * | ||
57 | * Note: hlist_bl_unhashed() on entry does not return true after this, | ||
58 | * the entry is in an undefined state. It is useful for RCU based | ||
59 | * lockfree traversal. | ||
60 | * | ||
61 | * In particular, it means that we can not poison the forward | ||
62 | * pointers that may still be used for walking the hash list. | ||
63 | * | ||
64 | * The caller must take whatever precautions are necessary | ||
65 | * (such as holding appropriate locks) to avoid racing | ||
66 | * with another list-mutation primitive, such as hlist_bl_add_head_rcu() | ||
67 | * or hlist_bl_del_rcu(), running on this same list. | ||
68 | * However, it is perfectly legal to run concurrently with | ||
69 | * the _rcu list-traversal primitives, such as | ||
70 | * hlist_bl_for_each_entry(). | ||
71 | */ | ||
72 | static inline void hlist_bl_del_rcu(struct hlist_bl_node *n) | ||
73 | { | ||
74 | __hlist_bl_del(n); | ||
75 | n->pprev = LIST_POISON2; | ||
76 | } | ||
77 | |||
78 | /** | ||
79 | * hlist_bl_add_head_rcu | ||
80 | * @n: the element to add to the hash list. | ||
81 | * @h: the list to add to. | ||
82 | * | ||
83 | * Description: | ||
84 | * Adds the specified element to the specified hlist_bl, | ||
85 | * while permitting racing traversals. | ||
86 | * | ||
87 | * The caller must take whatever precautions are necessary | ||
88 | * (such as holding appropriate locks) to avoid racing | ||
89 | * with another list-mutation primitive, such as hlist_bl_add_head_rcu() | ||
90 | * or hlist_bl_del_rcu(), running on this same list. | ||
91 | * However, it is perfectly legal to run concurrently with | ||
92 | * the _rcu list-traversal primitives, such as | ||
93 | * hlist_bl_for_each_entry_rcu(), used to prevent memory-consistency | ||
94 | * problems on Alpha CPUs. Regardless of the type of CPU, the | ||
95 | * list-traversal primitive must be guarded by rcu_read_lock(). | ||
96 | */ | ||
97 | static inline void hlist_bl_add_head_rcu(struct hlist_bl_node *n, | ||
98 | struct hlist_bl_head *h) | ||
99 | { | ||
100 | struct hlist_bl_node *first; | ||
101 | |||
102 | /* don't need hlist_bl_first_rcu because we're under lock */ | ||
103 | first = hlist_bl_first(h); | ||
104 | |||
105 | n->next = first; | ||
106 | if (first) | ||
107 | first->pprev = &n->next; | ||
108 | n->pprev = &h->first; | ||
109 | |||
110 | /* need _rcu because we can have concurrent lock free readers */ | ||
111 | hlist_bl_set_first_rcu(h, n); | ||
112 | } | ||
113 | /** | ||
114 | * hlist_bl_for_each_entry_rcu - iterate over rcu list of given type | ||
115 | * @tpos: the type * to use as a loop cursor. | ||
116 | * @pos: the &struct hlist_bl_node to use as a loop cursor. | ||
117 | * @head: the head for your list. | ||
118 | * @member: the name of the hlist_bl_node within the struct. | ||
119 | * | ||
120 | */ | ||
121 | #define hlist_bl_for_each_entry_rcu(tpos, pos, head, member) \ | ||
122 | for (pos = hlist_bl_first_rcu(head); \ | ||
123 | pos && \ | ||
124 | ({ tpos = hlist_bl_entry(pos, typeof(*tpos), member); 1; }); \ | ||
125 | pos = rcu_dereference_raw(pos->next)) | ||
126 | |||
127 | #endif | ||
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 03cda7bed985..af5614856285 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -47,6 +47,8 @@ | |||
47 | extern int rcutorture_runnable; /* for sysctl */ | 47 | extern int rcutorture_runnable; /* for sysctl */ |
48 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ | 48 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ |
49 | 49 | ||
50 | #define UINT_CMP_GE(a, b) (UINT_MAX / 2 >= (a) - (b)) | ||
51 | #define UINT_CMP_LT(a, b) (UINT_MAX / 2 < (a) - (b)) | ||
50 | #define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b)) | 52 | #define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b)) |
51 | #define ULONG_CMP_LT(a, b) (ULONG_MAX / 2 < (a) - (b)) | 53 | #define ULONG_CMP_LT(a, b) (ULONG_MAX / 2 < (a) - (b)) |
52 | 54 | ||
@@ -66,7 +68,6 @@ extern void call_rcu_sched(struct rcu_head *head, | |||
66 | extern void synchronize_sched(void); | 68 | extern void synchronize_sched(void); |
67 | extern void rcu_barrier_bh(void); | 69 | extern void rcu_barrier_bh(void); |
68 | extern void rcu_barrier_sched(void); | 70 | extern void rcu_barrier_sched(void); |
69 | extern void synchronize_sched_expedited(void); | ||
70 | extern int sched_expedited_torture_stats(char *page); | 71 | extern int sched_expedited_torture_stats(char *page); |
71 | 72 | ||
72 | static inline void __rcu_read_lock_bh(void) | 73 | static inline void __rcu_read_lock_bh(void) |
@@ -118,7 +119,6 @@ static inline int rcu_preempt_depth(void) | |||
118 | #endif /* #else #ifdef CONFIG_PREEMPT_RCU */ | 119 | #endif /* #else #ifdef CONFIG_PREEMPT_RCU */ |
119 | 120 | ||
120 | /* Internal to kernel */ | 121 | /* Internal to kernel */ |
121 | extern void rcu_init(void); | ||
122 | extern void rcu_sched_qs(int cpu); | 122 | extern void rcu_sched_qs(int cpu); |
123 | extern void rcu_bh_qs(int cpu); | 123 | extern void rcu_bh_qs(int cpu); |
124 | extern void rcu_check_callbacks(int cpu, int user); | 124 | extern void rcu_check_callbacks(int cpu, int user); |
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index 13877cb93a60..30ebd7c8d874 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h | |||
@@ -27,7 +27,9 @@ | |||
27 | 27 | ||
28 | #include <linux/cache.h> | 28 | #include <linux/cache.h> |
29 | 29 | ||
30 | #define rcu_init_sched() do { } while (0) | 30 | static inline void rcu_init(void) |
31 | { | ||
32 | } | ||
31 | 33 | ||
32 | #ifdef CONFIG_TINY_RCU | 34 | #ifdef CONFIG_TINY_RCU |
33 | 35 | ||
@@ -58,6 +60,11 @@ static inline void synchronize_rcu_bh_expedited(void) | |||
58 | synchronize_sched(); | 60 | synchronize_sched(); |
59 | } | 61 | } |
60 | 62 | ||
63 | static inline void synchronize_sched_expedited(void) | ||
64 | { | ||
65 | synchronize_sched(); | ||
66 | } | ||
67 | |||
61 | #ifdef CONFIG_TINY_RCU | 68 | #ifdef CONFIG_TINY_RCU |
62 | 69 | ||
63 | static inline void rcu_preempt_note_context_switch(void) | 70 | static inline void rcu_preempt_note_context_switch(void) |
@@ -125,16 +132,12 @@ static inline void rcu_cpu_stall_reset(void) | |||
125 | } | 132 | } |
126 | 133 | ||
127 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 134 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
128 | |||
129 | extern int rcu_scheduler_active __read_mostly; | 135 | extern int rcu_scheduler_active __read_mostly; |
130 | extern void rcu_scheduler_starting(void); | 136 | extern void rcu_scheduler_starting(void); |
131 | |||
132 | #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | 137 | #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ |
133 | |||
134 | static inline void rcu_scheduler_starting(void) | 138 | static inline void rcu_scheduler_starting(void) |
135 | { | 139 | { |
136 | } | 140 | } |
137 | |||
138 | #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | 141 | #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ |
139 | 142 | ||
140 | #endif /* __LINUX_RCUTINY_H */ | 143 | #endif /* __LINUX_RCUTINY_H */ |
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 95518e628794..3a933482734a 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #ifndef __LINUX_RCUTREE_H | 30 | #ifndef __LINUX_RCUTREE_H |
31 | #define __LINUX_RCUTREE_H | 31 | #define __LINUX_RCUTREE_H |
32 | 32 | ||
33 | extern void rcu_init(void); | ||
33 | extern void rcu_note_context_switch(int cpu); | 34 | extern void rcu_note_context_switch(int cpu); |
34 | extern int rcu_needs_cpu(int cpu); | 35 | extern int rcu_needs_cpu(int cpu); |
35 | extern void rcu_cpu_stall_reset(void); | 36 | extern void rcu_cpu_stall_reset(void); |
@@ -47,6 +48,7 @@ static inline void exit_rcu(void) | |||
47 | #endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */ | 48 | #endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */ |
48 | 49 | ||
49 | extern void synchronize_rcu_bh(void); | 50 | extern void synchronize_rcu_bh(void); |
51 | extern void synchronize_sched_expedited(void); | ||
50 | extern void synchronize_rcu_expedited(void); | 52 | extern void synchronize_rcu_expedited(void); |
51 | 53 | ||
52 | static inline void synchronize_rcu_bh_expedited(void) | 54 | static inline void synchronize_rcu_bh_expedited(void) |
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index b2cf2089769b..3b94c91f20a6 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h | |||
@@ -41,7 +41,7 @@ int reiserfs_xattr_init(struct super_block *sb, int mount_flags); | |||
41 | int reiserfs_lookup_privroot(struct super_block *sb); | 41 | int reiserfs_lookup_privroot(struct super_block *sb); |
42 | int reiserfs_delete_xattrs(struct inode *inode); | 42 | int reiserfs_delete_xattrs(struct inode *inode); |
43 | int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs); | 43 | int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs); |
44 | int reiserfs_permission(struct inode *inode, int mask); | 44 | int reiserfs_permission(struct inode *inode, int mask, unsigned int flags); |
45 | 45 | ||
46 | #ifdef CONFIG_REISERFS_FS_XATTR | 46 | #ifdef CONFIG_REISERFS_FS_XATTR |
47 | #define has_xattr_dir(inode) (REISERFS_I(inode)->i_flags & i_has_xattr_dir) | 47 | #define has_xattr_dir(inode) (REISERFS_I(inode)->i_flags & i_has_xattr_dir) |
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index 08c32e4f261a..c6c608482cba 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h | |||
@@ -354,37 +354,6 @@ static inline bool rfkill_blocked(struct rfkill *rfkill) | |||
354 | } | 354 | } |
355 | #endif /* RFKILL || RFKILL_MODULE */ | 355 | #endif /* RFKILL || RFKILL_MODULE */ |
356 | 356 | ||
357 | |||
358 | #ifdef CONFIG_RFKILL_LEDS | ||
359 | /** | ||
360 | * rfkill_get_led_trigger_name - Get the LED trigger name for the button's LED. | ||
361 | * This function might return a NULL pointer if registering of the | ||
362 | * LED trigger failed. Use this as "default_trigger" for the LED. | ||
363 | */ | ||
364 | const char *rfkill_get_led_trigger_name(struct rfkill *rfkill); | ||
365 | |||
366 | /** | ||
367 | * rfkill_set_led_trigger_name -- set the LED trigger name | ||
368 | * @rfkill: rfkill struct | ||
369 | * @name: LED trigger name | ||
370 | * | ||
371 | * This function sets the LED trigger name of the radio LED | ||
372 | * trigger that rfkill creates. It is optional, but if called | ||
373 | * must be called before rfkill_register() to be effective. | ||
374 | */ | ||
375 | void rfkill_set_led_trigger_name(struct rfkill *rfkill, const char *name); | ||
376 | #else | ||
377 | static inline const char *rfkill_get_led_trigger_name(struct rfkill *rfkill) | ||
378 | { | ||
379 | return NULL; | ||
380 | } | ||
381 | |||
382 | static inline void | ||
383 | rfkill_set_led_trigger_name(struct rfkill *rfkill, const char *name) | ||
384 | { | ||
385 | } | ||
386 | #endif | ||
387 | |||
388 | #endif /* __KERNEL__ */ | 357 | #endif /* __KERNEL__ */ |
389 | 358 | ||
390 | #endif /* RFKILL_H */ | 359 | #endif /* RFKILL_H */ |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 14dbc83ded20..3c995b4d742c 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -107,12 +107,17 @@ extern int rtc_year_days(unsigned int day, unsigned int month, unsigned int year | |||
107 | extern int rtc_valid_tm(struct rtc_time *tm); | 107 | extern int rtc_valid_tm(struct rtc_time *tm); |
108 | extern int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time); | 108 | extern int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time); |
109 | extern void rtc_time_to_tm(unsigned long time, struct rtc_time *tm); | 109 | extern void rtc_time_to_tm(unsigned long time, struct rtc_time *tm); |
110 | ktime_t rtc_tm_to_ktime(struct rtc_time tm); | ||
111 | struct rtc_time rtc_ktime_to_tm(ktime_t kt); | ||
112 | |||
110 | 113 | ||
111 | #include <linux/device.h> | 114 | #include <linux/device.h> |
112 | #include <linux/seq_file.h> | 115 | #include <linux/seq_file.h> |
113 | #include <linux/cdev.h> | 116 | #include <linux/cdev.h> |
114 | #include <linux/poll.h> | 117 | #include <linux/poll.h> |
115 | #include <linux/mutex.h> | 118 | #include <linux/mutex.h> |
119 | #include <linux/timerqueue.h> | ||
120 | #include <linux/workqueue.h> | ||
116 | 121 | ||
117 | extern struct class *rtc_class; | 122 | extern struct class *rtc_class; |
118 | 123 | ||
@@ -151,7 +156,19 @@ struct rtc_class_ops { | |||
151 | }; | 156 | }; |
152 | 157 | ||
153 | #define RTC_DEVICE_NAME_SIZE 20 | 158 | #define RTC_DEVICE_NAME_SIZE 20 |
154 | struct rtc_task; | 159 | typedef struct rtc_task { |
160 | void (*func)(void *private_data); | ||
161 | void *private_data; | ||
162 | } rtc_task_t; | ||
163 | |||
164 | |||
165 | struct rtc_timer { | ||
166 | struct rtc_task task; | ||
167 | struct timerqueue_node node; | ||
168 | ktime_t period; | ||
169 | int enabled; | ||
170 | }; | ||
171 | |||
155 | 172 | ||
156 | /* flags */ | 173 | /* flags */ |
157 | #define RTC_DEV_BUSY 0 | 174 | #define RTC_DEV_BUSY 0 |
@@ -179,16 +196,13 @@ struct rtc_device | |||
179 | spinlock_t irq_task_lock; | 196 | spinlock_t irq_task_lock; |
180 | int irq_freq; | 197 | int irq_freq; |
181 | int max_user_freq; | 198 | int max_user_freq; |
182 | #ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL | 199 | |
183 | struct work_struct uie_task; | 200 | struct timerqueue_head timerqueue; |
184 | struct timer_list uie_timer; | 201 | struct rtc_timer aie_timer; |
185 | /* Those fields are protected by rtc->irq_lock */ | 202 | struct rtc_timer uie_rtctimer; |
186 | unsigned int oldsecs; | 203 | struct hrtimer pie_timer; /* sub second exp, so needs hrtimer */ |
187 | unsigned int uie_irq_active:1; | 204 | int pie_enabled; |
188 | unsigned int stop_uie_polling:1; | 205 | struct work_struct irqwork; |
189 | unsigned int uie_task_active:1; | ||
190 | unsigned int uie_timer_active:1; | ||
191 | #endif | ||
192 | }; | 206 | }; |
193 | #define to_rtc_device(d) container_of(d, struct rtc_device, dev) | 207 | #define to_rtc_device(d) container_of(d, struct rtc_device, dev) |
194 | 208 | ||
@@ -224,15 +238,22 @@ extern int rtc_alarm_irq_enable(struct rtc_device *rtc, unsigned int enabled); | |||
224 | extern int rtc_dev_update_irq_enable_emul(struct rtc_device *rtc, | 238 | extern int rtc_dev_update_irq_enable_emul(struct rtc_device *rtc, |
225 | unsigned int enabled); | 239 | unsigned int enabled); |
226 | 240 | ||
227 | typedef struct rtc_task { | 241 | void rtc_aie_update_irq(void *private); |
228 | void (*func)(void *private_data); | 242 | void rtc_uie_update_irq(void *private); |
229 | void *private_data; | 243 | enum hrtimer_restart rtc_pie_update_irq(struct hrtimer *timer); |
230 | } rtc_task_t; | ||
231 | 244 | ||
232 | int rtc_register(rtc_task_t *task); | 245 | int rtc_register(rtc_task_t *task); |
233 | int rtc_unregister(rtc_task_t *task); | 246 | int rtc_unregister(rtc_task_t *task); |
234 | int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); | 247 | int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); |
235 | 248 | ||
249 | void rtc_timer_enqueue(struct rtc_device *rtc, struct rtc_timer *timer); | ||
250 | void rtc_timer_remove(struct rtc_device *rtc, struct rtc_timer *timer); | ||
251 | void rtc_timer_init(struct rtc_timer *timer, void (*f)(void* p), void* data); | ||
252 | int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer* timer, | ||
253 | ktime_t expires, ktime_t period); | ||
254 | int rtc_timer_cancel(struct rtc_device *rtc, struct rtc_timer* timer); | ||
255 | void rtc_timer_do_work(struct work_struct *work); | ||
256 | |||
236 | static inline bool is_leap_year(unsigned int year) | 257 | static inline bool is_leap_year(unsigned int year) |
237 | { | 258 | { |
238 | return (!(year % 4) && (year % 100)) || !(year % 400); | 259 | return (!(year % 4) && (year % 100)) || !(year % 400); |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 223874538b33..abc527aa8550 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -70,7 +70,6 @@ struct sched_param { | |||
70 | #include <linux/smp.h> | 70 | #include <linux/smp.h> |
71 | #include <linux/sem.h> | 71 | #include <linux/sem.h> |
72 | #include <linux/signal.h> | 72 | #include <linux/signal.h> |
73 | #include <linux/path.h> | ||
74 | #include <linux/compiler.h> | 73 | #include <linux/compiler.h> |
75 | #include <linux/completion.h> | 74 | #include <linux/completion.h> |
76 | #include <linux/pid.h> | 75 | #include <linux/pid.h> |
@@ -88,7 +87,6 @@ struct sched_param { | |||
88 | #include <linux/timer.h> | 87 | #include <linux/timer.h> |
89 | #include <linux/hrtimer.h> | 88 | #include <linux/hrtimer.h> |
90 | #include <linux/task_io_accounting.h> | 89 | #include <linux/task_io_accounting.h> |
91 | #include <linux/kobject.h> | ||
92 | #include <linux/latencytop.h> | 90 | #include <linux/latencytop.h> |
93 | #include <linux/cred.h> | 91 | #include <linux/cred.h> |
94 | 92 | ||
@@ -316,6 +314,7 @@ extern int proc_dowatchdog_thresh(struct ctl_table *table, int write, | |||
316 | size_t *lenp, loff_t *ppos); | 314 | size_t *lenp, loff_t *ppos); |
317 | extern unsigned int softlockup_panic; | 315 | extern unsigned int softlockup_panic; |
318 | extern int softlockup_thresh; | 316 | extern int softlockup_thresh; |
317 | void lockup_detector_init(void); | ||
319 | #else | 318 | #else |
320 | static inline void touch_softlockup_watchdog(void) | 319 | static inline void touch_softlockup_watchdog(void) |
321 | { | 320 | { |
@@ -326,6 +325,9 @@ static inline void touch_softlockup_watchdog_sync(void) | |||
326 | static inline void touch_all_softlockup_watchdogs(void) | 325 | static inline void touch_all_softlockup_watchdogs(void) |
327 | { | 326 | { |
328 | } | 327 | } |
328 | static inline void lockup_detector_init(void) | ||
329 | { | ||
330 | } | ||
329 | #endif | 331 | #endif |
330 | 332 | ||
331 | #ifdef CONFIG_DETECT_HUNG_TASK | 333 | #ifdef CONFIG_DETECT_HUNG_TASK |
@@ -509,6 +511,8 @@ struct thread_group_cputimer { | |||
509 | spinlock_t lock; | 511 | spinlock_t lock; |
510 | }; | 512 | }; |
511 | 513 | ||
514 | struct autogroup; | ||
515 | |||
512 | /* | 516 | /* |
513 | * NOTE! "signal_struct" does not have it's own | 517 | * NOTE! "signal_struct" does not have it's own |
514 | * locking, because a shared signal_struct always | 518 | * locking, because a shared signal_struct always |
@@ -576,6 +580,9 @@ struct signal_struct { | |||
576 | 580 | ||
577 | struct tty_struct *tty; /* NULL if no tty */ | 581 | struct tty_struct *tty; /* NULL if no tty */ |
578 | 582 | ||
583 | #ifdef CONFIG_SCHED_AUTOGROUP | ||
584 | struct autogroup *autogroup; | ||
585 | #endif | ||
579 | /* | 586 | /* |
580 | * Cumulative resource counters for dead threads in the group, | 587 | * Cumulative resource counters for dead threads in the group, |
581 | * and for reaped dead child processes forked by this group. | 588 | * and for reaped dead child processes forked by this group. |
@@ -1229,13 +1236,18 @@ struct task_struct { | |||
1229 | #ifdef CONFIG_TREE_PREEMPT_RCU | 1236 | #ifdef CONFIG_TREE_PREEMPT_RCU |
1230 | struct rcu_node *rcu_blocked_node; | 1237 | struct rcu_node *rcu_blocked_node; |
1231 | #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ | 1238 | #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ |
1239 | #ifdef CONFIG_RCU_BOOST | ||
1240 | struct rt_mutex *rcu_boost_mutex; | ||
1241 | #endif /* #ifdef CONFIG_RCU_BOOST */ | ||
1232 | 1242 | ||
1233 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) | 1243 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) |
1234 | struct sched_info sched_info; | 1244 | struct sched_info sched_info; |
1235 | #endif | 1245 | #endif |
1236 | 1246 | ||
1237 | struct list_head tasks; | 1247 | struct list_head tasks; |
1248 | #ifdef CONFIG_SMP | ||
1238 | struct plist_node pushable_tasks; | 1249 | struct plist_node pushable_tasks; |
1250 | #endif | ||
1239 | 1251 | ||
1240 | struct mm_struct *mm, *active_mm; | 1252 | struct mm_struct *mm, *active_mm; |
1241 | #if defined(SPLIT_RSS_COUNTING) | 1253 | #if defined(SPLIT_RSS_COUNTING) |
@@ -1759,7 +1771,8 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t * | |||
1759 | #ifdef CONFIG_PREEMPT_RCU | 1771 | #ifdef CONFIG_PREEMPT_RCU |
1760 | 1772 | ||
1761 | #define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */ | 1773 | #define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */ |
1762 | #define RCU_READ_UNLOCK_NEED_QS (1 << 1) /* RCU core needs CPU response. */ | 1774 | #define RCU_READ_UNLOCK_BOOSTED (1 << 1) /* boosted while in RCU read-side. */ |
1775 | #define RCU_READ_UNLOCK_NEED_QS (1 << 2) /* RCU core needs CPU response. */ | ||
1763 | 1776 | ||
1764 | static inline void rcu_copy_process(struct task_struct *p) | 1777 | static inline void rcu_copy_process(struct task_struct *p) |
1765 | { | 1778 | { |
@@ -1767,7 +1780,10 @@ static inline void rcu_copy_process(struct task_struct *p) | |||
1767 | p->rcu_read_unlock_special = 0; | 1780 | p->rcu_read_unlock_special = 0; |
1768 | #ifdef CONFIG_TREE_PREEMPT_RCU | 1781 | #ifdef CONFIG_TREE_PREEMPT_RCU |
1769 | p->rcu_blocked_node = NULL; | 1782 | p->rcu_blocked_node = NULL; |
1770 | #endif | 1783 | #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ |
1784 | #ifdef CONFIG_RCU_BOOST | ||
1785 | p->rcu_boost_mutex = NULL; | ||
1786 | #endif /* #ifdef CONFIG_RCU_BOOST */ | ||
1771 | INIT_LIST_HEAD(&p->rcu_node_entry); | 1787 | INIT_LIST_HEAD(&p->rcu_node_entry); |
1772 | } | 1788 | } |
1773 | 1789 | ||
@@ -1872,14 +1888,11 @@ extern void sched_clock_idle_sleep_event(void); | |||
1872 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); | 1888 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); |
1873 | 1889 | ||
1874 | #ifdef CONFIG_HOTPLUG_CPU | 1890 | #ifdef CONFIG_HOTPLUG_CPU |
1875 | extern void move_task_off_dead_cpu(int dead_cpu, struct task_struct *p); | ||
1876 | extern void idle_task_exit(void); | 1891 | extern void idle_task_exit(void); |
1877 | #else | 1892 | #else |
1878 | static inline void idle_task_exit(void) {} | 1893 | static inline void idle_task_exit(void) {} |
1879 | #endif | 1894 | #endif |
1880 | 1895 | ||
1881 | extern void sched_idle_next(void); | ||
1882 | |||
1883 | #if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP) | 1896 | #if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP) |
1884 | extern void wake_up_idle_cpu(int cpu); | 1897 | extern void wake_up_idle_cpu(int cpu); |
1885 | #else | 1898 | #else |
@@ -1889,8 +1902,6 @@ static inline void wake_up_idle_cpu(int cpu) { } | |||
1889 | extern unsigned int sysctl_sched_latency; | 1902 | extern unsigned int sysctl_sched_latency; |
1890 | extern unsigned int sysctl_sched_min_granularity; | 1903 | extern unsigned int sysctl_sched_min_granularity; |
1891 | extern unsigned int sysctl_sched_wakeup_granularity; | 1904 | extern unsigned int sysctl_sched_wakeup_granularity; |
1892 | extern unsigned int sysctl_sched_shares_ratelimit; | ||
1893 | extern unsigned int sysctl_sched_shares_thresh; | ||
1894 | extern unsigned int sysctl_sched_child_runs_first; | 1905 | extern unsigned int sysctl_sched_child_runs_first; |
1895 | 1906 | ||
1896 | enum sched_tunable_scaling { | 1907 | enum sched_tunable_scaling { |
@@ -1906,6 +1917,7 @@ extern unsigned int sysctl_sched_migration_cost; | |||
1906 | extern unsigned int sysctl_sched_nr_migrate; | 1917 | extern unsigned int sysctl_sched_nr_migrate; |
1907 | extern unsigned int sysctl_sched_time_avg; | 1918 | extern unsigned int sysctl_sched_time_avg; |
1908 | extern unsigned int sysctl_timer_migration; | 1919 | extern unsigned int sysctl_timer_migration; |
1920 | extern unsigned int sysctl_sched_shares_window; | ||
1909 | 1921 | ||
1910 | int sched_proc_update_handler(struct ctl_table *table, int write, | 1922 | int sched_proc_update_handler(struct ctl_table *table, int write, |
1911 | void __user *buffer, size_t *length, | 1923 | void __user *buffer, size_t *length, |
@@ -1931,6 +1943,24 @@ int sched_rt_handler(struct ctl_table *table, int write, | |||
1931 | 1943 | ||
1932 | extern unsigned int sysctl_sched_compat_yield; | 1944 | extern unsigned int sysctl_sched_compat_yield; |
1933 | 1945 | ||
1946 | #ifdef CONFIG_SCHED_AUTOGROUP | ||
1947 | extern unsigned int sysctl_sched_autogroup_enabled; | ||
1948 | |||
1949 | extern void sched_autogroup_create_attach(struct task_struct *p); | ||
1950 | extern void sched_autogroup_detach(struct task_struct *p); | ||
1951 | extern void sched_autogroup_fork(struct signal_struct *sig); | ||
1952 | extern void sched_autogroup_exit(struct signal_struct *sig); | ||
1953 | #ifdef CONFIG_PROC_FS | ||
1954 | extern void proc_sched_autogroup_show_task(struct task_struct *p, struct seq_file *m); | ||
1955 | extern int proc_sched_autogroup_set_nice(struct task_struct *p, int *nice); | ||
1956 | #endif | ||
1957 | #else | ||
1958 | static inline void sched_autogroup_create_attach(struct task_struct *p) { } | ||
1959 | static inline void sched_autogroup_detach(struct task_struct *p) { } | ||
1960 | static inline void sched_autogroup_fork(struct signal_struct *sig) { } | ||
1961 | static inline void sched_autogroup_exit(struct signal_struct *sig) { } | ||
1962 | #endif | ||
1963 | |||
1934 | #ifdef CONFIG_RT_MUTEXES | 1964 | #ifdef CONFIG_RT_MUTEXES |
1935 | extern int rt_mutex_getprio(struct task_struct *p); | 1965 | extern int rt_mutex_getprio(struct task_struct *p); |
1936 | extern void rt_mutex_setprio(struct task_struct *p, int prio); | 1966 | extern void rt_mutex_setprio(struct task_struct *p, int prio); |
@@ -1949,9 +1979,10 @@ extern int task_nice(const struct task_struct *p); | |||
1949 | extern int can_nice(const struct task_struct *p, const int nice); | 1979 | extern int can_nice(const struct task_struct *p, const int nice); |
1950 | extern int task_curr(const struct task_struct *p); | 1980 | extern int task_curr(const struct task_struct *p); |
1951 | extern int idle_cpu(int cpu); | 1981 | extern int idle_cpu(int cpu); |
1952 | extern int sched_setscheduler(struct task_struct *, int, struct sched_param *); | 1982 | extern int sched_setscheduler(struct task_struct *, int, |
1983 | const struct sched_param *); | ||
1953 | extern int sched_setscheduler_nocheck(struct task_struct *, int, | 1984 | extern int sched_setscheduler_nocheck(struct task_struct *, int, |
1954 | struct sched_param *); | 1985 | const struct sched_param *); |
1955 | extern struct task_struct *idle_task(int cpu); | 1986 | extern struct task_struct *idle_task(int cpu); |
1956 | extern struct task_struct *curr_task(int cpu); | 1987 | extern struct task_struct *curr_task(int cpu); |
1957 | extern void set_curr_task(int cpu, struct task_struct *p); | 1988 | extern void set_curr_task(int cpu, struct task_struct *p); |
@@ -2478,7 +2509,7 @@ extern void normalize_rt_tasks(void); | |||
2478 | 2509 | ||
2479 | #ifdef CONFIG_CGROUP_SCHED | 2510 | #ifdef CONFIG_CGROUP_SCHED |
2480 | 2511 | ||
2481 | extern struct task_group init_task_group; | 2512 | extern struct task_group root_task_group; |
2482 | 2513 | ||
2483 | extern struct task_group *sched_create_group(struct task_group *parent); | 2514 | extern struct task_group *sched_create_group(struct task_group *parent); |
2484 | extern void sched_destroy_group(struct task_group *tg); | 2515 | extern void sched_destroy_group(struct task_group *tg); |
diff --git a/include/linux/security.h b/include/linux/security.h index fd4d55fb8845..c642bb8b8f5a 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -457,7 +457,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
457 | * called when the actual read/write operations are performed. | 457 | * called when the actual read/write operations are performed. |
458 | * @inode contains the inode structure to check. | 458 | * @inode contains the inode structure to check. |
459 | * @mask contains the permission mask. | 459 | * @mask contains the permission mask. |
460 | * @nd contains the nameidata (may be NULL). | ||
461 | * Return 0 if permission is granted. | 460 | * Return 0 if permission is granted. |
462 | * @inode_setattr: | 461 | * @inode_setattr: |
463 | * Check permission before setting file attributes. Note that the kernel | 462 | * Check permission before setting file attributes. Note that the kernel |
@@ -796,8 +795,9 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
796 | * @unix_stream_connect: | 795 | * @unix_stream_connect: |
797 | * Check permissions before establishing a Unix domain stream connection | 796 | * Check permissions before establishing a Unix domain stream connection |
798 | * between @sock and @other. | 797 | * between @sock and @other. |
799 | * @sock contains the socket structure. | 798 | * @sock contains the sock structure. |
800 | * @other contains the peer socket structure. | 799 | * @other contains the peer sock structure. |
800 | * @newsk contains the new sock structure. | ||
801 | * Return 0 if permission is granted. | 801 | * Return 0 if permission is granted. |
802 | * @unix_may_send: | 802 | * @unix_may_send: |
803 | * Check permissions before connecting or sending datagrams from @sock to | 803 | * Check permissions before connecting or sending datagrams from @sock to |
@@ -1058,8 +1058,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
1058 | * @cred points to the credentials to provide the context against which to | 1058 | * @cred points to the credentials to provide the context against which to |
1059 | * evaluate the security data on the key. | 1059 | * evaluate the security data on the key. |
1060 | * @perm describes the combination of permissions required of this key. | 1060 | * @perm describes the combination of permissions required of this key. |
1061 | * Return 1 if permission granted, 0 if permission denied and -ve it the | 1061 | * Return 0 if permission is granted, -ve error otherwise. |
1062 | * normal permissions model should be effected. | ||
1063 | * @key_getsecurity: | 1062 | * @key_getsecurity: |
1064 | * Get a textual representation of the security context attached to a key | 1063 | * Get a textual representation of the security context attached to a key |
1065 | * for the purposes of honouring KEYCTL_GETSECURITY. This function | 1064 | * for the purposes of honouring KEYCTL_GETSECURITY. This function |
@@ -1568,8 +1567,7 @@ struct security_operations { | |||
1568 | int (*inode_getsecctx)(struct inode *inode, void **ctx, u32 *ctxlen); | 1567 | int (*inode_getsecctx)(struct inode *inode, void **ctx, u32 *ctxlen); |
1569 | 1568 | ||
1570 | #ifdef CONFIG_SECURITY_NETWORK | 1569 | #ifdef CONFIG_SECURITY_NETWORK |
1571 | int (*unix_stream_connect) (struct socket *sock, | 1570 | int (*unix_stream_connect) (struct sock *sock, struct sock *other, struct sock *newsk); |
1572 | struct socket *other, struct sock *newsk); | ||
1573 | int (*unix_may_send) (struct socket *sock, struct socket *other); | 1571 | int (*unix_may_send) (struct socket *sock, struct socket *other); |
1574 | 1572 | ||
1575 | int (*socket_create) (int family, int type, int protocol, int kern); | 1573 | int (*socket_create) (int family, int type, int protocol, int kern); |
@@ -1713,6 +1711,7 @@ int security_inode_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
1713 | int security_inode_readlink(struct dentry *dentry); | 1711 | int security_inode_readlink(struct dentry *dentry); |
1714 | int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd); | 1712 | int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd); |
1715 | int security_inode_permission(struct inode *inode, int mask); | 1713 | int security_inode_permission(struct inode *inode, int mask); |
1714 | int security_inode_exec_permission(struct inode *inode, unsigned int flags); | ||
1716 | int security_inode_setattr(struct dentry *dentry, struct iattr *attr); | 1715 | int security_inode_setattr(struct dentry *dentry, struct iattr *attr); |
1717 | int security_inode_getattr(struct vfsmount *mnt, struct dentry *dentry); | 1716 | int security_inode_getattr(struct vfsmount *mnt, struct dentry *dentry); |
1718 | int security_inode_setxattr(struct dentry *dentry, const char *name, | 1717 | int security_inode_setxattr(struct dentry *dentry, const char *name, |
@@ -2102,6 +2101,12 @@ static inline int security_inode_permission(struct inode *inode, int mask) | |||
2102 | return 0; | 2101 | return 0; |
2103 | } | 2102 | } |
2104 | 2103 | ||
2104 | static inline int security_inode_exec_permission(struct inode *inode, | ||
2105 | unsigned int flags) | ||
2106 | { | ||
2107 | return 0; | ||
2108 | } | ||
2109 | |||
2105 | static inline int security_inode_setattr(struct dentry *dentry, | 2110 | static inline int security_inode_setattr(struct dentry *dentry, |
2106 | struct iattr *attr) | 2111 | struct iattr *attr) |
2107 | { | 2112 | { |
@@ -2525,8 +2530,7 @@ static inline int security_inode_getsecctx(struct inode *inode, void **ctx, u32 | |||
2525 | 2530 | ||
2526 | #ifdef CONFIG_SECURITY_NETWORK | 2531 | #ifdef CONFIG_SECURITY_NETWORK |
2527 | 2532 | ||
2528 | int security_unix_stream_connect(struct socket *sock, struct socket *other, | 2533 | int security_unix_stream_connect(struct sock *sock, struct sock *other, struct sock *newsk); |
2529 | struct sock *newsk); | ||
2530 | int security_unix_may_send(struct socket *sock, struct socket *other); | 2534 | int security_unix_may_send(struct socket *sock, struct socket *other); |
2531 | int security_socket_create(int family, int type, int protocol, int kern); | 2535 | int security_socket_create(int family, int type, int protocol, int kern); |
2532 | int security_socket_post_create(struct socket *sock, int family, | 2536 | int security_socket_post_create(struct socket *sock, int family, |
@@ -2567,8 +2571,8 @@ void security_tun_dev_post_create(struct sock *sk); | |||
2567 | int security_tun_dev_attach(struct sock *sk); | 2571 | int security_tun_dev_attach(struct sock *sk); |
2568 | 2572 | ||
2569 | #else /* CONFIG_SECURITY_NETWORK */ | 2573 | #else /* CONFIG_SECURITY_NETWORK */ |
2570 | static inline int security_unix_stream_connect(struct socket *sock, | 2574 | static inline int security_unix_stream_connect(struct sock *sock, |
2571 | struct socket *other, | 2575 | struct sock *other, |
2572 | struct sock *newsk) | 2576 | struct sock *newsk) |
2573 | { | 2577 | { |
2574 | return 0; | 2578 | return 0; |
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index 632205ccc25d..e98cd2e57194 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h | |||
@@ -107,7 +107,7 @@ static __always_inline int read_seqretry(const seqlock_t *sl, unsigned start) | |||
107 | { | 107 | { |
108 | smp_rmb(); | 108 | smp_rmb(); |
109 | 109 | ||
110 | return (sl->sequence != start); | 110 | return unlikely(sl->sequence != start); |
111 | } | 111 | } |
112 | 112 | ||
113 | 113 | ||
@@ -125,14 +125,25 @@ typedef struct seqcount { | |||
125 | #define SEQCNT_ZERO { 0 } | 125 | #define SEQCNT_ZERO { 0 } |
126 | #define seqcount_init(x) do { *(x) = (seqcount_t) SEQCNT_ZERO; } while (0) | 126 | #define seqcount_init(x) do { *(x) = (seqcount_t) SEQCNT_ZERO; } while (0) |
127 | 127 | ||
128 | /* Start of read using pointer to a sequence counter only. */ | 128 | /** |
129 | static inline unsigned read_seqcount_begin(const seqcount_t *s) | 129 | * __read_seqcount_begin - begin a seq-read critical section (without barrier) |
130 | * @s: pointer to seqcount_t | ||
131 | * Returns: count to be passed to read_seqcount_retry | ||
132 | * | ||
133 | * __read_seqcount_begin is like read_seqcount_begin, but has no smp_rmb() | ||
134 | * barrier. Callers should ensure that smp_rmb() or equivalent ordering is | ||
135 | * provided before actually loading any of the variables that are to be | ||
136 | * protected in this critical section. | ||
137 | * | ||
138 | * Use carefully, only in critical code, and comment how the barrier is | ||
139 | * provided. | ||
140 | */ | ||
141 | static inline unsigned __read_seqcount_begin(const seqcount_t *s) | ||
130 | { | 142 | { |
131 | unsigned ret; | 143 | unsigned ret; |
132 | 144 | ||
133 | repeat: | 145 | repeat: |
134 | ret = s->sequence; | 146 | ret = s->sequence; |
135 | smp_rmb(); | ||
136 | if (unlikely(ret & 1)) { | 147 | if (unlikely(ret & 1)) { |
137 | cpu_relax(); | 148 | cpu_relax(); |
138 | goto repeat; | 149 | goto repeat; |
@@ -140,14 +151,56 @@ repeat: | |||
140 | return ret; | 151 | return ret; |
141 | } | 152 | } |
142 | 153 | ||
143 | /* | 154 | /** |
144 | * Test if reader processed invalid data because sequence number has changed. | 155 | * read_seqcount_begin - begin a seq-read critical section |
156 | * @s: pointer to seqcount_t | ||
157 | * Returns: count to be passed to read_seqcount_retry | ||
158 | * | ||
159 | * read_seqcount_begin opens a read critical section of the given seqcount. | ||
160 | * Validity of the critical section is tested by checking read_seqcount_retry | ||
161 | * function. | ||
162 | */ | ||
163 | static inline unsigned read_seqcount_begin(const seqcount_t *s) | ||
164 | { | ||
165 | unsigned ret = __read_seqcount_begin(s); | ||
166 | smp_rmb(); | ||
167 | return ret; | ||
168 | } | ||
169 | |||
170 | /** | ||
171 | * __read_seqcount_retry - end a seq-read critical section (without barrier) | ||
172 | * @s: pointer to seqcount_t | ||
173 | * @start: count, from read_seqcount_begin | ||
174 | * Returns: 1 if retry is required, else 0 | ||
175 | * | ||
176 | * __read_seqcount_retry is like read_seqcount_retry, but has no smp_rmb() | ||
177 | * barrier. Callers should ensure that smp_rmb() or equivalent ordering is | ||
178 | * provided before actually loading any of the variables that are to be | ||
179 | * protected in this critical section. | ||
180 | * | ||
181 | * Use carefully, only in critical code, and comment how the barrier is | ||
182 | * provided. | ||
183 | */ | ||
184 | static inline int __read_seqcount_retry(const seqcount_t *s, unsigned start) | ||
185 | { | ||
186 | return unlikely(s->sequence != start); | ||
187 | } | ||
188 | |||
189 | /** | ||
190 | * read_seqcount_retry - end a seq-read critical section | ||
191 | * @s: pointer to seqcount_t | ||
192 | * @start: count, from read_seqcount_begin | ||
193 | * Returns: 1 if retry is required, else 0 | ||
194 | * | ||
195 | * read_seqcount_retry closes a read critical section of the given seqcount. | ||
196 | * If the critical section was invalid, it must be ignored (and typically | ||
197 | * retried). | ||
145 | */ | 198 | */ |
146 | static inline int read_seqcount_retry(const seqcount_t *s, unsigned start) | 199 | static inline int read_seqcount_retry(const seqcount_t *s, unsigned start) |
147 | { | 200 | { |
148 | smp_rmb(); | 201 | smp_rmb(); |
149 | 202 | ||
150 | return s->sequence != start; | 203 | return __read_seqcount_retry(s, start); |
151 | } | 204 | } |
152 | 205 | ||
153 | 206 | ||
@@ -167,6 +220,19 @@ static inline void write_seqcount_end(seqcount_t *s) | |||
167 | s->sequence++; | 220 | s->sequence++; |
168 | } | 221 | } |
169 | 222 | ||
223 | /** | ||
224 | * write_seqcount_barrier - invalidate in-progress read-side seq operations | ||
225 | * @s: pointer to seqcount_t | ||
226 | * | ||
227 | * After write_seqcount_barrier, no read-side seq operations will complete | ||
228 | * successfully and see data older than this. | ||
229 | */ | ||
230 | static inline void write_seqcount_barrier(seqcount_t *s) | ||
231 | { | ||
232 | smp_wmb(); | ||
233 | s->sequence+=2; | ||
234 | } | ||
235 | |||
170 | /* | 236 | /* |
171 | * Possible sw/hw IRQ protected versions of the interfaces. | 237 | * Possible sw/hw IRQ protected versions of the interfaces. |
172 | */ | 238 | */ |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 212eb4c67797..a23fa29d4eb0 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -95,7 +95,7 @@ | |||
95 | /* PPC CPM type number */ | 95 | /* PPC CPM type number */ |
96 | #define PORT_CPM 58 | 96 | #define PORT_CPM 58 |
97 | 97 | ||
98 | /* MPC52xx type numbers */ | 98 | /* MPC52xx (and MPC512x) type numbers */ |
99 | #define PORT_MPC52xx 59 | 99 | #define PORT_MPC52xx 59 |
100 | 100 | ||
101 | /* IBM icom */ | 101 | /* IBM icom */ |
@@ -199,6 +199,9 @@ | |||
199 | /* TI OMAP-UART */ | 199 | /* TI OMAP-UART */ |
200 | #define PORT_OMAP 96 | 200 | #define PORT_OMAP 96 |
201 | 201 | ||
202 | /* VIA VT8500 SoC */ | ||
203 | #define PORT_VT8500 97 | ||
204 | |||
202 | #ifdef __KERNEL__ | 205 | #ifdef __KERNEL__ |
203 | 206 | ||
204 | #include <linux/compiler.h> | 207 | #include <linux/compiler.h> |
@@ -311,6 +314,7 @@ struct uart_port { | |||
311 | #define UPIO_TSI (5) /* Tsi108/109 type IO */ | 314 | #define UPIO_TSI (5) /* Tsi108/109 type IO */ |
312 | #define UPIO_DWAPB (6) /* DesignWare APB UART */ | 315 | #define UPIO_DWAPB (6) /* DesignWare APB UART */ |
313 | #define UPIO_RM9000 (7) /* RM9000 type IO */ | 316 | #define UPIO_RM9000 (7) /* RM9000 type IO */ |
317 | #define UPIO_DWAPB32 (8) /* DesignWare APB UART (32 bit accesses) */ | ||
314 | 318 | ||
315 | unsigned int read_status_mask; /* driver specific */ | 319 | unsigned int read_status_mask; /* driver specific */ |
316 | unsigned int ignore_status_mask; /* driver specific */ | 320 | unsigned int ignore_status_mask; /* driver specific */ |
@@ -361,6 +365,7 @@ struct uart_port { | |||
361 | struct device *dev; /* parent device */ | 365 | struct device *dev; /* parent device */ |
362 | unsigned char hub6; /* this should be in the 8250 driver */ | 366 | unsigned char hub6; /* this should be in the 8250 driver */ |
363 | unsigned char suspended; | 367 | unsigned char suspended; |
368 | unsigned char irq_wake; | ||
364 | unsigned char unused[2]; | 369 | unsigned char unused[2]; |
365 | void *private_data; /* generic platform data pointer */ | 370 | void *private_data; /* generic platform data pointer */ |
366 | }; | 371 | }; |
diff --git a/include/linux/serial_reg.h b/include/linux/serial_reg.h index c7a0ce11cd47..3ecb71a9e505 100644 --- a/include/linux/serial_reg.h +++ b/include/linux/serial_reg.h | |||
@@ -99,6 +99,13 @@ | |||
99 | #define UART_LCR_WLEN7 0x02 /* Wordlength: 7 bits */ | 99 | #define UART_LCR_WLEN7 0x02 /* Wordlength: 7 bits */ |
100 | #define UART_LCR_WLEN8 0x03 /* Wordlength: 8 bits */ | 100 | #define UART_LCR_WLEN8 0x03 /* Wordlength: 8 bits */ |
101 | 101 | ||
102 | /* | ||
103 | * Access to some registers depends on register access / configuration | ||
104 | * mode. | ||
105 | */ | ||
106 | #define UART_LCR_CONF_MODE_A UART_LCR_DLAB /* Configutation mode A */ | ||
107 | #define UART_LCR_CONF_MODE_B 0xBF /* Configutation mode B */ | ||
108 | |||
102 | #define UART_MCR 4 /* Out: Modem Control Register */ | 109 | #define UART_MCR 4 /* Out: Modem Control Register */ |
103 | #define UART_MCR_CLKSEL 0x80 /* Divide clock by 4 (TI16C752, EFR[4]=1) */ | 110 | #define UART_MCR_CLKSEL 0x80 /* Divide clock by 4 (TI16C752, EFR[4]=1) */ |
104 | #define UART_MCR_TCRTLR 0x40 /* Access TCR/TLR (TI16C752, EFR[4]=1) */ | 111 | #define UART_MCR_TCRTLR 0x40 /* Access TCR/TLR (TI16C752, EFR[4]=1) */ |
@@ -341,5 +348,17 @@ | |||
341 | #define UART_OMAP_SYSS 0x16 /* System status register */ | 348 | #define UART_OMAP_SYSS 0x16 /* System status register */ |
342 | #define UART_OMAP_WER 0x17 /* Wake-up enable register */ | 349 | #define UART_OMAP_WER 0x17 /* Wake-up enable register */ |
343 | 350 | ||
351 | /* | ||
352 | * These are the definitions for the MDR1 register | ||
353 | */ | ||
354 | #define UART_OMAP_MDR1_16X_MODE 0x00 /* UART 16x mode */ | ||
355 | #define UART_OMAP_MDR1_SIR_MODE 0x01 /* SIR mode */ | ||
356 | #define UART_OMAP_MDR1_16X_ABAUD_MODE 0x02 /* UART 16x auto-baud */ | ||
357 | #define UART_OMAP_MDR1_13X_MODE 0x03 /* UART 13x mode */ | ||
358 | #define UART_OMAP_MDR1_MIR_MODE 0x04 /* MIR mode */ | ||
359 | #define UART_OMAP_MDR1_FIR_MODE 0x05 /* FIR mode */ | ||
360 | #define UART_OMAP_MDR1_CIR_MODE 0x06 /* CIR mode */ | ||
361 | #define UART_OMAP_MDR1_DISABLE 0x07 /* Disable (default state) */ | ||
362 | |||
344 | #endif /* _LINUX_SERIAL_REG_H */ | 363 | #endif /* _LINUX_SERIAL_REG_H */ |
345 | 364 | ||
diff --git a/include/linux/sfi.h b/include/linux/sfi.h index 7f770c638e99..fe817918b30e 100644 --- a/include/linux/sfi.h +++ b/include/linux/sfi.h | |||
@@ -77,6 +77,8 @@ | |||
77 | #define SFI_OEM_ID_SIZE 6 | 77 | #define SFI_OEM_ID_SIZE 6 |
78 | #define SFI_OEM_TABLE_ID_SIZE 8 | 78 | #define SFI_OEM_TABLE_ID_SIZE 8 |
79 | 79 | ||
80 | #define SFI_NAME_LEN 16 | ||
81 | |||
80 | #define SFI_SYST_SEARCH_BEGIN 0x000E0000 | 82 | #define SFI_SYST_SEARCH_BEGIN 0x000E0000 |
81 | #define SFI_SYST_SEARCH_END 0x000FFFFF | 83 | #define SFI_SYST_SEARCH_END 0x000FFFFF |
82 | 84 | ||
@@ -156,13 +158,13 @@ struct sfi_device_table_entry { | |||
156 | u16 addr; | 158 | u16 addr; |
157 | u8 irq; | 159 | u8 irq; |
158 | u32 max_freq; | 160 | u32 max_freq; |
159 | char name[16]; | 161 | char name[SFI_NAME_LEN]; |
160 | } __packed; | 162 | } __packed; |
161 | 163 | ||
162 | struct sfi_gpio_table_entry { | 164 | struct sfi_gpio_table_entry { |
163 | char controller_name[16]; | 165 | char controller_name[SFI_NAME_LEN]; |
164 | u16 pin_no; | 166 | u16 pin_no; |
165 | char pin_name[16]; | 167 | char pin_name[SFI_NAME_LEN]; |
166 | } __packed; | 168 | } __packed; |
167 | 169 | ||
168 | typedef int (*sfi_table_handler) (struct sfi_table_header *table); | 170 | typedef int (*sfi_table_handler) (struct sfi_table_header *table); |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index e6ba898de61c..20ec0a64cb9f 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -386,9 +386,10 @@ struct sk_buff { | |||
386 | #else | 386 | #else |
387 | __u8 deliver_no_wcard:1; | 387 | __u8 deliver_no_wcard:1; |
388 | #endif | 388 | #endif |
389 | __u8 ooo_okay:1; | ||
389 | kmemcheck_bitfield_end(flags2); | 390 | kmemcheck_bitfield_end(flags2); |
390 | 391 | ||
391 | /* 0/14 bit hole */ | 392 | /* 0/13 bit hole */ |
392 | 393 | ||
393 | #ifdef CONFIG_NET_DMA | 394 | #ifdef CONFIG_NET_DMA |
394 | dma_cookie_t dma_cookie; | 395 | dma_cookie_t dma_cookie; |
@@ -1354,6 +1355,11 @@ static inline void skb_set_mac_header(struct sk_buff *skb, const int offset) | |||
1354 | } | 1355 | } |
1355 | #endif /* NET_SKBUFF_DATA_USES_OFFSET */ | 1356 | #endif /* NET_SKBUFF_DATA_USES_OFFSET */ |
1356 | 1357 | ||
1358 | static inline int skb_checksum_start_offset(const struct sk_buff *skb) | ||
1359 | { | ||
1360 | return skb->csum_start - skb_headroom(skb); | ||
1361 | } | ||
1362 | |||
1357 | static inline int skb_transport_offset(const struct sk_buff *skb) | 1363 | static inline int skb_transport_offset(const struct sk_buff *skb) |
1358 | { | 1364 | { |
1359 | return skb_transport_header(skb) - skb->data; | 1365 | return skb_transport_header(skb) - skb->data; |
@@ -2164,8 +2170,9 @@ static inline bool skb_rx_queue_recorded(const struct sk_buff *skb) | |||
2164 | return skb->queue_mapping != 0; | 2170 | return skb->queue_mapping != 0; |
2165 | } | 2171 | } |
2166 | 2172 | ||
2167 | extern u16 skb_tx_hash(const struct net_device *dev, | 2173 | extern u16 __skb_tx_hash(const struct net_device *dev, |
2168 | const struct sk_buff *skb); | 2174 | const struct sk_buff *skb, |
2175 | unsigned int num_tx_queues); | ||
2169 | 2176 | ||
2170 | #ifdef CONFIG_XFRM | 2177 | #ifdef CONFIG_XFRM |
2171 | static inline struct sec_path *skb_sec_path(struct sk_buff *skb) | 2178 | static inline struct sec_path *skb_sec_path(struct sk_buff *skb) |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 59260e21bdf5..fa9086647eb7 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -106,8 +106,6 @@ int kmem_cache_shrink(struct kmem_cache *); | |||
106 | void kmem_cache_free(struct kmem_cache *, void *); | 106 | void kmem_cache_free(struct kmem_cache *, void *); |
107 | unsigned int kmem_cache_size(struct kmem_cache *); | 107 | unsigned int kmem_cache_size(struct kmem_cache *); |
108 | const char *kmem_cache_name(struct kmem_cache *); | 108 | const char *kmem_cache_name(struct kmem_cache *); |
109 | int kern_ptr_validate(const void *ptr, unsigned long size); | ||
110 | int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr); | ||
111 | 109 | ||
112 | /* | 110 | /* |
113 | * Please use this macro to create slab caches. Simply specify the | 111 | * Please use this macro to create slab caches. Simply specify the |
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h index 791a502f6906..83203ae9390b 100644 --- a/include/linux/slab_def.h +++ b/include/linux/slab_def.h | |||
@@ -138,11 +138,12 @@ void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | |||
138 | void *__kmalloc(size_t size, gfp_t flags); | 138 | void *__kmalloc(size_t size, gfp_t flags); |
139 | 139 | ||
140 | #ifdef CONFIG_TRACING | 140 | #ifdef CONFIG_TRACING |
141 | extern void *kmem_cache_alloc_notrace(struct kmem_cache *cachep, gfp_t flags); | 141 | extern void *kmem_cache_alloc_trace(size_t size, |
142 | struct kmem_cache *cachep, gfp_t flags); | ||
142 | extern size_t slab_buffer_size(struct kmem_cache *cachep); | 143 | extern size_t slab_buffer_size(struct kmem_cache *cachep); |
143 | #else | 144 | #else |
144 | static __always_inline void * | 145 | static __always_inline void * |
145 | kmem_cache_alloc_notrace(struct kmem_cache *cachep, gfp_t flags) | 146 | kmem_cache_alloc_trace(size_t size, struct kmem_cache *cachep, gfp_t flags) |
146 | { | 147 | { |
147 | return kmem_cache_alloc(cachep, flags); | 148 | return kmem_cache_alloc(cachep, flags); |
148 | } | 149 | } |
@@ -179,10 +180,7 @@ found: | |||
179 | #endif | 180 | #endif |
180 | cachep = malloc_sizes[i].cs_cachep; | 181 | cachep = malloc_sizes[i].cs_cachep; |
181 | 182 | ||
182 | ret = kmem_cache_alloc_notrace(cachep, flags); | 183 | ret = kmem_cache_alloc_trace(size, cachep, flags); |
183 | |||
184 | trace_kmalloc(_THIS_IP_, ret, | ||
185 | size, slab_buffer_size(cachep), flags); | ||
186 | 184 | ||
187 | return ret; | 185 | return ret; |
188 | } | 186 | } |
@@ -194,14 +192,16 @@ extern void *__kmalloc_node(size_t size, gfp_t flags, int node); | |||
194 | extern void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | 192 | extern void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); |
195 | 193 | ||
196 | #ifdef CONFIG_TRACING | 194 | #ifdef CONFIG_TRACING |
197 | extern void *kmem_cache_alloc_node_notrace(struct kmem_cache *cachep, | 195 | extern void *kmem_cache_alloc_node_trace(size_t size, |
198 | gfp_t flags, | 196 | struct kmem_cache *cachep, |
199 | int nodeid); | 197 | gfp_t flags, |
198 | int nodeid); | ||
200 | #else | 199 | #else |
201 | static __always_inline void * | 200 | static __always_inline void * |
202 | kmem_cache_alloc_node_notrace(struct kmem_cache *cachep, | 201 | kmem_cache_alloc_node_trace(size_t size, |
203 | gfp_t flags, | 202 | struct kmem_cache *cachep, |
204 | int nodeid) | 203 | gfp_t flags, |
204 | int nodeid) | ||
205 | { | 205 | { |
206 | return kmem_cache_alloc_node(cachep, flags, nodeid); | 206 | return kmem_cache_alloc_node(cachep, flags, nodeid); |
207 | } | 207 | } |
@@ -210,7 +210,6 @@ kmem_cache_alloc_node_notrace(struct kmem_cache *cachep, | |||
210 | static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) | 210 | static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) |
211 | { | 211 | { |
212 | struct kmem_cache *cachep; | 212 | struct kmem_cache *cachep; |
213 | void *ret; | ||
214 | 213 | ||
215 | if (__builtin_constant_p(size)) { | 214 | if (__builtin_constant_p(size)) { |
216 | int i = 0; | 215 | int i = 0; |
@@ -234,13 +233,7 @@ found: | |||
234 | #endif | 233 | #endif |
235 | cachep = malloc_sizes[i].cs_cachep; | 234 | cachep = malloc_sizes[i].cs_cachep; |
236 | 235 | ||
237 | ret = kmem_cache_alloc_node_notrace(cachep, flags, node); | 236 | return kmem_cache_alloc_node_trace(size, cachep, flags, node); |
238 | |||
239 | trace_kmalloc_node(_THIS_IP_, ret, | ||
240 | size, slab_buffer_size(cachep), | ||
241 | flags, node); | ||
242 | |||
243 | return ret; | ||
244 | } | 237 | } |
245 | return __kmalloc_node(size, flags, node); | 238 | return __kmalloc_node(size, flags, node); |
246 | } | 239 | } |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index e4f5ed180b9b..8b6e8ae5d5ca 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -10,9 +10,8 @@ | |||
10 | #include <linux/gfp.h> | 10 | #include <linux/gfp.h> |
11 | #include <linux/workqueue.h> | 11 | #include <linux/workqueue.h> |
12 | #include <linux/kobject.h> | 12 | #include <linux/kobject.h> |
13 | #include <linux/kmemleak.h> | ||
14 | 13 | ||
15 | #include <trace/events/kmem.h> | 14 | #include <linux/kmemleak.h> |
16 | 15 | ||
17 | enum stat_item { | 16 | enum stat_item { |
18 | ALLOC_FASTPATH, /* Allocation from cpu slab */ | 17 | ALLOC_FASTPATH, /* Allocation from cpu slab */ |
@@ -216,31 +215,40 @@ static __always_inline struct kmem_cache *kmalloc_slab(size_t size) | |||
216 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | 215 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); |
217 | void *__kmalloc(size_t size, gfp_t flags); | 216 | void *__kmalloc(size_t size, gfp_t flags); |
218 | 217 | ||
218 | static __always_inline void * | ||
219 | kmalloc_order(size_t size, gfp_t flags, unsigned int order) | ||
220 | { | ||
221 | void *ret = (void *) __get_free_pages(flags | __GFP_COMP, order); | ||
222 | kmemleak_alloc(ret, size, 1, flags); | ||
223 | return ret; | ||
224 | } | ||
225 | |||
219 | #ifdef CONFIG_TRACING | 226 | #ifdef CONFIG_TRACING |
220 | extern void *kmem_cache_alloc_notrace(struct kmem_cache *s, gfp_t gfpflags); | 227 | extern void * |
228 | kmem_cache_alloc_trace(struct kmem_cache *s, gfp_t gfpflags, size_t size); | ||
229 | extern void *kmalloc_order_trace(size_t size, gfp_t flags, unsigned int order); | ||
221 | #else | 230 | #else |
222 | static __always_inline void * | 231 | static __always_inline void * |
223 | kmem_cache_alloc_notrace(struct kmem_cache *s, gfp_t gfpflags) | 232 | kmem_cache_alloc_trace(struct kmem_cache *s, gfp_t gfpflags, size_t size) |
224 | { | 233 | { |
225 | return kmem_cache_alloc(s, gfpflags); | 234 | return kmem_cache_alloc(s, gfpflags); |
226 | } | 235 | } |
236 | |||
237 | static __always_inline void * | ||
238 | kmalloc_order_trace(size_t size, gfp_t flags, unsigned int order) | ||
239 | { | ||
240 | return kmalloc_order(size, flags, order); | ||
241 | } | ||
227 | #endif | 242 | #endif |
228 | 243 | ||
229 | static __always_inline void *kmalloc_large(size_t size, gfp_t flags) | 244 | static __always_inline void *kmalloc_large(size_t size, gfp_t flags) |
230 | { | 245 | { |
231 | unsigned int order = get_order(size); | 246 | unsigned int order = get_order(size); |
232 | void *ret = (void *) __get_free_pages(flags | __GFP_COMP, order); | 247 | return kmalloc_order_trace(size, flags, order); |
233 | |||
234 | kmemleak_alloc(ret, size, 1, flags); | ||
235 | trace_kmalloc(_THIS_IP_, ret, size, PAGE_SIZE << order, flags); | ||
236 | |||
237 | return ret; | ||
238 | } | 248 | } |
239 | 249 | ||
240 | static __always_inline void *kmalloc(size_t size, gfp_t flags) | 250 | static __always_inline void *kmalloc(size_t size, gfp_t flags) |
241 | { | 251 | { |
242 | void *ret; | ||
243 | |||
244 | if (__builtin_constant_p(size)) { | 252 | if (__builtin_constant_p(size)) { |
245 | if (size > SLUB_MAX_SIZE) | 253 | if (size > SLUB_MAX_SIZE) |
246 | return kmalloc_large(size, flags); | 254 | return kmalloc_large(size, flags); |
@@ -251,11 +259,7 @@ static __always_inline void *kmalloc(size_t size, gfp_t flags) | |||
251 | if (!s) | 259 | if (!s) |
252 | return ZERO_SIZE_PTR; | 260 | return ZERO_SIZE_PTR; |
253 | 261 | ||
254 | ret = kmem_cache_alloc_notrace(s, flags); | 262 | return kmem_cache_alloc_trace(s, flags, size); |
255 | |||
256 | trace_kmalloc(_THIS_IP_, ret, size, s->size, flags); | ||
257 | |||
258 | return ret; | ||
259 | } | 263 | } |
260 | } | 264 | } |
261 | return __kmalloc(size, flags); | 265 | return __kmalloc(size, flags); |
@@ -266,14 +270,14 @@ void *__kmalloc_node(size_t size, gfp_t flags, int node); | |||
266 | void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | 270 | void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); |
267 | 271 | ||
268 | #ifdef CONFIG_TRACING | 272 | #ifdef CONFIG_TRACING |
269 | extern void *kmem_cache_alloc_node_notrace(struct kmem_cache *s, | 273 | extern void *kmem_cache_alloc_node_trace(struct kmem_cache *s, |
270 | gfp_t gfpflags, | 274 | gfp_t gfpflags, |
271 | int node); | 275 | int node, size_t size); |
272 | #else | 276 | #else |
273 | static __always_inline void * | 277 | static __always_inline void * |
274 | kmem_cache_alloc_node_notrace(struct kmem_cache *s, | 278 | kmem_cache_alloc_node_trace(struct kmem_cache *s, |
275 | gfp_t gfpflags, | 279 | gfp_t gfpflags, |
276 | int node) | 280 | int node, size_t size) |
277 | { | 281 | { |
278 | return kmem_cache_alloc_node(s, gfpflags, node); | 282 | return kmem_cache_alloc_node(s, gfpflags, node); |
279 | } | 283 | } |
@@ -281,8 +285,6 @@ kmem_cache_alloc_node_notrace(struct kmem_cache *s, | |||
281 | 285 | ||
282 | static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) | 286 | static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) |
283 | { | 287 | { |
284 | void *ret; | ||
285 | |||
286 | if (__builtin_constant_p(size) && | 288 | if (__builtin_constant_p(size) && |
287 | size <= SLUB_MAX_SIZE && !(flags & SLUB_DMA)) { | 289 | size <= SLUB_MAX_SIZE && !(flags & SLUB_DMA)) { |
288 | struct kmem_cache *s = kmalloc_slab(size); | 290 | struct kmem_cache *s = kmalloc_slab(size); |
@@ -290,12 +292,7 @@ static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) | |||
290 | if (!s) | 292 | if (!s) |
291 | return ZERO_SIZE_PTR; | 293 | return ZERO_SIZE_PTR; |
292 | 294 | ||
293 | ret = kmem_cache_alloc_node_notrace(s, flags, node); | 295 | return kmem_cache_alloc_node_trace(s, flags, node, size); |
294 | |||
295 | trace_kmalloc_node(_THIS_IP_, ret, | ||
296 | size, s->size, flags, node); | ||
297 | |||
298 | return ret; | ||
299 | } | 296 | } |
300 | return __kmalloc_node(size, flags, node); | 297 | return __kmalloc_node(size, flags, node); |
301 | } | 298 | } |
diff --git a/include/linux/socket.h b/include/linux/socket.h index 86b652fabf6e..5f65f14c4f44 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -30,12 +30,10 @@ struct cred; | |||
30 | #define __sockaddr_check_size(size) \ | 30 | #define __sockaddr_check_size(size) \ |
31 | BUILD_BUG_ON(((size) > sizeof(struct __kernel_sockaddr_storage))) | 31 | BUILD_BUG_ON(((size) > sizeof(struct __kernel_sockaddr_storage))) |
32 | 32 | ||
33 | #ifdef __KERNEL__ | 33 | #ifdef CONFIG_PROC_FS |
34 | # ifdef CONFIG_PROC_FS | ||
35 | struct seq_file; | 34 | struct seq_file; |
36 | extern void socket_seq_show(struct seq_file *seq); | 35 | extern void socket_seq_show(struct seq_file *seq); |
37 | # endif | 36 | #endif |
38 | #endif /* __KERNEL__ */ | ||
39 | 37 | ||
40 | typedef unsigned short sa_family_t; | 38 | typedef unsigned short sa_family_t; |
41 | 39 | ||
@@ -311,7 +309,6 @@ struct ucred { | |||
311 | /* IPX options */ | 309 | /* IPX options */ |
312 | #define IPX_TYPE 1 | 310 | #define IPX_TYPE 1 |
313 | 311 | ||
314 | #ifdef __KERNEL__ | ||
315 | extern void cred_to_ucred(struct pid *pid, const struct cred *cred, struct ucred *ucred); | 312 | extern void cred_to_ucred(struct pid *pid, const struct cred *cred, struct ucred *ucred); |
316 | 313 | ||
317 | extern int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); | 314 | extern int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); |
@@ -333,6 +330,5 @@ struct timespec; | |||
333 | 330 | ||
334 | extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, | 331 | extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, |
335 | unsigned int flags, struct timespec *timeout); | 332 | unsigned int flags, struct timespec *timeout); |
336 | #endif | ||
337 | #endif /* not kernel and not glibc */ | 333 | #endif /* not kernel and not glibc */ |
338 | #endif /* _LINUX_SOCKET_H */ | 334 | #endif /* _LINUX_SOCKET_H */ |
diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h index 4f95c1aac2fd..0e6dc3891942 100644 --- a/include/linux/sonypi.h +++ b/include/linux/sonypi.h | |||
@@ -112,6 +112,7 @@ | |||
112 | #define SONYPI_EVENT_VOLUME_DEC_PRESSED 70 | 112 | #define SONYPI_EVENT_VOLUME_DEC_PRESSED 70 |
113 | #define SONYPI_EVENT_BRIGHTNESS_PRESSED 71 | 113 | #define SONYPI_EVENT_BRIGHTNESS_PRESSED 71 |
114 | #define SONYPI_EVENT_MEDIA_PRESSED 72 | 114 | #define SONYPI_EVENT_MEDIA_PRESSED 72 |
115 | #define SONYPI_EVENT_VENDOR_PRESSED 73 | ||
115 | 116 | ||
116 | /* get/set brightness */ | 117 | /* get/set brightness */ |
117 | #define SONYPI_IOCGBRT _IOR('v', 0, __u8) | 118 | #define SONYPI_IOCGBRT _IOR('v', 0, __u8) |
diff --git a/include/linux/spi/dw_spi.h b/include/linux/spi/dw_spi.h index c91302f3a257..6cd10f6ad472 100644 --- a/include/linux/spi/dw_spi.h +++ b/include/linux/spi/dw_spi.h | |||
@@ -1,5 +1,6 @@ | |||
1 | #ifndef DW_SPI_HEADER_H | 1 | #ifndef DW_SPI_HEADER_H |
2 | #define DW_SPI_HEADER_H | 2 | #define DW_SPI_HEADER_H |
3 | |||
3 | #include <linux/io.h> | 4 | #include <linux/io.h> |
4 | 5 | ||
5 | /* Bit fields in CTRLR0 */ | 6 | /* Bit fields in CTRLR0 */ |
@@ -82,6 +83,13 @@ struct dw_spi_reg { | |||
82 | though only low 16 bits matters */ | 83 | though only low 16 bits matters */ |
83 | } __packed; | 84 | } __packed; |
84 | 85 | ||
86 | struct dw_spi; | ||
87 | struct dw_spi_dma_ops { | ||
88 | int (*dma_init)(struct dw_spi *dws); | ||
89 | void (*dma_exit)(struct dw_spi *dws); | ||
90 | int (*dma_transfer)(struct dw_spi *dws, int cs_change); | ||
91 | }; | ||
92 | |||
85 | struct dw_spi { | 93 | struct dw_spi { |
86 | struct spi_master *master; | 94 | struct spi_master *master; |
87 | struct spi_device *cur_dev; | 95 | struct spi_device *cur_dev; |
@@ -136,13 +144,15 @@ struct dw_spi { | |||
136 | /* Dma info */ | 144 | /* Dma info */ |
137 | int dma_inited; | 145 | int dma_inited; |
138 | struct dma_chan *txchan; | 146 | struct dma_chan *txchan; |
147 | struct scatterlist tx_sgl; | ||
139 | struct dma_chan *rxchan; | 148 | struct dma_chan *rxchan; |
140 | int txdma_done; | 149 | struct scatterlist rx_sgl; |
141 | int rxdma_done; | 150 | int dma_chan_done; |
142 | u64 tx_param; | ||
143 | u64 rx_param; | ||
144 | struct device *dma_dev; | 151 | struct device *dma_dev; |
145 | dma_addr_t dma_addr; | 152 | dma_addr_t dma_addr; /* phy address of the Data register */ |
153 | struct dw_spi_dma_ops *dma_ops; | ||
154 | void *dma_priv; /* platform relate info */ | ||
155 | struct pci_dev *dmac; | ||
146 | 156 | ||
147 | /* Bus interface info */ | 157 | /* Bus interface info */ |
148 | void *priv; | 158 | void *priv; |
@@ -216,4 +226,8 @@ extern int dw_spi_add_host(struct dw_spi *dws); | |||
216 | extern void dw_spi_remove_host(struct dw_spi *dws); | 226 | extern void dw_spi_remove_host(struct dw_spi *dws); |
217 | extern int dw_spi_suspend_host(struct dw_spi *dws); | 227 | extern int dw_spi_suspend_host(struct dw_spi *dws); |
218 | extern int dw_spi_resume_host(struct dw_spi *dws); | 228 | extern int dw_spi_resume_host(struct dw_spi *dws); |
229 | extern void dw_spi_xfer_done(struct dw_spi *dws); | ||
230 | |||
231 | /* platform related setup */ | ||
232 | extern int dw_spi_mid_init(struct dw_spi *dws); /* Intel MID platforms */ | ||
219 | #endif /* DW_SPI_HEADER_H */ | 233 | #endif /* DW_SPI_HEADER_H */ |
diff --git a/include/linux/spi/ifx_modem.h b/include/linux/spi/ifx_modem.h new file mode 100644 index 000000000000..a68f3b19d112 --- /dev/null +++ b/include/linux/spi/ifx_modem.h | |||
@@ -0,0 +1,14 @@ | |||
1 | #ifndef LINUX_IFX_MODEM_H | ||
2 | #define LINUX_IFX_MODEM_H | ||
3 | |||
4 | struct ifx_modem_platform_data { | ||
5 | unsigned short rst_out; /* modem reset out */ | ||
6 | unsigned short pwr_on; /* power on */ | ||
7 | unsigned short rst_pmu; /* reset modem */ | ||
8 | unsigned short tx_pwr; /* modem power threshold */ | ||
9 | unsigned short srdy; /* SRDY */ | ||
10 | unsigned short mrdy; /* MRDY */ | ||
11 | unsigned short is_6160; /* Modem type */ | ||
12 | }; | ||
13 | |||
14 | #endif | ||
diff --git a/include/linux/spi/pxa2xx_spi.h b/include/linux/spi/pxa2xx_spi.h new file mode 100644 index 000000000000..d3e1075f7b60 --- /dev/null +++ b/include/linux/spi/pxa2xx_spi.h | |||
@@ -0,0 +1,152 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2005 Stephen Street / StreetFire Sound Labs | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
17 | */ | ||
18 | #ifndef __linux_pxa2xx_spi_h | ||
19 | #define __linux_pxa2xx_spi_h | ||
20 | |||
21 | #include <linux/pxa2xx_ssp.h> | ||
22 | |||
23 | #define PXA2XX_CS_ASSERT (0x01) | ||
24 | #define PXA2XX_CS_DEASSERT (0x02) | ||
25 | |||
26 | /* device.platform_data for SSP controller devices */ | ||
27 | struct pxa2xx_spi_master { | ||
28 | u32 clock_enable; | ||
29 | u16 num_chipselect; | ||
30 | u8 enable_dma; | ||
31 | }; | ||
32 | |||
33 | /* spi_board_info.controller_data for SPI slave devices, | ||
34 | * copied to spi_device.platform_data ... mostly for dma tuning | ||
35 | */ | ||
36 | struct pxa2xx_spi_chip { | ||
37 | u8 tx_threshold; | ||
38 | u8 rx_threshold; | ||
39 | u8 dma_burst_size; | ||
40 | u32 timeout; | ||
41 | u8 enable_loopback; | ||
42 | int gpio_cs; | ||
43 | void (*cs_control)(u32 command); | ||
44 | }; | ||
45 | |||
46 | #ifdef CONFIG_ARCH_PXA | ||
47 | |||
48 | #include <linux/clk.h> | ||
49 | #include <mach/dma.h> | ||
50 | |||
51 | extern void pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_master *info); | ||
52 | |||
53 | #else | ||
54 | /* | ||
55 | * This is the implemtation for CE4100 on x86. ARM defines them in mach/ or | ||
56 | * plat/ include path. | ||
57 | * The CE4100 does not provide DMA support. This bits are here to let the driver | ||
58 | * compile and will never be used. Maybe we get DMA support at a later point in | ||
59 | * time. | ||
60 | */ | ||
61 | |||
62 | #define DCSR(n) (n) | ||
63 | #define DSADR(n) (n) | ||
64 | #define DTADR(n) (n) | ||
65 | #define DCMD(n) (n) | ||
66 | #define DRCMR(n) (n) | ||
67 | |||
68 | #define DCSR_RUN (1 << 31) /* Run Bit */ | ||
69 | #define DCSR_NODESC (1 << 30) /* No-Descriptor Fetch */ | ||
70 | #define DCSR_STOPIRQEN (1 << 29) /* Stop Interrupt Enable */ | ||
71 | #define DCSR_REQPEND (1 << 8) /* Request Pending (read-only) */ | ||
72 | #define DCSR_STOPSTATE (1 << 3) /* Stop State (read-only) */ | ||
73 | #define DCSR_ENDINTR (1 << 2) /* End Interrupt */ | ||
74 | #define DCSR_STARTINTR (1 << 1) /* Start Interrupt */ | ||
75 | #define DCSR_BUSERR (1 << 0) /* Bus Error Interrupt */ | ||
76 | |||
77 | #define DCSR_EORIRQEN (1 << 28) /* End of Receive Interrupt Enable */ | ||
78 | #define DCSR_EORJMPEN (1 << 27) /* Jump to next descriptor on EOR */ | ||
79 | #define DCSR_EORSTOPEN (1 << 26) /* STOP on an EOR */ | ||
80 | #define DCSR_SETCMPST (1 << 25) /* Set Descriptor Compare Status */ | ||
81 | #define DCSR_CLRCMPST (1 << 24) /* Clear Descriptor Compare Status */ | ||
82 | #define DCSR_CMPST (1 << 10) /* The Descriptor Compare Status */ | ||
83 | #define DCSR_EORINTR (1 << 9) /* The end of Receive */ | ||
84 | |||
85 | #define DRCMR_MAPVLD (1 << 7) /* Map Valid */ | ||
86 | #define DRCMR_CHLNUM 0x1f /* mask for Channel Number */ | ||
87 | |||
88 | #define DDADR_DESCADDR 0xfffffff0 /* Address of next descriptor */ | ||
89 | #define DDADR_STOP (1 << 0) /* Stop */ | ||
90 | |||
91 | #define DCMD_INCSRCADDR (1 << 31) /* Source Address Increment Setting. */ | ||
92 | #define DCMD_INCTRGADDR (1 << 30) /* Target Address Increment Setting. */ | ||
93 | #define DCMD_FLOWSRC (1 << 29) /* Flow Control by the source. */ | ||
94 | #define DCMD_FLOWTRG (1 << 28) /* Flow Control by the target. */ | ||
95 | #define DCMD_STARTIRQEN (1 << 22) /* Start Interrupt Enable */ | ||
96 | #define DCMD_ENDIRQEN (1 << 21) /* End Interrupt Enable */ | ||
97 | #define DCMD_ENDIAN (1 << 18) /* Device Endian-ness. */ | ||
98 | #define DCMD_BURST8 (1 << 16) /* 8 byte burst */ | ||
99 | #define DCMD_BURST16 (2 << 16) /* 16 byte burst */ | ||
100 | #define DCMD_BURST32 (3 << 16) /* 32 byte burst */ | ||
101 | #define DCMD_WIDTH1 (1 << 14) /* 1 byte width */ | ||
102 | #define DCMD_WIDTH2 (2 << 14) /* 2 byte width (HalfWord) */ | ||
103 | #define DCMD_WIDTH4 (3 << 14) /* 4 byte width (Word) */ | ||
104 | #define DCMD_LENGTH 0x01fff /* length mask (max = 8K - 1) */ | ||
105 | |||
106 | /* | ||
107 | * Descriptor structure for PXA's DMA engine | ||
108 | * Note: this structure must always be aligned to a 16-byte boundary. | ||
109 | */ | ||
110 | |||
111 | typedef enum { | ||
112 | DMA_PRIO_HIGH = 0, | ||
113 | DMA_PRIO_MEDIUM = 1, | ||
114 | DMA_PRIO_LOW = 2 | ||
115 | } pxa_dma_prio; | ||
116 | |||
117 | /* | ||
118 | * DMA registration | ||
119 | */ | ||
120 | |||
121 | static inline int pxa_request_dma(char *name, | ||
122 | pxa_dma_prio prio, | ||
123 | void (*irq_handler)(int, void *), | ||
124 | void *data) | ||
125 | { | ||
126 | return -ENODEV; | ||
127 | } | ||
128 | |||
129 | static inline void pxa_free_dma(int dma_ch) | ||
130 | { | ||
131 | } | ||
132 | |||
133 | /* | ||
134 | * The CE4100 does not have the clk framework implemented and SPI clock can | ||
135 | * not be switched on/off or the divider changed. | ||
136 | */ | ||
137 | static inline void clk_disable(struct clk *clk) | ||
138 | { | ||
139 | } | ||
140 | |||
141 | static inline int clk_enable(struct clk *clk) | ||
142 | { | ||
143 | return 0; | ||
144 | } | ||
145 | |||
146 | static inline unsigned long clk_get_rate(struct clk *clk) | ||
147 | { | ||
148 | return 3686400; | ||
149 | } | ||
150 | |||
151 | #endif | ||
152 | #endif | ||
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index 623b704fdc42..9659eff52ca2 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h | |||
@@ -55,6 +55,10 @@ struct ssb_sprom { | |||
55 | u8 tri5gl; /* 5.2GHz TX isolation */ | 55 | u8 tri5gl; /* 5.2GHz TX isolation */ |
56 | u8 tri5g; /* 5.3GHz TX isolation */ | 56 | u8 tri5g; /* 5.3GHz TX isolation */ |
57 | u8 tri5gh; /* 5.8GHz TX isolation */ | 57 | u8 tri5gh; /* 5.8GHz TX isolation */ |
58 | u8 txpid2g[4]; /* 2GHz TX power index */ | ||
59 | u8 txpid5gl[4]; /* 4.9 - 5.1GHz TX power index */ | ||
60 | u8 txpid5g[4]; /* 5.1 - 5.5GHz TX power index */ | ||
61 | u8 txpid5gh[4]; /* 5.5 - ...GHz TX power index */ | ||
58 | u8 rxpo2g; /* 2GHz RX power offset */ | 62 | u8 rxpo2g; /* 2GHz RX power offset */ |
59 | u8 rxpo5g; /* 5GHz RX power offset */ | 63 | u8 rxpo5g; /* 5GHz RX power offset */ |
60 | u8 rssisav2g; /* 2GHz RSSI params */ | 64 | u8 rssisav2g; /* 2GHz RSSI params */ |
diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h index 11daf9c140e7..489f7b6d61c5 100644 --- a/include/linux/ssb/ssb_regs.h +++ b/include/linux/ssb/ssb_regs.h | |||
@@ -299,6 +299,46 @@ | |||
299 | #define SSB_SPROM4_AGAIN2_SHIFT 0 | 299 | #define SSB_SPROM4_AGAIN2_SHIFT 0 |
300 | #define SSB_SPROM4_AGAIN3 0xFF00 /* Antenna 3 */ | 300 | #define SSB_SPROM4_AGAIN3 0xFF00 /* Antenna 3 */ |
301 | #define SSB_SPROM4_AGAIN3_SHIFT 8 | 301 | #define SSB_SPROM4_AGAIN3_SHIFT 8 |
302 | #define SSB_SPROM4_TXPID2G01 0x0062 /* TX Power Index 2GHz */ | ||
303 | #define SSB_SPROM4_TXPID2G0 0x00FF | ||
304 | #define SSB_SPROM4_TXPID2G0_SHIFT 0 | ||
305 | #define SSB_SPROM4_TXPID2G1 0xFF00 | ||
306 | #define SSB_SPROM4_TXPID2G1_SHIFT 8 | ||
307 | #define SSB_SPROM4_TXPID2G23 0x0064 /* TX Power Index 2GHz */ | ||
308 | #define SSB_SPROM4_TXPID2G2 0x00FF | ||
309 | #define SSB_SPROM4_TXPID2G2_SHIFT 0 | ||
310 | #define SSB_SPROM4_TXPID2G3 0xFF00 | ||
311 | #define SSB_SPROM4_TXPID2G3_SHIFT 8 | ||
312 | #define SSB_SPROM4_TXPID5G01 0x0066 /* TX Power Index 5GHz middle subband */ | ||
313 | #define SSB_SPROM4_TXPID5G0 0x00FF | ||
314 | #define SSB_SPROM4_TXPID5G0_SHIFT 0 | ||
315 | #define SSB_SPROM4_TXPID5G1 0xFF00 | ||
316 | #define SSB_SPROM4_TXPID5G1_SHIFT 8 | ||
317 | #define SSB_SPROM4_TXPID5G23 0x0068 /* TX Power Index 5GHz middle subband */ | ||
318 | #define SSB_SPROM4_TXPID5G2 0x00FF | ||
319 | #define SSB_SPROM4_TXPID5G2_SHIFT 0 | ||
320 | #define SSB_SPROM4_TXPID5G3 0xFF00 | ||
321 | #define SSB_SPROM4_TXPID5G3_SHIFT 8 | ||
322 | #define SSB_SPROM4_TXPID5GL01 0x006A /* TX Power Index 5GHz low subband */ | ||
323 | #define SSB_SPROM4_TXPID5GL0 0x00FF | ||
324 | #define SSB_SPROM4_TXPID5GL0_SHIFT 0 | ||
325 | #define SSB_SPROM4_TXPID5GL1 0xFF00 | ||
326 | #define SSB_SPROM4_TXPID5GL1_SHIFT 8 | ||
327 | #define SSB_SPROM4_TXPID5GL23 0x006C /* TX Power Index 5GHz low subband */ | ||
328 | #define SSB_SPROM4_TXPID5GL2 0x00FF | ||
329 | #define SSB_SPROM4_TXPID5GL2_SHIFT 0 | ||
330 | #define SSB_SPROM4_TXPID5GL3 0xFF00 | ||
331 | #define SSB_SPROM4_TXPID5GL3_SHIFT 8 | ||
332 | #define SSB_SPROM4_TXPID5GH01 0x006E /* TX Power Index 5GHz high subband */ | ||
333 | #define SSB_SPROM4_TXPID5GH0 0x00FF | ||
334 | #define SSB_SPROM4_TXPID5GH0_SHIFT 0 | ||
335 | #define SSB_SPROM4_TXPID5GH1 0xFF00 | ||
336 | #define SSB_SPROM4_TXPID5GH1_SHIFT 8 | ||
337 | #define SSB_SPROM4_TXPID5GH23 0x0070 /* TX Power Index 5GHz high subband */ | ||
338 | #define SSB_SPROM4_TXPID5GH2 0x00FF | ||
339 | #define SSB_SPROM4_TXPID5GH2_SHIFT 0 | ||
340 | #define SSB_SPROM4_TXPID5GH3 0xFF00 | ||
341 | #define SSB_SPROM4_TXPID5GH3_SHIFT 8 | ||
302 | #define SSB_SPROM4_MAXP_BG 0x0080 /* Max Power BG in path 1 */ | 342 | #define SSB_SPROM4_MAXP_BG 0x0080 /* Max Power BG in path 1 */ |
303 | #define SSB_SPROM4_MAXP_BG_MASK 0x00FF /* Mask for Max Power BG */ | 343 | #define SSB_SPROM4_MAXP_BG_MASK 0x00FF /* Mask for Max Power BG */ |
304 | #define SSB_SPROM4_ITSSI_BG 0xFF00 /* Mask for path 1 itssi_bg */ | 344 | #define SSB_SPROM4_ITSSI_BG 0xFF00 /* Mask for path 1 itssi_bg */ |
diff --git a/include/linux/stacktrace.h b/include/linux/stacktrace.h index 51efbef38fb0..25310f1d7f37 100644 --- a/include/linux/stacktrace.h +++ b/include/linux/stacktrace.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __LINUX_STACKTRACE_H | 2 | #define __LINUX_STACKTRACE_H |
3 | 3 | ||
4 | struct task_struct; | 4 | struct task_struct; |
5 | struct pt_regs; | ||
5 | 6 | ||
6 | #ifdef CONFIG_STACKTRACE | 7 | #ifdef CONFIG_STACKTRACE |
7 | struct task_struct; | 8 | struct task_struct; |
@@ -13,7 +14,8 @@ struct stack_trace { | |||
13 | }; | 14 | }; |
14 | 15 | ||
15 | extern void save_stack_trace(struct stack_trace *trace); | 16 | extern void save_stack_trace(struct stack_trace *trace); |
16 | extern void save_stack_trace_bp(struct stack_trace *trace, unsigned long bp); | 17 | extern void save_stack_trace_regs(struct stack_trace *trace, |
18 | struct pt_regs *regs); | ||
17 | extern void save_stack_trace_tsk(struct task_struct *tsk, | 19 | extern void save_stack_trace_tsk(struct task_struct *tsk, |
18 | struct stack_trace *trace); | 20 | struct stack_trace *trace); |
19 | 21 | ||
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index d66c61774d95..e10352915698 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h | |||
@@ -40,9 +40,9 @@ struct plat_stmmacenet_data { | |||
40 | int pmt; | 40 | int pmt; |
41 | void (*fix_mac_speed)(void *priv, unsigned int speed); | 41 | void (*fix_mac_speed)(void *priv, unsigned int speed); |
42 | void (*bus_setup)(void __iomem *ioaddr); | 42 | void (*bus_setup)(void __iomem *ioaddr); |
43 | #ifdef CONFIG_STM_DRIVERS | 43 | int (*init)(struct platform_device *pdev); |
44 | struct stm_pad_config *pad_config; | 44 | void (*exit)(struct platform_device *pdev); |
45 | #endif | 45 | void *custom_cfg; |
46 | void *bsp_priv; | 46 | void *bsp_priv; |
47 | }; | 47 | }; |
48 | 48 | ||
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index b2024757edd5..8521067ed4f7 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
@@ -110,9 +110,9 @@ struct rpc_credops { | |||
110 | __be32 * (*crmarshal)(struct rpc_task *, __be32 *); | 110 | __be32 * (*crmarshal)(struct rpc_task *, __be32 *); |
111 | int (*crrefresh)(struct rpc_task *); | 111 | int (*crrefresh)(struct rpc_task *); |
112 | __be32 * (*crvalidate)(struct rpc_task *, __be32 *); | 112 | __be32 * (*crvalidate)(struct rpc_task *, __be32 *); |
113 | int (*crwrap_req)(struct rpc_task *, kxdrproc_t, | 113 | int (*crwrap_req)(struct rpc_task *, kxdreproc_t, |
114 | void *, __be32 *, void *); | 114 | void *, __be32 *, void *); |
115 | int (*crunwrap_resp)(struct rpc_task *, kxdrproc_t, | 115 | int (*crunwrap_resp)(struct rpc_task *, kxdrdproc_t, |
116 | void *, __be32 *, void *); | 116 | void *, __be32 *, void *); |
117 | }; | 117 | }; |
118 | 118 | ||
@@ -139,8 +139,8 @@ struct rpc_cred * rpcauth_generic_bind_cred(struct rpc_task *, struct rpc_cred * | |||
139 | void put_rpccred(struct rpc_cred *); | 139 | void put_rpccred(struct rpc_cred *); |
140 | __be32 * rpcauth_marshcred(struct rpc_task *, __be32 *); | 140 | __be32 * rpcauth_marshcred(struct rpc_task *, __be32 *); |
141 | __be32 * rpcauth_checkverf(struct rpc_task *, __be32 *); | 141 | __be32 * rpcauth_checkverf(struct rpc_task *, __be32 *); |
142 | int rpcauth_wrap_req(struct rpc_task *task, kxdrproc_t encode, void *rqstp, __be32 *data, void *obj); | 142 | int rpcauth_wrap_req(struct rpc_task *task, kxdreproc_t encode, void *rqstp, __be32 *data, void *obj); |
143 | int rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp, __be32 *data, void *obj); | 143 | int rpcauth_unwrap_resp(struct rpc_task *task, kxdrdproc_t decode, void *rqstp, __be32 *data, void *obj); |
144 | int rpcauth_refreshcred(struct rpc_task *); | 144 | int rpcauth_refreshcred(struct rpc_task *); |
145 | void rpcauth_invalcred(struct rpc_task *); | 145 | void rpcauth_invalcred(struct rpc_task *); |
146 | int rpcauth_uptodatecred(struct rpc_task *); | 146 | int rpcauth_uptodatecred(struct rpc_task *); |
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h index 7c91260c44a9..c50b458b8a3f 100644 --- a/include/linux/sunrpc/bc_xprt.h +++ b/include/linux/sunrpc/bc_xprt.h | |||
@@ -43,10 +43,18 @@ int bc_send(struct rpc_rqst *req); | |||
43 | */ | 43 | */ |
44 | static inline int svc_is_backchannel(const struct svc_rqst *rqstp) | 44 | static inline int svc_is_backchannel(const struct svc_rqst *rqstp) |
45 | { | 45 | { |
46 | if (rqstp->rq_server->bc_xprt) | 46 | if (rqstp->rq_server->sv_bc_xprt) |
47 | return 1; | 47 | return 1; |
48 | return 0; | 48 | return 0; |
49 | } | 49 | } |
50 | static inline struct nfs4_sessionid *bc_xprt_sid(struct svc_rqst *rqstp) | ||
51 | { | ||
52 | if (svc_is_backchannel(rqstp)) | ||
53 | return (struct nfs4_sessionid *) | ||
54 | rqstp->rq_server->sv_bc_xprt->xpt_bc_sid; | ||
55 | return NULL; | ||
56 | } | ||
57 | |||
50 | #else /* CONFIG_NFS_V4_1 */ | 58 | #else /* CONFIG_NFS_V4_1 */ |
51 | static inline int xprt_setup_backchannel(struct rpc_xprt *xprt, | 59 | static inline int xprt_setup_backchannel(struct rpc_xprt *xprt, |
52 | unsigned int min_reqs) | 60 | unsigned int min_reqs) |
@@ -59,6 +67,11 @@ static inline int svc_is_backchannel(const struct svc_rqst *rqstp) | |||
59 | return 0; | 67 | return 0; |
60 | } | 68 | } |
61 | 69 | ||
70 | static inline struct nfs4_sessionid *bc_xprt_sid(struct svc_rqst *rqstp) | ||
71 | { | ||
72 | return NULL; | ||
73 | } | ||
74 | |||
62 | static inline void xprt_free_bc_request(struct rpc_rqst *req) | 75 | static inline void xprt_free_bc_request(struct rpc_rqst *req) |
63 | { | 76 | { |
64 | } | 77 | } |
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 6950c981882d..78aa104250b7 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #ifndef _LINUX_SUNRPC_CACHE_H_ | 13 | #ifndef _LINUX_SUNRPC_CACHE_H_ |
14 | #define _LINUX_SUNRPC_CACHE_H_ | 14 | #define _LINUX_SUNRPC_CACHE_H_ |
15 | 15 | ||
16 | #include <linux/kref.h> | ||
16 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
17 | #include <asm/atomic.h> | 18 | #include <asm/atomic.h> |
18 | #include <linux/proc_fs.h> | 19 | #include <linux/proc_fs.h> |
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index a5a55f284b7d..ef9476a36ff7 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -89,8 +89,8 @@ struct rpc_version { | |||
89 | */ | 89 | */ |
90 | struct rpc_procinfo { | 90 | struct rpc_procinfo { |
91 | u32 p_proc; /* RPC procedure number */ | 91 | u32 p_proc; /* RPC procedure number */ |
92 | kxdrproc_t p_encode; /* XDR encode function */ | 92 | kxdreproc_t p_encode; /* XDR encode function */ |
93 | kxdrproc_t p_decode; /* XDR decode function */ | 93 | kxdrdproc_t p_decode; /* XDR decode function */ |
94 | unsigned int p_arglen; /* argument hdr length (u32) */ | 94 | unsigned int p_arglen; /* argument hdr length (u32) */ |
95 | unsigned int p_replen; /* reply hdr length (u32) */ | 95 | unsigned int p_replen; /* reply hdr length (u32) */ |
96 | unsigned int p_count; /* call count */ | 96 | unsigned int p_count; /* call count */ |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 5a3085b9b394..c81d4d8be3a9 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -99,7 +99,7 @@ struct svc_serv { | |||
99 | spinlock_t sv_cb_lock; /* protects the svc_cb_list */ | 99 | spinlock_t sv_cb_lock; /* protects the svc_cb_list */ |
100 | wait_queue_head_t sv_cb_waitq; /* sleep here if there are no | 100 | wait_queue_head_t sv_cb_waitq; /* sleep here if there are no |
101 | * entries in the svc_cb_list */ | 101 | * entries in the svc_cb_list */ |
102 | struct svc_xprt *bc_xprt; | 102 | struct svc_xprt *sv_bc_xprt; /* callback on fore channel */ |
103 | #endif /* CONFIG_NFS_V4_1 */ | 103 | #endif /* CONFIG_NFS_V4_1 */ |
104 | }; | 104 | }; |
105 | 105 | ||
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index aea0d438e3c7..357da5e0daa3 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h | |||
@@ -78,6 +78,7 @@ struct svc_xprt { | |||
78 | size_t xpt_remotelen; /* length of address */ | 78 | size_t xpt_remotelen; /* length of address */ |
79 | struct rpc_wait_queue xpt_bc_pending; /* backchannel wait queue */ | 79 | struct rpc_wait_queue xpt_bc_pending; /* backchannel wait queue */ |
80 | struct list_head xpt_users; /* callbacks on free */ | 80 | struct list_head xpt_users; /* callbacks on free */ |
81 | void *xpt_bc_sid; /* back channel session ID */ | ||
81 | 82 | ||
82 | struct net *xpt_net; | 83 | struct net *xpt_net; |
83 | }; | 84 | }; |
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index 498ab93a81e4..fc84b7a19ca3 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h | |||
@@ -33,8 +33,8 @@ struct xdr_netobj { | |||
33 | }; | 33 | }; |
34 | 34 | ||
35 | /* | 35 | /* |
36 | * This is the generic XDR function. rqstp is either a rpc_rqst (client | 36 | * This is the legacy generic XDR function. rqstp is either a rpc_rqst |
37 | * side) or svc_rqst pointer (server side). | 37 | * (client side) or svc_rqst pointer (server side). |
38 | * Encode functions always assume there's enough room in the buffer. | 38 | * Encode functions always assume there's enough room in the buffer. |
39 | */ | 39 | */ |
40 | typedef int (*kxdrproc_t)(void *rqstp, __be32 *data, void *obj); | 40 | typedef int (*kxdrproc_t)(void *rqstp, __be32 *data, void *obj); |
@@ -201,14 +201,22 @@ struct xdr_stream { | |||
201 | 201 | ||
202 | __be32 *end; /* end of available buffer space */ | 202 | __be32 *end; /* end of available buffer space */ |
203 | struct kvec *iov; /* pointer to the current kvec */ | 203 | struct kvec *iov; /* pointer to the current kvec */ |
204 | struct kvec scratch; /* Scratch buffer */ | ||
205 | struct page **page_ptr; /* pointer to the current page */ | ||
204 | }; | 206 | }; |
205 | 207 | ||
208 | /* | ||
209 | * These are the xdr_stream style generic XDR encode and decode functions. | ||
210 | */ | ||
211 | typedef void (*kxdreproc_t)(void *rqstp, struct xdr_stream *xdr, void *obj); | ||
212 | typedef int (*kxdrdproc_t)(void *rqstp, struct xdr_stream *xdr, void *obj); | ||
213 | |||
206 | extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); | 214 | extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); |
207 | extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes); | 215 | extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes); |
208 | extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, | 216 | extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, |
209 | unsigned int base, unsigned int len); | 217 | unsigned int base, unsigned int len); |
210 | extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); | 218 | extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); |
211 | extern __be32 *xdr_inline_peek(struct xdr_stream *xdr, size_t nbytes); | 219 | extern void xdr_set_scratch_buffer(struct xdr_stream *xdr, void *buf, size_t buflen); |
212 | extern __be32 *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); | 220 | extern __be32 *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); |
213 | extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len); | 221 | extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len); |
214 | extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); | 222 | extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 26697514c5ec..144b34be5c32 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -292,7 +292,7 @@ extern int unregister_pm_notifier(struct notifier_block *nb); | |||
292 | /* drivers/base/power/wakeup.c */ | 292 | /* drivers/base/power/wakeup.c */ |
293 | extern bool events_check_enabled; | 293 | extern bool events_check_enabled; |
294 | 294 | ||
295 | extern bool pm_check_wakeup_events(void); | 295 | extern bool pm_wakeup_pending(void); |
296 | extern bool pm_get_wakeup_count(unsigned int *count); | 296 | extern bool pm_get_wakeup_count(unsigned int *count); |
297 | extern bool pm_save_wakeup_count(unsigned int count); | 297 | extern bool pm_save_wakeup_count(unsigned int count); |
298 | #else /* !CONFIG_PM_SLEEP */ | 298 | #else /* !CONFIG_PM_SLEEP */ |
@@ -309,7 +309,7 @@ static inline int unregister_pm_notifier(struct notifier_block *nb) | |||
309 | 309 | ||
310 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) | 310 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) |
311 | 311 | ||
312 | static inline bool pm_check_wakeup_events(void) { return true; } | 312 | static inline bool pm_wakeup_pending(void) { return false; } |
313 | #endif /* !CONFIG_PM_SLEEP */ | 313 | #endif /* !CONFIG_PM_SLEEP */ |
314 | 314 | ||
315 | extern struct mutex pm_mutex; | 315 | extern struct mutex pm_mutex; |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index cacc27a0e285..18cd0684fc4e 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -127,8 +127,6 @@ extern struct trace_event_functions exit_syscall_print_funcs; | |||
127 | #define SYSCALL_TRACE_ENTER_EVENT(sname) \ | 127 | #define SYSCALL_TRACE_ENTER_EVENT(sname) \ |
128 | static struct syscall_metadata \ | 128 | static struct syscall_metadata \ |
129 | __attribute__((__aligned__(4))) __syscall_meta_##sname; \ | 129 | __attribute__((__aligned__(4))) __syscall_meta_##sname; \ |
130 | static struct ftrace_event_call \ | ||
131 | __attribute__((__aligned__(4))) event_enter_##sname; \ | ||
132 | static struct ftrace_event_call __used \ | 130 | static struct ftrace_event_call __used \ |
133 | __attribute__((__aligned__(4))) \ | 131 | __attribute__((__aligned__(4))) \ |
134 | __attribute__((section("_ftrace_events"))) \ | 132 | __attribute__((section("_ftrace_events"))) \ |
@@ -137,13 +135,12 @@ extern struct trace_event_functions exit_syscall_print_funcs; | |||
137 | .class = &event_class_syscall_enter, \ | 135 | .class = &event_class_syscall_enter, \ |
138 | .event.funcs = &enter_syscall_print_funcs, \ | 136 | .event.funcs = &enter_syscall_print_funcs, \ |
139 | .data = (void *)&__syscall_meta_##sname,\ | 137 | .data = (void *)&__syscall_meta_##sname,\ |
140 | } | 138 | }; \ |
139 | __TRACE_EVENT_FLAGS(enter_##sname, TRACE_EVENT_FL_CAP_ANY) | ||
141 | 140 | ||
142 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ | 141 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ |
143 | static struct syscall_metadata \ | 142 | static struct syscall_metadata \ |
144 | __attribute__((__aligned__(4))) __syscall_meta_##sname; \ | 143 | __attribute__((__aligned__(4))) __syscall_meta_##sname; \ |
145 | static struct ftrace_event_call \ | ||
146 | __attribute__((__aligned__(4))) event_exit_##sname; \ | ||
147 | static struct ftrace_event_call __used \ | 144 | static struct ftrace_event_call __used \ |
148 | __attribute__((__aligned__(4))) \ | 145 | __attribute__((__aligned__(4))) \ |
149 | __attribute__((section("_ftrace_events"))) \ | 146 | __attribute__((section("_ftrace_events"))) \ |
@@ -152,7 +149,8 @@ extern struct trace_event_functions exit_syscall_print_funcs; | |||
152 | .class = &event_class_syscall_exit, \ | 149 | .class = &event_class_syscall_exit, \ |
153 | .event.funcs = &exit_syscall_print_funcs, \ | 150 | .event.funcs = &exit_syscall_print_funcs, \ |
154 | .data = (void *)&__syscall_meta_##sname,\ | 151 | .data = (void *)&__syscall_meta_##sname,\ |
155 | } | 152 | }; \ |
153 | __TRACE_EVENT_FLAGS(exit_##sname, TRACE_EVENT_FL_CAP_ANY) | ||
156 | 154 | ||
157 | #define SYSCALL_METADATA(sname, nb) \ | 155 | #define SYSCALL_METADATA(sname, nb) \ |
158 | SYSCALL_TRACE_ENTER_EVENT(sname); \ | 156 | SYSCALL_TRACE_ENTER_EVENT(sname); \ |
diff --git a/include/linux/timer.h b/include/linux/timer.h index 38cf093ef62c..6abd9138beda 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -24,9 +24,9 @@ struct timer_list { | |||
24 | int slack; | 24 | int slack; |
25 | 25 | ||
26 | #ifdef CONFIG_TIMER_STATS | 26 | #ifdef CONFIG_TIMER_STATS |
27 | int start_pid; | ||
27 | void *start_site; | 28 | void *start_site; |
28 | char start_comm[16]; | 29 | char start_comm[16]; |
29 | int start_pid; | ||
30 | #endif | 30 | #endif |
31 | #ifdef CONFIG_LOCKDEP | 31 | #ifdef CONFIG_LOCKDEP |
32 | struct lockdep_map lockdep_map; | 32 | struct lockdep_map lockdep_map; |
@@ -48,12 +48,38 @@ extern struct tvec_base boot_tvec_bases; | |||
48 | #define __TIMER_LOCKDEP_MAP_INITIALIZER(_kn) | 48 | #define __TIMER_LOCKDEP_MAP_INITIALIZER(_kn) |
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | /* | ||
52 | * Note that all tvec_bases are 2 byte aligned and lower bit of | ||
53 | * base in timer_list is guaranteed to be zero. Use the LSB to | ||
54 | * indicate whether the timer is deferrable. | ||
55 | * | ||
56 | * A deferrable timer will work normally when the system is busy, but | ||
57 | * will not cause a CPU to come out of idle just to service it; instead, | ||
58 | * the timer will be serviced when the CPU eventually wakes up with a | ||
59 | * subsequent non-deferrable timer. | ||
60 | */ | ||
61 | #define TBASE_DEFERRABLE_FLAG (0x1) | ||
62 | |||
51 | #define TIMER_INITIALIZER(_function, _expires, _data) { \ | 63 | #define TIMER_INITIALIZER(_function, _expires, _data) { \ |
52 | .entry = { .prev = TIMER_ENTRY_STATIC }, \ | 64 | .entry = { .prev = TIMER_ENTRY_STATIC }, \ |
53 | .function = (_function), \ | 65 | .function = (_function), \ |
54 | .expires = (_expires), \ | 66 | .expires = (_expires), \ |
55 | .data = (_data), \ | 67 | .data = (_data), \ |
56 | .base = &boot_tvec_bases, \ | 68 | .base = &boot_tvec_bases, \ |
69 | .slack = -1, \ | ||
70 | __TIMER_LOCKDEP_MAP_INITIALIZER( \ | ||
71 | __FILE__ ":" __stringify(__LINE__)) \ | ||
72 | } | ||
73 | |||
74 | #define TBASE_MAKE_DEFERRED(ptr) ((struct tvec_base *) \ | ||
75 | ((unsigned char *)(ptr) + TBASE_DEFERRABLE_FLAG)) | ||
76 | |||
77 | #define TIMER_DEFERRED_INITIALIZER(_function, _expires, _data) {\ | ||
78 | .entry = { .prev = TIMER_ENTRY_STATIC }, \ | ||
79 | .function = (_function), \ | ||
80 | .expires = (_expires), \ | ||
81 | .data = (_data), \ | ||
82 | .base = TBASE_MAKE_DEFERRED(&boot_tvec_bases), \ | ||
57 | __TIMER_LOCKDEP_MAP_INITIALIZER( \ | 83 | __TIMER_LOCKDEP_MAP_INITIALIZER( \ |
58 | __FILE__ ":" __stringify(__LINE__)) \ | 84 | __FILE__ ":" __stringify(__LINE__)) \ |
59 | } | 85 | } |
@@ -248,11 +274,11 @@ static inline void timer_stats_timer_clear_start_info(struct timer_list *timer) | |||
248 | 274 | ||
249 | extern void add_timer(struct timer_list *timer); | 275 | extern void add_timer(struct timer_list *timer); |
250 | 276 | ||
277 | extern int try_to_del_timer_sync(struct timer_list *timer); | ||
278 | |||
251 | #ifdef CONFIG_SMP | 279 | #ifdef CONFIG_SMP |
252 | extern int try_to_del_timer_sync(struct timer_list *timer); | ||
253 | extern int del_timer_sync(struct timer_list *timer); | 280 | extern int del_timer_sync(struct timer_list *timer); |
254 | #else | 281 | #else |
255 | # define try_to_del_timer_sync(t) del_timer(t) | ||
256 | # define del_timer_sync(t) del_timer(t) | 282 | # define del_timer_sync(t) del_timer(t) |
257 | #endif | 283 | #endif |
258 | 284 | ||
diff --git a/include/linux/timerqueue.h b/include/linux/timerqueue.h new file mode 100644 index 000000000000..d24aabaca474 --- /dev/null +++ b/include/linux/timerqueue.h | |||
@@ -0,0 +1,50 @@ | |||
1 | #ifndef _LINUX_TIMERQUEUE_H | ||
2 | #define _LINUX_TIMERQUEUE_H | ||
3 | |||
4 | #include <linux/rbtree.h> | ||
5 | #include <linux/ktime.h> | ||
6 | |||
7 | |||
8 | struct timerqueue_node { | ||
9 | struct rb_node node; | ||
10 | ktime_t expires; | ||
11 | }; | ||
12 | |||
13 | struct timerqueue_head { | ||
14 | struct rb_root head; | ||
15 | struct timerqueue_node *next; | ||
16 | }; | ||
17 | |||
18 | |||
19 | extern void timerqueue_add(struct timerqueue_head *head, | ||
20 | struct timerqueue_node *node); | ||
21 | extern void timerqueue_del(struct timerqueue_head *head, | ||
22 | struct timerqueue_node *node); | ||
23 | extern struct timerqueue_node *timerqueue_iterate_next( | ||
24 | struct timerqueue_node *node); | ||
25 | |||
26 | /** | ||
27 | * timerqueue_getnext - Returns the timer with the earlies expiration time | ||
28 | * | ||
29 | * @head: head of timerqueue | ||
30 | * | ||
31 | * Returns a pointer to the timer node that has the | ||
32 | * earliest expiration time. | ||
33 | */ | ||
34 | static inline | ||
35 | struct timerqueue_node *timerqueue_getnext(struct timerqueue_head *head) | ||
36 | { | ||
37 | return head->next; | ||
38 | } | ||
39 | |||
40 | static inline void timerqueue_init(struct timerqueue_node *node) | ||
41 | { | ||
42 | RB_CLEAR_NODE(&node->node); | ||
43 | } | ||
44 | |||
45 | static inline void timerqueue_init_head(struct timerqueue_head *head) | ||
46 | { | ||
47 | head->head = RB_ROOT; | ||
48 | head->next = NULL; | ||
49 | } | ||
50 | #endif /* _LINUX_TIMERQUEUE_H */ | ||
diff --git a/include/linux/tipc.h b/include/linux/tipc.h index d10614b29d59..1eefa3f6d1f4 100644 --- a/include/linux/tipc.h +++ b/include/linux/tipc.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * include/linux/tipc.h: Include file for TIPC socket interface | 2 | * include/linux/tipc.h: Include file for TIPC socket interface |
3 | * | 3 | * |
4 | * Copyright (c) 2003-2006, Ericsson AB | 4 | * Copyright (c) 2003-2006, Ericsson AB |
5 | * Copyright (c) 2005, Wind River Systems | 5 | * Copyright (c) 2005, Wind River Systems |
6 | * All rights reserved. | 6 | * All rights reserved. |
@@ -42,7 +42,7 @@ | |||
42 | /* | 42 | /* |
43 | * TIPC addressing primitives | 43 | * TIPC addressing primitives |
44 | */ | 44 | */ |
45 | 45 | ||
46 | struct tipc_portid { | 46 | struct tipc_portid { |
47 | __u32 ref; | 47 | __u32 ref; |
48 | __u32 node; | 48 | __u32 node; |
@@ -89,7 +89,7 @@ static inline unsigned int tipc_node(__u32 addr) | |||
89 | #define TIPC_TOP_SRV 1 /* topology service name type */ | 89 | #define TIPC_TOP_SRV 1 /* topology service name type */ |
90 | #define TIPC_RESERVED_TYPES 64 /* lowest user-publishable name type */ | 90 | #define TIPC_RESERVED_TYPES 64 /* lowest user-publishable name type */ |
91 | 91 | ||
92 | /* | 92 | /* |
93 | * Publication scopes when binding port names and port name sequences | 93 | * Publication scopes when binding port names and port name sequences |
94 | */ | 94 | */ |
95 | 95 | ||
@@ -112,7 +112,7 @@ static inline unsigned int tipc_node(__u32 addr) | |||
112 | #define TIPC_HIGH_IMPORTANCE 2 | 112 | #define TIPC_HIGH_IMPORTANCE 2 |
113 | #define TIPC_CRITICAL_IMPORTANCE 3 | 113 | #define TIPC_CRITICAL_IMPORTANCE 3 |
114 | 114 | ||
115 | /* | 115 | /* |
116 | * Msg rejection/connection shutdown reasons | 116 | * Msg rejection/connection shutdown reasons |
117 | */ | 117 | */ |
118 | 118 | ||
@@ -127,9 +127,9 @@ static inline unsigned int tipc_node(__u32 addr) | |||
127 | * TIPC topology subscription service definitions | 127 | * TIPC topology subscription service definitions |
128 | */ | 128 | */ |
129 | 129 | ||
130 | #define TIPC_SUB_PORTS 0x01 /* filter for port availability */ | 130 | #define TIPC_SUB_PORTS 0x01 /* filter for port availability */ |
131 | #define TIPC_SUB_SERVICE 0x02 /* filter for service availability */ | 131 | #define TIPC_SUB_SERVICE 0x02 /* filter for service availability */ |
132 | #define TIPC_SUB_CANCEL 0x04 /* cancel a subscription */ | 132 | #define TIPC_SUB_CANCEL 0x04 /* cancel a subscription */ |
133 | #if 0 | 133 | #if 0 |
134 | /* The following filter options are not currently implemented */ | 134 | /* The following filter options are not currently implemented */ |
135 | #define TIPC_SUB_NO_BIND_EVTS 0x04 /* filter out "publish" events */ | 135 | #define TIPC_SUB_NO_BIND_EVTS 0x04 /* filter out "publish" events */ |
@@ -137,12 +137,12 @@ static inline unsigned int tipc_node(__u32 addr) | |||
137 | #define TIPC_SUB_SINGLE_EVT 0x10 /* expire after first event */ | 137 | #define TIPC_SUB_SINGLE_EVT 0x10 /* expire after first event */ |
138 | #endif | 138 | #endif |
139 | 139 | ||
140 | #define TIPC_WAIT_FOREVER ~0 /* timeout for permanent subscription */ | 140 | #define TIPC_WAIT_FOREVER (~0) /* timeout for permanent subscription */ |
141 | 141 | ||
142 | struct tipc_subscr { | 142 | struct tipc_subscr { |
143 | struct tipc_name_seq seq; /* name sequence of interest */ | 143 | struct tipc_name_seq seq; /* name sequence of interest */ |
144 | __u32 timeout; /* subscription duration (in ms) */ | 144 | __u32 timeout; /* subscription duration (in ms) */ |
145 | __u32 filter; /* bitmask of filter options */ | 145 | __u32 filter; /* bitmask of filter options */ |
146 | char usr_handle[8]; /* available for subscriber use */ | 146 | char usr_handle[8]; /* available for subscriber use */ |
147 | }; | 147 | }; |
148 | 148 | ||
diff --git a/include/linux/tipc_config.h b/include/linux/tipc_config.h index 9cde86c32412..7d42460a5e3c 100644 --- a/include/linux/tipc_config.h +++ b/include/linux/tipc_config.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * include/linux/tipc_config.h: Include file for TIPC configuration interface | 2 | * include/linux/tipc_config.h: Include file for TIPC configuration interface |
3 | * | 3 | * |
4 | * Copyright (c) 2003-2006, Ericsson AB | 4 | * Copyright (c) 2003-2006, Ericsson AB |
5 | * Copyright (c) 2005-2007, Wind River Systems | 5 | * Copyright (c) 2005-2007, Wind River Systems |
6 | * All rights reserved. | 6 | * All rights reserved. |
@@ -54,19 +54,19 @@ | |||
54 | * which specify parameters or results for the operation. | 54 | * which specify parameters or results for the operation. |
55 | * | 55 | * |
56 | * For many operations, the request and reply messages have a fixed number | 56 | * For many operations, the request and reply messages have a fixed number |
57 | * of TLVs (usually zero or one); however, some reply messages may return | 57 | * of TLVs (usually zero or one); however, some reply messages may return |
58 | * a variable number of TLVs. A failed request is denoted by the presence | 58 | * a variable number of TLVs. A failed request is denoted by the presence |
59 | * of an "error string" TLV in the reply message instead of the TLV(s) the | 59 | * of an "error string" TLV in the reply message instead of the TLV(s) the |
60 | * reply should contain if the request succeeds. | 60 | * reply should contain if the request succeeds. |
61 | */ | 61 | */ |
62 | 62 | ||
63 | /* | 63 | /* |
64 | * Public commands: | 64 | * Public commands: |
65 | * May be issued by any process. | 65 | * May be issued by any process. |
66 | * Accepted by own node, or by remote node only if remote management enabled. | 66 | * Accepted by own node, or by remote node only if remote management enabled. |
67 | */ | 67 | */ |
68 | 68 | ||
69 | #define TIPC_CMD_NOOP 0x0000 /* tx none, rx none */ | 69 | #define TIPC_CMD_NOOP 0x0000 /* tx none, rx none */ |
70 | #define TIPC_CMD_GET_NODES 0x0001 /* tx net_addr, rx node_info(s) */ | 70 | #define TIPC_CMD_GET_NODES 0x0001 /* tx net_addr, rx node_info(s) */ |
71 | #define TIPC_CMD_GET_MEDIA_NAMES 0x0002 /* tx none, rx media_name(s) */ | 71 | #define TIPC_CMD_GET_MEDIA_NAMES 0x0002 /* tx none, rx media_name(s) */ |
72 | #define TIPC_CMD_GET_BEARER_NAMES 0x0003 /* tx none, rx bearer_name(s) */ | 72 | #define TIPC_CMD_GET_BEARER_NAMES 0x0003 /* tx none, rx bearer_name(s) */ |
@@ -83,21 +83,21 @@ | |||
83 | #define TIPC_CMD_GET_LINK_PEER 0x000D /* tx link_name, rx ? */ | 83 | #define TIPC_CMD_GET_LINK_PEER 0x000D /* tx link_name, rx ? */ |
84 | #endif | 84 | #endif |
85 | 85 | ||
86 | /* | 86 | /* |
87 | * Protected commands: | 87 | * Protected commands: |
88 | * May only be issued by "network administration capable" process. | 88 | * May only be issued by "network administration capable" process. |
89 | * Accepted by own node, or by remote node only if remote management enabled | 89 | * Accepted by own node, or by remote node only if remote management enabled |
90 | * and this node is zone manager. | 90 | * and this node is zone manager. |
91 | */ | 91 | */ |
92 | 92 | ||
93 | #define TIPC_CMD_GET_REMOTE_MNG 0x4003 /* tx none, rx unsigned */ | 93 | #define TIPC_CMD_GET_REMOTE_MNG 0x4003 /* tx none, rx unsigned */ |
94 | #define TIPC_CMD_GET_MAX_PORTS 0x4004 /* tx none, rx unsigned */ | 94 | #define TIPC_CMD_GET_MAX_PORTS 0x4004 /* tx none, rx unsigned */ |
95 | #define TIPC_CMD_GET_MAX_PUBL 0x4005 /* tx none, rx unsigned */ | 95 | #define TIPC_CMD_GET_MAX_PUBL 0x4005 /* tx none, rx unsigned */ |
96 | #define TIPC_CMD_GET_MAX_SUBSCR 0x4006 /* tx none, rx unsigned */ | 96 | #define TIPC_CMD_GET_MAX_SUBSCR 0x4006 /* tx none, rx unsigned */ |
97 | #define TIPC_CMD_GET_MAX_ZONES 0x4007 /* tx none, rx unsigned */ | 97 | #define TIPC_CMD_GET_MAX_ZONES 0x4007 /* obsoleted */ |
98 | #define TIPC_CMD_GET_MAX_CLUSTERS 0x4008 /* tx none, rx unsigned */ | 98 | #define TIPC_CMD_GET_MAX_CLUSTERS 0x4008 /* obsoleted */ |
99 | #define TIPC_CMD_GET_MAX_NODES 0x4009 /* tx none, rx unsigned */ | 99 | #define TIPC_CMD_GET_MAX_NODES 0x4009 /* tx none, rx unsigned */ |
100 | #define TIPC_CMD_GET_MAX_SLAVES 0x400A /* tx none, rx unsigned */ | 100 | #define TIPC_CMD_GET_MAX_SLAVES 0x400A /* obsoleted */ |
101 | #define TIPC_CMD_GET_NETID 0x400B /* tx none, rx unsigned */ | 101 | #define TIPC_CMD_GET_NETID 0x400B /* tx none, rx unsigned */ |
102 | 102 | ||
103 | #define TIPC_CMD_ENABLE_BEARER 0x4101 /* tx bearer_config, rx none */ | 103 | #define TIPC_CMD_ENABLE_BEARER 0x4101 /* tx bearer_config, rx none */ |
@@ -116,10 +116,10 @@ | |||
116 | #define TIPC_CMD_UNBLOCK_LINK 0x4106 /* tx link_name, rx none */ | 116 | #define TIPC_CMD_UNBLOCK_LINK 0x4106 /* tx link_name, rx none */ |
117 | #endif | 117 | #endif |
118 | 118 | ||
119 | /* | 119 | /* |
120 | * Private commands: | 120 | * Private commands: |
121 | * May only be issued by "network administration capable" process. | 121 | * May only be issued by "network administration capable" process. |
122 | * Accepted by own node only; cannot be used on a remote node. | 122 | * Accepted by own node only; cannot be used on a remote node. |
123 | */ | 123 | */ |
124 | 124 | ||
125 | #define TIPC_CMD_SET_NODE_ADDR 0x8001 /* tx net_addr, rx none */ | 125 | #define TIPC_CMD_SET_NODE_ADDR 0x8001 /* tx net_addr, rx none */ |
@@ -130,10 +130,10 @@ | |||
130 | #define TIPC_CMD_SET_MAX_PORTS 0x8004 /* tx unsigned, rx none */ | 130 | #define TIPC_CMD_SET_MAX_PORTS 0x8004 /* tx unsigned, rx none */ |
131 | #define TIPC_CMD_SET_MAX_PUBL 0x8005 /* tx unsigned, rx none */ | 131 | #define TIPC_CMD_SET_MAX_PUBL 0x8005 /* tx unsigned, rx none */ |
132 | #define TIPC_CMD_SET_MAX_SUBSCR 0x8006 /* tx unsigned, rx none */ | 132 | #define TIPC_CMD_SET_MAX_SUBSCR 0x8006 /* tx unsigned, rx none */ |
133 | #define TIPC_CMD_SET_MAX_ZONES 0x8007 /* tx unsigned, rx none */ | 133 | #define TIPC_CMD_SET_MAX_ZONES 0x8007 /* obsoleted */ |
134 | #define TIPC_CMD_SET_MAX_CLUSTERS 0x8008 /* tx unsigned, rx none */ | 134 | #define TIPC_CMD_SET_MAX_CLUSTERS 0x8008 /* obsoleted */ |
135 | #define TIPC_CMD_SET_MAX_NODES 0x8009 /* tx unsigned, rx none */ | 135 | #define TIPC_CMD_SET_MAX_NODES 0x8009 /* tx unsigned, rx none */ |
136 | #define TIPC_CMD_SET_MAX_SLAVES 0x800A /* tx unsigned, rx none */ | 136 | #define TIPC_CMD_SET_MAX_SLAVES 0x800A /* obsoleted */ |
137 | #define TIPC_CMD_SET_NETID 0x800B /* tx unsigned, rx none */ | 137 | #define TIPC_CMD_SET_NETID 0x800B /* tx unsigned, rx none */ |
138 | 138 | ||
139 | /* | 139 | /* |
@@ -156,20 +156,20 @@ | |||
156 | #define TIPC_TLV_ULTRA_STRING 5 /* char[32768] (max) */ | 156 | #define TIPC_TLV_ULTRA_STRING 5 /* char[32768] (max) */ |
157 | 157 | ||
158 | #define TIPC_TLV_ERROR_STRING 16 /* char[128] containing "error code" */ | 158 | #define TIPC_TLV_ERROR_STRING 16 /* char[128] containing "error code" */ |
159 | #define TIPC_TLV_NET_ADDR 17 /* 32-bit integer denoting <Z.C.N> */ | 159 | #define TIPC_TLV_NET_ADDR 17 /* 32-bit integer denoting <Z.C.N> */ |
160 | #define TIPC_TLV_MEDIA_NAME 18 /* char[TIPC_MAX_MEDIA_NAME] */ | 160 | #define TIPC_TLV_MEDIA_NAME 18 /* char[TIPC_MAX_MEDIA_NAME] */ |
161 | #define TIPC_TLV_BEARER_NAME 19 /* char[TIPC_MAX_BEARER_NAME] */ | 161 | #define TIPC_TLV_BEARER_NAME 19 /* char[TIPC_MAX_BEARER_NAME] */ |
162 | #define TIPC_TLV_LINK_NAME 20 /* char[TIPC_MAX_LINK_NAME] */ | 162 | #define TIPC_TLV_LINK_NAME 20 /* char[TIPC_MAX_LINK_NAME] */ |
163 | #define TIPC_TLV_NODE_INFO 21 /* struct tipc_node_info */ | 163 | #define TIPC_TLV_NODE_INFO 21 /* struct tipc_node_info */ |
164 | #define TIPC_TLV_LINK_INFO 22 /* struct tipc_link_info */ | 164 | #define TIPC_TLV_LINK_INFO 22 /* struct tipc_link_info */ |
165 | #define TIPC_TLV_BEARER_CONFIG 23 /* struct tipc_bearer_config */ | 165 | #define TIPC_TLV_BEARER_CONFIG 23 /* struct tipc_bearer_config */ |
166 | #define TIPC_TLV_LINK_CONFIG 24 /* struct tipc_link_config */ | 166 | #define TIPC_TLV_LINK_CONFIG 24 /* struct tipc_link_config */ |
167 | #define TIPC_TLV_NAME_TBL_QUERY 25 /* struct tipc_name_table_query */ | 167 | #define TIPC_TLV_NAME_TBL_QUERY 25 /* struct tipc_name_table_query */ |
168 | #define TIPC_TLV_PORT_REF 26 /* 32-bit port reference */ | 168 | #define TIPC_TLV_PORT_REF 26 /* 32-bit port reference */ |
169 | 169 | ||
170 | /* | 170 | /* |
171 | * Maximum sizes of TIPC bearer-related names (including terminating NUL) | 171 | * Maximum sizes of TIPC bearer-related names (including terminating NUL) |
172 | */ | 172 | */ |
173 | 173 | ||
174 | #define TIPC_MAX_MEDIA_NAME 16 /* format = media */ | 174 | #define TIPC_MAX_MEDIA_NAME 16 /* format = media */ |
175 | #define TIPC_MAX_IF_NAME 16 /* format = interface */ | 175 | #define TIPC_MAX_IF_NAME 16 /* format = interface */ |
@@ -234,7 +234,7 @@ struct tipc_name_table_query { | |||
234 | }; | 234 | }; |
235 | 235 | ||
236 | /* | 236 | /* |
237 | * The error string TLV is a null-terminated string describing the cause | 237 | * The error string TLV is a null-terminated string describing the cause |
238 | * of the request failure. To simplify error processing (and to save space) | 238 | * of the request failure. To simplify error processing (and to save space) |
239 | * the first character of the string can be a special error code character | 239 | * the first character of the string can be a special error code character |
240 | * (lying by the range 0x80 to 0xFF) which represents a pre-defined reason. | 240 | * (lying by the range 0x80 to 0xFF) which represents a pre-defined reason. |
@@ -254,16 +254,11 @@ struct tipc_link_create { | |||
254 | struct tipc_media_addr peer_addr; | 254 | struct tipc_media_addr peer_addr; |
255 | char bearer_name[TIPC_MAX_BEARER_NAME]; | 255 | char bearer_name[TIPC_MAX_BEARER_NAME]; |
256 | }; | 256 | }; |
257 | |||
258 | struct tipc_route_info { | ||
259 | __u32 dest; | ||
260 | __u32 router; | ||
261 | }; | ||
262 | #endif | 257 | #endif |
263 | 258 | ||
264 | /* | 259 | /* |
265 | * A TLV consists of a descriptor, followed by the TLV value. | 260 | * A TLV consists of a descriptor, followed by the TLV value. |
266 | * TLV descriptor fields are stored in network byte order; | 261 | * TLV descriptor fields are stored in network byte order; |
267 | * TLV values must also be stored in network byte order (where applicable). | 262 | * TLV values must also be stored in network byte order (where applicable). |
268 | * TLV descriptors must be aligned to addresses which are multiple of 4, | 263 | * TLV descriptors must be aligned to addresses which are multiple of 4, |
269 | * so up to 3 bytes of padding may exist at the end of the TLV value area. | 264 | * so up to 3 bytes of padding may exist at the end of the TLV value area. |
@@ -299,7 +294,7 @@ static inline int TLV_OK(const void *tlv, __u16 space) | |||
299 | 294 | ||
300 | static inline int TLV_CHECK(const void *tlv, __u16 space, __u16 exp_type) | 295 | static inline int TLV_CHECK(const void *tlv, __u16 space, __u16 exp_type) |
301 | { | 296 | { |
302 | return TLV_OK(tlv, space) && | 297 | return TLV_OK(tlv, space) && |
303 | (ntohs(((struct tlv_desc *)tlv)->tlv_type) == exp_type); | 298 | (ntohs(((struct tlv_desc *)tlv)->tlv_type) == exp_type); |
304 | } | 299 | } |
305 | 300 | ||
@@ -318,7 +313,7 @@ static inline int TLV_SET(void *tlv, __u16 type, void *data, __u16 len) | |||
318 | } | 313 | } |
319 | 314 | ||
320 | /* | 315 | /* |
321 | * A TLV list descriptor simplifies processing of messages | 316 | * A TLV list descriptor simplifies processing of messages |
322 | * containing multiple TLVs. | 317 | * containing multiple TLVs. |
323 | */ | 318 | */ |
324 | 319 | ||
@@ -327,15 +322,15 @@ struct tlv_list_desc { | |||
327 | __u32 tlv_space; /* # bytes from curr TLV to list end */ | 322 | __u32 tlv_space; /* # bytes from curr TLV to list end */ |
328 | }; | 323 | }; |
329 | 324 | ||
330 | static inline void TLV_LIST_INIT(struct tlv_list_desc *list, | 325 | static inline void TLV_LIST_INIT(struct tlv_list_desc *list, |
331 | void *data, __u32 space) | 326 | void *data, __u32 space) |
332 | { | 327 | { |
333 | list->tlv_ptr = (struct tlv_desc *)data; | 328 | list->tlv_ptr = (struct tlv_desc *)data; |
334 | list->tlv_space = space; | 329 | list->tlv_space = space; |
335 | } | 330 | } |
336 | 331 | ||
337 | static inline int TLV_LIST_EMPTY(struct tlv_list_desc *list) | 332 | static inline int TLV_LIST_EMPTY(struct tlv_list_desc *list) |
338 | { | 333 | { |
339 | return (list->tlv_space == 0); | 334 | return (list->tlv_space == 0); |
340 | } | 335 | } |
341 | 336 | ||
@@ -353,7 +348,7 @@ static inline void TLV_LIST_STEP(struct tlv_list_desc *list) | |||
353 | { | 348 | { |
354 | __u16 tlv_space = TLV_ALIGN(ntohs(list->tlv_ptr->tlv_len)); | 349 | __u16 tlv_space = TLV_ALIGN(ntohs(list->tlv_ptr->tlv_len)); |
355 | 350 | ||
356 | list->tlv_ptr = (struct tlv_desc *)((char *)list->tlv_ptr + tlv_space); | 351 | list->tlv_ptr = (struct tlv_desc *)((char *)list->tlv_ptr + tlv_space); |
357 | list->tlv_space -= tlv_space; | 352 | list->tlv_space -= tlv_space; |
358 | } | 353 | } |
359 | 354 | ||
@@ -377,15 +372,14 @@ struct tipc_genlmsghdr { | |||
377 | #define TIPC_GENL_HDRLEN NLMSG_ALIGN(sizeof(struct tipc_genlmsghdr)) | 372 | #define TIPC_GENL_HDRLEN NLMSG_ALIGN(sizeof(struct tipc_genlmsghdr)) |
378 | 373 | ||
379 | /* | 374 | /* |
380 | * Configuration messages exchanged via TIPC sockets use the TIPC configuration | 375 | * Configuration messages exchanged via TIPC sockets use the TIPC configuration |
381 | * message header, which is defined below. This structure is analogous | 376 | * message header, which is defined below. This structure is analogous |
382 | * to the Netlink message header, but fields are stored in network byte order | 377 | * to the Netlink message header, but fields are stored in network byte order |
383 | * and no padding is permitted between the header and the message data | 378 | * and no padding is permitted between the header and the message data |
384 | * that follows. | 379 | * that follows. |
385 | */ | 380 | */ |
386 | 381 | ||
387 | struct tipc_cfg_msg_hdr | 382 | struct tipc_cfg_msg_hdr { |
388 | { | ||
389 | __be32 tcm_len; /* Message length (including header) */ | 383 | __be32 tcm_len; /* Message length (including header) */ |
390 | __be16 tcm_type; /* Command type */ | 384 | __be16 tcm_type; /* Command type */ |
391 | __be16 tcm_flags; /* Additional flags */ | 385 | __be16 tcm_flags; /* Additional flags */ |
diff --git a/include/linux/tpm.h b/include/linux/tpm.h index ac5d1c1285d9..fdc718abf83b 100644 --- a/include/linux/tpm.h +++ b/include/linux/tpm.h | |||
@@ -31,6 +31,7 @@ | |||
31 | 31 | ||
32 | extern int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf); | 32 | extern int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf); |
33 | extern int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash); | 33 | extern int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash); |
34 | extern int tpm_send(u32 chip_num, void *cmd, size_t buflen); | ||
34 | #else | 35 | #else |
35 | static inline int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf) { | 36 | static inline int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf) { |
36 | return -ENODEV; | 37 | return -ENODEV; |
@@ -38,5 +39,8 @@ static inline int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf) { | |||
38 | static inline int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash) { | 39 | static inline int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash) { |
39 | return -ENODEV; | 40 | return -ENODEV; |
40 | } | 41 | } |
42 | static inline int tpm_send(u32 chip_num, void *cmd, size_t buflen) { | ||
43 | return -ENODEV; | ||
44 | } | ||
41 | #endif | 45 | #endif |
42 | #endif | 46 | #endif |
diff --git a/include/linux/tpm_command.h b/include/linux/tpm_command.h new file mode 100644 index 000000000000..727512e249b5 --- /dev/null +++ b/include/linux/tpm_command.h | |||
@@ -0,0 +1,28 @@ | |||
1 | #ifndef __LINUX_TPM_COMMAND_H__ | ||
2 | #define __LINUX_TPM_COMMAND_H__ | ||
3 | |||
4 | /* | ||
5 | * TPM Command constants from specifications at | ||
6 | * http://www.trustedcomputinggroup.org | ||
7 | */ | ||
8 | |||
9 | /* Command TAGS */ | ||
10 | #define TPM_TAG_RQU_COMMAND 193 | ||
11 | #define TPM_TAG_RQU_AUTH1_COMMAND 194 | ||
12 | #define TPM_TAG_RQU_AUTH2_COMMAND 195 | ||
13 | #define TPM_TAG_RSP_COMMAND 196 | ||
14 | #define TPM_TAG_RSP_AUTH1_COMMAND 197 | ||
15 | #define TPM_TAG_RSP_AUTH2_COMMAND 198 | ||
16 | |||
17 | /* Command Ordinals */ | ||
18 | #define TPM_ORD_GETRANDOM 70 | ||
19 | #define TPM_ORD_OSAP 11 | ||
20 | #define TPM_ORD_OIAP 10 | ||
21 | #define TPM_ORD_SEAL 23 | ||
22 | #define TPM_ORD_UNSEAL 24 | ||
23 | |||
24 | /* Other constants */ | ||
25 | #define SRKHANDLE 0x40000000 | ||
26 | #define TPM_NONCE_SIZE 20 | ||
27 | |||
28 | #endif | ||
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index a4a90b6726ce..c6814616653b 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
@@ -32,7 +32,7 @@ struct tracepoint { | |||
32 | int state; /* State. */ | 32 | int state; /* State. */ |
33 | void (*regfunc)(void); | 33 | void (*regfunc)(void); |
34 | void (*unregfunc)(void); | 34 | void (*unregfunc)(void); |
35 | struct tracepoint_func *funcs; | 35 | struct tracepoint_func __rcu *funcs; |
36 | } __attribute__((aligned(32))); /* | 36 | } __attribute__((aligned(32))); /* |
37 | * Aligned on 32 bytes because it is | 37 | * Aligned on 32 bytes because it is |
38 | * globally visible and gcc happily | 38 | * globally visible and gcc happily |
@@ -106,6 +106,7 @@ static inline void tracepoint_update_probe_range(struct tracepoint *begin, | |||
106 | 106 | ||
107 | #define TP_PROTO(args...) args | 107 | #define TP_PROTO(args...) args |
108 | #define TP_ARGS(args...) args | 108 | #define TP_ARGS(args...) args |
109 | #define TP_CONDITION(args...) args | ||
109 | 110 | ||
110 | #ifdef CONFIG_TRACEPOINTS | 111 | #ifdef CONFIG_TRACEPOINTS |
111 | 112 | ||
@@ -119,12 +120,14 @@ static inline void tracepoint_update_probe_range(struct tracepoint *begin, | |||
119 | * as "(void *, void)". The DECLARE_TRACE_NOARGS() will pass in just | 120 | * as "(void *, void)". The DECLARE_TRACE_NOARGS() will pass in just |
120 | * "void *data", where as the DECLARE_TRACE() will pass in "void *data, proto". | 121 | * "void *data", where as the DECLARE_TRACE() will pass in "void *data, proto". |
121 | */ | 122 | */ |
122 | #define __DO_TRACE(tp, proto, args) \ | 123 | #define __DO_TRACE(tp, proto, args, cond) \ |
123 | do { \ | 124 | do { \ |
124 | struct tracepoint_func *it_func_ptr; \ | 125 | struct tracepoint_func *it_func_ptr; \ |
125 | void *it_func; \ | 126 | void *it_func; \ |
126 | void *__data; \ | 127 | void *__data; \ |
127 | \ | 128 | \ |
129 | if (!(cond)) \ | ||
130 | return; \ | ||
128 | rcu_read_lock_sched_notrace(); \ | 131 | rcu_read_lock_sched_notrace(); \ |
129 | it_func_ptr = rcu_dereference_sched((tp)->funcs); \ | 132 | it_func_ptr = rcu_dereference_sched((tp)->funcs); \ |
130 | if (it_func_ptr) { \ | 133 | if (it_func_ptr) { \ |
@@ -142,7 +145,7 @@ static inline void tracepoint_update_probe_range(struct tracepoint *begin, | |||
142 | * not add unwanted padding between the beginning of the section and the | 145 | * not add unwanted padding between the beginning of the section and the |
143 | * structure. Force alignment to the same alignment as the section start. | 146 | * structure. Force alignment to the same alignment as the section start. |
144 | */ | 147 | */ |
145 | #define __DECLARE_TRACE(name, proto, args, data_proto, data_args) \ | 148 | #define __DECLARE_TRACE(name, proto, args, cond, data_proto, data_args) \ |
146 | extern struct tracepoint __tracepoint_##name; \ | 149 | extern struct tracepoint __tracepoint_##name; \ |
147 | static inline void trace_##name(proto) \ | 150 | static inline void trace_##name(proto) \ |
148 | { \ | 151 | { \ |
@@ -151,7 +154,8 @@ static inline void tracepoint_update_probe_range(struct tracepoint *begin, | |||
151 | do_trace: \ | 154 | do_trace: \ |
152 | __DO_TRACE(&__tracepoint_##name, \ | 155 | __DO_TRACE(&__tracepoint_##name, \ |
153 | TP_PROTO(data_proto), \ | 156 | TP_PROTO(data_proto), \ |
154 | TP_ARGS(data_args)); \ | 157 | TP_ARGS(data_args), \ |
158 | TP_CONDITION(cond)); \ | ||
155 | } \ | 159 | } \ |
156 | static inline int \ | 160 | static inline int \ |
157 | register_trace_##name(void (*probe)(data_proto), void *data) \ | 161 | register_trace_##name(void (*probe)(data_proto), void *data) \ |
@@ -186,7 +190,7 @@ do_trace: \ | |||
186 | EXPORT_SYMBOL(__tracepoint_##name) | 190 | EXPORT_SYMBOL(__tracepoint_##name) |
187 | 191 | ||
188 | #else /* !CONFIG_TRACEPOINTS */ | 192 | #else /* !CONFIG_TRACEPOINTS */ |
189 | #define __DECLARE_TRACE(name, proto, args, data_proto, data_args) \ | 193 | #define __DECLARE_TRACE(name, proto, args, cond, data_proto, data_args) \ |
190 | static inline void trace_##name(proto) \ | 194 | static inline void trace_##name(proto) \ |
191 | { } \ | 195 | { } \ |
192 | static inline int \ | 196 | static inline int \ |
@@ -227,13 +231,20 @@ do_trace: \ | |||
227 | * "void *__data, proto" as the callback prototype. | 231 | * "void *__data, proto" as the callback prototype. |
228 | */ | 232 | */ |
229 | #define DECLARE_TRACE_NOARGS(name) \ | 233 | #define DECLARE_TRACE_NOARGS(name) \ |
230 | __DECLARE_TRACE(name, void, , void *__data, __data) | 234 | __DECLARE_TRACE(name, void, , 1, void *__data, __data) |
231 | 235 | ||
232 | #define DECLARE_TRACE(name, proto, args) \ | 236 | #define DECLARE_TRACE(name, proto, args) \ |
233 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \ | 237 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), 1, \ |
234 | PARAMS(void *__data, proto), \ | 238 | PARAMS(void *__data, proto), \ |
235 | PARAMS(__data, args)) | 239 | PARAMS(__data, args)) |
236 | 240 | ||
241 | #define DECLARE_TRACE_CONDITION(name, proto, args, cond) \ | ||
242 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), PARAMS(cond), \ | ||
243 | PARAMS(void *__data, proto), \ | ||
244 | PARAMS(__data, args)) | ||
245 | |||
246 | #define TRACE_EVENT_FLAGS(event, flag) | ||
247 | |||
237 | #endif /* DECLARE_TRACE */ | 248 | #endif /* DECLARE_TRACE */ |
238 | 249 | ||
239 | #ifndef TRACE_EVENT | 250 | #ifndef TRACE_EVENT |
@@ -315,7 +326,7 @@ do_trace: \ | |||
315 | * memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN); | 326 | * memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN); |
316 | * __entry->next_pid = next->pid; | 327 | * __entry->next_pid = next->pid; |
317 | * __entry->next_prio = next->prio; | 328 | * __entry->next_prio = next->prio; |
318 | * ) | 329 | * ), |
319 | * | 330 | * |
320 | * * | 331 | * * |
321 | * * Formatted output of a trace record via TP_printk(). | 332 | * * Formatted output of a trace record via TP_printk(). |
@@ -347,11 +358,21 @@ do_trace: \ | |||
347 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) | 358 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) |
348 | #define DEFINE_EVENT_PRINT(template, name, proto, args, print) \ | 359 | #define DEFINE_EVENT_PRINT(template, name, proto, args, print) \ |
349 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) | 360 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) |
361 | #define DEFINE_EVENT_CONDITION(template, name, proto, \ | ||
362 | args, cond) \ | ||
363 | DECLARE_TRACE_CONDITION(name, PARAMS(proto), \ | ||
364 | PARAMS(args), PARAMS(cond)) | ||
350 | 365 | ||
351 | #define TRACE_EVENT(name, proto, args, struct, assign, print) \ | 366 | #define TRACE_EVENT(name, proto, args, struct, assign, print) \ |
352 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) | 367 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) |
353 | #define TRACE_EVENT_FN(name, proto, args, struct, \ | 368 | #define TRACE_EVENT_FN(name, proto, args, struct, \ |
354 | assign, print, reg, unreg) \ | 369 | assign, print, reg, unreg) \ |
355 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) | 370 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) |
371 | #define TRACE_EVENT_CONDITION(name, proto, args, cond, \ | ||
372 | struct, assign, print) \ | ||
373 | DECLARE_TRACE_CONDITION(name, PARAMS(proto), \ | ||
374 | PARAMS(args), PARAMS(cond)) | ||
375 | |||
376 | #define TRACE_EVENT_FLAGS(event, flag) | ||
356 | 377 | ||
357 | #endif /* ifdef TRACE_EVENT (see note above) */ | 378 | #endif /* ifdef TRACE_EVENT (see note above) */ |
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index db2d227694da..c3d43eb4150c 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h | |||
@@ -102,7 +102,7 @@ | |||
102 | * unsigned int cmd, unsigned long arg); | 102 | * unsigned int cmd, unsigned long arg); |
103 | * | 103 | * |
104 | * This routine allows the tty driver to implement | 104 | * This routine allows the tty driver to implement |
105 | * device-specific ioctl's. If the ioctl number passed in cmd | 105 | * device-specific ioctls. If the ioctl number passed in cmd |
106 | * is not recognized by the driver, it should return ENOIOCTLCMD. | 106 | * is not recognized by the driver, it should return ENOIOCTLCMD. |
107 | * | 107 | * |
108 | * Optional | 108 | * Optional |
@@ -167,12 +167,12 @@ | |||
167 | * | 167 | * |
168 | * void (*hangup)(struct tty_struct *tty); | 168 | * void (*hangup)(struct tty_struct *tty); |
169 | * | 169 | * |
170 | * This routine notifies the tty driver that it should hangup the | 170 | * This routine notifies the tty driver that it should hang up the |
171 | * tty device. | 171 | * tty device. |
172 | * | 172 | * |
173 | * Optional: | 173 | * Optional: |
174 | * | 174 | * |
175 | * int (*break_ctl)(struct tty_stuct *tty, int state); | 175 | * int (*break_ctl)(struct tty_struct *tty, int state); |
176 | * | 176 | * |
177 | * This optional routine requests the tty driver to turn on or | 177 | * This optional routine requests the tty driver to turn on or |
178 | * off BREAK status on the RS-232 port. If state is -1, | 178 | * off BREAK status on the RS-232 port. If state is -1, |
@@ -235,6 +235,7 @@ | |||
235 | #include <linux/fs.h> | 235 | #include <linux/fs.h> |
236 | #include <linux/list.h> | 236 | #include <linux/list.h> |
237 | #include <linux/cdev.h> | 237 | #include <linux/cdev.h> |
238 | #include <linux/termios.h> | ||
238 | 239 | ||
239 | struct tty_struct; | 240 | struct tty_struct; |
240 | struct tty_driver; | 241 | struct tty_driver; |
@@ -357,7 +358,7 @@ static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d) | |||
357 | * overruns, either.) | 358 | * overruns, either.) |
358 | * | 359 | * |
359 | * TTY_DRIVER_DYNAMIC_DEV --- if set, the individual tty devices need | 360 | * TTY_DRIVER_DYNAMIC_DEV --- if set, the individual tty devices need |
360 | * to be registered with a call to tty_register_driver() when the | 361 | * to be registered with a call to tty_register_device() when the |
361 | * device is found in the system and unregistered with a call to | 362 | * device is found in the system and unregistered with a call to |
362 | * tty_unregister_device() so the devices will be show up | 363 | * tty_unregister_device() so the devices will be show up |
363 | * properly in sysfs. If not set, driver->num entries will be | 364 | * properly in sysfs. If not set, driver->num entries will be |
diff --git a/include/linux/uinput.h b/include/linux/uinput.h index 05f7fed2b173..d28c726ede4f 100644 --- a/include/linux/uinput.h +++ b/include/linux/uinput.h | |||
@@ -104,6 +104,7 @@ struct uinput_ff_erase { | |||
104 | #define UI_SET_FFBIT _IOW(UINPUT_IOCTL_BASE, 107, int) | 104 | #define UI_SET_FFBIT _IOW(UINPUT_IOCTL_BASE, 107, int) |
105 | #define UI_SET_PHYS _IOW(UINPUT_IOCTL_BASE, 108, char*) | 105 | #define UI_SET_PHYS _IOW(UINPUT_IOCTL_BASE, 108, char*) |
106 | #define UI_SET_SWBIT _IOW(UINPUT_IOCTL_BASE, 109, int) | 106 | #define UI_SET_SWBIT _IOW(UINPUT_IOCTL_BASE, 109, int) |
107 | #define UI_SET_PROPBIT _IOW(UINPUT_IOCTL_BASE, 110, int) | ||
107 | 108 | ||
108 | #define UI_BEGIN_FF_UPLOAD _IOWR(UINPUT_IOCTL_BASE, 200, struct uinput_ff_upload) | 109 | #define UI_BEGIN_FF_UPLOAD _IOWR(UINPUT_IOCTL_BASE, 200, struct uinput_ff_upload) |
109 | #define UI_END_FF_UPLOAD _IOW(UINPUT_IOCTL_BASE, 201, struct uinput_ff_upload) | 110 | #define UI_END_FF_UPLOAD _IOW(UINPUT_IOCTL_BASE, 201, struct uinput_ff_upload) |
diff --git a/include/linux/usb.h b/include/linux/usb.h index a28eb2592577..bd69b65f3356 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/completion.h> /* for struct completion */ | 20 | #include <linux/completion.h> /* for struct completion */ |
21 | #include <linux/sched.h> /* for current && schedule_timeout */ | 21 | #include <linux/sched.h> /* for current && schedule_timeout */ |
22 | #include <linux/mutex.h> /* for struct mutex */ | 22 | #include <linux/mutex.h> /* for struct mutex */ |
23 | #include <linux/pm_runtime.h> /* for runtime PM */ | ||
23 | 24 | ||
24 | struct usb_device; | 25 | struct usb_device; |
25 | struct usb_driver; | 26 | struct usb_driver; |
@@ -411,8 +412,6 @@ struct usb_tt; | |||
411 | * @quirks: quirks of the whole device | 412 | * @quirks: quirks of the whole device |
412 | * @urbnum: number of URBs submitted for the whole device | 413 | * @urbnum: number of URBs submitted for the whole device |
413 | * @active_duration: total time device is not suspended | 414 | * @active_duration: total time device is not suspended |
414 | * @last_busy: time of last use | ||
415 | * @autosuspend_delay: in jiffies | ||
416 | * @connect_time: time device was first connected | 415 | * @connect_time: time device was first connected |
417 | * @do_remote_wakeup: remote wakeup should be enabled | 416 | * @do_remote_wakeup: remote wakeup should be enabled |
418 | * @reset_resume: needs reset instead of resume | 417 | * @reset_resume: needs reset instead of resume |
@@ -485,8 +484,6 @@ struct usb_device { | |||
485 | unsigned long active_duration; | 484 | unsigned long active_duration; |
486 | 485 | ||
487 | #ifdef CONFIG_PM | 486 | #ifdef CONFIG_PM |
488 | unsigned long last_busy; | ||
489 | int autosuspend_delay; | ||
490 | unsigned long connect_time; | 487 | unsigned long connect_time; |
491 | 488 | ||
492 | unsigned do_remote_wakeup:1; | 489 | unsigned do_remote_wakeup:1; |
@@ -531,7 +528,7 @@ extern void usb_autopm_put_interface_no_suspend(struct usb_interface *intf); | |||
531 | 528 | ||
532 | static inline void usb_mark_last_busy(struct usb_device *udev) | 529 | static inline void usb_mark_last_busy(struct usb_device *udev) |
533 | { | 530 | { |
534 | udev->last_busy = jiffies; | 531 | pm_runtime_mark_last_busy(&udev->dev); |
535 | } | 532 | } |
536 | 533 | ||
537 | #else | 534 | #else |
diff --git a/include/linux/usb/ch11.h b/include/linux/usb/ch11.h index 119194c85d10..10ec0699bea4 100644 --- a/include/linux/usb/ch11.h +++ b/include/linux/usb/ch11.h | |||
@@ -28,6 +28,13 @@ | |||
28 | #define HUB_STOP_TT 11 | 28 | #define HUB_STOP_TT 11 |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * Hub class additional requests defined by USB 3.0 spec | ||
32 | * See USB 3.0 spec Table 10-6 | ||
33 | */ | ||
34 | #define HUB_SET_DEPTH 12 | ||
35 | #define HUB_GET_PORT_ERR_COUNT 13 | ||
36 | |||
37 | /* | ||
31 | * Hub Class feature numbers | 38 | * Hub Class feature numbers |
32 | * See USB 2.0 spec Table 11-17 | 39 | * See USB 2.0 spec Table 11-17 |
33 | */ | 40 | */ |
@@ -56,6 +63,20 @@ | |||
56 | #define USB_PORT_FEAT_C_PORT_L1 23 | 63 | #define USB_PORT_FEAT_C_PORT_L1 23 |
57 | 64 | ||
58 | /* | 65 | /* |
66 | * Port feature selectors added by USB 3.0 spec. | ||
67 | * See USB 3.0 spec Table 10-7 | ||
68 | */ | ||
69 | #define USB_PORT_FEAT_LINK_STATE 5 | ||
70 | #define USB_PORT_FEAT_U1_TIMEOUT 23 | ||
71 | #define USB_PORT_FEAT_U2_TIMEOUT 24 | ||
72 | #define USB_PORT_FEAT_C_LINK_STATE 25 | ||
73 | #define USB_PORT_FEAT_C_CONFIG_ERR 26 | ||
74 | #define USB_PORT_FEAT_REMOTE_WAKE_MASK 27 | ||
75 | #define USB_PORT_FEAT_BH_PORT_RESET 28 | ||
76 | #define USB_PORT_FEAT_C_BH_PORT_RESET 29 | ||
77 | #define USB_PORT_FEAT_FORCE_LINKPM_ACCEPT 30 | ||
78 | |||
79 | /* | ||
59 | * Hub Status and Hub Change results | 80 | * Hub Status and Hub Change results |
60 | * See USB 2.0 spec Table 11-19 and Table 11-20 | 81 | * See USB 2.0 spec Table 11-19 and Table 11-20 |
61 | */ | 82 | */ |
@@ -84,6 +105,32 @@ struct usb_port_status { | |||
84 | #define USB_PORT_STAT_SUPER_SPEED 0x8000 /* Linux-internal */ | 105 | #define USB_PORT_STAT_SUPER_SPEED 0x8000 /* Linux-internal */ |
85 | 106 | ||
86 | /* | 107 | /* |
108 | * Additions to wPortStatus bit field from USB 3.0 | ||
109 | * See USB 3.0 spec Table 10-10 | ||
110 | */ | ||
111 | #define USB_PORT_STAT_LINK_STATE 0x01e0 | ||
112 | #define USB_SS_PORT_STAT_POWER 0x0200 | ||
113 | #define USB_PORT_STAT_SPEED_5GBPS 0x0000 | ||
114 | /* Valid only if port is enabled */ | ||
115 | |||
116 | /* | ||
117 | * Definitions for PORT_LINK_STATE values | ||
118 | * (bits 5-8) in wPortStatus | ||
119 | */ | ||
120 | #define USB_SS_PORT_LS_U0 0x0000 | ||
121 | #define USB_SS_PORT_LS_U1 0x0020 | ||
122 | #define USB_SS_PORT_LS_U2 0x0040 | ||
123 | #define USB_SS_PORT_LS_U3 0x0060 | ||
124 | #define USB_SS_PORT_LS_SS_DISABLED 0x0080 | ||
125 | #define USB_SS_PORT_LS_RX_DETECT 0x00a0 | ||
126 | #define USB_SS_PORT_LS_SS_INACTIVE 0x00c0 | ||
127 | #define USB_SS_PORT_LS_POLLING 0x00e0 | ||
128 | #define USB_SS_PORT_LS_RECOVERY 0x0100 | ||
129 | #define USB_SS_PORT_LS_HOT_RESET 0x0120 | ||
130 | #define USB_SS_PORT_LS_COMP_MOD 0x0140 | ||
131 | #define USB_SS_PORT_LS_LOOPBACK 0x0160 | ||
132 | |||
133 | /* | ||
87 | * wPortChange bit field | 134 | * wPortChange bit field |
88 | * See USB 2.0 spec Table 11-22 | 135 | * See USB 2.0 spec Table 11-22 |
89 | * Bits 0 to 4 shown, bits 5 to 15 are reserved | 136 | * Bits 0 to 4 shown, bits 5 to 15 are reserved |
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index f917bbbc8901..ab461948b579 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -124,6 +124,16 @@ | |||
124 | #define USB_DEVICE_DEBUG_MODE 6 /* (special devices only) */ | 124 | #define USB_DEVICE_DEBUG_MODE 6 /* (special devices only) */ |
125 | 125 | ||
126 | /* | 126 | /* |
127 | * Test Mode Selectors | ||
128 | * See USB 2.0 spec Table 9-7 | ||
129 | */ | ||
130 | #define TEST_J 1 | ||
131 | #define TEST_K 2 | ||
132 | #define TEST_SE0_NAK 3 | ||
133 | #define TEST_PACKET 4 | ||
134 | #define TEST_FORCE_EN 5 | ||
135 | |||
136 | /* | ||
127 | * New Feature Selectors as added by USB 3.0 | 137 | * New Feature Selectors as added by USB 3.0 |
128 | * See USB 3.0 spec Table 9-6 | 138 | * See USB 3.0 spec Table 9-6 |
129 | */ | 139 | */ |
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 0b6e751ea0b1..dd6ee49a0844 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h | |||
@@ -471,6 +471,10 @@ extern void usb_ep0_reinit(struct usb_device *); | |||
471 | 471 | ||
472 | /*-------------------------------------------------------------------------*/ | 472 | /*-------------------------------------------------------------------------*/ |
473 | 473 | ||
474 | /* class requests from USB 3.0 hub spec, table 10-5 */ | ||
475 | #define SetHubDepth (0x3000 | HUB_SET_DEPTH) | ||
476 | #define GetPortErrorCount (0x8000 | HUB_GET_PORT_ERR_COUNT) | ||
477 | |||
474 | /* | 478 | /* |
475 | * Generic bandwidth allocation constants/support | 479 | * Generic bandwidth allocation constants/support |
476 | */ | 480 | */ |
diff --git a/include/linux/usb/msm_hsusb.h b/include/linux/usb/msm_hsusb.h new file mode 100644 index 000000000000..3675e03b1539 --- /dev/null +++ b/include/linux/usb/msm_hsusb.h | |||
@@ -0,0 +1,112 @@ | |||
1 | /* linux/include/asm-arm/arch-msm/hsusb.h | ||
2 | * | ||
3 | * Copyright (C) 2008 Google, Inc. | ||
4 | * Author: Brian Swetland <swetland@google.com> | ||
5 | * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved. | ||
6 | * | ||
7 | * This software is licensed under the terms of the GNU General Public | ||
8 | * License version 2, as published by the Free Software Foundation, and | ||
9 | * may be copied, distributed, and modified under those terms. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef __ASM_ARCH_MSM_HSUSB_H | ||
19 | #define __ASM_ARCH_MSM_HSUSB_H | ||
20 | |||
21 | #include <linux/types.h> | ||
22 | #include <linux/usb/otg.h> | ||
23 | |||
24 | /** | ||
25 | * Supported USB modes | ||
26 | * | ||
27 | * USB_PERIPHERAL Only peripheral mode is supported. | ||
28 | * USB_HOST Only host mode is supported. | ||
29 | * USB_OTG OTG mode is supported. | ||
30 | * | ||
31 | */ | ||
32 | enum usb_mode_type { | ||
33 | USB_NONE = 0, | ||
34 | USB_PERIPHERAL, | ||
35 | USB_HOST, | ||
36 | USB_OTG, | ||
37 | }; | ||
38 | |||
39 | /** | ||
40 | * OTG control | ||
41 | * | ||
42 | * OTG_NO_CONTROL Id/VBUS notifications not required. Useful in host | ||
43 | * only configuration. | ||
44 | * OTG_PHY_CONTROL Id/VBUS notifications comes form USB PHY. | ||
45 | * OTG_PMIC_CONTROL Id/VBUS notifications comes from PMIC hardware. | ||
46 | * OTG_USER_CONTROL Id/VBUS notifcations comes from User via sysfs. | ||
47 | * | ||
48 | */ | ||
49 | enum otg_control_type { | ||
50 | OTG_NO_CONTROL = 0, | ||
51 | OTG_PHY_CONTROL, | ||
52 | OTG_PMIC_CONTROL, | ||
53 | OTG_USER_CONTROL, | ||
54 | }; | ||
55 | |||
56 | /** | ||
57 | * struct msm_otg_platform_data - platform device data | ||
58 | * for msm72k_otg driver. | ||
59 | * @phy_init_seq: PHY configuration sequence. val, reg pairs | ||
60 | * terminated by -1. | ||
61 | * @vbus_power: VBUS power on/off routine. | ||
62 | * @power_budget: VBUS power budget in mA (0 will be treated as 500mA). | ||
63 | * @mode: Supported mode (OTG/peripheral/host). | ||
64 | * @otg_control: OTG switch controlled by user/Id pin | ||
65 | * @default_mode: Default operational mode. Applicable only if | ||
66 | * OTG switch is controller by user. | ||
67 | * | ||
68 | */ | ||
69 | struct msm_otg_platform_data { | ||
70 | int *phy_init_seq; | ||
71 | void (*vbus_power)(bool on); | ||
72 | unsigned power_budget; | ||
73 | enum usb_mode_type mode; | ||
74 | enum otg_control_type otg_control; | ||
75 | enum usb_mode_type default_mode; | ||
76 | void (*setup_gpio)(enum usb_otg_state state); | ||
77 | }; | ||
78 | |||
79 | /** | ||
80 | * struct msm_otg: OTG driver data. Shared by HCD and DCD. | ||
81 | * @otg: USB OTG Transceiver structure. | ||
82 | * @pdata: otg device platform data. | ||
83 | * @irq: IRQ number assigned for HSUSB controller. | ||
84 | * @clk: clock struct of usb_hs_clk. | ||
85 | * @pclk: clock struct of usb_hs_pclk. | ||
86 | * @phy_reset_clk: clock struct of usb_phy_clk. | ||
87 | * @core_clk: clock struct of usb_hs_core_clk. | ||
88 | * @regs: ioremapped register base address. | ||
89 | * @inputs: OTG state machine inputs(Id, SessValid etc). | ||
90 | * @sm_work: OTG state machine work. | ||
91 | * @in_lpm: indicates low power mode (LPM) state. | ||
92 | * @async_int: Async interrupt arrived. | ||
93 | * | ||
94 | */ | ||
95 | struct msm_otg { | ||
96 | struct otg_transceiver otg; | ||
97 | struct msm_otg_platform_data *pdata; | ||
98 | int irq; | ||
99 | struct clk *clk; | ||
100 | struct clk *pclk; | ||
101 | struct clk *phy_reset_clk; | ||
102 | struct clk *core_clk; | ||
103 | void __iomem *regs; | ||
104 | #define ID 0 | ||
105 | #define B_SESS_VLD 1 | ||
106 | unsigned long inputs; | ||
107 | struct work_struct sm_work; | ||
108 | atomic_t in_lpm; | ||
109 | int async_int; | ||
110 | }; | ||
111 | |||
112 | #endif | ||
diff --git a/include/linux/usb/msm_hsusb_hw.h b/include/linux/usb/msm_hsusb_hw.h new file mode 100644 index 000000000000..b92e17349c7b --- /dev/null +++ b/include/linux/usb/msm_hsusb_hw.h | |||
@@ -0,0 +1,59 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007 Google, Inc. | ||
3 | * Author: Brian Swetland <swetland@google.com> | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #ifndef __LINUX_USB_GADGET_MSM72K_UDC_H__ | ||
17 | #define __LINUX_USB_GADGET_MSM72K_UDC_H__ | ||
18 | |||
19 | #ifdef CONFIG_ARCH_MSM7X00A | ||
20 | #define USB_SBUSCFG (MSM_USB_BASE + 0x0090) | ||
21 | #else | ||
22 | #define USB_AHBBURST (MSM_USB_BASE + 0x0090) | ||
23 | #define USB_AHBMODE (MSM_USB_BASE + 0x0098) | ||
24 | #endif | ||
25 | #define USB_CAPLENGTH (MSM_USB_BASE + 0x0100) /* 8 bit */ | ||
26 | |||
27 | #define USB_USBCMD (MSM_USB_BASE + 0x0140) | ||
28 | #define USB_PORTSC (MSM_USB_BASE + 0x0184) | ||
29 | #define USB_OTGSC (MSM_USB_BASE + 0x01A4) | ||
30 | #define USB_USBMODE (MSM_USB_BASE + 0x01A8) | ||
31 | |||
32 | #define USBCMD_RESET 2 | ||
33 | #define USB_USBINTR (MSM_USB_BASE + 0x0148) | ||
34 | |||
35 | #define PORTSC_PHCD (1 << 23) /* phy suspend mode */ | ||
36 | #define PORTSC_PTS_MASK (3 << 30) | ||
37 | #define PORTSC_PTS_ULPI (3 << 30) | ||
38 | |||
39 | #define USB_ULPI_VIEWPORT (MSM_USB_BASE + 0x0170) | ||
40 | #define ULPI_RUN (1 << 30) | ||
41 | #define ULPI_WRITE (1 << 29) | ||
42 | #define ULPI_READ (0 << 29) | ||
43 | #define ULPI_ADDR(n) (((n) & 255) << 16) | ||
44 | #define ULPI_DATA(n) ((n) & 255) | ||
45 | #define ULPI_DATA_READ(n) (((n) >> 8) & 255) | ||
46 | |||
47 | #define ASYNC_INTR_CTRL (1 << 29) /* Enable async interrupt */ | ||
48 | #define ULPI_STP_CTRL (1 << 30) /* Block communication with PHY */ | ||
49 | |||
50 | /* OTG definitions */ | ||
51 | #define OTGSC_INTSTS_MASK (0x7f << 16) | ||
52 | #define OTGSC_ID (1 << 8) | ||
53 | #define OTGSC_BSV (1 << 11) | ||
54 | #define OTGSC_IDIS (1 << 16) | ||
55 | #define OTGSC_BSVIS (1 << 19) | ||
56 | #define OTGSC_IDIE (1 << 24) | ||
57 | #define OTGSC_BSVIE (1 << 27) | ||
58 | |||
59 | #endif /* __LINUX_USB_GADGET_MSM72K_UDC_H__ */ | ||
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h index 2387f9fc8138..eb505250940a 100644 --- a/include/linux/usb/musb.h +++ b/include/linux/usb/musb.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * Inventra (Multidrop) Highspeed Dual-Role Controllers: (M)HDRC. | 3 | * Inventra (Multidrop) Highspeed Dual-Role Controllers: (M)HDRC. |
4 | * | 4 | * |
5 | * Board initialization should put one of these into dev->platform_data, | 5 | * Board initialization should put one of these into dev->platform_data, |
6 | * probably on some platform_device named "musb_hdrc". It encapsulates | 6 | * probably on some platform_device named "musb-hdrc". It encapsulates |
7 | * key configuration differences between boards. | 7 | * key configuration differences between boards. |
8 | */ | 8 | */ |
9 | 9 | ||
@@ -120,14 +120,14 @@ struct musb_hdrc_platform_data { | |||
120 | /* Power the device on or off */ | 120 | /* Power the device on or off */ |
121 | int (*set_power)(int state); | 121 | int (*set_power)(int state); |
122 | 122 | ||
123 | /* Turn device clock on or off */ | ||
124 | int (*set_clock)(struct clk *clock, int is_on); | ||
125 | |||
126 | /* MUSB configuration-specific details */ | 123 | /* MUSB configuration-specific details */ |
127 | struct musb_hdrc_config *config; | 124 | struct musb_hdrc_config *config; |
128 | 125 | ||
129 | /* Architecture specific board data */ | 126 | /* Architecture specific board data */ |
130 | void *board_data; | 127 | void *board_data; |
128 | |||
129 | /* Platform specific struct musb_ops pointer */ | ||
130 | const void *platform_ops; | ||
131 | }; | 131 | }; |
132 | 132 | ||
133 | 133 | ||
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index 0a5b3711e502..a1a1e7a73ec9 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h | |||
@@ -116,7 +116,7 @@ struct otg_transceiver { | |||
116 | /* for board-specific init logic */ | 116 | /* for board-specific init logic */ |
117 | extern int otg_set_transceiver(struct otg_transceiver *); | 117 | extern int otg_set_transceiver(struct otg_transceiver *); |
118 | 118 | ||
119 | #if defined(CONFIG_NOP_USB_XCEIV) || defined(CONFIG_NOP_USB_XCEIV_MODULE) | 119 | #if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE)) |
120 | /* sometimes transceivers are accessed only through e.g. ULPI */ | 120 | /* sometimes transceivers are accessed only through e.g. ULPI */ |
121 | extern void usb_nop_xceiv_register(void); | 121 | extern void usb_nop_xceiv_register(void); |
122 | extern void usb_nop_xceiv_unregister(void); | 122 | extern void usb_nop_xceiv_unregister(void); |
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 7ae27a473818..44842c8d38c0 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
@@ -97,6 +97,12 @@ struct driver_info { | |||
97 | 97 | ||
98 | #define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */ | 98 | #define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */ |
99 | 99 | ||
100 | /* | ||
101 | * Indicates to usbnet, that USB driver accumulates multiple IP packets. | ||
102 | * Affects statistic (counters) and short packet handling. | ||
103 | */ | ||
104 | #define FLAG_MULTI_PACKET 0x1000 | ||
105 | |||
100 | /* init device ... can sleep, or cause probe() failure */ | 106 | /* init device ... can sleep, or cause probe() failure */ |
101 | int (*bind)(struct usbnet *, struct usb_interface *); | 107 | int (*bind)(struct usbnet *, struct usb_interface *); |
102 | 108 | ||
diff --git a/include/linux/vga_switcheroo.h b/include/linux/vga_switcheroo.h index ae9ab13b963d..4b9a7f596f92 100644 --- a/include/linux/vga_switcheroo.h +++ b/include/linux/vga_switcheroo.h | |||
@@ -33,6 +33,7 @@ struct vga_switcheroo_handler { | |||
33 | void vga_switcheroo_unregister_client(struct pci_dev *dev); | 33 | void vga_switcheroo_unregister_client(struct pci_dev *dev); |
34 | int vga_switcheroo_register_client(struct pci_dev *dev, | 34 | int vga_switcheroo_register_client(struct pci_dev *dev, |
35 | void (*set_gpu_state)(struct pci_dev *dev, enum vga_switcheroo_state), | 35 | void (*set_gpu_state)(struct pci_dev *dev, enum vga_switcheroo_state), |
36 | void (*reprobe)(struct pci_dev *dev), | ||
36 | bool (*can_switch)(struct pci_dev *dev)); | 37 | bool (*can_switch)(struct pci_dev *dev)); |
37 | 38 | ||
38 | void vga_switcheroo_client_fb_set(struct pci_dev *dev, | 39 | void vga_switcheroo_client_fb_set(struct pci_dev *dev, |
@@ -48,6 +49,7 @@ int vga_switcheroo_process_delayed_switch(void); | |||
48 | static inline void vga_switcheroo_unregister_client(struct pci_dev *dev) {} | 49 | static inline void vga_switcheroo_unregister_client(struct pci_dev *dev) {} |
49 | static inline int vga_switcheroo_register_client(struct pci_dev *dev, | 50 | static inline int vga_switcheroo_register_client(struct pci_dev *dev, |
50 | void (*set_gpu_state)(struct pci_dev *dev, enum vga_switcheroo_state), | 51 | void (*set_gpu_state)(struct pci_dev *dev, enum vga_switcheroo_state), |
52 | void (*reprobe)(struct pci_dev *dev), | ||
51 | bool (*can_switch)(struct pci_dev *dev)) { return 0; } | 53 | bool (*can_switch)(struct pci_dev *dev)) { return 0; } |
52 | static inline void vga_switcheroo_client_fb_set(struct pci_dev *dev, struct fb_info *info) {} | 54 | static inline void vga_switcheroo_client_fb_set(struct pci_dev *dev, struct fb_info *info) {} |
53 | static inline int vga_switcheroo_register_handler(struct vga_switcheroo_handler *handler) { return 0; } | 55 | static inline int vga_switcheroo_register_handler(struct vga_switcheroo_handler *handler) { return 0; } |
diff --git a/include/linux/via-core.h b/include/linux/via-core.h index 38bffd8ccca5..9c21cdf3e3b3 100644 --- a/include/linux/via-core.h +++ b/include/linux/via-core.h | |||
@@ -60,6 +60,21 @@ struct via_port_cfg { | |||
60 | }; | 60 | }; |
61 | 61 | ||
62 | /* | 62 | /* |
63 | * Allow subdevs to register suspend/resume hooks. | ||
64 | */ | ||
65 | #ifdef CONFIG_PM | ||
66 | struct viafb_pm_hooks { | ||
67 | struct list_head list; | ||
68 | int (*suspend)(void *private); | ||
69 | int (*resume)(void *private); | ||
70 | void *private; | ||
71 | }; | ||
72 | |||
73 | void viafb_pm_register(struct viafb_pm_hooks *hooks); | ||
74 | void viafb_pm_unregister(struct viafb_pm_hooks *hooks); | ||
75 | #endif /* CONFIG_PM */ | ||
76 | |||
77 | /* | ||
63 | * This is the global viafb "device" containing stuff needed by | 78 | * This is the global viafb "device" containing stuff needed by |
64 | * all subdevs. | 79 | * all subdevs. |
65 | */ | 80 | */ |
diff --git a/include/linux/videodev.h b/include/linux/videodev.h deleted file mode 100644 index b19eab140977..000000000000 --- a/include/linux/videodev.h +++ /dev/null | |||
@@ -1,340 +0,0 @@ | |||
1 | /* | ||
2 | * Video for Linux version 1 - OBSOLETE | ||
3 | * | ||
4 | * Header file for v4l1 drivers and applications, for | ||
5 | * Linux kernels 2.2.x or 2.4.x. | ||
6 | * | ||
7 | * Provides header for legacy drivers and applications | ||
8 | * | ||
9 | * See http://linuxtv.org for more info | ||
10 | * | ||
11 | */ | ||
12 | #ifndef __LINUX_VIDEODEV_H | ||
13 | #define __LINUX_VIDEODEV_H | ||
14 | |||
15 | #include <linux/types.h> | ||
16 | #include <linux/ioctl.h> | ||
17 | #include <linux/videodev2.h> | ||
18 | |||
19 | #if defined(__MIN_V4L1) && defined (__KERNEL__) | ||
20 | |||
21 | /* | ||
22 | * Used by those V4L2 core functions that need a minimum V4L1 support, | ||
23 | * in order to allow V4L1 Compatibilty code compilation. | ||
24 | */ | ||
25 | |||
26 | struct video_mbuf | ||
27 | { | ||
28 | int size; /* Total memory to map */ | ||
29 | int frames; /* Frames */ | ||
30 | int offsets[VIDEO_MAX_FRAME]; | ||
31 | }; | ||
32 | |||
33 | #define VIDIOCGMBUF _IOR('v',20, struct video_mbuf) /* Memory map buffer info */ | ||
34 | |||
35 | #else | ||
36 | #if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__) | ||
37 | |||
38 | #define VID_TYPE_CAPTURE 1 /* Can capture */ | ||
39 | #define VID_TYPE_TUNER 2 /* Can tune */ | ||
40 | #define VID_TYPE_TELETEXT 4 /* Does teletext */ | ||
41 | #define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */ | ||
42 | #define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */ | ||
43 | #define VID_TYPE_CLIPPING 32 /* Can clip */ | ||
44 | #define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */ | ||
45 | #define VID_TYPE_SCALES 128 /* Scalable */ | ||
46 | #define VID_TYPE_MONOCHROME 256 /* Monochrome only */ | ||
47 | #define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */ | ||
48 | #define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */ | ||
49 | #define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */ | ||
50 | #define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */ | ||
51 | #define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */ | ||
52 | |||
53 | struct video_capability | ||
54 | { | ||
55 | char name[32]; | ||
56 | int type; | ||
57 | int channels; /* Num channels */ | ||
58 | int audios; /* Num audio devices */ | ||
59 | int maxwidth; /* Supported width */ | ||
60 | int maxheight; /* And height */ | ||
61 | int minwidth; /* Supported width */ | ||
62 | int minheight; /* And height */ | ||
63 | }; | ||
64 | |||
65 | |||
66 | struct video_channel | ||
67 | { | ||
68 | int channel; | ||
69 | char name[32]; | ||
70 | int tuners; | ||
71 | __u32 flags; | ||
72 | #define VIDEO_VC_TUNER 1 /* Channel has a tuner */ | ||
73 | #define VIDEO_VC_AUDIO 2 /* Channel has audio */ | ||
74 | __u16 type; | ||
75 | #define VIDEO_TYPE_TV 1 | ||
76 | #define VIDEO_TYPE_CAMERA 2 | ||
77 | __u16 norm; /* Norm set by channel */ | ||
78 | }; | ||
79 | |||
80 | struct video_tuner | ||
81 | { | ||
82 | int tuner; | ||
83 | char name[32]; | ||
84 | unsigned long rangelow, rangehigh; /* Tuner range */ | ||
85 | __u32 flags; | ||
86 | #define VIDEO_TUNER_PAL 1 | ||
87 | #define VIDEO_TUNER_NTSC 2 | ||
88 | #define VIDEO_TUNER_SECAM 4 | ||
89 | #define VIDEO_TUNER_LOW 8 /* Uses KHz not MHz */ | ||
90 | #define VIDEO_TUNER_NORM 16 /* Tuner can set norm */ | ||
91 | #define VIDEO_TUNER_STEREO_ON 128 /* Tuner is seeing stereo */ | ||
92 | #define VIDEO_TUNER_RDS_ON 256 /* Tuner is seeing an RDS datastream */ | ||
93 | #define VIDEO_TUNER_MBS_ON 512 /* Tuner is seeing an MBS datastream */ | ||
94 | __u16 mode; /* PAL/NTSC/SECAM/OTHER */ | ||
95 | #define VIDEO_MODE_PAL 0 | ||
96 | #define VIDEO_MODE_NTSC 1 | ||
97 | #define VIDEO_MODE_SECAM 2 | ||
98 | #define VIDEO_MODE_AUTO 3 | ||
99 | __u16 signal; /* Signal strength 16bit scale */ | ||
100 | }; | ||
101 | |||
102 | struct video_picture | ||
103 | { | ||
104 | __u16 brightness; | ||
105 | __u16 hue; | ||
106 | __u16 colour; | ||
107 | __u16 contrast; | ||
108 | __u16 whiteness; /* Black and white only */ | ||
109 | __u16 depth; /* Capture depth */ | ||
110 | __u16 palette; /* Palette in use */ | ||
111 | #define VIDEO_PALETTE_GREY 1 /* Linear greyscale */ | ||
112 | #define VIDEO_PALETTE_HI240 2 /* High 240 cube (BT848) */ | ||
113 | #define VIDEO_PALETTE_RGB565 3 /* 565 16 bit RGB */ | ||
114 | #define VIDEO_PALETTE_RGB24 4 /* 24bit RGB */ | ||
115 | #define VIDEO_PALETTE_RGB32 5 /* 32bit RGB */ | ||
116 | #define VIDEO_PALETTE_RGB555 6 /* 555 15bit RGB */ | ||
117 | #define VIDEO_PALETTE_YUV422 7 /* YUV422 capture */ | ||
118 | #define VIDEO_PALETTE_YUYV 8 | ||
119 | #define VIDEO_PALETTE_UYVY 9 /* The great thing about standards is ... */ | ||
120 | #define VIDEO_PALETTE_YUV420 10 | ||
121 | #define VIDEO_PALETTE_YUV411 11 /* YUV411 capture */ | ||
122 | #define VIDEO_PALETTE_RAW 12 /* RAW capture (BT848) */ | ||
123 | #define VIDEO_PALETTE_YUV422P 13 /* YUV 4:2:2 Planar */ | ||
124 | #define VIDEO_PALETTE_YUV411P 14 /* YUV 4:1:1 Planar */ | ||
125 | #define VIDEO_PALETTE_YUV420P 15 /* YUV 4:2:0 Planar */ | ||
126 | #define VIDEO_PALETTE_YUV410P 16 /* YUV 4:1:0 Planar */ | ||
127 | #define VIDEO_PALETTE_PLANAR 13 /* start of planar entries */ | ||
128 | #define VIDEO_PALETTE_COMPONENT 7 /* start of component entries */ | ||
129 | }; | ||
130 | |||
131 | struct video_audio | ||
132 | { | ||
133 | int audio; /* Audio channel */ | ||
134 | __u16 volume; /* If settable */ | ||
135 | __u16 bass, treble; | ||
136 | __u32 flags; | ||
137 | #define VIDEO_AUDIO_MUTE 1 | ||
138 | #define VIDEO_AUDIO_MUTABLE 2 | ||
139 | #define VIDEO_AUDIO_VOLUME 4 | ||
140 | #define VIDEO_AUDIO_BASS 8 | ||
141 | #define VIDEO_AUDIO_TREBLE 16 | ||
142 | #define VIDEO_AUDIO_BALANCE 32 | ||
143 | char name[16]; | ||
144 | #define VIDEO_SOUND_MONO 1 | ||
145 | #define VIDEO_SOUND_STEREO 2 | ||
146 | #define VIDEO_SOUND_LANG1 4 | ||
147 | #define VIDEO_SOUND_LANG2 8 | ||
148 | __u16 mode; | ||
149 | __u16 balance; /* Stereo balance */ | ||
150 | __u16 step; /* Step actual volume uses */ | ||
151 | }; | ||
152 | |||
153 | struct video_clip | ||
154 | { | ||
155 | __s32 x,y; | ||
156 | __s32 width, height; | ||
157 | struct video_clip *next; /* For user use/driver use only */ | ||
158 | }; | ||
159 | |||
160 | struct video_window | ||
161 | { | ||
162 | __u32 x,y; /* Position of window */ | ||
163 | __u32 width,height; /* Its size */ | ||
164 | __u32 chromakey; | ||
165 | __u32 flags; | ||
166 | struct video_clip __user *clips; /* Set only */ | ||
167 | int clipcount; | ||
168 | #define VIDEO_WINDOW_INTERLACE 1 | ||
169 | #define VIDEO_WINDOW_CHROMAKEY 16 /* Overlay by chromakey */ | ||
170 | #define VIDEO_CLIP_BITMAP -1 | ||
171 | /* bitmap is 1024x625, a '1' bit represents a clipped pixel */ | ||
172 | #define VIDEO_CLIPMAP_SIZE (128 * 625) | ||
173 | }; | ||
174 | |||
175 | struct video_capture | ||
176 | { | ||
177 | __u32 x,y; /* Offsets into image */ | ||
178 | __u32 width, height; /* Area to capture */ | ||
179 | __u16 decimation; /* Decimation divider */ | ||
180 | __u16 flags; /* Flags for capture */ | ||
181 | #define VIDEO_CAPTURE_ODD 0 /* Temporal */ | ||
182 | #define VIDEO_CAPTURE_EVEN 1 | ||
183 | }; | ||
184 | |||
185 | struct video_buffer | ||
186 | { | ||
187 | void *base; | ||
188 | int height,width; | ||
189 | int depth; | ||
190 | int bytesperline; | ||
191 | }; | ||
192 | |||
193 | struct video_mmap | ||
194 | { | ||
195 | unsigned int frame; /* Frame (0 - n) for double buffer */ | ||
196 | int height,width; | ||
197 | unsigned int format; /* should be VIDEO_PALETTE_* */ | ||
198 | }; | ||
199 | |||
200 | struct video_key | ||
201 | { | ||
202 | __u8 key[8]; | ||
203 | __u32 flags; | ||
204 | }; | ||
205 | |||
206 | struct video_mbuf | ||
207 | { | ||
208 | int size; /* Total memory to map */ | ||
209 | int frames; /* Frames */ | ||
210 | int offsets[VIDEO_MAX_FRAME]; | ||
211 | }; | ||
212 | |||
213 | #define VIDEO_NO_UNIT (-1) | ||
214 | |||
215 | struct video_unit | ||
216 | { | ||
217 | int video; /* Video minor */ | ||
218 | int vbi; /* VBI minor */ | ||
219 | int radio; /* Radio minor */ | ||
220 | int audio; /* Audio minor */ | ||
221 | int teletext; /* Teletext minor */ | ||
222 | }; | ||
223 | |||
224 | struct vbi_format { | ||
225 | __u32 sampling_rate; /* in Hz */ | ||
226 | __u32 samples_per_line; | ||
227 | __u32 sample_format; /* VIDEO_PALETTE_RAW only (1 byte) */ | ||
228 | __s32 start[2]; /* starting line for each frame */ | ||
229 | __u32 count[2]; /* count of lines for each frame */ | ||
230 | __u32 flags; | ||
231 | #define VBI_UNSYNC 1 /* can distingues between top/bottom field */ | ||
232 | #define VBI_INTERLACED 2 /* lines are interlaced */ | ||
233 | }; | ||
234 | |||
235 | /* video_info is biased towards hardware mpeg encode/decode */ | ||
236 | /* but it could apply generically to any hardware compressor/decompressor */ | ||
237 | struct video_info | ||
238 | { | ||
239 | __u32 frame_count; /* frames output since decode/encode began */ | ||
240 | __u32 h_size; /* current unscaled horizontal size */ | ||
241 | __u32 v_size; /* current unscaled veritcal size */ | ||
242 | __u32 smpte_timecode; /* current SMPTE timecode (for current GOP) */ | ||
243 | __u32 picture_type; /* current picture type */ | ||
244 | __u32 temporal_reference; /* current temporal reference */ | ||
245 | __u8 user_data[256]; /* user data last found in compressed stream */ | ||
246 | /* user_data[0] contains user data flags, user_data[1] has count */ | ||
247 | }; | ||
248 | |||
249 | /* generic structure for setting playback modes */ | ||
250 | struct video_play_mode | ||
251 | { | ||
252 | int mode; | ||
253 | int p1; | ||
254 | int p2; | ||
255 | }; | ||
256 | |||
257 | /* for loading microcode / fpga programming */ | ||
258 | struct video_code | ||
259 | { | ||
260 | char loadwhat[16]; /* name or tag of file being passed */ | ||
261 | int datasize; | ||
262 | __u8 *data; | ||
263 | }; | ||
264 | |||
265 | #define VIDIOCGCAP _IOR('v',1,struct video_capability) /* Get capabilities */ | ||
266 | #define VIDIOCGCHAN _IOWR('v',2,struct video_channel) /* Get channel info (sources) */ | ||
267 | #define VIDIOCSCHAN _IOW('v',3,struct video_channel) /* Set channel */ | ||
268 | #define VIDIOCGTUNER _IOWR('v',4,struct video_tuner) /* Get tuner abilities */ | ||
269 | #define VIDIOCSTUNER _IOW('v',5,struct video_tuner) /* Tune the tuner for the current channel */ | ||
270 | #define VIDIOCGPICT _IOR('v',6,struct video_picture) /* Get picture properties */ | ||
271 | #define VIDIOCSPICT _IOW('v',7,struct video_picture) /* Set picture properties */ | ||
272 | #define VIDIOCCAPTURE _IOW('v',8,int) /* Start, end capture */ | ||
273 | #define VIDIOCGWIN _IOR('v',9, struct video_window) /* Get the video overlay window */ | ||
274 | #define VIDIOCSWIN _IOW('v',10, struct video_window) /* Set the video overlay window - passes clip list for hardware smarts , chromakey etc */ | ||
275 | #define VIDIOCGFBUF _IOR('v',11, struct video_buffer) /* Get frame buffer */ | ||
276 | #define VIDIOCSFBUF _IOW('v',12, struct video_buffer) /* Set frame buffer - root only */ | ||
277 | #define VIDIOCKEY _IOR('v',13, struct video_key) /* Video key event - to dev 255 is to all - cuts capture on all DMA windows with this key (0xFFFFFFFF == all) */ | ||
278 | #define VIDIOCGFREQ _IOR('v',14, unsigned long) /* Set tuner */ | ||
279 | #define VIDIOCSFREQ _IOW('v',15, unsigned long) /* Set tuner */ | ||
280 | #define VIDIOCGAUDIO _IOR('v',16, struct video_audio) /* Get audio info */ | ||
281 | #define VIDIOCSAUDIO _IOW('v',17, struct video_audio) /* Audio source, mute etc */ | ||
282 | #define VIDIOCSYNC _IOW('v',18, int) /* Sync with mmap grabbing */ | ||
283 | #define VIDIOCMCAPTURE _IOW('v',19, struct video_mmap) /* Grab frames */ | ||
284 | #define VIDIOCGMBUF _IOR('v',20, struct video_mbuf) /* Memory map buffer info */ | ||
285 | #define VIDIOCGUNIT _IOR('v',21, struct video_unit) /* Get attached units */ | ||
286 | #define VIDIOCGCAPTURE _IOR('v',22, struct video_capture) /* Get subcapture */ | ||
287 | #define VIDIOCSCAPTURE _IOW('v',23, struct video_capture) /* Set subcapture */ | ||
288 | #define VIDIOCSPLAYMODE _IOW('v',24, struct video_play_mode) /* Set output video mode/feature */ | ||
289 | #define VIDIOCSWRITEMODE _IOW('v',25, int) /* Set write mode */ | ||
290 | #define VIDIOCGPLAYINFO _IOR('v',26, struct video_info) /* Get current playback info from hardware */ | ||
291 | #define VIDIOCSMICROCODE _IOW('v',27, struct video_code) /* Load microcode into hardware */ | ||
292 | #define VIDIOCGVBIFMT _IOR('v',28, struct vbi_format) /* Get VBI information */ | ||
293 | #define VIDIOCSVBIFMT _IOW('v',29, struct vbi_format) /* Set VBI information */ | ||
294 | |||
295 | |||
296 | #define BASE_VIDIOCPRIVATE 192 /* 192-255 are private */ | ||
297 | |||
298 | /* VIDIOCSWRITEMODE */ | ||
299 | #define VID_WRITE_MPEG_AUD 0 | ||
300 | #define VID_WRITE_MPEG_VID 1 | ||
301 | #define VID_WRITE_OSD 2 | ||
302 | #define VID_WRITE_TTX 3 | ||
303 | #define VID_WRITE_CC 4 | ||
304 | #define VID_WRITE_MJPEG 5 | ||
305 | |||
306 | /* VIDIOCSPLAYMODE */ | ||
307 | #define VID_PLAY_VID_OUT_MODE 0 | ||
308 | /* p1: = VIDEO_MODE_PAL, VIDEO_MODE_NTSC, etc ... */ | ||
309 | #define VID_PLAY_GENLOCK 1 | ||
310 | /* p1: 0 = OFF, 1 = ON */ | ||
311 | /* p2: GENLOCK FINE DELAY value */ | ||
312 | #define VID_PLAY_NORMAL 2 | ||
313 | #define VID_PLAY_PAUSE 3 | ||
314 | #define VID_PLAY_SINGLE_FRAME 4 | ||
315 | #define VID_PLAY_FAST_FORWARD 5 | ||
316 | #define VID_PLAY_SLOW_MOTION 6 | ||
317 | #define VID_PLAY_IMMEDIATE_NORMAL 7 | ||
318 | #define VID_PLAY_SWITCH_CHANNELS 8 | ||
319 | #define VID_PLAY_FREEZE_FRAME 9 | ||
320 | #define VID_PLAY_STILL_MODE 10 | ||
321 | #define VID_PLAY_MASTER_MODE 11 | ||
322 | /* p1: see below */ | ||
323 | #define VID_PLAY_MASTER_NONE 1 | ||
324 | #define VID_PLAY_MASTER_VIDEO 2 | ||
325 | #define VID_PLAY_MASTER_AUDIO 3 | ||
326 | #define VID_PLAY_ACTIVE_SCANLINES 12 | ||
327 | /* p1 = first active; p2 = last active */ | ||
328 | #define VID_PLAY_RESET 13 | ||
329 | #define VID_PLAY_END_MARK 14 | ||
330 | |||
331 | #endif /* CONFIG_VIDEO_V4L1_COMPAT */ | ||
332 | #endif /* __MIN_V4L1 */ | ||
333 | |||
334 | #endif /* __LINUX_VIDEODEV_H */ | ||
335 | |||
336 | /* | ||
337 | * Local variables: | ||
338 | * c-basic-offset: 8 | ||
339 | * End: | ||
340 | */ | ||
diff --git a/include/linux/wl12xx.h b/include/linux/wl12xx.h index 4f902e1908aa..bebb8efea0a6 100644 --- a/include/linux/wl12xx.h +++ b/include/linux/wl12xx.h | |||
@@ -24,6 +24,14 @@ | |||
24 | #ifndef _LINUX_WL12XX_H | 24 | #ifndef _LINUX_WL12XX_H |
25 | #define _LINUX_WL12XX_H | 25 | #define _LINUX_WL12XX_H |
26 | 26 | ||
27 | /* The board reference clock values */ | ||
28 | enum { | ||
29 | WL12XX_REFCLOCK_19 = 0, /* 19.2 MHz */ | ||
30 | WL12XX_REFCLOCK_26 = 1, /* 26 MHz */ | ||
31 | WL12XX_REFCLOCK_38 = 2, /* 38.4 MHz */ | ||
32 | WL12XX_REFCLOCK_54 = 3, /* 54 MHz */ | ||
33 | }; | ||
34 | |||
27 | struct wl12xx_platform_data { | 35 | struct wl12xx_platform_data { |
28 | void (*set_power)(bool enable); | 36 | void (*set_power)(bool enable); |
29 | /* SDIO only: IRQ number if WLAN_IRQ line is used, 0 for SDIO IRQs */ | 37 | /* SDIO only: IRQ number if WLAN_IRQ line is used, 0 for SDIO IRQs */ |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 0c0771f06bfa..1ac11586a2f5 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -127,12 +127,20 @@ struct execute_work { | |||
127 | .timer = TIMER_INITIALIZER(NULL, 0, 0), \ | 127 | .timer = TIMER_INITIALIZER(NULL, 0, 0), \ |
128 | } | 128 | } |
129 | 129 | ||
130 | #define __DEFERRED_WORK_INITIALIZER(n, f) { \ | ||
131 | .work = __WORK_INITIALIZER((n).work, (f)), \ | ||
132 | .timer = TIMER_DEFERRED_INITIALIZER(NULL, 0, 0), \ | ||
133 | } | ||
134 | |||
130 | #define DECLARE_WORK(n, f) \ | 135 | #define DECLARE_WORK(n, f) \ |
131 | struct work_struct n = __WORK_INITIALIZER(n, f) | 136 | struct work_struct n = __WORK_INITIALIZER(n, f) |
132 | 137 | ||
133 | #define DECLARE_DELAYED_WORK(n, f) \ | 138 | #define DECLARE_DELAYED_WORK(n, f) \ |
134 | struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f) | 139 | struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f) |
135 | 140 | ||
141 | #define DECLARE_DEFERRED_WORK(n, f) \ | ||
142 | struct delayed_work n = __DEFERRED_WORK_INITIALIZER(n, f) | ||
143 | |||
136 | /* | 144 | /* |
137 | * initialize a work item's function pointer | 145 | * initialize a work item's function pointer |
138 | */ | 146 | */ |
@@ -401,7 +409,7 @@ static inline bool __cancel_delayed_work(struct delayed_work *work) | |||
401 | } | 409 | } |
402 | 410 | ||
403 | /* Obsolete. use cancel_delayed_work_sync() */ | 411 | /* Obsolete. use cancel_delayed_work_sync() */ |
404 | static inline | 412 | static inline __deprecated |
405 | void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, | 413 | void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, |
406 | struct delayed_work *work) | 414 | struct delayed_work *work) |
407 | { | 415 | { |
@@ -409,7 +417,7 @@ void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, | |||
409 | } | 417 | } |
410 | 418 | ||
411 | /* Obsolete. use cancel_delayed_work_sync() */ | 419 | /* Obsolete. use cancel_delayed_work_sync() */ |
412 | static inline | 420 | static inline __deprecated |
413 | void cancel_rearming_delayed_work(struct delayed_work *work) | 421 | void cancel_rearming_delayed_work(struct delayed_work *work) |
414 | { | 422 | { |
415 | cancel_delayed_work_sync(work); | 423 | cancel_delayed_work_sync(work); |
diff --git a/include/linux/xattr.h b/include/linux/xattr.h index f1e5bde4b35a..e6131ef98d8f 100644 --- a/include/linux/xattr.h +++ b/include/linux/xattr.h | |||
@@ -40,9 +40,13 @@ | |||
40 | #define XATTR_SMACK_SUFFIX "SMACK64" | 40 | #define XATTR_SMACK_SUFFIX "SMACK64" |
41 | #define XATTR_SMACK_IPIN "SMACK64IPIN" | 41 | #define XATTR_SMACK_IPIN "SMACK64IPIN" |
42 | #define XATTR_SMACK_IPOUT "SMACK64IPOUT" | 42 | #define XATTR_SMACK_IPOUT "SMACK64IPOUT" |
43 | #define XATTR_SMACK_EXEC "SMACK64EXEC" | ||
44 | #define XATTR_SMACK_TRANSMUTE "SMACK64TRANSMUTE" | ||
43 | #define XATTR_NAME_SMACK XATTR_SECURITY_PREFIX XATTR_SMACK_SUFFIX | 45 | #define XATTR_NAME_SMACK XATTR_SECURITY_PREFIX XATTR_SMACK_SUFFIX |
44 | #define XATTR_NAME_SMACKIPIN XATTR_SECURITY_PREFIX XATTR_SMACK_IPIN | 46 | #define XATTR_NAME_SMACKIPIN XATTR_SECURITY_PREFIX XATTR_SMACK_IPIN |
45 | #define XATTR_NAME_SMACKIPOUT XATTR_SECURITY_PREFIX XATTR_SMACK_IPOUT | 47 | #define XATTR_NAME_SMACKIPOUT XATTR_SECURITY_PREFIX XATTR_SMACK_IPOUT |
48 | #define XATTR_NAME_SMACKEXEC XATTR_SECURITY_PREFIX XATTR_SMACK_EXEC | ||
49 | #define XATTR_NAME_SMACKTRANSMUTE XATTR_SECURITY_PREFIX XATTR_SMACK_TRANSMUTE | ||
46 | 50 | ||
47 | #define XATTR_CAPS_SUFFIX "capability" | 51 | #define XATTR_CAPS_SUFFIX "capability" |
48 | #define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX | 52 | #define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX |
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index b971e3848493..930fdd2de79c 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h | |||
@@ -283,6 +283,7 @@ enum xfrm_attr_type_t { | |||
283 | XFRMA_KMADDRESS, /* struct xfrm_user_kmaddress */ | 283 | XFRMA_KMADDRESS, /* struct xfrm_user_kmaddress */ |
284 | XFRMA_ALG_AUTH_TRUNC, /* struct xfrm_algo_auth */ | 284 | XFRMA_ALG_AUTH_TRUNC, /* struct xfrm_algo_auth */ |
285 | XFRMA_MARK, /* struct xfrm_mark */ | 285 | XFRMA_MARK, /* struct xfrm_mark */ |
286 | XFRMA_TFCPAD, /* __u32 */ | ||
286 | __XFRMA_MAX | 287 | __XFRMA_MAX |
287 | 288 | ||
288 | #define XFRMA_MAX (__XFRMA_MAX - 1) | 289 | #define XFRMA_MAX (__XFRMA_MAX - 1) |