diff options
Diffstat (limited to 'include/linux')
131 files changed, 3280 insertions, 725 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 75cf611641e6..cb1ded2bd545 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -372,6 +372,7 @@ header-y += unistd.h | |||
372 | header-y += usbdevice_fs.h | 372 | header-y += usbdevice_fs.h |
373 | header-y += utime.h | 373 | header-y += utime.h |
374 | header-y += utsname.h | 374 | header-y += utsname.h |
375 | header-y += uvcvideo.h | ||
375 | header-y += v4l2-mediabus.h | 376 | header-y += v4l2-mediabus.h |
376 | header-y += v4l2-subdev.h | 377 | header-y += v4l2-subdev.h |
377 | header-y += veth.h | 378 | header-y += veth.h |
diff --git a/include/linux/alarmtimer.h b/include/linux/alarmtimer.h new file mode 100644 index 000000000000..c5d6095b46f8 --- /dev/null +++ b/include/linux/alarmtimer.h | |||
@@ -0,0 +1,40 @@ | |||
1 | #ifndef _LINUX_ALARMTIMER_H | ||
2 | #define _LINUX_ALARMTIMER_H | ||
3 | |||
4 | #include <linux/time.h> | ||
5 | #include <linux/hrtimer.h> | ||
6 | #include <linux/timerqueue.h> | ||
7 | #include <linux/rtc.h> | ||
8 | |||
9 | enum alarmtimer_type { | ||
10 | ALARM_REALTIME, | ||
11 | ALARM_BOOTTIME, | ||
12 | |||
13 | ALARM_NUMTYPE, | ||
14 | }; | ||
15 | |||
16 | /** | ||
17 | * struct alarm - Alarm timer structure | ||
18 | * @node: timerqueue node for adding to the event list this value | ||
19 | * also includes the expiration time. | ||
20 | * @period: Period for recuring alarms | ||
21 | * @function: Function pointer to be executed when the timer fires. | ||
22 | * @type: Alarm type (BOOTTIME/REALTIME) | ||
23 | * @enabled: Flag that represents if the alarm is set to fire or not | ||
24 | * @data: Internal data value. | ||
25 | */ | ||
26 | struct alarm { | ||
27 | struct timerqueue_node node; | ||
28 | ktime_t period; | ||
29 | void (*function)(struct alarm *); | ||
30 | enum alarmtimer_type type; | ||
31 | bool enabled; | ||
32 | void *data; | ||
33 | }; | ||
34 | |||
35 | void alarm_init(struct alarm *alarm, enum alarmtimer_type type, | ||
36 | void (*function)(struct alarm *)); | ||
37 | void alarm_start(struct alarm *alarm, ktime_t start, ktime_t period); | ||
38 | void alarm_cancel(struct alarm *alarm); | ||
39 | |||
40 | #endif | ||
diff --git a/include/linux/ath9k_platform.h b/include/linux/ath9k_platform.h index b847fc7b93f9..60a7c49dcb49 100644 --- a/include/linux/ath9k_platform.h +++ b/include/linux/ath9k_platform.h | |||
@@ -23,6 +23,13 @@ | |||
23 | 23 | ||
24 | struct ath9k_platform_data { | 24 | struct ath9k_platform_data { |
25 | u16 eeprom_data[ATH9K_PLAT_EEP_MAX_WORDS]; | 25 | u16 eeprom_data[ATH9K_PLAT_EEP_MAX_WORDS]; |
26 | u8 *macaddr; | ||
27 | |||
28 | int led_pin; | ||
29 | u32 gpio_mask; | ||
30 | u32 gpio_val; | ||
31 | |||
32 | bool is_clk_25mhz; | ||
26 | }; | 33 | }; |
27 | 34 | ||
28 | #endif /* _LINUX_ATH9K_PLATFORM_H */ | 35 | #endif /* _LINUX_ATH9K_PLATFORM_H */ |
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h new file mode 100644 index 000000000000..08763e4e848f --- /dev/null +++ b/include/linux/bcma/bcma.h | |||
@@ -0,0 +1,224 @@ | |||
1 | #ifndef LINUX_BCMA_H_ | ||
2 | #define LINUX_BCMA_H_ | ||
3 | |||
4 | #include <linux/pci.h> | ||
5 | #include <linux/mod_devicetable.h> | ||
6 | |||
7 | #include <linux/bcma/bcma_driver_chipcommon.h> | ||
8 | #include <linux/bcma/bcma_driver_pci.h> | ||
9 | |||
10 | #include "bcma_regs.h" | ||
11 | |||
12 | struct bcma_device; | ||
13 | struct bcma_bus; | ||
14 | |||
15 | enum bcma_hosttype { | ||
16 | BCMA_HOSTTYPE_NONE, | ||
17 | BCMA_HOSTTYPE_PCI, | ||
18 | BCMA_HOSTTYPE_SDIO, | ||
19 | }; | ||
20 | |||
21 | struct bcma_chipinfo { | ||
22 | u16 id; | ||
23 | u8 rev; | ||
24 | u8 pkg; | ||
25 | }; | ||
26 | |||
27 | struct bcma_host_ops { | ||
28 | u8 (*read8)(struct bcma_device *core, u16 offset); | ||
29 | u16 (*read16)(struct bcma_device *core, u16 offset); | ||
30 | u32 (*read32)(struct bcma_device *core, u16 offset); | ||
31 | void (*write8)(struct bcma_device *core, u16 offset, u8 value); | ||
32 | void (*write16)(struct bcma_device *core, u16 offset, u16 value); | ||
33 | void (*write32)(struct bcma_device *core, u16 offset, u32 value); | ||
34 | /* Agent ops */ | ||
35 | u32 (*aread32)(struct bcma_device *core, u16 offset); | ||
36 | void (*awrite32)(struct bcma_device *core, u16 offset, u32 value); | ||
37 | }; | ||
38 | |||
39 | /* Core manufacturers */ | ||
40 | #define BCMA_MANUF_ARM 0x43B | ||
41 | #define BCMA_MANUF_MIPS 0x4A7 | ||
42 | #define BCMA_MANUF_BCM 0x4BF | ||
43 | |||
44 | /* Core class values. */ | ||
45 | #define BCMA_CL_SIM 0x0 | ||
46 | #define BCMA_CL_EROM 0x1 | ||
47 | #define BCMA_CL_CORESIGHT 0x9 | ||
48 | #define BCMA_CL_VERIF 0xB | ||
49 | #define BCMA_CL_OPTIMO 0xD | ||
50 | #define BCMA_CL_GEN 0xE | ||
51 | #define BCMA_CL_PRIMECELL 0xF | ||
52 | |||
53 | /* Core-ID values. */ | ||
54 | #define BCMA_CORE_OOB_ROUTER 0x367 /* Out of band */ | ||
55 | #define BCMA_CORE_INVALID 0x700 | ||
56 | #define BCMA_CORE_CHIPCOMMON 0x800 | ||
57 | #define BCMA_CORE_ILINE20 0x801 | ||
58 | #define BCMA_CORE_SRAM 0x802 | ||
59 | #define BCMA_CORE_SDRAM 0x803 | ||
60 | #define BCMA_CORE_PCI 0x804 | ||
61 | #define BCMA_CORE_MIPS 0x805 | ||
62 | #define BCMA_CORE_ETHERNET 0x806 | ||
63 | #define BCMA_CORE_V90 0x807 | ||
64 | #define BCMA_CORE_USB11_HOSTDEV 0x808 | ||
65 | #define BCMA_CORE_ADSL 0x809 | ||
66 | #define BCMA_CORE_ILINE100 0x80A | ||
67 | #define BCMA_CORE_IPSEC 0x80B | ||
68 | #define BCMA_CORE_UTOPIA 0x80C | ||
69 | #define BCMA_CORE_PCMCIA 0x80D | ||
70 | #define BCMA_CORE_INTERNAL_MEM 0x80E | ||
71 | #define BCMA_CORE_MEMC_SDRAM 0x80F | ||
72 | #define BCMA_CORE_OFDM 0x810 | ||
73 | #define BCMA_CORE_EXTIF 0x811 | ||
74 | #define BCMA_CORE_80211 0x812 | ||
75 | #define BCMA_CORE_PHY_A 0x813 | ||
76 | #define BCMA_CORE_PHY_B 0x814 | ||
77 | #define BCMA_CORE_PHY_G 0x815 | ||
78 | #define BCMA_CORE_MIPS_3302 0x816 | ||
79 | #define BCMA_CORE_USB11_HOST 0x817 | ||
80 | #define BCMA_CORE_USB11_DEV 0x818 | ||
81 | #define BCMA_CORE_USB20_HOST 0x819 | ||
82 | #define BCMA_CORE_USB20_DEV 0x81A | ||
83 | #define BCMA_CORE_SDIO_HOST 0x81B | ||
84 | #define BCMA_CORE_ROBOSWITCH 0x81C | ||
85 | #define BCMA_CORE_PARA_ATA 0x81D | ||
86 | #define BCMA_CORE_SATA_XORDMA 0x81E | ||
87 | #define BCMA_CORE_ETHERNET_GBIT 0x81F | ||
88 | #define BCMA_CORE_PCIE 0x820 | ||
89 | #define BCMA_CORE_PHY_N 0x821 | ||
90 | #define BCMA_CORE_SRAM_CTL 0x822 | ||
91 | #define BCMA_CORE_MINI_MACPHY 0x823 | ||
92 | #define BCMA_CORE_ARM_1176 0x824 | ||
93 | #define BCMA_CORE_ARM_7TDMI 0x825 | ||
94 | #define BCMA_CORE_PHY_LP 0x826 | ||
95 | #define BCMA_CORE_PMU 0x827 | ||
96 | #define BCMA_CORE_PHY_SSN 0x828 | ||
97 | #define BCMA_CORE_SDIO_DEV 0x829 | ||
98 | #define BCMA_CORE_ARM_CM3 0x82A | ||
99 | #define BCMA_CORE_PHY_HT 0x82B | ||
100 | #define BCMA_CORE_MIPS_74K 0x82C | ||
101 | #define BCMA_CORE_MAC_GBIT 0x82D | ||
102 | #define BCMA_CORE_DDR12_MEM_CTL 0x82E | ||
103 | #define BCMA_CORE_PCIE_RC 0x82F /* PCIe Root Complex */ | ||
104 | #define BCMA_CORE_OCP_OCP_BRIDGE 0x830 | ||
105 | #define BCMA_CORE_SHARED_COMMON 0x831 | ||
106 | #define BCMA_CORE_OCP_AHB_BRIDGE 0x832 | ||
107 | #define BCMA_CORE_SPI_HOST 0x833 | ||
108 | #define BCMA_CORE_I2S 0x834 | ||
109 | #define BCMA_CORE_SDR_DDR1_MEM_CTL 0x835 /* SDR/DDR1 memory controller core */ | ||
110 | #define BCMA_CORE_SHIM 0x837 /* SHIM component in ubus/6362 */ | ||
111 | #define BCMA_CORE_DEFAULT 0xFFF | ||
112 | |||
113 | #define BCMA_MAX_NR_CORES 16 | ||
114 | |||
115 | struct bcma_device { | ||
116 | struct bcma_bus *bus; | ||
117 | struct bcma_device_id id; | ||
118 | |||
119 | struct device dev; | ||
120 | bool dev_registered; | ||
121 | |||
122 | u8 core_index; | ||
123 | |||
124 | u32 addr; | ||
125 | u32 wrap; | ||
126 | |||
127 | void *drvdata; | ||
128 | struct list_head list; | ||
129 | }; | ||
130 | |||
131 | static inline void *bcma_get_drvdata(struct bcma_device *core) | ||
132 | { | ||
133 | return core->drvdata; | ||
134 | } | ||
135 | static inline void bcma_set_drvdata(struct bcma_device *core, void *drvdata) | ||
136 | { | ||
137 | core->drvdata = drvdata; | ||
138 | } | ||
139 | |||
140 | struct bcma_driver { | ||
141 | const char *name; | ||
142 | const struct bcma_device_id *id_table; | ||
143 | |||
144 | int (*probe)(struct bcma_device *dev); | ||
145 | void (*remove)(struct bcma_device *dev); | ||
146 | int (*suspend)(struct bcma_device *dev, pm_message_t state); | ||
147 | int (*resume)(struct bcma_device *dev); | ||
148 | void (*shutdown)(struct bcma_device *dev); | ||
149 | |||
150 | struct device_driver drv; | ||
151 | }; | ||
152 | extern | ||
153 | int __bcma_driver_register(struct bcma_driver *drv, struct module *owner); | ||
154 | static inline int bcma_driver_register(struct bcma_driver *drv) | ||
155 | { | ||
156 | return __bcma_driver_register(drv, THIS_MODULE); | ||
157 | } | ||
158 | extern void bcma_driver_unregister(struct bcma_driver *drv); | ||
159 | |||
160 | struct bcma_bus { | ||
161 | /* The MMIO area. */ | ||
162 | void __iomem *mmio; | ||
163 | |||
164 | const struct bcma_host_ops *ops; | ||
165 | |||
166 | enum bcma_hosttype hosttype; | ||
167 | union { | ||
168 | /* Pointer to the PCI bus (only for BCMA_HOSTTYPE_PCI) */ | ||
169 | struct pci_dev *host_pci; | ||
170 | /* Pointer to the SDIO device (only for BCMA_HOSTTYPE_SDIO) */ | ||
171 | struct sdio_func *host_sdio; | ||
172 | }; | ||
173 | |||
174 | struct bcma_chipinfo chipinfo; | ||
175 | |||
176 | struct bcma_device *mapped_core; | ||
177 | struct list_head cores; | ||
178 | u8 nr_cores; | ||
179 | |||
180 | struct bcma_drv_cc drv_cc; | ||
181 | struct bcma_drv_pci drv_pci; | ||
182 | }; | ||
183 | |||
184 | extern inline u32 bcma_read8(struct bcma_device *core, u16 offset) | ||
185 | { | ||
186 | return core->bus->ops->read8(core, offset); | ||
187 | } | ||
188 | extern inline u32 bcma_read16(struct bcma_device *core, u16 offset) | ||
189 | { | ||
190 | return core->bus->ops->read16(core, offset); | ||
191 | } | ||
192 | extern inline u32 bcma_read32(struct bcma_device *core, u16 offset) | ||
193 | { | ||
194 | return core->bus->ops->read32(core, offset); | ||
195 | } | ||
196 | extern inline | ||
197 | void bcma_write8(struct bcma_device *core, u16 offset, u32 value) | ||
198 | { | ||
199 | core->bus->ops->write8(core, offset, value); | ||
200 | } | ||
201 | extern inline | ||
202 | void bcma_write16(struct bcma_device *core, u16 offset, u32 value) | ||
203 | { | ||
204 | core->bus->ops->write16(core, offset, value); | ||
205 | } | ||
206 | extern inline | ||
207 | void bcma_write32(struct bcma_device *core, u16 offset, u32 value) | ||
208 | { | ||
209 | core->bus->ops->write32(core, offset, value); | ||
210 | } | ||
211 | extern inline u32 bcma_aread32(struct bcma_device *core, u16 offset) | ||
212 | { | ||
213 | return core->bus->ops->aread32(core, offset); | ||
214 | } | ||
215 | extern inline | ||
216 | void bcma_awrite32(struct bcma_device *core, u16 offset, u32 value) | ||
217 | { | ||
218 | core->bus->ops->awrite32(core, offset, value); | ||
219 | } | ||
220 | |||
221 | extern bool bcma_core_is_enabled(struct bcma_device *core); | ||
222 | extern int bcma_core_enable(struct bcma_device *core, u32 flags); | ||
223 | |||
224 | #endif /* LINUX_BCMA_H_ */ | ||
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h new file mode 100644 index 000000000000..083c3b6cd5ce --- /dev/null +++ b/include/linux/bcma/bcma_driver_chipcommon.h | |||
@@ -0,0 +1,302 @@ | |||
1 | #ifndef LINUX_BCMA_DRIVER_CC_H_ | ||
2 | #define LINUX_BCMA_DRIVER_CC_H_ | ||
3 | |||
4 | /** ChipCommon core registers. **/ | ||
5 | #define BCMA_CC_ID 0x0000 | ||
6 | #define BCMA_CC_ID_ID 0x0000FFFF | ||
7 | #define BCMA_CC_ID_ID_SHIFT 0 | ||
8 | #define BCMA_CC_ID_REV 0x000F0000 | ||
9 | #define BCMA_CC_ID_REV_SHIFT 16 | ||
10 | #define BCMA_CC_ID_PKG 0x00F00000 | ||
11 | #define BCMA_CC_ID_PKG_SHIFT 20 | ||
12 | #define BCMA_CC_ID_NRCORES 0x0F000000 | ||
13 | #define BCMA_CC_ID_NRCORES_SHIFT 24 | ||
14 | #define BCMA_CC_ID_TYPE 0xF0000000 | ||
15 | #define BCMA_CC_ID_TYPE_SHIFT 28 | ||
16 | #define BCMA_CC_CAP 0x0004 /* Capabilities */ | ||
17 | #define BCMA_CC_CAP_NRUART 0x00000003 /* # of UARTs */ | ||
18 | #define BCMA_CC_CAP_MIPSEB 0x00000004 /* MIPS in BigEndian Mode */ | ||
19 | #define BCMA_CC_CAP_UARTCLK 0x00000018 /* UART clock select */ | ||
20 | #define BCMA_CC_CAP_UARTCLK_INT 0x00000008 /* UARTs are driven by internal divided clock */ | ||
21 | #define BCMA_CC_CAP_UARTGPIO 0x00000020 /* UARTs on GPIO 15-12 */ | ||
22 | #define BCMA_CC_CAP_EXTBUS 0x000000C0 /* External buses present */ | ||
23 | #define BCMA_CC_CAP_FLASHT 0x00000700 /* Flash Type */ | ||
24 | #define BCMA_CC_FLASHT_NONE 0x00000000 /* No flash */ | ||
25 | #define BCMA_CC_FLASHT_STSER 0x00000100 /* ST serial flash */ | ||
26 | #define BCMA_CC_FLASHT_ATSER 0x00000200 /* Atmel serial flash */ | ||
27 | #define BCMA_CC_FLASHT_PARA 0x00000700 /* Parallel flash */ | ||
28 | #define BCMA_CC_CAP_PLLT 0x00038000 /* PLL Type */ | ||
29 | #define BCMA_PLLTYPE_NONE 0x00000000 | ||
30 | #define BCMA_PLLTYPE_1 0x00010000 /* 48Mhz base, 3 dividers */ | ||
31 | #define BCMA_PLLTYPE_2 0x00020000 /* 48Mhz, 4 dividers */ | ||
32 | #define BCMA_PLLTYPE_3 0x00030000 /* 25Mhz, 2 dividers */ | ||
33 | #define BCMA_PLLTYPE_4 0x00008000 /* 48Mhz, 4 dividers */ | ||
34 | #define BCMA_PLLTYPE_5 0x00018000 /* 25Mhz, 4 dividers */ | ||
35 | #define BCMA_PLLTYPE_6 0x00028000 /* 100/200 or 120/240 only */ | ||
36 | #define BCMA_PLLTYPE_7 0x00038000 /* 25Mhz, 4 dividers */ | ||
37 | #define BCMA_CC_CAP_PCTL 0x00040000 /* Power Control */ | ||
38 | #define BCMA_CC_CAP_OTPS 0x00380000 /* OTP size */ | ||
39 | #define BCMA_CC_CAP_OTPS_SHIFT 19 | ||
40 | #define BCMA_CC_CAP_OTPS_BASE 5 | ||
41 | #define BCMA_CC_CAP_JTAGM 0x00400000 /* JTAG master present */ | ||
42 | #define BCMA_CC_CAP_BROM 0x00800000 /* Internal boot ROM active */ | ||
43 | #define BCMA_CC_CAP_64BIT 0x08000000 /* 64-bit Backplane */ | ||
44 | #define BCMA_CC_CAP_PMU 0x10000000 /* PMU available (rev >= 20) */ | ||
45 | #define BCMA_CC_CAP_ECI 0x20000000 /* ECI available (rev >= 20) */ | ||
46 | #define BCMA_CC_CAP_SPROM 0x40000000 /* SPROM present */ | ||
47 | #define BCMA_CC_CORECTL 0x0008 | ||
48 | #define BCMA_CC_CORECTL_UARTCLK0 0x00000001 /* Drive UART with internal clock */ | ||
49 | #define BCMA_CC_CORECTL_SE 0x00000002 /* sync clk out enable (corerev >= 3) */ | ||
50 | #define BCMA_CC_CORECTL_UARTCLKEN 0x00000008 /* UART clock enable (rev >= 21) */ | ||
51 | #define BCMA_CC_BIST 0x000C | ||
52 | #define BCMA_CC_OTPS 0x0010 /* OTP status */ | ||
53 | #define BCMA_CC_OTPS_PROGFAIL 0x80000000 | ||
54 | #define BCMA_CC_OTPS_PROTECT 0x00000007 | ||
55 | #define BCMA_CC_OTPS_HW_PROTECT 0x00000001 | ||
56 | #define BCMA_CC_OTPS_SW_PROTECT 0x00000002 | ||
57 | #define BCMA_CC_OTPS_CID_PROTECT 0x00000004 | ||
58 | #define BCMA_CC_OTPC 0x0014 /* OTP control */ | ||
59 | #define BCMA_CC_OTPC_RECWAIT 0xFF000000 | ||
60 | #define BCMA_CC_OTPC_PROGWAIT 0x00FFFF00 | ||
61 | #define BCMA_CC_OTPC_PRW_SHIFT 8 | ||
62 | #define BCMA_CC_OTPC_MAXFAIL 0x00000038 | ||
63 | #define BCMA_CC_OTPC_VSEL 0x00000006 | ||
64 | #define BCMA_CC_OTPC_SELVL 0x00000001 | ||
65 | #define BCMA_CC_OTPP 0x0018 /* OTP prog */ | ||
66 | #define BCMA_CC_OTPP_COL 0x000000FF | ||
67 | #define BCMA_CC_OTPP_ROW 0x0000FF00 | ||
68 | #define BCMA_CC_OTPP_ROW_SHIFT 8 | ||
69 | #define BCMA_CC_OTPP_READERR 0x10000000 | ||
70 | #define BCMA_CC_OTPP_VALUE 0x20000000 | ||
71 | #define BCMA_CC_OTPP_READ 0x40000000 | ||
72 | #define BCMA_CC_OTPP_START 0x80000000 | ||
73 | #define BCMA_CC_OTPP_BUSY 0x80000000 | ||
74 | #define BCMA_CC_IRQSTAT 0x0020 | ||
75 | #define BCMA_CC_IRQMASK 0x0024 | ||
76 | #define BCMA_CC_IRQ_GPIO 0x00000001 /* gpio intr */ | ||
77 | #define BCMA_CC_IRQ_EXT 0x00000002 /* ro: ext intr pin (corerev >= 3) */ | ||
78 | #define BCMA_CC_IRQ_WDRESET 0x80000000 /* watchdog reset occurred */ | ||
79 | #define BCMA_CC_CHIPCTL 0x0028 /* Rev >= 11 only */ | ||
80 | #define BCMA_CC_CHIPSTAT 0x002C /* Rev >= 11 only */ | ||
81 | #define BCMA_CC_JCMD 0x0030 /* Rev >= 10 only */ | ||
82 | #define BCMA_CC_JCMD_START 0x80000000 | ||
83 | #define BCMA_CC_JCMD_BUSY 0x80000000 | ||
84 | #define BCMA_CC_JCMD_PAUSE 0x40000000 | ||
85 | #define BCMA_CC_JCMD0_ACC_MASK 0x0000F000 | ||
86 | #define BCMA_CC_JCMD0_ACC_IRDR 0x00000000 | ||
87 | #define BCMA_CC_JCMD0_ACC_DR 0x00001000 | ||
88 | #define BCMA_CC_JCMD0_ACC_IR 0x00002000 | ||
89 | #define BCMA_CC_JCMD0_ACC_RESET 0x00003000 | ||
90 | #define BCMA_CC_JCMD0_ACC_IRPDR 0x00004000 | ||
91 | #define BCMA_CC_JCMD0_ACC_PDR 0x00005000 | ||
92 | #define BCMA_CC_JCMD0_IRW_MASK 0x00000F00 | ||
93 | #define BCMA_CC_JCMD_ACC_MASK 0x000F0000 /* Changes for corerev 11 */ | ||
94 | #define BCMA_CC_JCMD_ACC_IRDR 0x00000000 | ||
95 | #define BCMA_CC_JCMD_ACC_DR 0x00010000 | ||
96 | #define BCMA_CC_JCMD_ACC_IR 0x00020000 | ||
97 | #define BCMA_CC_JCMD_ACC_RESET 0x00030000 | ||
98 | #define BCMA_CC_JCMD_ACC_IRPDR 0x00040000 | ||
99 | #define BCMA_CC_JCMD_ACC_PDR 0x00050000 | ||
100 | #define BCMA_CC_JCMD_IRW_MASK 0x00001F00 | ||
101 | #define BCMA_CC_JCMD_IRW_SHIFT 8 | ||
102 | #define BCMA_CC_JCMD_DRW_MASK 0x0000003F | ||
103 | #define BCMA_CC_JIR 0x0034 /* Rev >= 10 only */ | ||
104 | #define BCMA_CC_JDR 0x0038 /* Rev >= 10 only */ | ||
105 | #define BCMA_CC_JCTL 0x003C /* Rev >= 10 only */ | ||
106 | #define BCMA_CC_JCTL_FORCE_CLK 4 /* Force clock */ | ||
107 | #define BCMA_CC_JCTL_EXT_EN 2 /* Enable external targets */ | ||
108 | #define BCMA_CC_JCTL_EN 1 /* Enable Jtag master */ | ||
109 | #define BCMA_CC_FLASHCTL 0x0040 | ||
110 | #define BCMA_CC_FLASHCTL_START 0x80000000 | ||
111 | #define BCMA_CC_FLASHCTL_BUSY BCMA_CC_FLASHCTL_START | ||
112 | #define BCMA_CC_FLASHADDR 0x0044 | ||
113 | #define BCMA_CC_FLASHDATA 0x0048 | ||
114 | #define BCMA_CC_BCAST_ADDR 0x0050 | ||
115 | #define BCMA_CC_BCAST_DATA 0x0054 | ||
116 | #define BCMA_CC_GPIOPULLUP 0x0058 /* Rev >= 20 only */ | ||
117 | #define BCMA_CC_GPIOPULLDOWN 0x005C /* Rev >= 20 only */ | ||
118 | #define BCMA_CC_GPIOIN 0x0060 | ||
119 | #define BCMA_CC_GPIOOUT 0x0064 | ||
120 | #define BCMA_CC_GPIOOUTEN 0x0068 | ||
121 | #define BCMA_CC_GPIOCTL 0x006C | ||
122 | #define BCMA_CC_GPIOPOL 0x0070 | ||
123 | #define BCMA_CC_GPIOIRQ 0x0074 | ||
124 | #define BCMA_CC_WATCHDOG 0x0080 | ||
125 | #define BCMA_CC_GPIOTIMER 0x0088 /* LED powersave (corerev >= 16) */ | ||
126 | #define BCMA_CC_GPIOTIMER_OFFTIME 0x0000FFFF | ||
127 | #define BCMA_CC_GPIOTIMER_OFFTIME_SHIFT 0 | ||
128 | #define BCMA_CC_GPIOTIMER_ONTIME 0xFFFF0000 | ||
129 | #define BCMA_CC_GPIOTIMER_ONTIME_SHIFT 16 | ||
130 | #define BCMA_CC_GPIOTOUTM 0x008C /* LED powersave (corerev >= 16) */ | ||
131 | #define BCMA_CC_CLOCK_N 0x0090 | ||
132 | #define BCMA_CC_CLOCK_SB 0x0094 | ||
133 | #define BCMA_CC_CLOCK_PCI 0x0098 | ||
134 | #define BCMA_CC_CLOCK_M2 0x009C | ||
135 | #define BCMA_CC_CLOCK_MIPS 0x00A0 | ||
136 | #define BCMA_CC_CLKDIV 0x00A4 /* Rev >= 3 only */ | ||
137 | #define BCMA_CC_CLKDIV_SFLASH 0x0F000000 | ||
138 | #define BCMA_CC_CLKDIV_SFLASH_SHIFT 24 | ||
139 | #define BCMA_CC_CLKDIV_OTP 0x000F0000 | ||
140 | #define BCMA_CC_CLKDIV_OTP_SHIFT 16 | ||
141 | #define BCMA_CC_CLKDIV_JTAG 0x00000F00 | ||
142 | #define BCMA_CC_CLKDIV_JTAG_SHIFT 8 | ||
143 | #define BCMA_CC_CLKDIV_UART 0x000000FF | ||
144 | #define BCMA_CC_CAP_EXT 0x00AC /* Capabilities */ | ||
145 | #define BCMA_CC_PLLONDELAY 0x00B0 /* Rev >= 4 only */ | ||
146 | #define BCMA_CC_FREFSELDELAY 0x00B4 /* Rev >= 4 only */ | ||
147 | #define BCMA_CC_SLOWCLKCTL 0x00B8 /* 6 <= Rev <= 9 only */ | ||
148 | #define BCMA_CC_SLOWCLKCTL_SRC 0x00000007 /* slow clock source mask */ | ||
149 | #define BCMA_CC_SLOWCLKCTL_SRC_LPO 0x00000000 /* source of slow clock is LPO */ | ||
150 | #define BCMA_CC_SLOWCLKCTL_SRC_XTAL 0x00000001 /* source of slow clock is crystal */ | ||
151 | #define BCMA_CC_SLOECLKCTL_SRC_PCI 0x00000002 /* source of slow clock is PCI */ | ||
152 | #define BCMA_CC_SLOWCLKCTL_LPOFREQ 0x00000200 /* LPOFreqSel, 1: 160Khz, 0: 32KHz */ | ||
153 | #define BCMA_CC_SLOWCLKCTL_LPOPD 0x00000400 /* LPOPowerDown, 1: LPO is disabled, 0: LPO is enabled */ | ||
154 | #define BCMA_CC_SLOWCLKCTL_FSLOW 0x00000800 /* ForceSlowClk, 1: sb/cores running on slow clock, 0: power logic control */ | ||
155 | #define BCMA_CC_SLOWCLKCTL_IPLL 0x00001000 /* IgnorePllOffReq, 1/0: power logic ignores/honors PLL clock disable requests from core */ | ||
156 | #define BCMA_CC_SLOWCLKCTL_ENXTAL 0x00002000 /* XtalControlEn, 1/0: power logic does/doesn't disable crystal when appropriate */ | ||
157 | #define BCMA_CC_SLOWCLKCTL_XTALPU 0x00004000 /* XtalPU (RO), 1/0: crystal running/disabled */ | ||
158 | #define BCMA_CC_SLOWCLKCTL_CLKDIV 0xFFFF0000 /* ClockDivider (SlowClk = 1/(4+divisor)) */ | ||
159 | #define BCMA_CC_SLOWCLKCTL_CLKDIV_SHIFT 16 | ||
160 | #define BCMA_CC_SYSCLKCTL 0x00C0 /* Rev >= 3 only */ | ||
161 | #define BCMA_CC_SYSCLKCTL_IDLPEN 0x00000001 /* ILPen: Enable Idle Low Power */ | ||
162 | #define BCMA_CC_SYSCLKCTL_ALPEN 0x00000002 /* ALPen: Enable Active Low Power */ | ||
163 | #define BCMA_CC_SYSCLKCTL_PLLEN 0x00000004 /* ForcePLLOn */ | ||
164 | #define BCMA_CC_SYSCLKCTL_FORCEALP 0x00000008 /* Force ALP (or HT if ALPen is not set */ | ||
165 | #define BCMA_CC_SYSCLKCTL_FORCEHT 0x00000010 /* Force HT */ | ||
166 | #define BCMA_CC_SYSCLKCTL_CLKDIV 0xFFFF0000 /* ClkDiv (ILP = 1/(4+divisor)) */ | ||
167 | #define BCMA_CC_SYSCLKCTL_CLKDIV_SHIFT 16 | ||
168 | #define BCMA_CC_CLKSTSTR 0x00C4 /* Rev >= 3 only */ | ||
169 | #define BCMA_CC_EROM 0x00FC | ||
170 | #define BCMA_CC_PCMCIA_CFG 0x0100 | ||
171 | #define BCMA_CC_PCMCIA_MEMWAIT 0x0104 | ||
172 | #define BCMA_CC_PCMCIA_ATTRWAIT 0x0108 | ||
173 | #define BCMA_CC_PCMCIA_IOWAIT 0x010C | ||
174 | #define BCMA_CC_IDE_CFG 0x0110 | ||
175 | #define BCMA_CC_IDE_MEMWAIT 0x0114 | ||
176 | #define BCMA_CC_IDE_ATTRWAIT 0x0118 | ||
177 | #define BCMA_CC_IDE_IOWAIT 0x011C | ||
178 | #define BCMA_CC_PROG_CFG 0x0120 | ||
179 | #define BCMA_CC_PROG_WAITCNT 0x0124 | ||
180 | #define BCMA_CC_FLASH_CFG 0x0128 | ||
181 | #define BCMA_CC_FLASH_WAITCNT 0x012C | ||
182 | #define BCMA_CC_CLKCTLST 0x01E0 /* Clock control and status (rev >= 20) */ | ||
183 | #define BCMA_CC_CLKCTLST_FORCEALP 0x00000001 /* Force ALP request */ | ||
184 | #define BCMA_CC_CLKCTLST_FORCEHT 0x00000002 /* Force HT request */ | ||
185 | #define BCMA_CC_CLKCTLST_FORCEILP 0x00000004 /* Force ILP request */ | ||
186 | #define BCMA_CC_CLKCTLST_HAVEALPREQ 0x00000008 /* ALP available request */ | ||
187 | #define BCMA_CC_CLKCTLST_HAVEHTREQ 0x00000010 /* HT available request */ | ||
188 | #define BCMA_CC_CLKCTLST_HWCROFF 0x00000020 /* Force HW clock request off */ | ||
189 | #define BCMA_CC_CLKCTLST_HAVEHT 0x00010000 /* HT available */ | ||
190 | #define BCMA_CC_CLKCTLST_HAVEALP 0x00020000 /* APL available */ | ||
191 | #define BCMA_CC_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */ | ||
192 | #define BCMA_CC_UART0_DATA 0x0300 | ||
193 | #define BCMA_CC_UART0_IMR 0x0304 | ||
194 | #define BCMA_CC_UART0_FCR 0x0308 | ||
195 | #define BCMA_CC_UART0_LCR 0x030C | ||
196 | #define BCMA_CC_UART0_MCR 0x0310 | ||
197 | #define BCMA_CC_UART0_LSR 0x0314 | ||
198 | #define BCMA_CC_UART0_MSR 0x0318 | ||
199 | #define BCMA_CC_UART0_SCRATCH 0x031C | ||
200 | #define BCMA_CC_UART1_DATA 0x0400 | ||
201 | #define BCMA_CC_UART1_IMR 0x0404 | ||
202 | #define BCMA_CC_UART1_FCR 0x0408 | ||
203 | #define BCMA_CC_UART1_LCR 0x040C | ||
204 | #define BCMA_CC_UART1_MCR 0x0410 | ||
205 | #define BCMA_CC_UART1_LSR 0x0414 | ||
206 | #define BCMA_CC_UART1_MSR 0x0418 | ||
207 | #define BCMA_CC_UART1_SCRATCH 0x041C | ||
208 | /* PMU registers (rev >= 20) */ | ||
209 | #define BCMA_CC_PMU_CTL 0x0600 /* PMU control */ | ||
210 | #define BCMA_CC_PMU_CTL_ILP_DIV 0xFFFF0000 /* ILP div mask */ | ||
211 | #define BCMA_CC_PMU_CTL_ILP_DIV_SHIFT 16 | ||
212 | #define BCMA_CC_PMU_CTL_NOILPONW 0x00000200 /* No ILP on wait */ | ||
213 | #define BCMA_CC_PMU_CTL_HTREQEN 0x00000100 /* HT req enable */ | ||
214 | #define BCMA_CC_PMU_CTL_ALPREQEN 0x00000080 /* ALP req enable */ | ||
215 | #define BCMA_CC_PMU_CTL_XTALFREQ 0x0000007C /* Crystal freq */ | ||
216 | #define BCMA_CC_PMU_CTL_XTALFREQ_SHIFT 2 | ||
217 | #define BCMA_CC_PMU_CTL_ILPDIVEN 0x00000002 /* ILP div enable */ | ||
218 | #define BCMA_CC_PMU_CTL_LPOSEL 0x00000001 /* LPO sel */ | ||
219 | #define BCMA_CC_PMU_CAP 0x0604 /* PMU capabilities */ | ||
220 | #define BCMA_CC_PMU_CAP_REVISION 0x000000FF /* Revision mask */ | ||
221 | #define BCMA_CC_PMU_STAT 0x0608 /* PMU status */ | ||
222 | #define BCMA_CC_PMU_STAT_INTPEND 0x00000040 /* Interrupt pending */ | ||
223 | #define BCMA_CC_PMU_STAT_SBCLKST 0x00000030 /* Backplane clock status? */ | ||
224 | #define BCMA_CC_PMU_STAT_HAVEALP 0x00000008 /* ALP available */ | ||
225 | #define BCMA_CC_PMU_STAT_HAVEHT 0x00000004 /* HT available */ | ||
226 | #define BCMA_CC_PMU_STAT_RESINIT 0x00000003 /* Res init */ | ||
227 | #define BCMA_CC_PMU_RES_STAT 0x060C /* PMU res status */ | ||
228 | #define BCMA_CC_PMU_RES_PEND 0x0610 /* PMU res pending */ | ||
229 | #define BCMA_CC_PMU_TIMER 0x0614 /* PMU timer */ | ||
230 | #define BCMA_CC_PMU_MINRES_MSK 0x0618 /* PMU min res mask */ | ||
231 | #define BCMA_CC_PMU_MAXRES_MSK 0x061C /* PMU max res mask */ | ||
232 | #define BCMA_CC_PMU_RES_TABSEL 0x0620 /* PMU res table sel */ | ||
233 | #define BCMA_CC_PMU_RES_DEPMSK 0x0624 /* PMU res dep mask */ | ||
234 | #define BCMA_CC_PMU_RES_UPDNTM 0x0628 /* PMU res updown timer */ | ||
235 | #define BCMA_CC_PMU_RES_TIMER 0x062C /* PMU res timer */ | ||
236 | #define BCMA_CC_PMU_CLKSTRETCH 0x0630 /* PMU clockstretch */ | ||
237 | #define BCMA_CC_PMU_WATCHDOG 0x0634 /* PMU watchdog */ | ||
238 | #define BCMA_CC_PMU_RES_REQTS 0x0640 /* PMU res req timer sel */ | ||
239 | #define BCMA_CC_PMU_RES_REQT 0x0644 /* PMU res req timer */ | ||
240 | #define BCMA_CC_PMU_RES_REQM 0x0648 /* PMU res req mask */ | ||
241 | #define BCMA_CC_CHIPCTL_ADDR 0x0650 | ||
242 | #define BCMA_CC_CHIPCTL_DATA 0x0654 | ||
243 | #define BCMA_CC_REGCTL_ADDR 0x0658 | ||
244 | #define BCMA_CC_REGCTL_DATA 0x065C | ||
245 | #define BCMA_CC_PLLCTL_ADDR 0x0660 | ||
246 | #define BCMA_CC_PLLCTL_DATA 0x0664 | ||
247 | |||
248 | /* Data for the PMU, if available. | ||
249 | * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU) | ||
250 | */ | ||
251 | struct bcma_chipcommon_pmu { | ||
252 | u8 rev; /* PMU revision */ | ||
253 | u32 crystalfreq; /* The active crystal frequency (in kHz) */ | ||
254 | }; | ||
255 | |||
256 | struct bcma_drv_cc { | ||
257 | struct bcma_device *core; | ||
258 | u32 status; | ||
259 | u32 capabilities; | ||
260 | u32 capabilities_ext; | ||
261 | /* Fast Powerup Delay constant */ | ||
262 | u16 fast_pwrup_delay; | ||
263 | struct bcma_chipcommon_pmu pmu; | ||
264 | }; | ||
265 | |||
266 | /* Register access */ | ||
267 | #define bcma_cc_read32(cc, offset) \ | ||
268 | bcma_read32((cc)->core, offset) | ||
269 | #define bcma_cc_write32(cc, offset, val) \ | ||
270 | bcma_write32((cc)->core, offset, val) | ||
271 | |||
272 | #define bcma_cc_mask32(cc, offset, mask) \ | ||
273 | bcma_cc_write32(cc, offset, bcma_cc_read32(cc, offset) & (mask)) | ||
274 | #define bcma_cc_set32(cc, offset, set) \ | ||
275 | bcma_cc_write32(cc, offset, bcma_cc_read32(cc, offset) | (set)) | ||
276 | #define bcma_cc_maskset32(cc, offset, mask, set) \ | ||
277 | bcma_cc_write32(cc, offset, (bcma_cc_read32(cc, offset) & (mask)) | (set)) | ||
278 | |||
279 | extern void bcma_core_chipcommon_init(struct bcma_drv_cc *cc); | ||
280 | |||
281 | extern void bcma_chipco_suspend(struct bcma_drv_cc *cc); | ||
282 | extern void bcma_chipco_resume(struct bcma_drv_cc *cc); | ||
283 | |||
284 | extern void bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, | ||
285 | u32 ticks); | ||
286 | |||
287 | void bcma_chipco_irq_mask(struct bcma_drv_cc *cc, u32 mask, u32 value); | ||
288 | |||
289 | u32 bcma_chipco_irq_status(struct bcma_drv_cc *cc, u32 mask); | ||
290 | |||
291 | /* Chipcommon GPIO pin access. */ | ||
292 | u32 bcma_chipco_gpio_in(struct bcma_drv_cc *cc, u32 mask); | ||
293 | u32 bcma_chipco_gpio_out(struct bcma_drv_cc *cc, u32 mask, u32 value); | ||
294 | u32 bcma_chipco_gpio_outen(struct bcma_drv_cc *cc, u32 mask, u32 value); | ||
295 | u32 bcma_chipco_gpio_control(struct bcma_drv_cc *cc, u32 mask, u32 value); | ||
296 | u32 bcma_chipco_gpio_intmask(struct bcma_drv_cc *cc, u32 mask, u32 value); | ||
297 | u32 bcma_chipco_gpio_polarity(struct bcma_drv_cc *cc, u32 mask, u32 value); | ||
298 | |||
299 | /* PMU support */ | ||
300 | extern void bcma_pmu_init(struct bcma_drv_cc *cc); | ||
301 | |||
302 | #endif /* LINUX_BCMA_DRIVER_CC_H_ */ | ||
diff --git a/include/linux/bcma/bcma_driver_pci.h b/include/linux/bcma/bcma_driver_pci.h new file mode 100644 index 000000000000..b7e191cf00ec --- /dev/null +++ b/include/linux/bcma/bcma_driver_pci.h | |||
@@ -0,0 +1,89 @@ | |||
1 | #ifndef LINUX_BCMA_DRIVER_PCI_H_ | ||
2 | #define LINUX_BCMA_DRIVER_PCI_H_ | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | struct pci_dev; | ||
7 | |||
8 | /** PCI core registers. **/ | ||
9 | #define BCMA_CORE_PCI_CTL 0x0000 /* PCI Control */ | ||
10 | #define BCMA_CORE_PCI_CTL_RST_OE 0x00000001 /* PCI_RESET Output Enable */ | ||
11 | #define BCMA_CORE_PCI_CTL_RST 0x00000002 /* PCI_RESET driven out to pin */ | ||
12 | #define BCMA_CORE_PCI_CTL_CLK_OE 0x00000004 /* Clock gate Output Enable */ | ||
13 | #define BCMA_CORE_PCI_CTL_CLK 0x00000008 /* Gate for clock driven out to pin */ | ||
14 | #define BCMA_CORE_PCI_ARBCTL 0x0010 /* PCI Arbiter Control */ | ||
15 | #define BCMA_CORE_PCI_ARBCTL_INTERN 0x00000001 /* Use internal arbiter */ | ||
16 | #define BCMA_CORE_PCI_ARBCTL_EXTERN 0x00000002 /* Use external arbiter */ | ||
17 | #define BCMA_CORE_PCI_ARBCTL_PARKID 0x00000006 /* Mask, selects which agent is parked on an idle bus */ | ||
18 | #define BCMA_CORE_PCI_ARBCTL_PARKID_LAST 0x00000000 /* Last requestor */ | ||
19 | #define BCMA_CORE_PCI_ARBCTL_PARKID_4710 0x00000002 /* 4710 */ | ||
20 | #define BCMA_CORE_PCI_ARBCTL_PARKID_EXT0 0x00000004 /* External requestor 0 */ | ||
21 | #define BCMA_CORE_PCI_ARBCTL_PARKID_EXT1 0x00000006 /* External requestor 1 */ | ||
22 | #define BCMA_CORE_PCI_ISTAT 0x0020 /* Interrupt status */ | ||
23 | #define BCMA_CORE_PCI_ISTAT_INTA 0x00000001 /* PCI INTA# */ | ||
24 | #define BCMA_CORE_PCI_ISTAT_INTB 0x00000002 /* PCI INTB# */ | ||
25 | #define BCMA_CORE_PCI_ISTAT_SERR 0x00000004 /* PCI SERR# (write to clear) */ | ||
26 | #define BCMA_CORE_PCI_ISTAT_PERR 0x00000008 /* PCI PERR# (write to clear) */ | ||
27 | #define BCMA_CORE_PCI_ISTAT_PME 0x00000010 /* PCI PME# */ | ||
28 | #define BCMA_CORE_PCI_IMASK 0x0024 /* Interrupt mask */ | ||
29 | #define BCMA_CORE_PCI_IMASK_INTA 0x00000001 /* PCI INTA# */ | ||
30 | #define BCMA_CORE_PCI_IMASK_INTB 0x00000002 /* PCI INTB# */ | ||
31 | #define BCMA_CORE_PCI_IMASK_SERR 0x00000004 /* PCI SERR# */ | ||
32 | #define BCMA_CORE_PCI_IMASK_PERR 0x00000008 /* PCI PERR# */ | ||
33 | #define BCMA_CORE_PCI_IMASK_PME 0x00000010 /* PCI PME# */ | ||
34 | #define BCMA_CORE_PCI_MBOX 0x0028 /* Backplane to PCI Mailbox */ | ||
35 | #define BCMA_CORE_PCI_MBOX_F0_0 0x00000100 /* PCI function 0, INT 0 */ | ||
36 | #define BCMA_CORE_PCI_MBOX_F0_1 0x00000200 /* PCI function 0, INT 1 */ | ||
37 | #define BCMA_CORE_PCI_MBOX_F1_0 0x00000400 /* PCI function 1, INT 0 */ | ||
38 | #define BCMA_CORE_PCI_MBOX_F1_1 0x00000800 /* PCI function 1, INT 1 */ | ||
39 | #define BCMA_CORE_PCI_MBOX_F2_0 0x00001000 /* PCI function 2, INT 0 */ | ||
40 | #define BCMA_CORE_PCI_MBOX_F2_1 0x00002000 /* PCI function 2, INT 1 */ | ||
41 | #define BCMA_CORE_PCI_MBOX_F3_0 0x00004000 /* PCI function 3, INT 0 */ | ||
42 | #define BCMA_CORE_PCI_MBOX_F3_1 0x00008000 /* PCI function 3, INT 1 */ | ||
43 | #define BCMA_CORE_PCI_BCAST_ADDR 0x0050 /* Backplane Broadcast Address */ | ||
44 | #define BCMA_CORE_PCI_BCAST_ADDR_MASK 0x000000FF | ||
45 | #define BCMA_CORE_PCI_BCAST_DATA 0x0054 /* Backplane Broadcast Data */ | ||
46 | #define BCMA_CORE_PCI_GPIO_IN 0x0060 /* rev >= 2 only */ | ||
47 | #define BCMA_CORE_PCI_GPIO_OUT 0x0064 /* rev >= 2 only */ | ||
48 | #define BCMA_CORE_PCI_GPIO_ENABLE 0x0068 /* rev >= 2 only */ | ||
49 | #define BCMA_CORE_PCI_GPIO_CTL 0x006C /* rev >= 2 only */ | ||
50 | #define BCMA_CORE_PCI_SBTOPCI0 0x0100 /* Backplane to PCI translation 0 (sbtopci0) */ | ||
51 | #define BCMA_CORE_PCI_SBTOPCI0_MASK 0xFC000000 | ||
52 | #define BCMA_CORE_PCI_SBTOPCI1 0x0104 /* Backplane to PCI translation 1 (sbtopci1) */ | ||
53 | #define BCMA_CORE_PCI_SBTOPCI1_MASK 0xFC000000 | ||
54 | #define BCMA_CORE_PCI_SBTOPCI2 0x0108 /* Backplane to PCI translation 2 (sbtopci2) */ | ||
55 | #define BCMA_CORE_PCI_SBTOPCI2_MASK 0xC0000000 | ||
56 | #define BCMA_CORE_PCI_PCICFG0 0x0400 /* PCI config space 0 (rev >= 8) */ | ||
57 | #define BCMA_CORE_PCI_PCICFG1 0x0500 /* PCI config space 1 (rev >= 8) */ | ||
58 | #define BCMA_CORE_PCI_PCICFG2 0x0600 /* PCI config space 2 (rev >= 8) */ | ||
59 | #define BCMA_CORE_PCI_PCICFG3 0x0700 /* PCI config space 3 (rev >= 8) */ | ||
60 | #define BCMA_CORE_PCI_SPROM(wordoffset) (0x0800 + ((wordoffset) * 2)) /* SPROM shadow area (72 bytes) */ | ||
61 | |||
62 | /* SBtoPCIx */ | ||
63 | #define BCMA_CORE_PCI_SBTOPCI_MEM 0x00000000 | ||
64 | #define BCMA_CORE_PCI_SBTOPCI_IO 0x00000001 | ||
65 | #define BCMA_CORE_PCI_SBTOPCI_CFG0 0x00000002 | ||
66 | #define BCMA_CORE_PCI_SBTOPCI_CFG1 0x00000003 | ||
67 | #define BCMA_CORE_PCI_SBTOPCI_PREF 0x00000004 /* Prefetch enable */ | ||
68 | #define BCMA_CORE_PCI_SBTOPCI_BURST 0x00000008 /* Burst enable */ | ||
69 | #define BCMA_CORE_PCI_SBTOPCI_MRM 0x00000020 /* Memory Read Multiple */ | ||
70 | #define BCMA_CORE_PCI_SBTOPCI_RC 0x00000030 /* Read Command mask (rev >= 11) */ | ||
71 | #define BCMA_CORE_PCI_SBTOPCI_RC_READ 0x00000000 /* Memory read */ | ||
72 | #define BCMA_CORE_PCI_SBTOPCI_RC_READL 0x00000010 /* Memory read line */ | ||
73 | #define BCMA_CORE_PCI_SBTOPCI_RC_READM 0x00000020 /* Memory read multiple */ | ||
74 | |||
75 | /* PCIcore specific boardflags */ | ||
76 | #define BCMA_CORE_PCI_BFL_NOPCI 0x00000400 /* Board leaves PCI floating */ | ||
77 | |||
78 | struct bcma_drv_pci { | ||
79 | struct bcma_device *core; | ||
80 | u8 setup_done:1; | ||
81 | }; | ||
82 | |||
83 | /* Register access */ | ||
84 | #define pcicore_read32(pc, offset) bcma_read32((pc)->core, offset) | ||
85 | #define pcicore_write32(pc, offset, val) bcma_write32((pc)->core, offset, val) | ||
86 | |||
87 | extern void bcma_core_pci_init(struct bcma_drv_pci *pc); | ||
88 | |||
89 | #endif /* LINUX_BCMA_DRIVER_PCI_H_ */ | ||
diff --git a/include/linux/bcma/bcma_regs.h b/include/linux/bcma/bcma_regs.h new file mode 100644 index 000000000000..f82d88a960ce --- /dev/null +++ b/include/linux/bcma/bcma_regs.h | |||
@@ -0,0 +1,34 @@ | |||
1 | #ifndef LINUX_BCMA_REGS_H_ | ||
2 | #define LINUX_BCMA_REGS_H_ | ||
3 | |||
4 | /* Agent registers (common for every core) */ | ||
5 | #define BCMA_IOCTL 0x0408 | ||
6 | #define BCMA_IOCTL_CLK 0x0001 | ||
7 | #define BCMA_IOCTL_FGC 0x0002 | ||
8 | #define BCMA_IOCTL_CORE_BITS 0x3FFC | ||
9 | #define BCMA_IOCTL_PME_EN 0x4000 | ||
10 | #define BCMA_IOCTL_BIST_EN 0x8000 | ||
11 | #define BCMA_RESET_CTL 0x0800 | ||
12 | #define BCMA_RESET_CTL_RESET 0x0001 | ||
13 | |||
14 | /* BCMA PCI config space registers. */ | ||
15 | #define BCMA_PCI_PMCSR 0x44 | ||
16 | #define BCMA_PCI_PE 0x100 | ||
17 | #define BCMA_PCI_BAR0_WIN 0x80 /* Backplane address space 0 */ | ||
18 | #define BCMA_PCI_BAR1_WIN 0x84 /* Backplane address space 1 */ | ||
19 | #define BCMA_PCI_SPROMCTL 0x88 /* SPROM control */ | ||
20 | #define BCMA_PCI_SPROMCTL_WE 0x10 /* SPROM write enable */ | ||
21 | #define BCMA_PCI_BAR1_CONTROL 0x8c /* Address space 1 burst control */ | ||
22 | #define BCMA_PCI_IRQS 0x90 /* PCI interrupts */ | ||
23 | #define BCMA_PCI_IRQMASK 0x94 /* PCI IRQ control and mask (pcirev >= 6 only) */ | ||
24 | #define BCMA_PCI_BACKPLANE_IRQS 0x98 /* Backplane Interrupts */ | ||
25 | #define BCMA_PCI_BAR0_WIN2 0xAC | ||
26 | #define BCMA_PCI_GPIO_IN 0xB0 /* GPIO Input (pcirev >= 3 only) */ | ||
27 | #define BCMA_PCI_GPIO_OUT 0xB4 /* GPIO Output (pcirev >= 3 only) */ | ||
28 | #define BCMA_PCI_GPIO_OUT_ENABLE 0xB8 /* GPIO Output Enable/Disable (pcirev >= 3 only) */ | ||
29 | #define BCMA_PCI_GPIO_SCS 0x10 /* PCI config space bit 4 for 4306c0 slow clock source */ | ||
30 | #define BCMA_PCI_GPIO_HWRAD 0x20 /* PCI config space GPIO 13 for hw radio disable */ | ||
31 | #define BCMA_PCI_GPIO_XTAL 0x40 /* PCI config space GPIO 14 for Xtal powerup */ | ||
32 | #define BCMA_PCI_GPIO_PLL 0x80 /* PCI config space GPIO 15 for PLL powerdown */ | ||
33 | |||
34 | #endif /* LINUX_BCMA_REGS_H_ */ | ||
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index c3d6512eded1..8845613fd7e3 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -60,10 +60,6 @@ struct linux_binprm { | |||
60 | unsigned long loader, exec; | 60 | unsigned long loader, exec; |
61 | }; | 61 | }; |
62 | 62 | ||
63 | extern void acct_arg_size(struct linux_binprm *bprm, unsigned long pages); | ||
64 | extern struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, | ||
65 | int write); | ||
66 | |||
67 | #define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0 | 63 | #define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0 |
68 | #define BINPRM_FLAGS_ENFORCE_NONDUMP (1 << BINPRM_FLAGS_ENFORCE_NONDUMP_BIT) | 64 | #define BINPRM_FLAGS_ENFORCE_NONDUMP (1 << BINPRM_FLAGS_ENFORCE_NONDUMP_BIT) |
69 | 65 | ||
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index b8613e806aa9..01eca1794e14 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -111,6 +111,8 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat, | |||
111 | __alloc_bootmem_nopanic(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | 111 | __alloc_bootmem_nopanic(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) |
112 | #define alloc_bootmem_node(pgdat, x) \ | 112 | #define alloc_bootmem_node(pgdat, x) \ |
113 | __alloc_bootmem_node(pgdat, x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | 113 | __alloc_bootmem_node(pgdat, x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) |
114 | #define alloc_bootmem_node_nopanic(pgdat, x) \ | ||
115 | __alloc_bootmem_node_nopanic(pgdat, x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | ||
114 | #define alloc_bootmem_pages_node(pgdat, x) \ | 116 | #define alloc_bootmem_pages_node(pgdat, x) \ |
115 | __alloc_bootmem_node(pgdat, x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | 117 | __alloc_bootmem_node(pgdat, x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) |
116 | #define alloc_bootmem_pages_node_nopanic(pgdat, x) \ | 118 | #define alloc_bootmem_pages_node_nopanic(pgdat, x) \ |
diff --git a/include/linux/bsearch.h b/include/linux/bsearch.h new file mode 100644 index 000000000000..90b1aa867224 --- /dev/null +++ b/include/linux/bsearch.h | |||
@@ -0,0 +1,9 @@ | |||
1 | #ifndef _LINUX_BSEARCH_H | ||
2 | #define _LINUX_BSEARCH_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | void *bsearch(const void *key, const void *base, size_t num, size_t size, | ||
7 | int (*cmp)(const void *key, const void *elt)); | ||
8 | |||
9 | #endif /* _LINUX_BSEARCH_H */ | ||
diff --git a/include/linux/can/core.h b/include/linux/can/core.h index 6f70a6d3a16e..5ce6b5d62ecc 100644 --- a/include/linux/can/core.h +++ b/include/linux/can/core.h | |||
@@ -44,8 +44,8 @@ struct can_proto { | |||
44 | 44 | ||
45 | /* function prototypes for the CAN networklayer core (af_can.c) */ | 45 | /* function prototypes for the CAN networklayer core (af_can.c) */ |
46 | 46 | ||
47 | extern int can_proto_register(struct can_proto *cp); | 47 | extern int can_proto_register(const struct can_proto *cp); |
48 | extern void can_proto_unregister(struct can_proto *cp); | 48 | extern void can_proto_unregister(const struct can_proto *cp); |
49 | 49 | ||
50 | extern int can_rx_register(struct net_device *dev, canid_t can_id, | 50 | extern int can_rx_register(struct net_device *dev, canid_t can_id, |
51 | canid_t mask, | 51 | canid_t mask, |
diff --git a/include/linux/capability.h b/include/linux/capability.h index 16ee8b49a200..4554db0cde86 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -355,7 +355,12 @@ struct cpu_vfs_cap_data { | |||
355 | 355 | ||
356 | #define CAP_SYSLOG 34 | 356 | #define CAP_SYSLOG 34 |
357 | 357 | ||
358 | #define CAP_LAST_CAP CAP_SYSLOG | 358 | /* Allow triggering something that will wake the system */ |
359 | |||
360 | #define CAP_WAKE_ALARM 35 | ||
361 | |||
362 | |||
363 | #define CAP_LAST_CAP CAP_WAKE_ALARM | ||
359 | 364 | ||
360 | #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP) | 365 | #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP) |
361 | 366 | ||
@@ -546,18 +551,7 @@ extern bool has_capability_noaudit(struct task_struct *t, int cap); | |||
546 | extern bool capable(int cap); | 551 | extern bool capable(int cap); |
547 | extern bool ns_capable(struct user_namespace *ns, int cap); | 552 | extern bool ns_capable(struct user_namespace *ns, int cap); |
548 | extern bool task_ns_capable(struct task_struct *t, int cap); | 553 | extern bool task_ns_capable(struct task_struct *t, int cap); |
549 | 554 | extern bool nsown_capable(int cap); | |
550 | /** | ||
551 | * nsown_capable - Check superior capability to one's own user_ns | ||
552 | * @cap: The capability in question | ||
553 | * | ||
554 | * Return true if the current task has the given superior capability | ||
555 | * targeted at its own user namespace. | ||
556 | */ | ||
557 | static inline bool nsown_capable(int cap) | ||
558 | { | ||
559 | return ns_capable(current_user_ns(), cap); | ||
560 | } | ||
561 | 555 | ||
562 | /* audit system wants to get cap info from files as well */ | 556 | /* audit system wants to get cap info from files as well */ |
563 | extern int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps); | 557 | extern int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps); |
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index fc53492b6ad7..d6733e27af34 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
@@ -56,46 +56,52 @@ enum clock_event_nofitiers { | |||
56 | 56 | ||
57 | /** | 57 | /** |
58 | * struct clock_event_device - clock event device descriptor | 58 | * struct clock_event_device - clock event device descriptor |
59 | * @name: ptr to clock event name | 59 | * @event_handler: Assigned by the framework to be called by the low |
60 | * @features: features | 60 | * level handler of the event source |
61 | * @set_next_event: set next event function | ||
62 | * @next_event: local storage for the next event in oneshot mode | ||
61 | * @max_delta_ns: maximum delta value in ns | 63 | * @max_delta_ns: maximum delta value in ns |
62 | * @min_delta_ns: minimum delta value in ns | 64 | * @min_delta_ns: minimum delta value in ns |
63 | * @mult: nanosecond to cycles multiplier | 65 | * @mult: nanosecond to cycles multiplier |
64 | * @shift: nanoseconds to cycles divisor (power of two) | 66 | * @shift: nanoseconds to cycles divisor (power of two) |
67 | * @mode: operating mode assigned by the management code | ||
68 | * @features: features | ||
69 | * @retries: number of forced programming retries | ||
70 | * @set_mode: set mode function | ||
71 | * @broadcast: function to broadcast events | ||
72 | * @min_delta_ticks: minimum delta value in ticks stored for reconfiguration | ||
73 | * @max_delta_ticks: maximum delta value in ticks stored for reconfiguration | ||
74 | * @name: ptr to clock event name | ||
65 | * @rating: variable to rate clock event devices | 75 | * @rating: variable to rate clock event devices |
66 | * @irq: IRQ number (only for non CPU local devices) | 76 | * @irq: IRQ number (only for non CPU local devices) |
67 | * @cpumask: cpumask to indicate for which CPUs this device works | 77 | * @cpumask: cpumask to indicate for which CPUs this device works |
68 | * @set_next_event: set next event function | ||
69 | * @set_mode: set mode function | ||
70 | * @event_handler: Assigned by the framework to be called by the low | ||
71 | * level handler of the event source | ||
72 | * @broadcast: function to broadcast events | ||
73 | * @list: list head for the management code | 78 | * @list: list head for the management code |
74 | * @mode: operating mode assigned by the management code | ||
75 | * @next_event: local storage for the next event in oneshot mode | ||
76 | * @retries: number of forced programming retries | ||
77 | */ | 79 | */ |
78 | struct clock_event_device { | 80 | struct clock_event_device { |
79 | const char *name; | 81 | void (*event_handler)(struct clock_event_device *); |
80 | unsigned int features; | 82 | int (*set_next_event)(unsigned long evt, |
83 | struct clock_event_device *); | ||
84 | ktime_t next_event; | ||
81 | u64 max_delta_ns; | 85 | u64 max_delta_ns; |
82 | u64 min_delta_ns; | 86 | u64 min_delta_ns; |
83 | u32 mult; | 87 | u32 mult; |
84 | u32 shift; | 88 | u32 shift; |
89 | enum clock_event_mode mode; | ||
90 | unsigned int features; | ||
91 | unsigned long retries; | ||
92 | |||
93 | void (*broadcast)(const struct cpumask *mask); | ||
94 | void (*set_mode)(enum clock_event_mode mode, | ||
95 | struct clock_event_device *); | ||
96 | unsigned long min_delta_ticks; | ||
97 | unsigned long max_delta_ticks; | ||
98 | |||
99 | const char *name; | ||
85 | int rating; | 100 | int rating; |
86 | int irq; | 101 | int irq; |
87 | const struct cpumask *cpumask; | 102 | const struct cpumask *cpumask; |
88 | int (*set_next_event)(unsigned long evt, | ||
89 | struct clock_event_device *); | ||
90 | void (*set_mode)(enum clock_event_mode mode, | ||
91 | struct clock_event_device *); | ||
92 | void (*event_handler)(struct clock_event_device *); | ||
93 | void (*broadcast)(const struct cpumask *mask); | ||
94 | struct list_head list; | 103 | struct list_head list; |
95 | enum clock_event_mode mode; | 104 | } ____cacheline_aligned; |
96 | ktime_t next_event; | ||
97 | unsigned long retries; | ||
98 | }; | ||
99 | 105 | ||
100 | /* | 106 | /* |
101 | * Calculate a multiplication factor for scaled math, which is used to convert | 107 | * Calculate a multiplication factor for scaled math, which is used to convert |
@@ -122,6 +128,12 @@ extern u64 clockevent_delta2ns(unsigned long latch, | |||
122 | struct clock_event_device *evt); | 128 | struct clock_event_device *evt); |
123 | extern void clockevents_register_device(struct clock_event_device *dev); | 129 | extern void clockevents_register_device(struct clock_event_device *dev); |
124 | 130 | ||
131 | extern void clockevents_config_and_register(struct clock_event_device *dev, | ||
132 | u32 freq, unsigned long min_delta, | ||
133 | unsigned long max_delta); | ||
134 | |||
135 | extern int clockevents_update_freq(struct clock_event_device *ce, u32 freq); | ||
136 | |||
125 | extern void clockevents_exchange_device(struct clock_event_device *old, | 137 | extern void clockevents_exchange_device(struct clock_event_device *old, |
126 | struct clock_event_device *new); | 138 | struct clock_event_device *new); |
127 | extern void clockevents_set_mode(struct clock_event_device *dev, | 139 | extern void clockevents_set_mode(struct clock_event_device *dev, |
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index c37b21ad5a3b..d4646b48dc4a 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
@@ -159,42 +159,38 @@ extern u64 timecounter_cyc2time(struct timecounter *tc, | |||
159 | */ | 159 | */ |
160 | struct clocksource { | 160 | struct clocksource { |
161 | /* | 161 | /* |
162 | * First part of structure is read mostly | 162 | * Hotpath data, fits in a single cache line when the |
163 | * clocksource itself is cacheline aligned. | ||
163 | */ | 164 | */ |
164 | char *name; | ||
165 | struct list_head list; | ||
166 | int rating; | ||
167 | cycle_t (*read)(struct clocksource *cs); | 165 | cycle_t (*read)(struct clocksource *cs); |
168 | int (*enable)(struct clocksource *cs); | 166 | cycle_t cycle_last; |
169 | void (*disable)(struct clocksource *cs); | ||
170 | cycle_t mask; | 167 | cycle_t mask; |
171 | u32 mult; | 168 | u32 mult; |
172 | u32 shift; | 169 | u32 shift; |
173 | u64 max_idle_ns; | 170 | u64 max_idle_ns; |
174 | unsigned long flags; | 171 | |
175 | cycle_t (*vread)(void); | ||
176 | void (*suspend)(struct clocksource *cs); | ||
177 | void (*resume)(struct clocksource *cs); | ||
178 | #ifdef CONFIG_IA64 | 172 | #ifdef CONFIG_IA64 |
179 | void *fsys_mmio; /* used by fsyscall asm code */ | 173 | void *fsys_mmio; /* used by fsyscall asm code */ |
180 | #define CLKSRC_FSYS_MMIO_SET(mmio, addr) ((mmio) = (addr)) | 174 | #define CLKSRC_FSYS_MMIO_SET(mmio, addr) ((mmio) = (addr)) |
181 | #else | 175 | #else |
182 | #define CLKSRC_FSYS_MMIO_SET(mmio, addr) do { } while (0) | 176 | #define CLKSRC_FSYS_MMIO_SET(mmio, addr) do { } while (0) |
183 | #endif | 177 | #endif |
184 | 178 | const char *name; | |
185 | /* | 179 | struct list_head list; |
186 | * Second part is written at each timer interrupt | 180 | int rating; |
187 | * Keep it in a different cache line to dirty no | 181 | cycle_t (*vread)(void); |
188 | * more than one cache line. | 182 | int (*enable)(struct clocksource *cs); |
189 | */ | 183 | void (*disable)(struct clocksource *cs); |
190 | cycle_t cycle_last ____cacheline_aligned_in_smp; | 184 | unsigned long flags; |
185 | void (*suspend)(struct clocksource *cs); | ||
186 | void (*resume)(struct clocksource *cs); | ||
191 | 187 | ||
192 | #ifdef CONFIG_CLOCKSOURCE_WATCHDOG | 188 | #ifdef CONFIG_CLOCKSOURCE_WATCHDOG |
193 | /* Watchdog related data, used by the framework */ | 189 | /* Watchdog related data, used by the framework */ |
194 | struct list_head wd_list; | 190 | struct list_head wd_list; |
195 | cycle_t wd_last; | 191 | cycle_t wd_last; |
196 | #endif | 192 | #endif |
197 | }; | 193 | } ____cacheline_aligned; |
198 | 194 | ||
199 | /* | 195 | /* |
200 | * Clock source flags bits:: | 196 | * Clock source flags bits:: |
@@ -341,4 +337,14 @@ static inline void update_vsyscall_tz(void) | |||
341 | 337 | ||
342 | extern void timekeeping_notify(struct clocksource *clock); | 338 | extern void timekeeping_notify(struct clocksource *clock); |
343 | 339 | ||
340 | extern cycle_t clocksource_mmio_readl_up(struct clocksource *); | ||
341 | extern cycle_t clocksource_mmio_readl_down(struct clocksource *); | ||
342 | extern cycle_t clocksource_mmio_readw_up(struct clocksource *); | ||
343 | extern cycle_t clocksource_mmio_readw_down(struct clocksource *); | ||
344 | |||
345 | extern int clocksource_mmio_init(void __iomem *, const char *, | ||
346 | unsigned long, int, unsigned, cycle_t (*)(struct clocksource *)); | ||
347 | |||
348 | extern int clocksource_i8253_init(void); | ||
349 | |||
344 | #endif /* _LINUX_CLOCKSOURCE_H */ | 350 | #endif /* _LINUX_CLOCKSOURCE_H */ |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 9343dd3de858..11be48e0d168 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2001 Russell King | 4 | * Copyright (C) 2001 Russell King |
5 | * (C) 2002 - 2003 Dominik Brodowski <linux@brodo.de> | 5 | * (C) 2002 - 2003 Dominik Brodowski <linux@brodo.de> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License version 2 as | 8 | * it under the terms of the GNU General Public License version 2 as |
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
@@ -56,9 +56,9 @@ static inline int cpufreq_unregister_notifier(struct notifier_block *nb, | |||
56 | #define CPUFREQ_POLICY_POWERSAVE (1) | 56 | #define CPUFREQ_POLICY_POWERSAVE (1) |
57 | #define CPUFREQ_POLICY_PERFORMANCE (2) | 57 | #define CPUFREQ_POLICY_PERFORMANCE (2) |
58 | 58 | ||
59 | /* Frequency values here are CPU kHz so that hardware which doesn't run | 59 | /* Frequency values here are CPU kHz so that hardware which doesn't run |
60 | * with some frequencies can complain without having to guess what per | 60 | * with some frequencies can complain without having to guess what per |
61 | * cent / per mille means. | 61 | * cent / per mille means. |
62 | * Maximum transition latency is in nanoseconds - if it's unknown, | 62 | * Maximum transition latency is in nanoseconds - if it's unknown, |
63 | * CPUFREQ_ETERNAL shall be used. | 63 | * CPUFREQ_ETERNAL shall be used. |
64 | */ | 64 | */ |
@@ -72,13 +72,15 @@ extern struct kobject *cpufreq_global_kobject; | |||
72 | struct cpufreq_cpuinfo { | 72 | struct cpufreq_cpuinfo { |
73 | unsigned int max_freq; | 73 | unsigned int max_freq; |
74 | unsigned int min_freq; | 74 | unsigned int min_freq; |
75 | unsigned int transition_latency; /* in 10^(-9) s = nanoseconds */ | 75 | |
76 | /* in 10^(-9) s = nanoseconds */ | ||
77 | unsigned int transition_latency; | ||
76 | }; | 78 | }; |
77 | 79 | ||
78 | struct cpufreq_real_policy { | 80 | struct cpufreq_real_policy { |
79 | unsigned int min; /* in kHz */ | 81 | unsigned int min; /* in kHz */ |
80 | unsigned int max; /* in kHz */ | 82 | unsigned int max; /* in kHz */ |
81 | unsigned int policy; /* see above */ | 83 | unsigned int policy; /* see above */ |
82 | struct cpufreq_governor *governor; /* see below */ | 84 | struct cpufreq_governor *governor; /* see below */ |
83 | }; | 85 | }; |
84 | 86 | ||
@@ -94,7 +96,7 @@ struct cpufreq_policy { | |||
94 | unsigned int max; /* in kHz */ | 96 | unsigned int max; /* in kHz */ |
95 | unsigned int cur; /* in kHz, only needed if cpufreq | 97 | unsigned int cur; /* in kHz, only needed if cpufreq |
96 | * governors are used */ | 98 | * governors are used */ |
97 | unsigned int policy; /* see above */ | 99 | unsigned int policy; /* see above */ |
98 | struct cpufreq_governor *governor; /* see below */ | 100 | struct cpufreq_governor *governor; /* see below */ |
99 | 101 | ||
100 | struct work_struct update; /* if update_policy() needs to be | 102 | struct work_struct update; /* if update_policy() needs to be |
@@ -167,11 +169,11 @@ static inline unsigned long cpufreq_scale(unsigned long old, u_int div, u_int mu | |||
167 | 169 | ||
168 | struct cpufreq_governor { | 170 | struct cpufreq_governor { |
169 | char name[CPUFREQ_NAME_LEN]; | 171 | char name[CPUFREQ_NAME_LEN]; |
170 | int (*governor) (struct cpufreq_policy *policy, | 172 | int (*governor) (struct cpufreq_policy *policy, |
171 | unsigned int event); | 173 | unsigned int event); |
172 | ssize_t (*show_setspeed) (struct cpufreq_policy *policy, | 174 | ssize_t (*show_setspeed) (struct cpufreq_policy *policy, |
173 | char *buf); | 175 | char *buf); |
174 | int (*store_setspeed) (struct cpufreq_policy *policy, | 176 | int (*store_setspeed) (struct cpufreq_policy *policy, |
175 | unsigned int freq); | 177 | unsigned int freq); |
176 | unsigned int max_transition_latency; /* HW must be able to switch to | 178 | unsigned int max_transition_latency; /* HW must be able to switch to |
177 | next freq faster than this value in nano secs or we | 179 | next freq faster than this value in nano secs or we |
@@ -180,7 +182,8 @@ struct cpufreq_governor { | |||
180 | struct module *owner; | 182 | struct module *owner; |
181 | }; | 183 | }; |
182 | 184 | ||
183 | /* pass a target to the cpufreq driver | 185 | /* |
186 | * Pass a target to the cpufreq driver. | ||
184 | */ | 187 | */ |
185 | extern int cpufreq_driver_target(struct cpufreq_policy *policy, | 188 | extern int cpufreq_driver_target(struct cpufreq_policy *policy, |
186 | unsigned int target_freq, | 189 | unsigned int target_freq, |
@@ -237,9 +240,9 @@ struct cpufreq_driver { | |||
237 | 240 | ||
238 | /* flags */ | 241 | /* flags */ |
239 | 242 | ||
240 | #define CPUFREQ_STICKY 0x01 /* the driver isn't removed even if | 243 | #define CPUFREQ_STICKY 0x01 /* the driver isn't removed even if |
241 | * all ->init() calls failed */ | 244 | * all ->init() calls failed */ |
242 | #define CPUFREQ_CONST_LOOPS 0x02 /* loops_per_jiffy or other kernel | 245 | #define CPUFREQ_CONST_LOOPS 0x02 /* loops_per_jiffy or other kernel |
243 | * "constants" aren't affected by | 246 | * "constants" aren't affected by |
244 | * frequency transitions */ | 247 | * frequency transitions */ |
245 | #define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed | 248 | #define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed |
@@ -252,7 +255,7 @@ int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); | |||
252 | void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state); | 255 | void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state); |
253 | 256 | ||
254 | 257 | ||
255 | static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, unsigned int min, unsigned int max) | 258 | static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, unsigned int min, unsigned int max) |
256 | { | 259 | { |
257 | if (policy->min < min) | 260 | if (policy->min < min) |
258 | policy->min = min; | 261 | policy->min = min; |
@@ -386,34 +389,15 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy, | |||
386 | /* the following 3 funtions are for cpufreq core use only */ | 389 | /* the following 3 funtions are for cpufreq core use only */ |
387 | struct cpufreq_frequency_table *cpufreq_frequency_get_table(unsigned int cpu); | 390 | struct cpufreq_frequency_table *cpufreq_frequency_get_table(unsigned int cpu); |
388 | struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu); | 391 | struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu); |
389 | void cpufreq_cpu_put (struct cpufreq_policy *data); | 392 | void cpufreq_cpu_put(struct cpufreq_policy *data); |
390 | 393 | ||
391 | /* the following are really really optional */ | 394 | /* the following are really really optional */ |
392 | extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs; | 395 | extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs; |
393 | 396 | ||
394 | void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table, | 397 | void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table, |
395 | unsigned int cpu); | 398 | unsigned int cpu); |
396 | 399 | ||
397 | void cpufreq_frequency_table_put_attr(unsigned int cpu); | 400 | void cpufreq_frequency_table_put_attr(unsigned int cpu); |
398 | 401 | ||
399 | 402 | ||
400 | /********************************************************************* | ||
401 | * UNIFIED DEBUG HELPERS * | ||
402 | *********************************************************************/ | ||
403 | |||
404 | #define CPUFREQ_DEBUG_CORE 1 | ||
405 | #define CPUFREQ_DEBUG_DRIVER 2 | ||
406 | #define CPUFREQ_DEBUG_GOVERNOR 4 | ||
407 | |||
408 | #ifdef CONFIG_CPU_FREQ_DEBUG | ||
409 | |||
410 | extern void cpufreq_debug_printk(unsigned int type, const char *prefix, | ||
411 | const char *fmt, ...); | ||
412 | |||
413 | #else | ||
414 | |||
415 | #define cpufreq_debug_printk(msg...) do { } while(0) | ||
416 | |||
417 | #endif /* CONFIG_CPU_FREQ_DEBUG */ | ||
418 | |||
419 | #endif /* _LINUX_CPUFREQ_H */ | 403 | #endif /* _LINUX_CPUFREQ_H */ |
diff --git a/include/linux/cred.h b/include/linux/cred.h index 9aeeb0ba2003..be16b61283cc 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
@@ -146,6 +146,7 @@ struct cred { | |||
146 | void *security; /* subjective LSM security */ | 146 | void *security; /* subjective LSM security */ |
147 | #endif | 147 | #endif |
148 | struct user_struct *user; /* real user ID subscription */ | 148 | struct user_struct *user; /* real user ID subscription */ |
149 | struct user_namespace *user_ns; /* cached user->user_ns */ | ||
149 | struct group_info *group_info; /* supplementary groups for euid/fsgid */ | 150 | struct group_info *group_info; /* supplementary groups for euid/fsgid */ |
150 | struct rcu_head rcu; /* RCU deletion hook */ | 151 | struct rcu_head rcu; /* RCU deletion hook */ |
151 | }; | 152 | }; |
@@ -354,10 +355,15 @@ static inline void put_cred(const struct cred *_cred) | |||
354 | #define current_fsgid() (current_cred_xxx(fsgid)) | 355 | #define current_fsgid() (current_cred_xxx(fsgid)) |
355 | #define current_cap() (current_cred_xxx(cap_effective)) | 356 | #define current_cap() (current_cred_xxx(cap_effective)) |
356 | #define current_user() (current_cred_xxx(user)) | 357 | #define current_user() (current_cred_xxx(user)) |
357 | #define _current_user_ns() (current_cred_xxx(user)->user_ns) | ||
358 | #define current_security() (current_cred_xxx(security)) | 358 | #define current_security() (current_cred_xxx(security)) |
359 | 359 | ||
360 | extern struct user_namespace *current_user_ns(void); | 360 | #ifdef CONFIG_USER_NS |
361 | #define current_user_ns() (current_cred_xxx(user_ns)) | ||
362 | #else | ||
363 | extern struct user_namespace init_user_ns; | ||
364 | #define current_user_ns() (&init_user_ns) | ||
365 | #endif | ||
366 | |||
361 | 367 | ||
362 | #define current_uid_gid(_uid, _gid) \ | 368 | #define current_uid_gid(_uid, _gid) \ |
363 | do { \ | 369 | do { \ |
diff --git a/include/linux/device.h b/include/linux/device.h index ab8dfc095709..c66111affca9 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -47,6 +47,38 @@ extern int __must_check bus_create_file(struct bus_type *, | |||
47 | struct bus_attribute *); | 47 | struct bus_attribute *); |
48 | extern void bus_remove_file(struct bus_type *, struct bus_attribute *); | 48 | extern void bus_remove_file(struct bus_type *, struct bus_attribute *); |
49 | 49 | ||
50 | /** | ||
51 | * struct bus_type - The bus type of the device | ||
52 | * | ||
53 | * @name: The name of the bus. | ||
54 | * @bus_attrs: Default attributes of the bus. | ||
55 | * @dev_attrs: Default attributes of the devices on the bus. | ||
56 | * @drv_attrs: Default attributes of the device drivers on the bus. | ||
57 | * @match: Called, perhaps multiple times, whenever a new device or driver | ||
58 | * is added for this bus. It should return a nonzero value if the | ||
59 | * given device can be handled by the given driver. | ||
60 | * @uevent: Called when a device is added, removed, or a few other things | ||
61 | * that generate uevents to add the environment variables. | ||
62 | * @probe: Called when a new device or driver add to this bus, and callback | ||
63 | * the specific driver's probe to initial the matched device. | ||
64 | * @remove: Called when a device removed from this bus. | ||
65 | * @shutdown: Called at shut-down time to quiesce the device. | ||
66 | * @suspend: Called when a device on this bus wants to go to sleep mode. | ||
67 | * @resume: Called to bring a device on this bus out of sleep mode. | ||
68 | * @pm: Power management operations of this bus, callback the specific | ||
69 | * device driver's pm-ops. | ||
70 | * @p: The private data of the driver core, only the driver core can | ||
71 | * touch this. | ||
72 | * | ||
73 | * A bus is a channel between the processor and one or more devices. For the | ||
74 | * purposes of the device model, all devices are connected via a bus, even if | ||
75 | * it is an internal, virtual, "platform" bus. Buses can plug into each other. | ||
76 | * A USB controller is usually a PCI device, for example. The device model | ||
77 | * represents the actual connections between buses and the devices they control. | ||
78 | * A bus is represented by the bus_type structure. It contains the name, the | ||
79 | * default attributes, the bus' methods, PM operations, and the driver core's | ||
80 | * private data. | ||
81 | */ | ||
50 | struct bus_type { | 82 | struct bus_type { |
51 | const char *name; | 83 | const char *name; |
52 | struct bus_attribute *bus_attrs; | 84 | struct bus_attribute *bus_attrs; |
@@ -119,6 +151,37 @@ extern int bus_unregister_notifier(struct bus_type *bus, | |||
119 | extern struct kset *bus_get_kset(struct bus_type *bus); | 151 | extern struct kset *bus_get_kset(struct bus_type *bus); |
120 | extern struct klist *bus_get_device_klist(struct bus_type *bus); | 152 | extern struct klist *bus_get_device_klist(struct bus_type *bus); |
121 | 153 | ||
154 | /** | ||
155 | * struct device_driver - The basic device driver structure | ||
156 | * @name: Name of the device driver. | ||
157 | * @bus: The bus which the device of this driver belongs to. | ||
158 | * @owner: The module owner. | ||
159 | * @mod_name: Used for built-in modules. | ||
160 | * @suppress_bind_attrs: Disables bind/unbind via sysfs. | ||
161 | * @of_match_table: The open firmware table. | ||
162 | * @probe: Called to query the existence of a specific device, | ||
163 | * whether this driver can work with it, and bind the driver | ||
164 | * to a specific device. | ||
165 | * @remove: Called when the device is removed from the system to | ||
166 | * unbind a device from this driver. | ||
167 | * @shutdown: Called at shut-down time to quiesce the device. | ||
168 | * @suspend: Called to put the device to sleep mode. Usually to a | ||
169 | * low power state. | ||
170 | * @resume: Called to bring a device from sleep mode. | ||
171 | * @groups: Default attributes that get created by the driver core | ||
172 | * automatically. | ||
173 | * @pm: Power management operations of the device which matched | ||
174 | * this driver. | ||
175 | * @p: Driver core's private data, no one other than the driver | ||
176 | * core can touch this. | ||
177 | * | ||
178 | * The device driver-model tracks all of the drivers known to the system. | ||
179 | * The main reason for this tracking is to enable the driver core to match | ||
180 | * up drivers with new devices. Once drivers are known objects within the | ||
181 | * system, however, a number of other things become possible. Device drivers | ||
182 | * can export information and configuration variables that are independent | ||
183 | * of any specific device. | ||
184 | */ | ||
122 | struct device_driver { | 185 | struct device_driver { |
123 | const char *name; | 186 | const char *name; |
124 | struct bus_type *bus; | 187 | struct bus_type *bus; |
@@ -185,8 +248,34 @@ struct device *driver_find_device(struct device_driver *drv, | |||
185 | struct device *start, void *data, | 248 | struct device *start, void *data, |
186 | int (*match)(struct device *dev, void *data)); | 249 | int (*match)(struct device *dev, void *data)); |
187 | 250 | ||
188 | /* | 251 | /** |
189 | * device classes | 252 | * struct class - device classes |
253 | * @name: Name of the class. | ||
254 | * @owner: The module owner. | ||
255 | * @class_attrs: Default attributes of this class. | ||
256 | * @dev_attrs: Default attributes of the devices belong to the class. | ||
257 | * @dev_bin_attrs: Default binary attributes of the devices belong to the class. | ||
258 | * @dev_kobj: The kobject that represents this class and links it into the hierarchy. | ||
259 | * @dev_uevent: Called when a device is added, removed from this class, or a | ||
260 | * few other things that generate uevents to add the environment | ||
261 | * variables. | ||
262 | * @devnode: Callback to provide the devtmpfs. | ||
263 | * @class_release: Called to release this class. | ||
264 | * @dev_release: Called to release the device. | ||
265 | * @suspend: Used to put the device to sleep mode, usually to a low power | ||
266 | * state. | ||
267 | * @resume: Used to bring the device from the sleep mode. | ||
268 | * @ns_type: Callbacks so sysfs can detemine namespaces. | ||
269 | * @namespace: Namespace of the device belongs to this class. | ||
270 | * @pm: The default device power management operations of this class. | ||
271 | * @p: The private data of the driver core, no one other than the | ||
272 | * driver core can touch this. | ||
273 | * | ||
274 | * A class is a higher-level view of a device that abstracts out low-level | ||
275 | * implementation details. Drivers may see a SCSI disk or an ATA disk, but, | ||
276 | * at the class level, they are all simply disks. Classes allow user space | ||
277 | * to work with devices based on what they do, rather than how they are | ||
278 | * connected or how they work. | ||
190 | */ | 279 | */ |
191 | struct class { | 280 | struct class { |
192 | const char *name; | 281 | const char *name; |
@@ -401,6 +490,65 @@ struct device_dma_parameters { | |||
401 | unsigned long segment_boundary_mask; | 490 | unsigned long segment_boundary_mask; |
402 | }; | 491 | }; |
403 | 492 | ||
493 | /** | ||
494 | * struct device - The basic device structure | ||
495 | * @parent: The device's "parent" device, the device to which it is attached. | ||
496 | * In most cases, a parent device is some sort of bus or host | ||
497 | * controller. If parent is NULL, the device, is a top-level device, | ||
498 | * which is not usually what you want. | ||
499 | * @p: Holds the private data of the driver core portions of the device. | ||
500 | * See the comment of the struct device_private for detail. | ||
501 | * @kobj: A top-level, abstract class from which other classes are derived. | ||
502 | * @init_name: Initial name of the device. | ||
503 | * @type: The type of device. | ||
504 | * This identifies the device type and carries type-specific | ||
505 | * information. | ||
506 | * @mutex: Mutex to synchronize calls to its driver. | ||
507 | * @bus: Type of bus device is on. | ||
508 | * @driver: Which driver has allocated this | ||
509 | * @platform_data: Platform data specific to the device. | ||
510 | * Example: For devices on custom boards, as typical of embedded | ||
511 | * and SOC based hardware, Linux often uses platform_data to point | ||
512 | * to board-specific structures describing devices and how they | ||
513 | * are wired. That can include what ports are available, chip | ||
514 | * variants, which GPIO pins act in what additional roles, and so | ||
515 | * on. This shrinks the "Board Support Packages" (BSPs) and | ||
516 | * minimizes board-specific #ifdefs in drivers. | ||
517 | * @power: For device power management. | ||
518 | * See Documentation/power/devices.txt for details. | ||
519 | * @pwr_domain: Provide callbacks that are executed during system suspend, | ||
520 | * hibernation, system resume and during runtime PM transitions | ||
521 | * along with subsystem-level and driver-level callbacks. | ||
522 | * @numa_node: NUMA node this device is close to. | ||
523 | * @dma_mask: Dma mask (if dma'ble device). | ||
524 | * @coherent_dma_mask: Like dma_mask, but for alloc_coherent mapping as not all | ||
525 | * hardware supports 64-bit addresses for consistent allocations | ||
526 | * such descriptors. | ||
527 | * @dma_parms: A low level driver may set these to teach IOMMU code about | ||
528 | * segment limitations. | ||
529 | * @dma_pools: Dma pools (if dma'ble device). | ||
530 | * @dma_mem: Internal for coherent mem override. | ||
531 | * @archdata: For arch-specific additions. | ||
532 | * @of_node: Associated device tree node. | ||
533 | * @of_match: Matching of_device_id from driver. | ||
534 | * @devt: For creating the sysfs "dev". | ||
535 | * @devres_lock: Spinlock to protect the resource of the device. | ||
536 | * @devres_head: The resources list of the device. | ||
537 | * @knode_class: The node used to add the device to the class list. | ||
538 | * @class: The class of the device. | ||
539 | * @groups: Optional attribute groups. | ||
540 | * @release: Callback to free the device after all references have | ||
541 | * gone away. This should be set by the allocator of the | ||
542 | * device (i.e. the bus driver that discovered the device). | ||
543 | * | ||
544 | * At the lowest level, every device in a Linux system is represented by an | ||
545 | * instance of struct device. The device structure contains the information | ||
546 | * that the device model core needs to model the system. Most subsystems, | ||
547 | * however, track additional information about the devices they host. As a | ||
548 | * result, it is rare for devices to be represented by bare device structures; | ||
549 | * instead, that structure, like kobject structures, is usually embedded within | ||
550 | * a higher-level representation of the device. | ||
551 | */ | ||
404 | struct device { | 552 | struct device { |
405 | struct device *parent; | 553 | struct device *parent; |
406 | 554 | ||
@@ -408,7 +556,7 @@ struct device { | |||
408 | 556 | ||
409 | struct kobject kobj; | 557 | struct kobject kobj; |
410 | const char *init_name; /* initial name of the device */ | 558 | const char *init_name; /* initial name of the device */ |
411 | struct device_type *type; | 559 | const struct device_type *type; |
412 | 560 | ||
413 | struct mutex mutex; /* mutex to synchronize calls to | 561 | struct mutex mutex; /* mutex to synchronize calls to |
414 | * its driver. | 562 | * its driver. |
@@ -442,7 +590,6 @@ struct device { | |||
442 | struct dev_archdata archdata; | 590 | struct dev_archdata archdata; |
443 | 591 | ||
444 | struct device_node *of_node; /* associated device tree node */ | 592 | struct device_node *of_node; /* associated device tree node */ |
445 | const struct of_device_id *of_match; /* matching of_device_id from driver */ | ||
446 | 593 | ||
447 | dev_t devt; /* dev_t, creates the sysfs "dev" */ | 594 | dev_t devt; /* dev_t, creates the sysfs "dev" */ |
448 | 595 | ||
@@ -557,7 +704,7 @@ extern int device_move(struct device *dev, struct device *new_parent, | |||
557 | extern const char *device_get_devnode(struct device *dev, | 704 | extern const char *device_get_devnode(struct device *dev, |
558 | mode_t *mode, const char **tmp); | 705 | mode_t *mode, const char **tmp); |
559 | extern void *dev_get_drvdata(const struct device *dev); | 706 | extern void *dev_get_drvdata(const struct device *dev); |
560 | extern void dev_set_drvdata(struct device *dev, void *data); | 707 | extern int dev_set_drvdata(struct device *dev, void *data); |
561 | 708 | ||
562 | /* | 709 | /* |
563 | * Root device objects for grouping under /sys/devices | 710 | * Root device objects for grouping under /sys/devices |
@@ -611,7 +758,7 @@ extern int (*platform_notify)(struct device *dev); | |||
611 | extern int (*platform_notify_remove)(struct device *dev); | 758 | extern int (*platform_notify_remove)(struct device *dev); |
612 | 759 | ||
613 | 760 | ||
614 | /** | 761 | /* |
615 | * get_device - atomically increment the reference count for the device. | 762 | * get_device - atomically increment the reference count for the device. |
616 | * | 763 | * |
617 | */ | 764 | */ |
@@ -633,13 +780,6 @@ static inline int devtmpfs_mount(const char *mountpoint) { return 0; } | |||
633 | /* drivers/base/power/shutdown.c */ | 780 | /* drivers/base/power/shutdown.c */ |
634 | extern void device_shutdown(void); | 781 | extern void device_shutdown(void); |
635 | 782 | ||
636 | #ifndef CONFIG_ARCH_NO_SYSDEV_OPS | ||
637 | /* drivers/base/sys.c */ | ||
638 | extern void sysdev_shutdown(void); | ||
639 | #else | ||
640 | static inline void sysdev_shutdown(void) { } | ||
641 | #endif | ||
642 | |||
643 | /* debugging and troubleshooting/diagnostic helpers. */ | 783 | /* debugging and troubleshooting/diagnostic helpers. */ |
644 | extern const char *dev_driver_string(const struct device *dev); | 784 | extern const char *dev_driver_string(const struct device *dev); |
645 | 785 | ||
@@ -742,13 +882,17 @@ do { \ | |||
742 | #endif | 882 | #endif |
743 | 883 | ||
744 | /* | 884 | /* |
745 | * dev_WARN() acts like dev_printk(), but with the key difference | 885 | * dev_WARN*() acts like dev_printk(), but with the key difference |
746 | * of using a WARN/WARN_ON to get the message out, including the | 886 | * of using a WARN/WARN_ON to get the message out, including the |
747 | * file/line information and a backtrace. | 887 | * file/line information and a backtrace. |
748 | */ | 888 | */ |
749 | #define dev_WARN(dev, format, arg...) \ | 889 | #define dev_WARN(dev, format, arg...) \ |
750 | WARN(1, "Device: %s\n" format, dev_driver_string(dev), ## arg); | 890 | WARN(1, "Device: %s\n" format, dev_driver_string(dev), ## arg); |
751 | 891 | ||
892 | #define dev_WARN_ONCE(dev, condition, format, arg...) \ | ||
893 | WARN_ONCE(condition, "Device %s\n" format, \ | ||
894 | dev_driver_string(dev), ## arg) | ||
895 | |||
752 | /* Create alias, so I can be autoloaded. */ | 896 | /* Create alias, so I can be autoloaded. */ |
753 | #define MODULE_ALIAS_CHARDEV(major,minor) \ | 897 | #define MODULE_ALIAS_CHARDEV(major,minor) \ |
754 | MODULE_ALIAS("char-major-" __stringify(major) "-" __stringify(minor)) | 898 | MODULE_ALIAS("char-major-" __stringify(major) "-" __stringify(minor)) |
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h index 493a2bf85f62..36a3ed63f571 100644 --- a/include/linux/dvb/frontend.h +++ b/include/linux/dvb/frontend.h | |||
@@ -175,14 +175,20 @@ typedef enum fe_transmit_mode { | |||
175 | TRANSMISSION_MODE_2K, | 175 | TRANSMISSION_MODE_2K, |
176 | TRANSMISSION_MODE_8K, | 176 | TRANSMISSION_MODE_8K, |
177 | TRANSMISSION_MODE_AUTO, | 177 | TRANSMISSION_MODE_AUTO, |
178 | TRANSMISSION_MODE_4K | 178 | TRANSMISSION_MODE_4K, |
179 | TRANSMISSION_MODE_1K, | ||
180 | TRANSMISSION_MODE_16K, | ||
181 | TRANSMISSION_MODE_32K, | ||
179 | } fe_transmit_mode_t; | 182 | } fe_transmit_mode_t; |
180 | 183 | ||
181 | typedef enum fe_bandwidth { | 184 | typedef enum fe_bandwidth { |
182 | BANDWIDTH_8_MHZ, | 185 | BANDWIDTH_8_MHZ, |
183 | BANDWIDTH_7_MHZ, | 186 | BANDWIDTH_7_MHZ, |
184 | BANDWIDTH_6_MHZ, | 187 | BANDWIDTH_6_MHZ, |
185 | BANDWIDTH_AUTO | 188 | BANDWIDTH_AUTO, |
189 | BANDWIDTH_5_MHZ, | ||
190 | BANDWIDTH_10_MHZ, | ||
191 | BANDWIDTH_1_712_MHZ, | ||
186 | } fe_bandwidth_t; | 192 | } fe_bandwidth_t; |
187 | 193 | ||
188 | 194 | ||
@@ -191,7 +197,10 @@ typedef enum fe_guard_interval { | |||
191 | GUARD_INTERVAL_1_16, | 197 | GUARD_INTERVAL_1_16, |
192 | GUARD_INTERVAL_1_8, | 198 | GUARD_INTERVAL_1_8, |
193 | GUARD_INTERVAL_1_4, | 199 | GUARD_INTERVAL_1_4, |
194 | GUARD_INTERVAL_AUTO | 200 | GUARD_INTERVAL_AUTO, |
201 | GUARD_INTERVAL_1_128, | ||
202 | GUARD_INTERVAL_19_128, | ||
203 | GUARD_INTERVAL_19_256, | ||
195 | } fe_guard_interval_t; | 204 | } fe_guard_interval_t; |
196 | 205 | ||
197 | 206 | ||
@@ -305,7 +314,9 @@ struct dvb_frontend_event { | |||
305 | 314 | ||
306 | #define DTV_ISDBS_TS_ID 42 | 315 | #define DTV_ISDBS_TS_ID 42 |
307 | 316 | ||
308 | #define DTV_MAX_COMMAND DTV_ISDBS_TS_ID | 317 | #define DTV_DVBT2_PLP_ID 43 |
318 | |||
319 | #define DTV_MAX_COMMAND DTV_DVBT2_PLP_ID | ||
309 | 320 | ||
310 | typedef enum fe_pilot { | 321 | typedef enum fe_pilot { |
311 | PILOT_ON, | 322 | PILOT_ON, |
@@ -337,6 +348,7 @@ typedef enum fe_delivery_system { | |||
337 | SYS_DMBTH, | 348 | SYS_DMBTH, |
338 | SYS_CMMB, | 349 | SYS_CMMB, |
339 | SYS_DAB, | 350 | SYS_DAB, |
351 | SYS_DVBT2, | ||
340 | } fe_delivery_system_t; | 352 | } fe_delivery_system_t; |
341 | 353 | ||
342 | struct dtv_cmds_h { | 354 | struct dtv_cmds_h { |
diff --git a/include/linux/dvb/version.h b/include/linux/dvb/version.h index 5a7546c12688..1421cc84afaa 100644 --- a/include/linux/dvb/version.h +++ b/include/linux/dvb/version.h | |||
@@ -24,6 +24,6 @@ | |||
24 | #define _DVBVERSION_H_ | 24 | #define _DVBVERSION_H_ |
25 | 25 | ||
26 | #define DVB_API_VERSION 5 | 26 | #define DVB_API_VERSION 5 |
27 | #define DVB_API_VERSION_MINOR 2 | 27 | #define DVB_API_VERSION_MINOR 3 |
28 | 28 | ||
29 | #endif /*_DVBVERSION_H_*/ | 29 | #endif /*_DVBVERSION_H_*/ |
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 0c9653f11c18..e747ecd48e1c 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _DYNAMIC_DEBUG_H | 1 | #ifndef _DYNAMIC_DEBUG_H |
2 | #define _DYNAMIC_DEBUG_H | 2 | #define _DYNAMIC_DEBUG_H |
3 | 3 | ||
4 | #include <linux/jump_label.h> | ||
5 | |||
6 | /* dynamic_printk_enabled, and dynamic_printk_enabled2 are bitmasks in which | 4 | /* dynamic_printk_enabled, and dynamic_printk_enabled2 are bitmasks in which |
7 | * bit n is set to 1 if any modname hashes into the bucket n, 0 otherwise. They | 5 | * bit n is set to 1 if any modname hashes into the bucket n, 0 otherwise. They |
8 | * use independent hash functions, to reduce the chance of false positives. | 6 | * use independent hash functions, to reduce the chance of false positives. |
diff --git a/include/linux/elf.h b/include/linux/elf.h index 4d608014753a..110821cb6ea5 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h | |||
@@ -395,6 +395,7 @@ typedef struct elf64_shdr { | |||
395 | #define NT_S390_CTRS 0x304 /* s390 control registers */ | 395 | #define NT_S390_CTRS 0x304 /* s390 control registers */ |
396 | #define NT_S390_PREFIX 0x305 /* s390 prefix register */ | 396 | #define NT_S390_PREFIX 0x305 /* s390 prefix register */ |
397 | #define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */ | 397 | #define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */ |
398 | #define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */ | ||
398 | 399 | ||
399 | 400 | ||
400 | /* Note header in a PT_NOTE section */ | 401 | /* Note header in a PT_NOTE section */ |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index dc80d8294247..c6a850ab2ec5 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -24,7 +24,10 @@ struct ethtool_cmd { | |||
24 | __u32 cmd; | 24 | __u32 cmd; |
25 | __u32 supported; /* Features this interface supports */ | 25 | __u32 supported; /* Features this interface supports */ |
26 | __u32 advertising; /* Features this interface advertises */ | 26 | __u32 advertising; /* Features this interface advertises */ |
27 | __u16 speed; /* The forced speed, 10Mb, 100Mb, gigabit */ | 27 | __u16 speed; /* The forced speed (lower bits) in |
28 | * Mbps. Please use | ||
29 | * ethtool_cmd_speed()/_set() to | ||
30 | * access it */ | ||
28 | __u8 duplex; /* Duplex, half or full */ | 31 | __u8 duplex; /* Duplex, half or full */ |
29 | __u8 port; /* Which connector port */ | 32 | __u8 port; /* Which connector port */ |
30 | __u8 phy_address; | 33 | __u8 phy_address; |
@@ -33,7 +36,10 @@ struct ethtool_cmd { | |||
33 | __u8 mdio_support; | 36 | __u8 mdio_support; |
34 | __u32 maxtxpkt; /* Tx pkts before generating tx int */ | 37 | __u32 maxtxpkt; /* Tx pkts before generating tx int */ |
35 | __u32 maxrxpkt; /* Rx pkts before generating rx int */ | 38 | __u32 maxrxpkt; /* Rx pkts before generating rx int */ |
36 | __u16 speed_hi; | 39 | __u16 speed_hi; /* The forced speed (upper |
40 | * bits) in Mbps. Please use | ||
41 | * ethtool_cmd_speed()/_set() to | ||
42 | * access it */ | ||
37 | __u8 eth_tp_mdix; | 43 | __u8 eth_tp_mdix; |
38 | __u8 reserved2; | 44 | __u8 reserved2; |
39 | __u32 lp_advertising; /* Features the link partner advertises */ | 45 | __u32 lp_advertising; /* Features the link partner advertises */ |
@@ -41,14 +47,14 @@ struct ethtool_cmd { | |||
41 | }; | 47 | }; |
42 | 48 | ||
43 | static inline void ethtool_cmd_speed_set(struct ethtool_cmd *ep, | 49 | static inline void ethtool_cmd_speed_set(struct ethtool_cmd *ep, |
44 | __u32 speed) | 50 | __u32 speed) |
45 | { | 51 | { |
46 | 52 | ||
47 | ep->speed = (__u16)speed; | 53 | ep->speed = (__u16)speed; |
48 | ep->speed_hi = (__u16)(speed >> 16); | 54 | ep->speed_hi = (__u16)(speed >> 16); |
49 | } | 55 | } |
50 | 56 | ||
51 | static inline __u32 ethtool_cmd_speed(struct ethtool_cmd *ep) | 57 | static inline __u32 ethtool_cmd_speed(const struct ethtool_cmd *ep) |
52 | { | 58 | { |
53 | return (ep->speed_hi << 16) | ep->speed; | 59 | return (ep->speed_hi << 16) | ep->speed; |
54 | } | 60 | } |
@@ -229,6 +235,34 @@ struct ethtool_ringparam { | |||
229 | __u32 tx_pending; | 235 | __u32 tx_pending; |
230 | }; | 236 | }; |
231 | 237 | ||
238 | /** | ||
239 | * struct ethtool_channels - configuring number of network channel | ||
240 | * @cmd: ETHTOOL_{G,S}CHANNELS | ||
241 | * @max_rx: Read only. Maximum number of receive channel the driver support. | ||
242 | * @max_tx: Read only. Maximum number of transmit channel the driver support. | ||
243 | * @max_other: Read only. Maximum number of other channel the driver support. | ||
244 | * @max_combined: Read only. Maximum number of combined channel the driver | ||
245 | * support. Set of queues RX, TX or other. | ||
246 | * @rx_count: Valid values are in the range 1 to the max_rx. | ||
247 | * @tx_count: Valid values are in the range 1 to the max_tx. | ||
248 | * @other_count: Valid values are in the range 1 to the max_other. | ||
249 | * @combined_count: Valid values are in the range 1 to the max_combined. | ||
250 | * | ||
251 | * This can be used to configure RX, TX and other channels. | ||
252 | */ | ||
253 | |||
254 | struct ethtool_channels { | ||
255 | __u32 cmd; | ||
256 | __u32 max_rx; | ||
257 | __u32 max_tx; | ||
258 | __u32 max_other; | ||
259 | __u32 max_combined; | ||
260 | __u32 rx_count; | ||
261 | __u32 tx_count; | ||
262 | __u32 other_count; | ||
263 | __u32 combined_count; | ||
264 | }; | ||
265 | |||
232 | /* for configuring link flow control parameters */ | 266 | /* for configuring link flow control parameters */ |
233 | struct ethtool_pauseparam { | 267 | struct ethtool_pauseparam { |
234 | __u32 cmd; /* ETHTOOL_{G,S}PAUSEPARAM */ | 268 | __u32 cmd; /* ETHTOOL_{G,S}PAUSEPARAM */ |
@@ -380,27 +414,42 @@ struct ethtool_usrip4_spec { | |||
380 | __u8 proto; | 414 | __u8 proto; |
381 | }; | 415 | }; |
382 | 416 | ||
417 | union ethtool_flow_union { | ||
418 | struct ethtool_tcpip4_spec tcp_ip4_spec; | ||
419 | struct ethtool_tcpip4_spec udp_ip4_spec; | ||
420 | struct ethtool_tcpip4_spec sctp_ip4_spec; | ||
421 | struct ethtool_ah_espip4_spec ah_ip4_spec; | ||
422 | struct ethtool_ah_espip4_spec esp_ip4_spec; | ||
423 | struct ethtool_usrip4_spec usr_ip4_spec; | ||
424 | struct ethhdr ether_spec; | ||
425 | __u8 hdata[60]; | ||
426 | }; | ||
427 | |||
428 | struct ethtool_flow_ext { | ||
429 | __be16 vlan_etype; | ||
430 | __be16 vlan_tci; | ||
431 | __be32 data[2]; | ||
432 | }; | ||
433 | |||
383 | /** | 434 | /** |
384 | * struct ethtool_rx_flow_spec - specification for RX flow filter | 435 | * struct ethtool_rx_flow_spec - specification for RX flow filter |
385 | * @flow_type: Type of match to perform, e.g. %TCP_V4_FLOW | 436 | * @flow_type: Type of match to perform, e.g. %TCP_V4_FLOW |
386 | * @h_u: Flow fields to match (dependent on @flow_type) | 437 | * @h_u: Flow fields to match (dependent on @flow_type) |
387 | * @m_u: Masks for flow field bits to be ignored | 438 | * @h_ext: Additional fields to match |
439 | * @m_u: Masks for flow field bits to be matched | ||
440 | * @m_ext: Masks for additional field bits to be matched | ||
441 | * Note, all additional fields must be ignored unless @flow_type | ||
442 | * includes the %FLOW_EXT flag. | ||
388 | * @ring_cookie: RX ring/queue index to deliver to, or %RX_CLS_FLOW_DISC | 443 | * @ring_cookie: RX ring/queue index to deliver to, or %RX_CLS_FLOW_DISC |
389 | * if packets should be discarded | 444 | * if packets should be discarded |
390 | * @location: Index of filter in hardware table | 445 | * @location: Index of filter in hardware table |
391 | */ | 446 | */ |
392 | struct ethtool_rx_flow_spec { | 447 | struct ethtool_rx_flow_spec { |
393 | __u32 flow_type; | 448 | __u32 flow_type; |
394 | union { | 449 | union ethtool_flow_union h_u; |
395 | struct ethtool_tcpip4_spec tcp_ip4_spec; | 450 | struct ethtool_flow_ext h_ext; |
396 | struct ethtool_tcpip4_spec udp_ip4_spec; | 451 | union ethtool_flow_union m_u; |
397 | struct ethtool_tcpip4_spec sctp_ip4_spec; | 452 | struct ethtool_flow_ext m_ext; |
398 | struct ethtool_ah_espip4_spec ah_ip4_spec; | ||
399 | struct ethtool_ah_espip4_spec esp_ip4_spec; | ||
400 | struct ethtool_usrip4_spec usr_ip4_spec; | ||
401 | struct ethhdr ether_spec; | ||
402 | __u8 hdata[72]; | ||
403 | } h_u, m_u; | ||
404 | __u64 ring_cookie; | 453 | __u64 ring_cookie; |
405 | __u32 location; | 454 | __u32 location; |
406 | }; | 455 | }; |
@@ -458,16 +507,10 @@ struct ethtool_rxnfc { | |||
458 | 507 | ||
459 | struct compat_ethtool_rx_flow_spec { | 508 | struct compat_ethtool_rx_flow_spec { |
460 | u32 flow_type; | 509 | u32 flow_type; |
461 | union { | 510 | union ethtool_flow_union h_u; |
462 | struct ethtool_tcpip4_spec tcp_ip4_spec; | 511 | struct ethtool_flow_ext h_ext; |
463 | struct ethtool_tcpip4_spec udp_ip4_spec; | 512 | union ethtool_flow_union m_u; |
464 | struct ethtool_tcpip4_spec sctp_ip4_spec; | 513 | struct ethtool_flow_ext m_ext; |
465 | struct ethtool_ah_espip4_spec ah_ip4_spec; | ||
466 | struct ethtool_ah_espip4_spec esp_ip4_spec; | ||
467 | struct ethtool_usrip4_spec usr_ip4_spec; | ||
468 | struct ethhdr ether_spec; | ||
469 | u8 hdata[72]; | ||
470 | } h_u, m_u; | ||
471 | compat_u64 ring_cookie; | 514 | compat_u64 ring_cookie; |
472 | u32 location; | 515 | u32 location; |
473 | }; | 516 | }; |
@@ -558,6 +601,26 @@ struct ethtool_flash { | |||
558 | char data[ETHTOOL_FLASH_MAX_FILENAME]; | 601 | char data[ETHTOOL_FLASH_MAX_FILENAME]; |
559 | }; | 602 | }; |
560 | 603 | ||
604 | /** | ||
605 | * struct ethtool_dump - used for retrieving, setting device dump | ||
606 | * @cmd: Command number - %ETHTOOL_GET_DUMP_FLAG, %ETHTOOL_GET_DUMP_DATA, or | ||
607 | * %ETHTOOL_SET_DUMP | ||
608 | * @version: FW version of the dump, filled in by driver | ||
609 | * @flag: driver dependent flag for dump setting, filled in by driver during | ||
610 | * get and filled in by ethtool for set operation | ||
611 | * @len: length of dump data, used as the length of the user buffer on entry to | ||
612 | * %ETHTOOL_GET_DUMP_DATA and this is returned as dump length by driver | ||
613 | * for %ETHTOOL_GET_DUMP_FLAG command | ||
614 | * @data: data collected for get dump data operation | ||
615 | */ | ||
616 | struct ethtool_dump { | ||
617 | __u32 cmd; | ||
618 | __u32 version; | ||
619 | __u32 flag; | ||
620 | __u32 len; | ||
621 | __u8 data[0]; | ||
622 | }; | ||
623 | |||
561 | /* for returning and changing feature sets */ | 624 | /* for returning and changing feature sets */ |
562 | 625 | ||
563 | /** | 626 | /** |
@@ -663,6 +726,22 @@ struct ethtool_rx_ntuple_list { | |||
663 | unsigned int count; | 726 | unsigned int count; |
664 | }; | 727 | }; |
665 | 728 | ||
729 | /** | ||
730 | * enum ethtool_phys_id_state - indicator state for physical identification | ||
731 | * @ETHTOOL_ID_INACTIVE: Physical ID indicator should be deactivated | ||
732 | * @ETHTOOL_ID_ACTIVE: Physical ID indicator should be activated | ||
733 | * @ETHTOOL_ID_ON: LED should be turned on (used iff %ETHTOOL_ID_ACTIVE | ||
734 | * is not supported) | ||
735 | * @ETHTOOL_ID_OFF: LED should be turned off (used iff %ETHTOOL_ID_ACTIVE | ||
736 | * is not supported) | ||
737 | */ | ||
738 | enum ethtool_phys_id_state { | ||
739 | ETHTOOL_ID_INACTIVE, | ||
740 | ETHTOOL_ID_ACTIVE, | ||
741 | ETHTOOL_ID_ON, | ||
742 | ETHTOOL_ID_OFF | ||
743 | }; | ||
744 | |||
666 | struct net_device; | 745 | struct net_device; |
667 | 746 | ||
668 | /* Some generic methods drivers may use in their ethtool_ops */ | 747 | /* Some generic methods drivers may use in their ethtool_ops */ |
@@ -683,63 +762,131 @@ void ethtool_ntuple_flush(struct net_device *dev); | |||
683 | bool ethtool_invalid_flags(struct net_device *dev, u32 data, u32 supported); | 762 | bool ethtool_invalid_flags(struct net_device *dev, u32 data, u32 supported); |
684 | 763 | ||
685 | /** | 764 | /** |
686 | * ðtool_ops - Alter and report network device settings | 765 | * struct ethtool_ops - optional netdev operations |
687 | * get_settings: Get device-specific settings | 766 | * @get_settings: Get various device settings including Ethernet link |
688 | * set_settings: Set device-specific settings | 767 | * settings. The @cmd parameter is expected to have been cleared |
689 | * get_drvinfo: Report driver information | 768 | * before get_settings is called. Returns a negative error code or |
690 | * get_regs: Get device registers | 769 | * zero. |
691 | * get_wol: Report whether Wake-on-Lan is enabled | 770 | * @set_settings: Set various device settings including Ethernet link |
692 | * set_wol: Turn Wake-on-Lan on or off | 771 | * settings. Returns a negative error code or zero. |
693 | * get_msglevel: Report driver message level | 772 | * @get_drvinfo: Report driver/device information. Should only set the |
694 | * set_msglevel: Set driver message level | 773 | * @driver, @version, @fw_version and @bus_info fields. If not |
695 | * nway_reset: Restart autonegotiation | 774 | * implemented, the @driver and @bus_info fields will be filled in |
696 | * get_link: Get link status | 775 | * according to the netdev's parent device. |
697 | * get_eeprom: Read data from the device EEPROM | 776 | * @get_regs_len: Get buffer length required for @get_regs |
698 | * set_eeprom: Write data to the device EEPROM | 777 | * @get_regs: Get device registers |
699 | * get_coalesce: Get interrupt coalescing parameters | 778 | * @get_wol: Report whether Wake-on-Lan is enabled |
700 | * set_coalesce: Set interrupt coalescing parameters | 779 | * @set_wol: Turn Wake-on-Lan on or off. Returns a negative error code |
701 | * get_ringparam: Report ring sizes | 780 | * or zero. |
702 | * set_ringparam: Set ring sizes | 781 | * @get_msglevel: Report driver message level. This should be the value |
703 | * get_pauseparam: Report pause parameters | 782 | * of the @msg_enable field used by netif logging functions. |
704 | * set_pauseparam: Set pause parameters | 783 | * @set_msglevel: Set driver message level |
705 | * get_rx_csum: Report whether receive checksums are turned on or off | 784 | * @nway_reset: Restart autonegotiation. Returns a negative error code |
706 | * set_rx_csum: Turn receive checksum on or off | 785 | * or zero. |
707 | * get_tx_csum: Report whether transmit checksums are turned on or off | 786 | * @get_link: Report whether physical link is up. Will only be called if |
708 | * set_tx_csum: Turn transmit checksums on or off | 787 | * the netdev is up. Should usually be set to ethtool_op_get_link(), |
709 | * get_sg: Report whether scatter-gather is enabled | 788 | * which uses netif_carrier_ok(). |
710 | * set_sg: Turn scatter-gather on or off | 789 | * @get_eeprom: Read data from the device EEPROM. |
711 | * get_tso: Report whether TCP segmentation offload is enabled | ||
712 | * set_tso: Turn TCP segmentation offload on or off | ||
713 | * get_ufo: Report whether UDP fragmentation offload is enabled | ||
714 | * set_ufo: Turn UDP fragmentation offload on or off | ||
715 | * self_test: Run specified self-tests | ||
716 | * get_strings: Return a set of strings that describe the requested objects | ||
717 | * phys_id: Identify the device | ||
718 | * get_stats: Return statistics about the device | ||
719 | * get_flags: get 32-bit flags bitmap | ||
720 | * set_flags: set 32-bit flags bitmap | ||
721 | * | ||
722 | * Description: | ||
723 | * | ||
724 | * get_settings: | ||
725 | * @get_settings is passed an ðtool_cmd to fill in. It returns | ||
726 | * an negative errno or zero. | ||
727 | * | ||
728 | * set_settings: | ||
729 | * @set_settings is passed an ðtool_cmd and should attempt to set | ||
730 | * all the settings this device supports. It may return an error value | ||
731 | * if something goes wrong (otherwise 0). | ||
732 | * | ||
733 | * get_eeprom: | ||
734 | * Should fill in the magic field. Don't need to check len for zero | 790 | * Should fill in the magic field. Don't need to check len for zero |
735 | * or wraparound. Fill in the data argument with the eeprom values | 791 | * or wraparound. Fill in the data argument with the eeprom values |
736 | * from offset to offset + len. Update len to the amount read. | 792 | * from offset to offset + len. Update len to the amount read. |
737 | * Returns an error or zero. | 793 | * Returns an error or zero. |
738 | * | 794 | * @set_eeprom: Write data to the device EEPROM. |
739 | * set_eeprom: | ||
740 | * Should validate the magic field. Don't need to check len for zero | 795 | * Should validate the magic field. Don't need to check len for zero |
741 | * or wraparound. Update len to the amount written. Returns an error | 796 | * or wraparound. Update len to the amount written. Returns an error |
742 | * or zero. | 797 | * or zero. |
798 | * @get_coalesce: Get interrupt coalescing parameters. Returns a negative | ||
799 | * error code or zero. | ||
800 | * @set_coalesce: Set interrupt coalescing parameters. Returns a negative | ||
801 | * error code or zero. | ||
802 | * @get_ringparam: Report ring sizes | ||
803 | * @set_ringparam: Set ring sizes. Returns a negative error code or zero. | ||
804 | * @get_pauseparam: Report pause parameters | ||
805 | * @set_pauseparam: Set pause parameters. Returns a negative error code | ||
806 | * or zero. | ||
807 | * @get_rx_csum: Deprecated in favour of the netdev feature %NETIF_F_RXCSUM. | ||
808 | * Report whether receive checksums are turned on or off. | ||
809 | * @set_rx_csum: Deprecated in favour of generic netdev features. Turn | ||
810 | * receive checksum on or off. Returns a negative error code or zero. | ||
811 | * @get_tx_csum: Deprecated as redundant. Report whether transmit checksums | ||
812 | * are turned on or off. | ||
813 | * @set_tx_csum: Deprecated in favour of generic netdev features. Turn | ||
814 | * transmit checksums on or off. Returns a egative error code or zero. | ||
815 | * @get_sg: Deprecated as redundant. Report whether scatter-gather is | ||
816 | * enabled. | ||
817 | * @set_sg: Deprecated in favour of generic netdev features. Turn | ||
818 | * scatter-gather on or off. Returns a negative error code or zero. | ||
819 | * @get_tso: Deprecated as redundant. Report whether TCP segmentation | ||
820 | * offload is enabled. | ||
821 | * @set_tso: Deprecated in favour of generic netdev features. Turn TCP | ||
822 | * segmentation offload on or off. Returns a negative error code or zero. | ||
823 | * @self_test: Run specified self-tests | ||
824 | * @get_strings: Return a set of strings that describe the requested objects | ||
825 | * @set_phys_id: Identify the physical devices, e.g. by flashing an LED | ||
826 | * attached to it. The implementation may update the indicator | ||
827 | * asynchronously or synchronously, but in either case it must return | ||
828 | * quickly. It is initially called with the argument %ETHTOOL_ID_ACTIVE, | ||
829 | * and must either activate asynchronous updates and return zero, return | ||
830 | * a negative error or return a positive frequency for synchronous | ||
831 | * indication (e.g. 1 for one on/off cycle per second). If it returns | ||
832 | * a frequency then it will be called again at intervals with the | ||
833 | * argument %ETHTOOL_ID_ON or %ETHTOOL_ID_OFF and should set the state of | ||
834 | * the indicator accordingly. Finally, it is called with the argument | ||
835 | * %ETHTOOL_ID_INACTIVE and must deactivate the indicator. Returns a | ||
836 | * negative error code or zero. | ||
837 | * @get_ethtool_stats: Return extended statistics about the device. | ||
838 | * This is only useful if the device maintains statistics not | ||
839 | * included in &struct rtnl_link_stats64. | ||
840 | * @begin: Function to be called before any other operation. Returns a | ||
841 | * negative error code or zero. | ||
842 | * @complete: Function to be called after any other operation except | ||
843 | * @begin. Will be called even if the other operation failed. | ||
844 | * @get_ufo: Deprecated as redundant. Report whether UDP fragmentation | ||
845 | * offload is enabled. | ||
846 | * @set_ufo: Deprecated in favour of generic netdev features. Turn UDP | ||
847 | * fragmentation offload on or off. Returns a negative error code or zero. | ||
848 | * @get_flags: Deprecated as redundant. Report features included in | ||
849 | * &enum ethtool_flags that are enabled. | ||
850 | * @set_flags: Deprecated in favour of generic netdev features. Turn | ||
851 | * features included in &enum ethtool_flags on or off. Returns a | ||
852 | * negative error code or zero. | ||
853 | * @get_priv_flags: Report driver-specific feature flags. | ||
854 | * @set_priv_flags: Set driver-specific feature flags. Returns a negative | ||
855 | * error code or zero. | ||
856 | * @get_sset_count: Get number of strings that @get_strings will write. | ||
857 | * @get_rxnfc: Get RX flow classification rules. Returns a negative | ||
858 | * error code or zero. | ||
859 | * @set_rxnfc: Set RX flow classification rules. Returns a negative | ||
860 | * error code or zero. | ||
861 | * @flash_device: Write a firmware image to device's flash memory. | ||
862 | * Returns a negative error code or zero. | ||
863 | * @reset: Reset (part of) the device, as specified by a bitmask of | ||
864 | * flags from &enum ethtool_reset_flags. Returns a negative | ||
865 | * error code or zero. | ||
866 | * @set_rx_ntuple: Set an RX n-tuple rule. Returns a negative error code | ||
867 | * or zero. | ||
868 | * @get_rx_ntuple: Deprecated. | ||
869 | * @get_rxfh_indir: Get the contents of the RX flow hash indirection table. | ||
870 | * Returns a negative error code or zero. | ||
871 | * @set_rxfh_indir: Set the contents of the RX flow hash indirection table. | ||
872 | * Returns a negative error code or zero. | ||
873 | * @get_channels: Get number of channels. | ||
874 | * @set_channels: Set number of channels. Returns a negative error code or | ||
875 | * zero. | ||
876 | * @get_dump_flag: Get dump flag indicating current dump length, version, | ||
877 | * and flag of the device. | ||
878 | * @get_dump_data: Get dump data. | ||
879 | * @set_dump: Set dump specific flags to the device. | ||
880 | * | ||
881 | * All operations are optional (i.e. the function pointer may be set | ||
882 | * to %NULL) and callers must take this into account. Callers must | ||
883 | * hold the RTNL, except that for @get_drvinfo the caller may or may | ||
884 | * not hold the RTNL. | ||
885 | * | ||
886 | * See the structures used by these operations for further documentation. | ||
887 | * | ||
888 | * See &struct net_device and &struct net_device_ops for documentation | ||
889 | * of the generic netdev features interface. | ||
743 | */ | 890 | */ |
744 | struct ethtool_ops { | 891 | struct ethtool_ops { |
745 | int (*get_settings)(struct net_device *, struct ethtool_cmd *); | 892 | int (*get_settings)(struct net_device *, struct ethtool_cmd *); |
@@ -778,7 +925,7 @@ struct ethtool_ops { | |||
778 | int (*set_tso)(struct net_device *, u32); | 925 | int (*set_tso)(struct net_device *, u32); |
779 | void (*self_test)(struct net_device *, struct ethtool_test *, u64 *); | 926 | void (*self_test)(struct net_device *, struct ethtool_test *, u64 *); |
780 | void (*get_strings)(struct net_device *, u32 stringset, u8 *); | 927 | void (*get_strings)(struct net_device *, u32 stringset, u8 *); |
781 | int (*phys_id)(struct net_device *, u32); | 928 | int (*set_phys_id)(struct net_device *, enum ethtool_phys_id_state); |
782 | void (*get_ethtool_stats)(struct net_device *, | 929 | void (*get_ethtool_stats)(struct net_device *, |
783 | struct ethtool_stats *, u64 *); | 930 | struct ethtool_stats *, u64 *); |
784 | int (*begin)(struct net_device *); | 931 | int (*begin)(struct net_device *); |
@@ -802,6 +949,13 @@ struct ethtool_ops { | |||
802 | struct ethtool_rxfh_indir *); | 949 | struct ethtool_rxfh_indir *); |
803 | int (*set_rxfh_indir)(struct net_device *, | 950 | int (*set_rxfh_indir)(struct net_device *, |
804 | const struct ethtool_rxfh_indir *); | 951 | const struct ethtool_rxfh_indir *); |
952 | void (*get_channels)(struct net_device *, struct ethtool_channels *); | ||
953 | int (*set_channels)(struct net_device *, struct ethtool_channels *); | ||
954 | int (*get_dump_flag)(struct net_device *, struct ethtool_dump *); | ||
955 | int (*get_dump_data)(struct net_device *, | ||
956 | struct ethtool_dump *, void *); | ||
957 | int (*set_dump)(struct net_device *, struct ethtool_dump *); | ||
958 | |||
805 | }; | 959 | }; |
806 | #endif /* __KERNEL__ */ | 960 | #endif /* __KERNEL__ */ |
807 | 961 | ||
@@ -870,6 +1024,11 @@ struct ethtool_ops { | |||
870 | 1024 | ||
871 | #define ETHTOOL_GFEATURES 0x0000003a /* Get device offload settings */ | 1025 | #define ETHTOOL_GFEATURES 0x0000003a /* Get device offload settings */ |
872 | #define ETHTOOL_SFEATURES 0x0000003b /* Change device offload settings */ | 1026 | #define ETHTOOL_SFEATURES 0x0000003b /* Change device offload settings */ |
1027 | #define ETHTOOL_GCHANNELS 0x0000003c /* Get no of channels */ | ||
1028 | #define ETHTOOL_SCHANNELS 0x0000003d /* Set no of channels */ | ||
1029 | #define ETHTOOL_SET_DUMP 0x0000003e /* Set dump settings */ | ||
1030 | #define ETHTOOL_GET_DUMP_FLAG 0x0000003f /* Get dump settings */ | ||
1031 | #define ETHTOOL_GET_DUMP_DATA 0x00000040 /* Get dump data */ | ||
873 | 1032 | ||
874 | /* compatibility with older code */ | 1033 | /* compatibility with older code */ |
875 | #define SPARC_ETH_GSET ETHTOOL_GSET | 1034 | #define SPARC_ETH_GSET ETHTOOL_GSET |
@@ -897,6 +1056,8 @@ struct ethtool_ops { | |||
897 | #define SUPPORTED_10000baseKX4_Full (1 << 18) | 1056 | #define SUPPORTED_10000baseKX4_Full (1 << 18) |
898 | #define SUPPORTED_10000baseKR_Full (1 << 19) | 1057 | #define SUPPORTED_10000baseKR_Full (1 << 19) |
899 | #define SUPPORTED_10000baseR_FEC (1 << 20) | 1058 | #define SUPPORTED_10000baseR_FEC (1 << 20) |
1059 | #define SUPPORTED_20000baseMLD2_Full (1 << 21) | ||
1060 | #define SUPPORTED_20000baseKR2_Full (1 << 22) | ||
900 | 1061 | ||
901 | /* Indicates what features are advertised by the interface. */ | 1062 | /* Indicates what features are advertised by the interface. */ |
902 | #define ADVERTISED_10baseT_Half (1 << 0) | 1063 | #define ADVERTISED_10baseT_Half (1 << 0) |
@@ -920,6 +1081,8 @@ struct ethtool_ops { | |||
920 | #define ADVERTISED_10000baseKX4_Full (1 << 18) | 1081 | #define ADVERTISED_10000baseKX4_Full (1 << 18) |
921 | #define ADVERTISED_10000baseKR_Full (1 << 19) | 1082 | #define ADVERTISED_10000baseKR_Full (1 << 19) |
922 | #define ADVERTISED_10000baseR_FEC (1 << 20) | 1083 | #define ADVERTISED_10000baseR_FEC (1 << 20) |
1084 | #define ADVERTISED_20000baseMLD2_Full (1 << 21) | ||
1085 | #define ADVERTISED_20000baseKR2_Full (1 << 22) | ||
923 | 1086 | ||
924 | /* The following are all involved in forcing a particular link | 1087 | /* The following are all involved in forcing a particular link |
925 | * mode for the device for setting things. When getting the | 1088 | * mode for the device for setting things. When getting the |
@@ -992,6 +1155,8 @@ struct ethtool_ops { | |||
992 | #define IPV4_FLOW 0x10 /* hash only */ | 1155 | #define IPV4_FLOW 0x10 /* hash only */ |
993 | #define IPV6_FLOW 0x11 /* hash only */ | 1156 | #define IPV6_FLOW 0x11 /* hash only */ |
994 | #define ETHER_FLOW 0x12 /* spec only (ether_spec) */ | 1157 | #define ETHER_FLOW 0x12 /* spec only (ether_spec) */ |
1158 | /* Flag to enable additional fields in struct ethtool_rx_flow_spec */ | ||
1159 | #define FLOW_EXT 0x80000000 | ||
995 | 1160 | ||
996 | /* L3-L4 network traffic flow hash options */ | 1161 | /* L3-L4 network traffic flow hash options */ |
997 | #define RXH_L2DA (1 << 1) | 1162 | #define RXH_L2DA (1 << 1) |
diff --git a/include/linux/fb.h b/include/linux/fb.h index df728c1c29ed..6a8274877171 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -832,6 +832,7 @@ struct fb_tile_ops { | |||
832 | #define FBINFO_CAN_FORCE_OUTPUT 0x200000 | 832 | #define FBINFO_CAN_FORCE_OUTPUT 0x200000 |
833 | 833 | ||
834 | struct fb_info { | 834 | struct fb_info { |
835 | atomic_t count; | ||
835 | int node; | 836 | int node; |
836 | int flags; | 837 | int flags; |
837 | struct mutex lock; /* Lock for open/release/ioctl funcs */ | 838 | struct mutex lock; /* Lock for open/release/ioctl funcs */ |
diff --git a/include/linux/filter.h b/include/linux/filter.h index 45266b75409a..9ee3f9fb0b4a 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
@@ -131,10 +131,16 @@ struct sock_fprog { /* Required for SO_ATTACH_FILTER. */ | |||
131 | #define SKF_LL_OFF (-0x200000) | 131 | #define SKF_LL_OFF (-0x200000) |
132 | 132 | ||
133 | #ifdef __KERNEL__ | 133 | #ifdef __KERNEL__ |
134 | |||
135 | struct sk_buff; | ||
136 | struct sock; | ||
137 | |||
134 | struct sk_filter | 138 | struct sk_filter |
135 | { | 139 | { |
136 | atomic_t refcnt; | 140 | atomic_t refcnt; |
137 | unsigned int len; /* Number of filter blocks */ | 141 | unsigned int len; /* Number of filter blocks */ |
142 | unsigned int (*bpf_func)(const struct sk_buff *skb, | ||
143 | const struct sock_filter *filter); | ||
138 | struct rcu_head rcu; | 144 | struct rcu_head rcu; |
139 | struct sock_filter insns[0]; | 145 | struct sock_filter insns[0]; |
140 | }; | 146 | }; |
@@ -144,15 +150,86 @@ static inline unsigned int sk_filter_len(const struct sk_filter *fp) | |||
144 | return fp->len * sizeof(struct sock_filter) + sizeof(*fp); | 150 | return fp->len * sizeof(struct sock_filter) + sizeof(*fp); |
145 | } | 151 | } |
146 | 152 | ||
147 | struct sk_buff; | ||
148 | struct sock; | ||
149 | |||
150 | extern int sk_filter(struct sock *sk, struct sk_buff *skb); | 153 | extern int sk_filter(struct sock *sk, struct sk_buff *skb); |
151 | extern unsigned int sk_run_filter(const struct sk_buff *skb, | 154 | extern unsigned int sk_run_filter(const struct sk_buff *skb, |
152 | const struct sock_filter *filter); | 155 | const struct sock_filter *filter); |
153 | extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); | 156 | extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); |
154 | extern int sk_detach_filter(struct sock *sk); | 157 | extern int sk_detach_filter(struct sock *sk); |
155 | extern int sk_chk_filter(struct sock_filter *filter, int flen); | 158 | extern int sk_chk_filter(struct sock_filter *filter, int flen); |
159 | |||
160 | #ifdef CONFIG_BPF_JIT | ||
161 | extern void bpf_jit_compile(struct sk_filter *fp); | ||
162 | extern void bpf_jit_free(struct sk_filter *fp); | ||
163 | #define SK_RUN_FILTER(FILTER, SKB) (*FILTER->bpf_func)(SKB, FILTER->insns) | ||
164 | #else | ||
165 | static inline void bpf_jit_compile(struct sk_filter *fp) | ||
166 | { | ||
167 | } | ||
168 | static inline void bpf_jit_free(struct sk_filter *fp) | ||
169 | { | ||
170 | } | ||
171 | #define SK_RUN_FILTER(FILTER, SKB) sk_run_filter(SKB, FILTER->insns) | ||
172 | #endif | ||
173 | |||
174 | enum { | ||
175 | BPF_S_RET_K = 1, | ||
176 | BPF_S_RET_A, | ||
177 | BPF_S_ALU_ADD_K, | ||
178 | BPF_S_ALU_ADD_X, | ||
179 | BPF_S_ALU_SUB_K, | ||
180 | BPF_S_ALU_SUB_X, | ||
181 | BPF_S_ALU_MUL_K, | ||
182 | BPF_S_ALU_MUL_X, | ||
183 | BPF_S_ALU_DIV_X, | ||
184 | BPF_S_ALU_AND_K, | ||
185 | BPF_S_ALU_AND_X, | ||
186 | BPF_S_ALU_OR_K, | ||
187 | BPF_S_ALU_OR_X, | ||
188 | BPF_S_ALU_LSH_K, | ||
189 | BPF_S_ALU_LSH_X, | ||
190 | BPF_S_ALU_RSH_K, | ||
191 | BPF_S_ALU_RSH_X, | ||
192 | BPF_S_ALU_NEG, | ||
193 | BPF_S_LD_W_ABS, | ||
194 | BPF_S_LD_H_ABS, | ||
195 | BPF_S_LD_B_ABS, | ||
196 | BPF_S_LD_W_LEN, | ||
197 | BPF_S_LD_W_IND, | ||
198 | BPF_S_LD_H_IND, | ||
199 | BPF_S_LD_B_IND, | ||
200 | BPF_S_LD_IMM, | ||
201 | BPF_S_LDX_W_LEN, | ||
202 | BPF_S_LDX_B_MSH, | ||
203 | BPF_S_LDX_IMM, | ||
204 | BPF_S_MISC_TAX, | ||
205 | BPF_S_MISC_TXA, | ||
206 | BPF_S_ALU_DIV_K, | ||
207 | BPF_S_LD_MEM, | ||
208 | BPF_S_LDX_MEM, | ||
209 | BPF_S_ST, | ||
210 | BPF_S_STX, | ||
211 | BPF_S_JMP_JA, | ||
212 | BPF_S_JMP_JEQ_K, | ||
213 | BPF_S_JMP_JEQ_X, | ||
214 | BPF_S_JMP_JGE_K, | ||
215 | BPF_S_JMP_JGE_X, | ||
216 | BPF_S_JMP_JGT_K, | ||
217 | BPF_S_JMP_JGT_X, | ||
218 | BPF_S_JMP_JSET_K, | ||
219 | BPF_S_JMP_JSET_X, | ||
220 | /* Ancillary data */ | ||
221 | BPF_S_ANC_PROTOCOL, | ||
222 | BPF_S_ANC_PKTTYPE, | ||
223 | BPF_S_ANC_IFINDEX, | ||
224 | BPF_S_ANC_NLATTR, | ||
225 | BPF_S_ANC_NLATTR_NEST, | ||
226 | BPF_S_ANC_MARK, | ||
227 | BPF_S_ANC_QUEUE, | ||
228 | BPF_S_ANC_HATYPE, | ||
229 | BPF_S_ANC_RXHASH, | ||
230 | BPF_S_ANC_CPU, | ||
231 | }; | ||
232 | |||
156 | #endif /* __KERNEL__ */ | 233 | #endif /* __KERNEL__ */ |
157 | 234 | ||
158 | #endif /* __LINUX_FILTER_H__ */ | 235 | #endif /* __LINUX_FILTER_H__ */ |
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index c64f3680d4f1..5e6f42789afe 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
@@ -125,7 +125,6 @@ struct fw_card { | |||
125 | struct delayed_work bm_work; /* bus manager job */ | 125 | struct delayed_work bm_work; /* bus manager job */ |
126 | int bm_retries; | 126 | int bm_retries; |
127 | int bm_generation; | 127 | int bm_generation; |
128 | __be32 bm_transaction_data[2]; | ||
129 | int bm_node_id; | 128 | int bm_node_id; |
130 | bool bm_abdicate; | 129 | bool bm_abdicate; |
131 | 130 | ||
@@ -441,12 +440,15 @@ int fw_iso_context_queue(struct fw_iso_context *ctx, | |||
441 | struct fw_iso_packet *packet, | 440 | struct fw_iso_packet *packet, |
442 | struct fw_iso_buffer *buffer, | 441 | struct fw_iso_buffer *buffer, |
443 | unsigned long payload); | 442 | unsigned long payload); |
443 | void fw_iso_context_queue_flush(struct fw_iso_context *ctx); | ||
444 | int fw_iso_context_start(struct fw_iso_context *ctx, | 444 | int fw_iso_context_start(struct fw_iso_context *ctx, |
445 | int cycle, int sync, int tags); | 445 | int cycle, int sync, int tags); |
446 | int fw_iso_context_stop(struct fw_iso_context *ctx); | 446 | int fw_iso_context_stop(struct fw_iso_context *ctx); |
447 | void fw_iso_context_destroy(struct fw_iso_context *ctx); | 447 | void fw_iso_context_destroy(struct fw_iso_context *ctx); |
448 | void fw_iso_resource_manage(struct fw_card *card, int generation, | 448 | void fw_iso_resource_manage(struct fw_card *card, int generation, |
449 | u64 channels_mask, int *channel, int *bandwidth, | 449 | u64 channels_mask, int *channel, int *bandwidth, |
450 | bool allocate, __be32 buffer[2]); | 450 | bool allocate); |
451 | |||
452 | extern struct workqueue_struct *fw_workqueue; | ||
451 | 453 | ||
452 | #endif /* _LINUX_FIREWIRE_H */ | 454 | #endif /* _LINUX_FIREWIRE_H */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index dbd860af0804..cdf9495df204 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -358,7 +358,6 @@ struct inodes_stat_t { | |||
358 | #define FS_EXTENT_FL 0x00080000 /* Extents */ | 358 | #define FS_EXTENT_FL 0x00080000 /* Extents */ |
359 | #define FS_DIRECTIO_FL 0x00100000 /* Use direct i/o */ | 359 | #define FS_DIRECTIO_FL 0x00100000 /* Use direct i/o */ |
360 | #define FS_NOCOW_FL 0x00800000 /* Do not cow file */ | 360 | #define FS_NOCOW_FL 0x00800000 /* Do not cow file */ |
361 | #define FS_COW_FL 0x02000000 /* Cow file */ | ||
362 | #define FS_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ | 361 | #define FS_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ |
363 | 362 | ||
364 | #define FS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ | 363 | #define FS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ |
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index 4eb56ed75fbc..fffdf00f87b9 100644 --- a/include/linux/fsl_devices.h +++ b/include/linux/fsl_devices.h | |||
@@ -72,6 +72,7 @@ struct fsl_usb2_platform_data { | |||
72 | void (*exit)(struct platform_device *); | 72 | void (*exit)(struct platform_device *); |
73 | void __iomem *regs; /* ioremap'd register base */ | 73 | void __iomem *regs; /* ioremap'd register base */ |
74 | struct clk *clk; | 74 | struct clk *clk; |
75 | unsigned power_budget; /* hcd->power_budget */ | ||
75 | unsigned big_endian_mmio:1; | 76 | unsigned big_endian_mmio:1; |
76 | unsigned big_endian_desc:1; | 77 | unsigned big_endian_desc:1; |
77 | unsigned es:1; /* need USBMODE:ES */ | 78 | unsigned es:1; /* need USBMODE:ES */ |
@@ -79,6 +80,21 @@ struct fsl_usb2_platform_data { | |||
79 | unsigned have_sysif_regs:1; | 80 | unsigned have_sysif_regs:1; |
80 | unsigned invert_drvvbus:1; | 81 | unsigned invert_drvvbus:1; |
81 | unsigned invert_pwr_fault:1; | 82 | unsigned invert_pwr_fault:1; |
83 | |||
84 | unsigned suspended:1; | ||
85 | unsigned already_suspended:1; | ||
86 | |||
87 | /* register save area for suspend/resume */ | ||
88 | u32 pm_command; | ||
89 | u32 pm_status; | ||
90 | u32 pm_intr_enable; | ||
91 | u32 pm_frame_index; | ||
92 | u32 pm_segment; | ||
93 | u32 pm_frame_list; | ||
94 | u32 pm_async_next; | ||
95 | u32 pm_configured_flag; | ||
96 | u32 pm_portsc; | ||
97 | u32 pm_usbgenctrl; | ||
82 | }; | 98 | }; |
83 | 99 | ||
84 | /* Flags in fsl_usb2_mph_platform_data */ | 100 | /* Flags in fsl_usb2_mph_platform_data */ |
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index ca29e03c1fac..9d88e1cb5dbb 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -29,9 +29,22 @@ ftrace_enable_sysctl(struct ctl_table *table, int write, | |||
29 | 29 | ||
30 | typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip); | 30 | typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip); |
31 | 31 | ||
32 | struct ftrace_hash; | ||
33 | |||
34 | enum { | ||
35 | FTRACE_OPS_FL_ENABLED = 1 << 0, | ||
36 | FTRACE_OPS_FL_GLOBAL = 1 << 1, | ||
37 | FTRACE_OPS_FL_DYNAMIC = 1 << 2, | ||
38 | }; | ||
39 | |||
32 | struct ftrace_ops { | 40 | struct ftrace_ops { |
33 | ftrace_func_t func; | 41 | ftrace_func_t func; |
34 | struct ftrace_ops *next; | 42 | struct ftrace_ops *next; |
43 | unsigned long flags; | ||
44 | #ifdef CONFIG_DYNAMIC_FTRACE | ||
45 | struct ftrace_hash *notrace_hash; | ||
46 | struct ftrace_hash *filter_hash; | ||
47 | #endif | ||
35 | }; | 48 | }; |
36 | 49 | ||
37 | extern int function_trace_stop; | 50 | extern int function_trace_stop; |
@@ -146,14 +159,13 @@ extern void unregister_ftrace_function_probe_all(char *glob); | |||
146 | extern int ftrace_text_reserved(void *start, void *end); | 159 | extern int ftrace_text_reserved(void *start, void *end); |
147 | 160 | ||
148 | enum { | 161 | enum { |
149 | FTRACE_FL_FREE = (1 << 0), | 162 | FTRACE_FL_ENABLED = (1 << 30), |
150 | FTRACE_FL_FAILED = (1 << 1), | 163 | FTRACE_FL_FREE = (1 << 31), |
151 | FTRACE_FL_FILTER = (1 << 2), | ||
152 | FTRACE_FL_ENABLED = (1 << 3), | ||
153 | FTRACE_FL_NOTRACE = (1 << 4), | ||
154 | FTRACE_FL_CONVERTED = (1 << 5), | ||
155 | }; | 164 | }; |
156 | 165 | ||
166 | #define FTRACE_FL_MASK (0x3UL << 30) | ||
167 | #define FTRACE_REF_MAX ((1 << 30) - 1) | ||
168 | |||
157 | struct dyn_ftrace { | 169 | struct dyn_ftrace { |
158 | union { | 170 | union { |
159 | unsigned long ip; /* address of mcount call-site */ | 171 | unsigned long ip; /* address of mcount call-site */ |
@@ -167,7 +179,12 @@ struct dyn_ftrace { | |||
167 | }; | 179 | }; |
168 | 180 | ||
169 | int ftrace_force_update(void); | 181 | int ftrace_force_update(void); |
170 | void ftrace_set_filter(unsigned char *buf, int len, int reset); | 182 | void ftrace_set_filter(struct ftrace_ops *ops, unsigned char *buf, |
183 | int len, int reset); | ||
184 | void ftrace_set_notrace(struct ftrace_ops *ops, unsigned char *buf, | ||
185 | int len, int reset); | ||
186 | void ftrace_set_global_filter(unsigned char *buf, int len, int reset); | ||
187 | void ftrace_set_global_notrace(unsigned char *buf, int len, int reset); | ||
171 | 188 | ||
172 | int register_ftrace_command(struct ftrace_func_command *cmd); | 189 | int register_ftrace_command(struct ftrace_func_command *cmd); |
173 | int unregister_ftrace_command(struct ftrace_func_command *cmd); | 190 | int unregister_ftrace_command(struct ftrace_func_command *cmd); |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index bfb8f934521e..56d8fc87fbbc 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -353,6 +353,8 @@ extern unsigned long get_zeroed_page(gfp_t gfp_mask); | |||
353 | 353 | ||
354 | void *alloc_pages_exact(size_t size, gfp_t gfp_mask); | 354 | void *alloc_pages_exact(size_t size, gfp_t gfp_mask); |
355 | void free_pages_exact(void *virt, size_t size); | 355 | void free_pages_exact(void *virt, size_t size); |
356 | /* This is different from alloc_pages_exact_node !!! */ | ||
357 | void *alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask); | ||
356 | 358 | ||
357 | #define __get_free_page(gfp_mask) \ | 359 | #define __get_free_page(gfp_mask) \ |
358 | __get_free_pages((gfp_mask), 0) | 360 | __get_free_pages((gfp_mask), 0) |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 62f500c724f9..51932e5acf7c 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -143,19 +143,18 @@ struct hrtimer_sleeper { | |||
143 | */ | 143 | */ |
144 | struct hrtimer_clock_base { | 144 | struct hrtimer_clock_base { |
145 | struct hrtimer_cpu_base *cpu_base; | 145 | struct hrtimer_cpu_base *cpu_base; |
146 | clockid_t index; | 146 | int index; |
147 | clockid_t clockid; | ||
147 | struct timerqueue_head active; | 148 | struct timerqueue_head active; |
148 | ktime_t resolution; | 149 | ktime_t resolution; |
149 | ktime_t (*get_time)(void); | 150 | ktime_t (*get_time)(void); |
150 | ktime_t softirq_time; | 151 | ktime_t softirq_time; |
151 | #ifdef CONFIG_HIGH_RES_TIMERS | ||
152 | ktime_t offset; | 152 | ktime_t offset; |
153 | #endif | ||
154 | }; | 153 | }; |
155 | 154 | ||
156 | enum hrtimer_base_type { | 155 | enum hrtimer_base_type { |
157 | HRTIMER_BASE_REALTIME, | ||
158 | HRTIMER_BASE_MONOTONIC, | 156 | HRTIMER_BASE_MONOTONIC, |
157 | HRTIMER_BASE_REALTIME, | ||
159 | HRTIMER_BASE_BOOTTIME, | 158 | HRTIMER_BASE_BOOTTIME, |
160 | HRTIMER_MAX_CLOCK_BASES, | 159 | HRTIMER_MAX_CLOCK_BASES, |
161 | }; | 160 | }; |
@@ -164,7 +163,7 @@ enum hrtimer_base_type { | |||
164 | * struct hrtimer_cpu_base - the per cpu clock bases | 163 | * struct hrtimer_cpu_base - the per cpu clock bases |
165 | * @lock: lock protecting the base and associated clock bases | 164 | * @lock: lock protecting the base and associated clock bases |
166 | * and timers | 165 | * and timers |
167 | * @clock_base: array of clock bases for this cpu | 166 | * @active_bases: Bitfield to mark bases with active timers |
168 | * @expires_next: absolute time of the next event which was scheduled | 167 | * @expires_next: absolute time of the next event which was scheduled |
169 | * via clock_set_next_event() | 168 | * via clock_set_next_event() |
170 | * @hres_active: State of high resolution mode | 169 | * @hres_active: State of high resolution mode |
@@ -173,10 +172,11 @@ enum hrtimer_base_type { | |||
173 | * @nr_retries: Total number of hrtimer interrupt retries | 172 | * @nr_retries: Total number of hrtimer interrupt retries |
174 | * @nr_hangs: Total number of hrtimer interrupt hangs | 173 | * @nr_hangs: Total number of hrtimer interrupt hangs |
175 | * @max_hang_time: Maximum time spent in hrtimer_interrupt | 174 | * @max_hang_time: Maximum time spent in hrtimer_interrupt |
175 | * @clock_base: array of clock bases for this cpu | ||
176 | */ | 176 | */ |
177 | struct hrtimer_cpu_base { | 177 | struct hrtimer_cpu_base { |
178 | raw_spinlock_t lock; | 178 | raw_spinlock_t lock; |
179 | struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; | 179 | unsigned long active_bases; |
180 | #ifdef CONFIG_HIGH_RES_TIMERS | 180 | #ifdef CONFIG_HIGH_RES_TIMERS |
181 | ktime_t expires_next; | 181 | ktime_t expires_next; |
182 | int hres_active; | 182 | int hres_active; |
@@ -186,6 +186,7 @@ struct hrtimer_cpu_base { | |||
186 | unsigned long nr_hangs; | 186 | unsigned long nr_hangs; |
187 | ktime_t max_hang_time; | 187 | ktime_t max_hang_time; |
188 | #endif | 188 | #endif |
189 | struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; | ||
189 | }; | 190 | }; |
190 | 191 | ||
191 | static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) | 192 | static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) |
@@ -256,8 +257,6 @@ static inline ktime_t hrtimer_expires_remaining(const struct hrtimer *timer) | |||
256 | #ifdef CONFIG_HIGH_RES_TIMERS | 257 | #ifdef CONFIG_HIGH_RES_TIMERS |
257 | struct clock_event_device; | 258 | struct clock_event_device; |
258 | 259 | ||
259 | extern void clock_was_set(void); | ||
260 | extern void hres_timers_resume(void); | ||
261 | extern void hrtimer_interrupt(struct clock_event_device *dev); | 260 | extern void hrtimer_interrupt(struct clock_event_device *dev); |
262 | 261 | ||
263 | /* | 262 | /* |
@@ -291,16 +290,8 @@ extern void hrtimer_peek_ahead_timers(void); | |||
291 | # define MONOTONIC_RES_NSEC LOW_RES_NSEC | 290 | # define MONOTONIC_RES_NSEC LOW_RES_NSEC |
292 | # define KTIME_MONOTONIC_RES KTIME_LOW_RES | 291 | # define KTIME_MONOTONIC_RES KTIME_LOW_RES |
293 | 292 | ||
294 | /* | ||
295 | * clock_was_set() is a NOP for non- high-resolution systems. The | ||
296 | * time-sorted order guarantees that a timer does not expire early and | ||
297 | * is expired in the next softirq when the clock was advanced. | ||
298 | */ | ||
299 | static inline void clock_was_set(void) { } | ||
300 | static inline void hrtimer_peek_ahead_timers(void) { } | 293 | static inline void hrtimer_peek_ahead_timers(void) { } |
301 | 294 | ||
302 | static inline void hres_timers_resume(void) { } | ||
303 | |||
304 | /* | 295 | /* |
305 | * In non high resolution mode the time reference is taken from | 296 | * In non high resolution mode the time reference is taken from |
306 | * the base softirq time variable. | 297 | * the base softirq time variable. |
@@ -316,10 +307,18 @@ static inline int hrtimer_is_hres_active(struct hrtimer *timer) | |||
316 | } | 307 | } |
317 | #endif | 308 | #endif |
318 | 309 | ||
310 | extern void clock_was_set(void); | ||
311 | #ifdef CONFIG_TIMERFD | ||
312 | extern void timerfd_clock_was_set(void); | ||
313 | #else | ||
314 | static inline void timerfd_clock_was_set(void) { } | ||
315 | #endif | ||
316 | extern void hrtimers_resume(void); | ||
317 | |||
319 | extern ktime_t ktime_get(void); | 318 | extern ktime_t ktime_get(void); |
320 | extern ktime_t ktime_get_real(void); | 319 | extern ktime_t ktime_get_real(void); |
321 | extern ktime_t ktime_get_boottime(void); | 320 | extern ktime_t ktime_get_boottime(void); |
322 | 321 | extern ktime_t ktime_get_monotonic_offset(void); | |
323 | 322 | ||
324 | DECLARE_PER_CPU(struct tick_device, tick_cpu_device); | 323 | DECLARE_PER_CPU(struct tick_device, tick_cpu_device); |
325 | 324 | ||
diff --git a/include/linux/ide.h b/include/linux/ide.h index 072fe8c93e6f..42557851b12e 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -18,13 +18,13 @@ | |||
18 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
19 | #include <linux/completion.h> | 19 | #include <linux/completion.h> |
20 | #include <linux/pm.h> | 20 | #include <linux/pm.h> |
21 | #include <linux/mutex.h> | ||
21 | #ifdef CONFIG_BLK_DEV_IDEACPI | 22 | #ifdef CONFIG_BLK_DEV_IDEACPI |
22 | #include <acpi/acpi.h> | 23 | #include <acpi/acpi.h> |
23 | #endif | 24 | #endif |
24 | #include <asm/byteorder.h> | 25 | #include <asm/byteorder.h> |
25 | #include <asm/system.h> | 26 | #include <asm/system.h> |
26 | #include <asm/io.h> | 27 | #include <asm/io.h> |
27 | #include <asm/mutex.h> | ||
28 | 28 | ||
29 | /* for request_sense */ | 29 | /* for request_sense */ |
30 | #include <linux/cdrom.h> | 30 | #include <linux/cdrom.h> |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 2d1c6117d92c..b2eee5879883 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -884,6 +884,15 @@ struct ieee80211_ht_cap { | |||
884 | #define IEEE80211_HT_CAP_40MHZ_INTOLERANT 0x4000 | 884 | #define IEEE80211_HT_CAP_40MHZ_INTOLERANT 0x4000 |
885 | #define IEEE80211_HT_CAP_LSIG_TXOP_PROT 0x8000 | 885 | #define IEEE80211_HT_CAP_LSIG_TXOP_PROT 0x8000 |
886 | 886 | ||
887 | /* 802.11n HT extended capabilities masks (for extended_ht_cap_info) */ | ||
888 | #define IEEE80211_HT_EXT_CAP_PCO 0x0001 | ||
889 | #define IEEE80211_HT_EXT_CAP_PCO_TIME 0x0006 | ||
890 | #define IEEE80211_HT_EXT_CAP_PCO_TIME_SHIFT 1 | ||
891 | #define IEEE80211_HT_EXT_CAP_MCS_FB 0x0300 | ||
892 | #define IEEE80211_HT_EXT_CAP_MCS_FB_SHIFT 8 | ||
893 | #define IEEE80211_HT_EXT_CAP_HTC_SUP 0x0400 | ||
894 | #define IEEE80211_HT_EXT_CAP_RD_RESPONDER 0x0800 | ||
895 | |||
887 | /* 802.11n HT capability AMPDU settings (for ampdu_params_info) */ | 896 | /* 802.11n HT capability AMPDU settings (for ampdu_params_info) */ |
888 | #define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03 | 897 | #define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03 |
889 | #define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C | 898 | #define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C |
@@ -993,6 +1002,11 @@ struct ieee80211_ht_info { | |||
993 | 1002 | ||
994 | #define WLAN_CAPABILITY_ESS (1<<0) | 1003 | #define WLAN_CAPABILITY_ESS (1<<0) |
995 | #define WLAN_CAPABILITY_IBSS (1<<1) | 1004 | #define WLAN_CAPABILITY_IBSS (1<<1) |
1005 | |||
1006 | /* A mesh STA sets the ESS and IBSS capability bits to zero */ | ||
1007 | #define WLAN_CAPABILITY_IS_MBSS(cap) \ | ||
1008 | (!((cap) & (WLAN_CAPABILITY_ESS | WLAN_CAPABILITY_IBSS))) | ||
1009 | |||
996 | #define WLAN_CAPABILITY_CF_POLLABLE (1<<2) | 1010 | #define WLAN_CAPABILITY_CF_POLLABLE (1<<2) |
997 | #define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3) | 1011 | #define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3) |
998 | #define WLAN_CAPABILITY_PRIVACY (1<<4) | 1012 | #define WLAN_CAPABILITY_PRIVACY (1<<4) |
@@ -1252,9 +1266,8 @@ enum ieee80211_category { | |||
1252 | WLAN_CATEGORY_MULTIHOP_ACTION = 14, | 1266 | WLAN_CATEGORY_MULTIHOP_ACTION = 14, |
1253 | WLAN_CATEGORY_SELF_PROTECTED = 15, | 1267 | WLAN_CATEGORY_SELF_PROTECTED = 15, |
1254 | WLAN_CATEGORY_WMM = 17, | 1268 | WLAN_CATEGORY_WMM = 17, |
1255 | /* TODO: remove MESH_PLINK and MESH_PATH_SEL after */ | 1269 | /* TODO: remove MESH_PATH_SEL after mesh is updated |
1256 | /* mesh is updated to current 802.11s draft */ | 1270 | * to current 802.11s draft */ |
1257 | WLAN_CATEGORY_MESH_PLINK = 30, | ||
1258 | WLAN_CATEGORY_MESH_PATH_SEL = 32, | 1271 | WLAN_CATEGORY_MESH_PATH_SEL = 32, |
1259 | WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, | 1272 | WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, |
1260 | WLAN_CATEGORY_VENDOR_SPECIFIC = 127, | 1273 | WLAN_CATEGORY_VENDOR_SPECIFIC = 127, |
@@ -1507,6 +1520,7 @@ static inline bool ieee80211_is_robust_mgmt_frame(struct ieee80211_hdr *hdr) | |||
1507 | category = ((u8 *) hdr) + 24; | 1520 | category = ((u8 *) hdr) + 24; |
1508 | return *category != WLAN_CATEGORY_PUBLIC && | 1521 | return *category != WLAN_CATEGORY_PUBLIC && |
1509 | *category != WLAN_CATEGORY_HT && | 1522 | *category != WLAN_CATEGORY_HT && |
1523 | *category != WLAN_CATEGORY_SELF_PROTECTED && | ||
1510 | *category != WLAN_CATEGORY_VENDOR_SPECIFIC; | 1524 | *category != WLAN_CATEGORY_VENDOR_SPECIFIC; |
1511 | } | 1525 | } |
1512 | 1526 | ||
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index be69043d2896..0f1325d98295 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
@@ -136,6 +136,7 @@ int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr); | |||
136 | extern struct ctl_table ether_table[]; | 136 | extern struct ctl_table ether_table[]; |
137 | #endif | 137 | #endif |
138 | 138 | ||
139 | int mac_pton(const char *s, u8 *mac); | ||
139 | extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len); | 140 | extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len); |
140 | 141 | ||
141 | #endif | 142 | #endif |
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 635e1faec412..290bd8ac94cf 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -86,7 +86,6 @@ struct vlan_group { | |||
86 | * the vlan is attached to. | 86 | * the vlan is attached to. |
87 | */ | 87 | */ |
88 | unsigned int nr_vlans; | 88 | unsigned int nr_vlans; |
89 | int killall; | ||
90 | struct hlist_node hlist; /* linked list */ | 89 | struct hlist_node hlist; /* linked list */ |
91 | struct net_device **vlan_devices_arrays[VLAN_GROUP_ARRAY_SPLIT_PARTS]; | 90 | struct net_device **vlan_devices_arrays[VLAN_GROUP_ARRAY_SPLIT_PARTS]; |
92 | struct rcu_head rcu; | 91 | struct rcu_head rcu; |
@@ -132,7 +131,8 @@ extern u16 vlan_dev_vlan_id(const struct net_device *dev); | |||
132 | 131 | ||
133 | extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, | 132 | extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, |
134 | u16 vlan_tci, int polling); | 133 | u16 vlan_tci, int polling); |
135 | extern bool vlan_hwaccel_do_receive(struct sk_buff **skb); | 134 | extern bool vlan_do_receive(struct sk_buff **skb); |
135 | extern struct sk_buff *vlan_untag(struct sk_buff *skb); | ||
136 | extern gro_result_t | 136 | extern gro_result_t |
137 | vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, | 137 | vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, |
138 | unsigned int vlan_tci, struct sk_buff *skb); | 138 | unsigned int vlan_tci, struct sk_buff *skb); |
@@ -166,13 +166,18 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, | |||
166 | return NET_XMIT_SUCCESS; | 166 | return NET_XMIT_SUCCESS; |
167 | } | 167 | } |
168 | 168 | ||
169 | static inline bool vlan_hwaccel_do_receive(struct sk_buff **skb) | 169 | static inline bool vlan_do_receive(struct sk_buff **skb) |
170 | { | 170 | { |
171 | if ((*skb)->vlan_tci & VLAN_VID_MASK) | 171 | if ((*skb)->vlan_tci & VLAN_VID_MASK) |
172 | (*skb)->pkt_type = PACKET_OTHERHOST; | 172 | (*skb)->pkt_type = PACKET_OTHERHOST; |
173 | return false; | 173 | return false; |
174 | } | 174 | } |
175 | 175 | ||
176 | static inline struct sk_buff *vlan_untag(struct sk_buff *skb) | ||
177 | { | ||
178 | return skb; | ||
179 | } | ||
180 | |||
176 | static inline gro_result_t | 181 | static inline gro_result_t |
177 | vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, | 182 | vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, |
178 | unsigned int vlan_tci, struct sk_buff *skb) | 183 | unsigned int vlan_tci, struct sk_buff *skb) |
diff --git a/include/linux/init.h b/include/linux/init.h index 577671c55153..9146f39cdddf 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -79,29 +79,29 @@ | |||
79 | #define __exitused __used | 79 | #define __exitused __used |
80 | #endif | 80 | #endif |
81 | 81 | ||
82 | #define __exit __section(.exit.text) __exitused __cold | 82 | #define __exit __section(.exit.text) __exitused __cold notrace |
83 | 83 | ||
84 | /* Used for HOTPLUG */ | 84 | /* Used for HOTPLUG */ |
85 | #define __devinit __section(.devinit.text) __cold | 85 | #define __devinit __section(.devinit.text) __cold notrace |
86 | #define __devinitdata __section(.devinit.data) | 86 | #define __devinitdata __section(.devinit.data) |
87 | #define __devinitconst __section(.devinit.rodata) | 87 | #define __devinitconst __section(.devinit.rodata) |
88 | #define __devexit __section(.devexit.text) __exitused __cold | 88 | #define __devexit __section(.devexit.text) __exitused __cold notrace |
89 | #define __devexitdata __section(.devexit.data) | 89 | #define __devexitdata __section(.devexit.data) |
90 | #define __devexitconst __section(.devexit.rodata) | 90 | #define __devexitconst __section(.devexit.rodata) |
91 | 91 | ||
92 | /* Used for HOTPLUG_CPU */ | 92 | /* Used for HOTPLUG_CPU */ |
93 | #define __cpuinit __section(.cpuinit.text) __cold | 93 | #define __cpuinit __section(.cpuinit.text) __cold notrace |
94 | #define __cpuinitdata __section(.cpuinit.data) | 94 | #define __cpuinitdata __section(.cpuinit.data) |
95 | #define __cpuinitconst __section(.cpuinit.rodata) | 95 | #define __cpuinitconst __section(.cpuinit.rodata) |
96 | #define __cpuexit __section(.cpuexit.text) __exitused __cold | 96 | #define __cpuexit __section(.cpuexit.text) __exitused __cold notrace |
97 | #define __cpuexitdata __section(.cpuexit.data) | 97 | #define __cpuexitdata __section(.cpuexit.data) |
98 | #define __cpuexitconst __section(.cpuexit.rodata) | 98 | #define __cpuexitconst __section(.cpuexit.rodata) |
99 | 99 | ||
100 | /* Used for MEMORY_HOTPLUG */ | 100 | /* Used for MEMORY_HOTPLUG */ |
101 | #define __meminit __section(.meminit.text) __cold | 101 | #define __meminit __section(.meminit.text) __cold notrace |
102 | #define __meminitdata __section(.meminit.data) | 102 | #define __meminitdata __section(.meminit.data) |
103 | #define __meminitconst __section(.meminit.rodata) | 103 | #define __meminitconst __section(.meminit.rodata) |
104 | #define __memexit __section(.memexit.text) __exitused __cold | 104 | #define __memexit __section(.memexit.text) __exitused __cold notrace |
105 | #define __memexitdata __section(.memexit.data) | 105 | #define __memexitdata __section(.memexit.data) |
106 | #define __memexitconst __section(.memexit.rodata) | 106 | #define __memexitconst __section(.memexit.rodata) |
107 | 107 | ||
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index caa151fbebb7..689496bb6654 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -134,7 +134,6 @@ extern struct cred init_cred; | |||
134 | .stack = &init_thread_info, \ | 134 | .stack = &init_thread_info, \ |
135 | .usage = ATOMIC_INIT(2), \ | 135 | .usage = ATOMIC_INIT(2), \ |
136 | .flags = PF_KTHREAD, \ | 136 | .flags = PF_KTHREAD, \ |
137 | .lock_depth = -1, \ | ||
138 | .prio = MAX_PRIO-20, \ | 137 | .prio = MAX_PRIO-20, \ |
139 | .static_prio = MAX_PRIO-20, \ | 138 | .static_prio = MAX_PRIO-20, \ |
140 | .normal_prio = MAX_PRIO-20, \ | 139 | .normal_prio = MAX_PRIO-20, \ |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index bea0ac750712..6c12989839d9 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -414,7 +414,6 @@ enum | |||
414 | TASKLET_SOFTIRQ, | 414 | TASKLET_SOFTIRQ, |
415 | SCHED_SOFTIRQ, | 415 | SCHED_SOFTIRQ, |
416 | HRTIMER_SOFTIRQ, | 416 | HRTIMER_SOFTIRQ, |
417 | RCU_SOFTIRQ, /* Preferable RCU should always be the last softirq */ | ||
418 | 417 | ||
419 | NR_SOFTIRQS | 418 | NR_SOFTIRQS |
420 | }; | 419 | }; |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 09a308072f56..8b4538446636 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -53,12 +53,13 @@ typedef void (*irq_preflow_handler_t)(struct irq_data *data); | |||
53 | * Bits which can be modified via irq_set/clear/modify_status_flags() | 53 | * Bits which can be modified via irq_set/clear/modify_status_flags() |
54 | * IRQ_LEVEL - Interrupt is level type. Will be also | 54 | * IRQ_LEVEL - Interrupt is level type. Will be also |
55 | * updated in the code when the above trigger | 55 | * updated in the code when the above trigger |
56 | * bits are modified via set_irq_type() | 56 | * bits are modified via irq_set_irq_type() |
57 | * IRQ_PER_CPU - Mark an interrupt PER_CPU. Will protect | 57 | * IRQ_PER_CPU - Mark an interrupt PER_CPU. Will protect |
58 | * it from affinity setting | 58 | * it from affinity setting |
59 | * IRQ_NOPROBE - Interrupt cannot be probed by autoprobing | 59 | * IRQ_NOPROBE - Interrupt cannot be probed by autoprobing |
60 | * IRQ_NOREQUEST - Interrupt cannot be requested via | 60 | * IRQ_NOREQUEST - Interrupt cannot be requested via |
61 | * request_irq() | 61 | * request_irq() |
62 | * IRQ_NOTHREAD - Interrupt cannot be threaded | ||
62 | * IRQ_NOAUTOEN - Interrupt is not automatically enabled in | 63 | * IRQ_NOAUTOEN - Interrupt is not automatically enabled in |
63 | * request/setup_irq() | 64 | * request/setup_irq() |
64 | * IRQ_NO_BALANCING - Interrupt cannot be balanced (affinity set) | 65 | * IRQ_NO_BALANCING - Interrupt cannot be balanced (affinity set) |
@@ -85,6 +86,7 @@ enum { | |||
85 | IRQ_NO_BALANCING = (1 << 13), | 86 | IRQ_NO_BALANCING = (1 << 13), |
86 | IRQ_MOVE_PCNTXT = (1 << 14), | 87 | IRQ_MOVE_PCNTXT = (1 << 14), |
87 | IRQ_NESTED_THREAD = (1 << 15), | 88 | IRQ_NESTED_THREAD = (1 << 15), |
89 | IRQ_NOTHREAD = (1 << 16), | ||
88 | }; | 90 | }; |
89 | 91 | ||
90 | #define IRQF_MODIFY_MASK \ | 92 | #define IRQF_MODIFY_MASK \ |
@@ -261,23 +263,6 @@ static inline void irqd_clr_chained_irq_inprogress(struct irq_data *d) | |||
261 | * struct irq_chip - hardware interrupt chip descriptor | 263 | * struct irq_chip - hardware interrupt chip descriptor |
262 | * | 264 | * |
263 | * @name: name for /proc/interrupts | 265 | * @name: name for /proc/interrupts |
264 | * @startup: deprecated, replaced by irq_startup | ||
265 | * @shutdown: deprecated, replaced by irq_shutdown | ||
266 | * @enable: deprecated, replaced by irq_enable | ||
267 | * @disable: deprecated, replaced by irq_disable | ||
268 | * @ack: deprecated, replaced by irq_ack | ||
269 | * @mask: deprecated, replaced by irq_mask | ||
270 | * @mask_ack: deprecated, replaced by irq_mask_ack | ||
271 | * @unmask: deprecated, replaced by irq_unmask | ||
272 | * @eoi: deprecated, replaced by irq_eoi | ||
273 | * @end: deprecated, will go away with __do_IRQ() | ||
274 | * @set_affinity: deprecated, replaced by irq_set_affinity | ||
275 | * @retrigger: deprecated, replaced by irq_retrigger | ||
276 | * @set_type: deprecated, replaced by irq_set_type | ||
277 | * @set_wake: deprecated, replaced by irq_wake | ||
278 | * @bus_lock: deprecated, replaced by irq_bus_lock | ||
279 | * @bus_sync_unlock: deprecated, replaced by irq_bus_sync_unlock | ||
280 | * | ||
281 | * @irq_startup: start up the interrupt (defaults to ->enable if NULL) | 266 | * @irq_startup: start up the interrupt (defaults to ->enable if NULL) |
282 | * @irq_shutdown: shut down the interrupt (defaults to ->disable if NULL) | 267 | * @irq_shutdown: shut down the interrupt (defaults to ->disable if NULL) |
283 | * @irq_enable: enable the interrupt (defaults to chip->unmask if NULL) | 268 | * @irq_enable: enable the interrupt (defaults to chip->unmask if NULL) |
@@ -295,6 +280,9 @@ static inline void irqd_clr_chained_irq_inprogress(struct irq_data *d) | |||
295 | * @irq_bus_sync_unlock:function to sync and unlock slow bus (i2c) chips | 280 | * @irq_bus_sync_unlock:function to sync and unlock slow bus (i2c) chips |
296 | * @irq_cpu_online: configure an interrupt source for a secondary CPU | 281 | * @irq_cpu_online: configure an interrupt source for a secondary CPU |
297 | * @irq_cpu_offline: un-configure an interrupt source for a secondary CPU | 282 | * @irq_cpu_offline: un-configure an interrupt source for a secondary CPU |
283 | * @irq_suspend: function called from core code on suspend once per chip | ||
284 | * @irq_resume: function called from core code on resume once per chip | ||
285 | * @irq_pm_shutdown: function called from core code on shutdown once per chip | ||
298 | * @irq_print_chip: optional to print special chip info in show_interrupts | 286 | * @irq_print_chip: optional to print special chip info in show_interrupts |
299 | * @flags: chip specific flags | 287 | * @flags: chip specific flags |
300 | * | 288 | * |
@@ -324,6 +312,10 @@ struct irq_chip { | |||
324 | void (*irq_cpu_online)(struct irq_data *data); | 312 | void (*irq_cpu_online)(struct irq_data *data); |
325 | void (*irq_cpu_offline)(struct irq_data *data); | 313 | void (*irq_cpu_offline)(struct irq_data *data); |
326 | 314 | ||
315 | void (*irq_suspend)(struct irq_data *data); | ||
316 | void (*irq_resume)(struct irq_data *data); | ||
317 | void (*irq_pm_shutdown)(struct irq_data *data); | ||
318 | |||
327 | void (*irq_print_chip)(struct irq_data *data, struct seq_file *p); | 319 | void (*irq_print_chip)(struct irq_data *data, struct seq_file *p); |
328 | 320 | ||
329 | unsigned long flags; | 321 | unsigned long flags; |
@@ -439,7 +431,7 @@ irq_set_handler(unsigned int irq, irq_flow_handler_t handle) | |||
439 | /* | 431 | /* |
440 | * Set a highlevel chained flow handler for a given IRQ. | 432 | * Set a highlevel chained flow handler for a given IRQ. |
441 | * (a chained handler is automatically enabled and set to | 433 | * (a chained handler is automatically enabled and set to |
442 | * IRQ_NOREQUEST and IRQ_NOPROBE) | 434 | * IRQ_NOREQUEST, IRQ_NOPROBE, and IRQ_NOTHREAD) |
443 | */ | 435 | */ |
444 | static inline void | 436 | static inline void |
445 | irq_set_chained_handler(unsigned int irq, irq_flow_handler_t handle) | 437 | irq_set_chained_handler(unsigned int irq, irq_flow_handler_t handle) |
@@ -469,6 +461,16 @@ static inline void irq_set_probe(unsigned int irq) | |||
469 | irq_modify_status(irq, IRQ_NOPROBE, 0); | 461 | irq_modify_status(irq, IRQ_NOPROBE, 0); |
470 | } | 462 | } |
471 | 463 | ||
464 | static inline void irq_set_nothread(unsigned int irq) | ||
465 | { | ||
466 | irq_modify_status(irq, 0, IRQ_NOTHREAD); | ||
467 | } | ||
468 | |||
469 | static inline void irq_set_thread(unsigned int irq) | ||
470 | { | ||
471 | irq_modify_status(irq, IRQ_NOTHREAD, 0); | ||
472 | } | ||
473 | |||
472 | static inline void irq_set_nested_thread(unsigned int irq, bool nest) | 474 | static inline void irq_set_nested_thread(unsigned int irq, bool nest) |
473 | { | 475 | { |
474 | if (nest) | 476 | if (nest) |
@@ -573,6 +575,145 @@ static inline int irq_reserve_irq(unsigned int irq) | |||
573 | return irq_reserve_irqs(irq, 1); | 575 | return irq_reserve_irqs(irq, 1); |
574 | } | 576 | } |
575 | 577 | ||
578 | #ifndef irq_reg_writel | ||
579 | # define irq_reg_writel(val, addr) writel(val, addr) | ||
580 | #endif | ||
581 | #ifndef irq_reg_readl | ||
582 | # define irq_reg_readl(addr) readl(addr) | ||
583 | #endif | ||
584 | |||
585 | /** | ||
586 | * struct irq_chip_regs - register offsets for struct irq_gci | ||
587 | * @enable: Enable register offset to reg_base | ||
588 | * @disable: Disable register offset to reg_base | ||
589 | * @mask: Mask register offset to reg_base | ||
590 | * @ack: Ack register offset to reg_base | ||
591 | * @eoi: Eoi register offset to reg_base | ||
592 | * @type: Type configuration register offset to reg_base | ||
593 | * @polarity: Polarity configuration register offset to reg_base | ||
594 | */ | ||
595 | struct irq_chip_regs { | ||
596 | unsigned long enable; | ||
597 | unsigned long disable; | ||
598 | unsigned long mask; | ||
599 | unsigned long ack; | ||
600 | unsigned long eoi; | ||
601 | unsigned long type; | ||
602 | unsigned long polarity; | ||
603 | }; | ||
604 | |||
605 | /** | ||
606 | * struct irq_chip_type - Generic interrupt chip instance for a flow type | ||
607 | * @chip: The real interrupt chip which provides the callbacks | ||
608 | * @regs: Register offsets for this chip | ||
609 | * @handler: Flow handler associated with this chip | ||
610 | * @type: Chip can handle these flow types | ||
611 | * | ||
612 | * A irq_generic_chip can have several instances of irq_chip_type when | ||
613 | * it requires different functions and register offsets for different | ||
614 | * flow types. | ||
615 | */ | ||
616 | struct irq_chip_type { | ||
617 | struct irq_chip chip; | ||
618 | struct irq_chip_regs regs; | ||
619 | irq_flow_handler_t handler; | ||
620 | u32 type; | ||
621 | }; | ||
622 | |||
623 | /** | ||
624 | * struct irq_chip_generic - Generic irq chip data structure | ||
625 | * @lock: Lock to protect register and cache data access | ||
626 | * @reg_base: Register base address (virtual) | ||
627 | * @irq_base: Interrupt base nr for this chip | ||
628 | * @irq_cnt: Number of interrupts handled by this chip | ||
629 | * @mask_cache: Cached mask register | ||
630 | * @type_cache: Cached type register | ||
631 | * @polarity_cache: Cached polarity register | ||
632 | * @wake_enabled: Interrupt can wakeup from suspend | ||
633 | * @wake_active: Interrupt is marked as an wakeup from suspend source | ||
634 | * @num_ct: Number of available irq_chip_type instances (usually 1) | ||
635 | * @private: Private data for non generic chip callbacks | ||
636 | * @list: List head for keeping track of instances | ||
637 | * @chip_types: Array of interrupt irq_chip_types | ||
638 | * | ||
639 | * Note, that irq_chip_generic can have multiple irq_chip_type | ||
640 | * implementations which can be associated to a particular irq line of | ||
641 | * an irq_chip_generic instance. That allows to share and protect | ||
642 | * state in an irq_chip_generic instance when we need to implement | ||
643 | * different flow mechanisms (level/edge) for it. | ||
644 | */ | ||
645 | struct irq_chip_generic { | ||
646 | raw_spinlock_t lock; | ||
647 | void __iomem *reg_base; | ||
648 | unsigned int irq_base; | ||
649 | unsigned int irq_cnt; | ||
650 | u32 mask_cache; | ||
651 | u32 type_cache; | ||
652 | u32 polarity_cache; | ||
653 | u32 wake_enabled; | ||
654 | u32 wake_active; | ||
655 | unsigned int num_ct; | ||
656 | void *private; | ||
657 | struct list_head list; | ||
658 | struct irq_chip_type chip_types[0]; | ||
659 | }; | ||
660 | |||
661 | /** | ||
662 | * enum irq_gc_flags - Initialization flags for generic irq chips | ||
663 | * @IRQ_GC_INIT_MASK_CACHE: Initialize the mask_cache by reading mask reg | ||
664 | * @IRQ_GC_INIT_NESTED_LOCK: Set the lock class of the irqs to nested for | ||
665 | * irq chips which need to call irq_set_wake() on | ||
666 | * the parent irq. Usually GPIO implementations | ||
667 | */ | ||
668 | enum irq_gc_flags { | ||
669 | IRQ_GC_INIT_MASK_CACHE = 1 << 0, | ||
670 | IRQ_GC_INIT_NESTED_LOCK = 1 << 1, | ||
671 | }; | ||
672 | |||
673 | /* Generic chip callback functions */ | ||
674 | void irq_gc_noop(struct irq_data *d); | ||
675 | void irq_gc_mask_disable_reg(struct irq_data *d); | ||
676 | void irq_gc_mask_set_bit(struct irq_data *d); | ||
677 | void irq_gc_mask_clr_bit(struct irq_data *d); | ||
678 | void irq_gc_unmask_enable_reg(struct irq_data *d); | ||
679 | void irq_gc_ack(struct irq_data *d); | ||
680 | void irq_gc_mask_disable_reg_and_ack(struct irq_data *d); | ||
681 | void irq_gc_eoi(struct irq_data *d); | ||
682 | int irq_gc_set_wake(struct irq_data *d, unsigned int on); | ||
683 | |||
684 | /* Setup functions for irq_chip_generic */ | ||
685 | struct irq_chip_generic * | ||
686 | irq_alloc_generic_chip(const char *name, int nr_ct, unsigned int irq_base, | ||
687 | void __iomem *reg_base, irq_flow_handler_t handler); | ||
688 | void irq_setup_generic_chip(struct irq_chip_generic *gc, u32 msk, | ||
689 | enum irq_gc_flags flags, unsigned int clr, | ||
690 | unsigned int set); | ||
691 | int irq_setup_alt_chip(struct irq_data *d, unsigned int type); | ||
692 | void irq_remove_generic_chip(struct irq_chip_generic *gc, u32 msk, | ||
693 | unsigned int clr, unsigned int set); | ||
694 | |||
695 | static inline struct irq_chip_type *irq_data_get_chip_type(struct irq_data *d) | ||
696 | { | ||
697 | return container_of(d->chip, struct irq_chip_type, chip); | ||
698 | } | ||
699 | |||
700 | #define IRQ_MSK(n) (u32)((n) < 32 ? ((1 << (n)) - 1) : UINT_MAX) | ||
701 | |||
702 | #ifdef CONFIG_SMP | ||
703 | static inline void irq_gc_lock(struct irq_chip_generic *gc) | ||
704 | { | ||
705 | raw_spin_lock(&gc->lock); | ||
706 | } | ||
707 | |||
708 | static inline void irq_gc_unlock(struct irq_chip_generic *gc) | ||
709 | { | ||
710 | raw_spin_unlock(&gc->lock); | ||
711 | } | ||
712 | #else | ||
713 | static inline void irq_gc_lock(struct irq_chip_generic *gc) { } | ||
714 | static inline void irq_gc_unlock(struct irq_chip_generic *gc) { } | ||
715 | #endif | ||
716 | |||
576 | #endif /* CONFIG_GENERIC_HARDIRQS */ | 717 | #endif /* CONFIG_GENERIC_HARDIRQS */ |
577 | 718 | ||
578 | #endif /* !CONFIG_S390 */ | 719 | #endif /* !CONFIG_S390 */ |
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index a082905b5ebe..2d921b35212c 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h | |||
@@ -16,16 +16,18 @@ struct timer_rand_state; | |||
16 | * @irq_data: per irq and chip data passed down to chip functions | 16 | * @irq_data: per irq and chip data passed down to chip functions |
17 | * @timer_rand_state: pointer to timer rand state struct | 17 | * @timer_rand_state: pointer to timer rand state struct |
18 | * @kstat_irqs: irq stats per cpu | 18 | * @kstat_irqs: irq stats per cpu |
19 | * @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()] | 19 | * @handle_irq: highlevel irq-events handler |
20 | * @preflow_handler: handler called before the flow handler (currently used by sparc) | ||
20 | * @action: the irq action chain | 21 | * @action: the irq action chain |
21 | * @status: status information | 22 | * @status: status information |
22 | * @core_internal_state__do_not_mess_with_it: core internal status information | 23 | * @core_internal_state__do_not_mess_with_it: core internal status information |
23 | * @depth: disable-depth, for nested irq_disable() calls | 24 | * @depth: disable-depth, for nested irq_disable() calls |
24 | * @wake_depth: enable depth, for multiple set_irq_wake() callers | 25 | * @wake_depth: enable depth, for multiple irq_set_irq_wake() callers |
25 | * @irq_count: stats field to detect stalled irqs | 26 | * @irq_count: stats field to detect stalled irqs |
26 | * @last_unhandled: aging timer for unhandled count | 27 | * @last_unhandled: aging timer for unhandled count |
27 | * @irqs_unhandled: stats field for spurious unhandled interrupts | 28 | * @irqs_unhandled: stats field for spurious unhandled interrupts |
28 | * @lock: locking for SMP | 29 | * @lock: locking for SMP |
30 | * @affinity_hint: hint to user space for preferred irq affinity | ||
29 | * @affinity_notify: context for notification of affinity changes | 31 | * @affinity_notify: context for notification of affinity changes |
30 | * @pending_mask: pending rebalanced interrupts | 32 | * @pending_mask: pending rebalanced interrupts |
31 | * @threads_oneshot: bitfield to handle shared oneshot threads | 33 | * @threads_oneshot: bitfield to handle shared oneshot threads |
@@ -109,10 +111,7 @@ static inline void generic_handle_irq_desc(unsigned int irq, struct irq_desc *de | |||
109 | desc->handle_irq(irq, desc); | 111 | desc->handle_irq(irq, desc); |
110 | } | 112 | } |
111 | 113 | ||
112 | static inline void generic_handle_irq(unsigned int irq) | 114 | int generic_handle_irq(unsigned int irq); |
113 | { | ||
114 | generic_handle_irq_desc(irq, irq_to_desc(irq)); | ||
115 | } | ||
116 | 115 | ||
117 | /* Test to see if a driver has successfully requested an irq */ | 116 | /* Test to see if a driver has successfully requested an irq */ |
118 | static inline int irq_has_action(unsigned int irq) | 117 | static inline int irq_has_action(unsigned int irq) |
diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index 7880f18e4b86..83e745f3ead7 100644 --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h | |||
@@ -1,20 +1,43 @@ | |||
1 | #ifndef _LINUX_JUMP_LABEL_H | 1 | #ifndef _LINUX_JUMP_LABEL_H |
2 | #define _LINUX_JUMP_LABEL_H | 2 | #define _LINUX_JUMP_LABEL_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | #include <linux/compiler.h> | ||
6 | |||
4 | #if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL) | 7 | #if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL) |
8 | |||
9 | struct jump_label_key { | ||
10 | atomic_t enabled; | ||
11 | struct jump_entry *entries; | ||
12 | #ifdef CONFIG_MODULES | ||
13 | struct jump_label_mod *next; | ||
14 | #endif | ||
15 | }; | ||
16 | |||
5 | # include <asm/jump_label.h> | 17 | # include <asm/jump_label.h> |
6 | # define HAVE_JUMP_LABEL | 18 | # define HAVE_JUMP_LABEL |
7 | #endif | 19 | #endif |
8 | 20 | ||
9 | enum jump_label_type { | 21 | enum jump_label_type { |
22 | JUMP_LABEL_DISABLE = 0, | ||
10 | JUMP_LABEL_ENABLE, | 23 | JUMP_LABEL_ENABLE, |
11 | JUMP_LABEL_DISABLE | ||
12 | }; | 24 | }; |
13 | 25 | ||
14 | struct module; | 26 | struct module; |
15 | 27 | ||
16 | #ifdef HAVE_JUMP_LABEL | 28 | #ifdef HAVE_JUMP_LABEL |
17 | 29 | ||
30 | #ifdef CONFIG_MODULES | ||
31 | #define JUMP_LABEL_INIT {{ 0 }, NULL, NULL} | ||
32 | #else | ||
33 | #define JUMP_LABEL_INIT {{ 0 }, NULL} | ||
34 | #endif | ||
35 | |||
36 | static __always_inline bool static_branch(struct jump_label_key *key) | ||
37 | { | ||
38 | return arch_static_branch(key); | ||
39 | } | ||
40 | |||
18 | extern struct jump_entry __start___jump_table[]; | 41 | extern struct jump_entry __start___jump_table[]; |
19 | extern struct jump_entry __stop___jump_table[]; | 42 | extern struct jump_entry __stop___jump_table[]; |
20 | 43 | ||
@@ -23,37 +46,37 @@ extern void jump_label_unlock(void); | |||
23 | extern void arch_jump_label_transform(struct jump_entry *entry, | 46 | extern void arch_jump_label_transform(struct jump_entry *entry, |
24 | enum jump_label_type type); | 47 | enum jump_label_type type); |
25 | extern void arch_jump_label_text_poke_early(jump_label_t addr); | 48 | extern void arch_jump_label_text_poke_early(jump_label_t addr); |
26 | extern void jump_label_update(unsigned long key, enum jump_label_type type); | ||
27 | extern void jump_label_apply_nops(struct module *mod); | ||
28 | extern int jump_label_text_reserved(void *start, void *end); | 49 | extern int jump_label_text_reserved(void *start, void *end); |
50 | extern void jump_label_inc(struct jump_label_key *key); | ||
51 | extern void jump_label_dec(struct jump_label_key *key); | ||
52 | extern bool jump_label_enabled(struct jump_label_key *key); | ||
53 | extern void jump_label_apply_nops(struct module *mod); | ||
29 | 54 | ||
30 | #define jump_label_enable(key) \ | 55 | #else |
31 | jump_label_update((unsigned long)key, JUMP_LABEL_ENABLE); | ||
32 | 56 | ||
33 | #define jump_label_disable(key) \ | 57 | #include <asm/atomic.h> |
34 | jump_label_update((unsigned long)key, JUMP_LABEL_DISABLE); | ||
35 | 58 | ||
36 | #else | 59 | #define JUMP_LABEL_INIT {ATOMIC_INIT(0)} |
37 | 60 | ||
38 | #define JUMP_LABEL(key, label) \ | 61 | struct jump_label_key { |
39 | do { \ | 62 | atomic_t enabled; |
40 | if (unlikely(*key)) \ | 63 | }; |
41 | goto label; \ | ||
42 | } while (0) | ||
43 | 64 | ||
44 | #define jump_label_enable(cond_var) \ | 65 | static __always_inline bool static_branch(struct jump_label_key *key) |
45 | do { \ | 66 | { |
46 | *(cond_var) = 1; \ | 67 | if (unlikely(atomic_read(&key->enabled))) |
47 | } while (0) | 68 | return true; |
69 | return false; | ||
70 | } | ||
48 | 71 | ||
49 | #define jump_label_disable(cond_var) \ | 72 | static inline void jump_label_inc(struct jump_label_key *key) |
50 | do { \ | 73 | { |
51 | *(cond_var) = 0; \ | 74 | atomic_inc(&key->enabled); |
52 | } while (0) | 75 | } |
53 | 76 | ||
54 | static inline int jump_label_apply_nops(struct module *mod) | 77 | static inline void jump_label_dec(struct jump_label_key *key) |
55 | { | 78 | { |
56 | return 0; | 79 | atomic_dec(&key->enabled); |
57 | } | 80 | } |
58 | 81 | ||
59 | static inline int jump_label_text_reserved(void *start, void *end) | 82 | static inline int jump_label_text_reserved(void *start, void *end) |
@@ -64,16 +87,16 @@ static inline int jump_label_text_reserved(void *start, void *end) | |||
64 | static inline void jump_label_lock(void) {} | 87 | static inline void jump_label_lock(void) {} |
65 | static inline void jump_label_unlock(void) {} | 88 | static inline void jump_label_unlock(void) {} |
66 | 89 | ||
67 | #endif | 90 | static inline bool jump_label_enabled(struct jump_label_key *key) |
91 | { | ||
92 | return !!atomic_read(&key->enabled); | ||
93 | } | ||
68 | 94 | ||
69 | #define COND_STMT(key, stmt) \ | 95 | static inline int jump_label_apply_nops(struct module *mod) |
70 | do { \ | 96 | { |
71 | __label__ jl_enabled; \ | 97 | return 0; |
72 | JUMP_LABEL(key, jl_enabled); \ | 98 | } |
73 | if (0) { \ | 99 | |
74 | jl_enabled: \ | 100 | #endif |
75 | stmt; \ | ||
76 | } \ | ||
77 | } while (0) | ||
78 | 101 | ||
79 | #endif | 102 | #endif |
diff --git a/include/linux/jump_label_ref.h b/include/linux/jump_label_ref.h deleted file mode 100644 index e5d012ad92c6..000000000000 --- a/include/linux/jump_label_ref.h +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | #ifndef _LINUX_JUMP_LABEL_REF_H | ||
2 | #define _LINUX_JUMP_LABEL_REF_H | ||
3 | |||
4 | #include <linux/jump_label.h> | ||
5 | #include <asm/atomic.h> | ||
6 | |||
7 | #ifdef HAVE_JUMP_LABEL | ||
8 | |||
9 | static inline void jump_label_inc(atomic_t *key) | ||
10 | { | ||
11 | if (atomic_add_return(1, key) == 1) | ||
12 | jump_label_enable(key); | ||
13 | } | ||
14 | |||
15 | static inline void jump_label_dec(atomic_t *key) | ||
16 | { | ||
17 | if (atomic_dec_and_test(key)) | ||
18 | jump_label_disable(key); | ||
19 | } | ||
20 | |||
21 | #else /* !HAVE_JUMP_LABEL */ | ||
22 | |||
23 | static inline void jump_label_inc(atomic_t *key) | ||
24 | { | ||
25 | atomic_inc(key); | ||
26 | } | ||
27 | |||
28 | static inline void jump_label_dec(atomic_t *key) | ||
29 | { | ||
30 | atomic_dec(key); | ||
31 | } | ||
32 | |||
33 | #undef JUMP_LABEL | ||
34 | #define JUMP_LABEL(key, label) \ | ||
35 | do { \ | ||
36 | if (unlikely(__builtin_choose_expr( \ | ||
37 | __builtin_types_compatible_p(typeof(key), atomic_t *), \ | ||
38 | atomic_read((atomic_t *)(key)), *(key)))) \ | ||
39 | goto label; \ | ||
40 | } while (0) | ||
41 | |||
42 | #endif /* HAVE_JUMP_LABEL */ | ||
43 | |||
44 | #endif /* _LINUX_JUMP_LABEL_REF_H */ | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 00cec4dc0ae2..f37ba716ef8b 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -283,6 +283,7 @@ extern char *get_options(const char *str, int nints, int *ints); | |||
283 | extern unsigned long long memparse(const char *ptr, char **retptr); | 283 | extern unsigned long long memparse(const char *ptr, char **retptr); |
284 | 284 | ||
285 | extern int core_kernel_text(unsigned long addr); | 285 | extern int core_kernel_text(unsigned long addr); |
286 | extern int core_kernel_data(unsigned long addr); | ||
286 | extern int __kernel_text_address(unsigned long addr); | 287 | extern int __kernel_text_address(unsigned long addr); |
287 | extern int kernel_text_address(unsigned long addr); | 288 | extern int kernel_text_address(unsigned long addr); |
288 | extern int func_ptr_is_kernel_text(void *ptr); | 289 | extern int func_ptr_is_kernel_text(void *ptr); |
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 6efd7a78de6a..310231823852 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
@@ -113,5 +113,6 @@ extern void usermodehelper_init(void); | |||
113 | 113 | ||
114 | extern int usermodehelper_disable(void); | 114 | extern int usermodehelper_disable(void); |
115 | extern void usermodehelper_enable(void); | 115 | extern void usermodehelper_enable(void); |
116 | extern bool usermodehelper_is_disabled(void); | ||
116 | 117 | ||
117 | #endif /* __LINUX_KMOD_H__ */ | 118 | #endif /* __LINUX_KMOD_H__ */ |
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index ea2dc1a2e13d..55ef181521ff 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -541,6 +541,9 @@ struct kvm_ppc_pvinfo { | |||
541 | #define KVM_CAP_PPC_GET_PVINFO 57 | 541 | #define KVM_CAP_PPC_GET_PVINFO 57 |
542 | #define KVM_CAP_PPC_IRQ_LEVEL 58 | 542 | #define KVM_CAP_PPC_IRQ_LEVEL 58 |
543 | #define KVM_CAP_ASYNC_PF 59 | 543 | #define KVM_CAP_ASYNC_PF 59 |
544 | #define KVM_CAP_TSC_CONTROL 60 | ||
545 | #define KVM_CAP_GET_TSC_KHZ 61 | ||
546 | #define KVM_CAP_PPC_BOOKE_SREGS 62 | ||
544 | 547 | ||
545 | #ifdef KVM_CAP_IRQ_ROUTING | 548 | #ifdef KVM_CAP_IRQ_ROUTING |
546 | 549 | ||
@@ -677,6 +680,9 @@ struct kvm_clock_data { | |||
677 | #define KVM_SET_PIT2 _IOW(KVMIO, 0xa0, struct kvm_pit_state2) | 680 | #define KVM_SET_PIT2 _IOW(KVMIO, 0xa0, struct kvm_pit_state2) |
678 | /* Available with KVM_CAP_PPC_GET_PVINFO */ | 681 | /* Available with KVM_CAP_PPC_GET_PVINFO */ |
679 | #define KVM_PPC_GET_PVINFO _IOW(KVMIO, 0xa1, struct kvm_ppc_pvinfo) | 682 | #define KVM_PPC_GET_PVINFO _IOW(KVMIO, 0xa1, struct kvm_ppc_pvinfo) |
683 | /* Available with KVM_CAP_TSC_CONTROL */ | ||
684 | #define KVM_SET_TSC_KHZ _IO(KVMIO, 0xa2) | ||
685 | #define KVM_GET_TSC_KHZ _IO(KVMIO, 0xa3) | ||
680 | 686 | ||
681 | /* | 687 | /* |
682 | * ioctls for vcpu fds | 688 | * ioctls for vcpu fds |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index ab428552af8e..31ebb59cbd2f 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -27,6 +27,10 @@ | |||
27 | 27 | ||
28 | #include <asm/kvm_host.h> | 28 | #include <asm/kvm_host.h> |
29 | 29 | ||
30 | #ifndef KVM_MMIO_SIZE | ||
31 | #define KVM_MMIO_SIZE 8 | ||
32 | #endif | ||
33 | |||
30 | /* | 34 | /* |
31 | * vcpu->requests bit members | 35 | * vcpu->requests bit members |
32 | */ | 36 | */ |
@@ -43,7 +47,6 @@ | |||
43 | #define KVM_REQ_DEACTIVATE_FPU 10 | 47 | #define KVM_REQ_DEACTIVATE_FPU 10 |
44 | #define KVM_REQ_EVENT 11 | 48 | #define KVM_REQ_EVENT 11 |
45 | #define KVM_REQ_APF_HALT 12 | 49 | #define KVM_REQ_APF_HALT 12 |
46 | #define KVM_REQ_NMI 13 | ||
47 | 50 | ||
48 | #define KVM_USERSPACE_IRQ_SOURCE_ID 0 | 51 | #define KVM_USERSPACE_IRQ_SOURCE_ID 0 |
49 | 52 | ||
@@ -133,7 +136,8 @@ struct kvm_vcpu { | |||
133 | int mmio_read_completed; | 136 | int mmio_read_completed; |
134 | int mmio_is_write; | 137 | int mmio_is_write; |
135 | int mmio_size; | 138 | int mmio_size; |
136 | unsigned char mmio_data[8]; | 139 | int mmio_index; |
140 | unsigned char mmio_data[KVM_MMIO_SIZE]; | ||
137 | gpa_t mmio_phys_addr; | 141 | gpa_t mmio_phys_addr; |
138 | #endif | 142 | #endif |
139 | 143 | ||
@@ -292,9 +296,10 @@ static inline struct kvm_vcpu *kvm_get_vcpu(struct kvm *kvm, int i) | |||
292 | } | 296 | } |
293 | 297 | ||
294 | #define kvm_for_each_vcpu(idx, vcpup, kvm) \ | 298 | #define kvm_for_each_vcpu(idx, vcpup, kvm) \ |
295 | for (idx = 0, vcpup = kvm_get_vcpu(kvm, idx); \ | 299 | for (idx = 0; \ |
296 | idx < atomic_read(&kvm->online_vcpus) && vcpup; \ | 300 | idx < atomic_read(&kvm->online_vcpus) && \ |
297 | vcpup = kvm_get_vcpu(kvm, ++idx)) | 301 | (vcpup = kvm_get_vcpu(kvm, idx)) != NULL; \ |
302 | idx++) | ||
298 | 303 | ||
299 | int kvm_vcpu_init(struct kvm_vcpu *vcpu, struct kvm *kvm, unsigned id); | 304 | int kvm_vcpu_init(struct kvm_vcpu *vcpu, struct kvm *kvm, unsigned id); |
300 | void kvm_vcpu_uninit(struct kvm_vcpu *vcpu); | 305 | void kvm_vcpu_uninit(struct kvm_vcpu *vcpu); |
@@ -365,7 +370,6 @@ pfn_t gfn_to_pfn_prot(struct kvm *kvm, gfn_t gfn, bool write_fault, | |||
365 | bool *writable); | 370 | bool *writable); |
366 | pfn_t gfn_to_pfn_memslot(struct kvm *kvm, | 371 | pfn_t gfn_to_pfn_memslot(struct kvm *kvm, |
367 | struct kvm_memory_slot *slot, gfn_t gfn); | 372 | struct kvm_memory_slot *slot, gfn_t gfn); |
368 | int memslot_id(struct kvm *kvm, gfn_t gfn); | ||
369 | void kvm_release_pfn_dirty(pfn_t); | 373 | void kvm_release_pfn_dirty(pfn_t); |
370 | void kvm_release_pfn_clean(pfn_t pfn); | 374 | void kvm_release_pfn_clean(pfn_t pfn); |
371 | void kvm_set_pfn_dirty(pfn_t pfn); | 375 | void kvm_set_pfn_dirty(pfn_t pfn); |
@@ -513,6 +517,7 @@ struct kvm_assigned_dev_kernel { | |||
513 | struct kvm *kvm; | 517 | struct kvm *kvm; |
514 | spinlock_t intx_lock; | 518 | spinlock_t intx_lock; |
515 | char irq_name[32]; | 519 | char irq_name[32]; |
520 | struct pci_saved_state *pci_saved_state; | ||
516 | }; | 521 | }; |
517 | 522 | ||
518 | struct kvm_irq_mask_notifier { | 523 | struct kvm_irq_mask_notifier { |
@@ -587,8 +592,17 @@ static inline int kvm_deassign_device(struct kvm *kvm, | |||
587 | 592 | ||
588 | static inline void kvm_guest_enter(void) | 593 | static inline void kvm_guest_enter(void) |
589 | { | 594 | { |
595 | BUG_ON(preemptible()); | ||
590 | account_system_vtime(current); | 596 | account_system_vtime(current); |
591 | current->flags |= PF_VCPU; | 597 | current->flags |= PF_VCPU; |
598 | /* KVM does not hold any references to rcu protected data when it | ||
599 | * switches CPU into a guest mode. In fact switching to a guest mode | ||
600 | * is very similar to exiting to userspase from rcu point of view. In | ||
601 | * addition CPU may stay in a guest mode for quite a long time (up to | ||
602 | * one time slice). Lets treat guest mode as quiescent state, just like | ||
603 | * we do with user-mode execution. | ||
604 | */ | ||
605 | rcu_virt_note_context_switch(smp_processor_id()); | ||
592 | } | 606 | } |
593 | 607 | ||
594 | static inline void kvm_guest_exit(void) | 608 | static inline void kvm_guest_exit(void) |
@@ -597,6 +611,11 @@ static inline void kvm_guest_exit(void) | |||
597 | current->flags &= ~PF_VCPU; | 611 | current->flags &= ~PF_VCPU; |
598 | } | 612 | } |
599 | 613 | ||
614 | static inline int memslot_id(struct kvm *kvm, gfn_t gfn) | ||
615 | { | ||
616 | return gfn_to_memslot(kvm, gfn)->id; | ||
617 | } | ||
618 | |||
600 | static inline unsigned long gfn_to_hva_memslot(struct kvm_memory_slot *slot, | 619 | static inline unsigned long gfn_to_hva_memslot(struct kvm_memory_slot *slot, |
601 | gfn_t gfn) | 620 | gfn_t gfn) |
602 | { | 621 | { |
diff --git a/include/linux/leds-regulator.h b/include/linux/leds-regulator.h index 5a8eb389aab8..e2337a8c90b0 100644 --- a/include/linux/leds-regulator.h +++ b/include/linux/leds-regulator.h | |||
@@ -16,7 +16,7 @@ | |||
16 | * Use "vled" as supply id when declaring the regulator consumer: | 16 | * Use "vled" as supply id when declaring the regulator consumer: |
17 | * | 17 | * |
18 | * static struct regulator_consumer_supply pcap_regulator_VVIB_consumers [] = { | 18 | * static struct regulator_consumer_supply pcap_regulator_VVIB_consumers [] = { |
19 | * { .dev_name = "leds-regulator.0", supply = "vled" }, | 19 | * { .dev_name = "leds-regulator.0", .supply = "vled" }, |
20 | * }; | 20 | * }; |
21 | * | 21 | * |
22 | * If you have several regulator driven LEDs, you can append a numerical id to | 22 | * If you have several regulator driven LEDs, you can append a numerical id to |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 04f32a3eb26b..5a9926b34072 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -1151,6 +1151,7 @@ extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset, | |||
1151 | ata_reset_fn_t softreset, ata_reset_fn_t hardreset, | 1151 | ata_reset_fn_t softreset, ata_reset_fn_t hardreset, |
1152 | ata_postreset_fn_t postreset); | 1152 | ata_postreset_fn_t postreset); |
1153 | extern void ata_std_error_handler(struct ata_port *ap); | 1153 | extern void ata_std_error_handler(struct ata_port *ap); |
1154 | extern int ata_link_nr_enabled(struct ata_link *link); | ||
1154 | 1155 | ||
1155 | /* | 1156 | /* |
1156 | * Base operations to inherit from and initializers for sht | 1157 | * Base operations to inherit from and initializers for sht |
diff --git a/include/linux/list.h b/include/linux/list.h index 3a54266a1e85..cc6d2aa6b415 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/stddef.h> | 5 | #include <linux/stddef.h> |
6 | #include <linux/poison.h> | 6 | #include <linux/poison.h> |
7 | #include <linux/prefetch.h> | 7 | #include <linux/const.h> |
8 | 8 | ||
9 | /* | 9 | /* |
10 | * Simple doubly linked list implementation. | 10 | * Simple doubly linked list implementation. |
@@ -367,18 +367,15 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
367 | * @head: the head for your list. | 367 | * @head: the head for your list. |
368 | */ | 368 | */ |
369 | #define list_for_each(pos, head) \ | 369 | #define list_for_each(pos, head) \ |
370 | for (pos = (head)->next; prefetch(pos->next), pos != (head); \ | 370 | for (pos = (head)->next; pos != (head); pos = pos->next) |
371 | pos = pos->next) | ||
372 | 371 | ||
373 | /** | 372 | /** |
374 | * __list_for_each - iterate over a list | 373 | * __list_for_each - iterate over a list |
375 | * @pos: the &struct list_head to use as a loop cursor. | 374 | * @pos: the &struct list_head to use as a loop cursor. |
376 | * @head: the head for your list. | 375 | * @head: the head for your list. |
377 | * | 376 | * |
378 | * This variant differs from list_for_each() in that it's the | 377 | * This variant doesn't differ from list_for_each() any more. |
379 | * simplest possible list iteration code, no prefetching is done. | 378 | * We don't do prefetching in either case. |
380 | * Use this for code that knows the list to be very short (empty | ||
381 | * or 1 entry) most of the time. | ||
382 | */ | 379 | */ |
383 | #define __list_for_each(pos, head) \ | 380 | #define __list_for_each(pos, head) \ |
384 | for (pos = (head)->next; pos != (head); pos = pos->next) | 381 | for (pos = (head)->next; pos != (head); pos = pos->next) |
@@ -389,8 +386,7 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
389 | * @head: the head for your list. | 386 | * @head: the head for your list. |
390 | */ | 387 | */ |
391 | #define list_for_each_prev(pos, head) \ | 388 | #define list_for_each_prev(pos, head) \ |
392 | for (pos = (head)->prev; prefetch(pos->prev), pos != (head); \ | 389 | for (pos = (head)->prev; pos != (head); pos = pos->prev) |
393 | pos = pos->prev) | ||
394 | 390 | ||
395 | /** | 391 | /** |
396 | * list_for_each_safe - iterate over a list safe against removal of list entry | 392 | * list_for_each_safe - iterate over a list safe against removal of list entry |
@@ -410,7 +406,7 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
410 | */ | 406 | */ |
411 | #define list_for_each_prev_safe(pos, n, head) \ | 407 | #define list_for_each_prev_safe(pos, n, head) \ |
412 | for (pos = (head)->prev, n = pos->prev; \ | 408 | for (pos = (head)->prev, n = pos->prev; \ |
413 | prefetch(pos->prev), pos != (head); \ | 409 | pos != (head); \ |
414 | pos = n, n = pos->prev) | 410 | pos = n, n = pos->prev) |
415 | 411 | ||
416 | /** | 412 | /** |
@@ -421,7 +417,7 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
421 | */ | 417 | */ |
422 | #define list_for_each_entry(pos, head, member) \ | 418 | #define list_for_each_entry(pos, head, member) \ |
423 | for (pos = list_entry((head)->next, typeof(*pos), member); \ | 419 | for (pos = list_entry((head)->next, typeof(*pos), member); \ |
424 | prefetch(pos->member.next), &pos->member != (head); \ | 420 | &pos->member != (head); \ |
425 | pos = list_entry(pos->member.next, typeof(*pos), member)) | 421 | pos = list_entry(pos->member.next, typeof(*pos), member)) |
426 | 422 | ||
427 | /** | 423 | /** |
@@ -432,7 +428,7 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
432 | */ | 428 | */ |
433 | #define list_for_each_entry_reverse(pos, head, member) \ | 429 | #define list_for_each_entry_reverse(pos, head, member) \ |
434 | for (pos = list_entry((head)->prev, typeof(*pos), member); \ | 430 | for (pos = list_entry((head)->prev, typeof(*pos), member); \ |
435 | prefetch(pos->member.prev), &pos->member != (head); \ | 431 | &pos->member != (head); \ |
436 | pos = list_entry(pos->member.prev, typeof(*pos), member)) | 432 | pos = list_entry(pos->member.prev, typeof(*pos), member)) |
437 | 433 | ||
438 | /** | 434 | /** |
@@ -457,7 +453,7 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
457 | */ | 453 | */ |
458 | #define list_for_each_entry_continue(pos, head, member) \ | 454 | #define list_for_each_entry_continue(pos, head, member) \ |
459 | for (pos = list_entry(pos->member.next, typeof(*pos), member); \ | 455 | for (pos = list_entry(pos->member.next, typeof(*pos), member); \ |
460 | prefetch(pos->member.next), &pos->member != (head); \ | 456 | &pos->member != (head); \ |
461 | pos = list_entry(pos->member.next, typeof(*pos), member)) | 457 | pos = list_entry(pos->member.next, typeof(*pos), member)) |
462 | 458 | ||
463 | /** | 459 | /** |
@@ -471,7 +467,7 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
471 | */ | 467 | */ |
472 | #define list_for_each_entry_continue_reverse(pos, head, member) \ | 468 | #define list_for_each_entry_continue_reverse(pos, head, member) \ |
473 | for (pos = list_entry(pos->member.prev, typeof(*pos), member); \ | 469 | for (pos = list_entry(pos->member.prev, typeof(*pos), member); \ |
474 | prefetch(pos->member.prev), &pos->member != (head); \ | 470 | &pos->member != (head); \ |
475 | pos = list_entry(pos->member.prev, typeof(*pos), member)) | 471 | pos = list_entry(pos->member.prev, typeof(*pos), member)) |
476 | 472 | ||
477 | /** | 473 | /** |
@@ -483,7 +479,7 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
483 | * Iterate over list of given type, continuing from current position. | 479 | * Iterate over list of given type, continuing from current position. |
484 | */ | 480 | */ |
485 | #define list_for_each_entry_from(pos, head, member) \ | 481 | #define list_for_each_entry_from(pos, head, member) \ |
486 | for (; prefetch(pos->member.next), &pos->member != (head); \ | 482 | for (; &pos->member != (head); \ |
487 | pos = list_entry(pos->member.next, typeof(*pos), member)) | 483 | pos = list_entry(pos->member.next, typeof(*pos), member)) |
488 | 484 | ||
489 | /** | 485 | /** |
@@ -664,8 +660,7 @@ static inline void hlist_move_list(struct hlist_head *old, | |||
664 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member) | 660 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member) |
665 | 661 | ||
666 | #define hlist_for_each(pos, head) \ | 662 | #define hlist_for_each(pos, head) \ |
667 | for (pos = (head)->first; pos && ({ prefetch(pos->next); 1; }); \ | 663 | for (pos = (head)->first; pos ; pos = pos->next) |
668 | pos = pos->next) | ||
669 | 664 | ||
670 | #define hlist_for_each_safe(pos, n, head) \ | 665 | #define hlist_for_each_safe(pos, n, head) \ |
671 | for (pos = (head)->first; pos && ({ n = pos->next; 1; }); \ | 666 | for (pos = (head)->first; pos && ({ n = pos->next; 1; }); \ |
@@ -680,7 +675,7 @@ static inline void hlist_move_list(struct hlist_head *old, | |||
680 | */ | 675 | */ |
681 | #define hlist_for_each_entry(tpos, pos, head, member) \ | 676 | #define hlist_for_each_entry(tpos, pos, head, member) \ |
682 | for (pos = (head)->first; \ | 677 | for (pos = (head)->first; \ |
683 | pos && ({ prefetch(pos->next); 1;}) && \ | 678 | pos && \ |
684 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ | 679 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ |
685 | pos = pos->next) | 680 | pos = pos->next) |
686 | 681 | ||
@@ -692,7 +687,7 @@ static inline void hlist_move_list(struct hlist_head *old, | |||
692 | */ | 687 | */ |
693 | #define hlist_for_each_entry_continue(tpos, pos, member) \ | 688 | #define hlist_for_each_entry_continue(tpos, pos, member) \ |
694 | for (pos = (pos)->next; \ | 689 | for (pos = (pos)->next; \ |
695 | pos && ({ prefetch(pos->next); 1;}) && \ | 690 | pos && \ |
696 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ | 691 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ |
697 | pos = pos->next) | 692 | pos = pos->next) |
698 | 693 | ||
@@ -703,7 +698,7 @@ static inline void hlist_move_list(struct hlist_head *old, | |||
703 | * @member: the name of the hlist_node within the struct. | 698 | * @member: the name of the hlist_node within the struct. |
704 | */ | 699 | */ |
705 | #define hlist_for_each_entry_from(tpos, pos, member) \ | 700 | #define hlist_for_each_entry_from(tpos, pos, member) \ |
706 | for (; pos && ({ prefetch(pos->next); 1;}) && \ | 701 | for (; pos && \ |
707 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ | 702 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ |
708 | pos = pos->next) | 703 | pos = pos->next) |
709 | 704 | ||
diff --git a/include/linux/mfd/wm8994/pdata.h b/include/linux/mfd/wm8994/pdata.h index 466b1c777aff..d12f8d635a81 100644 --- a/include/linux/mfd/wm8994/pdata.h +++ b/include/linux/mfd/wm8994/pdata.h | |||
@@ -32,6 +32,10 @@ struct wm8994_ldo_pdata { | |||
32 | #define WM8994_EQ_REGS 20 | 32 | #define WM8994_EQ_REGS 20 |
33 | #define WM8958_MBC_CUTOFF_REGS 20 | 33 | #define WM8958_MBC_CUTOFF_REGS 20 |
34 | #define WM8958_MBC_COEFF_REGS 48 | 34 | #define WM8958_MBC_COEFF_REGS 48 |
35 | #define WM8958_MBC_COMBINED_REGS 56 | ||
36 | #define WM8958_VSS_HPF_REGS 2 | ||
37 | #define WM8958_VSS_REGS 148 | ||
38 | #define WM8958_ENH_EQ_REGS 32 | ||
35 | 39 | ||
36 | /** | 40 | /** |
37 | * DRC configurations are specified with a label and a set of register | 41 | * DRC configurations are specified with a label and a set of register |
@@ -71,6 +75,42 @@ struct wm8958_mbc_cfg { | |||
71 | const char *name; | 75 | const char *name; |
72 | u16 cutoff_regs[WM8958_MBC_CUTOFF_REGS]; | 76 | u16 cutoff_regs[WM8958_MBC_CUTOFF_REGS]; |
73 | u16 coeff_regs[WM8958_MBC_COEFF_REGS]; | 77 | u16 coeff_regs[WM8958_MBC_COEFF_REGS]; |
78 | |||
79 | /* Coefficient layout when using MBC+VSS firmware */ | ||
80 | u16 combined_regs[WM8958_MBC_COMBINED_REGS]; | ||
81 | }; | ||
82 | |||
83 | /** | ||
84 | * VSS HPF configurations are specified with a label and two values to | ||
85 | * write. Configurations are expected to be generated using the | ||
86 | * multiband compressor configuration panel in WISCE - see | ||
87 | * http://www.wolfsonmicro.com/wisce/ | ||
88 | */ | ||
89 | struct wm8958_vss_hpf_cfg { | ||
90 | const char *name; | ||
91 | u16 regs[WM8958_VSS_HPF_REGS]; | ||
92 | }; | ||
93 | |||
94 | /** | ||
95 | * VSS configurations are specified with a label and array of values | ||
96 | * to write. Configurations are expected to be generated using the | ||
97 | * multiband compressor configuration panel in WISCE - see | ||
98 | * http://www.wolfsonmicro.com/wisce/ | ||
99 | */ | ||
100 | struct wm8958_vss_cfg { | ||
101 | const char *name; | ||
102 | u16 regs[WM8958_VSS_REGS]; | ||
103 | }; | ||
104 | |||
105 | /** | ||
106 | * Enhanced EQ configurations are specified with a label and array of | ||
107 | * values to write. Configurations are expected to be generated using | ||
108 | * the multiband compressor configuration panel in WISCE - see | ||
109 | * http://www.wolfsonmicro.com/wisce/ | ||
110 | */ | ||
111 | struct wm8958_enh_eq_cfg { | ||
112 | const char *name; | ||
113 | u16 regs[WM8958_ENH_EQ_REGS]; | ||
74 | }; | 114 | }; |
75 | 115 | ||
76 | struct wm8994_pdata { | 116 | struct wm8994_pdata { |
@@ -95,6 +135,15 @@ struct wm8994_pdata { | |||
95 | int num_mbc_cfgs; | 135 | int num_mbc_cfgs; |
96 | struct wm8958_mbc_cfg *mbc_cfgs; | 136 | struct wm8958_mbc_cfg *mbc_cfgs; |
97 | 137 | ||
138 | int num_vss_cfgs; | ||
139 | struct wm8958_vss_cfg *vss_cfgs; | ||
140 | |||
141 | int num_vss_hpf_cfgs; | ||
142 | struct wm8958_vss_hpf_cfg *vss_hpf_cfgs; | ||
143 | |||
144 | int num_enh_eq_cfgs; | ||
145 | struct wm8958_enh_eq_cfg *enh_eq_cfgs; | ||
146 | |||
98 | /* LINEOUT can be differential or single ended */ | 147 | /* LINEOUT can be differential or single ended */ |
99 | unsigned int lineout1_diff:1; | 148 | unsigned int lineout1_diff:1; |
100 | unsigned int lineout2_diff:1; | 149 | unsigned int lineout2_diff:1; |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index eb792cb6d745..bcb793ec7374 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -183,6 +183,7 @@ struct mmc_host { | |||
183 | struct work_struct clk_gate_work; /* delayed clock gate */ | 183 | struct work_struct clk_gate_work; /* delayed clock gate */ |
184 | unsigned int clk_old; /* old clock value cache */ | 184 | unsigned int clk_old; /* old clock value cache */ |
185 | spinlock_t clk_lock; /* lock for clk fields */ | 185 | spinlock_t clk_lock; /* lock for clk fields */ |
186 | struct mutex clk_gate_mutex; /* mutex for clock gating */ | ||
186 | #endif | 187 | #endif |
187 | 188 | ||
188 | /* host specific block data */ | 189 | /* host specific block data */ |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 48c007dae476..ae28e93fd072 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -382,6 +382,23 @@ struct ssb_device_id { | |||
382 | #define SSB_ANY_ID 0xFFFF | 382 | #define SSB_ANY_ID 0xFFFF |
383 | #define SSB_ANY_REV 0xFF | 383 | #define SSB_ANY_REV 0xFF |
384 | 384 | ||
385 | /* Broadcom's specific AMBA core, see drivers/bcma/ */ | ||
386 | struct bcma_device_id { | ||
387 | __u16 manuf; | ||
388 | __u16 id; | ||
389 | __u8 rev; | ||
390 | __u8 class; | ||
391 | }; | ||
392 | #define BCMA_CORE(_manuf, _id, _rev, _class) \ | ||
393 | { .manuf = _manuf, .id = _id, .rev = _rev, .class = _class, } | ||
394 | #define BCMA_CORETABLE_END \ | ||
395 | { 0, }, | ||
396 | |||
397 | #define BCMA_ANY_MANUF 0xFFFF | ||
398 | #define BCMA_ANY_ID 0xFFFF | ||
399 | #define BCMA_ANY_REV 0xFF | ||
400 | #define BCMA_ANY_CLASS 0xFF | ||
401 | |||
385 | struct virtio_device_id { | 402 | struct virtio_device_id { |
386 | __u32 device; | 403 | __u32 device; |
387 | __u32 vendor; | 404 | __u32 vendor; |
diff --git a/include/linux/module.h b/include/linux/module.h index 5de42043dff0..d9ca2d5dc6d0 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -64,6 +64,9 @@ struct module_version_attribute { | |||
64 | const char *version; | 64 | const char *version; |
65 | } __attribute__ ((__aligned__(sizeof(void *)))); | 65 | } __attribute__ ((__aligned__(sizeof(void *)))); |
66 | 66 | ||
67 | extern ssize_t __modver_version_show(struct module_attribute *, | ||
68 | struct module *, char *); | ||
69 | |||
67 | struct module_kobject | 70 | struct module_kobject |
68 | { | 71 | { |
69 | struct kobject kobj; | 72 | struct kobject kobj; |
@@ -172,12 +175,7 @@ extern struct module __this_module; | |||
172 | #define MODULE_VERSION(_version) MODULE_INFO(version, _version) | 175 | #define MODULE_VERSION(_version) MODULE_INFO(version, _version) |
173 | #else | 176 | #else |
174 | #define MODULE_VERSION(_version) \ | 177 | #define MODULE_VERSION(_version) \ |
175 | extern ssize_t __modver_version_show(struct module_attribute *, \ | 178 | static struct module_version_attribute ___modver_attr = { \ |
176 | struct module *, char *); \ | ||
177 | static struct module_version_attribute __modver_version_attr \ | ||
178 | __used \ | ||
179 | __attribute__ ((__section__ ("__modver"),aligned(sizeof(void *)))) \ | ||
180 | = { \ | ||
181 | .mattr = { \ | 179 | .mattr = { \ |
182 | .attr = { \ | 180 | .attr = { \ |
183 | .name = "version", \ | 181 | .name = "version", \ |
@@ -187,7 +185,10 @@ extern struct module __this_module; | |||
187 | }, \ | 185 | }, \ |
188 | .module_name = KBUILD_MODNAME, \ | 186 | .module_name = KBUILD_MODNAME, \ |
189 | .version = _version, \ | 187 | .version = _version, \ |
190 | } | 188 | }; \ |
189 | static const struct module_version_attribute \ | ||
190 | __used __attribute__ ((__section__ ("__modver"))) \ | ||
191 | * __moduleparam_const __modver_attr = &___modver_attr | ||
191 | #endif | 192 | #endif |
192 | 193 | ||
193 | /* Optional firmware file (or files) needed by the module | 194 | /* Optional firmware file (or files) needed by the module |
@@ -223,7 +224,7 @@ struct module_use { | |||
223 | extern void *__crc_##sym __attribute__((weak)); \ | 224 | extern void *__crc_##sym __attribute__((weak)); \ |
224 | static const unsigned long __kcrctab_##sym \ | 225 | static const unsigned long __kcrctab_##sym \ |
225 | __used \ | 226 | __used \ |
226 | __attribute__((section("__kcrctab" sec), unused)) \ | 227 | __attribute__((section("___kcrctab" sec "+" #sym), unused)) \ |
227 | = (unsigned long) &__crc_##sym; | 228 | = (unsigned long) &__crc_##sym; |
228 | #else | 229 | #else |
229 | #define __CRC_SYMBOL(sym, sec) | 230 | #define __CRC_SYMBOL(sym, sec) |
@@ -238,7 +239,7 @@ struct module_use { | |||
238 | = MODULE_SYMBOL_PREFIX #sym; \ | 239 | = MODULE_SYMBOL_PREFIX #sym; \ |
239 | static const struct kernel_symbol __ksymtab_##sym \ | 240 | static const struct kernel_symbol __ksymtab_##sym \ |
240 | __used \ | 241 | __used \ |
241 | __attribute__((section("__ksymtab" sec), unused)) \ | 242 | __attribute__((section("___ksymtab" sec "+" #sym), unused)) \ |
242 | = { (unsigned long)&sym, __kstrtab_##sym } | 243 | = { (unsigned long)&sym, __kstrtab_##sym } |
243 | 244 | ||
244 | #define EXPORT_SYMBOL(sym) \ | 245 | #define EXPORT_SYMBOL(sym) \ |
@@ -367,34 +368,35 @@ struct module | |||
367 | struct module_notes_attrs *notes_attrs; | 368 | struct module_notes_attrs *notes_attrs; |
368 | #endif | 369 | #endif |
369 | 370 | ||
371 | /* The command line arguments (may be mangled). People like | ||
372 | keeping pointers to this stuff */ | ||
373 | char *args; | ||
374 | |||
370 | #ifdef CONFIG_SMP | 375 | #ifdef CONFIG_SMP |
371 | /* Per-cpu data. */ | 376 | /* Per-cpu data. */ |
372 | void __percpu *percpu; | 377 | void __percpu *percpu; |
373 | unsigned int percpu_size; | 378 | unsigned int percpu_size; |
374 | #endif | 379 | #endif |
375 | 380 | ||
376 | /* The command line arguments (may be mangled). People like | ||
377 | keeping pointers to this stuff */ | ||
378 | char *args; | ||
379 | #ifdef CONFIG_TRACEPOINTS | 381 | #ifdef CONFIG_TRACEPOINTS |
380 | struct tracepoint * const *tracepoints_ptrs; | ||
381 | unsigned int num_tracepoints; | 382 | unsigned int num_tracepoints; |
383 | struct tracepoint * const *tracepoints_ptrs; | ||
382 | #endif | 384 | #endif |
383 | #ifdef HAVE_JUMP_LABEL | 385 | #ifdef HAVE_JUMP_LABEL |
384 | struct jump_entry *jump_entries; | 386 | struct jump_entry *jump_entries; |
385 | unsigned int num_jump_entries; | 387 | unsigned int num_jump_entries; |
386 | #endif | 388 | #endif |
387 | #ifdef CONFIG_TRACING | 389 | #ifdef CONFIG_TRACING |
388 | const char **trace_bprintk_fmt_start; | ||
389 | unsigned int num_trace_bprintk_fmt; | 390 | unsigned int num_trace_bprintk_fmt; |
391 | const char **trace_bprintk_fmt_start; | ||
390 | #endif | 392 | #endif |
391 | #ifdef CONFIG_EVENT_TRACING | 393 | #ifdef CONFIG_EVENT_TRACING |
392 | struct ftrace_event_call **trace_events; | 394 | struct ftrace_event_call **trace_events; |
393 | unsigned int num_trace_events; | 395 | unsigned int num_trace_events; |
394 | #endif | 396 | #endif |
395 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD | 397 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD |
396 | unsigned long *ftrace_callsites; | ||
397 | unsigned int num_ftrace_callsites; | 398 | unsigned int num_ftrace_callsites; |
399 | unsigned long *ftrace_callsites; | ||
398 | #endif | 400 | #endif |
399 | 401 | ||
400 | #ifdef CONFIG_MODULE_UNLOAD | 402 | #ifdef CONFIG_MODULE_UNLOAD |
@@ -475,8 +477,9 @@ const struct kernel_symbol *find_symbol(const char *name, | |||
475 | bool warn); | 477 | bool warn); |
476 | 478 | ||
477 | /* Walk the exported symbol table */ | 479 | /* Walk the exported symbol table */ |
478 | bool each_symbol(bool (*fn)(const struct symsearch *arr, struct module *owner, | 480 | bool each_symbol_section(bool (*fn)(const struct symsearch *arr, |
479 | unsigned int symnum, void *data), void *data); | 481 | struct module *owner, |
482 | void *data), void *data); | ||
480 | 483 | ||
481 | /* Returns 0 and fills in value, defined and namebuf, or -ERANGE if | 484 | /* Returns 0 and fills in value, defined and namebuf, or -ERANGE if |
482 | symnum out of range. */ | 485 | symnum out of range. */ |
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 07b41951e3fa..ddaae98c53f9 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h | |||
@@ -67,9 +67,9 @@ struct kparam_string { | |||
67 | struct kparam_array | 67 | struct kparam_array |
68 | { | 68 | { |
69 | unsigned int max; | 69 | unsigned int max; |
70 | unsigned int elemsize; | ||
70 | unsigned int *num; | 71 | unsigned int *num; |
71 | const struct kernel_param_ops *ops; | 72 | const struct kernel_param_ops *ops; |
72 | unsigned int elemsize; | ||
73 | void *elem; | 73 | void *elem; |
74 | }; | 74 | }; |
75 | 75 | ||
@@ -371,8 +371,9 @@ extern int param_get_invbool(char *buffer, const struct kernel_param *kp); | |||
371 | */ | 371 | */ |
372 | #define module_param_array_named(name, array, type, nump, perm) \ | 372 | #define module_param_array_named(name, array, type, nump, perm) \ |
373 | static const struct kparam_array __param_arr_##name \ | 373 | static const struct kparam_array __param_arr_##name \ |
374 | = { ARRAY_SIZE(array), nump, ¶m_ops_##type, \ | 374 | = { .max = ARRAY_SIZE(array), .num = nump, \ |
375 | sizeof(array[0]), array }; \ | 375 | .ops = ¶m_ops_##type, \ |
376 | .elemsize = sizeof(array[0]), .elem = array }; \ | ||
376 | __module_param_call(MODULE_PARAM_PREFIX, name, \ | 377 | __module_param_call(MODULE_PARAM_PREFIX, name, \ |
377 | ¶m_array_ops, \ | 378 | ¶m_array_ops, \ |
378 | .arr = &__param_arr_##name, \ | 379 | .arr = &__param_arr_##name, \ |
diff --git a/include/linux/mroute.h b/include/linux/mroute.h index b21d567692b2..46caaf44339d 100644 --- a/include/linux/mroute.h +++ b/include/linux/mroute.h | |||
@@ -244,6 +244,7 @@ struct mfc_cache { | |||
244 | #ifdef __KERNEL__ | 244 | #ifdef __KERNEL__ |
245 | struct rtmsg; | 245 | struct rtmsg; |
246 | extern int ipmr_get_route(struct net *net, struct sk_buff *skb, | 246 | extern int ipmr_get_route(struct net *net, struct sk_buff *skb, |
247 | __be32 saddr, __be32 daddr, | ||
247 | struct rtmsg *rtm, int nowait); | 248 | struct rtmsg *rtm, int nowait); |
248 | #endif | 249 | #endif |
249 | 250 | ||
diff --git a/include/linux/mtd/physmap.h b/include/linux/mtd/physmap.h index bcfd9f777454..49b959029417 100644 --- a/include/linux/mtd/physmap.h +++ b/include/linux/mtd/physmap.h | |||
@@ -22,7 +22,9 @@ struct map_info; | |||
22 | 22 | ||
23 | struct physmap_flash_data { | 23 | struct physmap_flash_data { |
24 | unsigned int width; | 24 | unsigned int width; |
25 | void (*set_vpp)(struct map_info *, int); | 25 | int (*init)(struct platform_device *); |
26 | void (*exit)(struct platform_device *); | ||
27 | void (*set_vpp)(struct platform_device *, int); | ||
26 | unsigned int nr_parts; | 28 | unsigned int nr_parts; |
27 | unsigned int pfow_base; | 29 | unsigned int pfow_base; |
28 | char *probe_type; | 30 | char *probe_type; |
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 94b48bd40dd7..c75471db576e 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h | |||
@@ -51,7 +51,7 @@ struct mutex { | |||
51 | spinlock_t wait_lock; | 51 | spinlock_t wait_lock; |
52 | struct list_head wait_list; | 52 | struct list_head wait_list; |
53 | #if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_SMP) | 53 | #if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_SMP) |
54 | struct thread_info *owner; | 54 | struct task_struct *owner; |
55 | #endif | 55 | #endif |
56 | #ifdef CONFIG_DEBUG_MUTEXES | 56 | #ifdef CONFIG_DEBUG_MUTEXES |
57 | const char *name; | 57 | const char *name; |
diff --git a/include/linux/net.h b/include/linux/net.h index 94de83c0f877..1da55e9b6f01 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -42,6 +42,7 @@ | |||
42 | #define SYS_RECVMSG 17 /* sys_recvmsg(2) */ | 42 | #define SYS_RECVMSG 17 /* sys_recvmsg(2) */ |
43 | #define SYS_ACCEPT4 18 /* sys_accept4(2) */ | 43 | #define SYS_ACCEPT4 18 /* sys_accept4(2) */ |
44 | #define SYS_RECVMMSG 19 /* sys_recvmmsg(2) */ | 44 | #define SYS_RECVMMSG 19 /* sys_recvmmsg(2) */ |
45 | #define SYS_SENDMMSG 20 /* sys_sendmmsg(2) */ | ||
45 | 46 | ||
46 | typedef enum { | 47 | typedef enum { |
47 | SS_FREE = 0, /* not allocated */ | 48 | SS_FREE = 0, /* not allocated */ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 0249fe7e3872..ca333e79e10f 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1020,9 +1020,6 @@ struct net_device { | |||
1020 | * part of the usual set specified in Space.c. | 1020 | * part of the usual set specified in Space.c. |
1021 | */ | 1021 | */ |
1022 | 1022 | ||
1023 | unsigned char if_port; /* Selectable AUI, TP,..*/ | ||
1024 | unsigned char dma; /* DMA channel */ | ||
1025 | |||
1026 | unsigned long state; | 1023 | unsigned long state; |
1027 | 1024 | ||
1028 | struct list_head dev_list; | 1025 | struct list_head dev_list; |
@@ -1035,7 +1032,7 @@ struct net_device { | |||
1035 | u32 hw_features; | 1032 | u32 hw_features; |
1036 | /* user-requested features */ | 1033 | /* user-requested features */ |
1037 | u32 wanted_features; | 1034 | u32 wanted_features; |
1038 | /* VLAN feature mask */ | 1035 | /* mask of features inheritable by VLAN devices */ |
1039 | u32 vlan_features; | 1036 | u32 vlan_features; |
1040 | 1037 | ||
1041 | /* Net device feature bits; if you change something, | 1038 | /* Net device feature bits; if you change something, |
@@ -1066,6 +1063,8 @@ struct net_device { | |||
1066 | #define NETIF_F_NTUPLE (1 << 27) /* N-tuple filters supported */ | 1063 | #define NETIF_F_NTUPLE (1 << 27) /* N-tuple filters supported */ |
1067 | #define NETIF_F_RXHASH (1 << 28) /* Receive hashing offload */ | 1064 | #define NETIF_F_RXHASH (1 << 28) /* Receive hashing offload */ |
1068 | #define NETIF_F_RXCSUM (1 << 29) /* Receive checksumming offload */ | 1065 | #define NETIF_F_RXCSUM (1 << 29) /* Receive checksumming offload */ |
1066 | #define NETIF_F_NOCACHE_COPY (1 << 30) /* Use no-cache copyfromuser */ | ||
1067 | #define NETIF_F_LOOPBACK (1 << 31) /* Enable loopback */ | ||
1069 | 1068 | ||
1070 | /* Segmentation offload features */ | 1069 | /* Segmentation offload features */ |
1071 | #define NETIF_F_GSO_SHIFT 16 | 1070 | #define NETIF_F_GSO_SHIFT 16 |
@@ -1079,9 +1078,9 @@ struct net_device { | |||
1079 | 1078 | ||
1080 | /* Features valid for ethtool to change */ | 1079 | /* Features valid for ethtool to change */ |
1081 | /* = all defined minus driver/device-class-related */ | 1080 | /* = all defined minus driver/device-class-related */ |
1082 | #define NETIF_F_NEVER_CHANGE (NETIF_F_HIGHDMA | NETIF_F_VLAN_CHALLENGED | \ | 1081 | #define NETIF_F_NEVER_CHANGE (NETIF_F_VLAN_CHALLENGED | \ |
1083 | NETIF_F_LLTX | NETIF_F_NETNS_LOCAL) | 1082 | NETIF_F_LLTX | NETIF_F_NETNS_LOCAL) |
1084 | #define NETIF_F_ETHTOOL_BITS (0x3f3fffff & ~NETIF_F_NEVER_CHANGE) | 1083 | #define NETIF_F_ETHTOOL_BITS (0xff3fffff & ~NETIF_F_NEVER_CHANGE) |
1085 | 1084 | ||
1086 | /* List of features with software fallbacks. */ | 1085 | /* List of features with software fallbacks. */ |
1087 | #define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | \ | 1086 | #define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | \ |
@@ -1095,9 +1094,14 @@ struct net_device { | |||
1095 | 1094 | ||
1096 | #define NETIF_F_ALL_TSO (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_TSO_ECN) | 1095 | #define NETIF_F_ALL_TSO (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_TSO_ECN) |
1097 | 1096 | ||
1097 | #define NETIF_F_ALL_FCOE (NETIF_F_FCOE_CRC | NETIF_F_FCOE_MTU | \ | ||
1098 | NETIF_F_FSO) | ||
1099 | |||
1098 | #define NETIF_F_ALL_TX_OFFLOADS (NETIF_F_ALL_CSUM | NETIF_F_SG | \ | 1100 | #define NETIF_F_ALL_TX_OFFLOADS (NETIF_F_ALL_CSUM | NETIF_F_SG | \ |
1099 | NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \ | 1101 | NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \ |
1100 | NETIF_F_SCTP_CSUM | NETIF_F_FCOE_CRC) | 1102 | NETIF_F_HIGHDMA | \ |
1103 | NETIF_F_SCTP_CSUM | \ | ||
1104 | NETIF_F_ALL_FCOE) | ||
1101 | 1105 | ||
1102 | /* | 1106 | /* |
1103 | * If one device supports one of these features, then enable them | 1107 | * If one device supports one of these features, then enable them |
@@ -1105,7 +1109,12 @@ struct net_device { | |||
1105 | */ | 1109 | */ |
1106 | #define NETIF_F_ONE_FOR_ALL (NETIF_F_GSO_SOFTWARE | NETIF_F_GSO_ROBUST | \ | 1110 | #define NETIF_F_ONE_FOR_ALL (NETIF_F_GSO_SOFTWARE | NETIF_F_GSO_ROBUST | \ |
1107 | NETIF_F_SG | NETIF_F_HIGHDMA | \ | 1111 | NETIF_F_SG | NETIF_F_HIGHDMA | \ |
1108 | NETIF_F_FRAGLIST) | 1112 | NETIF_F_FRAGLIST | NETIF_F_VLAN_CHALLENGED) |
1113 | /* | ||
1114 | * If one device doesn't support one of these features, then disable it | ||
1115 | * for all in netdev_increment_features. | ||
1116 | */ | ||
1117 | #define NETIF_F_ALL_FOR_ALL (NETIF_F_NOCACHE_COPY | NETIF_F_FSO) | ||
1109 | 1118 | ||
1110 | /* changeable features with no special hardware requirements */ | 1119 | /* changeable features with no special hardware requirements */ |
1111 | #define NETIF_F_SOFT_FEATURES (NETIF_F_GSO | NETIF_F_GRO) | 1120 | #define NETIF_F_SOFT_FEATURES (NETIF_F_GSO | NETIF_F_GRO) |
@@ -1134,13 +1143,16 @@ struct net_device { | |||
1134 | const struct header_ops *header_ops; | 1143 | const struct header_ops *header_ops; |
1135 | 1144 | ||
1136 | unsigned int flags; /* interface flags (a la BSD) */ | 1145 | unsigned int flags; /* interface flags (a la BSD) */ |
1146 | unsigned int priv_flags; /* Like 'flags' but invisible to userspace. */ | ||
1137 | unsigned short gflags; | 1147 | unsigned short gflags; |
1138 | unsigned int priv_flags; /* Like 'flags' but invisible to userspace. */ | ||
1139 | unsigned short padded; /* How much padding added by alloc_netdev() */ | 1148 | unsigned short padded; /* How much padding added by alloc_netdev() */ |
1140 | 1149 | ||
1141 | unsigned char operstate; /* RFC2863 operstate */ | 1150 | unsigned char operstate; /* RFC2863 operstate */ |
1142 | unsigned char link_mode; /* mapping policy to operstate */ | 1151 | unsigned char link_mode; /* mapping policy to operstate */ |
1143 | 1152 | ||
1153 | unsigned char if_port; /* Selectable AUI, TP,..*/ | ||
1154 | unsigned char dma; /* DMA channel */ | ||
1155 | |||
1144 | unsigned int mtu; /* interface MTU value */ | 1156 | unsigned int mtu; /* interface MTU value */ |
1145 | unsigned short type; /* interface hardware type */ | 1157 | unsigned short type; /* interface hardware type */ |
1146 | unsigned short hard_header_len; /* hardware hdr length */ | 1158 | unsigned short hard_header_len; /* hardware hdr length */ |
@@ -1281,7 +1293,9 @@ struct net_device { | |||
1281 | NETREG_UNREGISTERED, /* completed unregister todo */ | 1293 | NETREG_UNREGISTERED, /* completed unregister todo */ |
1282 | NETREG_RELEASED, /* called free_netdev */ | 1294 | NETREG_RELEASED, /* called free_netdev */ |
1283 | NETREG_DUMMY, /* dummy device for NAPI poll */ | 1295 | NETREG_DUMMY, /* dummy device for NAPI poll */ |
1284 | } reg_state:16; | 1296 | } reg_state:8; |
1297 | |||
1298 | bool dismantle; /* device is going do be freed */ | ||
1285 | 1299 | ||
1286 | enum { | 1300 | enum { |
1287 | RTNL_LINK_INITIALIZED, | 1301 | RTNL_LINK_INITIALIZED, |
@@ -2513,6 +2527,7 @@ extern struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev, | |||
2513 | extern int netdev_max_backlog; | 2527 | extern int netdev_max_backlog; |
2514 | extern int netdev_tstamp_prequeue; | 2528 | extern int netdev_tstamp_prequeue; |
2515 | extern int weight_p; | 2529 | extern int weight_p; |
2530 | extern int bpf_jit_enable; | ||
2516 | extern int netdev_set_master(struct net_device *dev, struct net_device *master); | 2531 | extern int netdev_set_master(struct net_device *dev, struct net_device *master); |
2517 | extern int netdev_set_bond_master(struct net_device *dev, | 2532 | extern int netdev_set_bond_master(struct net_device *dev, |
2518 | struct net_device *master); | 2533 | struct net_device *master); |
@@ -2550,7 +2565,9 @@ static inline u32 netdev_get_wanted_features(struct net_device *dev) | |||
2550 | } | 2565 | } |
2551 | u32 netdev_increment_features(u32 all, u32 one, u32 mask); | 2566 | u32 netdev_increment_features(u32 all, u32 one, u32 mask); |
2552 | u32 netdev_fix_features(struct net_device *dev, u32 features); | 2567 | u32 netdev_fix_features(struct net_device *dev, u32 features); |
2568 | int __netdev_update_features(struct net_device *dev); | ||
2553 | void netdev_update_features(struct net_device *dev); | 2569 | void netdev_update_features(struct net_device *dev); |
2570 | void netdev_change_features(struct net_device *dev); | ||
2554 | 2571 | ||
2555 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, | 2572 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, |
2556 | struct net_device *dev); | 2573 | struct net_device *dev); |
@@ -2588,13 +2605,8 @@ static inline int netif_is_bond_slave(struct net_device *dev) | |||
2588 | 2605 | ||
2589 | extern struct pernet_operations __net_initdata loopback_net_ops; | 2606 | extern struct pernet_operations __net_initdata loopback_net_ops; |
2590 | 2607 | ||
2591 | static inline int dev_ethtool_get_settings(struct net_device *dev, | 2608 | int dev_ethtool_get_settings(struct net_device *dev, |
2592 | struct ethtool_cmd *cmd) | 2609 | struct ethtool_cmd *cmd); |
2593 | { | ||
2594 | if (!dev->ethtool_ops || !dev->ethtool_ops->get_settings) | ||
2595 | return -EOPNOTSUPP; | ||
2596 | return dev->ethtool_ops->get_settings(dev, cmd); | ||
2597 | } | ||
2598 | 2610 | ||
2599 | static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) | 2611 | static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) |
2600 | { | 2612 | { |
diff --git a/include/linux/netfilter/ipset/ip_set_getport.h b/include/linux/netfilter/ipset/ip_set_getport.h index 5aebd170f899..90d09300e954 100644 --- a/include/linux/netfilter/ipset/ip_set_getport.h +++ b/include/linux/netfilter/ipset/ip_set_getport.h | |||
@@ -22,7 +22,9 @@ static inline bool ip_set_proto_with_ports(u8 proto) | |||
22 | { | 22 | { |
23 | switch (proto) { | 23 | switch (proto) { |
24 | case IPPROTO_TCP: | 24 | case IPPROTO_TCP: |
25 | case IPPROTO_SCTP: | ||
25 | case IPPROTO_UDP: | 26 | case IPPROTO_UDP: |
27 | case IPPROTO_UDPLITE: | ||
26 | return true; | 28 | return true; |
27 | } | 29 | } |
28 | return false; | 30 | return false; |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 37219525ff6f..32cddf78b13e 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -456,72 +456,60 @@ extern void xt_proto_fini(struct net *net, u_int8_t af); | |||
456 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); | 456 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); |
457 | extern void xt_free_table_info(struct xt_table_info *info); | 457 | extern void xt_free_table_info(struct xt_table_info *info); |
458 | 458 | ||
459 | /* | 459 | /** |
460 | * Per-CPU spinlock associated with per-cpu table entries, and | 460 | * xt_recseq - recursive seqcount for netfilter use |
461 | * with a counter for the "reading" side that allows a recursive | 461 | * |
462 | * reader to avoid taking the lock and deadlocking. | 462 | * Packet processing changes the seqcount only if no recursion happened |
463 | * | 463 | * get_counters() can use read_seqcount_begin()/read_seqcount_retry(), |
464 | * "reading" is used by ip/arp/ip6 tables rule processing which runs per-cpu. | 464 | * because we use the normal seqcount convention : |
465 | * It needs to ensure that the rules are not being changed while the packet | 465 | * Low order bit set to 1 if a writer is active. |
466 | * is being processed. In some cases, the read lock will be acquired | ||
467 | * twice on the same CPU; this is okay because of the count. | ||
468 | * | ||
469 | * "writing" is used when reading counters. | ||
470 | * During replace any readers that are using the old tables have to complete | ||
471 | * before freeing the old table. This is handled by the write locking | ||
472 | * necessary for reading the counters. | ||
473 | */ | 466 | */ |
474 | struct xt_info_lock { | 467 | DECLARE_PER_CPU(seqcount_t, xt_recseq); |
475 | seqlock_t lock; | ||
476 | unsigned char readers; | ||
477 | }; | ||
478 | DECLARE_PER_CPU(struct xt_info_lock, xt_info_locks); | ||
479 | 468 | ||
480 | /* | 469 | /** |
481 | * Note: we need to ensure that preemption is disabled before acquiring | 470 | * xt_write_recseq_begin - start of a write section |
482 | * the per-cpu-variable, so we do it as a two step process rather than | ||
483 | * using "spin_lock_bh()". | ||
484 | * | ||
485 | * We _also_ need to disable bottom half processing before updating our | ||
486 | * nesting count, to make sure that the only kind of re-entrancy is this | ||
487 | * code being called by itself: since the count+lock is not an atomic | ||
488 | * operation, we can allow no races. | ||
489 | * | 471 | * |
490 | * _Only_ that special combination of being per-cpu and never getting | 472 | * Begin packet processing : all readers must wait the end |
491 | * re-entered asynchronously means that the count is safe. | 473 | * 1) Must be called with preemption disabled |
474 | * 2) softirqs must be disabled too (or we should use irqsafe_cpu_add()) | ||
475 | * Returns : | ||
476 | * 1 if no recursion on this cpu | ||
477 | * 0 if recursion detected | ||
492 | */ | 478 | */ |
493 | static inline void xt_info_rdlock_bh(void) | 479 | static inline unsigned int xt_write_recseq_begin(void) |
494 | { | 480 | { |
495 | struct xt_info_lock *lock; | 481 | unsigned int addend; |
496 | 482 | ||
497 | local_bh_disable(); | 483 | /* |
498 | lock = &__get_cpu_var(xt_info_locks); | 484 | * Low order bit of sequence is set if we already |
499 | if (likely(!lock->readers++)) | 485 | * called xt_write_recseq_begin(). |
500 | write_seqlock(&lock->lock); | 486 | */ |
501 | } | 487 | addend = (__this_cpu_read(xt_recseq.sequence) + 1) & 1; |
502 | 488 | ||
503 | static inline void xt_info_rdunlock_bh(void) | 489 | /* |
504 | { | 490 | * This is kind of a write_seqcount_begin(), but addend is 0 or 1 |
505 | struct xt_info_lock *lock = &__get_cpu_var(xt_info_locks); | 491 | * We dont check addend value to avoid a test and conditional jump, |
492 | * since addend is most likely 1 | ||
493 | */ | ||
494 | __this_cpu_add(xt_recseq.sequence, addend); | ||
495 | smp_wmb(); | ||
506 | 496 | ||
507 | if (likely(!--lock->readers)) | 497 | return addend; |
508 | write_sequnlock(&lock->lock); | ||
509 | local_bh_enable(); | ||
510 | } | 498 | } |
511 | 499 | ||
512 | /* | 500 | /** |
513 | * The "writer" side needs to get exclusive access to the lock, | 501 | * xt_write_recseq_end - end of a write section |
514 | * regardless of readers. This must be called with bottom half | 502 | * @addend: return value from previous xt_write_recseq_begin() |
515 | * processing (and thus also preemption) disabled. | 503 | * |
504 | * End packet processing : all readers can proceed | ||
505 | * 1) Must be called with preemption disabled | ||
506 | * 2) softirqs must be disabled too (or we should use irqsafe_cpu_add()) | ||
516 | */ | 507 | */ |
517 | static inline void xt_info_wrlock(unsigned int cpu) | 508 | static inline void xt_write_recseq_end(unsigned int addend) |
518 | { | ||
519 | write_seqlock(&per_cpu(xt_info_locks, cpu).lock); | ||
520 | } | ||
521 | |||
522 | static inline void xt_info_wrunlock(unsigned int cpu) | ||
523 | { | 509 | { |
524 | write_sequnlock(&per_cpu(xt_info_locks, cpu).lock); | 510 | /* this is kind of a write_seqcount_end(), but addend is 0 or 1 */ |
511 | smp_wmb(); | ||
512 | __this_cpu_add(xt_recseq.sequence, addend); | ||
525 | } | 513 | } |
526 | 514 | ||
527 | /* | 515 | /* |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 890dce242639..7e371f7df9c4 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -233,6 +233,7 @@ struct nfs4_layoutget { | |||
233 | struct nfs4_layoutget_args args; | 233 | struct nfs4_layoutget_args args; |
234 | struct nfs4_layoutget_res res; | 234 | struct nfs4_layoutget_res res; |
235 | struct pnfs_layout_segment **lsegpp; | 235 | struct pnfs_layout_segment **lsegpp; |
236 | gfp_t gfp_flags; | ||
236 | }; | 237 | }; |
237 | 238 | ||
238 | struct nfs4_getdeviceinfo_args { | 239 | struct nfs4_getdeviceinfo_args { |
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h index 8768c469e93e..7454ad7451b4 100644 --- a/include/linux/nilfs2_fs.h +++ b/include/linux/nilfs2_fs.h | |||
@@ -107,7 +107,7 @@ struct nilfs_super_root { | |||
107 | #define NILFS_SR_DAT_OFFSET(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 0) | 107 | #define NILFS_SR_DAT_OFFSET(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 0) |
108 | #define NILFS_SR_CPFILE_OFFSET(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 1) | 108 | #define NILFS_SR_CPFILE_OFFSET(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 1) |
109 | #define NILFS_SR_SUFILE_OFFSET(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 2) | 109 | #define NILFS_SR_SUFILE_OFFSET(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 2) |
110 | #define NILFS_SR_BYTES (sizeof(struct nilfs_super_root)) | 110 | #define NILFS_SR_BYTES(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 3) |
111 | 111 | ||
112 | /* | 112 | /* |
113 | * Maximal mount counts | 113 | * Maximal mount counts |
@@ -845,5 +845,7 @@ struct nilfs_bdesc { | |||
845 | _IOR(NILFS_IOCTL_IDENT, 0x8A, __u64) | 845 | _IOR(NILFS_IOCTL_IDENT, 0x8A, __u64) |
846 | #define NILFS_IOCTL_RESIZE \ | 846 | #define NILFS_IOCTL_RESIZE \ |
847 | _IOW(NILFS_IOCTL_IDENT, 0x8B, __u64) | 847 | _IOW(NILFS_IOCTL_IDENT, 0x8B, __u64) |
848 | #define NILFS_IOCTL_SET_ALLOC_RANGE \ | ||
849 | _IOW(NILFS_IOCTL_IDENT, 0x8C, __u64[2]) | ||
848 | 850 | ||
849 | #endif /* _LINUX_NILFS_FS_H */ | 851 | #endif /* _LINUX_NILFS_FS_H */ |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index bbfa1093f606..c7ccaae15af6 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -77,6 +77,39 @@ | |||
77 | */ | 77 | */ |
78 | 78 | ||
79 | /** | 79 | /** |
80 | * DOC: Virtual interface / concurrency capabilities | ||
81 | * | ||
82 | * Some devices are able to operate with virtual MACs, they can have | ||
83 | * more than one virtual interface. The capability handling for this | ||
84 | * is a bit complex though, as there may be a number of restrictions | ||
85 | * on the types of concurrency that are supported. | ||
86 | * | ||
87 | * To start with, each device supports the interface types listed in | ||
88 | * the %NL80211_ATTR_SUPPORTED_IFTYPES attribute, but by listing the | ||
89 | * types there no concurrency is implied. | ||
90 | * | ||
91 | * Once concurrency is desired, more attributes must be observed: | ||
92 | * To start with, since some interface types are purely managed in | ||
93 | * software, like the AP-VLAN type in mac80211 for example, there's | ||
94 | * an additional list of these, they can be added at any time and | ||
95 | * are only restricted by some semantic restrictions (e.g. AP-VLAN | ||
96 | * cannot be added without a corresponding AP interface). This list | ||
97 | * is exported in the %NL80211_ATTR_SOFTWARE_IFTYPES attribute. | ||
98 | * | ||
99 | * Further, the list of supported combinations is exported. This is | ||
100 | * in the %NL80211_ATTR_INTERFACE_COMBINATIONS attribute. Basically, | ||
101 | * it exports a list of "groups", and at any point in time the | ||
102 | * interfaces that are currently active must fall into any one of | ||
103 | * the advertised groups. Within each group, there are restrictions | ||
104 | * on the number of interfaces of different types that are supported | ||
105 | * and also the number of different channels, along with potentially | ||
106 | * some other restrictions. See &enum nl80211_if_combination_attrs. | ||
107 | * | ||
108 | * All together, these attributes define the concurrency of virtual | ||
109 | * interfaces that a given device supports. | ||
110 | */ | ||
111 | |||
112 | /** | ||
80 | * enum nl80211_commands - supported nl80211 commands | 113 | * enum nl80211_commands - supported nl80211 commands |
81 | * | 114 | * |
82 | * @NL80211_CMD_UNSPEC: unspecified command to catch errors | 115 | * @NL80211_CMD_UNSPEC: unspecified command to catch errors |
@@ -203,6 +236,28 @@ | |||
203 | * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons, | 236 | * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons, |
204 | * partial scan results may be available | 237 | * partial scan results may be available |
205 | * | 238 | * |
239 | * @NL80211_CMD_START_SCHED_SCAN: start a scheduled scan at certain | ||
240 | * intervals, as specified by %NL80211_ATTR_SCHED_SCAN_INTERVAL. | ||
241 | * Like with normal scans, if SSIDs (%NL80211_ATTR_SCAN_SSIDS) | ||
242 | * are passed, they are used in the probe requests. For | ||
243 | * broadcast, a broadcast SSID must be passed (ie. an empty | ||
244 | * string). If no SSID is passed, no probe requests are sent and | ||
245 | * a passive scan is performed. %NL80211_ATTR_SCAN_FREQUENCIES, | ||
246 | * if passed, define which channels should be scanned; if not | ||
247 | * passed, all channels allowed for the current regulatory domain | ||
248 | * are used. Extra IEs can also be passed from the userspace by | ||
249 | * using the %NL80211_ATTR_IE attribute. | ||
250 | * @NL80211_CMD_STOP_SCHED_SCAN: stop a scheduled scan | ||
251 | * @NL80211_CMD_SCHED_SCAN_RESULTS: indicates that there are scheduled scan | ||
252 | * results available. | ||
253 | * @NL80211_CMD_SCHED_SCAN_STOPPED: indicates that the scheduled scan has | ||
254 | * stopped. The driver may issue this event at any time during a | ||
255 | * scheduled scan. One reason for stopping the scan is if the hardware | ||
256 | * does not support starting an association or a normal scan while running | ||
257 | * a scheduled scan. This event is also sent when the | ||
258 | * %NL80211_CMD_STOP_SCHED_SCAN command is received or when the interface | ||
259 | * is brought down while a scheduled scan was running. | ||
260 | * | ||
206 | * @NL80211_CMD_GET_SURVEY: get survey resuls, e.g. channel occupation | 261 | * @NL80211_CMD_GET_SURVEY: get survey resuls, e.g. channel occupation |
207 | * or noise level | 262 | * or noise level |
208 | * @NL80211_CMD_NEW_SURVEY_RESULTS: survey data notification (as a reply to | 263 | * @NL80211_CMD_NEW_SURVEY_RESULTS: survey data notification (as a reply to |
@@ -410,6 +465,24 @@ | |||
410 | * notification. This event is used to indicate that an unprotected | 465 | * notification. This event is used to indicate that an unprotected |
411 | * disassociation frame was dropped when MFP is in use. | 466 | * disassociation frame was dropped when MFP is in use. |
412 | * | 467 | * |
468 | * @NL80211_CMD_NEW_PEER_CANDIDATE: Notification on the reception of a | ||
469 | * beacon or probe response from a compatible mesh peer. This is only | ||
470 | * sent while no station information (sta_info) exists for the new peer | ||
471 | * candidate and when @NL80211_MESH_SETUP_USERSPACE_AUTH is set. On | ||
472 | * reception of this notification, userspace may decide to create a new | ||
473 | * station (@NL80211_CMD_NEW_STATION). To stop this notification from | ||
474 | * reoccurring, the userspace authentication daemon may want to create the | ||
475 | * new station with the AUTHENTICATED flag unset and maybe change it later | ||
476 | * depending on the authentication result. | ||
477 | * | ||
478 | * @NL80211_CMD_GET_WOWLAN: get Wake-on-Wireless-LAN (WoWLAN) settings. | ||
479 | * @NL80211_CMD_SET_WOWLAN: set Wake-on-Wireless-LAN (WoWLAN) settings. | ||
480 | * Since wireless is more complex than wired ethernet, it supports | ||
481 | * various triggers. These triggers can be configured through this | ||
482 | * command with the %NL80211_ATTR_WOWLAN_TRIGGERS attribute. For | ||
483 | * more background information, see | ||
484 | * http://wireless.kernel.org/en/users/Documentation/WoWLAN. | ||
485 | * | ||
413 | * @NL80211_CMD_MAX: highest used command number | 486 | * @NL80211_CMD_MAX: highest used command number |
414 | * @__NL80211_CMD_AFTER_LAST: internal use | 487 | * @__NL80211_CMD_AFTER_LAST: internal use |
415 | */ | 488 | */ |
@@ -522,6 +595,16 @@ enum nl80211_commands { | |||
522 | NL80211_CMD_UNPROT_DEAUTHENTICATE, | 595 | NL80211_CMD_UNPROT_DEAUTHENTICATE, |
523 | NL80211_CMD_UNPROT_DISASSOCIATE, | 596 | NL80211_CMD_UNPROT_DISASSOCIATE, |
524 | 597 | ||
598 | NL80211_CMD_NEW_PEER_CANDIDATE, | ||
599 | |||
600 | NL80211_CMD_GET_WOWLAN, | ||
601 | NL80211_CMD_SET_WOWLAN, | ||
602 | |||
603 | NL80211_CMD_START_SCHED_SCAN, | ||
604 | NL80211_CMD_STOP_SCHED_SCAN, | ||
605 | NL80211_CMD_SCHED_SCAN_RESULTS, | ||
606 | NL80211_CMD_SCHED_SCAN_STOPPED, | ||
607 | |||
525 | /* add new commands above here */ | 608 | /* add new commands above here */ |
526 | 609 | ||
527 | /* used to define NL80211_CMD_MAX below */ | 610 | /* used to define NL80211_CMD_MAX below */ |
@@ -545,6 +628,7 @@ enum nl80211_commands { | |||
545 | /* source-level API compatibility */ | 628 | /* source-level API compatibility */ |
546 | #define NL80211_CMD_GET_MESH_PARAMS NL80211_CMD_GET_MESH_CONFIG | 629 | #define NL80211_CMD_GET_MESH_PARAMS NL80211_CMD_GET_MESH_CONFIG |
547 | #define NL80211_CMD_SET_MESH_PARAMS NL80211_CMD_SET_MESH_CONFIG | 630 | #define NL80211_CMD_SET_MESH_PARAMS NL80211_CMD_SET_MESH_CONFIG |
631 | #define NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE NL80211_MESH_SETUP_IE | ||
548 | 632 | ||
549 | /** | 633 | /** |
550 | * enum nl80211_attrs - nl80211 netlink attributes | 634 | * enum nl80211_attrs - nl80211 netlink attributes |
@@ -886,6 +970,31 @@ enum nl80211_commands { | |||
886 | * changed once the mesh is active. | 970 | * changed once the mesh is active. |
887 | * @NL80211_ATTR_MESH_CONFIG: Mesh configuration parameters, a nested attribute | 971 | * @NL80211_ATTR_MESH_CONFIG: Mesh configuration parameters, a nested attribute |
888 | * containing attributes from &enum nl80211_meshconf_params. | 972 | * containing attributes from &enum nl80211_meshconf_params. |
973 | * @NL80211_ATTR_SUPPORT_MESH_AUTH: Currently, this means the underlying driver | ||
974 | * allows auth frames in a mesh to be passed to userspace for processing via | ||
975 | * the @NL80211_MESH_SETUP_USERSPACE_AUTH flag. | ||
976 | * @NL80211_ATTR_STA_PLINK_STATE: The state of a mesh peer link as | ||
977 | * defined in &enum nl80211_plink_state. Used when userspace is | ||
978 | * driving the peer link management state machine. | ||
979 | * @NL80211_MESH_SETUP_USERSPACE_AMPE must be enabled. | ||
980 | * | ||
981 | * @NL80211_ATTR_WOWLAN_SUPPORTED: indicates, as part of the wiphy capabilities, | ||
982 | * the supported WoWLAN triggers | ||
983 | * @NL80211_ATTR_WOWLAN_TRIGGERS: used by %NL80211_CMD_SET_WOWLAN to | ||
984 | * indicate which WoW triggers should be enabled. This is also | ||
985 | * used by %NL80211_CMD_GET_WOWLAN to get the currently enabled WoWLAN | ||
986 | * triggers. | ||
987 | |||
988 | * @NL80211_ATTR_SCHED_SCAN_INTERVAL: Interval between scheduled scan | ||
989 | * cycles, in msecs. | ||
990 | * | ||
991 | * @NL80211_ATTR_INTERFACE_COMBINATIONS: Nested attribute listing the supported | ||
992 | * interface combinations. In each nested item, it contains attributes | ||
993 | * defined in &enum nl80211_if_combination_attrs. | ||
994 | * @NL80211_ATTR_SOFTWARE_IFTYPES: Nested attribute (just like | ||
995 | * %NL80211_ATTR_SUPPORTED_IFTYPES) containing the interface types that | ||
996 | * are managed in software: interfaces of these types aren't subject to | ||
997 | * any restrictions in their number or combinations. | ||
889 | * | 998 | * |
890 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 999 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
891 | * @__NL80211_ATTR_AFTER_LAST: internal use | 1000 | * @__NL80211_ATTR_AFTER_LAST: internal use |
@@ -1074,6 +1183,17 @@ enum nl80211_attrs { | |||
1074 | NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX, | 1183 | NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX, |
1075 | NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX, | 1184 | NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX, |
1076 | 1185 | ||
1186 | NL80211_ATTR_SUPPORT_MESH_AUTH, | ||
1187 | NL80211_ATTR_STA_PLINK_STATE, | ||
1188 | |||
1189 | NL80211_ATTR_WOWLAN_TRIGGERS, | ||
1190 | NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, | ||
1191 | |||
1192 | NL80211_ATTR_SCHED_SCAN_INTERVAL, | ||
1193 | |||
1194 | NL80211_ATTR_INTERFACE_COMBINATIONS, | ||
1195 | NL80211_ATTR_SOFTWARE_IFTYPES, | ||
1196 | |||
1077 | /* add attributes here, update the policy in nl80211.c */ | 1197 | /* add attributes here, update the policy in nl80211.c */ |
1078 | 1198 | ||
1079 | __NL80211_ATTR_AFTER_LAST, | 1199 | __NL80211_ATTR_AFTER_LAST, |
@@ -1126,7 +1246,9 @@ enum nl80211_attrs { | |||
1126 | * @NL80211_IFTYPE_ADHOC: independent BSS member | 1246 | * @NL80211_IFTYPE_ADHOC: independent BSS member |
1127 | * @NL80211_IFTYPE_STATION: managed BSS member | 1247 | * @NL80211_IFTYPE_STATION: managed BSS member |
1128 | * @NL80211_IFTYPE_AP: access point | 1248 | * @NL80211_IFTYPE_AP: access point |
1129 | * @NL80211_IFTYPE_AP_VLAN: VLAN interface for access points | 1249 | * @NL80211_IFTYPE_AP_VLAN: VLAN interface for access points; VLAN interfaces |
1250 | * are a bit special in that they must always be tied to a pre-existing | ||
1251 | * AP type interface. | ||
1130 | * @NL80211_IFTYPE_WDS: wireless distribution interface | 1252 | * @NL80211_IFTYPE_WDS: wireless distribution interface |
1131 | * @NL80211_IFTYPE_MONITOR: monitor interface receiving all frames | 1253 | * @NL80211_IFTYPE_MONITOR: monitor interface receiving all frames |
1132 | * @NL80211_IFTYPE_MESH_POINT: mesh point | 1254 | * @NL80211_IFTYPE_MESH_POINT: mesh point |
@@ -1168,6 +1290,7 @@ enum nl80211_iftype { | |||
1168 | * with short barker preamble | 1290 | * with short barker preamble |
1169 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable | 1291 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable |
1170 | * @NL80211_STA_FLAG_MFP: station uses management frame protection | 1292 | * @NL80211_STA_FLAG_MFP: station uses management frame protection |
1293 | * @NL80211_STA_FLAG_AUTHENTICATED: station is authenticated | ||
1171 | * @NL80211_STA_FLAG_MAX: highest station flag number currently defined | 1294 | * @NL80211_STA_FLAG_MAX: highest station flag number currently defined |
1172 | * @__NL80211_STA_FLAG_AFTER_LAST: internal use | 1295 | * @__NL80211_STA_FLAG_AFTER_LAST: internal use |
1173 | */ | 1296 | */ |
@@ -1177,6 +1300,7 @@ enum nl80211_sta_flags { | |||
1177 | NL80211_STA_FLAG_SHORT_PREAMBLE, | 1300 | NL80211_STA_FLAG_SHORT_PREAMBLE, |
1178 | NL80211_STA_FLAG_WME, | 1301 | NL80211_STA_FLAG_WME, |
1179 | NL80211_STA_FLAG_MFP, | 1302 | NL80211_STA_FLAG_MFP, |
1303 | NL80211_STA_FLAG_AUTHENTICATED, | ||
1180 | 1304 | ||
1181 | /* keep last */ | 1305 | /* keep last */ |
1182 | __NL80211_STA_FLAG_AFTER_LAST, | 1306 | __NL80211_STA_FLAG_AFTER_LAST, |
@@ -1222,6 +1346,36 @@ enum nl80211_rate_info { | |||
1222 | }; | 1346 | }; |
1223 | 1347 | ||
1224 | /** | 1348 | /** |
1349 | * enum nl80211_sta_bss_param - BSS information collected by STA | ||
1350 | * | ||
1351 | * These attribute types are used with %NL80211_STA_INFO_BSS_PARAM | ||
1352 | * when getting information about the bitrate of a station. | ||
1353 | * | ||
1354 | * @__NL80211_STA_BSS_PARAM_INVALID: attribute number 0 is reserved | ||
1355 | * @NL80211_STA_BSS_PARAM_CTS_PROT: whether CTS protection is enabled (flag) | ||
1356 | * @NL80211_STA_BSS_PARAM_SHORT_PREAMBLE: whether short preamble is enabled | ||
1357 | * (flag) | ||
1358 | * @NL80211_STA_BSS_PARAM_SHORT_SLOT_TIME: whether short slot time is enabled | ||
1359 | * (flag) | ||
1360 | * @NL80211_STA_BSS_PARAM_DTIM_PERIOD: DTIM period for beaconing (u8) | ||
1361 | * @NL80211_STA_BSS_PARAM_BEACON_INTERVAL: Beacon interval (u16) | ||
1362 | * @NL80211_STA_BSS_PARAM_MAX: highest sta_bss_param number currently defined | ||
1363 | * @__NL80211_STA_BSS_PARAM_AFTER_LAST: internal use | ||
1364 | */ | ||
1365 | enum nl80211_sta_bss_param { | ||
1366 | __NL80211_STA_BSS_PARAM_INVALID, | ||
1367 | NL80211_STA_BSS_PARAM_CTS_PROT, | ||
1368 | NL80211_STA_BSS_PARAM_SHORT_PREAMBLE, | ||
1369 | NL80211_STA_BSS_PARAM_SHORT_SLOT_TIME, | ||
1370 | NL80211_STA_BSS_PARAM_DTIM_PERIOD, | ||
1371 | NL80211_STA_BSS_PARAM_BEACON_INTERVAL, | ||
1372 | |||
1373 | /* keep last */ | ||
1374 | __NL80211_STA_BSS_PARAM_AFTER_LAST, | ||
1375 | NL80211_STA_BSS_PARAM_MAX = __NL80211_STA_BSS_PARAM_AFTER_LAST - 1 | ||
1376 | }; | ||
1377 | |||
1378 | /** | ||
1225 | * enum nl80211_sta_info - station information | 1379 | * enum nl80211_sta_info - station information |
1226 | * | 1380 | * |
1227 | * These attribute types are used with %NL80211_ATTR_STA_INFO | 1381 | * These attribute types are used with %NL80211_ATTR_STA_INFO |
@@ -1233,7 +1387,7 @@ enum nl80211_rate_info { | |||
1233 | * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station) | 1387 | * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station) |
1234 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) | 1388 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) |
1235 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute | 1389 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute |
1236 | * containing info as possible, see &enum nl80211_sta_info_txrate. | 1390 | * containing info as possible, see &enum nl80211_rate_info |
1237 | * @NL80211_STA_INFO_RX_PACKETS: total received packet (u32, from this station) | 1391 | * @NL80211_STA_INFO_RX_PACKETS: total received packet (u32, from this station) |
1238 | * @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (u32, to this | 1392 | * @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (u32, to this |
1239 | * station) | 1393 | * station) |
@@ -1243,8 +1397,12 @@ enum nl80211_rate_info { | |||
1243 | * @NL80211_STA_INFO_LLID: the station's mesh LLID | 1397 | * @NL80211_STA_INFO_LLID: the station's mesh LLID |
1244 | * @NL80211_STA_INFO_PLID: the station's mesh PLID | 1398 | * @NL80211_STA_INFO_PLID: the station's mesh PLID |
1245 | * @NL80211_STA_INFO_PLINK_STATE: peer link state for the station | 1399 | * @NL80211_STA_INFO_PLINK_STATE: peer link state for the station |
1400 | * (see %enum nl80211_plink_state) | ||
1246 | * @NL80211_STA_INFO_RX_BITRATE: last unicast data frame rx rate, nested | 1401 | * @NL80211_STA_INFO_RX_BITRATE: last unicast data frame rx rate, nested |
1247 | * attribute, like NL80211_STA_INFO_TX_BITRATE. | 1402 | * attribute, like NL80211_STA_INFO_TX_BITRATE. |
1403 | * @NL80211_STA_INFO_BSS_PARAM: current station's view of BSS, nested attribute | ||
1404 | * containing info as possible, see &enum nl80211_sta_bss_param | ||
1405 | * @NL80211_STA_INFO_CONNECTED_TIME: time since the station is last connected | ||
1248 | * @__NL80211_STA_INFO_AFTER_LAST: internal | 1406 | * @__NL80211_STA_INFO_AFTER_LAST: internal |
1249 | * @NL80211_STA_INFO_MAX: highest possible station info attribute | 1407 | * @NL80211_STA_INFO_MAX: highest possible station info attribute |
1250 | */ | 1408 | */ |
@@ -1264,6 +1422,8 @@ enum nl80211_sta_info { | |||
1264 | NL80211_STA_INFO_TX_FAILED, | 1422 | NL80211_STA_INFO_TX_FAILED, |
1265 | NL80211_STA_INFO_SIGNAL_AVG, | 1423 | NL80211_STA_INFO_SIGNAL_AVG, |
1266 | NL80211_STA_INFO_RX_BITRATE, | 1424 | NL80211_STA_INFO_RX_BITRATE, |
1425 | NL80211_STA_INFO_BSS_PARAM, | ||
1426 | NL80211_STA_INFO_CONNECTED_TIME, | ||
1267 | 1427 | ||
1268 | /* keep last */ | 1428 | /* keep last */ |
1269 | __NL80211_STA_INFO_AFTER_LAST, | 1429 | __NL80211_STA_INFO_AFTER_LAST, |
@@ -1686,9 +1846,21 @@ enum nl80211_meshconf_params { | |||
1686 | * vendor specific path metric or disable it to use the default Airtime | 1846 | * vendor specific path metric or disable it to use the default Airtime |
1687 | * metric. | 1847 | * metric. |
1688 | * | 1848 | * |
1689 | * @NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE: A vendor specific information | 1849 | * @NL80211_MESH_SETUP_IE: Information elements for this mesh, for instance, a |
1690 | * element that vendors will use to identify the path selection methods and | 1850 | * robust security network ie, or a vendor specific information element that |
1691 | * metrics in use. | 1851 | * vendors will use to identify the path selection methods and metrics in use. |
1852 | * | ||
1853 | * @NL80211_MESH_SETUP_USERSPACE_AUTH: Enable this option if an authentication | ||
1854 | * daemon will be authenticating mesh candidates. | ||
1855 | * | ||
1856 | * @NL80211_MESH_SETUP_USERSPACE_AMPE: Enable this option if an authentication | ||
1857 | * daemon will be securing peer link frames. AMPE is a secured version of Mesh | ||
1858 | * Peering Management (MPM) and is implemented with the assistance of a | ||
1859 | * userspace daemon. When this flag is set, the kernel will send peer | ||
1860 | * management frames to a userspace daemon that will implement AMPE | ||
1861 | * functionality (security capabilities selection, key confirmation, and key | ||
1862 | * management). When the flag is unset (default), the kernel can autonomously | ||
1863 | * complete (unsecured) mesh peering without the need of a userspace daemon. | ||
1692 | * | 1864 | * |
1693 | * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number | 1865 | * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number |
1694 | * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use | 1866 | * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use |
@@ -1697,7 +1869,9 @@ enum nl80211_mesh_setup_params { | |||
1697 | __NL80211_MESH_SETUP_INVALID, | 1869 | __NL80211_MESH_SETUP_INVALID, |
1698 | NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL, | 1870 | NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL, |
1699 | NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC, | 1871 | NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC, |
1700 | NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE, | 1872 | NL80211_MESH_SETUP_IE, |
1873 | NL80211_MESH_SETUP_USERSPACE_AUTH, | ||
1874 | NL80211_MESH_SETUP_USERSPACE_AMPE, | ||
1701 | 1875 | ||
1702 | /* keep last */ | 1876 | /* keep last */ |
1703 | __NL80211_MESH_SETUP_ATTR_AFTER_LAST, | 1877 | __NL80211_MESH_SETUP_ATTR_AFTER_LAST, |
@@ -2002,4 +2176,189 @@ enum nl80211_tx_power_setting { | |||
2002 | NL80211_TX_POWER_FIXED, | 2176 | NL80211_TX_POWER_FIXED, |
2003 | }; | 2177 | }; |
2004 | 2178 | ||
2179 | /** | ||
2180 | * enum nl80211_wowlan_packet_pattern_attr - WoWLAN packet pattern attribute | ||
2181 | * @__NL80211_WOWLAN_PKTPAT_INVALID: invalid number for nested attribute | ||
2182 | * @NL80211_WOWLAN_PKTPAT_PATTERN: the pattern, values where the mask has | ||
2183 | * a zero bit are ignored | ||
2184 | * @NL80211_WOWLAN_PKTPAT_MASK: pattern mask, must be long enough to have | ||
2185 | * a bit for each byte in the pattern. The lowest-order bit corresponds | ||
2186 | * to the first byte of the pattern, but the bytes of the pattern are | ||
2187 | * in a little-endian-like format, i.e. the 9th byte of the pattern | ||
2188 | * corresponds to the lowest-order bit in the second byte of the mask. | ||
2189 | * For example: The match 00:xx:00:00:xx:00:00:00:00:xx:xx:xx (where | ||
2190 | * xx indicates "don't care") would be represented by a pattern of | ||
2191 | * twelve zero bytes, and a mask of "0xed,0x07". | ||
2192 | * Note that the pattern matching is done as though frames were not | ||
2193 | * 802.11 frames but 802.3 frames, i.e. the frame is fully unpacked | ||
2194 | * first (including SNAP header unpacking) and then matched. | ||
2195 | * @NUM_NL80211_WOWLAN_PKTPAT: number of attributes | ||
2196 | * @MAX_NL80211_WOWLAN_PKTPAT: max attribute number | ||
2197 | */ | ||
2198 | enum nl80211_wowlan_packet_pattern_attr { | ||
2199 | __NL80211_WOWLAN_PKTPAT_INVALID, | ||
2200 | NL80211_WOWLAN_PKTPAT_MASK, | ||
2201 | NL80211_WOWLAN_PKTPAT_PATTERN, | ||
2202 | |||
2203 | NUM_NL80211_WOWLAN_PKTPAT, | ||
2204 | MAX_NL80211_WOWLAN_PKTPAT = NUM_NL80211_WOWLAN_PKTPAT - 1, | ||
2205 | }; | ||
2206 | |||
2207 | /** | ||
2208 | * struct nl80211_wowlan_pattern_support - pattern support information | ||
2209 | * @max_patterns: maximum number of patterns supported | ||
2210 | * @min_pattern_len: minimum length of each pattern | ||
2211 | * @max_pattern_len: maximum length of each pattern | ||
2212 | * | ||
2213 | * This struct is carried in %NL80211_WOWLAN_TRIG_PKT_PATTERN when | ||
2214 | * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED in the | ||
2215 | * capability information given by the kernel to userspace. | ||
2216 | */ | ||
2217 | struct nl80211_wowlan_pattern_support { | ||
2218 | __u32 max_patterns; | ||
2219 | __u32 min_pattern_len; | ||
2220 | __u32 max_pattern_len; | ||
2221 | } __attribute__((packed)); | ||
2222 | |||
2223 | /** | ||
2224 | * enum nl80211_wowlan_triggers - WoWLAN trigger definitions | ||
2225 | * @__NL80211_WOWLAN_TRIG_INVALID: invalid number for nested attributes | ||
2226 | * @NL80211_WOWLAN_TRIG_ANY: wake up on any activity, do not really put | ||
2227 | * the chip into a special state -- works best with chips that have | ||
2228 | * support for low-power operation already (flag) | ||
2229 | * @NL80211_WOWLAN_TRIG_DISCONNECT: wake up on disconnect, the way disconnect | ||
2230 | * is detected is implementation-specific (flag) | ||
2231 | * @NL80211_WOWLAN_TRIG_MAGIC_PKT: wake up on magic packet (6x 0xff, followed | ||
2232 | * by 16 repetitions of MAC addr, anywhere in payload) (flag) | ||
2233 | * @NL80211_WOWLAN_TRIG_PKT_PATTERN: wake up on the specified packet patterns | ||
2234 | * which are passed in an array of nested attributes, each nested attribute | ||
2235 | * defining a with attributes from &struct nl80211_wowlan_trig_pkt_pattern. | ||
2236 | * Each pattern defines a wakeup packet. The matching is done on the MSDU, | ||
2237 | * i.e. as though the packet was an 802.3 packet, so the pattern matching | ||
2238 | * is done after the packet is converted to the MSDU. | ||
2239 | * | ||
2240 | * In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute | ||
2241 | * carrying a &struct nl80211_wowlan_pattern_support. | ||
2242 | * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers | ||
2243 | * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number | ||
2244 | */ | ||
2245 | enum nl80211_wowlan_triggers { | ||
2246 | __NL80211_WOWLAN_TRIG_INVALID, | ||
2247 | NL80211_WOWLAN_TRIG_ANY, | ||
2248 | NL80211_WOWLAN_TRIG_DISCONNECT, | ||
2249 | NL80211_WOWLAN_TRIG_MAGIC_PKT, | ||
2250 | NL80211_WOWLAN_TRIG_PKT_PATTERN, | ||
2251 | |||
2252 | /* keep last */ | ||
2253 | NUM_NL80211_WOWLAN_TRIG, | ||
2254 | MAX_NL80211_WOWLAN_TRIG = NUM_NL80211_WOWLAN_TRIG - 1 | ||
2255 | }; | ||
2256 | |||
2257 | /** | ||
2258 | * enum nl80211_iface_limit_attrs - limit attributes | ||
2259 | * @NL80211_IFACE_LIMIT_UNSPEC: (reserved) | ||
2260 | * @NL80211_IFACE_LIMIT_MAX: maximum number of interfaces that | ||
2261 | * can be chosen from this set of interface types (u32) | ||
2262 | * @NL80211_IFACE_LIMIT_TYPES: nested attribute containing a | ||
2263 | * flag attribute for each interface type in this set | ||
2264 | * @NUM_NL80211_IFACE_LIMIT: number of attributes | ||
2265 | * @MAX_NL80211_IFACE_LIMIT: highest attribute number | ||
2266 | */ | ||
2267 | enum nl80211_iface_limit_attrs { | ||
2268 | NL80211_IFACE_LIMIT_UNSPEC, | ||
2269 | NL80211_IFACE_LIMIT_MAX, | ||
2270 | NL80211_IFACE_LIMIT_TYPES, | ||
2271 | |||
2272 | /* keep last */ | ||
2273 | NUM_NL80211_IFACE_LIMIT, | ||
2274 | MAX_NL80211_IFACE_LIMIT = NUM_NL80211_IFACE_LIMIT - 1 | ||
2275 | }; | ||
2276 | |||
2277 | /** | ||
2278 | * enum nl80211_if_combination_attrs -- interface combination attributes | ||
2279 | * | ||
2280 | * @NL80211_IFACE_COMB_UNSPEC: (reserved) | ||
2281 | * @NL80211_IFACE_COMB_LIMITS: Nested attributes containing the limits | ||
2282 | * for given interface types, see &enum nl80211_iface_limit_attrs. | ||
2283 | * @NL80211_IFACE_COMB_MAXNUM: u32 attribute giving the total number of | ||
2284 | * interfaces that can be created in this group. This number doesn't | ||
2285 | * apply to interfaces purely managed in software, which are listed | ||
2286 | * in a separate attribute %NL80211_ATTR_INTERFACES_SOFTWARE. | ||
2287 | * @NL80211_IFACE_COMB_STA_AP_BI_MATCH: flag attribute specifying that | ||
2288 | * beacon intervals within this group must be all the same even for | ||
2289 | * infrastructure and AP/GO combinations, i.e. the GO(s) must adopt | ||
2290 | * the infrastructure network's beacon interval. | ||
2291 | * @NL80211_IFACE_COMB_NUM_CHANNELS: u32 attribute specifying how many | ||
2292 | * different channels may be used within this group. | ||
2293 | * @NUM_NL80211_IFACE_COMB: number of attributes | ||
2294 | * @MAX_NL80211_IFACE_COMB: highest attribute number | ||
2295 | * | ||
2296 | * Examples: | ||
2297 | * limits = [ #{STA} <= 1, #{AP} <= 1 ], matching BI, channels = 1, max = 2 | ||
2298 | * => allows an AP and a STA that must match BIs | ||
2299 | * | ||
2300 | * numbers = [ #{AP, P2P-GO} <= 8 ], channels = 1, max = 8 | ||
2301 | * => allows 8 of AP/GO | ||
2302 | * | ||
2303 | * numbers = [ #{STA} <= 2 ], channels = 2, max = 2 | ||
2304 | * => allows two STAs on different channels | ||
2305 | * | ||
2306 | * numbers = [ #{STA} <= 1, #{P2P-client,P2P-GO} <= 3 ], max = 4 | ||
2307 | * => allows a STA plus three P2P interfaces | ||
2308 | * | ||
2309 | * The list of these four possiblities could completely be contained | ||
2310 | * within the %NL80211_ATTR_INTERFACE_COMBINATIONS attribute to indicate | ||
2311 | * that any of these groups must match. | ||
2312 | * | ||
2313 | * "Combinations" of just a single interface will not be listed here, | ||
2314 | * a single interface of any valid interface type is assumed to always | ||
2315 | * be possible by itself. This means that implicitly, for each valid | ||
2316 | * interface type, the following group always exists: | ||
2317 | * numbers = [ #{<type>} <= 1 ], channels = 1, max = 1 | ||
2318 | */ | ||
2319 | enum nl80211_if_combination_attrs { | ||
2320 | NL80211_IFACE_COMB_UNSPEC, | ||
2321 | NL80211_IFACE_COMB_LIMITS, | ||
2322 | NL80211_IFACE_COMB_MAXNUM, | ||
2323 | NL80211_IFACE_COMB_STA_AP_BI_MATCH, | ||
2324 | NL80211_IFACE_COMB_NUM_CHANNELS, | ||
2325 | |||
2326 | /* keep last */ | ||
2327 | NUM_NL80211_IFACE_COMB, | ||
2328 | MAX_NL80211_IFACE_COMB = NUM_NL80211_IFACE_COMB - 1 | ||
2329 | }; | ||
2330 | |||
2331 | |||
2332 | /** | ||
2333 | * enum nl80211_plink_state - state of a mesh peer link finite state machine | ||
2334 | * | ||
2335 | * @NL80211_PLINK_LISTEN: initial state, considered the implicit | ||
2336 | * state of non existant mesh peer links | ||
2337 | * @NL80211_PLINK_OPN_SNT: mesh plink open frame has been sent to | ||
2338 | * this mesh peer | ||
2339 | * @NL80211_PLINK_OPN_RCVD: mesh plink open frame has been received | ||
2340 | * from this mesh peer | ||
2341 | * @NL80211_PLINK_CNF_RCVD: mesh plink confirm frame has been | ||
2342 | * received from this mesh peer | ||
2343 | * @NL80211_PLINK_ESTAB: mesh peer link is established | ||
2344 | * @NL80211_PLINK_HOLDING: mesh peer link is being closed or cancelled | ||
2345 | * @NL80211_PLINK_BLOCKED: all frames transmitted from this mesh | ||
2346 | * plink are discarded | ||
2347 | * @NUM_NL80211_PLINK_STATES: number of peer link states | ||
2348 | * @MAX_NL80211_PLINK_STATES: highest numerical value of plink states | ||
2349 | */ | ||
2350 | enum nl80211_plink_state { | ||
2351 | NL80211_PLINK_LISTEN, | ||
2352 | NL80211_PLINK_OPN_SNT, | ||
2353 | NL80211_PLINK_OPN_RCVD, | ||
2354 | NL80211_PLINK_CNF_RCVD, | ||
2355 | NL80211_PLINK_ESTAB, | ||
2356 | NL80211_PLINK_HOLDING, | ||
2357 | NL80211_PLINK_BLOCKED, | ||
2358 | |||
2359 | /* keep last */ | ||
2360 | NUM_NL80211_PLINK_STATES, | ||
2361 | MAX_NL80211_PLINK_STATES = NUM_NL80211_PLINK_STATES - 1 | ||
2362 | }; | ||
2363 | |||
2005 | #endif /* __LINUX_NL80211_H */ | 2364 | #endif /* __LINUX_NL80211_H */ |
diff --git a/include/linux/nmi.h b/include/linux/nmi.h index c536f8545f74..2d304efc89df 100644 --- a/include/linux/nmi.h +++ b/include/linux/nmi.h | |||
@@ -45,11 +45,12 @@ static inline bool trigger_all_cpu_backtrace(void) | |||
45 | 45 | ||
46 | #ifdef CONFIG_LOCKUP_DETECTOR | 46 | #ifdef CONFIG_LOCKUP_DETECTOR |
47 | int hw_nmi_is_cpu_stuck(struct pt_regs *); | 47 | int hw_nmi_is_cpu_stuck(struct pt_regs *); |
48 | u64 hw_nmi_get_sample_period(void); | 48 | u64 hw_nmi_get_sample_period(int watchdog_thresh); |
49 | extern int watchdog_enabled; | 49 | extern int watchdog_enabled; |
50 | extern int watchdog_thresh; | ||
50 | struct ctl_table; | 51 | struct ctl_table; |
51 | extern int proc_dowatchdog_enabled(struct ctl_table *, int , | 52 | extern int proc_dowatchdog(struct ctl_table *, int , |
52 | void __user *, size_t *, loff_t *); | 53 | void __user *, size_t *, loff_t *); |
53 | #endif | 54 | #endif |
54 | 55 | ||
55 | #endif | 56 | #endif |
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index 621dfa16acc0..c0688b0168b3 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h | |||
@@ -209,8 +209,9 @@ static inline int notifier_to_errno(int ret) | |||
209 | #define NETDEV_POST_TYPE_CHANGE 0x000F | 209 | #define NETDEV_POST_TYPE_CHANGE 0x000F |
210 | #define NETDEV_POST_INIT 0x0010 | 210 | #define NETDEV_POST_INIT 0x0010 |
211 | #define NETDEV_UNREGISTER_BATCH 0x0011 | 211 | #define NETDEV_UNREGISTER_BATCH 0x0011 |
212 | #define NETDEV_BONDING_DESLAVE 0x0012 | 212 | #define NETDEV_RELEASE 0x0012 |
213 | #define NETDEV_NOTIFY_PEERS 0x0013 | 213 | #define NETDEV_NOTIFY_PEERS 0x0013 |
214 | #define NETDEV_JOIN 0x0014 | ||
214 | 215 | ||
215 | #define SYS_DOWN 0x0001 /* Notify of system down */ | 216 | #define SYS_DOWN 0x0001 /* Notify of system down */ |
216 | #define SYS_RESTART SYS_DOWN | 217 | #define SYS_RESTART SYS_DOWN |
diff --git a/include/linux/of_device.h b/include/linux/of_device.h index 8bfe6c1d4365..ae5638480ef2 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h | |||
@@ -21,8 +21,7 @@ extern void of_device_make_bus_id(struct device *dev); | |||
21 | static inline int of_driver_match_device(struct device *dev, | 21 | static inline int of_driver_match_device(struct device *dev, |
22 | const struct device_driver *drv) | 22 | const struct device_driver *drv) |
23 | { | 23 | { |
24 | dev->of_match = of_match_device(drv->of_match_table, dev); | 24 | return of_match_device(drv->of_match_table, dev) != NULL; |
25 | return dev->of_match != NULL; | ||
26 | } | 25 | } |
27 | 26 | ||
28 | extern struct platform_device *of_dev_get(struct platform_device *dev); | 27 | extern struct platform_device *of_dev_get(struct platform_device *dev); |
@@ -58,6 +57,11 @@ static inline int of_device_uevent(struct device *dev, | |||
58 | 57 | ||
59 | static inline void of_device_node_put(struct device *dev) { } | 58 | static inline void of_device_node_put(struct device *dev) { } |
60 | 59 | ||
60 | static inline const struct of_device_id *of_match_device( | ||
61 | const struct of_device_id *matches, const struct device *dev) | ||
62 | { | ||
63 | return NULL; | ||
64 | } | ||
61 | #endif /* CONFIG_OF_DEVICE */ | 65 | #endif /* CONFIG_OF_DEVICE */ |
62 | 66 | ||
63 | #endif /* _LINUX_OF_DEVICE_H */ | 67 | #endif /* _LINUX_OF_DEVICE_H */ |
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h index 109e013b1772..e6955f5d1f08 100644 --- a/include/linux/of_irq.h +++ b/include/linux/of_irq.h | |||
@@ -68,6 +68,7 @@ extern int of_irq_to_resource(struct device_node *dev, int index, | |||
68 | extern int of_irq_count(struct device_node *dev); | 68 | extern int of_irq_count(struct device_node *dev); |
69 | extern int of_irq_to_resource_table(struct device_node *dev, | 69 | extern int of_irq_to_resource_table(struct device_node *dev, |
70 | struct resource *res, int nr_irqs); | 70 | struct resource *res, int nr_irqs); |
71 | extern struct device_node *of_irq_find_parent(struct device_node *child); | ||
71 | 72 | ||
72 | #endif /* CONFIG_OF_IRQ */ | 73 | #endif /* CONFIG_OF_IRQ */ |
73 | #endif /* CONFIG_OF */ | 74 | #endif /* CONFIG_OF */ |
diff --git a/include/linux/pci-aspm.h b/include/linux/pci-aspm.h index 67cb3ae38016..7cea7b6c1413 100644 --- a/include/linux/pci-aspm.h +++ b/include/linux/pci-aspm.h | |||
@@ -28,6 +28,7 @@ extern void pcie_aspm_exit_link_state(struct pci_dev *pdev); | |||
28 | extern void pcie_aspm_pm_state_change(struct pci_dev *pdev); | 28 | extern void pcie_aspm_pm_state_change(struct pci_dev *pdev); |
29 | extern void pcie_aspm_powersave_config_link(struct pci_dev *pdev); | 29 | extern void pcie_aspm_powersave_config_link(struct pci_dev *pdev); |
30 | extern void pci_disable_link_state(struct pci_dev *pdev, int state); | 30 | extern void pci_disable_link_state(struct pci_dev *pdev, int state); |
31 | extern void pci_disable_link_state_locked(struct pci_dev *pdev, int state); | ||
31 | extern void pcie_clear_aspm(void); | 32 | extern void pcie_clear_aspm(void); |
32 | extern void pcie_no_aspm(void); | 33 | extern void pcie_no_aspm(void); |
33 | #else | 34 | #else |
diff --git a/include/linux/pci-ats.h b/include/linux/pci-ats.h new file mode 100644 index 000000000000..655824fa4c76 --- /dev/null +++ b/include/linux/pci-ats.h | |||
@@ -0,0 +1,52 @@ | |||
1 | #ifndef LINUX_PCI_ATS_H | ||
2 | #define LINUX_PCI_ATS_H | ||
3 | |||
4 | /* Address Translation Service */ | ||
5 | struct pci_ats { | ||
6 | int pos; /* capability position */ | ||
7 | int stu; /* Smallest Translation Unit */ | ||
8 | int qdep; /* Invalidate Queue Depth */ | ||
9 | int ref_cnt; /* Physical Function reference count */ | ||
10 | unsigned int is_enabled:1; /* Enable bit is set */ | ||
11 | }; | ||
12 | |||
13 | #ifdef CONFIG_PCI_IOV | ||
14 | |||
15 | extern int pci_enable_ats(struct pci_dev *dev, int ps); | ||
16 | extern void pci_disable_ats(struct pci_dev *dev); | ||
17 | extern int pci_ats_queue_depth(struct pci_dev *dev); | ||
18 | /** | ||
19 | * pci_ats_enabled - query the ATS status | ||
20 | * @dev: the PCI device | ||
21 | * | ||
22 | * Returns 1 if ATS capability is enabled, or 0 if not. | ||
23 | */ | ||
24 | static inline int pci_ats_enabled(struct pci_dev *dev) | ||
25 | { | ||
26 | return dev->ats && dev->ats->is_enabled; | ||
27 | } | ||
28 | |||
29 | #else /* CONFIG_PCI_IOV */ | ||
30 | |||
31 | static inline int pci_enable_ats(struct pci_dev *dev, int ps) | ||
32 | { | ||
33 | return -ENODEV; | ||
34 | } | ||
35 | |||
36 | static inline void pci_disable_ats(struct pci_dev *dev) | ||
37 | { | ||
38 | } | ||
39 | |||
40 | static inline int pci_ats_queue_depth(struct pci_dev *dev) | ||
41 | { | ||
42 | return -ENODEV; | ||
43 | } | ||
44 | |||
45 | static inline int pci_ats_enabled(struct pci_dev *dev) | ||
46 | { | ||
47 | return 0; | ||
48 | } | ||
49 | |||
50 | #endif /* CONFIG_PCI_IOV */ | ||
51 | |||
52 | #endif /* LINUX_PCI_ATS_H*/ | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index 96f70d7e058d..4604d1d5514d 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -214,12 +214,17 @@ enum pci_bus_speed { | |||
214 | PCI_SPEED_UNKNOWN = 0xff, | 214 | PCI_SPEED_UNKNOWN = 0xff, |
215 | }; | 215 | }; |
216 | 216 | ||
217 | struct pci_cap_saved_state { | 217 | struct pci_cap_saved_data { |
218 | struct hlist_node next; | ||
219 | char cap_nr; | 218 | char cap_nr; |
219 | unsigned int size; | ||
220 | u32 data[0]; | 220 | u32 data[0]; |
221 | }; | 221 | }; |
222 | 222 | ||
223 | struct pci_cap_saved_state { | ||
224 | struct hlist_node next; | ||
225 | struct pci_cap_saved_data cap; | ||
226 | }; | ||
227 | |||
223 | struct pcie_link_state; | 228 | struct pcie_link_state; |
224 | struct pci_vpd; | 229 | struct pci_vpd; |
225 | struct pci_sriov; | 230 | struct pci_sriov; |
@@ -366,7 +371,7 @@ static inline struct pci_cap_saved_state *pci_find_saved_cap( | |||
366 | struct hlist_node *pos; | 371 | struct hlist_node *pos; |
367 | 372 | ||
368 | hlist_for_each_entry(tmp, pos, &pci_dev->saved_cap_space, next) { | 373 | hlist_for_each_entry(tmp, pos, &pci_dev->saved_cap_space, next) { |
369 | if (tmp->cap_nr == cap) | 374 | if (tmp->cap.cap_nr == cap) |
370 | return tmp; | 375 | return tmp; |
371 | } | 376 | } |
372 | return NULL; | 377 | return NULL; |
@@ -807,6 +812,10 @@ size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size); | |||
807 | /* Power management related routines */ | 812 | /* Power management related routines */ |
808 | int pci_save_state(struct pci_dev *dev); | 813 | int pci_save_state(struct pci_dev *dev); |
809 | void pci_restore_state(struct pci_dev *dev); | 814 | void pci_restore_state(struct pci_dev *dev); |
815 | struct pci_saved_state *pci_store_saved_state(struct pci_dev *dev); | ||
816 | int pci_load_saved_state(struct pci_dev *dev, struct pci_saved_state *state); | ||
817 | int pci_load_and_free_saved_state(struct pci_dev *dev, | ||
818 | struct pci_saved_state **state); | ||
810 | int __pci_complete_power_transition(struct pci_dev *dev, pci_power_t state); | 819 | int __pci_complete_power_transition(struct pci_dev *dev, pci_power_t state); |
811 | int pci_set_power_state(struct pci_dev *dev, pci_power_t state); | 820 | int pci_set_power_state(struct pci_dev *dev, pci_power_t state); |
812 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); | 821 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); |
@@ -828,6 +837,23 @@ static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, | |||
828 | return __pci_enable_wake(dev, state, false, enable); | 837 | return __pci_enable_wake(dev, state, false, enable); |
829 | } | 838 | } |
830 | 839 | ||
840 | #define PCI_EXP_IDO_REQUEST (1<<0) | ||
841 | #define PCI_EXP_IDO_COMPLETION (1<<1) | ||
842 | void pci_enable_ido(struct pci_dev *dev, unsigned long type); | ||
843 | void pci_disable_ido(struct pci_dev *dev, unsigned long type); | ||
844 | |||
845 | enum pci_obff_signal_type { | ||
846 | PCI_EXP_OBFF_SIGNAL_L0, | ||
847 | PCI_EXP_OBFF_SIGNAL_ALWAYS, | ||
848 | }; | ||
849 | int pci_enable_obff(struct pci_dev *dev, enum pci_obff_signal_type); | ||
850 | void pci_disable_obff(struct pci_dev *dev); | ||
851 | |||
852 | bool pci_ltr_supported(struct pci_dev *dev); | ||
853 | int pci_enable_ltr(struct pci_dev *dev); | ||
854 | void pci_disable_ltr(struct pci_dev *dev); | ||
855 | int pci_set_ltr(struct pci_dev *dev, int snoop_lat_ns, int nosnoop_lat_ns); | ||
856 | |||
831 | /* For use by arch with custom probe code */ | 857 | /* For use by arch with custom probe code */ |
832 | void set_pcie_port_type(struct pci_dev *pdev); | 858 | void set_pcie_port_type(struct pci_dev *pdev); |
833 | void set_pcie_hotplug_bridge(struct pci_dev *pdev); | 859 | void set_pcie_hotplug_bridge(struct pci_dev *pdev); |
@@ -1207,6 +1233,23 @@ static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, | |||
1207 | return 0; | 1233 | return 0; |
1208 | } | 1234 | } |
1209 | 1235 | ||
1236 | static inline void pci_enable_ido(struct pci_dev *dev, unsigned long type) | ||
1237 | { | ||
1238 | } | ||
1239 | |||
1240 | static inline void pci_disable_ido(struct pci_dev *dev, unsigned long type) | ||
1241 | { | ||
1242 | } | ||
1243 | |||
1244 | static inline int pci_enable_obff(struct pci_dev *dev, unsigned long type) | ||
1245 | { | ||
1246 | return 0; | ||
1247 | } | ||
1248 | |||
1249 | static inline void pci_disable_obff(struct pci_dev *dev) | ||
1250 | { | ||
1251 | } | ||
1252 | |||
1210 | static inline int pci_request_regions(struct pci_dev *dev, const char *res_name) | 1253 | static inline int pci_request_regions(struct pci_dev *dev, const char *res_name) |
1211 | { | 1254 | { |
1212 | return -EIO; | 1255 | return -EIO; |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 8abe8d78c4bf..24787b751286 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -608,6 +608,8 @@ | |||
608 | #define PCI_DEVICE_ID_MATROX_G550 0x2527 | 608 | #define PCI_DEVICE_ID_MATROX_G550 0x2527 |
609 | #define PCI_DEVICE_ID_MATROX_VIA 0x4536 | 609 | #define PCI_DEVICE_ID_MATROX_VIA 0x4536 |
610 | 610 | ||
611 | #define PCI_VENDOR_ID_MOBILITY_ELECTRONICS 0x14f2 | ||
612 | |||
611 | #define PCI_VENDOR_ID_CT 0x102c | 613 | #define PCI_VENDOR_ID_CT 0x102c |
612 | #define PCI_DEVICE_ID_CT_69000 0x00c0 | 614 | #define PCI_DEVICE_ID_CT_69000 0x00c0 |
613 | #define PCI_DEVICE_ID_CT_65545 0x00d8 | 615 | #define PCI_DEVICE_ID_CT_65545 0x00d8 |
@@ -2481,6 +2483,8 @@ | |||
2481 | #define PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MAX 0x1c5f | 2483 | #define PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MAX 0x1c5f |
2482 | #define PCI_DEVICE_ID_INTEL_PATSBURG_LPC_0 0x1d40 | 2484 | #define PCI_DEVICE_ID_INTEL_PATSBURG_LPC_0 0x1d40 |
2483 | #define PCI_DEVICE_ID_INTEL_PATSBURG_LPC_1 0x1d41 | 2485 | #define PCI_DEVICE_ID_INTEL_PATSBURG_LPC_1 0x1d41 |
2486 | #define PCI_DEVICE_ID_INTEL_PANTHERPOINT_LPC_MIN 0x1e40 | ||
2487 | #define PCI_DEVICE_ID_INTEL_PANTHERPOINT_LPC_MAX 0x1e5f | ||
2484 | #define PCI_DEVICE_ID_INTEL_DH89XXCC_LPC_MIN 0x2310 | 2488 | #define PCI_DEVICE_ID_INTEL_DH89XXCC_LPC_MIN 0x2310 |
2485 | #define PCI_DEVICE_ID_INTEL_DH89XXCC_LPC_MAX 0x231f | 2489 | #define PCI_DEVICE_ID_INTEL_DH89XXCC_LPC_MAX 0x231f |
2486 | #define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410 | 2490 | #define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410 |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index be01380f798a..e8840964aca1 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
@@ -508,8 +508,18 @@ | |||
508 | #define PCI_EXP_RTSTA_PENDING 0x20000 /* PME pending */ | 508 | #define PCI_EXP_RTSTA_PENDING 0x20000 /* PME pending */ |
509 | #define PCI_EXP_DEVCAP2 36 /* Device Capabilities 2 */ | 509 | #define PCI_EXP_DEVCAP2 36 /* Device Capabilities 2 */ |
510 | #define PCI_EXP_DEVCAP2_ARI 0x20 /* Alternative Routing-ID */ | 510 | #define PCI_EXP_DEVCAP2_ARI 0x20 /* Alternative Routing-ID */ |
511 | #define PCI_EXP_DEVCAP2_LTR 0x800 /* Latency tolerance reporting */ | ||
512 | #define PCI_EXP_OBFF_MASK 0xc0000 /* OBFF support mechanism */ | ||
513 | #define PCI_EXP_OBFF_MSG 0x40000 /* New message signaling */ | ||
514 | #define PCI_EXP_OBFF_WAKE 0x80000 /* Re-use WAKE# for OBFF */ | ||
511 | #define PCI_EXP_DEVCTL2 40 /* Device Control 2 */ | 515 | #define PCI_EXP_DEVCTL2 40 /* Device Control 2 */ |
512 | #define PCI_EXP_DEVCTL2_ARI 0x20 /* Alternative Routing-ID */ | 516 | #define PCI_EXP_DEVCTL2_ARI 0x20 /* Alternative Routing-ID */ |
517 | #define PCI_EXP_IDO_REQ_EN 0x100 /* ID-based ordering request enable */ | ||
518 | #define PCI_EXP_IDO_CMP_EN 0x200 /* ID-based ordering completion enable */ | ||
519 | #define PCI_EXP_LTR_EN 0x400 /* Latency tolerance reporting */ | ||
520 | #define PCI_EXP_OBFF_MSGA_EN 0x2000 /* OBFF enable with Message type A */ | ||
521 | #define PCI_EXP_OBFF_MSGB_EN 0x4000 /* OBFF enable with Message type B */ | ||
522 | #define PCI_EXP_OBFF_WAKE_EN 0x6000 /* OBFF using WAKE# signaling */ | ||
513 | #define PCI_EXP_LNKCTL2 48 /* Link Control 2 */ | 523 | #define PCI_EXP_LNKCTL2 48 /* Link Control 2 */ |
514 | #define PCI_EXP_SLTCTL2 56 /* Slot Control 2 */ | 524 | #define PCI_EXP_SLTCTL2 56 /* Slot Control 2 */ |
515 | 525 | ||
@@ -527,6 +537,7 @@ | |||
527 | #define PCI_EXT_CAP_ID_ARI 14 | 537 | #define PCI_EXT_CAP_ID_ARI 14 |
528 | #define PCI_EXT_CAP_ID_ATS 15 | 538 | #define PCI_EXT_CAP_ID_ATS 15 |
529 | #define PCI_EXT_CAP_ID_SRIOV 16 | 539 | #define PCI_EXT_CAP_ID_SRIOV 16 |
540 | #define PCI_EXT_CAP_ID_LTR 24 | ||
530 | 541 | ||
531 | /* Advanced Error Reporting */ | 542 | /* Advanced Error Reporting */ |
532 | #define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */ | 543 | #define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */ |
@@ -683,6 +694,12 @@ | |||
683 | #define PCI_SRIOV_VFM_MO 0x2 /* Active.MigrateOut */ | 694 | #define PCI_SRIOV_VFM_MO 0x2 /* Active.MigrateOut */ |
684 | #define PCI_SRIOV_VFM_AV 0x3 /* Active.Available */ | 695 | #define PCI_SRIOV_VFM_AV 0x3 /* Active.Available */ |
685 | 696 | ||
697 | #define PCI_LTR_MAX_SNOOP_LAT 0x4 | ||
698 | #define PCI_LTR_MAX_NOSNOOP_LAT 0x6 | ||
699 | #define PCI_LTR_VALUE_MASK 0x000003ff | ||
700 | #define PCI_LTR_SCALE_MASK 0x00001c00 | ||
701 | #define PCI_LTR_SCALE_SHIFT 10 | ||
702 | |||
686 | /* Access Control Service */ | 703 | /* Access Control Service */ |
687 | #define PCI_ACS_CAP 0x04 /* ACS Capability Register */ | 704 | #define PCI_ACS_CAP 0x04 /* ACS Capability Register */ |
688 | #define PCI_ACS_SV 0x01 /* Source Validation */ | 705 | #define PCI_ACS_SV 0x01 /* Source Validation */ |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index ee9f1e782800..3412684ce5d5 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -2,8 +2,8 @@ | |||
2 | * Performance events: | 2 | * Performance events: |
3 | * | 3 | * |
4 | * Copyright (C) 2008-2009, Thomas Gleixner <tglx@linutronix.de> | 4 | * Copyright (C) 2008-2009, Thomas Gleixner <tglx@linutronix.de> |
5 | * Copyright (C) 2008-2009, Red Hat, Inc., Ingo Molnar | 5 | * Copyright (C) 2008-2011, Red Hat, Inc., Ingo Molnar |
6 | * Copyright (C) 2008-2009, Red Hat, Inc., Peter Zijlstra | 6 | * Copyright (C) 2008-2011, Red Hat, Inc., Peter Zijlstra |
7 | * | 7 | * |
8 | * Data type definitions, declarations, prototypes. | 8 | * Data type definitions, declarations, prototypes. |
9 | * | 9 | * |
@@ -52,6 +52,8 @@ enum perf_hw_id { | |||
52 | PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 4, | 52 | PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 4, |
53 | PERF_COUNT_HW_BRANCH_MISSES = 5, | 53 | PERF_COUNT_HW_BRANCH_MISSES = 5, |
54 | PERF_COUNT_HW_BUS_CYCLES = 6, | 54 | PERF_COUNT_HW_BUS_CYCLES = 6, |
55 | PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 7, | ||
56 | PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 8, | ||
55 | 57 | ||
56 | PERF_COUNT_HW_MAX, /* non-ABI */ | 58 | PERF_COUNT_HW_MAX, /* non-ABI */ |
57 | }; | 59 | }; |
@@ -468,9 +470,9 @@ enum perf_callchain_context { | |||
468 | PERF_CONTEXT_MAX = (__u64)-4095, | 470 | PERF_CONTEXT_MAX = (__u64)-4095, |
469 | }; | 471 | }; |
470 | 472 | ||
471 | #define PERF_FLAG_FD_NO_GROUP (1U << 0) | 473 | #define PERF_FLAG_FD_NO_GROUP (1U << 0) |
472 | #define PERF_FLAG_FD_OUTPUT (1U << 1) | 474 | #define PERF_FLAG_FD_OUTPUT (1U << 1) |
473 | #define PERF_FLAG_PID_CGROUP (1U << 2) /* pid=cgroup id, per-cpu mode only */ | 475 | #define PERF_FLAG_PID_CGROUP (1U << 2) /* pid=cgroup id, per-cpu mode only */ |
474 | 476 | ||
475 | #ifdef __KERNEL__ | 477 | #ifdef __KERNEL__ |
476 | /* | 478 | /* |
@@ -484,9 +486,9 @@ enum perf_callchain_context { | |||
484 | #endif | 486 | #endif |
485 | 487 | ||
486 | struct perf_guest_info_callbacks { | 488 | struct perf_guest_info_callbacks { |
487 | int (*is_in_guest) (void); | 489 | int (*is_in_guest)(void); |
488 | int (*is_user_mode) (void); | 490 | int (*is_user_mode)(void); |
489 | unsigned long (*get_guest_ip) (void); | 491 | unsigned long (*get_guest_ip)(void); |
490 | }; | 492 | }; |
491 | 493 | ||
492 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | 494 | #ifdef CONFIG_HAVE_HW_BREAKPOINT |
@@ -505,7 +507,7 @@ struct perf_guest_info_callbacks { | |||
505 | #include <linux/ftrace.h> | 507 | #include <linux/ftrace.h> |
506 | #include <linux/cpu.h> | 508 | #include <linux/cpu.h> |
507 | #include <linux/irq_work.h> | 509 | #include <linux/irq_work.h> |
508 | #include <linux/jump_label_ref.h> | 510 | #include <linux/jump_label.h> |
509 | #include <asm/atomic.h> | 511 | #include <asm/atomic.h> |
510 | #include <asm/local.h> | 512 | #include <asm/local.h> |
511 | 513 | ||
@@ -652,19 +654,19 @@ struct pmu { | |||
652 | * Start the transaction, after this ->add() doesn't need to | 654 | * Start the transaction, after this ->add() doesn't need to |
653 | * do schedulability tests. | 655 | * do schedulability tests. |
654 | */ | 656 | */ |
655 | void (*start_txn) (struct pmu *pmu); /* optional */ | 657 | void (*start_txn) (struct pmu *pmu); /* optional */ |
656 | /* | 658 | /* |
657 | * If ->start_txn() disabled the ->add() schedulability test | 659 | * If ->start_txn() disabled the ->add() schedulability test |
658 | * then ->commit_txn() is required to perform one. On success | 660 | * then ->commit_txn() is required to perform one. On success |
659 | * the transaction is closed. On error the transaction is kept | 661 | * the transaction is closed. On error the transaction is kept |
660 | * open until ->cancel_txn() is called. | 662 | * open until ->cancel_txn() is called. |
661 | */ | 663 | */ |
662 | int (*commit_txn) (struct pmu *pmu); /* optional */ | 664 | int (*commit_txn) (struct pmu *pmu); /* optional */ |
663 | /* | 665 | /* |
664 | * Will cancel the transaction, assumes ->del() is called | 666 | * Will cancel the transaction, assumes ->del() is called |
665 | * for each successful ->add() during the transaction. | 667 | * for each successful ->add() during the transaction. |
666 | */ | 668 | */ |
667 | void (*cancel_txn) (struct pmu *pmu); /* optional */ | 669 | void (*cancel_txn) (struct pmu *pmu); /* optional */ |
668 | }; | 670 | }; |
669 | 671 | ||
670 | /** | 672 | /** |
@@ -712,15 +714,15 @@ typedef void (*perf_overflow_handler_t)(struct perf_event *, int, | |||
712 | struct pt_regs *regs); | 714 | struct pt_regs *regs); |
713 | 715 | ||
714 | enum perf_group_flag { | 716 | enum perf_group_flag { |
715 | PERF_GROUP_SOFTWARE = 0x1, | 717 | PERF_GROUP_SOFTWARE = 0x1, |
716 | }; | 718 | }; |
717 | 719 | ||
718 | #define SWEVENT_HLIST_BITS 8 | 720 | #define SWEVENT_HLIST_BITS 8 |
719 | #define SWEVENT_HLIST_SIZE (1 << SWEVENT_HLIST_BITS) | 721 | #define SWEVENT_HLIST_SIZE (1 << SWEVENT_HLIST_BITS) |
720 | 722 | ||
721 | struct swevent_hlist { | 723 | struct swevent_hlist { |
722 | struct hlist_head heads[SWEVENT_HLIST_SIZE]; | 724 | struct hlist_head heads[SWEVENT_HLIST_SIZE]; |
723 | struct rcu_head rcu_head; | 725 | struct rcu_head rcu_head; |
724 | }; | 726 | }; |
725 | 727 | ||
726 | #define PERF_ATTACH_CONTEXT 0x01 | 728 | #define PERF_ATTACH_CONTEXT 0x01 |
@@ -733,13 +735,13 @@ struct swevent_hlist { | |||
733 | * This is a per-cpu dynamically allocated data structure. | 735 | * This is a per-cpu dynamically allocated data structure. |
734 | */ | 736 | */ |
735 | struct perf_cgroup_info { | 737 | struct perf_cgroup_info { |
736 | u64 time; | 738 | u64 time; |
737 | u64 timestamp; | 739 | u64 timestamp; |
738 | }; | 740 | }; |
739 | 741 | ||
740 | struct perf_cgroup { | 742 | struct perf_cgroup { |
741 | struct cgroup_subsys_state css; | 743 | struct cgroup_subsys_state css; |
742 | struct perf_cgroup_info *info; /* timing info, one per cpu */ | 744 | struct perf_cgroup_info *info; /* timing info, one per cpu */ |
743 | }; | 745 | }; |
744 | #endif | 746 | #endif |
745 | 747 | ||
@@ -923,7 +925,7 @@ struct perf_event_context { | |||
923 | 925 | ||
924 | /* | 926 | /* |
925 | * Number of contexts where an event can trigger: | 927 | * Number of contexts where an event can trigger: |
926 | * task, softirq, hardirq, nmi. | 928 | * task, softirq, hardirq, nmi. |
927 | */ | 929 | */ |
928 | #define PERF_NR_CONTEXTS 4 | 930 | #define PERF_NR_CONTEXTS 4 |
929 | 931 | ||
@@ -1001,8 +1003,7 @@ struct perf_sample_data { | |||
1001 | struct perf_raw_record *raw; | 1003 | struct perf_raw_record *raw; |
1002 | }; | 1004 | }; |
1003 | 1005 | ||
1004 | static inline | 1006 | static inline void perf_sample_data_init(struct perf_sample_data *data, u64 addr) |
1005 | void perf_sample_data_init(struct perf_sample_data *data, u64 addr) | ||
1006 | { | 1007 | { |
1007 | data->addr = addr; | 1008 | data->addr = addr; |
1008 | data->raw = NULL; | 1009 | data->raw = NULL; |
@@ -1034,13 +1035,12 @@ static inline int is_software_event(struct perf_event *event) | |||
1034 | return event->pmu->task_ctx_nr == perf_sw_context; | 1035 | return event->pmu->task_ctx_nr == perf_sw_context; |
1035 | } | 1036 | } |
1036 | 1037 | ||
1037 | extern atomic_t perf_swevent_enabled[PERF_COUNT_SW_MAX]; | 1038 | extern struct jump_label_key perf_swevent_enabled[PERF_COUNT_SW_MAX]; |
1038 | 1039 | ||
1039 | extern void __perf_sw_event(u32, u64, int, struct pt_regs *, u64); | 1040 | extern void __perf_sw_event(u32, u64, int, struct pt_regs *, u64); |
1040 | 1041 | ||
1041 | #ifndef perf_arch_fetch_caller_regs | 1042 | #ifndef perf_arch_fetch_caller_regs |
1042 | static inline void | 1043 | static inline void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip) { } |
1043 | perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip) { } | ||
1044 | #endif | 1044 | #endif |
1045 | 1045 | ||
1046 | /* | 1046 | /* |
@@ -1063,26 +1063,24 @@ perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr) | |||
1063 | { | 1063 | { |
1064 | struct pt_regs hot_regs; | 1064 | struct pt_regs hot_regs; |
1065 | 1065 | ||
1066 | JUMP_LABEL(&perf_swevent_enabled[event_id], have_event); | 1066 | if (static_branch(&perf_swevent_enabled[event_id])) { |
1067 | return; | 1067 | if (!regs) { |
1068 | 1068 | perf_fetch_caller_regs(&hot_regs); | |
1069 | have_event: | 1069 | regs = &hot_regs; |
1070 | if (!regs) { | 1070 | } |
1071 | perf_fetch_caller_regs(&hot_regs); | 1071 | __perf_sw_event(event_id, nr, nmi, regs, addr); |
1072 | regs = &hot_regs; | ||
1073 | } | 1072 | } |
1074 | __perf_sw_event(event_id, nr, nmi, regs, addr); | ||
1075 | } | 1073 | } |
1076 | 1074 | ||
1077 | extern atomic_t perf_sched_events; | 1075 | extern struct jump_label_key perf_sched_events; |
1078 | 1076 | ||
1079 | static inline void perf_event_task_sched_in(struct task_struct *task) | 1077 | static inline void perf_event_task_sched_in(struct task_struct *task) |
1080 | { | 1078 | { |
1081 | COND_STMT(&perf_sched_events, __perf_event_task_sched_in(task)); | 1079 | if (static_branch(&perf_sched_events)) |
1080 | __perf_event_task_sched_in(task); | ||
1082 | } | 1081 | } |
1083 | 1082 | ||
1084 | static inline | 1083 | static inline void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next) |
1085 | void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next) | ||
1086 | { | 1084 | { |
1087 | perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 1, NULL, 0); | 1085 | perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 1, NULL, 0); |
1088 | 1086 | ||
@@ -1100,14 +1098,10 @@ extern void perf_event_fork(struct task_struct *tsk); | |||
1100 | /* Callchains */ | 1098 | /* Callchains */ |
1101 | DECLARE_PER_CPU(struct perf_callchain_entry, perf_callchain_entry); | 1099 | DECLARE_PER_CPU(struct perf_callchain_entry, perf_callchain_entry); |
1102 | 1100 | ||
1103 | extern void perf_callchain_user(struct perf_callchain_entry *entry, | 1101 | extern void perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs); |
1104 | struct pt_regs *regs); | 1102 | extern void perf_callchain_kernel(struct perf_callchain_entry *entry, struct pt_regs *regs); |
1105 | extern void perf_callchain_kernel(struct perf_callchain_entry *entry, | ||
1106 | struct pt_regs *regs); | ||
1107 | |||
1108 | 1103 | ||
1109 | static inline void | 1104 | static inline void perf_callchain_store(struct perf_callchain_entry *entry, u64 ip) |
1110 | perf_callchain_store(struct perf_callchain_entry *entry, u64 ip) | ||
1111 | { | 1105 | { |
1112 | if (entry->nr < PERF_MAX_STACK_DEPTH) | 1106 | if (entry->nr < PERF_MAX_STACK_DEPTH) |
1113 | entry->ip[entry->nr++] = ip; | 1107 | entry->ip[entry->nr++] = ip; |
@@ -1143,9 +1137,9 @@ extern void perf_tp_event(u64 addr, u64 count, void *record, | |||
1143 | extern void perf_bp_event(struct perf_event *event, void *data); | 1137 | extern void perf_bp_event(struct perf_event *event, void *data); |
1144 | 1138 | ||
1145 | #ifndef perf_misc_flags | 1139 | #ifndef perf_misc_flags |
1146 | #define perf_misc_flags(regs) (user_mode(regs) ? PERF_RECORD_MISC_USER : \ | 1140 | # define perf_misc_flags(regs) \ |
1147 | PERF_RECORD_MISC_KERNEL) | 1141 | (user_mode(regs) ? PERF_RECORD_MISC_USER : PERF_RECORD_MISC_KERNEL) |
1148 | #define perf_instruction_pointer(regs) instruction_pointer(regs) | 1142 | # define perf_instruction_pointer(regs) instruction_pointer(regs) |
1149 | #endif | 1143 | #endif |
1150 | 1144 | ||
1151 | extern int perf_output_begin(struct perf_output_handle *handle, | 1145 | extern int perf_output_begin(struct perf_output_handle *handle, |
@@ -1180,9 +1174,9 @@ static inline void | |||
1180 | perf_bp_event(struct perf_event *event, void *data) { } | 1174 | perf_bp_event(struct perf_event *event, void *data) { } |
1181 | 1175 | ||
1182 | static inline int perf_register_guest_info_callbacks | 1176 | static inline int perf_register_guest_info_callbacks |
1183 | (struct perf_guest_info_callbacks *callbacks) { return 0; } | 1177 | (struct perf_guest_info_callbacks *callbacks) { return 0; } |
1184 | static inline int perf_unregister_guest_info_callbacks | 1178 | static inline int perf_unregister_guest_info_callbacks |
1185 | (struct perf_guest_info_callbacks *callbacks) { return 0; } | 1179 | (struct perf_guest_info_callbacks *callbacks) { return 0; } |
1186 | 1180 | ||
1187 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } | 1181 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } |
1188 | static inline void perf_event_comm(struct task_struct *tsk) { } | 1182 | static inline void perf_event_comm(struct task_struct *tsk) { } |
@@ -1195,23 +1189,22 @@ static inline void perf_event_disable(struct perf_event *event) { } | |||
1195 | static inline void perf_event_task_tick(void) { } | 1189 | static inline void perf_event_task_tick(void) { } |
1196 | #endif | 1190 | #endif |
1197 | 1191 | ||
1198 | #define perf_output_put(handle, x) \ | 1192 | #define perf_output_put(handle, x) perf_output_copy((handle), &(x), sizeof(x)) |
1199 | perf_output_copy((handle), &(x), sizeof(x)) | ||
1200 | 1193 | ||
1201 | /* | 1194 | /* |
1202 | * This has to have a higher priority than migration_notifier in sched.c. | 1195 | * This has to have a higher priority than migration_notifier in sched.c. |
1203 | */ | 1196 | */ |
1204 | #define perf_cpu_notifier(fn) \ | 1197 | #define perf_cpu_notifier(fn) \ |
1205 | do { \ | 1198 | do { \ |
1206 | static struct notifier_block fn##_nb __cpuinitdata = \ | 1199 | static struct notifier_block fn##_nb __cpuinitdata = \ |
1207 | { .notifier_call = fn, .priority = CPU_PRI_PERF }; \ | 1200 | { .notifier_call = fn, .priority = CPU_PRI_PERF }; \ |
1208 | fn(&fn##_nb, (unsigned long)CPU_UP_PREPARE, \ | 1201 | fn(&fn##_nb, (unsigned long)CPU_UP_PREPARE, \ |
1209 | (void *)(unsigned long)smp_processor_id()); \ | 1202 | (void *)(unsigned long)smp_processor_id()); \ |
1210 | fn(&fn##_nb, (unsigned long)CPU_STARTING, \ | 1203 | fn(&fn##_nb, (unsigned long)CPU_STARTING, \ |
1211 | (void *)(unsigned long)smp_processor_id()); \ | 1204 | (void *)(unsigned long)smp_processor_id()); \ |
1212 | fn(&fn##_nb, (unsigned long)CPU_ONLINE, \ | 1205 | fn(&fn##_nb, (unsigned long)CPU_ONLINE, \ |
1213 | (void *)(unsigned long)smp_processor_id()); \ | 1206 | (void *)(unsigned long)smp_processor_id()); \ |
1214 | register_cpu_notifier(&fn##_nb); \ | 1207 | register_cpu_notifier(&fn##_nb); \ |
1215 | } while (0) | 1208 | } while (0) |
1216 | 1209 | ||
1217 | #endif /* __KERNEL__ */ | 1210 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index 3a02e0208575..c5336705921f 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h | |||
@@ -588,4 +588,19 @@ struct tc_sfb_xstats { | |||
588 | 588 | ||
589 | #define SFB_MAX_PROB 0xFFFF | 589 | #define SFB_MAX_PROB 0xFFFF |
590 | 590 | ||
591 | /* QFQ */ | ||
592 | enum { | ||
593 | TCA_QFQ_UNSPEC, | ||
594 | TCA_QFQ_WEIGHT, | ||
595 | TCA_QFQ_LMAX, | ||
596 | __TCA_QFQ_MAX | ||
597 | }; | ||
598 | |||
599 | #define TCA_QFQ_MAX (__TCA_QFQ_MAX - 1) | ||
600 | |||
601 | struct tc_qfq_stats { | ||
602 | __u32 weight; | ||
603 | __u32 lmax; | ||
604 | }; | ||
605 | |||
591 | #endif | 606 | #endif |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 744942c95fec..ede1a80e3358 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -150,9 +150,6 @@ extern struct platform_device *platform_create_bundle(struct platform_driver *dr | |||
150 | struct resource *res, unsigned int n_res, | 150 | struct resource *res, unsigned int n_res, |
151 | const void *data, size_t size); | 151 | const void *data, size_t size); |
152 | 152 | ||
153 | extern const struct dev_pm_ops * platform_bus_get_pm_ops(void); | ||
154 | extern void platform_bus_set_pm_ops(const struct dev_pm_ops *pm); | ||
155 | |||
156 | /* early platform driver interface */ | 153 | /* early platform driver interface */ |
157 | struct early_platform_driver { | 154 | struct early_platform_driver { |
158 | const char *class_str; | 155 | const char *class_str; |
@@ -205,4 +202,64 @@ static inline char *early_platform_driver_setup_func(void) \ | |||
205 | } | 202 | } |
206 | #endif /* MODULE */ | 203 | #endif /* MODULE */ |
207 | 204 | ||
205 | #ifdef CONFIG_PM_SLEEP | ||
206 | extern int platform_pm_prepare(struct device *dev); | ||
207 | extern void platform_pm_complete(struct device *dev); | ||
208 | #else | ||
209 | #define platform_pm_prepare NULL | ||
210 | #define platform_pm_complete NULL | ||
211 | #endif | ||
212 | |||
213 | #ifdef CONFIG_SUSPEND | ||
214 | extern int platform_pm_suspend(struct device *dev); | ||
215 | extern int platform_pm_suspend_noirq(struct device *dev); | ||
216 | extern int platform_pm_resume(struct device *dev); | ||
217 | extern int platform_pm_resume_noirq(struct device *dev); | ||
218 | #else | ||
219 | #define platform_pm_suspend NULL | ||
220 | #define platform_pm_resume NULL | ||
221 | #define platform_pm_suspend_noirq NULL | ||
222 | #define platform_pm_resume_noirq NULL | ||
223 | #endif | ||
224 | |||
225 | #ifdef CONFIG_HIBERNATE_CALLBACKS | ||
226 | extern int platform_pm_freeze(struct device *dev); | ||
227 | extern int platform_pm_freeze_noirq(struct device *dev); | ||
228 | extern int platform_pm_thaw(struct device *dev); | ||
229 | extern int platform_pm_thaw_noirq(struct device *dev); | ||
230 | extern int platform_pm_poweroff(struct device *dev); | ||
231 | extern int platform_pm_poweroff_noirq(struct device *dev); | ||
232 | extern int platform_pm_restore(struct device *dev); | ||
233 | extern int platform_pm_restore_noirq(struct device *dev); | ||
234 | #else | ||
235 | #define platform_pm_freeze NULL | ||
236 | #define platform_pm_thaw NULL | ||
237 | #define platform_pm_poweroff NULL | ||
238 | #define platform_pm_restore NULL | ||
239 | #define platform_pm_freeze_noirq NULL | ||
240 | #define platform_pm_thaw_noirq NULL | ||
241 | #define platform_pm_poweroff_noirq NULL | ||
242 | #define platform_pm_restore_noirq NULL | ||
243 | #endif | ||
244 | |||
245 | #ifdef CONFIG_PM_SLEEP | ||
246 | #define USE_PLATFORM_PM_SLEEP_OPS \ | ||
247 | .prepare = platform_pm_prepare, \ | ||
248 | .complete = platform_pm_complete, \ | ||
249 | .suspend = platform_pm_suspend, \ | ||
250 | .resume = platform_pm_resume, \ | ||
251 | .freeze = platform_pm_freeze, \ | ||
252 | .thaw = platform_pm_thaw, \ | ||
253 | .poweroff = platform_pm_poweroff, \ | ||
254 | .restore = platform_pm_restore, \ | ||
255 | .suspend_noirq = platform_pm_suspend_noirq, \ | ||
256 | .resume_noirq = platform_pm_resume_noirq, \ | ||
257 | .freeze_noirq = platform_pm_freeze_noirq, \ | ||
258 | .thaw_noirq = platform_pm_thaw_noirq, \ | ||
259 | .poweroff_noirq = platform_pm_poweroff_noirq, \ | ||
260 | .restore_noirq = platform_pm_restore_noirq, | ||
261 | #else | ||
262 | #define USE_PLATFORM_PM_SLEEP_OPS | ||
263 | #endif | ||
264 | |||
208 | #endif /* _PLATFORM_DEVICE_H_ */ | 265 | #endif /* _PLATFORM_DEVICE_H_ */ |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 512e09177e57..3160648ccdda 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -460,6 +460,7 @@ struct dev_pm_info { | |||
460 | unsigned long active_jiffies; | 460 | unsigned long active_jiffies; |
461 | unsigned long suspended_jiffies; | 461 | unsigned long suspended_jiffies; |
462 | unsigned long accounting_timestamp; | 462 | unsigned long accounting_timestamp; |
463 | void *subsys_data; /* Owned by the subsystem. */ | ||
463 | #endif | 464 | #endif |
464 | }; | 465 | }; |
465 | 466 | ||
@@ -529,21 +530,17 @@ struct dev_power_domain { | |||
529 | */ | 530 | */ |
530 | 531 | ||
531 | #ifdef CONFIG_PM_SLEEP | 532 | #ifdef CONFIG_PM_SLEEP |
532 | #ifndef CONFIG_ARCH_NO_SYSDEV_OPS | ||
533 | extern int sysdev_suspend(pm_message_t state); | ||
534 | extern int sysdev_resume(void); | ||
535 | #else | ||
536 | static inline int sysdev_suspend(pm_message_t state) { return 0; } | ||
537 | static inline int sysdev_resume(void) { return 0; } | ||
538 | #endif | ||
539 | |||
540 | extern void device_pm_lock(void); | 533 | extern void device_pm_lock(void); |
541 | extern void dpm_resume_noirq(pm_message_t state); | 534 | extern void dpm_resume_noirq(pm_message_t state); |
542 | extern void dpm_resume_end(pm_message_t state); | 535 | extern void dpm_resume_end(pm_message_t state); |
536 | extern void dpm_resume(pm_message_t state); | ||
537 | extern void dpm_complete(pm_message_t state); | ||
543 | 538 | ||
544 | extern void device_pm_unlock(void); | 539 | extern void device_pm_unlock(void); |
545 | extern int dpm_suspend_noirq(pm_message_t state); | 540 | extern int dpm_suspend_noirq(pm_message_t state); |
546 | extern int dpm_suspend_start(pm_message_t state); | 541 | extern int dpm_suspend_start(pm_message_t state); |
542 | extern int dpm_suspend(pm_message_t state); | ||
543 | extern int dpm_prepare(pm_message_t state); | ||
547 | 544 | ||
548 | extern void __suspend_report_result(const char *function, void *fn, int ret); | 545 | extern void __suspend_report_result(const char *function, void *fn, int ret); |
549 | 546 | ||
@@ -553,6 +550,16 @@ extern void __suspend_report_result(const char *function, void *fn, int ret); | |||
553 | } while (0) | 550 | } while (0) |
554 | 551 | ||
555 | extern int device_pm_wait_for_dev(struct device *sub, struct device *dev); | 552 | extern int device_pm_wait_for_dev(struct device *sub, struct device *dev); |
553 | |||
554 | extern int pm_generic_prepare(struct device *dev); | ||
555 | extern int pm_generic_suspend(struct device *dev); | ||
556 | extern int pm_generic_resume(struct device *dev); | ||
557 | extern int pm_generic_freeze(struct device *dev); | ||
558 | extern int pm_generic_thaw(struct device *dev); | ||
559 | extern int pm_generic_restore(struct device *dev); | ||
560 | extern int pm_generic_poweroff(struct device *dev); | ||
561 | extern void pm_generic_complete(struct device *dev); | ||
562 | |||
556 | #else /* !CONFIG_PM_SLEEP */ | 563 | #else /* !CONFIG_PM_SLEEP */ |
557 | 564 | ||
558 | #define device_pm_lock() do {} while (0) | 565 | #define device_pm_lock() do {} while (0) |
@@ -569,6 +576,15 @@ static inline int device_pm_wait_for_dev(struct device *a, struct device *b) | |||
569 | { | 576 | { |
570 | return 0; | 577 | return 0; |
571 | } | 578 | } |
579 | |||
580 | #define pm_generic_prepare NULL | ||
581 | #define pm_generic_suspend NULL | ||
582 | #define pm_generic_resume NULL | ||
583 | #define pm_generic_freeze NULL | ||
584 | #define pm_generic_thaw NULL | ||
585 | #define pm_generic_restore NULL | ||
586 | #define pm_generic_poweroff NULL | ||
587 | #define pm_generic_complete NULL | ||
572 | #endif /* !CONFIG_PM_SLEEP */ | 588 | #endif /* !CONFIG_PM_SLEEP */ |
573 | 589 | ||
574 | /* How to reorder dpm_list after device_move() */ | 590 | /* How to reorder dpm_list after device_move() */ |
@@ -579,11 +595,4 @@ enum dpm_order { | |||
579 | DPM_ORDER_DEV_LAST, | 595 | DPM_ORDER_DEV_LAST, |
580 | }; | 596 | }; |
581 | 597 | ||
582 | extern int pm_generic_suspend(struct device *dev); | ||
583 | extern int pm_generic_resume(struct device *dev); | ||
584 | extern int pm_generic_freeze(struct device *dev); | ||
585 | extern int pm_generic_thaw(struct device *dev); | ||
586 | extern int pm_generic_restore(struct device *dev); | ||
587 | extern int pm_generic_poweroff(struct device *dev); | ||
588 | |||
589 | #endif /* _LINUX_PM_H */ | 598 | #endif /* _LINUX_PM_H */ |
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 8de9aa6e7def..878cf84baeb1 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
@@ -245,4 +245,46 @@ static inline void pm_runtime_dont_use_autosuspend(struct device *dev) | |||
245 | __pm_runtime_use_autosuspend(dev, false); | 245 | __pm_runtime_use_autosuspend(dev, false); |
246 | } | 246 | } |
247 | 247 | ||
248 | struct pm_clk_notifier_block { | ||
249 | struct notifier_block nb; | ||
250 | struct dev_power_domain *pwr_domain; | ||
251 | char *con_ids[]; | ||
252 | }; | ||
253 | |||
254 | #ifdef CONFIG_PM_RUNTIME_CLK | ||
255 | extern int pm_runtime_clk_init(struct device *dev); | ||
256 | extern void pm_runtime_clk_destroy(struct device *dev); | ||
257 | extern int pm_runtime_clk_add(struct device *dev, const char *con_id); | ||
258 | extern void pm_runtime_clk_remove(struct device *dev, const char *con_id); | ||
259 | extern int pm_runtime_clk_suspend(struct device *dev); | ||
260 | extern int pm_runtime_clk_resume(struct device *dev); | ||
261 | #else | ||
262 | static inline int pm_runtime_clk_init(struct device *dev) | ||
263 | { | ||
264 | return -EINVAL; | ||
265 | } | ||
266 | static inline void pm_runtime_clk_destroy(struct device *dev) | ||
267 | { | ||
268 | } | ||
269 | static inline int pm_runtime_clk_add(struct device *dev, const char *con_id) | ||
270 | { | ||
271 | return -EINVAL; | ||
272 | } | ||
273 | static inline void pm_runtime_clk_remove(struct device *dev, const char *con_id) | ||
274 | { | ||
275 | } | ||
276 | #define pm_runtime_clock_suspend NULL | ||
277 | #define pm_runtime_clock_resume NULL | ||
278 | #endif | ||
279 | |||
280 | #ifdef CONFIG_HAVE_CLK | ||
281 | extern void pm_runtime_clk_add_notifier(struct bus_type *bus, | ||
282 | struct pm_clk_notifier_block *clknb); | ||
283 | #else | ||
284 | static inline void pm_runtime_clk_add_notifier(struct bus_type *bus, | ||
285 | struct pm_clk_notifier_block *clknb) | ||
286 | { | ||
287 | } | ||
288 | #endif | ||
289 | |||
248 | #endif | 290 | #endif |
diff --git a/include/linux/posix-clock.h b/include/linux/posix-clock.h index 7f1183dcd119..34c4498b800f 100644 --- a/include/linux/posix-clock.h +++ b/include/linux/posix-clock.h | |||
@@ -45,7 +45,7 @@ struct posix_clock; | |||
45 | * @timer_create: Create a new timer | 45 | * @timer_create: Create a new timer |
46 | * @timer_delete: Remove a previously created timer | 46 | * @timer_delete: Remove a previously created timer |
47 | * @timer_gettime: Get remaining time and interval of a timer | 47 | * @timer_gettime: Get remaining time and interval of a timer |
48 | * @timer_setttime: Set a timer's initial expiration and interval | 48 | * @timer_settime: Set a timer's initial expiration and interval |
49 | * @fasync: Optional character device fasync method | 49 | * @fasync: Optional character device fasync method |
50 | * @mmap: Optional character device mmap method | 50 | * @mmap: Optional character device mmap method |
51 | * @open: Optional character device open method | 51 | * @open: Optional character device open method |
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h index d51243ae0726..808227d40a64 100644 --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/list.h> | 5 | #include <linux/list.h> |
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | #include <linux/timex.h> | 7 | #include <linux/timex.h> |
8 | #include <linux/alarmtimer.h> | ||
8 | 9 | ||
9 | union cpu_time_count { | 10 | union cpu_time_count { |
10 | cputime_t cpu; | 11 | cputime_t cpu; |
@@ -80,6 +81,7 @@ struct k_itimer { | |||
80 | unsigned long incr; | 81 | unsigned long incr; |
81 | unsigned long expires; | 82 | unsigned long expires; |
82 | } mmtimer; | 83 | } mmtimer; |
84 | struct alarm alarmtimer; | ||
83 | } it; | 85 | } it; |
84 | }; | 86 | }; |
85 | 87 | ||
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 838c1149251a..eaf4350c0f90 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -208,6 +208,8 @@ static inline struct proc_dir_entry *proc_symlink(const char *name, | |||
208 | struct proc_dir_entry *parent,const char *dest) {return NULL;} | 208 | struct proc_dir_entry *parent,const char *dest) {return NULL;} |
209 | static inline struct proc_dir_entry *proc_mkdir(const char *name, | 209 | static inline struct proc_dir_entry *proc_mkdir(const char *name, |
210 | struct proc_dir_entry *parent) {return NULL;} | 210 | struct proc_dir_entry *parent) {return NULL;} |
211 | static inline struct proc_dir_entry *proc_mkdir_mode(const char *name, | ||
212 | mode_t mode, struct proc_dir_entry *parent) { return NULL; } | ||
211 | 213 | ||
212 | static inline struct proc_dir_entry *create_proc_read_entry(const char *name, | 214 | static inline struct proc_dir_entry *create_proc_read_entry(const char *name, |
213 | mode_t mode, struct proc_dir_entry *base, | 215 | mode_t mode, struct proc_dir_entry *base, |
diff --git a/include/linux/pstore.h b/include/linux/pstore.h index 41977737bb7d..2455ef2683f0 100644 --- a/include/linux/pstore.h +++ b/include/linux/pstore.h | |||
@@ -35,7 +35,9 @@ struct pstore_info { | |||
35 | struct mutex buf_mutex; /* serialize access to 'buf' */ | 35 | struct mutex buf_mutex; /* serialize access to 'buf' */ |
36 | char *buf; | 36 | char *buf; |
37 | size_t bufsize; | 37 | size_t bufsize; |
38 | size_t (*read)(u64 *id, enum pstore_type_id *type, | 38 | int (*open)(struct pstore_info *psi); |
39 | int (*close)(struct pstore_info *psi); | ||
40 | ssize_t (*read)(u64 *id, enum pstore_type_id *type, | ||
39 | struct timespec *time); | 41 | struct timespec *time); |
40 | u64 (*write)(enum pstore_type_id type, size_t size); | 42 | u64 (*write)(enum pstore_type_id type, size_t size); |
41 | int (*erase)(u64 id); | 43 | int (*erase)(u64 id); |
diff --git a/include/linux/pti.h b/include/linux/pti.h new file mode 100644 index 000000000000..81af667bb2d5 --- /dev/null +++ b/include/linux/pti.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* | ||
2 | * Copyright (C) Intel 2011 | ||
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 version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
14 | * | ||
15 | * The PTI (Parallel Trace Interface) driver directs trace data routed from | ||
16 | * various parts in the system out through the Intel Penwell PTI port and | ||
17 | * out of the mobile device for analysis with a debugging tool | ||
18 | * (Lauterbach, Fido). This is part of a solution for the MIPI P1149.7, | ||
19 | * compact JTAG, standard. | ||
20 | * | ||
21 | * This header file will allow other parts of the OS to use the | ||
22 | * interface to write out it's contents for debugging a mobile system. | ||
23 | */ | ||
24 | |||
25 | #ifndef PTI_H_ | ||
26 | #define PTI_H_ | ||
27 | |||
28 | /* offset for last dword of any PTI message. Part of MIPI P1149.7 */ | ||
29 | #define PTI_LASTDWORD_DTS 0x30 | ||
30 | |||
31 | /* basic structure used as a write address to the PTI HW */ | ||
32 | struct pti_masterchannel { | ||
33 | u8 master; | ||
34 | u8 channel; | ||
35 | }; | ||
36 | |||
37 | /* the following functions are defined in misc/pti.c */ | ||
38 | void pti_writedata(struct pti_masterchannel *mc, u8 *buf, int count); | ||
39 | struct pti_masterchannel *pti_request_masterchannel(u8 type); | ||
40 | void pti_release_masterchannel(struct pti_masterchannel *mc); | ||
41 | |||
42 | #endif /*PTI_H_*/ | ||
diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h index 7066acb2c530..033b507b33b1 100644 --- a/include/linux/rbtree.h +++ b/include/linux/rbtree.h | |||
@@ -136,6 +136,14 @@ static inline void rb_set_color(struct rb_node *rb, int color) | |||
136 | #define RB_EMPTY_NODE(node) (rb_parent(node) == node) | 136 | #define RB_EMPTY_NODE(node) (rb_parent(node) == node) |
137 | #define RB_CLEAR_NODE(node) (rb_set_parent(node, node)) | 137 | #define RB_CLEAR_NODE(node) (rb_set_parent(node, node)) |
138 | 138 | ||
139 | static inline void rb_init_node(struct rb_node *rb) | ||
140 | { | ||
141 | rb->rb_parent_color = 0; | ||
142 | rb->rb_right = NULL; | ||
143 | rb->rb_left = NULL; | ||
144 | RB_CLEAR_NODE(rb); | ||
145 | } | ||
146 | |||
139 | extern void rb_insert_color(struct rb_node *, struct rb_root *); | 147 | extern void rb_insert_color(struct rb_node *, struct rb_root *); |
140 | extern void rb_erase(struct rb_node *, struct rb_root *); | 148 | extern void rb_erase(struct rb_node *, struct rb_root *); |
141 | 149 | ||
diff --git a/include/linux/rculist.h b/include/linux/rculist.h index 2dea94fc4402..e3beb315517a 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h | |||
@@ -253,7 +253,7 @@ static inline void list_splice_init_rcu(struct list_head *list, | |||
253 | */ | 253 | */ |
254 | #define list_for_each_entry_rcu(pos, head, member) \ | 254 | #define list_for_each_entry_rcu(pos, head, member) \ |
255 | for (pos = list_entry_rcu((head)->next, typeof(*pos), member); \ | 255 | for (pos = list_entry_rcu((head)->next, typeof(*pos), member); \ |
256 | prefetch(pos->member.next), &pos->member != (head); \ | 256 | &pos->member != (head); \ |
257 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | 257 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) |
258 | 258 | ||
259 | 259 | ||
@@ -270,7 +270,7 @@ static inline void list_splice_init_rcu(struct list_head *list, | |||
270 | */ | 270 | */ |
271 | #define list_for_each_continue_rcu(pos, head) \ | 271 | #define list_for_each_continue_rcu(pos, head) \ |
272 | for ((pos) = rcu_dereference_raw(list_next_rcu(pos)); \ | 272 | for ((pos) = rcu_dereference_raw(list_next_rcu(pos)); \ |
273 | prefetch((pos)->next), (pos) != (head); \ | 273 | (pos) != (head); \ |
274 | (pos) = rcu_dereference_raw(list_next_rcu(pos))) | 274 | (pos) = rcu_dereference_raw(list_next_rcu(pos))) |
275 | 275 | ||
276 | /** | 276 | /** |
@@ -284,7 +284,7 @@ static inline void list_splice_init_rcu(struct list_head *list, | |||
284 | */ | 284 | */ |
285 | #define list_for_each_entry_continue_rcu(pos, head, member) \ | 285 | #define list_for_each_entry_continue_rcu(pos, head, member) \ |
286 | for (pos = list_entry_rcu(pos->member.next, typeof(*pos), member); \ | 286 | for (pos = list_entry_rcu(pos->member.next, typeof(*pos), member); \ |
287 | prefetch(pos->member.next), &pos->member != (head); \ | 287 | &pos->member != (head); \ |
288 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | 288 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) |
289 | 289 | ||
290 | /** | 290 | /** |
@@ -427,7 +427,7 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, | |||
427 | 427 | ||
428 | #define __hlist_for_each_rcu(pos, head) \ | 428 | #define __hlist_for_each_rcu(pos, head) \ |
429 | for (pos = rcu_dereference(hlist_first_rcu(head)); \ | 429 | for (pos = rcu_dereference(hlist_first_rcu(head)); \ |
430 | pos && ({ prefetch(pos->next); 1; }); \ | 430 | pos; \ |
431 | pos = rcu_dereference(hlist_next_rcu(pos))) | 431 | pos = rcu_dereference(hlist_next_rcu(pos))) |
432 | 432 | ||
433 | /** | 433 | /** |
@@ -443,7 +443,7 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, | |||
443 | */ | 443 | */ |
444 | #define hlist_for_each_entry_rcu(tpos, pos, head, member) \ | 444 | #define hlist_for_each_entry_rcu(tpos, pos, head, member) \ |
445 | for (pos = rcu_dereference_raw(hlist_first_rcu(head)); \ | 445 | for (pos = rcu_dereference_raw(hlist_first_rcu(head)); \ |
446 | pos && ({ prefetch(pos->next); 1; }) && \ | 446 | pos && \ |
447 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ | 447 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ |
448 | pos = rcu_dereference_raw(hlist_next_rcu(pos))) | 448 | pos = rcu_dereference_raw(hlist_next_rcu(pos))) |
449 | 449 | ||
@@ -460,7 +460,7 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, | |||
460 | */ | 460 | */ |
461 | #define hlist_for_each_entry_rcu_bh(tpos, pos, head, member) \ | 461 | #define hlist_for_each_entry_rcu_bh(tpos, pos, head, member) \ |
462 | for (pos = rcu_dereference_bh((head)->first); \ | 462 | for (pos = rcu_dereference_bh((head)->first); \ |
463 | pos && ({ prefetch(pos->next); 1; }) && \ | 463 | pos && \ |
464 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ | 464 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ |
465 | pos = rcu_dereference_bh(pos->next)) | 465 | pos = rcu_dereference_bh(pos->next)) |
466 | 466 | ||
@@ -472,7 +472,7 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, | |||
472 | */ | 472 | */ |
473 | #define hlist_for_each_entry_continue_rcu(tpos, pos, member) \ | 473 | #define hlist_for_each_entry_continue_rcu(tpos, pos, member) \ |
474 | for (pos = rcu_dereference((pos)->next); \ | 474 | for (pos = rcu_dereference((pos)->next); \ |
475 | pos && ({ prefetch(pos->next); 1; }) && \ | 475 | pos && \ |
476 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ | 476 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ |
477 | pos = rcu_dereference(pos->next)) | 477 | pos = rcu_dereference(pos->next)) |
478 | 478 | ||
@@ -484,7 +484,7 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, | |||
484 | */ | 484 | */ |
485 | #define hlist_for_each_entry_continue_rcu_bh(tpos, pos, member) \ | 485 | #define hlist_for_each_entry_continue_rcu_bh(tpos, pos, member) \ |
486 | for (pos = rcu_dereference_bh((pos)->next); \ | 486 | for (pos = rcu_dereference_bh((pos)->next); \ |
487 | pos && ({ prefetch(pos->next); 1; }) && \ | 487 | pos && \ |
488 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ | 488 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ |
489 | pos = rcu_dereference_bh(pos->next)) | 489 | pos = rcu_dereference_bh(pos->next)) |
490 | 490 | ||
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index ff422d2b7f90..99f9aa7c2804 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -47,6 +47,18 @@ | |||
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 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) | ||
51 | extern void rcutorture_record_test_transition(void); | ||
52 | extern void rcutorture_record_progress(unsigned long vernum); | ||
53 | #else | ||
54 | static inline void rcutorture_record_test_transition(void) | ||
55 | { | ||
56 | } | ||
57 | static inline void rcutorture_record_progress(unsigned long vernum) | ||
58 | { | ||
59 | } | ||
60 | #endif | ||
61 | |||
50 | #define UINT_CMP_GE(a, b) (UINT_MAX / 2 >= (a) - (b)) | 62 | #define UINT_CMP_GE(a, b) (UINT_MAX / 2 >= (a) - (b)) |
51 | #define UINT_CMP_LT(a, b) (UINT_MAX / 2 < (a) - (b)) | 63 | #define UINT_CMP_LT(a, b) (UINT_MAX / 2 < (a) - (b)) |
52 | #define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b)) | 64 | #define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b)) |
@@ -68,7 +80,6 @@ extern void call_rcu_sched(struct rcu_head *head, | |||
68 | extern void synchronize_sched(void); | 80 | extern void synchronize_sched(void); |
69 | extern void rcu_barrier_bh(void); | 81 | extern void rcu_barrier_bh(void); |
70 | extern void rcu_barrier_sched(void); | 82 | extern void rcu_barrier_sched(void); |
71 | extern int sched_expedited_torture_stats(char *page); | ||
72 | 83 | ||
73 | static inline void __rcu_read_lock_bh(void) | 84 | static inline void __rcu_read_lock_bh(void) |
74 | { | 85 | { |
@@ -774,6 +785,7 @@ extern struct debug_obj_descr rcuhead_debug_descr; | |||
774 | 785 | ||
775 | static inline void debug_rcu_head_queue(struct rcu_head *head) | 786 | static inline void debug_rcu_head_queue(struct rcu_head *head) |
776 | { | 787 | { |
788 | WARN_ON_ONCE((unsigned long)head & 0x3); | ||
777 | debug_object_activate(head, &rcuhead_debug_descr); | 789 | debug_object_activate(head, &rcuhead_debug_descr); |
778 | debug_object_active_state(head, &rcuhead_debug_descr, | 790 | debug_object_active_state(head, &rcuhead_debug_descr, |
779 | STATE_RCU_HEAD_READY, | 791 | STATE_RCU_HEAD_READY, |
@@ -797,4 +809,60 @@ static inline void debug_rcu_head_unqueue(struct rcu_head *head) | |||
797 | } | 809 | } |
798 | #endif /* #else !CONFIG_DEBUG_OBJECTS_RCU_HEAD */ | 810 | #endif /* #else !CONFIG_DEBUG_OBJECTS_RCU_HEAD */ |
799 | 811 | ||
812 | static __always_inline bool __is_kfree_rcu_offset(unsigned long offset) | ||
813 | { | ||
814 | return offset < 4096; | ||
815 | } | ||
816 | |||
817 | static __always_inline | ||
818 | void __kfree_rcu(struct rcu_head *head, unsigned long offset) | ||
819 | { | ||
820 | typedef void (*rcu_callback)(struct rcu_head *); | ||
821 | |||
822 | BUILD_BUG_ON(!__builtin_constant_p(offset)); | ||
823 | |||
824 | /* See the kfree_rcu() header comment. */ | ||
825 | BUILD_BUG_ON(!__is_kfree_rcu_offset(offset)); | ||
826 | |||
827 | call_rcu(head, (rcu_callback)offset); | ||
828 | } | ||
829 | |||
830 | extern void kfree(const void *); | ||
831 | |||
832 | static inline void __rcu_reclaim(struct rcu_head *head) | ||
833 | { | ||
834 | unsigned long offset = (unsigned long)head->func; | ||
835 | |||
836 | if (__is_kfree_rcu_offset(offset)) | ||
837 | kfree((void *)head - offset); | ||
838 | else | ||
839 | head->func(head); | ||
840 | } | ||
841 | |||
842 | /** | ||
843 | * kfree_rcu() - kfree an object after a grace period. | ||
844 | * @ptr: pointer to kfree | ||
845 | * @rcu_head: the name of the struct rcu_head within the type of @ptr. | ||
846 | * | ||
847 | * Many rcu callbacks functions just call kfree() on the base structure. | ||
848 | * These functions are trivial, but their size adds up, and furthermore | ||
849 | * when they are used in a kernel module, that module must invoke the | ||
850 | * high-latency rcu_barrier() function at module-unload time. | ||
851 | * | ||
852 | * The kfree_rcu() function handles this issue. Rather than encoding a | ||
853 | * function address in the embedded rcu_head structure, kfree_rcu() instead | ||
854 | * encodes the offset of the rcu_head structure within the base structure. | ||
855 | * Because the functions are not allowed in the low-order 4096 bytes of | ||
856 | * kernel virtual memory, offsets up to 4095 bytes can be accommodated. | ||
857 | * If the offset is larger than 4095 bytes, a compile-time error will | ||
858 | * be generated in __kfree_rcu(). If this error is triggered, you can | ||
859 | * either fall back to use of call_rcu() or rearrange the structure to | ||
860 | * position the rcu_head structure into the first 4096 bytes. | ||
861 | * | ||
862 | * Note that the allowable offset might decrease in the future, for example, | ||
863 | * to allow something like kmem_cache_free_rcu(). | ||
864 | */ | ||
865 | #define kfree_rcu(ptr, rcu_head) \ | ||
866 | __kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head)) | ||
867 | |||
800 | #endif /* __LINUX_RCUPDATE_H */ | 868 | #endif /* __LINUX_RCUPDATE_H */ |
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index 30ebd7c8d874..52b3e0281fd0 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h | |||
@@ -100,6 +100,14 @@ static inline void rcu_note_context_switch(int cpu) | |||
100 | } | 100 | } |
101 | 101 | ||
102 | /* | 102 | /* |
103 | * Take advantage of the fact that there is only one CPU, which | ||
104 | * allows us to ignore virtualization-based context switches. | ||
105 | */ | ||
106 | static inline void rcu_virt_note_context_switch(int cpu) | ||
107 | { | ||
108 | } | ||
109 | |||
110 | /* | ||
103 | * Return the number of grace periods. | 111 | * Return the number of grace periods. |
104 | */ | 112 | */ |
105 | static inline long rcu_batches_completed(void) | 113 | static inline long rcu_batches_completed(void) |
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 3a933482734a..e65d06634dd8 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
@@ -35,6 +35,16 @@ extern void rcu_note_context_switch(int cpu); | |||
35 | extern int rcu_needs_cpu(int cpu); | 35 | extern int rcu_needs_cpu(int cpu); |
36 | extern void rcu_cpu_stall_reset(void); | 36 | extern void rcu_cpu_stall_reset(void); |
37 | 37 | ||
38 | /* | ||
39 | * Note a virtualization-based context switch. This is simply a | ||
40 | * wrapper around rcu_note_context_switch(), which allows TINY_RCU | ||
41 | * to save a few bytes. | ||
42 | */ | ||
43 | static inline void rcu_virt_note_context_switch(int cpu) | ||
44 | { | ||
45 | rcu_note_context_switch(cpu); | ||
46 | } | ||
47 | |||
38 | #ifdef CONFIG_TREE_PREEMPT_RCU | 48 | #ifdef CONFIG_TREE_PREEMPT_RCU |
39 | 49 | ||
40 | extern void exit_rcu(void); | 50 | extern void exit_rcu(void); |
@@ -58,9 +68,12 @@ static inline void synchronize_rcu_bh_expedited(void) | |||
58 | 68 | ||
59 | extern void rcu_barrier(void); | 69 | extern void rcu_barrier(void); |
60 | 70 | ||
71 | extern unsigned long rcutorture_testseq; | ||
72 | extern unsigned long rcutorture_vernum; | ||
61 | extern long rcu_batches_completed(void); | 73 | extern long rcu_batches_completed(void); |
62 | extern long rcu_batches_completed_bh(void); | 74 | extern long rcu_batches_completed_bh(void); |
63 | extern long rcu_batches_completed_sched(void); | 75 | extern long rcu_batches_completed_sched(void); |
76 | |||
64 | extern void rcu_force_quiescent_state(void); | 77 | extern void rcu_force_quiescent_state(void); |
65 | extern void rcu_bh_force_quiescent_state(void); | 78 | extern void rcu_bh_force_quiescent_state(void); |
66 | extern void rcu_sched_force_quiescent_state(void); | 79 | extern void rcu_sched_force_quiescent_state(void); |
diff --git a/include/linux/rfkill-regulator.h b/include/linux/rfkill-regulator.h new file mode 100644 index 000000000000..aca36bc83315 --- /dev/null +++ b/include/linux/rfkill-regulator.h | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * rfkill-regulator.c - Regulator consumer driver for rfkill | ||
3 | * | ||
4 | * Copyright (C) 2009 Guiming Zhuo <gmzhuo@gmail.com> | ||
5 | * Copyright (C) 2011 Antonio Ospite <ospite@studenti.unina.it> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #ifndef __LINUX_RFKILL_REGULATOR_H | ||
14 | #define __LINUX_RFKILL_REGULATOR_H | ||
15 | |||
16 | /* | ||
17 | * Use "vrfkill" as supply id when declaring the regulator consumer: | ||
18 | * | ||
19 | * static struct regulator_consumer_supply pcap_regulator_V6_consumers [] = { | ||
20 | * { .dev_name = "rfkill-regulator.0", .supply = "vrfkill" }, | ||
21 | * }; | ||
22 | * | ||
23 | * If you have several regulator driven rfkill, you can append a numerical id to | ||
24 | * .dev_name as done above, and use the same id when declaring the platform | ||
25 | * device: | ||
26 | * | ||
27 | * static struct rfkill_regulator_platform_data ezx_rfkill_bt_data = { | ||
28 | * .name = "ezx-bluetooth", | ||
29 | * .type = RFKILL_TYPE_BLUETOOTH, | ||
30 | * }; | ||
31 | * | ||
32 | * static struct platform_device a910_rfkill = { | ||
33 | * .name = "rfkill-regulator", | ||
34 | * .id = 0, | ||
35 | * .dev = { | ||
36 | * .platform_data = &ezx_rfkill_bt_data, | ||
37 | * }, | ||
38 | * }; | ||
39 | */ | ||
40 | |||
41 | #include <linux/rfkill.h> | ||
42 | |||
43 | struct rfkill_regulator_platform_data { | ||
44 | char *name; /* the name for the rfkill switch */ | ||
45 | enum rfkill_type type; /* the type as specified in rfkill.h */ | ||
46 | }; | ||
47 | |||
48 | #endif /* __LINUX_RFKILL_REGULATOR_H */ | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 781abd137673..aaf71e08222c 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -315,7 +315,6 @@ extern int proc_dowatchdog_thresh(struct ctl_table *table, int write, | |||
315 | void __user *buffer, | 315 | void __user *buffer, |
316 | size_t *lenp, loff_t *ppos); | 316 | size_t *lenp, loff_t *ppos); |
317 | extern unsigned int softlockup_panic; | 317 | extern unsigned int softlockup_panic; |
318 | extern int softlockup_thresh; | ||
319 | void lockup_detector_init(void); | 318 | void lockup_detector_init(void); |
320 | #else | 319 | #else |
321 | static inline void touch_softlockup_watchdog(void) | 320 | static inline void touch_softlockup_watchdog(void) |
@@ -360,7 +359,7 @@ extern signed long schedule_timeout_interruptible(signed long timeout); | |||
360 | extern signed long schedule_timeout_killable(signed long timeout); | 359 | extern signed long schedule_timeout_killable(signed long timeout); |
361 | extern signed long schedule_timeout_uninterruptible(signed long timeout); | 360 | extern signed long schedule_timeout_uninterruptible(signed long timeout); |
362 | asmlinkage void schedule(void); | 361 | asmlinkage void schedule(void); |
363 | extern int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner); | 362 | extern int mutex_spin_on_owner(struct mutex *lock, struct task_struct *owner); |
364 | 363 | ||
365 | struct nsproxy; | 364 | struct nsproxy; |
366 | struct user_namespace; | 365 | struct user_namespace; |
@@ -653,9 +652,8 @@ struct signal_struct { | |||
653 | * Bits in flags field of signal_struct. | 652 | * Bits in flags field of signal_struct. |
654 | */ | 653 | */ |
655 | #define SIGNAL_STOP_STOPPED 0x00000001 /* job control stop in effect */ | 654 | #define SIGNAL_STOP_STOPPED 0x00000001 /* job control stop in effect */ |
656 | #define SIGNAL_STOP_DEQUEUED 0x00000002 /* stop signal dequeued */ | 655 | #define SIGNAL_STOP_CONTINUED 0x00000002 /* SIGCONT since WCONTINUED reap */ |
657 | #define SIGNAL_STOP_CONTINUED 0x00000004 /* SIGCONT since WCONTINUED reap */ | 656 | #define SIGNAL_GROUP_EXIT 0x00000004 /* group exit in progress */ |
658 | #define SIGNAL_GROUP_EXIT 0x00000008 /* group exit in progress */ | ||
659 | /* | 657 | /* |
660 | * Pending notifications to parent. | 658 | * Pending notifications to parent. |
661 | */ | 659 | */ |
@@ -731,10 +729,6 @@ struct sched_info { | |||
731 | /* timestamps */ | 729 | /* timestamps */ |
732 | unsigned long long last_arrival,/* when we last ran on a cpu */ | 730 | unsigned long long last_arrival,/* when we last ran on a cpu */ |
733 | last_queued; /* when we were last queued to run */ | 731 | last_queued; /* when we were last queued to run */ |
734 | #ifdef CONFIG_SCHEDSTATS | ||
735 | /* BKL stats */ | ||
736 | unsigned int bkl_count; | ||
737 | #endif | ||
738 | }; | 732 | }; |
739 | #endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */ | 733 | #endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */ |
740 | 734 | ||
@@ -792,17 +786,39 @@ enum cpu_idle_type { | |||
792 | }; | 786 | }; |
793 | 787 | ||
794 | /* | 788 | /* |
795 | * sched-domains (multiprocessor balancing) declarations: | 789 | * Increase resolution of nice-level calculations for 64-bit architectures. |
790 | * The extra resolution improves shares distribution and load balancing of | ||
791 | * low-weight task groups (eg. nice +19 on an autogroup), deeper taskgroup | ||
792 | * hierarchies, especially on larger systems. This is not a user-visible change | ||
793 | * and does not change the user-interface for setting shares/weights. | ||
794 | * | ||
795 | * We increase resolution only if we have enough bits to allow this increased | ||
796 | * resolution (i.e. BITS_PER_LONG > 32). The costs for increasing resolution | ||
797 | * when BITS_PER_LONG <= 32 are pretty high and the returns do not justify the | ||
798 | * increased costs. | ||
796 | */ | 799 | */ |
800 | #if BITS_PER_LONG > 32 | ||
801 | # define SCHED_LOAD_RESOLUTION 10 | ||
802 | # define scale_load(w) ((w) << SCHED_LOAD_RESOLUTION) | ||
803 | # define scale_load_down(w) ((w) >> SCHED_LOAD_RESOLUTION) | ||
804 | #else | ||
805 | # define SCHED_LOAD_RESOLUTION 0 | ||
806 | # define scale_load(w) (w) | ||
807 | # define scale_load_down(w) (w) | ||
808 | #endif | ||
797 | 809 | ||
798 | /* | 810 | #define SCHED_LOAD_SHIFT (10 + SCHED_LOAD_RESOLUTION) |
799 | * Increase resolution of nice-level calculations: | ||
800 | */ | ||
801 | #define SCHED_LOAD_SHIFT 10 | ||
802 | #define SCHED_LOAD_SCALE (1L << SCHED_LOAD_SHIFT) | 811 | #define SCHED_LOAD_SCALE (1L << SCHED_LOAD_SHIFT) |
803 | 812 | ||
804 | #define SCHED_LOAD_SCALE_FUZZ SCHED_LOAD_SCALE | 813 | /* |
814 | * Increase resolution of cpu_power calculations | ||
815 | */ | ||
816 | #define SCHED_POWER_SHIFT 10 | ||
817 | #define SCHED_POWER_SCALE (1L << SCHED_POWER_SHIFT) | ||
805 | 818 | ||
819 | /* | ||
820 | * sched-domains (multiprocessor balancing) declarations: | ||
821 | */ | ||
806 | #ifdef CONFIG_SMP | 822 | #ifdef CONFIG_SMP |
807 | #define SD_LOAD_BALANCE 0x0001 /* Do load balancing on this domain. */ | 823 | #define SD_LOAD_BALANCE 0x0001 /* Do load balancing on this domain. */ |
808 | #define SD_BALANCE_NEWIDLE 0x0002 /* Balance when about to become idle */ | 824 | #define SD_BALANCE_NEWIDLE 0x0002 /* Balance when about to become idle */ |
@@ -868,6 +884,7 @@ static inline int sd_power_saving_flags(void) | |||
868 | 884 | ||
869 | struct sched_group { | 885 | struct sched_group { |
870 | struct sched_group *next; /* Must be a circular list */ | 886 | struct sched_group *next; /* Must be a circular list */ |
887 | atomic_t ref; | ||
871 | 888 | ||
872 | /* | 889 | /* |
873 | * CPU power of this group, SCHED_LOAD_SCALE being max power for a | 890 | * CPU power of this group, SCHED_LOAD_SCALE being max power for a |
@@ -882,9 +899,6 @@ struct sched_group { | |||
882 | * NOTE: this field is variable length. (Allocated dynamically | 899 | * NOTE: this field is variable length. (Allocated dynamically |
883 | * by attaching extra space to the end of the structure, | 900 | * by attaching extra space to the end of the structure, |
884 | * depending on how many CPUs the kernel has booted up with) | 901 | * depending on how many CPUs the kernel has booted up with) |
885 | * | ||
886 | * It is also be embedded into static data structures at build | ||
887 | * time. (See 'struct static_sched_group' in kernel/sched.c) | ||
888 | */ | 902 | */ |
889 | unsigned long cpumask[0]; | 903 | unsigned long cpumask[0]; |
890 | }; | 904 | }; |
@@ -894,17 +908,6 @@ static inline struct cpumask *sched_group_cpus(struct sched_group *sg) | |||
894 | return to_cpumask(sg->cpumask); | 908 | return to_cpumask(sg->cpumask); |
895 | } | 909 | } |
896 | 910 | ||
897 | enum sched_domain_level { | ||
898 | SD_LV_NONE = 0, | ||
899 | SD_LV_SIBLING, | ||
900 | SD_LV_MC, | ||
901 | SD_LV_BOOK, | ||
902 | SD_LV_CPU, | ||
903 | SD_LV_NODE, | ||
904 | SD_LV_ALLNODES, | ||
905 | SD_LV_MAX | ||
906 | }; | ||
907 | |||
908 | struct sched_domain_attr { | 911 | struct sched_domain_attr { |
909 | int relax_domain_level; | 912 | int relax_domain_level; |
910 | }; | 913 | }; |
@@ -913,6 +916,8 @@ struct sched_domain_attr { | |||
913 | .relax_domain_level = -1, \ | 916 | .relax_domain_level = -1, \ |
914 | } | 917 | } |
915 | 918 | ||
919 | extern int sched_domain_level_max; | ||
920 | |||
916 | struct sched_domain { | 921 | struct sched_domain { |
917 | /* These fields must be setup */ | 922 | /* These fields must be setup */ |
918 | struct sched_domain *parent; /* top domain must be null terminated */ | 923 | struct sched_domain *parent; /* top domain must be null terminated */ |
@@ -930,7 +935,7 @@ struct sched_domain { | |||
930 | unsigned int forkexec_idx; | 935 | unsigned int forkexec_idx; |
931 | unsigned int smt_gain; | 936 | unsigned int smt_gain; |
932 | int flags; /* See SD_* */ | 937 | int flags; /* See SD_* */ |
933 | enum sched_domain_level level; | 938 | int level; |
934 | 939 | ||
935 | /* Runtime fields. */ | 940 | /* Runtime fields. */ |
936 | unsigned long last_balance; /* init to jiffies. units in jiffies */ | 941 | unsigned long last_balance; /* init to jiffies. units in jiffies */ |
@@ -973,6 +978,10 @@ struct sched_domain { | |||
973 | #ifdef CONFIG_SCHED_DEBUG | 978 | #ifdef CONFIG_SCHED_DEBUG |
974 | char *name; | 979 | char *name; |
975 | #endif | 980 | #endif |
981 | union { | ||
982 | void *private; /* used during construction */ | ||
983 | struct rcu_head rcu; /* used during destruction */ | ||
984 | }; | ||
976 | 985 | ||
977 | unsigned int span_weight; | 986 | unsigned int span_weight; |
978 | /* | 987 | /* |
@@ -981,9 +990,6 @@ struct sched_domain { | |||
981 | * NOTE: this field is variable length. (Allocated dynamically | 990 | * NOTE: this field is variable length. (Allocated dynamically |
982 | * by attaching extra space to the end of the structure, | 991 | * by attaching extra space to the end of the structure, |
983 | * depending on how many CPUs the kernel has booted up with) | 992 | * depending on how many CPUs the kernel has booted up with) |
984 | * | ||
985 | * It is also be embedded into static data structures at build | ||
986 | * time. (See 'struct static_sched_domain' in kernel/sched.c) | ||
987 | */ | 993 | */ |
988 | unsigned long span[0]; | 994 | unsigned long span[0]; |
989 | }; | 995 | }; |
@@ -1048,8 +1054,12 @@ struct sched_domain; | |||
1048 | #define WF_FORK 0x02 /* child wakeup after fork */ | 1054 | #define WF_FORK 0x02 /* child wakeup after fork */ |
1049 | 1055 | ||
1050 | #define ENQUEUE_WAKEUP 1 | 1056 | #define ENQUEUE_WAKEUP 1 |
1051 | #define ENQUEUE_WAKING 2 | 1057 | #define ENQUEUE_HEAD 2 |
1052 | #define ENQUEUE_HEAD 4 | 1058 | #ifdef CONFIG_SMP |
1059 | #define ENQUEUE_WAKING 4 /* sched_class::task_waking was called */ | ||
1060 | #else | ||
1061 | #define ENQUEUE_WAKING 0 | ||
1062 | #endif | ||
1053 | 1063 | ||
1054 | #define DEQUEUE_SLEEP 1 | 1064 | #define DEQUEUE_SLEEP 1 |
1055 | 1065 | ||
@@ -1067,12 +1077,11 @@ struct sched_class { | |||
1067 | void (*put_prev_task) (struct rq *rq, struct task_struct *p); | 1077 | void (*put_prev_task) (struct rq *rq, struct task_struct *p); |
1068 | 1078 | ||
1069 | #ifdef CONFIG_SMP | 1079 | #ifdef CONFIG_SMP |
1070 | int (*select_task_rq)(struct rq *rq, struct task_struct *p, | 1080 | int (*select_task_rq)(struct task_struct *p, int sd_flag, int flags); |
1071 | int sd_flag, int flags); | ||
1072 | 1081 | ||
1073 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); | 1082 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); |
1074 | void (*post_schedule) (struct rq *this_rq); | 1083 | void (*post_schedule) (struct rq *this_rq); |
1075 | void (*task_waking) (struct rq *this_rq, struct task_struct *task); | 1084 | void (*task_waking) (struct task_struct *task); |
1076 | void (*task_woken) (struct rq *this_rq, struct task_struct *task); | 1085 | void (*task_woken) (struct rq *this_rq, struct task_struct *task); |
1077 | 1086 | ||
1078 | void (*set_cpus_allowed)(struct task_struct *p, | 1087 | void (*set_cpus_allowed)(struct task_struct *p, |
@@ -1197,13 +1206,11 @@ struct task_struct { | |||
1197 | unsigned int flags; /* per process flags, defined below */ | 1206 | unsigned int flags; /* per process flags, defined below */ |
1198 | unsigned int ptrace; | 1207 | unsigned int ptrace; |
1199 | 1208 | ||
1200 | int lock_depth; /* BKL lock depth */ | ||
1201 | |||
1202 | #ifdef CONFIG_SMP | 1209 | #ifdef CONFIG_SMP |
1203 | #ifdef __ARCH_WANT_UNLOCKED_CTXSW | 1210 | struct task_struct *wake_entry; |
1204 | int oncpu; | 1211 | int on_cpu; |
1205 | #endif | ||
1206 | #endif | 1212 | #endif |
1213 | int on_rq; | ||
1207 | 1214 | ||
1208 | int prio, static_prio, normal_prio; | 1215 | int prio, static_prio, normal_prio; |
1209 | unsigned int rt_priority; | 1216 | unsigned int rt_priority; |
@@ -1264,6 +1271,7 @@ struct task_struct { | |||
1264 | int exit_state; | 1271 | int exit_state; |
1265 | int exit_code, exit_signal; | 1272 | int exit_code, exit_signal; |
1266 | int pdeath_signal; /* The signal sent when the parent dies */ | 1273 | int pdeath_signal; /* The signal sent when the parent dies */ |
1274 | unsigned int group_stop; /* GROUP_STOP_*, siglock protected */ | ||
1267 | /* ??? */ | 1275 | /* ??? */ |
1268 | unsigned int personality; | 1276 | unsigned int personality; |
1269 | unsigned did_exec:1; | 1277 | unsigned did_exec:1; |
@@ -1274,6 +1282,7 @@ struct task_struct { | |||
1274 | 1282 | ||
1275 | /* Revert to default priority/policy when forking */ | 1283 | /* Revert to default priority/policy when forking */ |
1276 | unsigned sched_reset_on_fork:1; | 1284 | unsigned sched_reset_on_fork:1; |
1285 | unsigned sched_contributes_to_load:1; | ||
1277 | 1286 | ||
1278 | pid_t pid; | 1287 | pid_t pid; |
1279 | pid_t tgid; | 1288 | pid_t tgid; |
@@ -1783,6 +1792,17 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t * | |||
1783 | #define tsk_used_math(p) ((p)->flags & PF_USED_MATH) | 1792 | #define tsk_used_math(p) ((p)->flags & PF_USED_MATH) |
1784 | #define used_math() tsk_used_math(current) | 1793 | #define used_math() tsk_used_math(current) |
1785 | 1794 | ||
1795 | /* | ||
1796 | * task->group_stop flags | ||
1797 | */ | ||
1798 | #define GROUP_STOP_SIGMASK 0xffff /* signr of the last group stop */ | ||
1799 | #define GROUP_STOP_PENDING (1 << 16) /* task should stop for group stop */ | ||
1800 | #define GROUP_STOP_CONSUME (1 << 17) /* consume group stop count */ | ||
1801 | #define GROUP_STOP_TRAPPING (1 << 18) /* switching from STOPPED to TRACED */ | ||
1802 | #define GROUP_STOP_DEQUEUED (1 << 19) /* stop signal dequeued */ | ||
1803 | |||
1804 | extern void task_clear_group_stop_pending(struct task_struct *task); | ||
1805 | |||
1786 | #ifdef CONFIG_PREEMPT_RCU | 1806 | #ifdef CONFIG_PREEMPT_RCU |
1787 | 1807 | ||
1788 | #define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */ | 1808 | #define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */ |
@@ -2063,14 +2083,13 @@ extern void xtime_update(unsigned long ticks); | |||
2063 | 2083 | ||
2064 | extern int wake_up_state(struct task_struct *tsk, unsigned int state); | 2084 | extern int wake_up_state(struct task_struct *tsk, unsigned int state); |
2065 | extern int wake_up_process(struct task_struct *tsk); | 2085 | extern int wake_up_process(struct task_struct *tsk); |
2066 | extern void wake_up_new_task(struct task_struct *tsk, | 2086 | extern void wake_up_new_task(struct task_struct *tsk); |
2067 | unsigned long clone_flags); | ||
2068 | #ifdef CONFIG_SMP | 2087 | #ifdef CONFIG_SMP |
2069 | extern void kick_process(struct task_struct *tsk); | 2088 | extern void kick_process(struct task_struct *tsk); |
2070 | #else | 2089 | #else |
2071 | static inline void kick_process(struct task_struct *tsk) { } | 2090 | static inline void kick_process(struct task_struct *tsk) { } |
2072 | #endif | 2091 | #endif |
2073 | extern void sched_fork(struct task_struct *p, int clone_flags); | 2092 | extern void sched_fork(struct task_struct *p); |
2074 | extern void sched_dead(struct task_struct *p); | 2093 | extern void sched_dead(struct task_struct *p); |
2075 | 2094 | ||
2076 | extern void proc_caches_init(void); | 2095 | extern void proc_caches_init(void); |
@@ -2195,8 +2214,10 @@ extern void set_task_comm(struct task_struct *tsk, char *from); | |||
2195 | extern char *get_task_comm(char *to, struct task_struct *tsk); | 2214 | extern char *get_task_comm(char *to, struct task_struct *tsk); |
2196 | 2215 | ||
2197 | #ifdef CONFIG_SMP | 2216 | #ifdef CONFIG_SMP |
2217 | void scheduler_ipi(void); | ||
2198 | extern unsigned long wait_task_inactive(struct task_struct *, long match_state); | 2218 | extern unsigned long wait_task_inactive(struct task_struct *, long match_state); |
2199 | #else | 2219 | #else |
2220 | static inline void scheduler_ipi(void) { } | ||
2200 | static inline unsigned long wait_task_inactive(struct task_struct *p, | 2221 | static inline unsigned long wait_task_inactive(struct task_struct *p, |
2201 | long match_state) | 2222 | long match_state) |
2202 | { | 2223 | { |
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index e98cd2e57194..06d69648fc86 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h | |||
@@ -88,12 +88,12 @@ static __always_inline unsigned read_seqbegin(const seqlock_t *sl) | |||
88 | unsigned ret; | 88 | unsigned ret; |
89 | 89 | ||
90 | repeat: | 90 | repeat: |
91 | ret = sl->sequence; | 91 | ret = ACCESS_ONCE(sl->sequence); |
92 | smp_rmb(); | ||
93 | if (unlikely(ret & 1)) { | 92 | if (unlikely(ret & 1)) { |
94 | cpu_relax(); | 93 | cpu_relax(); |
95 | goto repeat; | 94 | goto repeat; |
96 | } | 95 | } |
96 | smp_rmb(); | ||
97 | 97 | ||
98 | return ret; | 98 | return ret; |
99 | } | 99 | } |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 758c5b0c6fd3..a5c31146a337 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -45,7 +45,8 @@ | |||
45 | #define PORT_OCTEON 17 /* Cavium OCTEON internal UART */ | 45 | #define PORT_OCTEON 17 /* Cavium OCTEON internal UART */ |
46 | #define PORT_AR7 18 /* Texas Instruments AR7 internal UART */ | 46 | #define PORT_AR7 18 /* Texas Instruments AR7 internal UART */ |
47 | #define PORT_U6_16550A 19 /* ST-Ericsson U6xxx internal UART */ | 47 | #define PORT_U6_16550A 19 /* ST-Ericsson U6xxx internal UART */ |
48 | #define PORT_MAX_8250 19 /* max port ID */ | 48 | #define PORT_TEGRA 20 /* NVIDIA Tegra internal UART */ |
49 | #define PORT_MAX_8250 20 /* max port ID */ | ||
49 | 50 | ||
50 | /* | 51 | /* |
51 | * ARM specific type numbers. These are not currently guaranteed | 52 | * ARM specific type numbers. These are not currently guaranteed |
@@ -202,6 +203,9 @@ | |||
202 | /* VIA VT8500 SoC */ | 203 | /* VIA VT8500 SoC */ |
203 | #define PORT_VT8500 97 | 204 | #define PORT_VT8500 97 |
204 | 205 | ||
206 | /* Xilinx PSS UART */ | ||
207 | #define PORT_XUARTPS 98 | ||
208 | |||
205 | #ifdef __KERNEL__ | 209 | #ifdef __KERNEL__ |
206 | 210 | ||
207 | #include <linux/compiler.h> | 211 | #include <linux/compiler.h> |
diff --git a/include/linux/serial_reg.h b/include/linux/serial_reg.h index 3ecb71a9e505..c75bda37c18e 100644 --- a/include/linux/serial_reg.h +++ b/include/linux/serial_reg.h | |||
@@ -57,6 +57,7 @@ | |||
57 | * ST16C654: 8 16 56 60 8 16 32 56 PORT_16654 | 57 | * ST16C654: 8 16 56 60 8 16 32 56 PORT_16654 |
58 | * TI16C750: 1 16 32 56 xx xx xx xx PORT_16750 | 58 | * TI16C750: 1 16 32 56 xx xx xx xx PORT_16750 |
59 | * TI16C752: 8 16 56 60 8 16 32 56 | 59 | * TI16C752: 8 16 56 60 8 16 32 56 |
60 | * Tegra: 1 4 8 14 16 8 4 1 PORT_TEGRA | ||
60 | */ | 61 | */ |
61 | #define UART_FCR_R_TRIG_00 0x00 | 62 | #define UART_FCR_R_TRIG_00 0x00 |
62 | #define UART_FCR_R_TRIG_01 0x40 | 63 | #define UART_FCR_R_TRIG_01 0x40 |
@@ -118,6 +119,7 @@ | |||
118 | #define UART_MCR_DTR 0x01 /* DTR complement */ | 119 | #define UART_MCR_DTR 0x01 /* DTR complement */ |
119 | 120 | ||
120 | #define UART_LSR 5 /* In: Line Status Register */ | 121 | #define UART_LSR 5 /* In: Line Status Register */ |
122 | #define UART_LSR_FIFOE 0x80 /* Fifo error */ | ||
121 | #define UART_LSR_TEMT 0x40 /* Transmitter empty */ | 123 | #define UART_LSR_TEMT 0x40 /* Transmitter empty */ |
122 | #define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */ | 124 | #define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */ |
123 | #define UART_LSR_BI 0x10 /* Break interrupt indicator */ | 125 | #define UART_LSR_BI 0x10 /* Break interrupt indicator */ |
diff --git a/include/linux/sht15.h b/include/linux/sht15.h index 046bce05ecab..f85c7c523da0 100644 --- a/include/linux/sht15.h +++ b/include/linux/sht15.h | |||
@@ -8,17 +8,27 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * For further information, see the Documentation/hwmon/sht15 file. | ||
11 | */ | 13 | */ |
12 | 14 | ||
13 | /** | 15 | /** |
14 | * struct sht15_platform_data - sht15 connectivity info | 16 | * struct sht15_platform_data - sht15 connectivity info |
15 | * @gpio_data: no. of gpio to which bidirectional data line is connected | 17 | * @gpio_data: no. of gpio to which bidirectional data line is |
16 | * @gpio_sck: no. of gpio to which the data clock is connected. | 18 | * connected. |
17 | * @supply_mv: supply voltage in mv. Overridden by regulator if available. | 19 | * @gpio_sck: no. of gpio to which the data clock is connected. |
18 | **/ | 20 | * @supply_mv: supply voltage in mv. Overridden by regulator if |
21 | * available. | ||
22 | * @checksum: flag to indicate the checksum should be validated. | ||
23 | * @no_otp_reload: flag to indicate no reload from OTP. | ||
24 | * @low_resolution: flag to indicate the temp/humidity resolution to use. | ||
25 | */ | ||
19 | struct sht15_platform_data { | 26 | struct sht15_platform_data { |
20 | int gpio_data; | 27 | int gpio_data; |
21 | int gpio_sck; | 28 | int gpio_sck; |
22 | int supply_mv; | 29 | int supply_mv; |
30 | bool checksum; | ||
31 | bool no_otp_reload; | ||
32 | bool low_resolution; | ||
23 | }; | 33 | }; |
24 | 34 | ||
diff --git a/include/linux/signal.h b/include/linux/signal.h index fcd2b14b1932..a822300a253b 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -7,6 +7,8 @@ | |||
7 | #ifdef __KERNEL__ | 7 | #ifdef __KERNEL__ |
8 | #include <linux/list.h> | 8 | #include <linux/list.h> |
9 | 9 | ||
10 | struct task_struct; | ||
11 | |||
10 | /* for sysctl */ | 12 | /* for sysctl */ |
11 | extern int print_fatal_signals; | 13 | extern int print_fatal_signals; |
12 | /* | 14 | /* |
@@ -123,13 +125,13 @@ _SIG_SET_BINOP(sigorsets, _sig_or) | |||
123 | #define _sig_and(x,y) ((x) & (y)) | 125 | #define _sig_and(x,y) ((x) & (y)) |
124 | _SIG_SET_BINOP(sigandsets, _sig_and) | 126 | _SIG_SET_BINOP(sigandsets, _sig_and) |
125 | 127 | ||
126 | #define _sig_nand(x,y) ((x) & ~(y)) | 128 | #define _sig_andn(x,y) ((x) & ~(y)) |
127 | _SIG_SET_BINOP(signandsets, _sig_nand) | 129 | _SIG_SET_BINOP(sigandnsets, _sig_andn) |
128 | 130 | ||
129 | #undef _SIG_SET_BINOP | 131 | #undef _SIG_SET_BINOP |
130 | #undef _sig_or | 132 | #undef _sig_or |
131 | #undef _sig_and | 133 | #undef _sig_and |
132 | #undef _sig_nand | 134 | #undef _sig_andn |
133 | 135 | ||
134 | #define _SIG_SET_OP(name, op) \ | 136 | #define _SIG_SET_OP(name, op) \ |
135 | static inline void name(sigset_t *set) \ | 137 | static inline void name(sigset_t *set) \ |
@@ -234,6 +236,9 @@ static inline int valid_signal(unsigned long sig) | |||
234 | return sig <= _NSIG ? 1 : 0; | 236 | return sig <= _NSIG ? 1 : 0; |
235 | } | 237 | } |
236 | 238 | ||
239 | struct timespec; | ||
240 | struct pt_regs; | ||
241 | |||
237 | extern int next_signal(struct sigpending *pending, sigset_t *mask); | 242 | extern int next_signal(struct sigpending *pending, sigset_t *mask); |
238 | extern int do_send_sig_info(int sig, struct siginfo *info, | 243 | extern int do_send_sig_info(int sig, struct siginfo *info, |
239 | struct task_struct *p, bool group); | 244 | struct task_struct *p, bool group); |
@@ -242,10 +247,12 @@ extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *); | |||
242 | extern long do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, | 247 | extern long do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, |
243 | siginfo_t *info); | 248 | siginfo_t *info); |
244 | extern long do_sigpending(void __user *, unsigned long); | 249 | extern long do_sigpending(void __user *, unsigned long); |
250 | extern int do_sigtimedwait(const sigset_t *, siginfo_t *, | ||
251 | const struct timespec *); | ||
245 | extern int sigprocmask(int, sigset_t *, sigset_t *); | 252 | extern int sigprocmask(int, sigset_t *, sigset_t *); |
253 | extern void set_current_blocked(const sigset_t *); | ||
246 | extern int show_unhandled_signals; | 254 | extern int show_unhandled_signals; |
247 | 255 | ||
248 | struct pt_regs; | ||
249 | extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); | 256 | extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); |
250 | extern void exit_signals(struct task_struct *tsk); | 257 | extern void exit_signals(struct task_struct *tsk); |
251 | 258 | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index d0ae90af0b40..e8b78ce14474 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -391,8 +391,8 @@ struct sk_buff { | |||
391 | 391 | ||
392 | __u32 rxhash; | 392 | __u32 rxhash; |
393 | 393 | ||
394 | __u16 queue_mapping; | ||
394 | kmemcheck_bitfield_begin(flags2); | 395 | kmemcheck_bitfield_begin(flags2); |
395 | __u16 queue_mapping:16; | ||
396 | #ifdef CONFIG_IPV6_NDISC_NODETYPE | 396 | #ifdef CONFIG_IPV6_NDISC_NODETYPE |
397 | __u8 ndisc_nodetype:2; | 397 | __u8 ndisc_nodetype:2; |
398 | #endif | 398 | #endif |
@@ -1442,7 +1442,7 @@ extern int ___pskb_trim(struct sk_buff *skb, unsigned int len); | |||
1442 | 1442 | ||
1443 | static inline void __skb_trim(struct sk_buff *skb, unsigned int len) | 1443 | static inline void __skb_trim(struct sk_buff *skb, unsigned int len) |
1444 | { | 1444 | { |
1445 | if (unlikely(skb->data_len)) { | 1445 | if (unlikely(skb_is_nonlinear(skb))) { |
1446 | WARN_ON(1); | 1446 | WARN_ON(1); |
1447 | return; | 1447 | return; |
1448 | } | 1448 | } |
@@ -1782,7 +1782,7 @@ static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len) | |||
1782 | 1782 | ||
1783 | #define skb_queue_walk(queue, skb) \ | 1783 | #define skb_queue_walk(queue, skb) \ |
1784 | for (skb = (queue)->next; \ | 1784 | for (skb = (queue)->next; \ |
1785 | prefetch(skb->next), (skb != (struct sk_buff *)(queue)); \ | 1785 | skb != (struct sk_buff *)(queue); \ |
1786 | skb = skb->next) | 1786 | skb = skb->next) |
1787 | 1787 | ||
1788 | #define skb_queue_walk_safe(queue, skb, tmp) \ | 1788 | #define skb_queue_walk_safe(queue, skb, tmp) \ |
@@ -1791,7 +1791,7 @@ static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len) | |||
1791 | skb = tmp, tmp = skb->next) | 1791 | skb = tmp, tmp = skb->next) |
1792 | 1792 | ||
1793 | #define skb_queue_walk_from(queue, skb) \ | 1793 | #define skb_queue_walk_from(queue, skb) \ |
1794 | for (; prefetch(skb->next), (skb != (struct sk_buff *)(queue)); \ | 1794 | for (; skb != (struct sk_buff *)(queue); \ |
1795 | skb = skb->next) | 1795 | skb = skb->next) |
1796 | 1796 | ||
1797 | #define skb_queue_walk_from_safe(queue, skb, tmp) \ | 1797 | #define skb_queue_walk_from_safe(queue, skb, tmp) \ |
@@ -1801,7 +1801,7 @@ static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len) | |||
1801 | 1801 | ||
1802 | #define skb_queue_reverse_walk(queue, skb) \ | 1802 | #define skb_queue_reverse_walk(queue, skb) \ |
1803 | for (skb = (queue)->prev; \ | 1803 | for (skb = (queue)->prev; \ |
1804 | prefetch(skb->prev), (skb != (struct sk_buff *)(queue)); \ | 1804 | skb != (struct sk_buff *)(queue); \ |
1805 | skb = skb->prev) | 1805 | skb = skb->prev) |
1806 | 1806 | ||
1807 | #define skb_queue_reverse_walk_safe(queue, skb, tmp) \ | 1807 | #define skb_queue_reverse_walk_safe(queue, skb, tmp) \ |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 45ca123e8002..c8668d161dd8 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -37,9 +37,7 @@ enum stat_item { | |||
37 | 37 | ||
38 | struct kmem_cache_cpu { | 38 | struct kmem_cache_cpu { |
39 | void **freelist; /* Pointer to next available object */ | 39 | void **freelist; /* Pointer to next available object */ |
40 | #ifdef CONFIG_CMPXCHG_LOCAL | ||
41 | unsigned long tid; /* Globally unique transaction id */ | 40 | unsigned long tid; /* Globally unique transaction id */ |
42 | #endif | ||
43 | struct page *page; /* The slab from which we are allocating */ | 41 | struct page *page; /* The slab from which we are allocating */ |
44 | int node; /* The node of the page (or -1 for debug) */ | 42 | int node; /* The node of the page (or -1 for debug) */ |
45 | #ifdef CONFIG_SLUB_STATS | 43 | #ifdef CONFIG_SLUB_STATS |
@@ -179,7 +177,8 @@ static __always_inline int kmalloc_index(size_t size) | |||
179 | if (size <= 4 * 1024) return 12; | 177 | if (size <= 4 * 1024) return 12; |
180 | /* | 178 | /* |
181 | * The following is only needed to support architectures with a larger page | 179 | * The following is only needed to support architectures with a larger page |
182 | * size than 4k. | 180 | * size than 4k. We need to support 2 * PAGE_SIZE here. So for a 64k page |
181 | * size we would have to go up to 128k. | ||
183 | */ | 182 | */ |
184 | if (size <= 8 * 1024) return 13; | 183 | if (size <= 8 * 1024) return 13; |
185 | if (size <= 16 * 1024) return 14; | 184 | if (size <= 16 * 1024) return 14; |
@@ -190,7 +189,8 @@ static __always_inline int kmalloc_index(size_t size) | |||
190 | if (size <= 512 * 1024) return 19; | 189 | if (size <= 512 * 1024) return 19; |
191 | if (size <= 1024 * 1024) return 20; | 190 | if (size <= 1024 * 1024) return 20; |
192 | if (size <= 2 * 1024 * 1024) return 21; | 191 | if (size <= 2 * 1024 * 1024) return 21; |
193 | return -1; | 192 | BUG(); |
193 | return -1; /* Will never be reached */ | ||
194 | 194 | ||
195 | /* | 195 | /* |
196 | * What we really wanted to do and cannot do because of compiler issues is: | 196 | * What we really wanted to do and cannot do because of compiler issues is: |
diff --git a/include/linux/smsc911x.h b/include/linux/smsc911x.h index 7144e8aa1e41..4dde70e74822 100644 --- a/include/linux/smsc911x.h +++ b/include/linux/smsc911x.h | |||
@@ -29,6 +29,7 @@ struct smsc911x_platform_config { | |||
29 | unsigned int irq_polarity; | 29 | unsigned int irq_polarity; |
30 | unsigned int irq_type; | 30 | unsigned int irq_type; |
31 | unsigned int flags; | 31 | unsigned int flags; |
32 | unsigned int shift; | ||
32 | phy_interface_t phy_interface; | 33 | phy_interface_t phy_interface; |
33 | unsigned char mac[6]; | 34 | unsigned char mac[6]; |
34 | }; | 35 | }; |
diff --git a/include/linux/socket.h b/include/linux/socket.h index d2b5e982f079..4ef98e422fde 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -333,5 +333,7 @@ struct timespec; | |||
333 | 333 | ||
334 | extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, | 334 | extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, |
335 | unsigned int flags, struct timespec *timeout); | 335 | unsigned int flags, struct timespec *timeout); |
336 | extern int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, | ||
337 | unsigned int vlen, unsigned int flags); | ||
336 | #endif /* not kernel and not glibc */ | 338 | #endif /* not kernel and not glibc */ |
337 | #endif /* _LINUX_SOCKET_H */ | 339 | #endif /* _LINUX_SOCKET_H */ |
diff --git a/include/linux/spinlock_up.h b/include/linux/spinlock_up.h index b14f6a91e19f..a26e2fb604e6 100644 --- a/include/linux/spinlock_up.h +++ b/include/linux/spinlock_up.h | |||
@@ -5,6 +5,8 @@ | |||
5 | # error "please don't include this file directly" | 5 | # error "please don't include this file directly" |
6 | #endif | 6 | #endif |
7 | 7 | ||
8 | #include <asm/processor.h> /* for cpu_relax() */ | ||
9 | |||
8 | /* | 10 | /* |
9 | * include/linux/spinlock_up.h - UP-debug version of spinlocks. | 11 | * include/linux/spinlock_up.h - UP-debug version of spinlocks. |
10 | * | 12 | * |
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index 9659eff52ca2..252e44821787 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h | |||
@@ -308,7 +308,7 @@ struct ssb_bus { | |||
308 | 308 | ||
309 | /* ID information about the Chip. */ | 309 | /* ID information about the Chip. */ |
310 | u16 chip_id; | 310 | u16 chip_id; |
311 | u16 chip_rev; | 311 | u8 chip_rev; |
312 | u16 sprom_offset; | 312 | u16 sprom_offset; |
313 | u16 sprom_size; /* number of words in sprom */ | 313 | u16 sprom_size; /* number of words in sprom */ |
314 | u8 chip_package; | 314 | u8 chip_package; |
@@ -404,7 +404,9 @@ extern bool ssb_is_sprom_available(struct ssb_bus *bus); | |||
404 | 404 | ||
405 | /* Set a fallback SPROM. | 405 | /* Set a fallback SPROM. |
406 | * See kdoc at the function definition for complete documentation. */ | 406 | * See kdoc at the function definition for complete documentation. */ |
407 | extern int ssb_arch_set_fallback_sprom(const struct ssb_sprom *sprom); | 407 | extern int ssb_arch_register_fallback_sprom( |
408 | int (*sprom_callback)(struct ssb_bus *bus, | ||
409 | struct ssb_sprom *out)); | ||
408 | 410 | ||
409 | /* Suspend a SSB bus. | 411 | /* Suspend a SSB bus. |
410 | * Call this from the parent bus suspend routine. */ | 412 | * Call this from the parent bus suspend routine. */ |
@@ -518,6 +520,7 @@ extern int ssb_bus_may_powerdown(struct ssb_bus *bus); | |||
518 | * Otherwise static always-on powercontrol will be used. */ | 520 | * Otherwise static always-on powercontrol will be used. */ |
519 | extern int ssb_bus_powerup(struct ssb_bus *bus, bool dynamic_pctl); | 521 | extern int ssb_bus_powerup(struct ssb_bus *bus, bool dynamic_pctl); |
520 | 522 | ||
523 | extern void ssb_commit_settings(struct ssb_bus *bus); | ||
521 | 524 | ||
522 | /* Various helper functions */ | 525 | /* Various helper functions */ |
523 | extern u32 ssb_admatch_base(u32 adm); | 526 | extern u32 ssb_admatch_base(u32 adm); |
diff --git a/include/linux/ssb/ssb_driver_chipcommon.h b/include/linux/ssb/ssb_driver_chipcommon.h index 2cdf249b4e5f..a08d693d8324 100644 --- a/include/linux/ssb/ssb_driver_chipcommon.h +++ b/include/linux/ssb/ssb_driver_chipcommon.h | |||
@@ -123,6 +123,8 @@ | |||
123 | #define SSB_CHIPCO_FLASHDATA 0x0048 | 123 | #define SSB_CHIPCO_FLASHDATA 0x0048 |
124 | #define SSB_CHIPCO_BCAST_ADDR 0x0050 | 124 | #define SSB_CHIPCO_BCAST_ADDR 0x0050 |
125 | #define SSB_CHIPCO_BCAST_DATA 0x0054 | 125 | #define SSB_CHIPCO_BCAST_DATA 0x0054 |
126 | #define SSB_CHIPCO_GPIOPULLUP 0x0058 /* Rev >= 20 only */ | ||
127 | #define SSB_CHIPCO_GPIOPULLDOWN 0x005C /* Rev >= 20 only */ | ||
126 | #define SSB_CHIPCO_GPIOIN 0x0060 | 128 | #define SSB_CHIPCO_GPIOIN 0x0060 |
127 | #define SSB_CHIPCO_GPIOOUT 0x0064 | 129 | #define SSB_CHIPCO_GPIOOUT 0x0064 |
128 | #define SSB_CHIPCO_GPIOOUTEN 0x0068 | 130 | #define SSB_CHIPCO_GPIOOUTEN 0x0068 |
@@ -131,6 +133,9 @@ | |||
131 | #define SSB_CHIPCO_GPIOIRQ 0x0074 | 133 | #define SSB_CHIPCO_GPIOIRQ 0x0074 |
132 | #define SSB_CHIPCO_WATCHDOG 0x0080 | 134 | #define SSB_CHIPCO_WATCHDOG 0x0080 |
133 | #define SSB_CHIPCO_GPIOTIMER 0x0088 /* LED powersave (corerev >= 16) */ | 135 | #define SSB_CHIPCO_GPIOTIMER 0x0088 /* LED powersave (corerev >= 16) */ |
136 | #define SSB_CHIPCO_GPIOTIMER_OFFTIME 0x0000FFFF | ||
137 | #define SSB_CHIPCO_GPIOTIMER_OFFTIME_SHIFT 0 | ||
138 | #define SSB_CHIPCO_GPIOTIMER_ONTIME 0xFFFF0000 | ||
134 | #define SSB_CHIPCO_GPIOTIMER_ONTIME_SHIFT 16 | 139 | #define SSB_CHIPCO_GPIOTIMER_ONTIME_SHIFT 16 |
135 | #define SSB_CHIPCO_GPIOTOUTM 0x008C /* LED powersave (corerev >= 16) */ | 140 | #define SSB_CHIPCO_GPIOTOUTM 0x008C /* LED powersave (corerev >= 16) */ |
136 | #define SSB_CHIPCO_CLOCK_N 0x0090 | 141 | #define SSB_CHIPCO_CLOCK_N 0x0090 |
@@ -189,8 +194,10 @@ | |||
189 | #define SSB_CHIPCO_CLKCTLST_HAVEALPREQ 0x00000008 /* ALP available request */ | 194 | #define SSB_CHIPCO_CLKCTLST_HAVEALPREQ 0x00000008 /* ALP available request */ |
190 | #define SSB_CHIPCO_CLKCTLST_HAVEHTREQ 0x00000010 /* HT available request */ | 195 | #define SSB_CHIPCO_CLKCTLST_HAVEHTREQ 0x00000010 /* HT available request */ |
191 | #define SSB_CHIPCO_CLKCTLST_HWCROFF 0x00000020 /* Force HW clock request off */ | 196 | #define SSB_CHIPCO_CLKCTLST_HWCROFF 0x00000020 /* Force HW clock request off */ |
192 | #define SSB_CHIPCO_CLKCTLST_HAVEHT 0x00010000 /* HT available */ | 197 | #define SSB_CHIPCO_CLKCTLST_HAVEALP 0x00010000 /* ALP available */ |
193 | #define SSB_CHIPCO_CLKCTLST_HAVEALP 0x00020000 /* APL available */ | 198 | #define SSB_CHIPCO_CLKCTLST_HAVEHT 0x00020000 /* HT available */ |
199 | #define SSB_CHIPCO_CLKCTLST_4328A0_HAVEHT 0x00010000 /* 4328a0 has reversed bits */ | ||
200 | #define SSB_CHIPCO_CLKCTLST_4328A0_HAVEALP 0x00020000 /* 4328a0 has reversed bits */ | ||
194 | #define SSB_CHIPCO_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */ | 201 | #define SSB_CHIPCO_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */ |
195 | #define SSB_CHIPCO_UART0_DATA 0x0300 | 202 | #define SSB_CHIPCO_UART0_DATA 0x0300 |
196 | #define SSB_CHIPCO_UART0_IMR 0x0304 | 203 | #define SSB_CHIPCO_UART0_IMR 0x0304 |
diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h index 402955ae48ce..efbf459d571c 100644 --- a/include/linux/ssb/ssb_regs.h +++ b/include/linux/ssb/ssb_regs.h | |||
@@ -97,7 +97,7 @@ | |||
97 | #define SSB_INTVEC_ENET1 0x00000040 /* Enable interrupts for enet 1 */ | 97 | #define SSB_INTVEC_ENET1 0x00000040 /* Enable interrupts for enet 1 */ |
98 | #define SSB_TMSLOW 0x0F98 /* SB Target State Low */ | 98 | #define SSB_TMSLOW 0x0F98 /* SB Target State Low */ |
99 | #define SSB_TMSLOW_RESET 0x00000001 /* Reset */ | 99 | #define SSB_TMSLOW_RESET 0x00000001 /* Reset */ |
100 | #define SSB_TMSLOW_REJECT_22 0x00000002 /* Reject (Backplane rev 2.2) */ | 100 | #define SSB_TMSLOW_REJECT 0x00000002 /* Reject (Standard Backplane) */ |
101 | #define SSB_TMSLOW_REJECT_23 0x00000004 /* Reject (Backplane rev 2.3) */ | 101 | #define SSB_TMSLOW_REJECT_23 0x00000004 /* Reject (Backplane rev 2.3) */ |
102 | #define SSB_TMSLOW_CLOCK 0x00010000 /* Clock Enable */ | 102 | #define SSB_TMSLOW_CLOCK 0x00010000 /* Clock Enable */ |
103 | #define SSB_TMSLOW_FGC 0x00020000 /* Force Gated Clocks On */ | 103 | #define SSB_TMSLOW_FGC 0x00020000 /* Force Gated Clocks On */ |
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index f29197a4b227..9529e49b0385 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h | |||
@@ -26,6 +26,8 @@ | |||
26 | #ifndef __STMMAC_PLATFORM_DATA | 26 | #ifndef __STMMAC_PLATFORM_DATA |
27 | #define __STMMAC_PLATFORM_DATA | 27 | #define __STMMAC_PLATFORM_DATA |
28 | 28 | ||
29 | #include <linux/platform_device.h> | ||
30 | |||
29 | /* platform data for platform device structure's platform_data field */ | 31 | /* platform data for platform device structure's platform_data field */ |
30 | 32 | ||
31 | /* Private data for the STM on-board ethernet driver */ | 33 | /* Private data for the STM on-board ethernet driver */ |
diff --git a/include/linux/string.h b/include/linux/string.h index a716ee2a8adb..a176db2f2c85 100644 --- a/include/linux/string.h +++ b/include/linux/string.h | |||
@@ -123,6 +123,7 @@ extern char **argv_split(gfp_t gfp, const char *str, int *argcp); | |||
123 | extern void argv_free(char **argv); | 123 | extern void argv_free(char **argv); |
124 | 124 | ||
125 | extern bool sysfs_streq(const char *s1, const char *s2); | 125 | extern bool sysfs_streq(const char *s1, const char *s2); |
126 | extern int strtobool(const char *s, bool *res); | ||
126 | 127 | ||
127 | #ifdef CONFIG_BINARY_PRINTF | 128 | #ifdef CONFIG_BINARY_PRINTF |
128 | int vbin_printf(u32 *bin_buf, size_t size, const char *fmt, va_list args); | 129 | int vbin_printf(u32 *bin_buf, size_t size, const char *fmt, va_list args); |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 83ecc1749ef6..ab71447d0c5a 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -610,6 +610,8 @@ asmlinkage long sys_send(int, void __user *, size_t, unsigned); | |||
610 | asmlinkage long sys_sendto(int, void __user *, size_t, unsigned, | 610 | asmlinkage long sys_sendto(int, void __user *, size_t, unsigned, |
611 | struct sockaddr __user *, int); | 611 | struct sockaddr __user *, int); |
612 | asmlinkage long sys_sendmsg(int fd, struct msghdr __user *msg, unsigned flags); | 612 | asmlinkage long sys_sendmsg(int fd, struct msghdr __user *msg, unsigned flags); |
613 | asmlinkage long sys_sendmmsg(int fd, struct mmsghdr __user *msg, | ||
614 | unsigned int vlen, unsigned flags); | ||
613 | asmlinkage long sys_recv(int, void __user *, size_t, unsigned); | 615 | asmlinkage long sys_recv(int, void __user *, size_t, unsigned); |
614 | asmlinkage long sys_recvfrom(int, void __user *, size_t, unsigned, | 616 | asmlinkage long sys_recvfrom(int, void __user *, size_t, unsigned, |
615 | struct sockaddr __user *, int __user *); | 617 | struct sockaddr __user *, int __user *); |
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index dfb078db8ebb..d35e783a598c 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h | |||
@@ -34,12 +34,6 @@ struct sysdev_class { | |||
34 | struct list_head drivers; | 34 | struct list_head drivers; |
35 | struct sysdev_class_attribute **attrs; | 35 | struct sysdev_class_attribute **attrs; |
36 | struct kset kset; | 36 | struct kset kset; |
37 | #ifndef CONFIG_ARCH_NO_SYSDEV_OPS | ||
38 | /* Default operations for these types of devices */ | ||
39 | int (*shutdown)(struct sys_device *); | ||
40 | int (*suspend)(struct sys_device *, pm_message_t state); | ||
41 | int (*resume)(struct sys_device *); | ||
42 | #endif | ||
43 | }; | 37 | }; |
44 | 38 | ||
45 | struct sysdev_class_attribute { | 39 | struct sysdev_class_attribute { |
@@ -77,11 +71,6 @@ struct sysdev_driver { | |||
77 | struct list_head entry; | 71 | struct list_head entry; |
78 | int (*add)(struct sys_device *); | 72 | int (*add)(struct sys_device *); |
79 | int (*remove)(struct sys_device *); | 73 | int (*remove)(struct sys_device *); |
80 | #ifndef CONFIG_ARCH_NO_SYSDEV_OPS | ||
81 | int (*shutdown)(struct sys_device *); | ||
82 | int (*suspend)(struct sys_device *, pm_message_t state); | ||
83 | int (*resume)(struct sys_device *); | ||
84 | #endif | ||
85 | }; | 74 | }; |
86 | 75 | ||
87 | 76 | ||
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 30b881555fa5..c3acda60eee0 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -176,7 +176,6 @@ struct sysfs_dirent *sysfs_get_dirent(struct sysfs_dirent *parent_sd, | |||
176 | const unsigned char *name); | 176 | const unsigned char *name); |
177 | struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd); | 177 | struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd); |
178 | void sysfs_put(struct sysfs_dirent *sd); | 178 | void sysfs_put(struct sysfs_dirent *sd); |
179 | void sysfs_printk_last_file(void); | ||
180 | 179 | ||
181 | /* Called to clear a ns tag when it is no longer valid */ | 180 | /* Called to clear a ns tag when it is no longer valid */ |
182 | void sysfs_exit_ns(enum kobj_ns_type type, const void *tag); | 181 | void sysfs_exit_ns(enum kobj_ns_type type, const void *tag); |
@@ -348,10 +347,6 @@ static inline int __must_check sysfs_init(void) | |||
348 | return 0; | 347 | return 0; |
349 | } | 348 | } |
350 | 349 | ||
351 | static inline void sysfs_printk_last_file(void) | ||
352 | { | ||
353 | } | ||
354 | |||
355 | #endif /* CONFIG_SYSFS */ | 350 | #endif /* CONFIG_SYSFS */ |
356 | 351 | ||
357 | #endif /* _SYSFS_H_ */ | 352 | #endif /* _SYSFS_H_ */ |
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index 20fc303947d3..8d03f079688c 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h | |||
@@ -29,7 +29,7 @@ struct restart_block { | |||
29 | } futex; | 29 | } futex; |
30 | /* For nanosleep */ | 30 | /* For nanosleep */ |
31 | struct { | 31 | struct { |
32 | clockid_t index; | 32 | clockid_t clockid; |
33 | struct timespec __user *rmtp; | 33 | struct timespec __user *rmtp; |
34 | #ifdef CONFIG_COMPAT | 34 | #ifdef CONFIG_COMPAT |
35 | struct compat_timespec __user *compat_rmtp; | 35 | struct compat_timespec __user *compat_rmtp; |
diff --git a/include/linux/ti_wilink_st.h b/include/linux/ti_wilink_st.h index 7071ec5d0118..b004e557caa9 100644 --- a/include/linux/ti_wilink_st.h +++ b/include/linux/ti_wilink_st.h | |||
@@ -140,12 +140,12 @@ extern long st_unregister(struct st_proto_s *); | |||
140 | */ | 140 | */ |
141 | struct st_data_s { | 141 | struct st_data_s { |
142 | unsigned long st_state; | 142 | unsigned long st_state; |
143 | struct tty_struct *tty; | ||
144 | struct sk_buff *tx_skb; | 143 | struct sk_buff *tx_skb; |
145 | #define ST_TX_SENDING 1 | 144 | #define ST_TX_SENDING 1 |
146 | #define ST_TX_WAKEUP 2 | 145 | #define ST_TX_WAKEUP 2 |
147 | unsigned long tx_state; | 146 | unsigned long tx_state; |
148 | struct st_proto_s *list[ST_MAX_CHANNELS]; | 147 | struct st_proto_s *list[ST_MAX_CHANNELS]; |
148 | bool is_registered[ST_MAX_CHANNELS]; | ||
149 | unsigned long rx_state; | 149 | unsigned long rx_state; |
150 | unsigned long rx_count; | 150 | unsigned long rx_count; |
151 | struct sk_buff *rx_skb; | 151 | struct sk_buff *rx_skb; |
@@ -155,6 +155,7 @@ struct st_data_s { | |||
155 | unsigned char protos_registered; | 155 | unsigned char protos_registered; |
156 | unsigned long ll_state; | 156 | unsigned long ll_state; |
157 | void *kim_data; | 157 | void *kim_data; |
158 | struct tty_struct *tty; | ||
158 | }; | 159 | }; |
159 | 160 | ||
160 | /* | 161 | /* |
diff --git a/include/linux/time.h b/include/linux/time.h index 454a26205787..b3061782dec3 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -126,6 +126,7 @@ struct timespec __current_kernel_time(void); /* does not take xtime_lock */ | |||
126 | struct timespec get_monotonic_coarse(void); | 126 | struct timespec get_monotonic_coarse(void); |
127 | void get_xtime_and_monotonic_and_sleep_offset(struct timespec *xtim, | 127 | void get_xtime_and_monotonic_and_sleep_offset(struct timespec *xtim, |
128 | struct timespec *wtom, struct timespec *sleep); | 128 | struct timespec *wtom, struct timespec *sleep); |
129 | void timekeeping_inject_sleeptime(struct timespec *delta); | ||
129 | 130 | ||
130 | #define CURRENT_TIME (current_kernel_time()) | 131 | #define CURRENT_TIME (current_kernel_time()) |
131 | #define CURRENT_TIME_SEC ((struct timespec) { get_seconds(), 0 }) | 132 | #define CURRENT_TIME_SEC ((struct timespec) { get_seconds(), 0 }) |
@@ -294,6 +295,8 @@ struct itimerval { | |||
294 | #define CLOCK_REALTIME_COARSE 5 | 295 | #define CLOCK_REALTIME_COARSE 5 |
295 | #define CLOCK_MONOTONIC_COARSE 6 | 296 | #define CLOCK_MONOTONIC_COARSE 6 |
296 | #define CLOCK_BOOTTIME 7 | 297 | #define CLOCK_BOOTTIME 7 |
298 | #define CLOCK_REALTIME_ALARM 8 | ||
299 | #define CLOCK_BOOTTIME_ALARM 9 | ||
297 | 300 | ||
298 | /* | 301 | /* |
299 | * The IDs of various hardware clocks: | 302 | * The IDs of various hardware clocks: |
diff --git a/include/linux/timerfd.h b/include/linux/timerfd.h index 2d0792983f8c..d3b57fa12225 100644 --- a/include/linux/timerfd.h +++ b/include/linux/timerfd.h | |||
@@ -19,6 +19,7 @@ | |||
19 | * shared O_* flags. | 19 | * shared O_* flags. |
20 | */ | 20 | */ |
21 | #define TFD_TIMER_ABSTIME (1 << 0) | 21 | #define TFD_TIMER_ABSTIME (1 << 0) |
22 | #define TFD_TIMER_CANCEL_ON_SET (1 << 1) | ||
22 | #define TFD_CLOEXEC O_CLOEXEC | 23 | #define TFD_CLOEXEC O_CLOEXEC |
23 | #define TFD_NONBLOCK O_NONBLOCK | 24 | #define TFD_NONBLOCK O_NONBLOCK |
24 | 25 | ||
@@ -26,6 +27,6 @@ | |||
26 | /* Flags for timerfd_create. */ | 27 | /* Flags for timerfd_create. */ |
27 | #define TFD_CREATE_FLAGS TFD_SHARED_FCNTL_FLAGS | 28 | #define TFD_CREATE_FLAGS TFD_SHARED_FCNTL_FLAGS |
28 | /* Flags for timerfd_settime. */ | 29 | /* Flags for timerfd_settime. */ |
29 | #define TFD_SETTIME_FLAGS TFD_TIMER_ABSTIME | 30 | #define TFD_SETTIME_FLAGS (TFD_TIMER_ABSTIME | TFD_TIMER_CANCEL_ON_SET) |
30 | 31 | ||
31 | #endif /* _LINUX_TIMERFD_H */ | 32 | #endif /* _LINUX_TIMERFD_H */ |
diff --git a/include/linux/timerqueue.h b/include/linux/timerqueue.h index a520fd70a59f..5088727478fd 100644 --- a/include/linux/timerqueue.h +++ b/include/linux/timerqueue.h | |||
@@ -39,7 +39,7 @@ struct timerqueue_node *timerqueue_getnext(struct timerqueue_head *head) | |||
39 | 39 | ||
40 | static inline void timerqueue_init(struct timerqueue_node *node) | 40 | static inline void timerqueue_init(struct timerqueue_node *node) |
41 | { | 41 | { |
42 | RB_CLEAR_NODE(&node->node); | 42 | rb_init_node(&node->node); |
43 | } | 43 | } |
44 | 44 | ||
45 | static inline void timerqueue_init_head(struct timerqueue_head *head) | 45 | static inline void timerqueue_init_head(struct timerqueue_head *head) |
diff --git a/include/linux/tipc.h b/include/linux/tipc.h index a5b994a204d2..f2d90091cc20 100644 --- a/include/linux/tipc.h +++ b/include/linux/tipc.h | |||
@@ -101,7 +101,7 @@ static inline unsigned int tipc_node(__u32 addr) | |||
101 | * Limiting values for messages | 101 | * Limiting values for messages |
102 | */ | 102 | */ |
103 | 103 | ||
104 | #define TIPC_MAX_USER_MSG_SIZE 66000 | 104 | #define TIPC_MAX_USER_MSG_SIZE 66000U |
105 | 105 | ||
106 | /* | 106 | /* |
107 | * Message importance levels | 107 | * Message importance levels |
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index ebcfa4ebdbf8..e95f5236611f 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h | |||
@@ -469,33 +469,6 @@ static inline int tracehook_get_signal(struct task_struct *task, | |||
469 | } | 469 | } |
470 | 470 | ||
471 | /** | 471 | /** |
472 | * tracehook_notify_jctl - report about job control stop/continue | ||
473 | * @notify: zero, %CLD_STOPPED or %CLD_CONTINUED | ||
474 | * @why: %CLD_STOPPED or %CLD_CONTINUED | ||
475 | * | ||
476 | * This is called when we might call do_notify_parent_cldstop(). | ||
477 | * | ||
478 | * @notify is zero if we would not ordinarily send a %SIGCHLD, | ||
479 | * or is the %CLD_STOPPED or %CLD_CONTINUED .si_code for %SIGCHLD. | ||
480 | * | ||
481 | * @why is %CLD_STOPPED when about to stop for job control; | ||
482 | * we are already in %TASK_STOPPED state, about to call schedule(). | ||
483 | * It might also be that we have just exited (check %PF_EXITING), | ||
484 | * but need to report that a group-wide stop is complete. | ||
485 | * | ||
486 | * @why is %CLD_CONTINUED when waking up after job control stop and | ||
487 | * ready to make a delayed @notify report. | ||
488 | * | ||
489 | * Return the %CLD_* value for %SIGCHLD, or zero to generate no signal. | ||
490 | * | ||
491 | * Called with the siglock held. | ||
492 | */ | ||
493 | static inline int tracehook_notify_jctl(int notify, int why) | ||
494 | { | ||
495 | return notify ?: (current->ptrace & PT_PTRACED) ? why : 0; | ||
496 | } | ||
497 | |||
498 | /** | ||
499 | * tracehook_finish_jctl - report about return from job control stop | 472 | * tracehook_finish_jctl - report about return from job control stop |
500 | * | 473 | * |
501 | * This is called by do_signal_stop() after wakeup. | 474 | * This is called by do_signal_stop() after wakeup. |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index 97c84a58efb8..d530a4460a0b 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
@@ -29,7 +29,7 @@ struct tracepoint_func { | |||
29 | 29 | ||
30 | struct tracepoint { | 30 | struct tracepoint { |
31 | const char *name; /* Tracepoint name */ | 31 | const char *name; /* Tracepoint name */ |
32 | int state; /* State. */ | 32 | struct jump_label_key key; |
33 | void (*regfunc)(void); | 33 | void (*regfunc)(void); |
34 | void (*unregfunc)(void); | 34 | void (*unregfunc)(void); |
35 | struct tracepoint_func __rcu *funcs; | 35 | struct tracepoint_func __rcu *funcs; |
@@ -146,9 +146,7 @@ void tracepoint_update_probe_range(struct tracepoint * const *begin, | |||
146 | extern struct tracepoint __tracepoint_##name; \ | 146 | extern struct tracepoint __tracepoint_##name; \ |
147 | static inline void trace_##name(proto) \ | 147 | static inline void trace_##name(proto) \ |
148 | { \ | 148 | { \ |
149 | JUMP_LABEL(&__tracepoint_##name.state, do_trace); \ | 149 | if (static_branch(&__tracepoint_##name.key)) \ |
150 | return; \ | ||
151 | do_trace: \ | ||
152 | __DO_TRACE(&__tracepoint_##name, \ | 150 | __DO_TRACE(&__tracepoint_##name, \ |
153 | TP_PROTO(data_proto), \ | 151 | TP_PROTO(data_proto), \ |
154 | TP_ARGS(data_args), \ | 152 | TP_ARGS(data_args), \ |
@@ -176,14 +174,14 @@ do_trace: \ | |||
176 | * structures, so we create an array of pointers that will be used for iteration | 174 | * structures, so we create an array of pointers that will be used for iteration |
177 | * on the tracepoints. | 175 | * on the tracepoints. |
178 | */ | 176 | */ |
179 | #define DEFINE_TRACE_FN(name, reg, unreg) \ | 177 | #define DEFINE_TRACE_FN(name, reg, unreg) \ |
180 | static const char __tpstrtab_##name[] \ | 178 | static const char __tpstrtab_##name[] \ |
181 | __attribute__((section("__tracepoints_strings"))) = #name; \ | 179 | __attribute__((section("__tracepoints_strings"))) = #name; \ |
182 | struct tracepoint __tracepoint_##name \ | 180 | struct tracepoint __tracepoint_##name \ |
183 | __attribute__((section("__tracepoints"))) = \ | 181 | __attribute__((section("__tracepoints"))) = \ |
184 | { __tpstrtab_##name, 0, reg, unreg, NULL }; \ | 182 | { __tpstrtab_##name, JUMP_LABEL_INIT, reg, unreg, NULL };\ |
185 | static struct tracepoint * const __tracepoint_ptr_##name __used \ | 183 | static struct tracepoint * const __tracepoint_ptr_##name __used \ |
186 | __attribute__((section("__tracepoints_ptrs"))) = \ | 184 | __attribute__((section("__tracepoints_ptrs"))) = \ |
187 | &__tracepoint_##name; | 185 | &__tracepoint_##name; |
188 | 186 | ||
189 | #define DEFINE_TRACE(name) \ | 187 | #define DEFINE_TRACE(name) \ |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 9f469c700550..d6f05292e456 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -50,6 +50,8 @@ | |||
50 | #define N_CAIF 20 /* CAIF protocol for talking to modems */ | 50 | #define N_CAIF 20 /* CAIF protocol for talking to modems */ |
51 | #define N_GSM0710 21 /* GSM 0710 Mux */ | 51 | #define N_GSM0710 21 /* GSM 0710 Mux */ |
52 | #define N_TI_WL 22 /* for TI's WL BT, FM, GPS combo chips */ | 52 | #define N_TI_WL 22 /* for TI's WL BT, FM, GPS combo chips */ |
53 | #define N_TRACESINK 23 /* Trace data routing for MIPI P1149.7 */ | ||
54 | #define N_TRACEROUTER 24 /* Trace data routing for MIPI P1149.7 */ | ||
53 | 55 | ||
54 | /* | 56 | /* |
55 | * This character is the same as _POSIX_VDISABLE: it cannot be used as | 57 | * This character is the same as _POSIX_VDISABLE: it cannot be used as |
@@ -472,6 +474,7 @@ extern int tty_add_file(struct tty_struct *tty, struct file *file); | |||
472 | extern void free_tty_struct(struct tty_struct *tty); | 474 | extern void free_tty_struct(struct tty_struct *tty); |
473 | extern void initialize_tty_struct(struct tty_struct *tty, | 475 | extern void initialize_tty_struct(struct tty_struct *tty, |
474 | struct tty_driver *driver, int idx); | 476 | struct tty_driver *driver, int idx); |
477 | extern void deinitialize_tty_struct(struct tty_struct *tty); | ||
475 | extern struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx, | 478 | extern struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx, |
476 | int first_ok); | 479 | int first_ok); |
477 | extern int tty_release(struct inode *inode, struct file *filp); | 480 | extern int tty_release(struct inode *inode, struct file *filp); |
@@ -525,6 +528,7 @@ extern int tty_set_ldisc(struct tty_struct *tty, int ldisc); | |||
525 | extern int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty); | 528 | extern int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty); |
526 | extern void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty); | 529 | extern void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty); |
527 | extern void tty_ldisc_init(struct tty_struct *tty); | 530 | extern void tty_ldisc_init(struct tty_struct *tty); |
531 | extern void tty_ldisc_deinit(struct tty_struct *tty); | ||
528 | extern void tty_ldisc_begin(void); | 532 | extern void tty_ldisc_begin(void); |
529 | /* This last one is just for the tty layer internals and shouldn't be used elsewhere */ | 533 | /* This last one is just for the tty layer internals and shouldn't be used elsewhere */ |
530 | extern void tty_ldisc_enable(struct tty_struct *tty); | 534 | extern void tty_ldisc_enable(struct tty_struct *tty); |
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h index ff7dc08696a8..5b07792ccb46 100644 --- a/include/linux/tty_ldisc.h +++ b/include/linux/tty_ldisc.h | |||
@@ -76,7 +76,7 @@ | |||
76 | * tty device. It is solely the responsibility of the line | 76 | * tty device. It is solely the responsibility of the line |
77 | * discipline to handle poll requests. | 77 | * discipline to handle poll requests. |
78 | * | 78 | * |
79 | * void (*receive_buf)(struct tty_struct *, const unsigned char *cp, | 79 | * unsigned int (*receive_buf)(struct tty_struct *, const unsigned char *cp, |
80 | * char *fp, int count); | 80 | * char *fp, int count); |
81 | * | 81 | * |
82 | * This function is called by the low-level tty driver to send | 82 | * This function is called by the low-level tty driver to send |
@@ -84,7 +84,8 @@ | |||
84 | * processing. <cp> is a pointer to the buffer of input | 84 | * processing. <cp> is a pointer to the buffer of input |
85 | * character received by the device. <fp> is a pointer to a | 85 | * character received by the device. <fp> is a pointer to a |
86 | * pointer of flag bytes which indicate whether a character was | 86 | * pointer of flag bytes which indicate whether a character was |
87 | * received with a parity error, etc. | 87 | * received with a parity error, etc. Returns the amount of bytes |
88 | * received. | ||
88 | * | 89 | * |
89 | * void (*write_wakeup)(struct tty_struct *); | 90 | * void (*write_wakeup)(struct tty_struct *); |
90 | * | 91 | * |
@@ -140,8 +141,8 @@ struct tty_ldisc_ops { | |||
140 | /* | 141 | /* |
141 | * The following routines are called from below. | 142 | * The following routines are called from below. |
142 | */ | 143 | */ |
143 | void (*receive_buf)(struct tty_struct *, const unsigned char *cp, | 144 | unsigned int (*receive_buf)(struct tty_struct *, |
144 | char *fp, int count); | 145 | const unsigned char *cp, char *fp, int count); |
145 | void (*write_wakeup)(struct tty_struct *); | 146 | void (*write_wakeup)(struct tty_struct *); |
146 | void (*dcd_change)(struct tty_struct *, unsigned int, | 147 | void (*dcd_change)(struct tty_struct *, unsigned int, |
147 | struct pps_event_time *); | 148 | struct pps_event_time *); |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 65f78ca5d88e..73c7df489607 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -806,8 +806,10 @@ struct usbdrv_wrap { | |||
806 | * @resume: Called when the device is being resumed by the system. | 806 | * @resume: Called when the device is being resumed by the system. |
807 | * @reset_resume: Called when the suspended device has been reset instead | 807 | * @reset_resume: Called when the suspended device has been reset instead |
808 | * of being resumed. | 808 | * of being resumed. |
809 | * @pre_reset: Called by usb_reset_device() when the device | 809 | * @pre_reset: Called by usb_reset_device() when the device is about to be |
810 | * is about to be reset. | 810 | * reset. This routine must not return until the driver has no active |
811 | * URBs for the device, and no more URBs may be submitted until the | ||
812 | * post_reset method is called. | ||
811 | * @post_reset: Called by usb_reset_device() after the device | 813 | * @post_reset: Called by usb_reset_device() after the device |
812 | * has been reset | 814 | * has been reset |
813 | * @id_table: USB drivers use ID table to support hotplugging. | 815 | * @id_table: USB drivers use ID table to support hotplugging. |
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index b72f305ce6bd..0fd3fbdd8283 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -579,7 +579,7 @@ struct usb_ss_ep_comp_descriptor { | |||
579 | 579 | ||
580 | __u8 bMaxBurst; | 580 | __u8 bMaxBurst; |
581 | __u8 bmAttributes; | 581 | __u8 bmAttributes; |
582 | __u16 wBytesPerInterval; | 582 | __le16 wBytesPerInterval; |
583 | } __attribute__ ((packed)); | 583 | } __attribute__ ((packed)); |
584 | 584 | ||
585 | #define USB_DT_SS_EP_COMP_SIZE 6 | 585 | #define USB_DT_SS_EP_COMP_SIZE 6 |
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index 882a084a8411..b78cba466d3d 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h | |||
@@ -37,6 +37,14 @@ | |||
37 | #include <linux/usb/ch9.h> | 37 | #include <linux/usb/ch9.h> |
38 | #include <linux/usb/gadget.h> | 38 | #include <linux/usb/gadget.h> |
39 | 39 | ||
40 | /* | ||
41 | * USB function drivers should return USB_GADGET_DELAYED_STATUS if they | ||
42 | * wish to delay the data/status stages of the control transfer till they | ||
43 | * are ready. The control transfer will then be kept from completing till | ||
44 | * all the function drivers that requested for USB_GADGET_DELAYED_STAUS | ||
45 | * invoke usb_composite_setup_continue(). | ||
46 | */ | ||
47 | #define USB_GADGET_DELAYED_STATUS 0x7fff /* Impossibly large value */ | ||
40 | 48 | ||
41 | struct usb_configuration; | 49 | struct usb_configuration; |
42 | 50 | ||
@@ -285,6 +293,7 @@ struct usb_composite_driver { | |||
285 | extern int usb_composite_probe(struct usb_composite_driver *driver, | 293 | extern int usb_composite_probe(struct usb_composite_driver *driver, |
286 | int (*bind)(struct usb_composite_dev *cdev)); | 294 | int (*bind)(struct usb_composite_dev *cdev)); |
287 | extern void usb_composite_unregister(struct usb_composite_driver *driver); | 295 | extern void usb_composite_unregister(struct usb_composite_driver *driver); |
296 | extern void usb_composite_setup_continue(struct usb_composite_dev *cdev); | ||
288 | 297 | ||
289 | 298 | ||
290 | /** | 299 | /** |
@@ -342,7 +351,12 @@ struct usb_composite_dev { | |||
342 | */ | 351 | */ |
343 | unsigned deactivations; | 352 | unsigned deactivations; |
344 | 353 | ||
345 | /* protects at least deactivation count */ | 354 | /* the composite driver won't complete the control transfer's |
355 | * data/status stages till delayed_status is zero. | ||
356 | */ | ||
357 | int delayed_status; | ||
358 | |||
359 | /* protects deactivations and delayed_status counts*/ | ||
346 | spinlock_t lock; | 360 | spinlock_t lock; |
347 | }; | 361 | }; |
348 | 362 | ||
diff --git a/include/linux/usb/ehci_def.h b/include/linux/usb/ehci_def.h index e49dfd45baa4..7cc95ee3606b 100644 --- a/include/linux/usb/ehci_def.h +++ b/include/linux/usb/ehci_def.h | |||
@@ -25,10 +25,15 @@ | |||
25 | struct ehci_caps { | 25 | struct ehci_caps { |
26 | /* these fields are specified as 8 and 16 bit registers, | 26 | /* these fields are specified as 8 and 16 bit registers, |
27 | * but some hosts can't perform 8 or 16 bit PCI accesses. | 27 | * but some hosts can't perform 8 or 16 bit PCI accesses. |
28 | * some hosts treat caplength and hciversion as parts of a 32-bit | ||
29 | * register, others treat them as two separate registers, this | ||
30 | * affects the memory map for big endian controllers. | ||
28 | */ | 31 | */ |
29 | u32 hc_capbase; | 32 | u32 hc_capbase; |
30 | #define HC_LENGTH(p) (((p)>>00)&0x00ff) /* bits 7:0 */ | 33 | #define HC_LENGTH(ehci, p) (0x00ff&((p) >> /* bits 7:0 / offset 00h */ \ |
31 | #define HC_VERSION(p) (((p)>>16)&0xffff) /* bits 31:16 */ | 34 | (ehci_big_endian_capbase(ehci) ? 24 : 0))) |
35 | #define HC_VERSION(ehci, p) (0xffff&((p) >> /* bits 31:16 / offset 02h */ \ | ||
36 | (ehci_big_endian_capbase(ehci) ? 0 : 16))) | ||
32 | u32 hcs_params; /* HCSPARAMS - offset 0x4 */ | 37 | u32 hcs_params; /* HCSPARAMS - offset 0x4 */ |
33 | #define HCS_DEBUG_PORT(p) (((p)>>20)&0xf) /* bits 23:20, debug port? */ | 38 | #define HCS_DEBUG_PORT(p) (((p)>>20)&0xf) /* bits 23:20, debug port? */ |
34 | #define HCS_INDICATOR(p) ((p)&(1 << 16)) /* true: has port indicators */ | 39 | #define HCS_INDICATOR(p) ((p)&(1 << 16)) /* true: has port indicators */ |
@@ -52,7 +57,7 @@ struct ehci_caps { | |||
52 | #define HCC_PGM_FRAMELISTLEN(p) ((p)&(1 << 1)) /* true: periodic_size changes*/ | 57 | #define HCC_PGM_FRAMELISTLEN(p) ((p)&(1 << 1)) /* true: periodic_size changes*/ |
53 | #define HCC_64BIT_ADDR(p) ((p)&(1)) /* true: can use 64-bit addr */ | 58 | #define HCC_64BIT_ADDR(p) ((p)&(1)) /* true: can use 64-bit addr */ |
54 | u8 portroute[8]; /* nibbles for routing - offset 0xC */ | 59 | u8 portroute[8]; /* nibbles for routing - offset 0xC */ |
55 | } __attribute__ ((packed)); | 60 | }; |
56 | 61 | ||
57 | 62 | ||
58 | /* Section 2.3 Host Controller Operational Registers */ | 63 | /* Section 2.3 Host Controller Operational Registers */ |
@@ -150,7 +155,7 @@ struct ehci_regs { | |||
150 | #define PORT_CSC (1<<1) /* connect status change */ | 155 | #define PORT_CSC (1<<1) /* connect status change */ |
151 | #define PORT_CONNECT (1<<0) /* device connected */ | 156 | #define PORT_CONNECT (1<<0) /* device connected */ |
152 | #define PORT_RWC_BITS (PORT_CSC | PORT_PEC | PORT_OCC) | 157 | #define PORT_RWC_BITS (PORT_CSC | PORT_PEC | PORT_OCC) |
153 | } __attribute__ ((packed)); | 158 | }; |
154 | 159 | ||
155 | #define USBMODE 0x68 /* USB Device mode */ | 160 | #define USBMODE 0x68 /* USB Device mode */ |
156 | #define USBMODE_SDIS (1<<3) /* Stream disable */ | 161 | #define USBMODE_SDIS (1<<3) /* Stream disable */ |
@@ -194,7 +199,7 @@ struct ehci_dbg_port { | |||
194 | u32 data47; | 199 | u32 data47; |
195 | u32 address; | 200 | u32 address; |
196 | #define DBGP_EPADDR(dev, ep) (((dev)<<8)|(ep)) | 201 | #define DBGP_EPADDR(dev, ep) (((dev)<<8)|(ep)) |
197 | } __attribute__ ((packed)); | 202 | }; |
198 | 203 | ||
199 | #ifdef CONFIG_EARLY_PRINTK_DBGP | 204 | #ifdef CONFIG_EARLY_PRINTK_DBGP |
200 | #include <linux/init.h> | 205 | #include <linux/init.h> |
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index e538172c0f64..dd1571db55e7 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
@@ -890,8 +890,8 @@ static inline void usb_free_descriptors(struct usb_descriptor_header **v) | |||
890 | /* utility wrapping a simple endpoint selection policy */ | 890 | /* utility wrapping a simple endpoint selection policy */ |
891 | 891 | ||
892 | extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *, | 892 | extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *, |
893 | struct usb_endpoint_descriptor *) __devinit; | 893 | struct usb_endpoint_descriptor *); |
894 | 894 | ||
895 | extern void usb_ep_autoconfig_reset(struct usb_gadget *) __devinit; | 895 | extern void usb_ep_autoconfig_reset(struct usb_gadget *); |
896 | 896 | ||
897 | #endif /* __LINUX_USB_GADGET_H */ | 897 | #endif /* __LINUX_USB_GADGET_H */ |
diff --git a/include/linux/usb/msm_hsusb.h b/include/linux/usb/msm_hsusb.h index 3657403eac18..00311fe9d0df 100644 --- a/include/linux/usb/msm_hsusb.h +++ b/include/linux/usb/msm_hsusb.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * | 2 | * |
3 | * Copyright (C) 2008 Google, Inc. | 3 | * Copyright (C) 2008 Google, Inc. |
4 | * Author: Brian Swetland <swetland@google.com> | 4 | * Author: Brian Swetland <swetland@google.com> |
5 | * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved. | 5 | * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved. |
6 | * | 6 | * |
7 | * This software is licensed under the terms of the GNU General Public | 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 | 8 | * License version 2, as published by the Free Software Foundation, and |
@@ -54,6 +54,64 @@ enum otg_control_type { | |||
54 | }; | 54 | }; |
55 | 55 | ||
56 | /** | 56 | /** |
57 | * PHY used in | ||
58 | * | ||
59 | * INVALID_PHY Unsupported PHY | ||
60 | * CI_45NM_INTEGRATED_PHY Chipidea 45nm integrated PHY | ||
61 | * SNPS_28NM_INTEGRATED_PHY Synopsis 28nm integrated PHY | ||
62 | * | ||
63 | */ | ||
64 | enum msm_usb_phy_type { | ||
65 | INVALID_PHY = 0, | ||
66 | CI_45NM_INTEGRATED_PHY, | ||
67 | SNPS_28NM_INTEGRATED_PHY, | ||
68 | }; | ||
69 | |||
70 | #define IDEV_CHG_MAX 1500 | ||
71 | #define IUNIT 100 | ||
72 | |||
73 | /** | ||
74 | * Different states involved in USB charger detection. | ||
75 | * | ||
76 | * USB_CHG_STATE_UNDEFINED USB charger is not connected or detection | ||
77 | * process is not yet started. | ||
78 | * USB_CHG_STATE_WAIT_FOR_DCD Waiting for Data pins contact. | ||
79 | * USB_CHG_STATE_DCD_DONE Data pin contact is detected. | ||
80 | * USB_CHG_STATE_PRIMARY_DONE Primary detection is completed (Detects | ||
81 | * between SDP and DCP/CDP). | ||
82 | * USB_CHG_STATE_SECONDARY_DONE Secondary detection is completed (Detects | ||
83 | * between DCP and CDP). | ||
84 | * USB_CHG_STATE_DETECTED USB charger type is determined. | ||
85 | * | ||
86 | */ | ||
87 | enum usb_chg_state { | ||
88 | USB_CHG_STATE_UNDEFINED = 0, | ||
89 | USB_CHG_STATE_WAIT_FOR_DCD, | ||
90 | USB_CHG_STATE_DCD_DONE, | ||
91 | USB_CHG_STATE_PRIMARY_DONE, | ||
92 | USB_CHG_STATE_SECONDARY_DONE, | ||
93 | USB_CHG_STATE_DETECTED, | ||
94 | }; | ||
95 | |||
96 | /** | ||
97 | * USB charger types | ||
98 | * | ||
99 | * USB_INVALID_CHARGER Invalid USB charger. | ||
100 | * USB_SDP_CHARGER Standard downstream port. Refers to a downstream port | ||
101 | * on USB2.0 compliant host/hub. | ||
102 | * USB_DCP_CHARGER Dedicated charger port (AC charger/ Wall charger). | ||
103 | * USB_CDP_CHARGER Charging downstream port. Enumeration can happen and | ||
104 | * IDEV_CHG_MAX can be drawn irrespective of USB state. | ||
105 | * | ||
106 | */ | ||
107 | enum usb_chg_type { | ||
108 | USB_INVALID_CHARGER = 0, | ||
109 | USB_SDP_CHARGER, | ||
110 | USB_DCP_CHARGER, | ||
111 | USB_CDP_CHARGER, | ||
112 | }; | ||
113 | |||
114 | /** | ||
57 | * struct msm_otg_platform_data - platform device data | 115 | * struct msm_otg_platform_data - platform device data |
58 | * for msm_otg driver. | 116 | * for msm_otg driver. |
59 | * @phy_init_seq: PHY configuration sequence. val, reg pairs | 117 | * @phy_init_seq: PHY configuration sequence. val, reg pairs |
@@ -64,7 +122,8 @@ enum otg_control_type { | |||
64 | * @otg_control: OTG switch controlled by user/Id pin | 122 | * @otg_control: OTG switch controlled by user/Id pin |
65 | * @default_mode: Default operational mode. Applicable only if | 123 | * @default_mode: Default operational mode. Applicable only if |
66 | * OTG switch is controller by user. | 124 | * OTG switch is controller by user. |
67 | * | 125 | * @pclk_src_name: pclk is derived from ebi1_usb_clk in case of 7x27 and 8k |
126 | * dfab_usb_hs_clk in case of 8660 and 8960. | ||
68 | */ | 127 | */ |
69 | struct msm_otg_platform_data { | 128 | struct msm_otg_platform_data { |
70 | int *phy_init_seq; | 129 | int *phy_init_seq; |
@@ -73,7 +132,9 @@ struct msm_otg_platform_data { | |||
73 | enum usb_mode_type mode; | 132 | enum usb_mode_type mode; |
74 | enum otg_control_type otg_control; | 133 | enum otg_control_type otg_control; |
75 | enum usb_mode_type default_mode; | 134 | enum usb_mode_type default_mode; |
135 | enum msm_usb_phy_type phy_type; | ||
76 | void (*setup_gpio)(enum usb_otg_state state); | 136 | void (*setup_gpio)(enum usb_otg_state state); |
137 | char *pclk_src_name; | ||
77 | }; | 138 | }; |
78 | 139 | ||
79 | /** | 140 | /** |
@@ -83,6 +144,7 @@ struct msm_otg_platform_data { | |||
83 | * @irq: IRQ number assigned for HSUSB controller. | 144 | * @irq: IRQ number assigned for HSUSB controller. |
84 | * @clk: clock struct of usb_hs_clk. | 145 | * @clk: clock struct of usb_hs_clk. |
85 | * @pclk: clock struct of usb_hs_pclk. | 146 | * @pclk: clock struct of usb_hs_pclk. |
147 | * @pclk_src: pclk source for voting. | ||
86 | * @phy_reset_clk: clock struct of usb_phy_clk. | 148 | * @phy_reset_clk: clock struct of usb_phy_clk. |
87 | * @core_clk: clock struct of usb_hs_core_clk. | 149 | * @core_clk: clock struct of usb_hs_core_clk. |
88 | * @regs: ioremapped register base address. | 150 | * @regs: ioremapped register base address. |
@@ -90,7 +152,12 @@ struct msm_otg_platform_data { | |||
90 | * @sm_work: OTG state machine work. | 152 | * @sm_work: OTG state machine work. |
91 | * @in_lpm: indicates low power mode (LPM) state. | 153 | * @in_lpm: indicates low power mode (LPM) state. |
92 | * @async_int: Async interrupt arrived. | 154 | * @async_int: Async interrupt arrived. |
93 | * | 155 | * @cur_power: The amount of mA available from downstream port. |
156 | * @chg_work: Charger detection work. | ||
157 | * @chg_state: The state of charger detection process. | ||
158 | * @chg_type: The type of charger attached. | ||
159 | * @dcd_retires: The retry count used to track Data contact | ||
160 | * detection process. | ||
94 | */ | 161 | */ |
95 | struct msm_otg { | 162 | struct msm_otg { |
96 | struct otg_transceiver otg; | 163 | struct otg_transceiver otg; |
@@ -98,6 +165,7 @@ struct msm_otg { | |||
98 | int irq; | 165 | int irq; |
99 | struct clk *clk; | 166 | struct clk *clk; |
100 | struct clk *pclk; | 167 | struct clk *pclk; |
168 | struct clk *pclk_src; | ||
101 | struct clk *phy_reset_clk; | 169 | struct clk *phy_reset_clk; |
102 | struct clk *core_clk; | 170 | struct clk *core_clk; |
103 | void __iomem *regs; | 171 | void __iomem *regs; |
@@ -107,6 +175,11 @@ struct msm_otg { | |||
107 | struct work_struct sm_work; | 175 | struct work_struct sm_work; |
108 | atomic_t in_lpm; | 176 | atomic_t in_lpm; |
109 | int async_int; | 177 | int async_int; |
178 | unsigned cur_power; | ||
179 | struct delayed_work chg_work; | ||
180 | enum usb_chg_state chg_state; | ||
181 | enum usb_chg_type chg_type; | ||
182 | u8 dcd_retries; | ||
110 | }; | 183 | }; |
111 | 184 | ||
112 | #endif | 185 | #endif |
diff --git a/include/linux/usb/msm_hsusb_hw.h b/include/linux/usb/msm_hsusb_hw.h index 7d1babbff071..6e97a2d3d39f 100644 --- a/include/linux/usb/msm_hsusb_hw.h +++ b/include/linux/usb/msm_hsusb_hw.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #define USB_PORTSC (MSM_USB_BASE + 0x0184) | 24 | #define USB_PORTSC (MSM_USB_BASE + 0x0184) |
25 | #define USB_OTGSC (MSM_USB_BASE + 0x01A4) | 25 | #define USB_OTGSC (MSM_USB_BASE + 0x01A4) |
26 | #define USB_USBMODE (MSM_USB_BASE + 0x01A8) | 26 | #define USB_USBMODE (MSM_USB_BASE + 0x01A8) |
27 | #define USB_PHY_CTRL (MSM_USB_BASE + 0x0240) | ||
27 | 28 | ||
28 | #define USBCMD_RESET 2 | 29 | #define USBCMD_RESET 2 |
29 | #define USB_USBINTR (MSM_USB_BASE + 0x0148) | 30 | #define USB_USBINTR (MSM_USB_BASE + 0x0148) |
@@ -42,6 +43,7 @@ | |||
42 | 43 | ||
43 | #define ASYNC_INTR_CTRL (1 << 29) /* Enable async interrupt */ | 44 | #define ASYNC_INTR_CTRL (1 << 29) /* Enable async interrupt */ |
44 | #define ULPI_STP_CTRL (1 << 30) /* Block communication with PHY */ | 45 | #define ULPI_STP_CTRL (1 << 30) /* Block communication with PHY */ |
46 | #define PHY_RETEN (1 << 1) /* PHY retention enable/disable */ | ||
45 | 47 | ||
46 | /* OTG definitions */ | 48 | /* OTG definitions */ |
47 | #define OTGSC_INTSTS_MASK (0x7f << 16) | 49 | #define OTGSC_INTSTS_MASK (0x7f << 16) |
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index 6e40718f5abe..d87f44f5b04e 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h | |||
@@ -168,6 +168,7 @@ otg_shutdown(struct otg_transceiver *otg) | |||
168 | #ifdef CONFIG_USB_OTG_UTILS | 168 | #ifdef CONFIG_USB_OTG_UTILS |
169 | extern struct otg_transceiver *otg_get_transceiver(void); | 169 | extern struct otg_transceiver *otg_get_transceiver(void); |
170 | extern void otg_put_transceiver(struct otg_transceiver *); | 170 | extern void otg_put_transceiver(struct otg_transceiver *); |
171 | extern const char *otg_state_string(enum usb_otg_state state); | ||
171 | #else | 172 | #else |
172 | static inline struct otg_transceiver *otg_get_transceiver(void) | 173 | static inline struct otg_transceiver *otg_get_transceiver(void) |
173 | { | 174 | { |
@@ -177,6 +178,11 @@ static inline struct otg_transceiver *otg_get_transceiver(void) | |||
177 | static inline void otg_put_transceiver(struct otg_transceiver *x) | 178 | static inline void otg_put_transceiver(struct otg_transceiver *x) |
178 | { | 179 | { |
179 | } | 180 | } |
181 | |||
182 | static inline const char *otg_state_string(enum usb_otg_state state) | ||
183 | { | ||
184 | return NULL; | ||
185 | } | ||
180 | #endif | 186 | #endif |
181 | 187 | ||
182 | /* Context: can sleep */ | 188 | /* Context: can sleep */ |
diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h new file mode 100644 index 000000000000..3a7f1d982dd6 --- /dev/null +++ b/include/linux/usb/renesas_usbhs.h | |||
@@ -0,0 +1,156 @@ | |||
1 | /* | ||
2 | * Renesas USB | ||
3 | * | ||
4 | * Copyright (C) 2011 Renesas Solutions Corp. | ||
5 | * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | ||
6 | * | ||
7 | * This program is distributed in the hope that it will be useful, | ||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | * GNU General Public License for more details. | ||
11 | * | ||
12 | * You should have received a copy of the GNU General Public License | ||
13 | * along with this program; if not, write to the Free Software | ||
14 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
15 | * | ||
16 | */ | ||
17 | #ifndef RENESAS_USB_H | ||
18 | #define RENESAS_USB_H | ||
19 | #include <linux/platform_device.h> | ||
20 | #include <linux/usb/ch9.h> | ||
21 | |||
22 | /* | ||
23 | * module type | ||
24 | * | ||
25 | * it will be return value from get_id | ||
26 | */ | ||
27 | enum { | ||
28 | USBHS_HOST = 0, | ||
29 | USBHS_GADGET, | ||
30 | USBHS_MAX, | ||
31 | }; | ||
32 | |||
33 | /* | ||
34 | * callback functions table for driver | ||
35 | * | ||
36 | * These functions are called from platform for driver. | ||
37 | * Callback function's pointer will be set before | ||
38 | * renesas_usbhs_platform_callback :: hardware_init was called | ||
39 | */ | ||
40 | struct renesas_usbhs_driver_callback { | ||
41 | int (*notify_hotplug)(struct platform_device *pdev); | ||
42 | }; | ||
43 | |||
44 | /* | ||
45 | * callback functions for platform | ||
46 | * | ||
47 | * These functions are called from driver for platform | ||
48 | */ | ||
49 | struct renesas_usbhs_platform_callback { | ||
50 | |||
51 | /* | ||
52 | * option: | ||
53 | * | ||
54 | * Hardware init function for platform. | ||
55 | * it is called when driver was probed. | ||
56 | */ | ||
57 | int (*hardware_init)(struct platform_device *pdev); | ||
58 | |||
59 | /* | ||
60 | * option: | ||
61 | * | ||
62 | * Hardware exit function for platform. | ||
63 | * it is called when driver was removed | ||
64 | */ | ||
65 | void (*hardware_exit)(struct platform_device *pdev); | ||
66 | |||
67 | /* | ||
68 | * option: | ||
69 | * | ||
70 | * Phy reset for platform | ||
71 | */ | ||
72 | void (*phy_reset)(struct platform_device *pdev); | ||
73 | |||
74 | /* | ||
75 | * get USB ID function | ||
76 | * - USBHS_HOST | ||
77 | * - USBHS_GADGET | ||
78 | */ | ||
79 | int (*get_id)(struct platform_device *pdev); | ||
80 | |||
81 | /* | ||
82 | * get VBUS status function. | ||
83 | */ | ||
84 | int (*get_vbus)(struct platform_device *pdev); | ||
85 | }; | ||
86 | |||
87 | /* | ||
88 | * parameters for renesas usbhs | ||
89 | * | ||
90 | * some register needs USB chip specific parameters. | ||
91 | * This struct show it to driver | ||
92 | */ | ||
93 | struct renesas_usbhs_driver_param { | ||
94 | /* | ||
95 | * pipe settings | ||
96 | */ | ||
97 | u32 *pipe_type; /* array of USB_ENDPOINT_XFER_xxx (from ep0) */ | ||
98 | int pipe_size; /* pipe_type array size */ | ||
99 | |||
100 | /* | ||
101 | * option: | ||
102 | * | ||
103 | * for BUSWAIT :: BWAIT | ||
104 | * */ | ||
105 | int buswait_bwait; | ||
106 | |||
107 | /* | ||
108 | * option: | ||
109 | * | ||
110 | * delay time from notify_hotplug callback | ||
111 | */ | ||
112 | int detection_delay; | ||
113 | }; | ||
114 | |||
115 | /* | ||
116 | * option: | ||
117 | * | ||
118 | * platform information for renesas_usbhs driver. | ||
119 | */ | ||
120 | struct renesas_usbhs_platform_info { | ||
121 | /* | ||
122 | * option: | ||
123 | * | ||
124 | * platform set these functions before | ||
125 | * call platform_add_devices if needed | ||
126 | */ | ||
127 | struct renesas_usbhs_platform_callback platform_callback; | ||
128 | |||
129 | /* | ||
130 | * driver set these callback functions pointer. | ||
131 | * platform can use it on callback functions | ||
132 | */ | ||
133 | struct renesas_usbhs_driver_callback driver_callback; | ||
134 | |||
135 | /* | ||
136 | * option: | ||
137 | * | ||
138 | * driver use these param for some register | ||
139 | */ | ||
140 | struct renesas_usbhs_driver_param driver_param; | ||
141 | }; | ||
142 | |||
143 | /* | ||
144 | * macro for platform | ||
145 | */ | ||
146 | #define renesas_usbhs_get_info(pdev)\ | ||
147 | ((struct renesas_usbhs_platform_info *)(pdev)->dev.platform_data) | ||
148 | |||
149 | #define renesas_usbhs_call_notify_hotplug(pdev) \ | ||
150 | ({ \ | ||
151 | struct renesas_usbhs_driver_callback *dc; \ | ||
152 | dc = &(renesas_usbhs_get_info(pdev)->driver_callback); \ | ||
153 | if (dc && dc->notify_hotplug) \ | ||
154 | dc->notify_hotplug(pdev); \ | ||
155 | }) | ||
156 | #endif /* RENESAS_USB_H */ | ||
diff --git a/include/linux/usb/rndis_host.h b/include/linux/usb/rndis_host.h index 05ef52861988..88fceb718c77 100644 --- a/include/linux/usb/rndis_host.h +++ b/include/linux/usb/rndis_host.h | |||
@@ -256,6 +256,8 @@ struct rndis_keepalive_c { /* IN (optionally OUT) */ | |||
256 | #define FLAG_RNDIS_PHYM_NOT_WIRELESS 0x0001 | 256 | #define FLAG_RNDIS_PHYM_NOT_WIRELESS 0x0001 |
257 | #define FLAG_RNDIS_PHYM_WIRELESS 0x0002 | 257 | #define FLAG_RNDIS_PHYM_WIRELESS 0x0002 |
258 | 258 | ||
259 | /* Flags for driver_info::data */ | ||
260 | #define RNDIS_DRIVER_DATA_POLL_STATUS 1 /* poll status before control */ | ||
259 | 261 | ||
260 | extern void rndis_status(struct usbnet *dev, struct urb *urb); | 262 | extern void rndis_status(struct usbnet *dev, struct urb *urb); |
261 | extern int | 263 | extern int |
diff --git a/include/linux/uvcvideo.h b/include/linux/uvcvideo.h new file mode 100644 index 000000000000..f46a53f060d7 --- /dev/null +++ b/include/linux/uvcvideo.h | |||
@@ -0,0 +1,69 @@ | |||
1 | #ifndef __LINUX_UVCVIDEO_H_ | ||
2 | #define __LINUX_UVCVIDEO_H_ | ||
3 | |||
4 | #include <linux/ioctl.h> | ||
5 | #include <linux/types.h> | ||
6 | |||
7 | /* | ||
8 | * Dynamic controls | ||
9 | */ | ||
10 | |||
11 | /* Data types for UVC control data */ | ||
12 | #define UVC_CTRL_DATA_TYPE_RAW 0 | ||
13 | #define UVC_CTRL_DATA_TYPE_SIGNED 1 | ||
14 | #define UVC_CTRL_DATA_TYPE_UNSIGNED 2 | ||
15 | #define UVC_CTRL_DATA_TYPE_BOOLEAN 3 | ||
16 | #define UVC_CTRL_DATA_TYPE_ENUM 4 | ||
17 | #define UVC_CTRL_DATA_TYPE_BITMASK 5 | ||
18 | |||
19 | /* Control flags */ | ||
20 | #define UVC_CTRL_FLAG_SET_CUR (1 << 0) | ||
21 | #define UVC_CTRL_FLAG_GET_CUR (1 << 1) | ||
22 | #define UVC_CTRL_FLAG_GET_MIN (1 << 2) | ||
23 | #define UVC_CTRL_FLAG_GET_MAX (1 << 3) | ||
24 | #define UVC_CTRL_FLAG_GET_RES (1 << 4) | ||
25 | #define UVC_CTRL_FLAG_GET_DEF (1 << 5) | ||
26 | /* Control should be saved at suspend and restored at resume. */ | ||
27 | #define UVC_CTRL_FLAG_RESTORE (1 << 6) | ||
28 | /* Control can be updated by the camera. */ | ||
29 | #define UVC_CTRL_FLAG_AUTO_UPDATE (1 << 7) | ||
30 | |||
31 | #define UVC_CTRL_FLAG_GET_RANGE \ | ||
32 | (UVC_CTRL_FLAG_GET_CUR | UVC_CTRL_FLAG_GET_MIN | \ | ||
33 | UVC_CTRL_FLAG_GET_MAX | UVC_CTRL_FLAG_GET_RES | \ | ||
34 | UVC_CTRL_FLAG_GET_DEF) | ||
35 | |||
36 | struct uvc_menu_info { | ||
37 | __u32 value; | ||
38 | __u8 name[32]; | ||
39 | }; | ||
40 | |||
41 | struct uvc_xu_control_mapping { | ||
42 | __u32 id; | ||
43 | __u8 name[32]; | ||
44 | __u8 entity[16]; | ||
45 | __u8 selector; | ||
46 | |||
47 | __u8 size; | ||
48 | __u8 offset; | ||
49 | __u32 v4l2_type; | ||
50 | __u32 data_type; | ||
51 | |||
52 | struct uvc_menu_info __user *menu_info; | ||
53 | __u32 menu_count; | ||
54 | |||
55 | __u32 reserved[4]; | ||
56 | }; | ||
57 | |||
58 | struct uvc_xu_control_query { | ||
59 | __u8 unit; | ||
60 | __u8 selector; | ||
61 | __u8 query; | ||
62 | __u16 size; | ||
63 | __u8 __user *data; | ||
64 | }; | ||
65 | |||
66 | #define UVCIOC_CTRL_MAP _IOWR('u', 0x20, struct uvc_xu_control_mapping) | ||
67 | #define UVCIOC_CTRL_QUERY _IOWR('u', 0x21, struct uvc_xu_control_query) | ||
68 | |||
69 | #endif | ||
diff --git a/include/linux/v4l2-mediabus.h b/include/linux/v4l2-mediabus.h index de5c15921025..5ea7f753a348 100644 --- a/include/linux/v4l2-mediabus.h +++ b/include/linux/v4l2-mediabus.h | |||
@@ -89,6 +89,9 @@ enum v4l2_mbus_pixelcode { | |||
89 | V4L2_MBUS_FMT_SGBRG12_1X12 = 0x3010, | 89 | V4L2_MBUS_FMT_SGBRG12_1X12 = 0x3010, |
90 | V4L2_MBUS_FMT_SGRBG12_1X12 = 0x3011, | 90 | V4L2_MBUS_FMT_SGRBG12_1X12 = 0x3011, |
91 | V4L2_MBUS_FMT_SRGGB12_1X12 = 0x3012, | 91 | V4L2_MBUS_FMT_SRGGB12_1X12 = 0x3012, |
92 | |||
93 | /* JPEG compressed formats - next is 0x4002 */ | ||
94 | V4L2_MBUS_FMT_JPEG_1X8 = 0x4001, | ||
92 | }; | 95 | }; |
93 | 96 | ||
94 | /** | 97 | /** |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index be82c8ead1af..8a4c309d2344 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -311,6 +311,9 @@ struct v4l2_pix_format { | |||
311 | #define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ') /* 12 Greyscale */ | 311 | #define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ') /* 12 Greyscale */ |
312 | #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ | 312 | #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ |
313 | 313 | ||
314 | /* Grey bit-packed formats */ | ||
315 | #define V4L2_PIX_FMT_Y10BPACK v4l2_fourcc('Y', '1', '0', 'B') /* 10 Greyscale bit-packed */ | ||
316 | |||
314 | /* Palette formats */ | 317 | /* Palette formats */ |
315 | #define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */ | 318 | #define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */ |
316 | 319 | ||
@@ -333,6 +336,7 @@ struct v4l2_pix_format { | |||
333 | #define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y', 'U', '1', '2') /* 12 YUV 4:2:0 */ | 336 | #define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y', 'U', '1', '2') /* 12 YUV 4:2:0 */ |
334 | #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4') /* 8 8-bit color */ | 337 | #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4') /* 8 8-bit color */ |
335 | #define V4L2_PIX_FMT_HM12 v4l2_fourcc('H', 'M', '1', '2') /* 8 YUV 4:2:0 16x16 macroblocks */ | 338 | #define V4L2_PIX_FMT_HM12 v4l2_fourcc('H', 'M', '1', '2') /* 8 YUV 4:2:0 16x16 macroblocks */ |
339 | #define V4L2_PIX_FMT_M420 v4l2_fourcc('M', '4', '2', '0') /* 12 YUV 4:2:0 2 lines y, 1 line uv interleaved */ | ||
336 | 340 | ||
337 | /* two planes -- one Y, one Cr + Cb interleaved */ | 341 | /* two planes -- one Y, one Cr + Cb interleaved */ |
338 | #define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */ | 342 | #define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */ |
diff --git a/include/linux/wl12xx.h b/include/linux/wl12xx.h index bebb8efea0a6..4b697395326e 100644 --- a/include/linux/wl12xx.h +++ b/include/linux/wl12xx.h | |||
@@ -24,12 +24,26 @@ | |||
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 */ | 27 | /* Reference clock values */ |
28 | enum { | 28 | enum { |
29 | WL12XX_REFCLOCK_19 = 0, /* 19.2 MHz */ | 29 | WL12XX_REFCLOCK_19 = 0, /* 19.2 MHz */ |
30 | WL12XX_REFCLOCK_26 = 1, /* 26 MHz */ | 30 | WL12XX_REFCLOCK_26 = 1, /* 26 MHz */ |
31 | WL12XX_REFCLOCK_38 = 2, /* 38.4 MHz */ | 31 | WL12XX_REFCLOCK_38 = 2, /* 38.4 MHz */ |
32 | WL12XX_REFCLOCK_54 = 3, /* 54 MHz */ | 32 | WL12XX_REFCLOCK_52 = 3, /* 52 MHz */ |
33 | WL12XX_REFCLOCK_38_XTAL = 4, /* 38.4 MHz, XTAL */ | ||
34 | WL12XX_REFCLOCK_26_XTAL = 5, /* 26 MHz, XTAL */ | ||
35 | }; | ||
36 | |||
37 | /* TCXO clock values */ | ||
38 | enum { | ||
39 | WL12XX_TCXOCLOCK_19_2 = 0, /* 19.2MHz */ | ||
40 | WL12XX_TCXOCLOCK_26 = 1, /* 26 MHz */ | ||
41 | WL12XX_TCXOCLOCK_38_4 = 2, /* 38.4MHz */ | ||
42 | WL12XX_TCXOCLOCK_52 = 3, /* 52 MHz */ | ||
43 | WL12XX_TCXOCLOCK_16_368 = 4, /* 16.368 MHz */ | ||
44 | WL12XX_TCXOCLOCK_32_736 = 5, /* 32.736 MHz */ | ||
45 | WL12XX_TCXOCLOCK_16_8 = 6, /* 16.8 MHz */ | ||
46 | WL12XX_TCXOCLOCK_33_6 = 7, /* 33.6 MHz */ | ||
33 | }; | 47 | }; |
34 | 48 | ||
35 | struct wl12xx_platform_data { | 49 | struct wl12xx_platform_data { |
@@ -38,8 +52,13 @@ struct wl12xx_platform_data { | |||
38 | int irq; | 52 | int irq; |
39 | bool use_eeprom; | 53 | bool use_eeprom; |
40 | int board_ref_clock; | 54 | int board_ref_clock; |
55 | int board_tcxo_clock; | ||
56 | unsigned long platform_quirks; | ||
41 | }; | 57 | }; |
42 | 58 | ||
59 | /* Platform does not support level trigger interrupts */ | ||
60 | #define WL12XX_PLATFORM_QUIRK_EDGE_IRQ BIT(0) | ||
61 | |||
43 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | 62 | #ifdef CONFIG_WL12XX_PLATFORM_DATA |
44 | 63 | ||
45 | int wl12xx_set_platform_data(const struct wl12xx_platform_data *data); | 64 | int wl12xx_set_platform_data(const struct wl12xx_platform_data *data); |