diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-07-12 06:34:42 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-07-12 06:34:42 -0400 |
commit | f2006e27396f55276f24434f56e208d86e7f9908 (patch) | |
tree | 71896db916d33888b4286f80117d3cac0da40e6d /include/linux | |
parent | e399eb56a6110e13f97e644658648602e2b08de7 (diff) | |
parent | 9903883f1dd6e86f286b7bfa6e4b423f98c1cd9e (diff) |
Merge branch 'linus' into timers/urgent
Get upstream changes so we can apply fixes against them
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux')
197 files changed, 2775 insertions, 1056 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 17b5b5967641..353ba256f368 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -352,8 +352,7 @@ extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, | |||
352 | 352 | ||
353 | /* Enable _OST when all relevant hotplug operations are enabled */ | 353 | /* Enable _OST when all relevant hotplug operations are enabled */ |
354 | #if defined(CONFIG_ACPI_HOTPLUG_CPU) && \ | 354 | #if defined(CONFIG_ACPI_HOTPLUG_CPU) && \ |
355 | (defined(CONFIG_ACPI_HOTPLUG_MEMORY) || \ | 355 | defined(CONFIG_ACPI_HOTPLUG_MEMORY) && \ |
356 | defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE)) && \ | ||
357 | defined(CONFIG_ACPI_CONTAINER) | 356 | defined(CONFIG_ACPI_CONTAINER) |
358 | #define ACPI_HOTPLUG_OST | 357 | #define ACPI_HOTPLUG_OST |
359 | #endif | 358 | #endif |
diff --git a/include/linux/aer.h b/include/linux/aer.h index 737f90ab4b62..4dbaa7081530 100644 --- a/include/linux/aer.h +++ b/include/linux/aer.h | |||
@@ -7,6 +7,10 @@ | |||
7 | #ifndef _AER_H_ | 7 | #ifndef _AER_H_ |
8 | #define _AER_H_ | 8 | #define _AER_H_ |
9 | 9 | ||
10 | #define AER_NONFATAL 0 | ||
11 | #define AER_FATAL 1 | ||
12 | #define AER_CORRECTABLE 2 | ||
13 | |||
10 | struct aer_header_log_regs { | 14 | struct aer_header_log_regs { |
11 | unsigned int dw0; | 15 | unsigned int dw0; |
12 | unsigned int dw1; | 16 | unsigned int dw1; |
@@ -31,9 +35,9 @@ struct aer_capability_regs { | |||
31 | 35 | ||
32 | #if defined(CONFIG_PCIEAER) | 36 | #if defined(CONFIG_PCIEAER) |
33 | /* pci-e port driver needs this function to enable aer */ | 37 | /* pci-e port driver needs this function to enable aer */ |
34 | extern int pci_enable_pcie_error_reporting(struct pci_dev *dev); | 38 | int pci_enable_pcie_error_reporting(struct pci_dev *dev); |
35 | extern int pci_disable_pcie_error_reporting(struct pci_dev *dev); | 39 | int pci_disable_pcie_error_reporting(struct pci_dev *dev); |
36 | extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev); | 40 | int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev); |
37 | #else | 41 | #else |
38 | static inline int pci_enable_pcie_error_reporting(struct pci_dev *dev) | 42 | static inline int pci_enable_pcie_error_reporting(struct pci_dev *dev) |
39 | { | 43 | { |
@@ -49,11 +53,11 @@ static inline int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev) | |||
49 | } | 53 | } |
50 | #endif | 54 | #endif |
51 | 55 | ||
52 | extern void cper_print_aer(struct pci_dev *dev, | 56 | void cper_print_aer(struct pci_dev *dev, int cper_severity, |
53 | int cper_severity, struct aer_capability_regs *aer); | 57 | struct aer_capability_regs *aer); |
54 | extern int cper_severity_to_aer(int cper_severity); | 58 | int cper_severity_to_aer(int cper_severity); |
55 | extern void aer_recover_queue(int domain, unsigned int bus, unsigned int devfn, | 59 | void aer_recover_queue(int domain, unsigned int bus, unsigned int devfn, |
56 | int severity, | 60 | int severity, |
57 | struct aer_capability_regs *aer_regs); | 61 | struct aer_capability_regs *aer_regs); |
58 | #endif //_AER_H_ | 62 | #endif //_AER_H_ |
59 | 63 | ||
diff --git a/include/linux/alarmtimer.h b/include/linux/alarmtimer.h index 9069694e70eb..a899402a5a0e 100644 --- a/include/linux/alarmtimer.h +++ b/include/linux/alarmtimer.h | |||
@@ -44,10 +44,14 @@ struct alarm { | |||
44 | void alarm_init(struct alarm *alarm, enum alarmtimer_type type, | 44 | void alarm_init(struct alarm *alarm, enum alarmtimer_type type, |
45 | enum alarmtimer_restart (*function)(struct alarm *, ktime_t)); | 45 | enum alarmtimer_restart (*function)(struct alarm *, ktime_t)); |
46 | int alarm_start(struct alarm *alarm, ktime_t start); | 46 | int alarm_start(struct alarm *alarm, ktime_t start); |
47 | int alarm_start_relative(struct alarm *alarm, ktime_t start); | ||
48 | void alarm_restart(struct alarm *alarm); | ||
47 | int alarm_try_to_cancel(struct alarm *alarm); | 49 | int alarm_try_to_cancel(struct alarm *alarm); |
48 | int alarm_cancel(struct alarm *alarm); | 50 | int alarm_cancel(struct alarm *alarm); |
49 | 51 | ||
50 | u64 alarm_forward(struct alarm *alarm, ktime_t now, ktime_t interval); | 52 | u64 alarm_forward(struct alarm *alarm, ktime_t now, ktime_t interval); |
53 | u64 alarm_forward_now(struct alarm *alarm, ktime_t interval); | ||
54 | ktime_t alarm_expires_remaining(const struct alarm *alarm); | ||
51 | 55 | ||
52 | /* Provide way to access the rtc device being used by alarmtimers */ | 56 | /* Provide way to access the rtc device being used by alarmtimers */ |
53 | struct rtc_device *alarmtimer_get_rtcdev(void); | 57 | struct rtc_device *alarmtimer_get_rtcdev(void); |
diff --git a/include/linux/amba/pl08x.h b/include/linux/amba/pl08x.h index 2a5f64a11b77..10fe2a211c2e 100644 --- a/include/linux/amba/pl08x.h +++ b/include/linux/amba/pl08x.h | |||
@@ -76,11 +76,11 @@ struct pl08x_channel_data { | |||
76 | * platform, all inclusive, including multiplexed channels. The available | 76 | * platform, all inclusive, including multiplexed channels. The available |
77 | * physical channels will be multiplexed around these signals as they are | 77 | * physical channels will be multiplexed around these signals as they are |
78 | * requested, just enumerate all possible channels. | 78 | * requested, just enumerate all possible channels. |
79 | * @get_signal: request a physical signal to be used for a DMA transfer | 79 | * @get_xfer_signal: request a physical signal to be used for a DMA transfer |
80 | * immediately: if there is some multiplexing or similar blocking the use | 80 | * immediately: if there is some multiplexing or similar blocking the use |
81 | * of the channel the transfer can be denied by returning less than zero, | 81 | * of the channel the transfer can be denied by returning less than zero, |
82 | * else it returns the allocated signal number | 82 | * else it returns the allocated signal number |
83 | * @put_signal: indicate to the platform that this physical signal is not | 83 | * @put_xfer_signal: indicate to the platform that this physical signal is not |
84 | * running any DMA transfer and multiplexing can be recycled | 84 | * running any DMA transfer and multiplexing can be recycled |
85 | * @lli_buses: buses which LLIs can be fetched from: PL08X_AHB1 | PL08X_AHB2 | 85 | * @lli_buses: buses which LLIs can be fetched from: PL08X_AHB1 | PL08X_AHB2 |
86 | * @mem_buses: buses which memory can be accessed from: PL08X_AHB1 | PL08X_AHB2 | 86 | * @mem_buses: buses which memory can be accessed from: PL08X_AHB1 | PL08X_AHB2 |
@@ -89,8 +89,8 @@ struct pl08x_platform_data { | |||
89 | const struct pl08x_channel_data *slave_channels; | 89 | const struct pl08x_channel_data *slave_channels; |
90 | unsigned int num_slave_channels; | 90 | unsigned int num_slave_channels; |
91 | struct pl08x_channel_data memcpy_channel; | 91 | struct pl08x_channel_data memcpy_channel; |
92 | int (*get_signal)(const struct pl08x_channel_data *); | 92 | int (*get_xfer_signal)(const struct pl08x_channel_data *); |
93 | void (*put_signal)(const struct pl08x_channel_data *, int); | 93 | void (*put_xfer_signal)(const struct pl08x_channel_data *, int); |
94 | u8 lli_buses; | 94 | u8 lli_buses; |
95 | u8 mem_buses; | 95 | u8 mem_buses; |
96 | }; | 96 | }; |
diff --git a/include/linux/async_tx.h b/include/linux/async_tx.h index a1c486a88e88..179b38ffd351 100644 --- a/include/linux/async_tx.h +++ b/include/linux/async_tx.h | |||
@@ -182,10 +182,6 @@ async_memcpy(struct page *dest, struct page *src, unsigned int dest_offset, | |||
182 | unsigned int src_offset, size_t len, | 182 | unsigned int src_offset, size_t len, |
183 | struct async_submit_ctl *submit); | 183 | struct async_submit_ctl *submit); |
184 | 184 | ||
185 | struct dma_async_tx_descriptor * | ||
186 | async_memset(struct page *dest, int val, unsigned int offset, | ||
187 | size_t len, struct async_submit_ctl *submit); | ||
188 | |||
189 | struct dma_async_tx_descriptor *async_trigger_callback(struct async_submit_ctl *submit); | 185 | struct dma_async_tx_descriptor *async_trigger_callback(struct async_submit_ctl *submit); |
190 | 186 | ||
191 | struct dma_async_tx_descriptor * | 187 | struct dma_async_tx_descriptor * |
diff --git a/include/linux/audit.h b/include/linux/audit.h index b20b03852f21..729a4d165bcc 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -103,8 +103,11 @@ extern void __audit_syscall_exit(int ret_success, long ret_value); | |||
103 | extern struct filename *__audit_reusename(const __user char *uptr); | 103 | extern struct filename *__audit_reusename(const __user char *uptr); |
104 | extern void __audit_getname(struct filename *name); | 104 | extern void __audit_getname(struct filename *name); |
105 | extern void audit_putname(struct filename *name); | 105 | extern void audit_putname(struct filename *name); |
106 | |||
107 | #define AUDIT_INODE_PARENT 1 /* dentry represents the parent */ | ||
108 | #define AUDIT_INODE_HIDDEN 2 /* audit record should be hidden */ | ||
106 | extern void __audit_inode(struct filename *name, const struct dentry *dentry, | 109 | extern void __audit_inode(struct filename *name, const struct dentry *dentry, |
107 | unsigned int parent); | 110 | unsigned int flags); |
108 | extern void __audit_inode_child(const struct inode *parent, | 111 | extern void __audit_inode_child(const struct inode *parent, |
109 | const struct dentry *dentry, | 112 | const struct dentry *dentry, |
110 | const unsigned char type); | 113 | const unsigned char type); |
@@ -148,10 +151,22 @@ static inline void audit_getname(struct filename *name) | |||
148 | if (unlikely(!audit_dummy_context())) | 151 | if (unlikely(!audit_dummy_context())) |
149 | __audit_getname(name); | 152 | __audit_getname(name); |
150 | } | 153 | } |
151 | static inline void audit_inode(struct filename *name, const struct dentry *dentry, | 154 | static inline void audit_inode(struct filename *name, |
155 | const struct dentry *dentry, | ||
152 | unsigned int parent) { | 156 | unsigned int parent) { |
157 | if (unlikely(!audit_dummy_context())) { | ||
158 | unsigned int flags = 0; | ||
159 | if (parent) | ||
160 | flags |= AUDIT_INODE_PARENT; | ||
161 | __audit_inode(name, dentry, flags); | ||
162 | } | ||
163 | } | ||
164 | static inline void audit_inode_parent_hidden(struct filename *name, | ||
165 | const struct dentry *dentry) | ||
166 | { | ||
153 | if (unlikely(!audit_dummy_context())) | 167 | if (unlikely(!audit_dummy_context())) |
154 | __audit_inode(name, dentry, parent); | 168 | __audit_inode(name, dentry, |
169 | AUDIT_INODE_PARENT | AUDIT_INODE_HIDDEN); | ||
155 | } | 170 | } |
156 | static inline void audit_inode_child(const struct inode *parent, | 171 | static inline void audit_inode_child(const struct inode *parent, |
157 | const struct dentry *dentry, | 172 | const struct dentry *dentry, |
@@ -311,7 +326,7 @@ static inline void audit_putname(struct filename *name) | |||
311 | { } | 326 | { } |
312 | static inline void __audit_inode(struct filename *name, | 327 | static inline void __audit_inode(struct filename *name, |
313 | const struct dentry *dentry, | 328 | const struct dentry *dentry, |
314 | unsigned int parent) | 329 | unsigned int flags) |
315 | { } | 330 | { } |
316 | static inline void __audit_inode_child(const struct inode *parent, | 331 | static inline void __audit_inode_child(const struct inode *parent, |
317 | const struct dentry *dentry, | 332 | const struct dentry *dentry, |
@@ -321,6 +336,9 @@ static inline void audit_inode(struct filename *name, | |||
321 | const struct dentry *dentry, | 336 | const struct dentry *dentry, |
322 | unsigned int parent) | 337 | unsigned int parent) |
323 | { } | 338 | { } |
339 | static inline void audit_inode_parent_hidden(struct filename *name, | ||
340 | const struct dentry *dentry) | ||
341 | { } | ||
324 | static inline void audit_inode_child(const struct inode *parent, | 342 | static inline void audit_inode_child(const struct inode *parent, |
325 | const struct dentry *dentry, | 343 | const struct dentry *dentry, |
326 | const unsigned char type) | 344 | const unsigned char type) |
diff --git a/include/linux/backlight.h b/include/linux/backlight.h index da9a0825e007..53b77949c79d 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h | |||
@@ -114,7 +114,13 @@ static inline void backlight_update_status(struct backlight_device *bd) | |||
114 | extern struct backlight_device *backlight_device_register(const char *name, | 114 | extern struct backlight_device *backlight_device_register(const char *name, |
115 | struct device *dev, void *devdata, const struct backlight_ops *ops, | 115 | struct device *dev, void *devdata, const struct backlight_ops *ops, |
116 | const struct backlight_properties *props); | 116 | const struct backlight_properties *props); |
117 | extern struct backlight_device *devm_backlight_device_register( | ||
118 | struct device *dev, const char *name, struct device *parent, | ||
119 | void *devdata, const struct backlight_ops *ops, | ||
120 | const struct backlight_properties *props); | ||
117 | extern void backlight_device_unregister(struct backlight_device *bd); | 121 | extern void backlight_device_unregister(struct backlight_device *bd); |
122 | extern void devm_backlight_device_unregister(struct device *dev, | ||
123 | struct backlight_device *bd); | ||
118 | extern void backlight_force_update(struct backlight_device *bd, | 124 | extern void backlight_force_update(struct backlight_device *bd, |
119 | enum backlight_update_reason reason); | 125 | enum backlight_update_reason reason); |
120 | 126 | ||
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h index 2e34db82a643..622fc505d3e1 100644 --- a/include/linux/bcma/bcma.h +++ b/include/linux/bcma/bcma.h | |||
@@ -144,6 +144,7 @@ struct bcma_host_ops { | |||
144 | 144 | ||
145 | /* Chip IDs of PCIe devices */ | 145 | /* Chip IDs of PCIe devices */ |
146 | #define BCMA_CHIP_ID_BCM4313 0x4313 | 146 | #define BCMA_CHIP_ID_BCM4313 0x4313 |
147 | #define BCMA_CHIP_ID_BCM43142 43142 | ||
147 | #define BCMA_CHIP_ID_BCM43224 43224 | 148 | #define BCMA_CHIP_ID_BCM43224 43224 |
148 | #define BCMA_PKG_ID_BCM43224_FAB_CSM 0x8 | 149 | #define BCMA_PKG_ID_BCM43224_FAB_CSM 0x8 |
149 | #define BCMA_PKG_ID_BCM43224_FAB_SMIC 0xa | 150 | #define BCMA_PKG_ID_BCM43224_FAB_SMIC 0xa |
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h index b8b09eac60a4..c49e1a159e6e 100644 --- a/include/linux/bcma/bcma_driver_chipcommon.h +++ b/include/linux/bcma/bcma_driver_chipcommon.h | |||
@@ -330,6 +330,8 @@ | |||
330 | #define BCMA_CC_PMU_CAP 0x0604 /* PMU capabilities */ | 330 | #define BCMA_CC_PMU_CAP 0x0604 /* PMU capabilities */ |
331 | #define BCMA_CC_PMU_CAP_REVISION 0x000000FF /* Revision mask */ | 331 | #define BCMA_CC_PMU_CAP_REVISION 0x000000FF /* Revision mask */ |
332 | #define BCMA_CC_PMU_STAT 0x0608 /* PMU status */ | 332 | #define BCMA_CC_PMU_STAT 0x0608 /* PMU status */ |
333 | #define BCMA_CC_PMU_STAT_EXT_LPO_AVAIL 0x00000100 | ||
334 | #define BCMA_CC_PMU_STAT_WDRESET 0x00000080 | ||
333 | #define BCMA_CC_PMU_STAT_INTPEND 0x00000040 /* Interrupt pending */ | 335 | #define BCMA_CC_PMU_STAT_INTPEND 0x00000040 /* Interrupt pending */ |
334 | #define BCMA_CC_PMU_STAT_SBCLKST 0x00000030 /* Backplane clock status? */ | 336 | #define BCMA_CC_PMU_STAT_SBCLKST 0x00000030 /* Backplane clock status? */ |
335 | #define BCMA_CC_PMU_STAT_HAVEALP 0x00000008 /* ALP available */ | 337 | #define BCMA_CC_PMU_STAT_HAVEALP 0x00000008 /* ALP available */ |
@@ -355,6 +357,11 @@ | |||
355 | #define BCMA_CC_REGCTL_DATA 0x065C | 357 | #define BCMA_CC_REGCTL_DATA 0x065C |
356 | #define BCMA_CC_PLLCTL_ADDR 0x0660 | 358 | #define BCMA_CC_PLLCTL_ADDR 0x0660 |
357 | #define BCMA_CC_PLLCTL_DATA 0x0664 | 359 | #define BCMA_CC_PLLCTL_DATA 0x0664 |
360 | #define BCMA_CC_PMU_STRAPOPT 0x0668 /* (corerev >= 28) */ | ||
361 | #define BCMA_CC_PMU_XTAL_FREQ 0x066C /* (pmurev >= 10) */ | ||
362 | #define BCMA_CC_PMU_XTAL_FREQ_ILPCTL_MASK 0x00001FFF | ||
363 | #define BCMA_CC_PMU_XTAL_FREQ_MEASURE_MASK 0x80000000 | ||
364 | #define BCMA_CC_PMU_XTAL_FREQ_MEASURE_SHIFT 31 | ||
358 | #define BCMA_CC_SPROM 0x0800 /* SPROM beginning */ | 365 | #define BCMA_CC_SPROM 0x0800 /* SPROM beginning */ |
359 | /* NAND flash MLC controller registers (corerev >= 38) */ | 366 | /* NAND flash MLC controller registers (corerev >= 38) */ |
360 | #define BCMA_CC_NAND_REVISION 0x0C00 | 367 | #define BCMA_CC_NAND_REVISION 0x0C00 |
@@ -435,6 +442,23 @@ | |||
435 | #define BCMA_CC_PMU6_4706_PROC_NDIV_MODE_MASK 0x00000007 | 442 | #define BCMA_CC_PMU6_4706_PROC_NDIV_MODE_MASK 0x00000007 |
436 | #define BCMA_CC_PMU6_4706_PROC_NDIV_MODE_SHIFT 0 | 443 | #define BCMA_CC_PMU6_4706_PROC_NDIV_MODE_SHIFT 0 |
437 | 444 | ||
445 | /* PMU rev 15 */ | ||
446 | #define BCMA_CC_PMU15_PLL_PLLCTL0 0 | ||
447 | #define BCMA_CC_PMU15_PLL_PC0_CLKSEL_MASK 0x00000003 | ||
448 | #define BCMA_CC_PMU15_PLL_PC0_CLKSEL_SHIFT 0 | ||
449 | #define BCMA_CC_PMU15_PLL_PC0_FREQTGT_MASK 0x003FFFFC | ||
450 | #define BCMA_CC_PMU15_PLL_PC0_FREQTGT_SHIFT 2 | ||
451 | #define BCMA_CC_PMU15_PLL_PC0_PRESCALE_MASK 0x00C00000 | ||
452 | #define BCMA_CC_PMU15_PLL_PC0_PRESCALE_SHIFT 22 | ||
453 | #define BCMA_CC_PMU15_PLL_PC0_KPCTRL_MASK 0x07000000 | ||
454 | #define BCMA_CC_PMU15_PLL_PC0_KPCTRL_SHIFT 24 | ||
455 | #define BCMA_CC_PMU15_PLL_PC0_FCNTCTRL_MASK 0x38000000 | ||
456 | #define BCMA_CC_PMU15_PLL_PC0_FCNTCTRL_SHIFT 27 | ||
457 | #define BCMA_CC_PMU15_PLL_PC0_FDCMODE_MASK 0x40000000 | ||
458 | #define BCMA_CC_PMU15_PLL_PC0_FDCMODE_SHIFT 30 | ||
459 | #define BCMA_CC_PMU15_PLL_PC0_CTRLBIAS_MASK 0x80000000 | ||
460 | #define BCMA_CC_PMU15_PLL_PC0_CTRLBIAS_SHIFT 31 | ||
461 | |||
438 | /* ALP clock on pre-PMU chips */ | 462 | /* ALP clock on pre-PMU chips */ |
439 | #define BCMA_CC_PMU_ALP_CLOCK 20000000 | 463 | #define BCMA_CC_PMU_ALP_CLOCK 20000000 |
440 | /* HT clock for systems with PMU-enabled chipcommon */ | 464 | /* HT clock for systems with PMU-enabled chipcommon */ |
@@ -507,6 +531,37 @@ | |||
507 | #define BCMA_CHIPCTL_5357_I2S_PINS_ENABLE BIT(18) | 531 | #define BCMA_CHIPCTL_5357_I2S_PINS_ENABLE BIT(18) |
508 | #define BCMA_CHIPCTL_5357_I2CSPI_PINS_ENABLE BIT(19) | 532 | #define BCMA_CHIPCTL_5357_I2CSPI_PINS_ENABLE BIT(19) |
509 | 533 | ||
534 | #define BCMA_RES_4314_LPLDO_PU BIT(0) | ||
535 | #define BCMA_RES_4314_PMU_SLEEP_DIS BIT(1) | ||
536 | #define BCMA_RES_4314_PMU_BG_PU BIT(2) | ||
537 | #define BCMA_RES_4314_CBUCK_LPOM_PU BIT(3) | ||
538 | #define BCMA_RES_4314_CBUCK_PFM_PU BIT(4) | ||
539 | #define BCMA_RES_4314_CLDO_PU BIT(5) | ||
540 | #define BCMA_RES_4314_LPLDO2_LVM BIT(6) | ||
541 | #define BCMA_RES_4314_WL_PMU_PU BIT(7) | ||
542 | #define BCMA_RES_4314_LNLDO_PU BIT(8) | ||
543 | #define BCMA_RES_4314_LDO3P3_PU BIT(9) | ||
544 | #define BCMA_RES_4314_OTP_PU BIT(10) | ||
545 | #define BCMA_RES_4314_XTAL_PU BIT(11) | ||
546 | #define BCMA_RES_4314_WL_PWRSW_PU BIT(12) | ||
547 | #define BCMA_RES_4314_LQ_AVAIL BIT(13) | ||
548 | #define BCMA_RES_4314_LOGIC_RET BIT(14) | ||
549 | #define BCMA_RES_4314_MEM_SLEEP BIT(15) | ||
550 | #define BCMA_RES_4314_MACPHY_RET BIT(16) | ||
551 | #define BCMA_RES_4314_WL_CORE_READY BIT(17) | ||
552 | #define BCMA_RES_4314_ILP_REQ BIT(18) | ||
553 | #define BCMA_RES_4314_ALP_AVAIL BIT(19) | ||
554 | #define BCMA_RES_4314_MISC_PWRSW_PU BIT(20) | ||
555 | #define BCMA_RES_4314_SYNTH_PWRSW_PU BIT(21) | ||
556 | #define BCMA_RES_4314_RX_PWRSW_PU BIT(22) | ||
557 | #define BCMA_RES_4314_RADIO_PU BIT(23) | ||
558 | #define BCMA_RES_4314_VCO_LDO_PU BIT(24) | ||
559 | #define BCMA_RES_4314_AFE_LDO_PU BIT(25) | ||
560 | #define BCMA_RES_4314_RX_LDO_PU BIT(26) | ||
561 | #define BCMA_RES_4314_TX_LDO_PU BIT(27) | ||
562 | #define BCMA_RES_4314_HT_AVAIL BIT(28) | ||
563 | #define BCMA_RES_4314_MACPHY_CLK_AVAIL BIT(29) | ||
564 | |||
510 | /* Data for the PMU, if available. | 565 | /* Data for the PMU, if available. |
511 | * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU) | 566 | * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU) |
512 | */ | 567 | */ |
diff --git a/include/linux/bio.h b/include/linux/bio.h index ef24466d8f82..ec48bac5b039 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -97,11 +97,11 @@ static inline void *bio_data(struct bio *bio) | |||
97 | * permanent PIO fall back, user is probably better off disabling highmem | 97 | * permanent PIO fall back, user is probably better off disabling highmem |
98 | * I/O completely on that queue (see ide-dma for example) | 98 | * I/O completely on that queue (see ide-dma for example) |
99 | */ | 99 | */ |
100 | #define __bio_kmap_atomic(bio, idx, kmtype) \ | 100 | #define __bio_kmap_atomic(bio, idx) \ |
101 | (kmap_atomic(bio_iovec_idx((bio), (idx))->bv_page) + \ | 101 | (kmap_atomic(bio_iovec_idx((bio), (idx))->bv_page) + \ |
102 | bio_iovec_idx((bio), (idx))->bv_offset) | 102 | bio_iovec_idx((bio), (idx))->bv_offset) |
103 | 103 | ||
104 | #define __bio_kunmap_atomic(addr, kmtype) kunmap_atomic(addr) | 104 | #define __bio_kunmap_atomic(addr) kunmap_atomic(addr) |
105 | 105 | ||
106 | /* | 106 | /* |
107 | * merge helpers etc | 107 | * merge helpers etc |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 5f0b0e1f7c08..f1f07d31a3af 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -44,8 +44,8 @@ extern unsigned long init_bootmem_node(pg_data_t *pgdat, | |||
44 | unsigned long endpfn); | 44 | unsigned long endpfn); |
45 | extern unsigned long init_bootmem(unsigned long addr, unsigned long memend); | 45 | extern unsigned long init_bootmem(unsigned long addr, unsigned long memend); |
46 | 46 | ||
47 | extern unsigned long free_all_bootmem_node(pg_data_t *pgdat); | ||
48 | extern unsigned long free_all_bootmem(void); | 47 | extern unsigned long free_all_bootmem(void); |
48 | extern void reset_all_zones_managed_pages(void); | ||
49 | 49 | ||
50 | extern void free_bootmem_node(pg_data_t *pgdat, | 50 | extern void free_bootmem_node(pg_data_t *pgdat, |
51 | unsigned long addr, | 51 | unsigned long addr, |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index f5a3b838ddb0..91fa9a94ae92 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -139,6 +139,9 @@ BUFFER_FNS(Prio, prio) | |||
139 | }) | 139 | }) |
140 | #define page_has_buffers(page) PagePrivate(page) | 140 | #define page_has_buffers(page) PagePrivate(page) |
141 | 141 | ||
142 | void buffer_check_dirty_writeback(struct page *page, | ||
143 | bool *dirty, bool *writeback); | ||
144 | |||
142 | /* | 145 | /* |
143 | * Declarations | 146 | * Declarations |
144 | */ | 147 | */ |
diff --git a/include/linux/can/platform/flexcan.h b/include/linux/can/platform/flexcan.h deleted file mode 100644 index 72b713ab57e9..000000000000 --- a/include/linux/can/platform/flexcan.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Marc Kleine-Budde <kernel@pengutronix.de> | ||
3 | * | ||
4 | * This file is released under the GPLv2 | ||
5 | * | ||
6 | */ | ||
7 | |||
8 | #ifndef __CAN_PLATFORM_FLEXCAN_H | ||
9 | #define __CAN_PLATFORM_FLEXCAN_H | ||
10 | |||
11 | /** | ||
12 | * struct flexcan_platform_data - flex CAN controller platform data | ||
13 | * @transceiver_enable: - called to power on/off the transceiver | ||
14 | * | ||
15 | */ | ||
16 | struct flexcan_platform_data { | ||
17 | void (*transceiver_switch)(int enable); | ||
18 | }; | ||
19 | |||
20 | #endif /* __CAN_PLATFORM_FLEXCAN_H */ | ||
diff --git a/include/linux/ceph/decode.h b/include/linux/ceph/decode.h index 379f71508995..0442c3d800f0 100644 --- a/include/linux/ceph/decode.h +++ b/include/linux/ceph/decode.h | |||
@@ -160,11 +160,6 @@ static inline void ceph_decode_timespec(struct timespec *ts, | |||
160 | static inline void ceph_encode_timespec(struct ceph_timespec *tv, | 160 | static inline void ceph_encode_timespec(struct ceph_timespec *tv, |
161 | const struct timespec *ts) | 161 | const struct timespec *ts) |
162 | { | 162 | { |
163 | BUG_ON(ts->tv_sec < 0); | ||
164 | BUG_ON(ts->tv_sec > (__kernel_time_t)U32_MAX); | ||
165 | BUG_ON(ts->tv_nsec < 0); | ||
166 | BUG_ON(ts->tv_nsec > (long)U32_MAX); | ||
167 | |||
168 | tv->tv_sec = cpu_to_le32((u32)ts->tv_sec); | 163 | tv->tv_sec = cpu_to_le32((u32)ts->tv_sec); |
169 | tv->tv_nsec = cpu_to_le32((u32)ts->tv_nsec); | 164 | tv->tv_nsec = cpu_to_le32((u32)ts->tv_nsec); |
170 | } | 165 | } |
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index 186db0bf4951..ce6df39f60ff 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h | |||
@@ -145,7 +145,6 @@ struct ceph_osd_request { | |||
145 | s32 r_reply_op_result[CEPH_OSD_MAX_OP]; | 145 | s32 r_reply_op_result[CEPH_OSD_MAX_OP]; |
146 | int r_got_reply; | 146 | int r_got_reply; |
147 | int r_linger; | 147 | int r_linger; |
148 | int r_completed; | ||
149 | 148 | ||
150 | struct ceph_osd_client *r_osdc; | 149 | struct ceph_osd_client *r_osdc; |
151 | struct kref r_kref; | 150 | struct kref r_kref; |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 8bda1294c035..297462b9f41a 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/workqueue.h> | 20 | #include <linux/workqueue.h> |
21 | #include <linux/xattr.h> | 21 | #include <linux/xattr.h> |
22 | #include <linux/fs.h> | 22 | #include <linux/fs.h> |
23 | #include <linux/percpu-refcount.h> | ||
23 | 24 | ||
24 | #ifdef CONFIG_CGROUPS | 25 | #ifdef CONFIG_CGROUPS |
25 | 26 | ||
@@ -72,13 +73,8 @@ struct cgroup_subsys_state { | |||
72 | */ | 73 | */ |
73 | struct cgroup *cgroup; | 74 | struct cgroup *cgroup; |
74 | 75 | ||
75 | /* | 76 | /* reference count - access via css_[try]get() and css_put() */ |
76 | * State maintained by the cgroup system to allow subsystems | 77 | struct percpu_ref refcnt; |
77 | * to be "busy". Should be accessed via css_get(), | ||
78 | * css_tryget() and css_put(). | ||
79 | */ | ||
80 | |||
81 | atomic_t refcnt; | ||
82 | 78 | ||
83 | unsigned long flags; | 79 | unsigned long flags; |
84 | /* ID for this css, if possible */ | 80 | /* ID for this css, if possible */ |
@@ -94,56 +90,52 @@ enum { | |||
94 | CSS_ONLINE = (1 << 1), /* between ->css_online() and ->css_offline() */ | 90 | CSS_ONLINE = (1 << 1), /* between ->css_online() and ->css_offline() */ |
95 | }; | 91 | }; |
96 | 92 | ||
97 | /* Caller must verify that the css is not for root cgroup */ | 93 | /** |
98 | static inline void __css_get(struct cgroup_subsys_state *css, int count) | 94 | * css_get - obtain a reference on the specified css |
99 | { | 95 | * @css: target css |
100 | atomic_add(count, &css->refcnt); | 96 | * |
101 | } | 97 | * The caller must already have a reference. |
102 | |||
103 | /* | ||
104 | * Call css_get() to hold a reference on the css; it can be used | ||
105 | * for a reference obtained via: | ||
106 | * - an existing ref-counted reference to the css | ||
107 | * - task->cgroups for a locked task | ||
108 | */ | 98 | */ |
109 | |||
110 | static inline void css_get(struct cgroup_subsys_state *css) | 99 | static inline void css_get(struct cgroup_subsys_state *css) |
111 | { | 100 | { |
112 | /* We don't need to reference count the root state */ | 101 | /* We don't need to reference count the root state */ |
113 | if (!(css->flags & CSS_ROOT)) | 102 | if (!(css->flags & CSS_ROOT)) |
114 | __css_get(css, 1); | 103 | percpu_ref_get(&css->refcnt); |
115 | } | 104 | } |
116 | 105 | ||
117 | /* | 106 | /** |
118 | * Call css_tryget() to take a reference on a css if your existing | 107 | * css_tryget - try to obtain a reference on the specified css |
119 | * (known-valid) reference isn't already ref-counted. Returns false if | 108 | * @css: target css |
120 | * the css has been destroyed. | 109 | * |
110 | * Obtain a reference on @css if it's alive. The caller naturally needs to | ||
111 | * ensure that @css is accessible but doesn't have to be holding a | ||
112 | * reference on it - IOW, RCU protected access is good enough for this | ||
113 | * function. Returns %true if a reference count was successfully obtained; | ||
114 | * %false otherwise. | ||
121 | */ | 115 | */ |
122 | |||
123 | extern bool __css_tryget(struct cgroup_subsys_state *css); | ||
124 | static inline bool css_tryget(struct cgroup_subsys_state *css) | 116 | static inline bool css_tryget(struct cgroup_subsys_state *css) |
125 | { | 117 | { |
126 | if (css->flags & CSS_ROOT) | 118 | if (css->flags & CSS_ROOT) |
127 | return true; | 119 | return true; |
128 | return __css_tryget(css); | 120 | return percpu_ref_tryget(&css->refcnt); |
129 | } | 121 | } |
130 | 122 | ||
131 | /* | 123 | /** |
132 | * css_put() should be called to release a reference taken by | 124 | * css_put - put a css reference |
133 | * css_get() or css_tryget() | 125 | * @css: target css |
126 | * | ||
127 | * Put a reference obtained via css_get() and css_tryget(). | ||
134 | */ | 128 | */ |
135 | |||
136 | extern void __css_put(struct cgroup_subsys_state *css); | ||
137 | static inline void css_put(struct cgroup_subsys_state *css) | 129 | static inline void css_put(struct cgroup_subsys_state *css) |
138 | { | 130 | { |
139 | if (!(css->flags & CSS_ROOT)) | 131 | if (!(css->flags & CSS_ROOT)) |
140 | __css_put(css); | 132 | percpu_ref_put(&css->refcnt); |
141 | } | 133 | } |
142 | 134 | ||
143 | /* bits in struct cgroup flags field */ | 135 | /* bits in struct cgroup flags field */ |
144 | enum { | 136 | enum { |
145 | /* Control Group is dead */ | 137 | /* Control Group is dead */ |
146 | CGRP_REMOVED, | 138 | CGRP_DEAD, |
147 | /* | 139 | /* |
148 | * Control Group has previously had a child cgroup or a task, | 140 | * Control Group has previously had a child cgroup or a task, |
149 | * but no longer (only if CGRP_NOTIFY_ON_RELEASE is set) | 141 | * but no longer (only if CGRP_NOTIFY_ON_RELEASE is set) |
@@ -169,12 +161,6 @@ struct cgroup_name { | |||
169 | struct cgroup { | 161 | struct cgroup { |
170 | unsigned long flags; /* "unsigned long" so bitops work */ | 162 | unsigned long flags; /* "unsigned long" so bitops work */ |
171 | 163 | ||
172 | /* | ||
173 | * count users of this cgroup. >0 means busy, but doesn't | ||
174 | * necessarily indicate the number of tasks in the cgroup | ||
175 | */ | ||
176 | atomic_t count; | ||
177 | |||
178 | int id; /* ida allocated in-hierarchy ID */ | 164 | int id; /* ida allocated in-hierarchy ID */ |
179 | 165 | ||
180 | /* | 166 | /* |
@@ -189,6 +175,14 @@ struct cgroup { | |||
189 | struct dentry *dentry; /* cgroup fs entry, RCU protected */ | 175 | struct dentry *dentry; /* cgroup fs entry, RCU protected */ |
190 | 176 | ||
191 | /* | 177 | /* |
178 | * Monotonically increasing unique serial number which defines a | ||
179 | * uniform order among all cgroups. It's guaranteed that all | ||
180 | * ->children lists are in the ascending order of ->serial_nr. | ||
181 | * It's used to allow interrupting and resuming iterations. | ||
182 | */ | ||
183 | u64 serial_nr; | ||
184 | |||
185 | /* | ||
192 | * This is a copy of dentry->d_name, and it's needed because | 186 | * This is a copy of dentry->d_name, and it's needed because |
193 | * we can't use dentry->d_name in cgroup_path(). | 187 | * we can't use dentry->d_name in cgroup_path(). |
194 | * | 188 | * |
@@ -207,13 +201,10 @@ struct cgroup { | |||
207 | struct cgroupfs_root *root; | 201 | struct cgroupfs_root *root; |
208 | 202 | ||
209 | /* | 203 | /* |
210 | * List of cg_cgroup_links pointing at css_sets with | 204 | * List of cgrp_cset_links pointing at css_sets with tasks in this |
211 | * tasks in this cgroup. Protected by css_set_lock | 205 | * cgroup. Protected by css_set_lock. |
212 | */ | 206 | */ |
213 | struct list_head css_sets; | 207 | struct list_head cset_links; |
214 | |||
215 | struct list_head allcg_node; /* cgroupfs_root->allcg_list */ | ||
216 | struct list_head cft_q_node; /* used during cftype add/rm */ | ||
217 | 208 | ||
218 | /* | 209 | /* |
219 | * Linked list running through all cgroups that can | 210 | * Linked list running through all cgroups that can |
@@ -229,9 +220,10 @@ struct cgroup { | |||
229 | struct list_head pidlists; | 220 | struct list_head pidlists; |
230 | struct mutex pidlist_mutex; | 221 | struct mutex pidlist_mutex; |
231 | 222 | ||
232 | /* For RCU-protected deletion */ | 223 | /* For css percpu_ref killing and RCU-protected deletion */ |
233 | struct rcu_head rcu_head; | 224 | struct rcu_head rcu_head; |
234 | struct work_struct free_work; | 225 | struct work_struct destroy_work; |
226 | atomic_t css_kill_cnt; | ||
235 | 227 | ||
236 | /* List of events which userspace want to receive */ | 228 | /* List of events which userspace want to receive */ |
237 | struct list_head event_list; | 229 | struct list_head event_list; |
@@ -269,18 +261,35 @@ enum { | |||
269 | * | 261 | * |
270 | * - Remount is disallowed. | 262 | * - Remount is disallowed. |
271 | * | 263 | * |
264 | * - rename(2) is disallowed. | ||
265 | * | ||
266 | * - "tasks" is removed. Everything should be at process | ||
267 | * granularity. Use "cgroup.procs" instead. | ||
268 | * | ||
269 | * - "release_agent" and "notify_on_release" are removed. | ||
270 | * Replacement notification mechanism will be implemented. | ||
271 | * | ||
272 | * - cpuset: tasks will be kept in empty cpusets when hotplug happens | ||
273 | * and take masks of ancestors with non-empty cpus/mems, instead of | ||
274 | * being moved to an ancestor. | ||
275 | * | ||
276 | * - cpuset: a task can be moved into an empty cpuset, and again it | ||
277 | * takes masks of ancestors. | ||
278 | * | ||
272 | * - memcg: use_hierarchy is on by default and the cgroup file for | 279 | * - memcg: use_hierarchy is on by default and the cgroup file for |
273 | * the flag is not created. | 280 | * the flag is not created. |
274 | * | 281 | * |
275 | * The followings are planned changes. | 282 | * - blkcg: blk-throttle becomes properly hierarchical. |
276 | * | ||
277 | * - release_agent will be disallowed once replacement notification | ||
278 | * mechanism is implemented. | ||
279 | */ | 283 | */ |
280 | CGRP_ROOT_SANE_BEHAVIOR = (1 << 0), | 284 | CGRP_ROOT_SANE_BEHAVIOR = (1 << 0), |
281 | 285 | ||
282 | CGRP_ROOT_NOPREFIX = (1 << 1), /* mounted subsystems have no named prefix */ | 286 | CGRP_ROOT_NOPREFIX = (1 << 1), /* mounted subsystems have no named prefix */ |
283 | CGRP_ROOT_XATTR = (1 << 2), /* supports extended attributes */ | 287 | CGRP_ROOT_XATTR = (1 << 2), /* supports extended attributes */ |
288 | |||
289 | /* mount options live below bit 16 */ | ||
290 | CGRP_ROOT_OPTION_MASK = (1 << 16) - 1, | ||
291 | |||
292 | CGRP_ROOT_SUBSYS_BOUND = (1 << 16), /* subsystems finished binding */ | ||
284 | }; | 293 | }; |
285 | 294 | ||
286 | /* | 295 | /* |
@@ -291,18 +300,12 @@ enum { | |||
291 | struct cgroupfs_root { | 300 | struct cgroupfs_root { |
292 | struct super_block *sb; | 301 | struct super_block *sb; |
293 | 302 | ||
294 | /* | 303 | /* The bitmask of subsystems attached to this hierarchy */ |
295 | * The bitmask of subsystems intended to be attached to this | ||
296 | * hierarchy | ||
297 | */ | ||
298 | unsigned long subsys_mask; | 304 | unsigned long subsys_mask; |
299 | 305 | ||
300 | /* Unique id for this hierarchy. */ | 306 | /* Unique id for this hierarchy. */ |
301 | int hierarchy_id; | 307 | int hierarchy_id; |
302 | 308 | ||
303 | /* The bitmask of subsystems currently attached to this hierarchy */ | ||
304 | unsigned long actual_subsys_mask; | ||
305 | |||
306 | /* A list running through the attached subsystems */ | 309 | /* A list running through the attached subsystems */ |
307 | struct list_head subsys_list; | 310 | struct list_head subsys_list; |
308 | 311 | ||
@@ -315,9 +318,6 @@ struct cgroupfs_root { | |||
315 | /* A list running through the active hierarchies */ | 318 | /* A list running through the active hierarchies */ |
316 | struct list_head root_list; | 319 | struct list_head root_list; |
317 | 320 | ||
318 | /* All cgroups on this root, cgroup_mutex protected */ | ||
319 | struct list_head allcg_list; | ||
320 | |||
321 | /* Hierarchy-specific flags */ | 321 | /* Hierarchy-specific flags */ |
322 | unsigned long flags; | 322 | unsigned long flags; |
323 | 323 | ||
@@ -357,11 +357,10 @@ struct css_set { | |||
357 | struct list_head tasks; | 357 | struct list_head tasks; |
358 | 358 | ||
359 | /* | 359 | /* |
360 | * List of cg_cgroup_link objects on link chains from | 360 | * List of cgrp_cset_links pointing at cgroups referenced from this |
361 | * cgroups referenced from this css_set. Protected by | 361 | * css_set. Protected by css_set_lock. |
362 | * css_set_lock | ||
363 | */ | 362 | */ |
364 | struct list_head cg_links; | 363 | struct list_head cgrp_links; |
365 | 364 | ||
366 | /* | 365 | /* |
367 | * Set of subsystem states, one for each subsystem. This array | 366 | * Set of subsystem states, one for each subsystem. This array |
@@ -394,9 +393,11 @@ struct cgroup_map_cb { | |||
394 | */ | 393 | */ |
395 | 394 | ||
396 | /* cftype->flags */ | 395 | /* cftype->flags */ |
397 | #define CFTYPE_ONLY_ON_ROOT (1U << 0) /* only create on root cg */ | 396 | enum { |
398 | #define CFTYPE_NOT_ON_ROOT (1U << 1) /* don't create on root cg */ | 397 | CFTYPE_ONLY_ON_ROOT = (1 << 0), /* only create on root cg */ |
399 | #define CFTYPE_INSANE (1U << 2) /* don't create if sane_behavior */ | 398 | CFTYPE_NOT_ON_ROOT = (1 << 1), /* don't create on root cg */ |
399 | CFTYPE_INSANE = (1 << 2), /* don't create if sane_behavior */ | ||
400 | }; | ||
400 | 401 | ||
401 | #define MAX_CFTYPE_NAME 64 | 402 | #define MAX_CFTYPE_NAME 64 |
402 | 403 | ||
@@ -442,13 +443,13 @@ struct cftype { | |||
442 | * entry. The key/value pairs (and their ordering) should not | 443 | * entry. The key/value pairs (and their ordering) should not |
443 | * change between reboots. | 444 | * change between reboots. |
444 | */ | 445 | */ |
445 | int (*read_map)(struct cgroup *cont, struct cftype *cft, | 446 | int (*read_map)(struct cgroup *cgrp, struct cftype *cft, |
446 | struct cgroup_map_cb *cb); | 447 | struct cgroup_map_cb *cb); |
447 | /* | 448 | /* |
448 | * read_seq_string() is used for outputting a simple sequence | 449 | * read_seq_string() is used for outputting a simple sequence |
449 | * using seqfile. | 450 | * using seqfile. |
450 | */ | 451 | */ |
451 | int (*read_seq_string)(struct cgroup *cont, struct cftype *cft, | 452 | int (*read_seq_string)(struct cgroup *cgrp, struct cftype *cft, |
452 | struct seq_file *m); | 453 | struct seq_file *m); |
453 | 454 | ||
454 | ssize_t (*write)(struct cgroup *cgrp, struct cftype *cft, | 455 | ssize_t (*write)(struct cgroup *cgrp, struct cftype *cft, |
@@ -538,10 +539,11 @@ static inline const char *cgroup_name(const struct cgroup *cgrp) | |||
538 | int cgroup_add_cftypes(struct cgroup_subsys *ss, struct cftype *cfts); | 539 | int cgroup_add_cftypes(struct cgroup_subsys *ss, struct cftype *cfts); |
539 | int cgroup_rm_cftypes(struct cgroup_subsys *ss, struct cftype *cfts); | 540 | int cgroup_rm_cftypes(struct cgroup_subsys *ss, struct cftype *cfts); |
540 | 541 | ||
541 | int cgroup_is_removed(const struct cgroup *cgrp); | ||
542 | bool cgroup_is_descendant(struct cgroup *cgrp, struct cgroup *ancestor); | 542 | bool cgroup_is_descendant(struct cgroup *cgrp, struct cgroup *ancestor); |
543 | 543 | ||
544 | int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen); | 544 | int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen); |
545 | int task_cgroup_path_from_hierarchy(struct task_struct *task, int hierarchy_id, | ||
546 | char *buf, size_t buflen); | ||
545 | 547 | ||
546 | int cgroup_task_count(const struct cgroup *cgrp); | 548 | int cgroup_task_count(const struct cgroup *cgrp); |
547 | 549 | ||
@@ -646,22 +648,60 @@ static inline struct cgroup_subsys_state *cgroup_subsys_state( | |||
646 | return cgrp->subsys[subsys_id]; | 648 | return cgrp->subsys[subsys_id]; |
647 | } | 649 | } |
648 | 650 | ||
649 | /* | 651 | /** |
650 | * function to get the cgroup_subsys_state which allows for extra | 652 | * task_css_set_check - obtain a task's css_set with extra access conditions |
651 | * rcu_dereference_check() conditions, such as locks used during the | 653 | * @task: the task to obtain css_set for |
652 | * cgroup_subsys::attach() methods. | 654 | * @__c: extra condition expression to be passed to rcu_dereference_check() |
655 | * | ||
656 | * A task's css_set is RCU protected, initialized and exited while holding | ||
657 | * task_lock(), and can only be modified while holding both cgroup_mutex | ||
658 | * and task_lock() while the task is alive. This macro verifies that the | ||
659 | * caller is inside proper critical section and returns @task's css_set. | ||
660 | * | ||
661 | * The caller can also specify additional allowed conditions via @__c, such | ||
662 | * as locks used during the cgroup_subsys::attach() methods. | ||
653 | */ | 663 | */ |
654 | #ifdef CONFIG_PROVE_RCU | 664 | #ifdef CONFIG_PROVE_RCU |
655 | extern struct mutex cgroup_mutex; | 665 | extern struct mutex cgroup_mutex; |
656 | #define task_subsys_state_check(task, subsys_id, __c) \ | 666 | #define task_css_set_check(task, __c) \ |
657 | rcu_dereference_check((task)->cgroups->subsys[(subsys_id)], \ | 667 | rcu_dereference_check((task)->cgroups, \ |
658 | lockdep_is_held(&(task)->alloc_lock) || \ | 668 | lockdep_is_held(&(task)->alloc_lock) || \ |
659 | lockdep_is_held(&cgroup_mutex) || (__c)) | 669 | lockdep_is_held(&cgroup_mutex) || (__c)) |
660 | #else | 670 | #else |
661 | #define task_subsys_state_check(task, subsys_id, __c) \ | 671 | #define task_css_set_check(task, __c) \ |
662 | rcu_dereference((task)->cgroups->subsys[(subsys_id)]) | 672 | rcu_dereference((task)->cgroups) |
663 | #endif | 673 | #endif |
664 | 674 | ||
675 | /** | ||
676 | * task_subsys_state_check - obtain css for (task, subsys) w/ extra access conds | ||
677 | * @task: the target task | ||
678 | * @subsys_id: the target subsystem ID | ||
679 | * @__c: extra condition expression to be passed to rcu_dereference_check() | ||
680 | * | ||
681 | * Return the cgroup_subsys_state for the (@task, @subsys_id) pair. The | ||
682 | * synchronization rules are the same as task_css_set_check(). | ||
683 | */ | ||
684 | #define task_subsys_state_check(task, subsys_id, __c) \ | ||
685 | task_css_set_check((task), (__c))->subsys[(subsys_id)] | ||
686 | |||
687 | /** | ||
688 | * task_css_set - obtain a task's css_set | ||
689 | * @task: the task to obtain css_set for | ||
690 | * | ||
691 | * See task_css_set_check(). | ||
692 | */ | ||
693 | static inline struct css_set *task_css_set(struct task_struct *task) | ||
694 | { | ||
695 | return task_css_set_check(task, false); | ||
696 | } | ||
697 | |||
698 | /** | ||
699 | * task_subsys_state - obtain css for (task, subsys) | ||
700 | * @task: the target task | ||
701 | * @subsys_id: the target subsystem ID | ||
702 | * | ||
703 | * See task_subsys_state_check(). | ||
704 | */ | ||
665 | static inline struct cgroup_subsys_state * | 705 | static inline struct cgroup_subsys_state * |
666 | task_subsys_state(struct task_struct *task, int subsys_id) | 706 | task_subsys_state(struct task_struct *task, int subsys_id) |
667 | { | 707 | { |
@@ -674,12 +714,14 @@ static inline struct cgroup* task_cgroup(struct task_struct *task, | |||
674 | return task_subsys_state(task, subsys_id)->cgroup; | 714 | return task_subsys_state(task, subsys_id)->cgroup; |
675 | } | 715 | } |
676 | 716 | ||
717 | struct cgroup *cgroup_next_sibling(struct cgroup *pos); | ||
718 | |||
677 | /** | 719 | /** |
678 | * cgroup_for_each_child - iterate through children of a cgroup | 720 | * cgroup_for_each_child - iterate through children of a cgroup |
679 | * @pos: the cgroup * to use as the loop cursor | 721 | * @pos: the cgroup * to use as the loop cursor |
680 | * @cgroup: cgroup whose children to walk | 722 | * @cgrp: cgroup whose children to walk |
681 | * | 723 | * |
682 | * Walk @cgroup's children. Must be called under rcu_read_lock(). A child | 724 | * Walk @cgrp's children. Must be called under rcu_read_lock(). A child |
683 | * cgroup which hasn't finished ->css_online() or already has finished | 725 | * cgroup which hasn't finished ->css_online() or already has finished |
684 | * ->css_offline() may show up during traversal and it's each subsystem's | 726 | * ->css_offline() may show up during traversal and it's each subsystem's |
685 | * responsibility to verify that each @pos is alive. | 727 | * responsibility to verify that each @pos is alive. |
@@ -687,9 +729,15 @@ static inline struct cgroup* task_cgroup(struct task_struct *task, | |||
687 | * If a subsystem synchronizes against the parent in its ->css_online() and | 729 | * If a subsystem synchronizes against the parent in its ->css_online() and |
688 | * before starting iterating, a cgroup which finished ->css_online() is | 730 | * before starting iterating, a cgroup which finished ->css_online() is |
689 | * guaranteed to be visible in the future iterations. | 731 | * guaranteed to be visible in the future iterations. |
732 | * | ||
733 | * It is allowed to temporarily drop RCU read lock during iteration. The | ||
734 | * caller is responsible for ensuring that @pos remains accessible until | ||
735 | * the start of the next iteration by, for example, bumping the css refcnt. | ||
690 | */ | 736 | */ |
691 | #define cgroup_for_each_child(pos, cgroup) \ | 737 | #define cgroup_for_each_child(pos, cgrp) \ |
692 | list_for_each_entry_rcu(pos, &(cgroup)->children, sibling) | 738 | for ((pos) = list_first_or_null_rcu(&(cgrp)->children, \ |
739 | struct cgroup, sibling); \ | ||
740 | (pos); (pos) = cgroup_next_sibling((pos))) | ||
693 | 741 | ||
694 | struct cgroup *cgroup_next_descendant_pre(struct cgroup *pos, | 742 | struct cgroup *cgroup_next_descendant_pre(struct cgroup *pos, |
695 | struct cgroup *cgroup); | 743 | struct cgroup *cgroup); |
@@ -748,6 +796,10 @@ struct cgroup *cgroup_rightmost_descendant(struct cgroup *pos); | |||
748 | * Alternatively, a subsystem may choose to use a single global lock to | 796 | * Alternatively, a subsystem may choose to use a single global lock to |
749 | * synchronize ->css_online() and ->css_offline() against tree-walking | 797 | * synchronize ->css_online() and ->css_offline() against tree-walking |
750 | * operations. | 798 | * operations. |
799 | * | ||
800 | * It is allowed to temporarily drop RCU read lock during iteration. The | ||
801 | * caller is responsible for ensuring that @pos remains accessible until | ||
802 | * the start of the next iteration by, for example, bumping the css refcnt. | ||
751 | */ | 803 | */ |
752 | #define cgroup_for_each_descendant_pre(pos, cgroup) \ | 804 | #define cgroup_for_each_descendant_pre(pos, cgroup) \ |
753 | for (pos = cgroup_next_descendant_pre(NULL, (cgroup)); (pos); \ | 805 | for (pos = cgroup_next_descendant_pre(NULL, (cgroup)); (pos); \ |
@@ -771,7 +823,7 @@ struct cgroup *cgroup_next_descendant_post(struct cgroup *pos, | |||
771 | 823 | ||
772 | /* A cgroup_iter should be treated as an opaque object */ | 824 | /* A cgroup_iter should be treated as an opaque object */ |
773 | struct cgroup_iter { | 825 | struct cgroup_iter { |
774 | struct list_head *cg_link; | 826 | struct list_head *cset_link; |
775 | struct list_head *task; | 827 | struct list_head *task; |
776 | }; | 828 | }; |
777 | 829 | ||
@@ -827,7 +879,6 @@ bool css_is_ancestor(struct cgroup_subsys_state *cg, | |||
827 | 879 | ||
828 | /* Get id and depth of css */ | 880 | /* Get id and depth of css */ |
829 | unsigned short css_id(struct cgroup_subsys_state *css); | 881 | unsigned short css_id(struct cgroup_subsys_state *css); |
830 | unsigned short css_depth(struct cgroup_subsys_state *css); | ||
831 | struct cgroup_subsys_state *cgroup_css_from_dir(struct file *f, int id); | 882 | struct cgroup_subsys_state *cgroup_css_from_dir(struct file *f, int id); |
832 | 883 | ||
833 | #else /* !CONFIG_CGROUPS */ | 884 | #else /* !CONFIG_CGROUPS */ |
@@ -838,8 +889,6 @@ static inline void cgroup_fork(struct task_struct *p) {} | |||
838 | static inline void cgroup_post_fork(struct task_struct *p) {} | 889 | static inline void cgroup_post_fork(struct task_struct *p) {} |
839 | static inline void cgroup_exit(struct task_struct *p, int callbacks) {} | 890 | static inline void cgroup_exit(struct task_struct *p, int callbacks) {} |
840 | 891 | ||
841 | static inline void cgroup_lock(void) {} | ||
842 | static inline void cgroup_unlock(void) {} | ||
843 | static inline int cgroupstats_build(struct cgroupstats *stats, | 892 | static inline int cgroupstats_build(struct cgroupstats *stats, |
844 | struct dentry *dentry) | 893 | struct dentry *dentry) |
845 | { | 894 | { |
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 11860985fecb..1ec14a732176 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h | |||
@@ -210,6 +210,10 @@ void of_fixed_clk_setup(struct device_node *np); | |||
210 | * CLK_GATE_SET_TO_DISABLE - by default this clock sets the bit at bit_idx to | 210 | * CLK_GATE_SET_TO_DISABLE - by default this clock sets the bit at bit_idx to |
211 | * enable the clock. Setting this flag does the opposite: setting the bit | 211 | * enable the clock. Setting this flag does the opposite: setting the bit |
212 | * disable the clock and clearing it enables the clock | 212 | * disable the clock and clearing it enables the clock |
213 | * CLK_GATE_HIWORD_MASK - The gate settings are only in lower 16-bit | ||
214 | * of this register, and mask of gate bits are in higher 16-bit of this | ||
215 | * register. While setting the gate bits, higher 16-bit should also be | ||
216 | * updated to indicate changing gate bits. | ||
213 | */ | 217 | */ |
214 | struct clk_gate { | 218 | struct clk_gate { |
215 | struct clk_hw hw; | 219 | struct clk_hw hw; |
@@ -220,6 +224,7 @@ struct clk_gate { | |||
220 | }; | 224 | }; |
221 | 225 | ||
222 | #define CLK_GATE_SET_TO_DISABLE BIT(0) | 226 | #define CLK_GATE_SET_TO_DISABLE BIT(0) |
227 | #define CLK_GATE_HIWORD_MASK BIT(1) | ||
223 | 228 | ||
224 | extern const struct clk_ops clk_gate_ops; | 229 | extern const struct clk_ops clk_gate_ops; |
225 | struct clk *clk_register_gate(struct device *dev, const char *name, | 230 | struct clk *clk_register_gate(struct device *dev, const char *name, |
@@ -257,6 +262,10 @@ struct clk_div_table { | |||
257 | * Some hardware implementations gracefully handle this case and allow a | 262 | * Some hardware implementations gracefully handle this case and allow a |
258 | * zero divisor by not modifying their input clock | 263 | * zero divisor by not modifying their input clock |
259 | * (divide by one / bypass). | 264 | * (divide by one / bypass). |
265 | * CLK_DIVIDER_HIWORD_MASK - The divider settings are only in lower 16-bit | ||
266 | * of this register, and mask of divider bits are in higher 16-bit of this | ||
267 | * register. While setting the divider bits, higher 16-bit should also be | ||
268 | * updated to indicate changing divider bits. | ||
260 | */ | 269 | */ |
261 | struct clk_divider { | 270 | struct clk_divider { |
262 | struct clk_hw hw; | 271 | struct clk_hw hw; |
@@ -271,6 +280,7 @@ struct clk_divider { | |||
271 | #define CLK_DIVIDER_ONE_BASED BIT(0) | 280 | #define CLK_DIVIDER_ONE_BASED BIT(0) |
272 | #define CLK_DIVIDER_POWER_OF_TWO BIT(1) | 281 | #define CLK_DIVIDER_POWER_OF_TWO BIT(1) |
273 | #define CLK_DIVIDER_ALLOW_ZERO BIT(2) | 282 | #define CLK_DIVIDER_ALLOW_ZERO BIT(2) |
283 | #define CLK_DIVIDER_HIWORD_MASK BIT(3) | ||
274 | 284 | ||
275 | extern const struct clk_ops clk_divider_ops; | 285 | extern const struct clk_ops clk_divider_ops; |
276 | struct clk *clk_register_divider(struct device *dev, const char *name, | 286 | struct clk *clk_register_divider(struct device *dev, const char *name, |
@@ -299,6 +309,10 @@ struct clk *clk_register_divider_table(struct device *dev, const char *name, | |||
299 | * Flags: | 309 | * Flags: |
300 | * CLK_MUX_INDEX_ONE - register index starts at 1, not 0 | 310 | * CLK_MUX_INDEX_ONE - register index starts at 1, not 0 |
301 | * CLK_MUX_INDEX_BIT - register index is a single bit (power of two) | 311 | * CLK_MUX_INDEX_BIT - register index is a single bit (power of two) |
312 | * CLK_MUX_HIWORD_MASK - The mux settings are only in lower 16-bit of this | ||
313 | * register, and mask of mux bits are in higher 16-bit of this register. | ||
314 | * While setting the mux bits, higher 16-bit should also be updated to | ||
315 | * indicate changing mux bits. | ||
302 | */ | 316 | */ |
303 | struct clk_mux { | 317 | struct clk_mux { |
304 | struct clk_hw hw; | 318 | struct clk_hw hw; |
@@ -312,6 +326,7 @@ struct clk_mux { | |||
312 | 326 | ||
313 | #define CLK_MUX_INDEX_ONE BIT(0) | 327 | #define CLK_MUX_INDEX_ONE BIT(0) |
314 | #define CLK_MUX_INDEX_BIT BIT(1) | 328 | #define CLK_MUX_INDEX_BIT BIT(1) |
329 | #define CLK_MUX_HIWORD_MASK BIT(2) | ||
315 | 330 | ||
316 | extern const struct clk_ops clk_mux_ops; | 331 | extern const struct clk_ops clk_mux_ops; |
317 | 332 | ||
@@ -423,6 +438,17 @@ struct of_device_id; | |||
423 | 438 | ||
424 | typedef void (*of_clk_init_cb_t)(struct device_node *); | 439 | typedef void (*of_clk_init_cb_t)(struct device_node *); |
425 | 440 | ||
441 | struct clk_onecell_data { | ||
442 | struct clk **clks; | ||
443 | unsigned int clk_num; | ||
444 | }; | ||
445 | |||
446 | #define CLK_OF_DECLARE(name, compat, fn) \ | ||
447 | static const struct of_device_id __clk_of_table_##name \ | ||
448 | __used __section(__clk_of_table) \ | ||
449 | = { .compatible = compat, .data = fn }; | ||
450 | |||
451 | #ifdef CONFIG_OF | ||
426 | int of_clk_add_provider(struct device_node *np, | 452 | int of_clk_add_provider(struct device_node *np, |
427 | struct clk *(*clk_src_get)(struct of_phandle_args *args, | 453 | struct clk *(*clk_src_get)(struct of_phandle_args *args, |
428 | void *data), | 454 | void *data), |
@@ -430,19 +456,39 @@ int of_clk_add_provider(struct device_node *np, | |||
430 | void of_clk_del_provider(struct device_node *np); | 456 | void of_clk_del_provider(struct device_node *np); |
431 | struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec, | 457 | struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec, |
432 | void *data); | 458 | void *data); |
433 | struct clk_onecell_data { | ||
434 | struct clk **clks; | ||
435 | unsigned int clk_num; | ||
436 | }; | ||
437 | struct clk *of_clk_src_onecell_get(struct of_phandle_args *clkspec, void *data); | 459 | struct clk *of_clk_src_onecell_get(struct of_phandle_args *clkspec, void *data); |
438 | const char *of_clk_get_parent_name(struct device_node *np, int index); | 460 | const char *of_clk_get_parent_name(struct device_node *np, int index); |
439 | 461 | ||
440 | void of_clk_init(const struct of_device_id *matches); | 462 | void of_clk_init(const struct of_device_id *matches); |
441 | 463 | ||
442 | #define CLK_OF_DECLARE(name, compat, fn) \ | 464 | #else /* !CONFIG_OF */ |
443 | static const struct of_device_id __clk_of_table_##name \ | ||
444 | __used __section(__clk_of_table) \ | ||
445 | = { .compatible = compat, .data = fn }; | ||
446 | 465 | ||
466 | static inline int of_clk_add_provider(struct device_node *np, | ||
467 | struct clk *(*clk_src_get)(struct of_phandle_args *args, | ||
468 | void *data), | ||
469 | void *data) | ||
470 | { | ||
471 | return 0; | ||
472 | } | ||
473 | #define of_clk_del_provider(np) \ | ||
474 | { while (0); } | ||
475 | static inline struct clk *of_clk_src_simple_get( | ||
476 | struct of_phandle_args *clkspec, void *data) | ||
477 | { | ||
478 | return ERR_PTR(-ENOENT); | ||
479 | } | ||
480 | static inline struct clk *of_clk_src_onecell_get( | ||
481 | struct of_phandle_args *clkspec, void *data) | ||
482 | { | ||
483 | return ERR_PTR(-ENOENT); | ||
484 | } | ||
485 | static inline const char *of_clk_get_parent_name(struct device_node *np, | ||
486 | int index) | ||
487 | { | ||
488 | return NULL; | ||
489 | } | ||
490 | #define of_clk_init(matches) \ | ||
491 | { while (0); } | ||
492 | #endif /* CONFIG_OF */ | ||
447 | #endif /* CONFIG_COMMON_CLK */ | 493 | #endif /* CONFIG_COMMON_CLK */ |
448 | #endif /* CLK_PROVIDER_H */ | 494 | #endif /* CLK_PROVIDER_H */ |
diff --git a/include/linux/clk/tegra.h b/include/linux/clk/tegra.h index 642789baec74..23a0ceee831f 100644 --- a/include/linux/clk/tegra.h +++ b/include/linux/clk/tegra.h | |||
@@ -120,9 +120,13 @@ static inline void tegra_cpu_clock_resume(void) | |||
120 | } | 120 | } |
121 | #endif | 121 | #endif |
122 | 122 | ||
123 | #ifdef CONFIG_ARCH_TEGRA | ||
123 | void tegra_periph_reset_deassert(struct clk *c); | 124 | void tegra_periph_reset_deassert(struct clk *c); |
124 | void tegra_periph_reset_assert(struct clk *c); | 125 | void tegra_periph_reset_assert(struct clk *c); |
125 | void tegra_clocks_init(void); | 126 | #else |
127 | static inline void tegra_periph_reset_deassert(struct clk *c) {} | ||
128 | static inline void tegra_periph_reset_assert(struct clk *c) {} | ||
129 | #endif | ||
126 | void tegra_clocks_apply_init_table(void); | 130 | void tegra_clocks_apply_init_table(void); |
127 | 131 | ||
128 | #endif /* __LINUX_CLK_TEGRA_H_ */ | 132 | #endif /* __LINUX_CLK_TEGRA_H_ */ |
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 963d71431388..0857922e8ad0 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
@@ -30,6 +30,7 @@ enum clock_event_nofitiers { | |||
30 | #include <linux/notifier.h> | 30 | #include <linux/notifier.h> |
31 | 31 | ||
32 | struct clock_event_device; | 32 | struct clock_event_device; |
33 | struct module; | ||
33 | 34 | ||
34 | /* Clock event mode commands */ | 35 | /* Clock event mode commands */ |
35 | enum clock_event_mode { | 36 | enum clock_event_mode { |
@@ -83,6 +84,7 @@ enum clock_event_mode { | |||
83 | * @irq: IRQ number (only for non CPU local devices) | 84 | * @irq: IRQ number (only for non CPU local devices) |
84 | * @cpumask: cpumask to indicate for which CPUs this device works | 85 | * @cpumask: cpumask to indicate for which CPUs this device works |
85 | * @list: list head for the management code | 86 | * @list: list head for the management code |
87 | * @owner: module reference | ||
86 | */ | 88 | */ |
87 | struct clock_event_device { | 89 | struct clock_event_device { |
88 | void (*event_handler)(struct clock_event_device *); | 90 | void (*event_handler)(struct clock_event_device *); |
@@ -112,6 +114,7 @@ struct clock_event_device { | |||
112 | int irq; | 114 | int irq; |
113 | const struct cpumask *cpumask; | 115 | const struct cpumask *cpumask; |
114 | struct list_head list; | 116 | struct list_head list; |
117 | struct module *owner; | ||
115 | } ____cacheline_aligned; | 118 | } ____cacheline_aligned; |
116 | 119 | ||
117 | /* | 120 | /* |
@@ -138,6 +141,7 @@ static inline unsigned long div_sc(unsigned long ticks, unsigned long nsec, | |||
138 | extern u64 clockevent_delta2ns(unsigned long latch, | 141 | extern u64 clockevent_delta2ns(unsigned long latch, |
139 | struct clock_event_device *evt); | 142 | struct clock_event_device *evt); |
140 | extern void clockevents_register_device(struct clock_event_device *dev); | 143 | extern void clockevents_register_device(struct clock_event_device *dev); |
144 | extern int clockevents_unbind_device(struct clock_event_device *ced, int cpu); | ||
141 | 145 | ||
142 | extern void clockevents_config(struct clock_event_device *dev, u32 freq); | 146 | extern void clockevents_config(struct clock_event_device *dev, u32 freq); |
143 | extern void clockevents_config_and_register(struct clock_event_device *dev, | 147 | extern void clockevents_config_and_register(struct clock_event_device *dev, |
@@ -150,7 +154,6 @@ extern void clockevents_exchange_device(struct clock_event_device *old, | |||
150 | struct clock_event_device *new); | 154 | struct clock_event_device *new); |
151 | extern void clockevents_set_mode(struct clock_event_device *dev, | 155 | extern void clockevents_set_mode(struct clock_event_device *dev, |
152 | enum clock_event_mode mode); | 156 | enum clock_event_mode mode); |
153 | extern int clockevents_register_notifier(struct notifier_block *nb); | ||
154 | extern int clockevents_program_event(struct clock_event_device *dev, | 157 | extern int clockevents_program_event(struct clock_event_device *dev, |
155 | ktime_t expires, bool force); | 158 | ktime_t expires, bool force); |
156 | 159 | ||
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 7279b94c01da..dbbf8aa7731b 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
@@ -21,6 +21,7 @@ | |||
21 | /* clocksource cycle base type */ | 21 | /* clocksource cycle base type */ |
22 | typedef u64 cycle_t; | 22 | typedef u64 cycle_t; |
23 | struct clocksource; | 23 | struct clocksource; |
24 | struct module; | ||
24 | 25 | ||
25 | #ifdef CONFIG_ARCH_CLOCKSOURCE_DATA | 26 | #ifdef CONFIG_ARCH_CLOCKSOURCE_DATA |
26 | #include <asm/clocksource.h> | 27 | #include <asm/clocksource.h> |
@@ -162,6 +163,7 @@ extern u64 timecounter_cyc2time(struct timecounter *tc, | |||
162 | * @suspend: suspend function for the clocksource, if necessary | 163 | * @suspend: suspend function for the clocksource, if necessary |
163 | * @resume: resume function for the clocksource, if necessary | 164 | * @resume: resume function for the clocksource, if necessary |
164 | * @cycle_last: most recent cycle counter value seen by ::read() | 165 | * @cycle_last: most recent cycle counter value seen by ::read() |
166 | * @owner: module reference, must be set by clocksource in modules | ||
165 | */ | 167 | */ |
166 | struct clocksource { | 168 | struct clocksource { |
167 | /* | 169 | /* |
@@ -195,6 +197,7 @@ struct clocksource { | |||
195 | cycle_t cs_last; | 197 | cycle_t cs_last; |
196 | cycle_t wd_last; | 198 | cycle_t wd_last; |
197 | #endif | 199 | #endif |
200 | struct module *owner; | ||
198 | } ____cacheline_aligned; | 201 | } ____cacheline_aligned; |
199 | 202 | ||
200 | /* | 203 | /* |
@@ -207,6 +210,7 @@ struct clocksource { | |||
207 | #define CLOCK_SOURCE_VALID_FOR_HRES 0x20 | 210 | #define CLOCK_SOURCE_VALID_FOR_HRES 0x20 |
208 | #define CLOCK_SOURCE_UNSTABLE 0x40 | 211 | #define CLOCK_SOURCE_UNSTABLE 0x40 |
209 | #define CLOCK_SOURCE_SUSPEND_NONSTOP 0x80 | 212 | #define CLOCK_SOURCE_SUSPEND_NONSTOP 0x80 |
213 | #define CLOCK_SOURCE_RESELECT 0x100 | ||
210 | 214 | ||
211 | /* simplify initialization of mask field */ | 215 | /* simplify initialization of mask field */ |
212 | #define CLOCKSOURCE_MASK(bits) (cycle_t)((bits) < 64 ? ((1ULL<<(bits))-1) : -1) | 216 | #define CLOCKSOURCE_MASK(bits) (cycle_t)((bits) < 64 ? ((1ULL<<(bits))-1) : -1) |
@@ -279,7 +283,7 @@ static inline s64 clocksource_cyc2ns(cycle_t cycles, u32 mult, u32 shift) | |||
279 | 283 | ||
280 | 284 | ||
281 | extern int clocksource_register(struct clocksource*); | 285 | extern int clocksource_register(struct clocksource*); |
282 | extern void clocksource_unregister(struct clocksource*); | 286 | extern int clocksource_unregister(struct clocksource*); |
283 | extern void clocksource_touch_watchdog(void); | 287 | extern void clocksource_touch_watchdog(void); |
284 | extern struct clocksource* clocksource_get_next(void); | 288 | extern struct clocksource* clocksource_get_next(void); |
285 | extern void clocksource_change_rating(struct clocksource *cs, int rating); | 289 | extern void clocksource_change_rating(struct clocksource *cs, int rating); |
@@ -321,7 +325,7 @@ static inline void __clocksource_updatefreq_khz(struct clocksource *cs, u32 khz) | |||
321 | } | 325 | } |
322 | 326 | ||
323 | 327 | ||
324 | extern void timekeeping_notify(struct clocksource *clock); | 328 | extern int timekeeping_notify(struct clocksource *clock); |
325 | 329 | ||
326 | extern cycle_t clocksource_mmio_readl_up(struct clocksource *); | 330 | extern cycle_t clocksource_mmio_readl_up(struct clocksource *); |
327 | extern cycle_t clocksource_mmio_readl_down(struct clocksource *); | 331 | extern cycle_t clocksource_mmio_readl_down(struct clocksource *); |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 9f3c7e81270a..944f283f01c4 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -6,9 +6,8 @@ | |||
6 | * definitions of processors. | 6 | * definitions of processors. |
7 | * | 7 | * |
8 | * Basic handling of the devices is done in drivers/base/cpu.c | 8 | * Basic handling of the devices is done in drivers/base/cpu.c |
9 | * and system devices are handled in drivers/base/sys.c. | ||
10 | * | 9 | * |
11 | * CPUs are exported via sysfs in the class/cpu/devices/ | 10 | * CPUs are exported via sysfs in the devices/system/cpu |
12 | * directory. | 11 | * directory. |
13 | */ | 12 | */ |
14 | #ifndef _LINUX_CPU_H_ | 13 | #ifndef _LINUX_CPU_H_ |
diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h index 282e27028418..a5d52eea8232 100644 --- a/include/linux/cpu_cooling.h +++ b/include/linux/cpu_cooling.h | |||
@@ -41,7 +41,7 @@ cpufreq_cooling_register(const struct cpumask *clip_cpus); | |||
41 | */ | 41 | */ |
42 | void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev); | 42 | void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev); |
43 | 43 | ||
44 | unsigned long cpufreq_cooling_get_level(unsigned int, unsigned int); | 44 | unsigned long cpufreq_cooling_get_level(unsigned int cpu, unsigned int freq); |
45 | #else /* !CONFIG_CPU_THERMAL */ | 45 | #else /* !CONFIG_CPU_THERMAL */ |
46 | static inline struct thermal_cooling_device * | 46 | static inline struct thermal_cooling_device * |
47 | cpufreq_cooling_register(const struct cpumask *clip_cpus) | 47 | cpufreq_cooling_register(const struct cpumask *clip_cpus) |
@@ -54,7 +54,7 @@ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) | |||
54 | return; | 54 | return; |
55 | } | 55 | } |
56 | static inline | 56 | static inline |
57 | unsigned long cpufreq_cooling_get_level(unsigned int, unsigned int) | 57 | unsigned long cpufreq_cooling_get_level(unsigned int cpu, unsigned int freq) |
58 | { | 58 | { |
59 | return THERMAL_CSTATE_INVALID; | 59 | return THERMAL_CSTATE_INVALID; |
60 | } | 60 | } |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 037d36ae63e5..90d5a15120d5 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/linux/cpufreq.h | 2 | * linux/include/linux/cpufreq.h |
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 |
@@ -26,7 +26,6 @@ | |||
26 | /* Print length for names. Extra 1 space for accomodating '\n' in prints */ | 26 | /* Print length for names. Extra 1 space for accomodating '\n' in prints */ |
27 | #define CPUFREQ_NAME_PLEN (CPUFREQ_NAME_LEN + 1) | 27 | #define CPUFREQ_NAME_PLEN (CPUFREQ_NAME_LEN + 1) |
28 | 28 | ||
29 | |||
30 | /********************************************************************* | 29 | /********************************************************************* |
31 | * CPUFREQ NOTIFIER INTERFACE * | 30 | * CPUFREQ NOTIFIER INTERFACE * |
32 | *********************************************************************/ | 31 | *********************************************************************/ |
@@ -71,6 +70,10 @@ struct cpufreq_governor; | |||
71 | 70 | ||
72 | /* /sys/devices/system/cpu/cpufreq: entry point for global variables */ | 71 | /* /sys/devices/system/cpu/cpufreq: entry point for global variables */ |
73 | extern struct kobject *cpufreq_global_kobject; | 72 | extern struct kobject *cpufreq_global_kobject; |
73 | int cpufreq_get_global_kobject(void); | ||
74 | void cpufreq_put_global_kobject(void); | ||
75 | int cpufreq_sysfs_create_file(const struct attribute *attr); | ||
76 | void cpufreq_sysfs_remove_file(const struct attribute *attr); | ||
74 | 77 | ||
75 | #define CPUFREQ_ETERNAL (-1) | 78 | #define CPUFREQ_ETERNAL (-1) |
76 | struct cpufreq_cpuinfo { | 79 | struct cpufreq_cpuinfo { |
@@ -107,6 +110,7 @@ struct cpufreq_policy { | |||
107 | unsigned int policy; /* see above */ | 110 | unsigned int policy; /* see above */ |
108 | struct cpufreq_governor *governor; /* see below */ | 111 | struct cpufreq_governor *governor; /* see below */ |
109 | void *governor_data; | 112 | void *governor_data; |
113 | bool governor_enabled; /* governor start/stop flag */ | ||
110 | 114 | ||
111 | struct work_struct update; /* if update_policy() needs to be | 115 | struct work_struct update; /* if update_policy() needs to be |
112 | * called, but you're in IRQ context */ | 116 | * called, but you're in IRQ context */ |
@@ -115,6 +119,7 @@ struct cpufreq_policy { | |||
115 | 119 | ||
116 | struct kobject kobj; | 120 | struct kobject kobj; |
117 | struct completion kobj_unregister; | 121 | struct completion kobj_unregister; |
122 | int transition_ongoing; /* Tracks transition status */ | ||
118 | }; | 123 | }; |
119 | 124 | ||
120 | #define CPUFREQ_ADJUST (0) | 125 | #define CPUFREQ_ADJUST (0) |
@@ -148,17 +153,18 @@ struct cpufreq_freqs { | |||
148 | u8 flags; /* flags of cpufreq_driver, see below. */ | 153 | u8 flags; /* flags of cpufreq_driver, see below. */ |
149 | }; | 154 | }; |
150 | 155 | ||
151 | |||
152 | /** | 156 | /** |
153 | * cpufreq_scale - "old * mult / div" calculation for large values (32-bit-arch safe) | 157 | * cpufreq_scale - "old * mult / div" calculation for large values (32-bit-arch |
158 | * safe) | ||
154 | * @old: old value | 159 | * @old: old value |
155 | * @div: divisor | 160 | * @div: divisor |
156 | * @mult: multiplier | 161 | * @mult: multiplier |
157 | * | 162 | * |
158 | * | 163 | * |
159 | * new = old * mult / div | 164 | * new = old * mult / div |
160 | */ | 165 | */ |
161 | static inline unsigned long cpufreq_scale(unsigned long old, u_int div, u_int mult) | 166 | static inline unsigned long cpufreq_scale(unsigned long old, u_int div, |
167 | u_int mult) | ||
162 | { | 168 | { |
163 | #if BITS_PER_LONG == 32 | 169 | #if BITS_PER_LONG == 32 |
164 | 170 | ||
@@ -211,14 +217,12 @@ extern int __cpufreq_driver_target(struct cpufreq_policy *policy, | |||
211 | unsigned int target_freq, | 217 | unsigned int target_freq, |
212 | unsigned int relation); | 218 | unsigned int relation); |
213 | 219 | ||
214 | |||
215 | extern int __cpufreq_driver_getavg(struct cpufreq_policy *policy, | 220 | extern int __cpufreq_driver_getavg(struct cpufreq_policy *policy, |
216 | unsigned int cpu); | 221 | unsigned int cpu); |
217 | 222 | ||
218 | int cpufreq_register_governor(struct cpufreq_governor *governor); | 223 | int cpufreq_register_governor(struct cpufreq_governor *governor); |
219 | void cpufreq_unregister_governor(struct cpufreq_governor *governor); | 224 | void cpufreq_unregister_governor(struct cpufreq_governor *governor); |
220 | 225 | ||
221 | |||
222 | /********************************************************************* | 226 | /********************************************************************* |
223 | * CPUFREQ DRIVER INTERFACE * | 227 | * CPUFREQ DRIVER INTERFACE * |
224 | *********************************************************************/ | 228 | *********************************************************************/ |
@@ -229,7 +233,7 @@ void cpufreq_unregister_governor(struct cpufreq_governor *governor); | |||
229 | struct freq_attr; | 233 | struct freq_attr; |
230 | 234 | ||
231 | struct cpufreq_driver { | 235 | struct cpufreq_driver { |
232 | struct module *owner; | 236 | struct module *owner; |
233 | char name[CPUFREQ_NAME_LEN]; | 237 | char name[CPUFREQ_NAME_LEN]; |
234 | u8 flags; | 238 | u8 flags; |
235 | /* | 239 | /* |
@@ -277,11 +281,11 @@ struct cpufreq_driver { | |||
277 | int cpufreq_register_driver(struct cpufreq_driver *driver_data); | 281 | int cpufreq_register_driver(struct cpufreq_driver *driver_data); |
278 | int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); | 282 | int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); |
279 | 283 | ||
280 | |||
281 | void cpufreq_notify_transition(struct cpufreq_policy *policy, | 284 | void cpufreq_notify_transition(struct cpufreq_policy *policy, |
282 | struct cpufreq_freqs *freqs, unsigned int state); | 285 | struct cpufreq_freqs *freqs, unsigned int state); |
283 | 286 | ||
284 | static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, unsigned int min, unsigned int max) | 287 | static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, |
288 | unsigned int min, unsigned int max) | ||
285 | { | 289 | { |
286 | if (policy->min < min) | 290 | if (policy->min < min) |
287 | policy->min = min; | 291 | policy->min = min; |
@@ -337,12 +341,16 @@ const char *cpufreq_get_current_driver(void); | |||
337 | /********************************************************************* | 341 | /********************************************************************* |
338 | * CPUFREQ 2.6. INTERFACE * | 342 | * CPUFREQ 2.6. INTERFACE * |
339 | *********************************************************************/ | 343 | *********************************************************************/ |
344 | u64 get_cpu_idle_time(unsigned int cpu, u64 *wall, int io_busy); | ||
340 | int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); | 345 | int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); |
341 | int cpufreq_update_policy(unsigned int cpu); | 346 | int cpufreq_update_policy(unsigned int cpu); |
342 | bool have_governor_per_policy(void); | 347 | bool have_governor_per_policy(void); |
348 | struct kobject *get_governor_parent_kobj(struct cpufreq_policy *policy); | ||
343 | 349 | ||
344 | #ifdef CONFIG_CPU_FREQ | 350 | #ifdef CONFIG_CPU_FREQ |
345 | /* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */ | 351 | /* |
352 | * query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it | ||
353 | */ | ||
346 | unsigned int cpufreq_get(unsigned int cpu); | 354 | unsigned int cpufreq_get(unsigned int cpu); |
347 | #else | 355 | #else |
348 | static inline unsigned int cpufreq_get(unsigned int cpu) | 356 | static inline unsigned int cpufreq_get(unsigned int cpu) |
@@ -351,7 +359,9 @@ static inline unsigned int cpufreq_get(unsigned int cpu) | |||
351 | } | 359 | } |
352 | #endif | 360 | #endif |
353 | 361 | ||
354 | /* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it */ | 362 | /* |
363 | * query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it | ||
364 | */ | ||
355 | #ifdef CONFIG_CPU_FREQ | 365 | #ifdef CONFIG_CPU_FREQ |
356 | unsigned int cpufreq_quick_get(unsigned int cpu); | 366 | unsigned int cpufreq_quick_get(unsigned int cpu); |
357 | unsigned int cpufreq_quick_get_max(unsigned int cpu); | 367 | unsigned int cpufreq_quick_get_max(unsigned int cpu); |
@@ -366,16 +376,14 @@ static inline unsigned int cpufreq_quick_get_max(unsigned int cpu) | |||
366 | } | 376 | } |
367 | #endif | 377 | #endif |
368 | 378 | ||
369 | |||
370 | /********************************************************************* | 379 | /********************************************************************* |
371 | * CPUFREQ DEFAULT GOVERNOR * | 380 | * CPUFREQ DEFAULT GOVERNOR * |
372 | *********************************************************************/ | 381 | *********************************************************************/ |
373 | 382 | ||
374 | |||
375 | /* | 383 | /* |
376 | Performance governor is fallback governor if any other gov failed to | 384 | * Performance governor is fallback governor if any other gov failed to auto |
377 | auto load due latency restrictions | 385 | * load due latency restrictions |
378 | */ | 386 | */ |
379 | #ifdef CONFIG_CPU_FREQ_GOV_PERFORMANCE | 387 | #ifdef CONFIG_CPU_FREQ_GOV_PERFORMANCE |
380 | extern struct cpufreq_governor cpufreq_gov_performance; | 388 | extern struct cpufreq_governor cpufreq_gov_performance; |
381 | #endif | 389 | #endif |
@@ -395,7 +403,6 @@ extern struct cpufreq_governor cpufreq_gov_conservative; | |||
395 | #define CPUFREQ_DEFAULT_GOVERNOR (&cpufreq_gov_conservative) | 403 | #define CPUFREQ_DEFAULT_GOVERNOR (&cpufreq_gov_conservative) |
396 | #endif | 404 | #endif |
397 | 405 | ||
398 | |||
399 | /********************************************************************* | 406 | /********************************************************************* |
400 | * FREQUENCY TABLE HELPERS * | 407 | * FREQUENCY TABLE HELPERS * |
401 | *********************************************************************/ | 408 | *********************************************************************/ |
@@ -404,7 +411,7 @@ extern struct cpufreq_governor cpufreq_gov_conservative; | |||
404 | #define CPUFREQ_TABLE_END ~1 | 411 | #define CPUFREQ_TABLE_END ~1 |
405 | 412 | ||
406 | struct cpufreq_frequency_table { | 413 | struct cpufreq_frequency_table { |
407 | unsigned int index; /* any */ | 414 | unsigned int driver_data; /* driver specific data, not used by core */ |
408 | unsigned int frequency; /* kHz - doesn't need to be in ascending | 415 | unsigned int frequency; /* kHz - doesn't need to be in ascending |
409 | * order */ | 416 | * order */ |
410 | }; | 417 | }; |
@@ -432,4 +439,7 @@ void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table, | |||
432 | void cpufreq_frequency_table_update_policy_cpu(struct cpufreq_policy *policy); | 439 | void cpufreq_frequency_table_update_policy_cpu(struct cpufreq_policy *policy); |
433 | 440 | ||
434 | void cpufreq_frequency_table_put_attr(unsigned int cpu); | 441 | void cpufreq_frequency_table_put_attr(unsigned int cpu); |
442 | |||
443 | ssize_t cpufreq_show_cpus(const struct cpumask *mask, char *buf); | ||
444 | |||
435 | #endif /* _LINUX_CPUFREQ_H */ | 445 | #endif /* _LINUX_CPUFREQ_H */ |
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 8f0406230a0a..0bc4b74668e9 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
@@ -111,6 +111,9 @@ struct cpuidle_driver { | |||
111 | struct cpuidle_state states[CPUIDLE_STATE_MAX]; | 111 | struct cpuidle_state states[CPUIDLE_STATE_MAX]; |
112 | int state_count; | 112 | int state_count; |
113 | int safe_state_index; | 113 | int safe_state_index; |
114 | |||
115 | /* the driver handles the cpus in cpumask */ | ||
116 | struct cpumask *cpumask; | ||
114 | }; | 117 | }; |
115 | 118 | ||
116 | #ifdef CONFIG_CPU_IDLE | 119 | #ifdef CONFIG_CPU_IDLE |
@@ -135,9 +138,6 @@ extern void cpuidle_disable_device(struct cpuidle_device *dev); | |||
135 | extern int cpuidle_play_dead(void); | 138 | extern int cpuidle_play_dead(void); |
136 | 139 | ||
137 | extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev); | 140 | extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev); |
138 | extern int cpuidle_register_cpu_driver(struct cpuidle_driver *drv, int cpu); | ||
139 | extern void cpuidle_unregister_cpu_driver(struct cpuidle_driver *drv, int cpu); | ||
140 | |||
141 | #else | 141 | #else |
142 | static inline void disable_cpuidle(void) { } | 142 | static inline void disable_cpuidle(void) { } |
143 | static inline int cpuidle_idle_call(void) { return -ENODEV; } | 143 | static inline int cpuidle_idle_call(void) { return -ENODEV; } |
diff --git a/include/linux/crc-t10dif.h b/include/linux/crc-t10dif.h index a9c96d865ee7..b3cb71f0d3b0 100644 --- a/include/linux/crc-t10dif.h +++ b/include/linux/crc-t10dif.h | |||
@@ -3,6 +3,10 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
6 | #define CRC_T10DIF_DIGEST_SIZE 2 | ||
7 | #define CRC_T10DIF_BLOCK_SIZE 1 | ||
8 | |||
9 | __u16 crc_t10dif_generic(__u16 crc, const unsigned char *buffer, size_t len); | ||
6 | __u16 crc_t10dif(unsigned char const *, size_t); | 10 | __u16 crc_t10dif(unsigned char const *, size_t); |
7 | 11 | ||
8 | #endif | 12 | #endif |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 1a6bb81f0fe5..3092df3614ae 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -146,10 +146,8 @@ enum dentry_d_lock_class | |||
146 | struct dentry_operations { | 146 | struct dentry_operations { |
147 | int (*d_revalidate)(struct dentry *, unsigned int); | 147 | int (*d_revalidate)(struct dentry *, unsigned int); |
148 | int (*d_weak_revalidate)(struct dentry *, unsigned int); | 148 | int (*d_weak_revalidate)(struct dentry *, unsigned int); |
149 | int (*d_hash)(const struct dentry *, const struct inode *, | 149 | int (*d_hash)(const struct dentry *, struct qstr *); |
150 | struct qstr *); | 150 | int (*d_compare)(const struct dentry *, const struct dentry *, |
151 | int (*d_compare)(const struct dentry *, const struct inode *, | ||
152 | const struct dentry *, const struct inode *, | ||
153 | unsigned int, const char *, const struct qstr *); | 151 | unsigned int, const char *, const struct qstr *); |
154 | int (*d_delete)(const struct dentry *); | 152 | int (*d_delete)(const struct dentry *); |
155 | void (*d_release)(struct dentry *); | 153 | void (*d_release)(struct dentry *); |
@@ -246,6 +244,8 @@ extern struct dentry * d_make_root(struct inode *); | |||
246 | /* <clickety>-<click> the ramfs-type tree */ | 244 | /* <clickety>-<click> the ramfs-type tree */ |
247 | extern void d_genocide(struct dentry *); | 245 | extern void d_genocide(struct dentry *); |
248 | 246 | ||
247 | extern void d_tmpfile(struct dentry *, struct inode *); | ||
248 | |||
249 | extern struct dentry *d_find_alias(struct inode *); | 249 | extern struct dentry *d_find_alias(struct inode *); |
250 | extern void d_prune_aliases(struct inode *); | 250 | extern void d_prune_aliases(struct inode *); |
251 | 251 | ||
@@ -300,8 +300,7 @@ extern struct dentry *d_lookup(const struct dentry *, const struct qstr *); | |||
300 | extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *); | 300 | extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *); |
301 | extern struct dentry *__d_lookup(const struct dentry *, const struct qstr *); | 301 | extern struct dentry *__d_lookup(const struct dentry *, const struct qstr *); |
302 | extern struct dentry *__d_lookup_rcu(const struct dentry *parent, | 302 | extern struct dentry *__d_lookup_rcu(const struct dentry *parent, |
303 | const struct qstr *name, | 303 | const struct qstr *name, unsigned *seq); |
304 | unsigned *seq, struct inode *inode); | ||
305 | 304 | ||
306 | /** | 305 | /** |
307 | * __d_rcu_to_refcount - take a refcount on dentry if sequence check is ok | 306 | * __d_rcu_to_refcount - take a refcount on dentry if sequence check is ok |
@@ -325,6 +324,11 @@ static inline int __d_rcu_to_refcount(struct dentry *dentry, unsigned seq) | |||
325 | return ret; | 324 | return ret; |
326 | } | 325 | } |
327 | 326 | ||
327 | static inline unsigned d_count(struct dentry *dentry) | ||
328 | { | ||
329 | return dentry->d_count; | ||
330 | } | ||
331 | |||
328 | /* validate "insecure" dentry pointer */ | 332 | /* validate "insecure" dentry pointer */ |
329 | extern int d_validate(struct dentry *, struct dentry *); | 333 | extern int d_validate(struct dentry *, struct dentry *); |
330 | 334 | ||
diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h index 21ca773f77bf..822c1354f3a6 100644 --- a/include/linux/debug_locks.h +++ b/include/linux/debug_locks.h | |||
@@ -51,7 +51,7 @@ struct task_struct; | |||
51 | extern void debug_show_all_locks(void); | 51 | extern void debug_show_all_locks(void); |
52 | extern void debug_show_held_locks(struct task_struct *task); | 52 | extern void debug_show_held_locks(struct task_struct *task); |
53 | extern void debug_check_no_locks_freed(const void *from, unsigned long len); | 53 | extern void debug_check_no_locks_freed(const void *from, unsigned long len); |
54 | extern void debug_check_no_locks_held(struct task_struct *task); | 54 | extern void debug_check_no_locks_held(void); |
55 | #else | 55 | #else |
56 | static inline void debug_show_all_locks(void) | 56 | static inline void debug_show_all_locks(void) |
57 | { | 57 | { |
@@ -67,7 +67,7 @@ debug_check_no_locks_freed(const void *from, unsigned long len) | |||
67 | } | 67 | } |
68 | 68 | ||
69 | static inline void | 69 | static inline void |
70 | debug_check_no_locks_held(struct task_struct *task) | 70 | debug_check_no_locks_held(void) |
71 | { | 71 | { |
72 | } | 72 | } |
73 | #endif | 73 | #endif |
diff --git a/include/linux/decompress/unlz4.h b/include/linux/decompress/unlz4.h new file mode 100644 index 000000000000..d5b68bf3ec92 --- /dev/null +++ b/include/linux/decompress/unlz4.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #ifndef DECOMPRESS_UNLZ4_H | ||
2 | #define DECOMPRESS_UNLZ4_H | ||
3 | |||
4 | int unlz4(unsigned char *inbuf, int len, | ||
5 | int(*fill)(void*, unsigned int), | ||
6 | int(*flush)(void*, unsigned int), | ||
7 | unsigned char *output, | ||
8 | int *pos, | ||
9 | void(*error)(char *x)); | ||
10 | #endif | ||
diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h index fe8c4476f7e4..5f1ab92107e6 100644 --- a/include/linux/devfreq.h +++ b/include/linux/devfreq.h | |||
@@ -181,6 +181,8 @@ extern struct devfreq *devfreq_add_device(struct device *dev, | |||
181 | const char *governor_name, | 181 | const char *governor_name, |
182 | void *data); | 182 | void *data); |
183 | extern int devfreq_remove_device(struct devfreq *devfreq); | 183 | extern int devfreq_remove_device(struct devfreq *devfreq); |
184 | |||
185 | /* Supposed to be called by PM_SLEEP/PM_RUNTIME callbacks */ | ||
184 | extern int devfreq_suspend_device(struct devfreq *devfreq); | 186 | extern int devfreq_suspend_device(struct devfreq *devfreq); |
185 | extern int devfreq_resume_device(struct devfreq *devfreq); | 187 | extern int devfreq_resume_device(struct devfreq *devfreq); |
186 | 188 | ||
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 3cd32478f2fd..e151d4c9298d 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -446,9 +446,9 @@ int __must_check dm_set_target_max_io_len(struct dm_target *ti, sector_t len); | |||
446 | /* | 446 | /* |
447 | * Table reference counting. | 447 | * Table reference counting. |
448 | */ | 448 | */ |
449 | struct dm_table *dm_get_live_table(struct mapped_device *md); | 449 | struct dm_table *dm_get_live_table(struct mapped_device *md, int *srcu_idx); |
450 | void dm_table_get(struct dm_table *t); | 450 | void dm_put_live_table(struct mapped_device *md, int srcu_idx); |
451 | void dm_table_put(struct dm_table *t); | 451 | void dm_sync_table(struct mapped_device *md); |
452 | 452 | ||
453 | /* | 453 | /* |
454 | * Queries | 454 | * Queries |
diff --git a/include/linux/device.h b/include/linux/device.h index 9d4835a8f8b8..bcf8c0d4cd98 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -71,6 +71,10 @@ extern void bus_remove_file(struct bus_type *, struct bus_attribute *); | |||
71 | * the specific driver's probe to initial the matched device. | 71 | * the specific driver's probe to initial the matched device. |
72 | * @remove: Called when a device removed from this bus. | 72 | * @remove: Called when a device removed from this bus. |
73 | * @shutdown: Called at shut-down time to quiesce the device. | 73 | * @shutdown: Called at shut-down time to quiesce the device. |
74 | * | ||
75 | * @online: Called to put the device back online (after offlining it). | ||
76 | * @offline: Called to put the device offline for hot-removal. May fail. | ||
77 | * | ||
74 | * @suspend: Called when a device on this bus wants to go to sleep mode. | 78 | * @suspend: Called when a device on this bus wants to go to sleep mode. |
75 | * @resume: Called to bring a device on this bus out of sleep mode. | 79 | * @resume: Called to bring a device on this bus out of sleep mode. |
76 | * @pm: Power management operations of this bus, callback the specific | 80 | * @pm: Power management operations of this bus, callback the specific |
@@ -105,6 +109,9 @@ struct bus_type { | |||
105 | int (*remove)(struct device *dev); | 109 | int (*remove)(struct device *dev); |
106 | void (*shutdown)(struct device *dev); | 110 | void (*shutdown)(struct device *dev); |
107 | 111 | ||
112 | int (*online)(struct device *dev); | ||
113 | int (*offline)(struct device *dev); | ||
114 | |||
108 | int (*suspend)(struct device *dev, pm_message_t state); | 115 | int (*suspend)(struct device *dev, pm_message_t state); |
109 | int (*resume)(struct device *dev); | 116 | int (*resume)(struct device *dev); |
110 | 117 | ||
@@ -652,6 +659,9 @@ struct acpi_dev_node { | |||
652 | * device (i.e. the bus driver that discovered the device). | 659 | * device (i.e. the bus driver that discovered the device). |
653 | * @iommu_group: IOMMU group the device belongs to. | 660 | * @iommu_group: IOMMU group the device belongs to. |
654 | * | 661 | * |
662 | * @offline_disabled: If set, the device is permanently online. | ||
663 | * @offline: Set after successful invocation of bus type's .offline(). | ||
664 | * | ||
655 | * At the lowest level, every device in a Linux system is represented by an | 665 | * At the lowest level, every device in a Linux system is represented by an |
656 | * instance of struct device. The device structure contains the information | 666 | * instance of struct device. The device structure contains the information |
657 | * that the device model core needs to model the system. Most subsystems, | 667 | * that the device model core needs to model the system. Most subsystems, |
@@ -723,6 +733,9 @@ struct device { | |||
723 | 733 | ||
724 | void (*release)(struct device *dev); | 734 | void (*release)(struct device *dev); |
725 | struct iommu_group *iommu_group; | 735 | struct iommu_group *iommu_group; |
736 | |||
737 | bool offline_disabled:1; | ||
738 | bool offline:1; | ||
726 | }; | 739 | }; |
727 | 740 | ||
728 | static inline struct device *kobj_to_dev(struct kobject *kobj) | 741 | static inline struct device *kobj_to_dev(struct kobject *kobj) |
@@ -859,6 +872,15 @@ extern const char *device_get_devnode(struct device *dev, | |||
859 | extern void *dev_get_drvdata(const struct device *dev); | 872 | extern void *dev_get_drvdata(const struct device *dev); |
860 | extern int dev_set_drvdata(struct device *dev, void *data); | 873 | extern int dev_set_drvdata(struct device *dev, void *data); |
861 | 874 | ||
875 | static inline bool device_supports_offline(struct device *dev) | ||
876 | { | ||
877 | return dev->bus && dev->bus->offline && dev->bus->online; | ||
878 | } | ||
879 | |||
880 | extern void lock_device_hotplug(void); | ||
881 | extern void unlock_device_hotplug(void); | ||
882 | extern int device_offline(struct device *dev); | ||
883 | extern int device_online(struct device *dev); | ||
862 | /* | 884 | /* |
863 | * Root device objects for grouping under /sys/devices | 885 | * Root device objects for grouping under /sys/devices |
864 | */ | 886 | */ |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 96d3e4ab11a9..cb286b1acdb6 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -66,7 +66,6 @@ enum dma_transaction_type { | |||
66 | DMA_PQ, | 66 | DMA_PQ, |
67 | DMA_XOR_VAL, | 67 | DMA_XOR_VAL, |
68 | DMA_PQ_VAL, | 68 | DMA_PQ_VAL, |
69 | DMA_MEMSET, | ||
70 | DMA_INTERRUPT, | 69 | DMA_INTERRUPT, |
71 | DMA_SG, | 70 | DMA_SG, |
72 | DMA_PRIVATE, | 71 | DMA_PRIVATE, |
@@ -520,7 +519,6 @@ struct dma_tx_state { | |||
520 | * @device_prep_dma_xor_val: prepares a xor validation operation | 519 | * @device_prep_dma_xor_val: prepares a xor validation operation |
521 | * @device_prep_dma_pq: prepares a pq operation | 520 | * @device_prep_dma_pq: prepares a pq operation |
522 | * @device_prep_dma_pq_val: prepares a pqzero_sum operation | 521 | * @device_prep_dma_pq_val: prepares a pqzero_sum operation |
523 | * @device_prep_dma_memset: prepares a memset operation | ||
524 | * @device_prep_dma_interrupt: prepares an end of chain interrupt operation | 522 | * @device_prep_dma_interrupt: prepares an end of chain interrupt operation |
525 | * @device_prep_slave_sg: prepares a slave dma operation | 523 | * @device_prep_slave_sg: prepares a slave dma operation |
526 | * @device_prep_dma_cyclic: prepare a cyclic dma operation suitable for audio. | 524 | * @device_prep_dma_cyclic: prepare a cyclic dma operation suitable for audio. |
@@ -573,9 +571,6 @@ struct dma_device { | |||
573 | struct dma_chan *chan, dma_addr_t *pq, dma_addr_t *src, | 571 | struct dma_chan *chan, dma_addr_t *pq, dma_addr_t *src, |
574 | unsigned int src_cnt, const unsigned char *scf, size_t len, | 572 | unsigned int src_cnt, const unsigned char *scf, size_t len, |
575 | enum sum_check_flags *pqres, unsigned long flags); | 573 | enum sum_check_flags *pqres, unsigned long flags); |
576 | struct dma_async_tx_descriptor *(*device_prep_dma_memset)( | ||
577 | struct dma_chan *chan, dma_addr_t dest, int value, size_t len, | ||
578 | unsigned long flags); | ||
579 | struct dma_async_tx_descriptor *(*device_prep_dma_interrupt)( | 574 | struct dma_async_tx_descriptor *(*device_prep_dma_interrupt)( |
580 | struct dma_chan *chan, unsigned long flags); | 575 | struct dma_chan *chan, unsigned long flags); |
581 | struct dma_async_tx_descriptor *(*device_prep_dma_sg)( | 576 | struct dma_async_tx_descriptor *(*device_prep_dma_sg)( |
diff --git a/include/linux/dw_apb_timer.h b/include/linux/dw_apb_timer.h index 07261d52a6df..1f79b20918b1 100644 --- a/include/linux/dw_apb_timer.h +++ b/include/linux/dw_apb_timer.h | |||
@@ -51,6 +51,5 @@ dw_apb_clocksource_init(unsigned rating, const char *name, void __iomem *base, | |||
51 | void dw_apb_clocksource_register(struct dw_apb_clocksource *dw_cs); | 51 | void dw_apb_clocksource_register(struct dw_apb_clocksource *dw_cs); |
52 | void dw_apb_clocksource_start(struct dw_apb_clocksource *dw_cs); | 52 | void dw_apb_clocksource_start(struct dw_apb_clocksource *dw_cs); |
53 | cycle_t dw_apb_clocksource_read(struct dw_apb_clocksource *dw_cs); | 53 | cycle_t dw_apb_clocksource_read(struct dw_apb_clocksource *dw_cs); |
54 | void dw_apb_clocksource_unregister(struct dw_apb_clocksource *dw_cs); | ||
55 | 54 | ||
56 | #endif /* __DW_APB_TIMER_H__ */ | 55 | #endif /* __DW_APB_TIMER_H__ */ |
diff --git a/include/linux/efi.h b/include/linux/efi.h index 21ae6b3c0359..5f8f176154f7 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
@@ -594,8 +594,8 @@ extern u64 efi_mem_attribute (unsigned long phys_addr, unsigned long size); | |||
594 | extern int __init efi_uart_console_only (void); | 594 | extern int __init efi_uart_console_only (void); |
595 | extern void efi_initialize_iomem_resources(struct resource *code_resource, | 595 | extern void efi_initialize_iomem_resources(struct resource *code_resource, |
596 | struct resource *data_resource, struct resource *bss_resource); | 596 | struct resource *data_resource, struct resource *bss_resource); |
597 | extern unsigned long efi_get_time(void); | 597 | extern void efi_get_time(struct timespec *now); |
598 | extern int efi_set_rtc_mmss(unsigned long nowtime); | 598 | extern int efi_set_rtc_mmss(const struct timespec *now); |
599 | extern void efi_reserve_boot_services(void); | 599 | extern void efi_reserve_boot_services(void); |
600 | extern struct efi_memory_map memmap; | 600 | extern struct efi_memory_map memmap; |
601 | 601 | ||
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index acd0312d46fb..306dd8cd0b6f 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #ifdef CONFIG_BLOCK | 7 | #ifdef CONFIG_BLOCK |
8 | 8 | ||
9 | struct io_cq; | 9 | struct io_cq; |
10 | struct elevator_type; | ||
10 | 11 | ||
11 | typedef int (elevator_merge_fn) (struct request_queue *, struct request **, | 12 | typedef int (elevator_merge_fn) (struct request_queue *, struct request **, |
12 | struct bio *); | 13 | struct bio *); |
@@ -35,7 +36,8 @@ typedef void (elevator_put_req_fn) (struct request *); | |||
35 | typedef void (elevator_activate_req_fn) (struct request_queue *, struct request *); | 36 | typedef void (elevator_activate_req_fn) (struct request_queue *, struct request *); |
36 | typedef void (elevator_deactivate_req_fn) (struct request_queue *, struct request *); | 37 | typedef void (elevator_deactivate_req_fn) (struct request_queue *, struct request *); |
37 | 38 | ||
38 | typedef int (elevator_init_fn) (struct request_queue *); | 39 | typedef int (elevator_init_fn) (struct request_queue *, |
40 | struct elevator_type *e); | ||
39 | typedef void (elevator_exit_fn) (struct elevator_queue *); | 41 | typedef void (elevator_exit_fn) (struct elevator_queue *); |
40 | 42 | ||
41 | struct elevator_ops | 43 | struct elevator_ops |
@@ -155,6 +157,8 @@ extern int elevator_init(struct request_queue *, char *); | |||
155 | extern void elevator_exit(struct elevator_queue *); | 157 | extern void elevator_exit(struct elevator_queue *); |
156 | extern int elevator_change(struct request_queue *, const char *); | 158 | extern int elevator_change(struct request_queue *, const char *); |
157 | extern bool elv_rq_merge_ok(struct request *, struct bio *); | 159 | extern bool elv_rq_merge_ok(struct request *, struct bio *); |
160 | extern struct elevator_queue *elevator_alloc(struct request_queue *, | ||
161 | struct elevator_type *); | ||
158 | 162 | ||
159 | /* | 163 | /* |
160 | * Helper functions. | 164 | * Helper functions. |
diff --git a/include/linux/err.h b/include/linux/err.h index f2edce25a76b..221fcfb676c4 100644 --- a/include/linux/err.h +++ b/include/linux/err.h | |||
@@ -24,17 +24,17 @@ static inline void * __must_check ERR_PTR(long error) | |||
24 | return (void *) error; | 24 | return (void *) error; |
25 | } | 25 | } |
26 | 26 | ||
27 | static inline long __must_check PTR_ERR(const void *ptr) | 27 | static inline long __must_check PTR_ERR(__force const void *ptr) |
28 | { | 28 | { |
29 | return (long) ptr; | 29 | return (long) ptr; |
30 | } | 30 | } |
31 | 31 | ||
32 | static inline long __must_check IS_ERR(const void *ptr) | 32 | static inline long __must_check IS_ERR(__force const void *ptr) |
33 | { | 33 | { |
34 | return IS_ERR_VALUE((unsigned long)ptr); | 34 | return IS_ERR_VALUE((unsigned long)ptr); |
35 | } | 35 | } |
36 | 36 | ||
37 | static inline long __must_check IS_ERR_OR_NULL(const void *ptr) | 37 | static inline long __must_check IS_ERR_OR_NULL(__force const void *ptr) |
38 | { | 38 | { |
39 | return !ptr || IS_ERR_VALUE((unsigned long)ptr); | 39 | return !ptr || IS_ERR_VALUE((unsigned long)ptr); |
40 | } | 40 | } |
@@ -46,13 +46,13 @@ static inline long __must_check IS_ERR_OR_NULL(const void *ptr) | |||
46 | * Explicitly cast an error-valued pointer to another pointer type in such a | 46 | * Explicitly cast an error-valued pointer to another pointer type in such a |
47 | * way as to make it clear that's what's going on. | 47 | * way as to make it clear that's what's going on. |
48 | */ | 48 | */ |
49 | static inline void * __must_check ERR_CAST(const void *ptr) | 49 | static inline void * __must_check ERR_CAST(__force const void *ptr) |
50 | { | 50 | { |
51 | /* cast away the const */ | 51 | /* cast away the const */ |
52 | return (void *) ptr; | 52 | return (void *) ptr; |
53 | } | 53 | } |
54 | 54 | ||
55 | static inline int __must_check PTR_RET(const void *ptr) | 55 | static inline int __must_check PTR_RET(__force const void *ptr) |
56 | { | 56 | { |
57 | if (IS_ERR(ptr)) | 57 | if (IS_ERR(ptr)) |
58 | return PTR_ERR(ptr); | 58 | return PTR_ERR(ptr); |
diff --git a/include/linux/fb.h b/include/linux/fb.h index d49c60f5aa4c..ffac70aab3e9 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -624,7 +624,7 @@ extern void fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch, u3 | |||
624 | extern void fb_set_suspend(struct fb_info *info, int state); | 624 | extern void fb_set_suspend(struct fb_info *info, int state); |
625 | extern int fb_get_color_depth(struct fb_var_screeninfo *var, | 625 | extern int fb_get_color_depth(struct fb_var_screeninfo *var, |
626 | struct fb_fix_screeninfo *fix); | 626 | struct fb_fix_screeninfo *fix); |
627 | extern int fb_get_options(char *name, char **option); | 627 | extern int fb_get_options(const char *name, char **option); |
628 | extern int fb_new_modelist(struct fb_info *info); | 628 | extern int fb_new_modelist(struct fb_info *info); |
629 | 629 | ||
630 | extern struct fb_info *registered_fb[FB_MAX]; | 630 | extern struct fb_info *registered_fb[FB_MAX]; |
diff --git a/include/linux/filter.h b/include/linux/filter.h index f65f5a69db8f..a6ac84871d6d 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
@@ -59,10 +59,10 @@ extern void bpf_jit_free(struct sk_filter *fp); | |||
59 | static inline void bpf_jit_dump(unsigned int flen, unsigned int proglen, | 59 | static inline void bpf_jit_dump(unsigned int flen, unsigned int proglen, |
60 | u32 pass, void *image) | 60 | u32 pass, void *image) |
61 | { | 61 | { |
62 | pr_err("flen=%u proglen=%u pass=%u image=%p\n", | 62 | pr_err("flen=%u proglen=%u pass=%u image=%pK\n", |
63 | flen, proglen, pass, image); | 63 | flen, proglen, pass, image); |
64 | if (image) | 64 | if (image) |
65 | print_hex_dump(KERN_ERR, "JIT code: ", DUMP_PREFIX_ADDRESS, | 65 | print_hex_dump(KERN_ERR, "JIT code: ", DUMP_PREFIX_OFFSET, |
66 | 16, 1, image, proglen, false); | 66 | 16, 1, image, proglen, false); |
67 | } | 67 | } |
68 | #define SK_RUN_FILTER(FILTER, SKB) (*FILTER->bpf_func)(SKB, FILTER->insns) | 68 | #define SK_RUN_FILTER(FILTER, SKB) (*FILTER->bpf_func)(SKB, FILTER->insns) |
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index 191501afd7fb..3b0e820375ab 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
@@ -251,8 +251,10 @@ struct ieee1394_device_id; | |||
251 | 251 | ||
252 | struct fw_driver { | 252 | struct fw_driver { |
253 | struct device_driver driver; | 253 | struct device_driver driver; |
254 | int (*probe)(struct fw_unit *unit, const struct ieee1394_device_id *id); | ||
254 | /* Called when the parent device sits through a bus reset. */ | 255 | /* Called when the parent device sits through a bus reset. */ |
255 | void (*update)(struct fw_unit *unit); | 256 | void (*update)(struct fw_unit *unit); |
257 | void (*remove)(struct fw_unit *unit); | ||
256 | const struct ieee1394_device_id *id_table; | 258 | const struct ieee1394_device_id *id_table; |
257 | }; | 259 | }; |
258 | 260 | ||
diff --git a/include/linux/freezer.h b/include/linux/freezer.h index e70df40d84f6..7fd81b8c4897 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h | |||
@@ -3,6 +3,7 @@ | |||
3 | #ifndef FREEZER_H_INCLUDED | 3 | #ifndef FREEZER_H_INCLUDED |
4 | #define FREEZER_H_INCLUDED | 4 | #define FREEZER_H_INCLUDED |
5 | 5 | ||
6 | #include <linux/debug_locks.h> | ||
6 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
7 | #include <linux/wait.h> | 8 | #include <linux/wait.h> |
8 | #include <linux/atomic.h> | 9 | #include <linux/atomic.h> |
@@ -46,7 +47,11 @@ extern int freeze_kernel_threads(void); | |||
46 | extern void thaw_processes(void); | 47 | extern void thaw_processes(void); |
47 | extern void thaw_kernel_threads(void); | 48 | extern void thaw_kernel_threads(void); |
48 | 49 | ||
49 | static inline bool try_to_freeze(void) | 50 | /* |
51 | * DO NOT ADD ANY NEW CALLERS OF THIS FUNCTION | ||
52 | * If try_to_freeze causes a lockdep warning it means the caller may deadlock | ||
53 | */ | ||
54 | static inline bool try_to_freeze_unsafe(void) | ||
50 | { | 55 | { |
51 | might_sleep(); | 56 | might_sleep(); |
52 | if (likely(!freezing(current))) | 57 | if (likely(!freezing(current))) |
@@ -54,6 +59,13 @@ static inline bool try_to_freeze(void) | |||
54 | return __refrigerator(false); | 59 | return __refrigerator(false); |
55 | } | 60 | } |
56 | 61 | ||
62 | static inline bool try_to_freeze(void) | ||
63 | { | ||
64 | if (!(current->flags & PF_NOFREEZE)) | ||
65 | debug_check_no_locks_held(); | ||
66 | return try_to_freeze_unsafe(); | ||
67 | } | ||
68 | |||
57 | extern bool freeze_task(struct task_struct *p); | 69 | extern bool freeze_task(struct task_struct *p); |
58 | extern bool set_freezable(void); | 70 | extern bool set_freezable(void); |
59 | 71 | ||
@@ -115,6 +127,14 @@ static inline void freezer_count(void) | |||
115 | try_to_freeze(); | 127 | try_to_freeze(); |
116 | } | 128 | } |
117 | 129 | ||
130 | /* DO NOT ADD ANY NEW CALLERS OF THIS FUNCTION */ | ||
131 | static inline void freezer_count_unsafe(void) | ||
132 | { | ||
133 | current->flags &= ~PF_FREEZER_SKIP; | ||
134 | smp_mb(); | ||
135 | try_to_freeze_unsafe(); | ||
136 | } | ||
137 | |||
118 | /** | 138 | /** |
119 | * freezer_should_skip - whether to skip a task when determining frozen | 139 | * freezer_should_skip - whether to skip a task when determining frozen |
120 | * state is reached | 140 | * state is reached |
@@ -139,28 +159,86 @@ static inline bool freezer_should_skip(struct task_struct *p) | |||
139 | } | 159 | } |
140 | 160 | ||
141 | /* | 161 | /* |
142 | * These macros are intended to be used whenever you want allow a sleeping | 162 | * These functions are intended to be used whenever you want allow a sleeping |
143 | * task to be frozen. Note that neither return any clear indication of | 163 | * task to be frozen. Note that neither return any clear indication of |
144 | * whether a freeze event happened while in this function. | 164 | * whether a freeze event happened while in this function. |
145 | */ | 165 | */ |
146 | 166 | ||
147 | /* Like schedule(), but should not block the freezer. */ | 167 | /* Like schedule(), but should not block the freezer. */ |
148 | #define freezable_schedule() \ | 168 | static inline void freezable_schedule(void) |
149 | ({ \ | 169 | { |
150 | freezer_do_not_count(); \ | 170 | freezer_do_not_count(); |
151 | schedule(); \ | 171 | schedule(); |
152 | freezer_count(); \ | 172 | freezer_count(); |
153 | }) | 173 | } |
174 | |||
175 | /* DO NOT ADD ANY NEW CALLERS OF THIS FUNCTION */ | ||
176 | static inline void freezable_schedule_unsafe(void) | ||
177 | { | ||
178 | freezer_do_not_count(); | ||
179 | schedule(); | ||
180 | freezer_count_unsafe(); | ||
181 | } | ||
182 | |||
183 | /* | ||
184 | * Like freezable_schedule_timeout(), but should not block the freezer. Do not | ||
185 | * call this with locks held. | ||
186 | */ | ||
187 | static inline long freezable_schedule_timeout(long timeout) | ||
188 | { | ||
189 | long __retval; | ||
190 | freezer_do_not_count(); | ||
191 | __retval = schedule_timeout(timeout); | ||
192 | freezer_count(); | ||
193 | return __retval; | ||
194 | } | ||
195 | |||
196 | /* | ||
197 | * Like schedule_timeout_interruptible(), but should not block the freezer. Do not | ||
198 | * call this with locks held. | ||
199 | */ | ||
200 | static inline long freezable_schedule_timeout_interruptible(long timeout) | ||
201 | { | ||
202 | long __retval; | ||
203 | freezer_do_not_count(); | ||
204 | __retval = schedule_timeout_interruptible(timeout); | ||
205 | freezer_count(); | ||
206 | return __retval; | ||
207 | } | ||
154 | 208 | ||
155 | /* Like schedule_timeout_killable(), but should not block the freezer. */ | 209 | /* Like schedule_timeout_killable(), but should not block the freezer. */ |
156 | #define freezable_schedule_timeout_killable(timeout) \ | 210 | static inline long freezable_schedule_timeout_killable(long timeout) |
157 | ({ \ | 211 | { |
158 | long __retval; \ | 212 | long __retval; |
159 | freezer_do_not_count(); \ | 213 | freezer_do_not_count(); |
160 | __retval = schedule_timeout_killable(timeout); \ | 214 | __retval = schedule_timeout_killable(timeout); |
161 | freezer_count(); \ | 215 | freezer_count(); |
162 | __retval; \ | 216 | return __retval; |
163 | }) | 217 | } |
218 | |||
219 | /* DO NOT ADD ANY NEW CALLERS OF THIS FUNCTION */ | ||
220 | static inline long freezable_schedule_timeout_killable_unsafe(long timeout) | ||
221 | { | ||
222 | long __retval; | ||
223 | freezer_do_not_count(); | ||
224 | __retval = schedule_timeout_killable(timeout); | ||
225 | freezer_count_unsafe(); | ||
226 | return __retval; | ||
227 | } | ||
228 | |||
229 | /* | ||
230 | * Like schedule_hrtimeout_range(), but should not block the freezer. Do not | ||
231 | * call this with locks held. | ||
232 | */ | ||
233 | static inline int freezable_schedule_hrtimeout_range(ktime_t *expires, | ||
234 | unsigned long delta, const enum hrtimer_mode mode) | ||
235 | { | ||
236 | int __retval; | ||
237 | freezer_do_not_count(); | ||
238 | __retval = schedule_hrtimeout_range(expires, delta, mode); | ||
239 | freezer_count(); | ||
240 | return __retval; | ||
241 | } | ||
164 | 242 | ||
165 | /* | 243 | /* |
166 | * Freezer-friendly wrappers around wait_event_interruptible(), | 244 | * Freezer-friendly wrappers around wait_event_interruptible(), |
@@ -177,33 +255,45 @@ static inline bool freezer_should_skip(struct task_struct *p) | |||
177 | __retval; \ | 255 | __retval; \ |
178 | }) | 256 | }) |
179 | 257 | ||
258 | /* DO NOT ADD ANY NEW CALLERS OF THIS FUNCTION */ | ||
259 | #define wait_event_freezekillable_unsafe(wq, condition) \ | ||
260 | ({ \ | ||
261 | int __retval; \ | ||
262 | freezer_do_not_count(); \ | ||
263 | __retval = wait_event_killable(wq, (condition)); \ | ||
264 | freezer_count_unsafe(); \ | ||
265 | __retval; \ | ||
266 | }) | ||
267 | |||
180 | #define wait_event_freezable(wq, condition) \ | 268 | #define wait_event_freezable(wq, condition) \ |
181 | ({ \ | 269 | ({ \ |
182 | int __retval; \ | 270 | int __retval; \ |
183 | for (;;) { \ | 271 | freezer_do_not_count(); \ |
184 | __retval = wait_event_interruptible(wq, \ | 272 | __retval = wait_event_interruptible(wq, (condition)); \ |
185 | (condition) || freezing(current)); \ | 273 | freezer_count(); \ |
186 | if (__retval || (condition)) \ | ||
187 | break; \ | ||
188 | try_to_freeze(); \ | ||
189 | } \ | ||
190 | __retval; \ | 274 | __retval; \ |
191 | }) | 275 | }) |
192 | 276 | ||
193 | #define wait_event_freezable_timeout(wq, condition, timeout) \ | 277 | #define wait_event_freezable_timeout(wq, condition, timeout) \ |
194 | ({ \ | 278 | ({ \ |
195 | long __retval = timeout; \ | 279 | long __retval = timeout; \ |
196 | for (;;) { \ | 280 | freezer_do_not_count(); \ |
197 | __retval = wait_event_interruptible_timeout(wq, \ | 281 | __retval = wait_event_interruptible_timeout(wq, (condition), \ |
198 | (condition) || freezing(current), \ | 282 | __retval); \ |
199 | __retval); \ | 283 | freezer_count(); \ |
200 | if (__retval <= 0 || (condition)) \ | ||
201 | break; \ | ||
202 | try_to_freeze(); \ | ||
203 | } \ | ||
204 | __retval; \ | 284 | __retval; \ |
205 | }) | 285 | }) |
206 | 286 | ||
287 | #define wait_event_freezable_exclusive(wq, condition) \ | ||
288 | ({ \ | ||
289 | int __retval; \ | ||
290 | freezer_do_not_count(); \ | ||
291 | __retval = wait_event_interruptible_exclusive(wq, condition); \ | ||
292 | freezer_count(); \ | ||
293 | __retval; \ | ||
294 | }) | ||
295 | |||
296 | |||
207 | #else /* !CONFIG_FREEZER */ | 297 | #else /* !CONFIG_FREEZER */ |
208 | static inline bool frozen(struct task_struct *p) { return false; } | 298 | static inline bool frozen(struct task_struct *p) { return false; } |
209 | static inline bool freezing(struct task_struct *p) { return false; } | 299 | static inline bool freezing(struct task_struct *p) { return false; } |
@@ -225,18 +315,37 @@ static inline void set_freezable(void) {} | |||
225 | 315 | ||
226 | #define freezable_schedule() schedule() | 316 | #define freezable_schedule() schedule() |
227 | 317 | ||
318 | #define freezable_schedule_unsafe() schedule() | ||
319 | |||
320 | #define freezable_schedule_timeout(timeout) schedule_timeout(timeout) | ||
321 | |||
322 | #define freezable_schedule_timeout_interruptible(timeout) \ | ||
323 | schedule_timeout_interruptible(timeout) | ||
324 | |||
228 | #define freezable_schedule_timeout_killable(timeout) \ | 325 | #define freezable_schedule_timeout_killable(timeout) \ |
229 | schedule_timeout_killable(timeout) | 326 | schedule_timeout_killable(timeout) |
230 | 327 | ||
328 | #define freezable_schedule_timeout_killable_unsafe(timeout) \ | ||
329 | schedule_timeout_killable(timeout) | ||
330 | |||
331 | #define freezable_schedule_hrtimeout_range(expires, delta, mode) \ | ||
332 | schedule_hrtimeout_range(expires, delta, mode) | ||
333 | |||
231 | #define wait_event_freezable(wq, condition) \ | 334 | #define wait_event_freezable(wq, condition) \ |
232 | wait_event_interruptible(wq, condition) | 335 | wait_event_interruptible(wq, condition) |
233 | 336 | ||
234 | #define wait_event_freezable_timeout(wq, condition, timeout) \ | 337 | #define wait_event_freezable_timeout(wq, condition, timeout) \ |
235 | wait_event_interruptible_timeout(wq, condition, timeout) | 338 | wait_event_interruptible_timeout(wq, condition, timeout) |
236 | 339 | ||
340 | #define wait_event_freezable_exclusive(wq, condition) \ | ||
341 | wait_event_interruptible_exclusive(wq, condition) | ||
342 | |||
237 | #define wait_event_freezekillable(wq, condition) \ | 343 | #define wait_event_freezekillable(wq, condition) \ |
238 | wait_event_killable(wq, condition) | 344 | wait_event_killable(wq, condition) |
239 | 345 | ||
346 | #define wait_event_freezekillable_unsafe(wq, condition) \ | ||
347 | wait_event_killable(wq, condition) | ||
348 | |||
240 | #endif /* !CONFIG_FREEZER */ | 349 | #endif /* !CONFIG_FREEZER */ |
241 | 350 | ||
242 | #endif /* FREEZER_H_INCLUDED */ | 351 | #endif /* FREEZER_H_INCLUDED */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index f8a5240541b7..a35b10e9a680 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -372,14 +372,15 @@ struct address_space_operations { | |||
372 | int (*get_xip_mem)(struct address_space *, pgoff_t, int, | 372 | int (*get_xip_mem)(struct address_space *, pgoff_t, int, |
373 | void **, unsigned long *); | 373 | void **, unsigned long *); |
374 | /* | 374 | /* |
375 | * migrate the contents of a page to the specified target. If sync | 375 | * migrate the contents of a page to the specified target. If |
376 | * is false, it must not block. | 376 | * migrate_mode is MIGRATE_ASYNC, it must not block. |
377 | */ | 377 | */ |
378 | int (*migratepage) (struct address_space *, | 378 | int (*migratepage) (struct address_space *, |
379 | struct page *, struct page *, enum migrate_mode); | 379 | struct page *, struct page *, enum migrate_mode); |
380 | int (*launder_page) (struct page *); | 380 | int (*launder_page) (struct page *); |
381 | int (*is_partially_uptodate) (struct page *, read_descriptor_t *, | 381 | int (*is_partially_uptodate) (struct page *, read_descriptor_t *, |
382 | unsigned long); | 382 | unsigned long); |
383 | void (*is_dirty_writeback) (struct page *, bool *, bool *); | ||
383 | int (*error_remove_page)(struct address_space *, struct page *); | 384 | int (*error_remove_page)(struct address_space *, struct page *); |
384 | 385 | ||
385 | /* swapfile support */ | 386 | /* swapfile support */ |
@@ -908,6 +909,7 @@ struct file_lock_operations { | |||
908 | 909 | ||
909 | struct lock_manager_operations { | 910 | struct lock_manager_operations { |
910 | int (*lm_compare_owner)(struct file_lock *, struct file_lock *); | 911 | int (*lm_compare_owner)(struct file_lock *, struct file_lock *); |
912 | unsigned long (*lm_owner_key)(struct file_lock *); | ||
911 | void (*lm_notify)(struct file_lock *); /* unblock callback */ | 913 | void (*lm_notify)(struct file_lock *); /* unblock callback */ |
912 | int (*lm_grant)(struct file_lock *, struct file_lock *, int); | 914 | int (*lm_grant)(struct file_lock *, struct file_lock *, int); |
913 | void (*lm_break)(struct file_lock *); | 915 | void (*lm_break)(struct file_lock *); |
@@ -926,14 +928,33 @@ int locks_in_grace(struct net *); | |||
926 | /* that will die - we need it for nfs_lock_info */ | 928 | /* that will die - we need it for nfs_lock_info */ |
927 | #include <linux/nfs_fs_i.h> | 929 | #include <linux/nfs_fs_i.h> |
928 | 930 | ||
931 | /* | ||
932 | * struct file_lock represents a generic "file lock". It's used to represent | ||
933 | * POSIX byte range locks, BSD (flock) locks, and leases. It's important to | ||
934 | * note that the same struct is used to represent both a request for a lock and | ||
935 | * the lock itself, but the same object is never used for both. | ||
936 | * | ||
937 | * FIXME: should we create a separate "struct lock_request" to help distinguish | ||
938 | * these two uses? | ||
939 | * | ||
940 | * The i_flock list is ordered by: | ||
941 | * | ||
942 | * 1) lock type -- FL_LEASEs first, then FL_FLOCK, and finally FL_POSIX | ||
943 | * 2) lock owner | ||
944 | * 3) lock range start | ||
945 | * 4) lock range end | ||
946 | * | ||
947 | * Obviously, the last two criteria only matter for POSIX locks. | ||
948 | */ | ||
929 | struct file_lock { | 949 | struct file_lock { |
930 | struct file_lock *fl_next; /* singly linked list for this inode */ | 950 | struct file_lock *fl_next; /* singly linked list for this inode */ |
931 | struct list_head fl_link; /* doubly linked list of all locks */ | 951 | struct hlist_node fl_link; /* node in global lists */ |
932 | struct list_head fl_block; /* circular list of blocked processes */ | 952 | struct list_head fl_block; /* circular list of blocked processes */ |
933 | fl_owner_t fl_owner; | 953 | fl_owner_t fl_owner; |
934 | unsigned int fl_flags; | 954 | unsigned int fl_flags; |
935 | unsigned char fl_type; | 955 | unsigned char fl_type; |
936 | unsigned int fl_pid; | 956 | unsigned int fl_pid; |
957 | int fl_link_cpu; /* what cpu's list is this on? */ | ||
937 | struct pid *fl_nspid; | 958 | struct pid *fl_nspid; |
938 | wait_queue_head_t fl_wait; | 959 | wait_queue_head_t fl_wait; |
939 | struct file *fl_file; | 960 | struct file *fl_file; |
@@ -994,7 +1015,7 @@ extern void locks_release_private(struct file_lock *); | |||
994 | extern void posix_test_lock(struct file *, struct file_lock *); | 1015 | extern void posix_test_lock(struct file *, struct file_lock *); |
995 | extern int posix_lock_file(struct file *, struct file_lock *, struct file_lock *); | 1016 | extern int posix_lock_file(struct file *, struct file_lock *, struct file_lock *); |
996 | extern int posix_lock_file_wait(struct file *, struct file_lock *); | 1017 | extern int posix_lock_file_wait(struct file *, struct file_lock *); |
997 | extern int posix_unblock_lock(struct file *, struct file_lock *); | 1018 | extern int posix_unblock_lock(struct file_lock *); |
998 | extern int vfs_test_lock(struct file *, struct file_lock *); | 1019 | extern int vfs_test_lock(struct file *, struct file_lock *); |
999 | extern int vfs_lock_file(struct file *, unsigned int, struct file_lock *, struct file_lock *); | 1020 | extern int vfs_lock_file(struct file *, unsigned int, struct file_lock *, struct file_lock *); |
1000 | extern int vfs_cancel_lock(struct file *filp, struct file_lock *fl); | 1021 | extern int vfs_cancel_lock(struct file *filp, struct file_lock *fl); |
@@ -1006,9 +1027,6 @@ extern int vfs_setlease(struct file *, long, struct file_lock **); | |||
1006 | extern int lease_modify(struct file_lock **, int); | 1027 | extern int lease_modify(struct file_lock **, int); |
1007 | extern int lock_may_read(struct inode *, loff_t start, unsigned long count); | 1028 | extern int lock_may_read(struct inode *, loff_t start, unsigned long count); |
1008 | extern int lock_may_write(struct inode *, loff_t start, unsigned long count); | 1029 | extern int lock_may_write(struct inode *, loff_t start, unsigned long count); |
1009 | extern void locks_delete_block(struct file_lock *waiter); | ||
1010 | extern void lock_flocks(void); | ||
1011 | extern void unlock_flocks(void); | ||
1012 | #else /* !CONFIG_FILE_LOCKING */ | 1030 | #else /* !CONFIG_FILE_LOCKING */ |
1013 | static inline int fcntl_getlk(struct file *file, struct flock __user *user) | 1031 | static inline int fcntl_getlk(struct file *file, struct flock __user *user) |
1014 | { | 1032 | { |
@@ -1084,8 +1102,7 @@ static inline int posix_lock_file_wait(struct file *filp, struct file_lock *fl) | |||
1084 | return -ENOLCK; | 1102 | return -ENOLCK; |
1085 | } | 1103 | } |
1086 | 1104 | ||
1087 | static inline int posix_unblock_lock(struct file *filp, | 1105 | static inline int posix_unblock_lock(struct file_lock *waiter) |
1088 | struct file_lock *waiter) | ||
1089 | { | 1106 | { |
1090 | return -ENOENT; | 1107 | return -ENOENT; |
1091 | } | 1108 | } |
@@ -1150,19 +1167,6 @@ static inline int lock_may_write(struct inode *inode, loff_t start, | |||
1150 | { | 1167 | { |
1151 | return 1; | 1168 | return 1; |
1152 | } | 1169 | } |
1153 | |||
1154 | static inline void locks_delete_block(struct file_lock *waiter) | ||
1155 | { | ||
1156 | } | ||
1157 | |||
1158 | static inline void lock_flocks(void) | ||
1159 | { | ||
1160 | } | ||
1161 | |||
1162 | static inline void unlock_flocks(void) | ||
1163 | { | ||
1164 | } | ||
1165 | |||
1166 | #endif /* !CONFIG_FILE_LOCKING */ | 1170 | #endif /* !CONFIG_FILE_LOCKING */ |
1167 | 1171 | ||
1168 | 1172 | ||
@@ -1580,6 +1584,7 @@ struct inode_operations { | |||
1580 | int (*atomic_open)(struct inode *, struct dentry *, | 1584 | int (*atomic_open)(struct inode *, struct dentry *, |
1581 | struct file *, unsigned open_flag, | 1585 | struct file *, unsigned open_flag, |
1582 | umode_t create_mode, int *opened); | 1586 | umode_t create_mode, int *opened); |
1587 | int (*tmpfile) (struct inode *, struct dentry *, umode_t); | ||
1583 | } ____cacheline_aligned; | 1588 | } ____cacheline_aligned; |
1584 | 1589 | ||
1585 | ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, | 1590 | ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, |
@@ -1743,6 +1748,7 @@ struct super_operations { | |||
1743 | #define I_REFERENCED (1 << 8) | 1748 | #define I_REFERENCED (1 << 8) |
1744 | #define __I_DIO_WAKEUP 9 | 1749 | #define __I_DIO_WAKEUP 9 |
1745 | #define I_DIO_WAKEUP (1 << I_DIO_WAKEUP) | 1750 | #define I_DIO_WAKEUP (1 << I_DIO_WAKEUP) |
1751 | #define I_LINKABLE (1 << 10) | ||
1746 | 1752 | ||
1747 | #define I_DIRTY (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_PAGES) | 1753 | #define I_DIRTY (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_PAGES) |
1748 | 1754 | ||
@@ -1896,7 +1902,6 @@ extern int current_umask(void); | |||
1896 | extern struct kobject *fs_kobj; | 1902 | extern struct kobject *fs_kobj; |
1897 | 1903 | ||
1898 | #define MAX_RW_COUNT (INT_MAX & PAGE_CACHE_MASK) | 1904 | #define MAX_RW_COUNT (INT_MAX & PAGE_CACHE_MASK) |
1899 | extern int rw_verify_area(int, struct file *, loff_t *, size_t); | ||
1900 | 1905 | ||
1901 | #define FLOCK_VERIFY_READ 1 | 1906 | #define FLOCK_VERIFY_READ 1 |
1902 | #define FLOCK_VERIFY_WRITE 2 | 1907 | #define FLOCK_VERIFY_WRITE 2 |
@@ -2309,7 +2314,6 @@ extern struct file * open_exec(const char *); | |||
2309 | /* fs/dcache.c -- generic fs support functions */ | 2314 | /* fs/dcache.c -- generic fs support functions */ |
2310 | extern int is_subdir(struct dentry *, struct dentry *); | 2315 | extern int is_subdir(struct dentry *, struct dentry *); |
2311 | extern int path_is_under(struct path *, struct path *); | 2316 | extern int path_is_under(struct path *, struct path *); |
2312 | extern ino_t find_inode_number(struct dentry *, struct qstr *); | ||
2313 | 2317 | ||
2314 | #include <linux/err.h> | 2318 | #include <linux/err.h> |
2315 | 2319 | ||
@@ -2424,9 +2428,12 @@ extern void | |||
2424 | file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); | 2428 | file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); |
2425 | extern loff_t noop_llseek(struct file *file, loff_t offset, int whence); | 2429 | extern loff_t noop_llseek(struct file *file, loff_t offset, int whence); |
2426 | extern loff_t no_llseek(struct file *file, loff_t offset, int whence); | 2430 | extern loff_t no_llseek(struct file *file, loff_t offset, int whence); |
2431 | extern loff_t vfs_setpos(struct file *file, loff_t offset, loff_t maxsize); | ||
2427 | extern loff_t generic_file_llseek(struct file *file, loff_t offset, int whence); | 2432 | extern loff_t generic_file_llseek(struct file *file, loff_t offset, int whence); |
2428 | extern loff_t generic_file_llseek_size(struct file *file, loff_t offset, | 2433 | extern loff_t generic_file_llseek_size(struct file *file, loff_t offset, |
2429 | int whence, loff_t maxsize, loff_t eof); | 2434 | int whence, loff_t maxsize, loff_t eof); |
2435 | extern loff_t fixed_size_llseek(struct file *file, loff_t offset, | ||
2436 | int whence, loff_t size); | ||
2430 | extern int generic_file_open(struct inode * inode, struct file * filp); | 2437 | extern int generic_file_open(struct inode * inode, struct file * filp); |
2431 | extern int nonseekable_open(struct inode * inode, struct file * filp); | 2438 | extern int nonseekable_open(struct inode * inode, struct file * filp); |
2432 | 2439 | ||
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index a78680a92dba..1c804b057fb1 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
@@ -38,7 +38,7 @@ static inline int fsnotify_parent(struct path *path, struct dentry *dentry, __u3 | |||
38 | static inline int fsnotify_perm(struct file *file, int mask) | 38 | static inline int fsnotify_perm(struct file *file, int mask) |
39 | { | 39 | { |
40 | struct path *path = &file->f_path; | 40 | struct path *path = &file->f_path; |
41 | struct inode *inode = path->dentry->d_inode; | 41 | struct inode *inode = file_inode(file); |
42 | __u32 fsnotify_mask = 0; | 42 | __u32 fsnotify_mask = 0; |
43 | int ret; | 43 | int ret; |
44 | 44 | ||
@@ -192,7 +192,7 @@ static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry) | |||
192 | static inline void fsnotify_access(struct file *file) | 192 | static inline void fsnotify_access(struct file *file) |
193 | { | 193 | { |
194 | struct path *path = &file->f_path; | 194 | struct path *path = &file->f_path; |
195 | struct inode *inode = path->dentry->d_inode; | 195 | struct inode *inode = file_inode(file); |
196 | __u32 mask = FS_ACCESS; | 196 | __u32 mask = FS_ACCESS; |
197 | 197 | ||
198 | if (S_ISDIR(inode->i_mode)) | 198 | if (S_ISDIR(inode->i_mode)) |
@@ -210,7 +210,7 @@ static inline void fsnotify_access(struct file *file) | |||
210 | static inline void fsnotify_modify(struct file *file) | 210 | static inline void fsnotify_modify(struct file *file) |
211 | { | 211 | { |
212 | struct path *path = &file->f_path; | 212 | struct path *path = &file->f_path; |
213 | struct inode *inode = path->dentry->d_inode; | 213 | struct inode *inode = file_inode(file); |
214 | __u32 mask = FS_MODIFY; | 214 | __u32 mask = FS_MODIFY; |
215 | 215 | ||
216 | if (S_ISDIR(inode->i_mode)) | 216 | if (S_ISDIR(inode->i_mode)) |
@@ -228,7 +228,7 @@ static inline void fsnotify_modify(struct file *file) | |||
228 | static inline void fsnotify_open(struct file *file) | 228 | static inline void fsnotify_open(struct file *file) |
229 | { | 229 | { |
230 | struct path *path = &file->f_path; | 230 | struct path *path = &file->f_path; |
231 | struct inode *inode = path->dentry->d_inode; | 231 | struct inode *inode = file_inode(file); |
232 | __u32 mask = FS_OPEN; | 232 | __u32 mask = FS_OPEN; |
233 | 233 | ||
234 | if (S_ISDIR(inode->i_mode)) | 234 | if (S_ISDIR(inode->i_mode)) |
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 99d0fbcbaf79..9f15c0064c50 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -566,10 +566,6 @@ static inline ssize_t ftrace_filter_write(struct file *file, const char __user * | |||
566 | size_t cnt, loff_t *ppos) { return -ENODEV; } | 566 | size_t cnt, loff_t *ppos) { return -ENODEV; } |
567 | static inline ssize_t ftrace_notrace_write(struct file *file, const char __user *ubuf, | 567 | static inline ssize_t ftrace_notrace_write(struct file *file, const char __user *ubuf, |
568 | size_t cnt, loff_t *ppos) { return -ENODEV; } | 568 | size_t cnt, loff_t *ppos) { return -ENODEV; } |
569 | static inline loff_t ftrace_regex_lseek(struct file *file, loff_t offset, int whence) | ||
570 | { | ||
571 | return -ENODEV; | ||
572 | } | ||
573 | static inline int | 569 | static inline int |
574 | ftrace_regex_release(struct inode *inode, struct file *file) { return -ENODEV; } | 570 | ftrace_regex_release(struct inode *inode, struct file *file) { return -ENODEV; } |
575 | #endif /* CONFIG_DYNAMIC_FTRACE */ | 571 | #endif /* CONFIG_DYNAMIC_FTRACE */ |
@@ -828,10 +824,15 @@ enum ftrace_dump_mode; | |||
828 | 824 | ||
829 | extern enum ftrace_dump_mode ftrace_dump_on_oops; | 825 | extern enum ftrace_dump_mode ftrace_dump_on_oops; |
830 | 826 | ||
827 | extern void disable_trace_on_warning(void); | ||
828 | extern int __disable_trace_on_warning; | ||
829 | |||
831 | #ifdef CONFIG_PREEMPT | 830 | #ifdef CONFIG_PREEMPT |
832 | #define INIT_TRACE_RECURSION .trace_recursion = 0, | 831 | #define INIT_TRACE_RECURSION .trace_recursion = 0, |
833 | #endif | 832 | #endif |
834 | 833 | ||
834 | #else /* CONFIG_TRACING */ | ||
835 | static inline void disable_trace_on_warning(void) { } | ||
835 | #endif /* CONFIG_TRACING */ | 836 | #endif /* CONFIG_TRACING */ |
836 | 837 | ||
837 | #ifndef INIT_TRACE_RECURSION | 838 | #ifndef INIT_TRACE_RECURSION |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 0f615eb23d05..9b4dd491f7e8 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -209,7 +209,7 @@ static inline int allocflags_to_migratetype(gfp_t gfp_flags) | |||
209 | * 0x9 => DMA or NORMAL (MOVABLE+DMA) | 209 | * 0x9 => DMA or NORMAL (MOVABLE+DMA) |
210 | * 0xa => MOVABLE (Movable is valid only if HIGHMEM is set too) | 210 | * 0xa => MOVABLE (Movable is valid only if HIGHMEM is set too) |
211 | * 0xb => BAD (MOVABLE+HIGHMEM+DMA) | 211 | * 0xb => BAD (MOVABLE+HIGHMEM+DMA) |
212 | * 0xc => DMA32 (MOVABLE+HIGHMEM+DMA32) | 212 | * 0xc => DMA32 (MOVABLE+DMA32) |
213 | * 0xd => BAD (MOVABLE+DMA32+DMA) | 213 | * 0xd => BAD (MOVABLE+DMA32+DMA) |
214 | * 0xe => BAD (MOVABLE+DMA32+HIGHMEM) | 214 | * 0xe => BAD (MOVABLE+DMA32+HIGHMEM) |
215 | * 0xf => BAD (MOVABLE+DMA32+HIGHMEM+DMA) | 215 | * 0xf => BAD (MOVABLE+DMA32+HIGHMEM+DMA) |
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h index 528454c2caa9..b60de92e2edc 100644 --- a/include/linux/huge_mm.h +++ b/include/linux/huge_mm.h | |||
@@ -60,9 +60,9 @@ extern pmd_t *page_check_address_pmd(struct page *page, | |||
60 | #define HPAGE_PMD_NR (1<<HPAGE_PMD_ORDER) | 60 | #define HPAGE_PMD_NR (1<<HPAGE_PMD_ORDER) |
61 | 61 | ||
62 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 62 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
63 | #define HPAGE_PMD_SHIFT HPAGE_SHIFT | 63 | #define HPAGE_PMD_SHIFT PMD_SHIFT |
64 | #define HPAGE_PMD_MASK HPAGE_MASK | 64 | #define HPAGE_PMD_SIZE ((1UL) << HPAGE_PMD_SHIFT) |
65 | #define HPAGE_PMD_SIZE HPAGE_SIZE | 65 | #define HPAGE_PMD_MASK (~(HPAGE_PMD_SIZE - 1)) |
66 | 66 | ||
67 | extern bool is_vma_temporary_stack(struct vm_area_struct *vma); | 67 | extern bool is_vma_temporary_stack(struct vm_area_struct *vma); |
68 | 68 | ||
@@ -123,7 +123,7 @@ extern void __split_huge_page_pmd(struct vm_area_struct *vma, | |||
123 | } while (0) | 123 | } while (0) |
124 | extern void split_huge_page_pmd_mm(struct mm_struct *mm, unsigned long address, | 124 | extern void split_huge_page_pmd_mm(struct mm_struct *mm, unsigned long address, |
125 | pmd_t *pmd); | 125 | pmd_t *pmd); |
126 | #if HPAGE_PMD_ORDER > MAX_ORDER | 126 | #if HPAGE_PMD_ORDER >= MAX_ORDER |
127 | #error "hugepages can't be allocated by the buddy allocator" | 127 | #error "hugepages can't be allocated by the buddy allocator" |
128 | #endif | 128 | #endif |
129 | extern int hugepage_madvise(struct vm_area_struct *vma, | 129 | extern int hugepage_madvise(struct vm_area_struct *vma, |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index feaf0c7fb7d8..c2b1801a160b 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -55,7 +55,6 @@ void __unmap_hugepage_range_final(struct mmu_gather *tlb, | |||
55 | void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, | 55 | void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, |
56 | unsigned long start, unsigned long end, | 56 | unsigned long start, unsigned long end, |
57 | struct page *ref_page); | 57 | struct page *ref_page); |
58 | int hugetlb_prefault(struct address_space *, struct vm_area_struct *); | ||
59 | void hugetlb_report_meminfo(struct seq_file *); | 58 | void hugetlb_report_meminfo(struct seq_file *); |
60 | int hugetlb_report_node_meminfo(int, char *); | 59 | int hugetlb_report_node_meminfo(int, char *); |
61 | void hugetlb_show_meminfo(void); | 60 | void hugetlb_show_meminfo(void); |
@@ -69,6 +68,10 @@ void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); | |||
69 | int dequeue_hwpoisoned_huge_page(struct page *page); | 68 | int dequeue_hwpoisoned_huge_page(struct page *page); |
70 | void copy_huge_page(struct page *dst, struct page *src); | 69 | void copy_huge_page(struct page *dst, struct page *src); |
71 | 70 | ||
71 | #ifdef CONFIG_ARCH_WANT_HUGE_PMD_SHARE | ||
72 | pte_t *huge_pmd_share(struct mm_struct *mm, unsigned long addr, pud_t *pud); | ||
73 | #endif | ||
74 | |||
72 | extern unsigned long hugepages_treat_as_movable; | 75 | extern unsigned long hugepages_treat_as_movable; |
73 | extern const unsigned long hugetlb_zero, hugetlb_infinity; | 76 | extern const unsigned long hugetlb_zero, hugetlb_infinity; |
74 | extern int sysctl_hugetlb_shm_group; | 77 | extern int sysctl_hugetlb_shm_group; |
@@ -110,7 +113,6 @@ static inline unsigned long hugetlb_total_pages(void) | |||
110 | #define follow_hugetlb_page(m,v,p,vs,a,b,i,w) ({ BUG(); 0; }) | 113 | #define follow_hugetlb_page(m,v,p,vs,a,b,i,w) ({ BUG(); 0; }) |
111 | #define follow_huge_addr(mm, addr, write) ERR_PTR(-EINVAL) | 114 | #define follow_huge_addr(mm, addr, write) ERR_PTR(-EINVAL) |
112 | #define copy_hugetlb_page_range(src, dst, vma) ({ BUG(); 0; }) | 115 | #define copy_hugetlb_page_range(src, dst, vma) ({ BUG(); 0; }) |
113 | #define hugetlb_prefault(mapping, vma) ({ BUG(); 0; }) | ||
114 | static inline void hugetlb_report_meminfo(struct seq_file *m) | 116 | static inline void hugetlb_report_meminfo(struct seq_file *m) |
115 | { | 117 | { |
116 | } | 118 | } |
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index 488debbef895..81cbbdb96aae 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
@@ -658,7 +658,6 @@ struct twl4030_power_data { | |||
658 | bool use_poweroff; /* Board is wired for TWL poweroff */ | 658 | bool use_poweroff; /* Board is wired for TWL poweroff */ |
659 | }; | 659 | }; |
660 | 660 | ||
661 | extern void twl4030_power_init(struct twl4030_power_data *triton2_scripts); | ||
662 | extern int twl4030_remove_script(u8 flags); | 661 | extern int twl4030_remove_script(u8 flags); |
663 | extern void twl4030_power_off(void); | 662 | extern void twl4030_power_off(void); |
664 | 663 | ||
@@ -726,7 +725,7 @@ struct twl4030_platform_data { | |||
726 | struct regulator_init_data *clk32kg; | 725 | struct regulator_init_data *clk32kg; |
727 | struct regulator_init_data *v1v8; | 726 | struct regulator_init_data *v1v8; |
728 | struct regulator_init_data *v2v1; | 727 | struct regulator_init_data *v2v1; |
729 | /* TWL6025 LDO regulators */ | 728 | /* TWL6032 LDO regulators */ |
730 | struct regulator_init_data *ldo1; | 729 | struct regulator_init_data *ldo1; |
731 | struct regulator_init_data *ldo2; | 730 | struct regulator_init_data *ldo2; |
732 | struct regulator_init_data *ldo3; | 731 | struct regulator_init_data *ldo3; |
@@ -736,7 +735,7 @@ struct twl4030_platform_data { | |||
736 | struct regulator_init_data *ldo7; | 735 | struct regulator_init_data *ldo7; |
737 | struct regulator_init_data *ldoln; | 736 | struct regulator_init_data *ldoln; |
738 | struct regulator_init_data *ldousb; | 737 | struct regulator_init_data *ldousb; |
739 | /* TWL6025 DCDC regulators */ | 738 | /* TWL6032 DCDC regulators */ |
740 | struct regulator_init_data *smps3; | 739 | struct regulator_init_data *smps3; |
741 | struct regulator_init_data *smps4; | 740 | struct regulator_init_data *smps4; |
742 | struct regulator_init_data *vio6025; | 741 | struct regulator_init_data *vio6025; |
@@ -753,7 +752,7 @@ struct twl_regulator_driver_data { | |||
753 | #define TPS_SUBSET BIT(1) /* tps659[23]0 have fewer LDOs */ | 752 | #define TPS_SUBSET BIT(1) /* tps659[23]0 have fewer LDOs */ |
754 | #define TWL5031 BIT(2) /* twl5031 has different registers */ | 753 | #define TWL5031 BIT(2) /* twl5031 has different registers */ |
755 | #define TWL6030_CLASS BIT(3) /* TWL6030 class */ | 754 | #define TWL6030_CLASS BIT(3) /* TWL6030 class */ |
756 | #define TWL6025_SUBCLASS BIT(4) /* TWL6025 has changed registers */ | 755 | #define TWL6032_SUBCLASS BIT(4) /* TWL6032 has changed registers */ |
757 | #define TWL4030_ALLOW_UNSUPPORTED BIT(5) /* Some voltages are possible | 756 | #define TWL4030_ALLOW_UNSUPPORTED BIT(5) /* Some voltages are possible |
758 | * but not officially supported. | 757 | * but not officially supported. |
759 | * This flag is necessary to | 758 | * This flag is necessary to |
@@ -840,20 +839,20 @@ static inline int twl4030charger_usb_en(int enable) { return 0; } | |||
840 | #define TWL6030_REG_CLK32KG 48 | 839 | #define TWL6030_REG_CLK32KG 48 |
841 | 840 | ||
842 | /* LDOs on 6025 have different names */ | 841 | /* LDOs on 6025 have different names */ |
843 | #define TWL6025_REG_LDO2 49 | 842 | #define TWL6032_REG_LDO2 49 |
844 | #define TWL6025_REG_LDO4 50 | 843 | #define TWL6032_REG_LDO4 50 |
845 | #define TWL6025_REG_LDO3 51 | 844 | #define TWL6032_REG_LDO3 51 |
846 | #define TWL6025_REG_LDO5 52 | 845 | #define TWL6032_REG_LDO5 52 |
847 | #define TWL6025_REG_LDO1 53 | 846 | #define TWL6032_REG_LDO1 53 |
848 | #define TWL6025_REG_LDO7 54 | 847 | #define TWL6032_REG_LDO7 54 |
849 | #define TWL6025_REG_LDO6 55 | 848 | #define TWL6032_REG_LDO6 55 |
850 | #define TWL6025_REG_LDOLN 56 | 849 | #define TWL6032_REG_LDOLN 56 |
851 | #define TWL6025_REG_LDOUSB 57 | 850 | #define TWL6032_REG_LDOUSB 57 |
852 | 851 | ||
853 | /* 6025 DCDC supplies */ | 852 | /* 6025 DCDC supplies */ |
854 | #define TWL6025_REG_SMPS3 58 | 853 | #define TWL6032_REG_SMPS3 58 |
855 | #define TWL6025_REG_SMPS4 59 | 854 | #define TWL6032_REG_SMPS4 59 |
856 | #define TWL6025_REG_VIO 60 | 855 | #define TWL6032_REG_VIO 60 |
857 | 856 | ||
858 | 857 | ||
859 | #endif /* End of __TWL4030_H */ | 858 | #endif /* End of __TWL4030_H */ |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 06b0ed0154a4..b0dc87a2a376 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -146,6 +146,7 @@ static inline u16 ieee80211_sn_sub(u16 sn1, u16 sn2) | |||
146 | #define IEEE80211_MAX_RTS_THRESHOLD 2353 | 146 | #define IEEE80211_MAX_RTS_THRESHOLD 2353 |
147 | #define IEEE80211_MAX_AID 2007 | 147 | #define IEEE80211_MAX_AID 2007 |
148 | #define IEEE80211_MAX_TIM_LEN 251 | 148 | #define IEEE80211_MAX_TIM_LEN 251 |
149 | #define IEEE80211_MAX_MESH_PEERINGS 63 | ||
149 | /* Maximum size for the MA-UNITDATA primitive, 802.11 standard section | 150 | /* Maximum size for the MA-UNITDATA primitive, 802.11 standard section |
150 | 6.2.1.1.2. | 151 | 6.2.1.1.2. |
151 | 152 | ||
@@ -1829,6 +1830,15 @@ enum ieee80211_key_len { | |||
1829 | WLAN_KEY_LEN_AES_CMAC = 16, | 1830 | WLAN_KEY_LEN_AES_CMAC = 16, |
1830 | }; | 1831 | }; |
1831 | 1832 | ||
1833 | #define IEEE80211_WEP_IV_LEN 4 | ||
1834 | #define IEEE80211_WEP_ICV_LEN 4 | ||
1835 | #define IEEE80211_CCMP_HDR_LEN 8 | ||
1836 | #define IEEE80211_CCMP_MIC_LEN 8 | ||
1837 | #define IEEE80211_CCMP_PN_LEN 6 | ||
1838 | #define IEEE80211_TKIP_IV_LEN 8 | ||
1839 | #define IEEE80211_TKIP_ICV_LEN 4 | ||
1840 | #define IEEE80211_CMAC_PN_LEN 6 | ||
1841 | |||
1832 | /* Public action codes */ | 1842 | /* Public action codes */ |
1833 | enum ieee80211_pub_actioncode { | 1843 | enum ieee80211_pub_actioncode { |
1834 | WLAN_PUB_ACTION_EXT_CHANSW_ANN = 4, | 1844 | WLAN_PUB_ACTION_EXT_CHANSW_ANN = 4, |
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index c3f817c3eb45..a86784dec3d3 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
@@ -12,5 +12,6 @@ struct ifla_vf_info { | |||
12 | __u32 qos; | 12 | __u32 qos; |
13 | __u32 tx_rate; | 13 | __u32 tx_rate; |
14 | __u32 spoofchk; | 14 | __u32 spoofchk; |
15 | __u32 linkstate; | ||
15 | }; | 16 | }; |
16 | #endif /* _LINUX_IF_LINK_H */ | 17 | #endif /* _LINUX_IF_LINK_H */ |
diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h index 84dde1dd1da4..ddd33fd5904d 100644 --- a/include/linux/if_macvlan.h +++ b/include/linux/if_macvlan.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #include <net/netlink.h> | 8 | #include <net/netlink.h> |
9 | #include <linux/u64_stats_sync.h> | 9 | #include <linux/u64_stats_sync.h> |
10 | 10 | ||
11 | #if defined(CONFIG_MACVTAP) || defined(CONFIG_MACVTAP_MODULE) | 11 | #if IS_ENABLED(CONFIG_MACVTAP) |
12 | struct socket *macvtap_get_socket(struct file *); | 12 | struct socket *macvtap_get_socket(struct file *); |
13 | #else | 13 | #else |
14 | #include <linux/err.h> | 14 | #include <linux/err.h> |
@@ -50,7 +50,7 @@ struct macvlan_pcpu_stats { | |||
50 | * Maximum times a macvtap device can be opened. This can be used to | 50 | * Maximum times a macvtap device can be opened. This can be used to |
51 | * configure the number of receive queue, e.g. for multiqueue virtio. | 51 | * configure the number of receive queue, e.g. for multiqueue virtio. |
52 | */ | 52 | */ |
53 | #define MAX_MACVTAP_QUEUES (NR_CPUS < 16 ? NR_CPUS : 16) | 53 | #define MAX_MACVTAP_QUEUES 16 |
54 | 54 | ||
55 | #define MACVLAN_MC_FILTER_BITS 8 | 55 | #define MACVLAN_MC_FILTER_BITS 8 |
56 | #define MACVLAN_MC_FILTER_SZ (1 << MACVLAN_MC_FILTER_BITS) | 56 | #define MACVLAN_MC_FILTER_SZ (1 << MACVLAN_MC_FILTER_BITS) |
@@ -65,12 +65,18 @@ struct macvlan_dev { | |||
65 | 65 | ||
66 | DECLARE_BITMAP(mc_filter, MACVLAN_MC_FILTER_SZ); | 66 | DECLARE_BITMAP(mc_filter, MACVLAN_MC_FILTER_SZ); |
67 | 67 | ||
68 | netdev_features_t set_features; | ||
68 | enum macvlan_mode mode; | 69 | enum macvlan_mode mode; |
69 | u16 flags; | 70 | u16 flags; |
70 | int (*receive)(struct sk_buff *skb); | 71 | int (*receive)(struct sk_buff *skb); |
71 | int (*forward)(struct net_device *dev, struct sk_buff *skb); | 72 | int (*forward)(struct net_device *dev, struct sk_buff *skb); |
72 | struct macvtap_queue *taps[MAX_MACVTAP_QUEUES]; | 73 | /* This array tracks active taps. */ |
74 | struct macvtap_queue __rcu *taps[MAX_MACVTAP_QUEUES]; | ||
75 | /* This list tracks all taps (both enabled and disabled) */ | ||
76 | struct list_head queue_list; | ||
73 | int numvtaps; | 77 | int numvtaps; |
78 | int numqueues; | ||
79 | netdev_features_t tap_features; | ||
74 | int minor; | 80 | int minor; |
75 | }; | 81 | }; |
76 | 82 | ||
diff --git a/include/linux/if_team.h b/include/linux/if_team.h index 16fae6436d0e..f6156f91eb1c 100644 --- a/include/linux/if_team.h +++ b/include/linux/if_team.h | |||
@@ -69,6 +69,7 @@ struct team_port { | |||
69 | s32 priority; /* lower number ~ higher priority */ | 69 | s32 priority; /* lower number ~ higher priority */ |
70 | u16 queue_id; | 70 | u16 queue_id; |
71 | struct list_head qom_list; /* node in queue override mapping list */ | 71 | struct list_head qom_list; /* node in queue override mapping list */ |
72 | struct rcu_head rcu; | ||
72 | long mode_priv[0]; | 73 | long mode_priv[0]; |
73 | }; | 74 | }; |
74 | 75 | ||
@@ -228,6 +229,16 @@ static inline struct team_port *team_get_port_by_index(struct team *team, | |||
228 | return port; | 229 | return port; |
229 | return NULL; | 230 | return NULL; |
230 | } | 231 | } |
232 | |||
233 | static inline int team_num_to_port_index(struct team *team, int num) | ||
234 | { | ||
235 | int en_port_count = ACCESS_ONCE(team->en_port_count); | ||
236 | |||
237 | if (unlikely(!en_port_count)) | ||
238 | return 0; | ||
239 | return num % en_port_count; | ||
240 | } | ||
241 | |||
231 | static inline struct team_port *team_get_port_by_index_rcu(struct team *team, | 242 | static inline struct team_port *team_get_port_by_index_rcu(struct team *team, |
232 | int port_index) | 243 | int port_index) |
233 | { | 244 | { |
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 637fa71de0c7..cdcbafa9b39a 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -243,8 +243,6 @@ static inline struct sk_buff *__vlan_hwaccel_put_tag(struct sk_buff *skb, | |||
243 | return skb; | 243 | return skb; |
244 | } | 244 | } |
245 | 245 | ||
246 | #define HAVE_VLAN_PUT_TAG | ||
247 | |||
248 | /** | 246 | /** |
249 | * vlan_put_tag - inserts VLAN tag according to device features | 247 | * vlan_put_tag - inserts VLAN tag according to device features |
250 | * @skb: skbuff to tag | 248 | * @skb: skbuff to tag |
diff --git a/include/linux/igmp.h b/include/linux/igmp.h index 7f2bf1518480..e3362b5f13e8 100644 --- a/include/linux/igmp.h +++ b/include/linux/igmp.h | |||
@@ -84,6 +84,7 @@ struct ip_mc_list { | |||
84 | struct ip_mc_list *next; | 84 | struct ip_mc_list *next; |
85 | struct ip_mc_list __rcu *next_rcu; | 85 | struct ip_mc_list __rcu *next_rcu; |
86 | }; | 86 | }; |
87 | struct ip_mc_list __rcu *next_hash; | ||
87 | struct timer_list timer; | 88 | struct timer_list timer; |
88 | int users; | 89 | int users; |
89 | atomic_t refcnt; | 90 | atomic_t refcnt; |
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index ea1e3b863890..b99cd23f3474 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -50,12 +50,17 @@ struct ipv4_devconf { | |||
50 | DECLARE_BITMAP(state, IPV4_DEVCONF_MAX); | 50 | DECLARE_BITMAP(state, IPV4_DEVCONF_MAX); |
51 | }; | 51 | }; |
52 | 52 | ||
53 | #define MC_HASH_SZ_LOG 9 | ||
54 | |||
53 | struct in_device { | 55 | struct in_device { |
54 | struct net_device *dev; | 56 | struct net_device *dev; |
55 | atomic_t refcnt; | 57 | atomic_t refcnt; |
56 | int dead; | 58 | int dead; |
57 | struct in_ifaddr *ifa_list; /* IP ifaddr chain */ | 59 | struct in_ifaddr *ifa_list; /* IP ifaddr chain */ |
60 | |||
58 | struct ip_mc_list __rcu *mc_list; /* IP multicast filter chain */ | 61 | struct ip_mc_list __rcu *mc_list; /* IP multicast filter chain */ |
62 | struct ip_mc_list __rcu * __rcu *mc_hash; | ||
63 | |||
59 | int mc_count; /* Number of installed mcasts */ | 64 | int mc_count; /* Number of installed mcasts */ |
60 | spinlock_t mc_tomb_lock; | 65 | spinlock_t mc_tomb_lock; |
61 | struct ip_mc_list *mc_tomb; | 66 | struct ip_mc_list *mc_tomb; |
diff --git a/include/linux/init.h b/include/linux/init.h index 861814710d52..e73f2b708525 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -93,13 +93,13 @@ | |||
93 | 93 | ||
94 | #define __exit __section(.exit.text) __exitused __cold notrace | 94 | #define __exit __section(.exit.text) __exitused __cold notrace |
95 | 95 | ||
96 | /* Used for HOTPLUG_CPU */ | 96 | /* temporary, until all users are removed */ |
97 | #define __cpuinit __section(.cpuinit.text) __cold notrace | 97 | #define __cpuinit |
98 | #define __cpuinitdata __section(.cpuinit.data) | 98 | #define __cpuinitdata |
99 | #define __cpuinitconst __constsection(.cpuinit.rodata) | 99 | #define __cpuinitconst |
100 | #define __cpuexit __section(.cpuexit.text) __exitused __cold notrace | 100 | #define __cpuexit |
101 | #define __cpuexitdata __section(.cpuexit.data) | 101 | #define __cpuexitdata |
102 | #define __cpuexitconst __constsection(.cpuexit.rodata) | 102 | #define __cpuexitconst |
103 | 103 | ||
104 | /* Used for MEMORY_HOTPLUG */ | 104 | /* Used for MEMORY_HOTPLUG */ |
105 | #define __meminit __section(.meminit.text) __cold notrace | 105 | #define __meminit __section(.meminit.text) __cold notrace |
@@ -118,9 +118,8 @@ | |||
118 | #define __INITRODATA .section ".init.rodata","a",%progbits | 118 | #define __INITRODATA .section ".init.rodata","a",%progbits |
119 | #define __FINITDATA .previous | 119 | #define __FINITDATA .previous |
120 | 120 | ||
121 | #define __CPUINIT .section ".cpuinit.text", "ax" | 121 | /* temporary, until all users are removed */ |
122 | #define __CPUINITDATA .section ".cpuinit.data", "aw" | 122 | #define __CPUINIT |
123 | #define __CPUINITRODATA .section ".cpuinit.rodata", "a" | ||
124 | 123 | ||
125 | #define __MEMINIT .section ".meminit.text", "ax" | 124 | #define __MEMINIT .section ".meminit.text", "ax" |
126 | #define __MEMINITDATA .section ".meminit.data", "aw" | 125 | #define __MEMINITDATA .section ".meminit.data", "aw" |
diff --git a/include/linux/input/ti_am335x_tsc.h b/include/linux/input/ti_am335x_tsc.h deleted file mode 100644 index 49269a2aa329..000000000000 --- a/include/linux/input/ti_am335x_tsc.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | #ifndef __LINUX_TI_AM335X_TSC_H | ||
2 | #define __LINUX_TI_AM335X_TSC_H | ||
3 | |||
4 | /** | ||
5 | * struct tsc_data Touchscreen wire configuration | ||
6 | * @wires: Wires refer to application modes | ||
7 | * i.e. 4/5/8 wire touchscreen support | ||
8 | * on the platform. | ||
9 | * @x_plate_resistance: X plate resistance. | ||
10 | * @steps_to_configure: The sequencer supports a total of | ||
11 | * 16 programmable steps. | ||
12 | * A step configured to read a single | ||
13 | * co-ordinate value, can be applied | ||
14 | * more number of times for better results. | ||
15 | */ | ||
16 | |||
17 | struct tsc_data { | ||
18 | int wires; | ||
19 | int x_plate_resistance; | ||
20 | int steps_to_configure; | ||
21 | }; | ||
22 | |||
23 | #endif | ||
diff --git a/include/linux/input/tps6507x-ts.h b/include/linux/input/tps6507x-ts.h index ab1440313924..b433df801d92 100644 --- a/include/linux/input/tps6507x-ts.h +++ b/include/linux/input/tps6507x-ts.h | |||
@@ -14,7 +14,6 @@ | |||
14 | /* Board specific touch screen initial values */ | 14 | /* Board specific touch screen initial values */ |
15 | struct touchscreen_init_data { | 15 | struct touchscreen_init_data { |
16 | int poll_period; /* ms */ | 16 | int poll_period; /* ms */ |
17 | int vref; /* non-zero to leave vref on */ | ||
18 | __u16 min_pressure; /* min reading to be treated as a touch */ | 17 | __u16 min_pressure; /* min reading to be treated as a touch */ |
19 | __u16 vendor; | 18 | __u16 vendor; |
20 | __u16 product; | 19 | __u16 product; |
diff --git a/include/linux/io.h b/include/linux/io.h index 069e4075f872..f4f42faec686 100644 --- a/include/linux/io.h +++ b/include/linux/io.h | |||
@@ -76,4 +76,29 @@ void devm_ioremap_release(struct device *dev, void *res); | |||
76 | #define arch_has_dev_port() (1) | 76 | #define arch_has_dev_port() (1) |
77 | #endif | 77 | #endif |
78 | 78 | ||
79 | /* | ||
80 | * Some systems (x86 without PAT) have a somewhat reliable way to mark a | ||
81 | * physical address range such that uncached mappings will actually | ||
82 | * end up write-combining. This facility should be used in conjunction | ||
83 | * with pgprot_writecombine, ioremap-wc, or set_memory_wc, since it has | ||
84 | * no effect if the per-page mechanisms are functional. | ||
85 | * (On x86 without PAT, these functions manipulate MTRRs.) | ||
86 | * | ||
87 | * arch_phys_del_wc(0) or arch_phys_del_wc(any error code) is guaranteed | ||
88 | * to have no effect. | ||
89 | */ | ||
90 | #ifndef arch_phys_wc_add | ||
91 | static inline int __must_check arch_phys_wc_add(unsigned long base, | ||
92 | unsigned long size) | ||
93 | { | ||
94 | return 0; /* It worked (i.e. did nothing). */ | ||
95 | } | ||
96 | |||
97 | static inline void arch_phys_wc_del(int handle) | ||
98 | { | ||
99 | } | ||
100 | |||
101 | #define arch_phys_wc_add arch_phys_wc_add | ||
102 | #endif | ||
103 | |||
79 | #endif /* _LINUX_IO_H */ | 104 | #endif /* _LINUX_IO_H */ |
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index ba2c708adcff..c983ed18c332 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h | |||
@@ -73,57 +73,48 @@ struct irq_domain_chip_generic; | |||
73 | /** | 73 | /** |
74 | * struct irq_domain - Hardware interrupt number translation object | 74 | * struct irq_domain - Hardware interrupt number translation object |
75 | * @link: Element in global irq_domain list. | 75 | * @link: Element in global irq_domain list. |
76 | * @revmap_type: Method used for reverse mapping hwirq numbers to linux irq. This | 76 | * @name: Name of interrupt domain |
77 | * will be one of the IRQ_DOMAIN_MAP_* values. | ||
78 | * @revmap_data: Revmap method specific data. | ||
79 | * @ops: pointer to irq_domain methods | 77 | * @ops: pointer to irq_domain methods |
80 | * @host_data: private data pointer for use by owner. Not touched by irq_domain | 78 | * @host_data: private data pointer for use by owner. Not touched by irq_domain |
81 | * core code. | 79 | * core code. |
82 | * @irq_base: Start of irq_desc range assigned to the irq_domain. The creator | 80 | * |
83 | * of the irq_domain is responsible for allocating the array of | 81 | * Optional elements |
84 | * irq_desc structures. | 82 | * @of_node: Pointer to device tree nodes associated with the irq_domain. Used |
85 | * @nr_irq: Number of irqs managed by the irq domain | 83 | * when decoding device tree interrupt specifiers. |
86 | * @hwirq_base: Starting number for hwirqs managed by the irq domain | 84 | * @gc: Pointer to a list of generic chips. There is a helper function for |
87 | * @of_node: (optional) Pointer to device tree nodes associated with the | 85 | * setting up one or more generic chips for interrupt controllers |
88 | * irq_domain. Used when decoding device tree interrupt specifiers. | 86 | * drivers using the generic chip library which uses this pointer. |
87 | * | ||
88 | * Revmap data, used internally by irq_domain | ||
89 | * @revmap_direct_max_irq: The largest hwirq that can be set for controllers that | ||
90 | * support direct mapping | ||
91 | * @revmap_size: Size of the linear map table @linear_revmap[] | ||
92 | * @revmap_tree: Radix map tree for hwirqs that don't fit in the linear map | ||
93 | * @linear_revmap: Linear table of hwirq->virq reverse mappings | ||
89 | */ | 94 | */ |
90 | struct irq_domain { | 95 | struct irq_domain { |
91 | struct list_head link; | 96 | struct list_head link; |
92 | 97 | const char *name; | |
93 | /* type of reverse mapping_technique */ | ||
94 | unsigned int revmap_type; | ||
95 | union { | ||
96 | struct { | ||
97 | unsigned int size; | ||
98 | unsigned int first_irq; | ||
99 | irq_hw_number_t first_hwirq; | ||
100 | } legacy; | ||
101 | struct { | ||
102 | unsigned int size; | ||
103 | unsigned int *revmap; | ||
104 | } linear; | ||
105 | struct { | ||
106 | unsigned int max_irq; | ||
107 | } nomap; | ||
108 | struct radix_tree_root tree; | ||
109 | } revmap_data; | ||
110 | const struct irq_domain_ops *ops; | 98 | const struct irq_domain_ops *ops; |
111 | void *host_data; | 99 | void *host_data; |
112 | irq_hw_number_t inval_irq; | ||
113 | 100 | ||
114 | /* Optional device node pointer */ | 101 | /* Optional data */ |
115 | struct device_node *of_node; | 102 | struct device_node *of_node; |
116 | /* Optional pointer to generic interrupt chips */ | ||
117 | struct irq_domain_chip_generic *gc; | 103 | struct irq_domain_chip_generic *gc; |
118 | }; | ||
119 | 104 | ||
120 | #define IRQ_DOMAIN_MAP_LEGACY 0 /* driver allocated fixed range of irqs. | 105 | /* reverse map data. The linear map gets appended to the irq_domain */ |
121 | * ie. legacy 8259, gets irqs 1..15 */ | 106 | irq_hw_number_t hwirq_max; |
122 | #define IRQ_DOMAIN_MAP_NOMAP 1 /* no fast reverse mapping */ | 107 | unsigned int revmap_direct_max_irq; |
123 | #define IRQ_DOMAIN_MAP_LINEAR 2 /* linear map of interrupts */ | 108 | unsigned int revmap_size; |
124 | #define IRQ_DOMAIN_MAP_TREE 3 /* radix tree */ | 109 | struct radix_tree_root revmap_tree; |
110 | unsigned int linear_revmap[]; | ||
111 | }; | ||
125 | 112 | ||
126 | #ifdef CONFIG_IRQ_DOMAIN | 113 | #ifdef CONFIG_IRQ_DOMAIN |
114 | struct irq_domain *__irq_domain_add(struct device_node *of_node, int size, | ||
115 | irq_hw_number_t hwirq_max, int direct_max, | ||
116 | const struct irq_domain_ops *ops, | ||
117 | void *host_data); | ||
127 | struct irq_domain *irq_domain_add_simple(struct device_node *of_node, | 118 | struct irq_domain *irq_domain_add_simple(struct device_node *of_node, |
128 | unsigned int size, | 119 | unsigned int size, |
129 | unsigned int first_irq, | 120 | unsigned int first_irq, |
@@ -135,21 +126,30 @@ struct irq_domain *irq_domain_add_legacy(struct device_node *of_node, | |||
135 | irq_hw_number_t first_hwirq, | 126 | irq_hw_number_t first_hwirq, |
136 | const struct irq_domain_ops *ops, | 127 | const struct irq_domain_ops *ops, |
137 | void *host_data); | 128 | void *host_data); |
138 | struct irq_domain *irq_domain_add_linear(struct device_node *of_node, | 129 | extern struct irq_domain *irq_find_host(struct device_node *node); |
130 | extern void irq_set_default_host(struct irq_domain *host); | ||
131 | |||
132 | /** | ||
133 | * irq_domain_add_linear() - Allocate and register a linear revmap irq_domain. | ||
134 | * @of_node: pointer to interrupt controller's device tree node. | ||
135 | * @size: Number of interrupts in the domain. | ||
136 | * @ops: map/unmap domain callbacks | ||
137 | * @host_data: Controller private data pointer | ||
138 | */ | ||
139 | static inline struct irq_domain *irq_domain_add_linear(struct device_node *of_node, | ||
139 | unsigned int size, | 140 | unsigned int size, |
140 | const struct irq_domain_ops *ops, | 141 | const struct irq_domain_ops *ops, |
141 | void *host_data); | 142 | void *host_data) |
142 | struct irq_domain *irq_domain_add_nomap(struct device_node *of_node, | 143 | { |
144 | return __irq_domain_add(of_node, size, size, 0, ops, host_data); | ||
145 | } | ||
146 | static inline struct irq_domain *irq_domain_add_nomap(struct device_node *of_node, | ||
143 | unsigned int max_irq, | 147 | unsigned int max_irq, |
144 | const struct irq_domain_ops *ops, | 148 | const struct irq_domain_ops *ops, |
145 | void *host_data); | 149 | void *host_data) |
146 | struct irq_domain *irq_domain_add_tree(struct device_node *of_node, | 150 | { |
147 | const struct irq_domain_ops *ops, | 151 | return __irq_domain_add(of_node, 0, max_irq, max_irq, ops, host_data); |
148 | void *host_data); | 152 | } |
149 | |||
150 | extern struct irq_domain *irq_find_host(struct device_node *node); | ||
151 | extern void irq_set_default_host(struct irq_domain *host); | ||
152 | |||
153 | static inline struct irq_domain *irq_domain_add_legacy_isa( | 153 | static inline struct irq_domain *irq_domain_add_legacy_isa( |
154 | struct device_node *of_node, | 154 | struct device_node *of_node, |
155 | const struct irq_domain_ops *ops, | 155 | const struct irq_domain_ops *ops, |
@@ -158,21 +158,40 @@ static inline struct irq_domain *irq_domain_add_legacy_isa( | |||
158 | return irq_domain_add_legacy(of_node, NUM_ISA_INTERRUPTS, 0, 0, ops, | 158 | return irq_domain_add_legacy(of_node, NUM_ISA_INTERRUPTS, 0, 0, ops, |
159 | host_data); | 159 | host_data); |
160 | } | 160 | } |
161 | static inline struct irq_domain *irq_domain_add_tree(struct device_node *of_node, | ||
162 | const struct irq_domain_ops *ops, | ||
163 | void *host_data) | ||
164 | { | ||
165 | return __irq_domain_add(of_node, 0, ~0, 0, ops, host_data); | ||
166 | } | ||
161 | 167 | ||
162 | extern void irq_domain_remove(struct irq_domain *host); | 168 | extern void irq_domain_remove(struct irq_domain *host); |
163 | 169 | ||
164 | extern int irq_domain_associate_many(struct irq_domain *domain, | 170 | extern int irq_domain_associate(struct irq_domain *domain, unsigned int irq, |
165 | unsigned int irq_base, | 171 | irq_hw_number_t hwirq); |
166 | irq_hw_number_t hwirq_base, int count); | 172 | extern void irq_domain_associate_many(struct irq_domain *domain, |
167 | static inline int irq_domain_associate(struct irq_domain *domain, unsigned int irq, | 173 | unsigned int irq_base, |
168 | irq_hw_number_t hwirq) | 174 | irq_hw_number_t hwirq_base, int count); |
169 | { | ||
170 | return irq_domain_associate_many(domain, irq, hwirq, 1); | ||
171 | } | ||
172 | 175 | ||
173 | extern unsigned int irq_create_mapping(struct irq_domain *host, | 176 | extern unsigned int irq_create_mapping(struct irq_domain *host, |
174 | irq_hw_number_t hwirq); | 177 | irq_hw_number_t hwirq); |
175 | extern void irq_dispose_mapping(unsigned int virq); | 178 | extern void irq_dispose_mapping(unsigned int virq); |
179 | |||
180 | /** | ||
181 | * irq_linear_revmap() - Find a linux irq from a hw irq number. | ||
182 | * @domain: domain owning this hardware interrupt | ||
183 | * @hwirq: hardware irq number in that domain space | ||
184 | * | ||
185 | * This is a fast path alternative to irq_find_mapping() that can be | ||
186 | * called directly by irq controller code to save a handful of | ||
187 | * instructions. It is always safe to call, but won't find irqs mapped | ||
188 | * using the radix tree. | ||
189 | */ | ||
190 | static inline unsigned int irq_linear_revmap(struct irq_domain *domain, | ||
191 | irq_hw_number_t hwirq) | ||
192 | { | ||
193 | return hwirq < domain->revmap_size ? domain->linear_revmap[hwirq] : 0; | ||
194 | } | ||
176 | extern unsigned int irq_find_mapping(struct irq_domain *host, | 195 | extern unsigned int irq_find_mapping(struct irq_domain *host, |
177 | irq_hw_number_t hwirq); | 196 | irq_hw_number_t hwirq); |
178 | extern unsigned int irq_create_direct_mapping(struct irq_domain *host); | 197 | extern unsigned int irq_create_direct_mapping(struct irq_domain *host); |
@@ -186,9 +205,6 @@ static inline int irq_create_identity_mapping(struct irq_domain *host, | |||
186 | return irq_create_strict_mappings(host, hwirq, hwirq, 1); | 205 | return irq_create_strict_mappings(host, hwirq, hwirq, 1); |
187 | } | 206 | } |
188 | 207 | ||
189 | extern unsigned int irq_linear_revmap(struct irq_domain *host, | ||
190 | irq_hw_number_t hwirq); | ||
191 | |||
192 | extern const struct irq_domain_ops irq_domain_simple_ops; | 208 | extern const struct irq_domain_ops irq_domain_simple_ops; |
193 | 209 | ||
194 | /* stock xlate functions */ | 210 | /* stock xlate functions */ |
@@ -202,14 +218,6 @@ int irq_domain_xlate_onetwocell(struct irq_domain *d, struct device_node *ctrlr, | |||
202 | const u32 *intspec, unsigned int intsize, | 218 | const u32 *intspec, unsigned int intsize, |
203 | irq_hw_number_t *out_hwirq, unsigned int *out_type); | 219 | irq_hw_number_t *out_hwirq, unsigned int *out_type); |
204 | 220 | ||
205 | #if defined(CONFIG_OF_IRQ) | ||
206 | extern void irq_domain_generate_simple(const struct of_device_id *match, | ||
207 | u64 phys_base, unsigned int irq_start); | ||
208 | #else /* CONFIG_OF_IRQ */ | ||
209 | static inline void irq_domain_generate_simple(const struct of_device_id *match, | ||
210 | u64 phys_base, unsigned int irq_start) { } | ||
211 | #endif /* !CONFIG_OF_IRQ */ | ||
212 | |||
213 | #else /* CONFIG_IRQ_DOMAIN */ | 221 | #else /* CONFIG_IRQ_DOMAIN */ |
214 | static inline void irq_dispose_mapping(unsigned int virq) { } | 222 | static inline void irq_dispose_mapping(unsigned int virq) { } |
215 | #endif /* !CONFIG_IRQ_DOMAIN */ | 223 | #endif /* !CONFIG_IRQ_DOMAIN */ |
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 8fb8edf12417..97ba4e78a37e 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
@@ -139,6 +139,10 @@ static inline u64 get_jiffies_64(void) | |||
139 | ((__s64)(a) - (__s64)(b) >= 0)) | 139 | ((__s64)(a) - (__s64)(b) >= 0)) |
140 | #define time_before_eq64(a,b) time_after_eq64(b,a) | 140 | #define time_before_eq64(a,b) time_after_eq64(b,a) |
141 | 141 | ||
142 | #define time_in_range64(a, b, c) \ | ||
143 | (time_after_eq64(a, b) && \ | ||
144 | time_before_eq64(a, c)) | ||
145 | |||
142 | /* | 146 | /* |
143 | * These four macros compare jiffies and 'a' for convenience. | 147 | * These four macros compare jiffies and 'a' for convenience. |
144 | */ | 148 | */ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 7e6b97e77fb9..3bef14c6586b 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -561,9 +561,6 @@ int __trace_bprintk(unsigned long ip, const char *fmt, ...); | |||
561 | extern __printf(2, 3) | 561 | extern __printf(2, 3) |
562 | int __trace_printk(unsigned long ip, const char *fmt, ...); | 562 | int __trace_printk(unsigned long ip, const char *fmt, ...); |
563 | 563 | ||
564 | extern int __trace_bputs(unsigned long ip, const char *str); | ||
565 | extern int __trace_puts(unsigned long ip, const char *str, int size); | ||
566 | |||
567 | /** | 564 | /** |
568 | * trace_puts - write a string into the ftrace buffer | 565 | * trace_puts - write a string into the ftrace buffer |
569 | * @str: the string to record | 566 | * @str: the string to record |
@@ -599,6 +596,8 @@ extern int __trace_puts(unsigned long ip, const char *str, int size); | |||
599 | else \ | 596 | else \ |
600 | __trace_puts(_THIS_IP_, str, strlen(str)); \ | 597 | __trace_puts(_THIS_IP_, str, strlen(str)); \ |
601 | }) | 598 | }) |
599 | extern int __trace_bputs(unsigned long ip, const char *str); | ||
600 | extern int __trace_puts(unsigned long ip, const char *str, int size); | ||
602 | 601 | ||
603 | extern void trace_dump_stack(int skip); | 602 | extern void trace_dump_stack(int skip); |
604 | 603 | ||
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index bbca12804d12..debf208b7611 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
@@ -229,7 +229,8 @@ static inline ktime_t timespec_to_ktime(const struct timespec ts) | |||
229 | static inline ktime_t timeval_to_ktime(const struct timeval tv) | 229 | static inline ktime_t timeval_to_ktime(const struct timeval tv) |
230 | { | 230 | { |
231 | return (ktime_t) { .tv = { .sec = (s32)tv.tv_sec, | 231 | return (ktime_t) { .tv = { .sec = (s32)tv.tv_sec, |
232 | .nsec = (s32)tv.tv_usec * 1000 } }; | 232 | .nsec = (s32)(tv.tv_usec * |
233 | NSEC_PER_USEC) } }; | ||
233 | } | 234 | } |
234 | 235 | ||
235 | /** | 236 | /** |
@@ -320,12 +321,17 @@ static inline s64 ktime_us_delta(const ktime_t later, const ktime_t earlier) | |||
320 | 321 | ||
321 | static inline ktime_t ktime_add_us(const ktime_t kt, const u64 usec) | 322 | static inline ktime_t ktime_add_us(const ktime_t kt, const u64 usec) |
322 | { | 323 | { |
323 | return ktime_add_ns(kt, usec * 1000); | 324 | return ktime_add_ns(kt, usec * NSEC_PER_USEC); |
325 | } | ||
326 | |||
327 | static inline ktime_t ktime_add_ms(const ktime_t kt, const u64 msec) | ||
328 | { | ||
329 | return ktime_add_ns(kt, msec * NSEC_PER_MSEC); | ||
324 | } | 330 | } |
325 | 331 | ||
326 | static inline ktime_t ktime_sub_us(const ktime_t kt, const u64 usec) | 332 | static inline ktime_t ktime_sub_us(const ktime_t kt, const u64 usec) |
327 | { | 333 | { |
328 | return ktime_sub_ns(kt, usec * 1000); | 334 | return ktime_sub_ns(kt, usec * NSEC_PER_USEC); |
329 | } | 335 | } |
330 | 336 | ||
331 | extern ktime_t ktime_add_safe(const ktime_t lhs, const ktime_t rhs); | 337 | extern ktime_t ktime_add_safe(const ktime_t lhs, const ktime_t rhs); |
@@ -338,7 +344,8 @@ extern ktime_t ktime_add_safe(const ktime_t lhs, const ktime_t rhs); | |||
338 | * | 344 | * |
339 | * Returns true if there was a successful conversion, false if kt was 0. | 345 | * Returns true if there was a successful conversion, false if kt was 0. |
340 | */ | 346 | */ |
341 | static inline bool ktime_to_timespec_cond(const ktime_t kt, struct timespec *ts) | 347 | static inline __must_check bool ktime_to_timespec_cond(const ktime_t kt, |
348 | struct timespec *ts) | ||
342 | { | 349 | { |
343 | if (kt.tv64) { | 350 | if (kt.tv64) { |
344 | *ts = ktime_to_timespec(kt); | 351 | *ts = ktime_to_timespec(kt); |
@@ -366,7 +373,15 @@ extern void ktime_get_ts(struct timespec *ts); | |||
366 | static inline ktime_t ns_to_ktime(u64 ns) | 373 | static inline ktime_t ns_to_ktime(u64 ns) |
367 | { | 374 | { |
368 | static const ktime_t ktime_zero = { .tv64 = 0 }; | 375 | static const ktime_t ktime_zero = { .tv64 = 0 }; |
376 | |||
369 | return ktime_add_ns(ktime_zero, ns); | 377 | return ktime_add_ns(ktime_zero, ns); |
370 | } | 378 | } |
371 | 379 | ||
380 | static inline ktime_t ms_to_ktime(u64 ms) | ||
381 | { | ||
382 | static const ktime_t ktime_zero = { .tv64 = 0 }; | ||
383 | |||
384 | return ktime_add_ms(ktime_zero, ms); | ||
385 | } | ||
386 | |||
372 | #endif | 387 | #endif |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 8db53cfaccdb..a63d83ebd151 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -125,6 +125,7 @@ static inline bool is_error_page(struct page *page) | |||
125 | #define KVM_REQ_MCLOCK_INPROGRESS 19 | 125 | #define KVM_REQ_MCLOCK_INPROGRESS 19 |
126 | #define KVM_REQ_EPR_EXIT 20 | 126 | #define KVM_REQ_EPR_EXIT 20 |
127 | #define KVM_REQ_SCAN_IOAPIC 21 | 127 | #define KVM_REQ_SCAN_IOAPIC 21 |
128 | #define KVM_REQ_GLOBAL_CLOCK_UPDATE 22 | ||
128 | 129 | ||
129 | #define KVM_USERSPACE_IRQ_SOURCE_ID 0 | 130 | #define KVM_USERSPACE_IRQ_SOURCE_ID 0 |
130 | #define KVM_IRQFD_RESAMPLE_IRQ_SOURCE_ID 1 | 131 | #define KVM_IRQFD_RESAMPLE_IRQ_SOURCE_ID 1 |
@@ -145,7 +146,8 @@ struct kvm_io_range { | |||
145 | #define NR_IOBUS_DEVS 1000 | 146 | #define NR_IOBUS_DEVS 1000 |
146 | 147 | ||
147 | struct kvm_io_bus { | 148 | struct kvm_io_bus { |
148 | int dev_count; | 149 | int dev_count; |
150 | int ioeventfd_count; | ||
149 | struct kvm_io_range range[]; | 151 | struct kvm_io_range range[]; |
150 | }; | 152 | }; |
151 | 153 | ||
diff --git a/include/linux/lcd.h b/include/linux/lcd.h index e00c3b0ebc6b..504f6246f38f 100644 --- a/include/linux/lcd.h +++ b/include/linux/lcd.h | |||
@@ -112,7 +112,12 @@ static inline void lcd_set_power(struct lcd_device *ld, int power) | |||
112 | 112 | ||
113 | extern struct lcd_device *lcd_device_register(const char *name, | 113 | extern struct lcd_device *lcd_device_register(const char *name, |
114 | struct device *parent, void *devdata, struct lcd_ops *ops); | 114 | struct device *parent, void *devdata, struct lcd_ops *ops); |
115 | extern struct lcd_device *devm_lcd_device_register(struct device *dev, | ||
116 | const char *name, struct device *parent, | ||
117 | void *devdata, struct lcd_ops *ops); | ||
115 | extern void lcd_device_unregister(struct lcd_device *ld); | 118 | extern void lcd_device_unregister(struct lcd_device *ld); |
119 | extern void devm_lcd_device_unregister(struct device *dev, | ||
120 | struct lcd_device *ld); | ||
116 | 121 | ||
117 | #define to_lcd_device(obj) container_of(obj, struct lcd_device, dev) | 122 | #define to_lcd_device(obj) container_of(obj, struct lcd_device, dev) |
118 | 123 | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index eae7a053dc51..4ea55bb45deb 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -399,6 +399,7 @@ enum { | |||
399 | ATA_HORKAGE_BROKEN_FPDMA_AA = (1 << 15), /* skip AA */ | 399 | ATA_HORKAGE_BROKEN_FPDMA_AA = (1 << 15), /* skip AA */ |
400 | ATA_HORKAGE_DUMP_ID = (1 << 16), /* dump IDENTIFY data */ | 400 | ATA_HORKAGE_DUMP_ID = (1 << 16), /* dump IDENTIFY data */ |
401 | ATA_HORKAGE_MAX_SEC_LBA48 = (1 << 17), /* Set max sects to 65535 */ | 401 | ATA_HORKAGE_MAX_SEC_LBA48 = (1 << 17), /* Set max sects to 65535 */ |
402 | ATA_HORKAGE_ATAPI_DMADIR = (1 << 18), /* device requires dmadir */ | ||
402 | 403 | ||
403 | /* DMA mask for user DMA control: User visible values; DO NOT | 404 | /* DMA mask for user DMA control: User visible values; DO NOT |
404 | renumber */ | 405 | renumber */ |
@@ -746,6 +747,7 @@ struct ata_port { | |||
746 | /* Flags that change dynamically, protected by ap->lock */ | 747 | /* Flags that change dynamically, protected by ap->lock */ |
747 | unsigned int pflags; /* ATA_PFLAG_xxx */ | 748 | unsigned int pflags; /* ATA_PFLAG_xxx */ |
748 | unsigned int print_id; /* user visible unique port ID */ | 749 | unsigned int print_id; /* user visible unique port ID */ |
750 | unsigned int local_port_no; /* host local port num */ | ||
749 | unsigned int port_no; /* 0 based port no. inside the host */ | 751 | unsigned int port_no; /* 0 based port no. inside the host */ |
750 | 752 | ||
751 | #ifdef CONFIG_ATA_SFF | 753 | #ifdef CONFIG_ATA_SFF |
@@ -908,6 +910,9 @@ struct ata_port_operations { | |||
908 | ssize_t (*sw_activity_show)(struct ata_device *dev, char *buf); | 910 | ssize_t (*sw_activity_show)(struct ata_device *dev, char *buf); |
909 | ssize_t (*sw_activity_store)(struct ata_device *dev, | 911 | ssize_t (*sw_activity_store)(struct ata_device *dev, |
910 | enum sw_activity val); | 912 | enum sw_activity val); |
913 | ssize_t (*transmit_led_message)(struct ata_port *ap, u32 state, | ||
914 | ssize_t size); | ||
915 | |||
911 | /* | 916 | /* |
912 | * Obsolete | 917 | * Obsolete |
913 | */ | 918 | */ |
diff --git a/include/linux/lz4.h b/include/linux/lz4.h new file mode 100644 index 000000000000..d21c13f10a64 --- /dev/null +++ b/include/linux/lz4.h | |||
@@ -0,0 +1,87 @@ | |||
1 | #ifndef __LZ4_H__ | ||
2 | #define __LZ4_H__ | ||
3 | /* | ||
4 | * LZ4 Kernel Interface | ||
5 | * | ||
6 | * Copyright (C) 2013, LG Electronics, Kyungsik Lee <kyungsik.lee@lge.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | #define LZ4_MEM_COMPRESS (4096 * sizeof(unsigned char *)) | ||
13 | #define LZ4HC_MEM_COMPRESS (65538 * sizeof(unsigned char *)) | ||
14 | |||
15 | /* | ||
16 | * lz4_compressbound() | ||
17 | * Provides the maximum size that LZ4 may output in a "worst case" scenario | ||
18 | * (input data not compressible) | ||
19 | */ | ||
20 | static inline size_t lz4_compressbound(size_t isize) | ||
21 | { | ||
22 | return isize + (isize / 255) + 16; | ||
23 | } | ||
24 | |||
25 | /* | ||
26 | * lz4_compress() | ||
27 | * src : source address of the original data | ||
28 | * src_len : size of the original data | ||
29 | * dst : output buffer address of the compressed data | ||
30 | * This requires 'dst' of size LZ4_COMPRESSBOUND. | ||
31 | * dst_len : is the output size, which is returned after compress done | ||
32 | * workmem : address of the working memory. | ||
33 | * This requires 'workmem' of size LZ4_MEM_COMPRESS. | ||
34 | * return : Success if return 0 | ||
35 | * Error if return (< 0) | ||
36 | * note : Destination buffer and workmem must be already allocated with | ||
37 | * the defined size. | ||
38 | */ | ||
39 | int lz4_compress(const unsigned char *src, size_t src_len, | ||
40 | unsigned char *dst, size_t *dst_len, void *wrkmem); | ||
41 | |||
42 | /* | ||
43 | * lz4hc_compress() | ||
44 | * src : source address of the original data | ||
45 | * src_len : size of the original data | ||
46 | * dst : output buffer address of the compressed data | ||
47 | * This requires 'dst' of size LZ4_COMPRESSBOUND. | ||
48 | * dst_len : is the output size, which is returned after compress done | ||
49 | * workmem : address of the working memory. | ||
50 | * This requires 'workmem' of size LZ4HC_MEM_COMPRESS. | ||
51 | * return : Success if return 0 | ||
52 | * Error if return (< 0) | ||
53 | * note : Destination buffer and workmem must be already allocated with | ||
54 | * the defined size. | ||
55 | */ | ||
56 | int lz4hc_compress(const unsigned char *src, size_t src_len, | ||
57 | unsigned char *dst, size_t *dst_len, void *wrkmem); | ||
58 | |||
59 | /* | ||
60 | * lz4_decompress() | ||
61 | * src : source address of the compressed data | ||
62 | * src_len : is the input size, whcih is returned after decompress done | ||
63 | * dest : output buffer address of the decompressed data | ||
64 | * actual_dest_len: is the size of uncompressed data, supposing it's known | ||
65 | * return : Success if return 0 | ||
66 | * Error if return (< 0) | ||
67 | * note : Destination buffer must be already allocated. | ||
68 | * slightly faster than lz4_decompress_unknownoutputsize() | ||
69 | */ | ||
70 | int lz4_decompress(const char *src, size_t *src_len, char *dest, | ||
71 | size_t actual_dest_len); | ||
72 | |||
73 | /* | ||
74 | * lz4_decompress_unknownoutputsize() | ||
75 | * src : source address of the compressed data | ||
76 | * src_len : is the input size, therefore the compressed size | ||
77 | * dest : output buffer address of the decompressed data | ||
78 | * dest_len: is the max size of the destination buffer, which is | ||
79 | * returned with actual size of decompressed data after | ||
80 | * decompress done | ||
81 | * return : Success if return 0 | ||
82 | * Error if return (< 0) | ||
83 | * note : Destination buffer must be already allocated. | ||
84 | */ | ||
85 | int lz4_decompress_unknownoutputsize(const char *src, size_t src_len, | ||
86 | char *dest, size_t *dest_len); | ||
87 | #endif | ||
diff --git a/include/linux/marvell_phy.h b/include/linux/marvell_phy.h index dd3c34ebca9a..8e9a029e093d 100644 --- a/include/linux/marvell_phy.h +++ b/include/linux/marvell_phy.h | |||
@@ -14,6 +14,8 @@ | |||
14 | #define MARVELL_PHY_ID_88E1149R 0x01410e50 | 14 | #define MARVELL_PHY_ID_88E1149R 0x01410e50 |
15 | #define MARVELL_PHY_ID_88E1240 0x01410e30 | 15 | #define MARVELL_PHY_ID_88E1240 0x01410e30 |
16 | #define MARVELL_PHY_ID_88E1318S 0x01410e90 | 16 | #define MARVELL_PHY_ID_88E1318S 0x01410e90 |
17 | #define MARVELL_PHY_ID_88E1116R 0x01410e40 | ||
18 | #define MARVELL_PHY_ID_88E1510 0x01410dd0 | ||
17 | 19 | ||
18 | /* struct phy_device dev_flags definitions */ | 20 | /* struct phy_device dev_flags definitions */ |
19 | #define MARVELL_PHY_M1145_FLAGS_RESISTANCE 0x00000001 | 21 | #define MARVELL_PHY_M1145_FLAGS_RESISTANCE 0x00000001 |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index d6183f06d8c1..7b4d9d79570b 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -77,7 +77,8 @@ extern void mem_cgroup_uncharge_cache_page(struct page *page); | |||
77 | 77 | ||
78 | bool __mem_cgroup_same_or_subtree(const struct mem_cgroup *root_memcg, | 78 | bool __mem_cgroup_same_or_subtree(const struct mem_cgroup *root_memcg, |
79 | struct mem_cgroup *memcg); | 79 | struct mem_cgroup *memcg); |
80 | int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *memcg); | 80 | bool task_in_mem_cgroup(struct task_struct *task, |
81 | const struct mem_cgroup *memcg); | ||
81 | 82 | ||
82 | extern struct mem_cgroup *try_get_mem_cgroup_from_page(struct page *page); | 83 | extern struct mem_cgroup *try_get_mem_cgroup_from_page(struct page *page); |
83 | extern struct mem_cgroup *mem_cgroup_from_task(struct task_struct *p); | 84 | extern struct mem_cgroup *mem_cgroup_from_task(struct task_struct *p); |
@@ -273,10 +274,10 @@ static inline bool mm_match_cgroup(struct mm_struct *mm, | |||
273 | return true; | 274 | return true; |
274 | } | 275 | } |
275 | 276 | ||
276 | static inline int task_in_mem_cgroup(struct task_struct *task, | 277 | static inline bool task_in_mem_cgroup(struct task_struct *task, |
277 | const struct mem_cgroup *memcg) | 278 | const struct mem_cgroup *memcg) |
278 | { | 279 | { |
279 | return 1; | 280 | return true; |
280 | } | 281 | } |
281 | 282 | ||
282 | static inline struct cgroup_subsys_state | 283 | static inline struct cgroup_subsys_state |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 3e622c610925..dd38e62b84d2 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -234,6 +234,8 @@ static inline void unlock_memory_hotplug(void) {} | |||
234 | 234 | ||
235 | extern int is_mem_section_removable(unsigned long pfn, unsigned long nr_pages); | 235 | extern int is_mem_section_removable(unsigned long pfn, unsigned long nr_pages); |
236 | extern void try_offline_node(int nid); | 236 | extern void try_offline_node(int nid); |
237 | extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages); | ||
238 | extern void remove_memory(int nid, u64 start, u64 size); | ||
237 | 239 | ||
238 | #else | 240 | #else |
239 | static inline int is_mem_section_removable(unsigned long pfn, | 241 | static inline int is_mem_section_removable(unsigned long pfn, |
@@ -243,15 +245,23 @@ static inline int is_mem_section_removable(unsigned long pfn, | |||
243 | } | 245 | } |
244 | 246 | ||
245 | static inline void try_offline_node(int nid) {} | 247 | static inline void try_offline_node(int nid) {} |
248 | |||
249 | static inline int offline_pages(unsigned long start_pfn, unsigned long nr_pages) | ||
250 | { | ||
251 | return -EINVAL; | ||
252 | } | ||
253 | |||
254 | static inline void remove_memory(int nid, u64 start, u64 size) {} | ||
246 | #endif /* CONFIG_MEMORY_HOTREMOVE */ | 255 | #endif /* CONFIG_MEMORY_HOTREMOVE */ |
247 | 256 | ||
257 | extern int walk_memory_range(unsigned long start_pfn, unsigned long end_pfn, | ||
258 | void *arg, int (*func)(struct memory_block *, void *)); | ||
248 | extern int mem_online_node(int nid); | 259 | extern int mem_online_node(int nid); |
249 | extern int add_memory(int nid, u64 start, u64 size); | 260 | extern int add_memory(int nid, u64 start, u64 size); |
250 | extern int arch_add_memory(int nid, u64 start, u64 size); | 261 | extern int arch_add_memory(int nid, u64 start, u64 size); |
251 | extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages); | 262 | extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages); |
252 | extern int offline_memory_block(struct memory_block *mem); | ||
253 | extern bool is_memblock_offlined(struct memory_block *mem); | 263 | extern bool is_memblock_offlined(struct memory_block *mem); |
254 | extern int remove_memory(int nid, u64 start, u64 size); | 264 | extern void remove_memory(int nid, u64 start, u64 size); |
255 | extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn, | 265 | extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn, |
256 | int nr_pages); | 266 | int nr_pages); |
257 | extern void sparse_remove_one_section(struct zone *zone, struct mem_section *ms); | 267 | extern void sparse_remove_one_section(struct zone *zone, struct mem_section *ms); |
diff --git a/include/linux/mfd/88pm80x.h b/include/linux/mfd/88pm80x.h index e94537befabd..97cb283cc8e1 100644 --- a/include/linux/mfd/88pm80x.h +++ b/include/linux/mfd/88pm80x.h | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/regmap.h> | 17 | #include <linux/regmap.h> |
18 | #include <linux/atomic.h> | 18 | #include <linux/atomic.h> |
19 | 19 | ||
20 | #define PM80X_VERSION_MASK (0xFF) /* 80X chip ID mask */ | ||
21 | enum { | 20 | enum { |
22 | CHIP_INVALID = 0, | 21 | CHIP_INVALID = 0, |
23 | CHIP_PM800, | 22 | CHIP_PM800, |
@@ -299,8 +298,7 @@ struct pm80x_chip { | |||
299 | struct regmap *regmap; | 298 | struct regmap *regmap; |
300 | struct regmap_irq_chip *regmap_irq_chip; | 299 | struct regmap_irq_chip *regmap_irq_chip; |
301 | struct regmap_irq_chip_data *irq_data; | 300 | struct regmap_irq_chip_data *irq_data; |
302 | unsigned char version; | 301 | int type; |
303 | int id; | ||
304 | int irq; | 302 | int irq; |
305 | int irq_mode; | 303 | int irq_mode; |
306 | unsigned long wu_flag; | 304 | unsigned long wu_flag; |
@@ -309,8 +307,14 @@ struct pm80x_chip { | |||
309 | 307 | ||
310 | struct pm80x_platform_data { | 308 | struct pm80x_platform_data { |
311 | struct pm80x_rtc_pdata *rtc; | 309 | struct pm80x_rtc_pdata *rtc; |
312 | unsigned short power_page_addr; /* power page I2C address */ | 310 | /* |
313 | unsigned short gpadc_page_addr; /* gpadc page I2C address */ | 311 | * For the regulator not defined, set regulators[not_defined] to be |
312 | * NULL. num_regulators are the number of regulators supposed to be | ||
313 | * initialized. If all regulators are not defined, set num_regulators | ||
314 | * to be 0. | ||
315 | */ | ||
316 | struct regulator_init_data *regulators[PM800_ID_RG_MAX]; | ||
317 | unsigned int num_regulators; | ||
314 | int irq_mode; /* Clear interrupt by read/write(0/1) */ | 318 | int irq_mode; /* Clear interrupt by read/write(0/1) */ |
315 | int batt_det; /* enable/disable */ | 319 | int batt_det; /* enable/disable */ |
316 | int (*plat_config)(struct pm80x_chip *chip, | 320 | int (*plat_config)(struct pm80x_chip *chip, |
@@ -363,7 +367,6 @@ static inline int pm80x_dev_resume(struct device *dev) | |||
363 | } | 367 | } |
364 | #endif | 368 | #endif |
365 | 369 | ||
366 | extern int pm80x_init(struct i2c_client *client, | 370 | extern int pm80x_init(struct i2c_client *client); |
367 | const struct i2c_device_id *id); | ||
368 | extern int pm80x_deinit(void); | 371 | extern int pm80x_deinit(void); |
369 | #endif /* __LINUX_MFD_88PM80X_H */ | 372 | #endif /* __LINUX_MFD_88PM80X_H */ |
diff --git a/include/linux/mfd/abx500/ab8500-sysctrl.h b/include/linux/mfd/abx500/ab8500-sysctrl.h index 990bc93f46e1..adba89d9c660 100644 --- a/include/linux/mfd/abx500/ab8500-sysctrl.h +++ b/include/linux/mfd/abx500/ab8500-sysctrl.h | |||
@@ -278,8 +278,8 @@ struct ab8500_sysctrl_platform_data { | |||
278 | 278 | ||
279 | #define AB9540_SYSCLK12CONFCTRL_PLL26TO38ENA BIT(0) | 279 | #define AB9540_SYSCLK12CONFCTRL_PLL26TO38ENA BIT(0) |
280 | #define AB9540_SYSCLK12CONFCTRL_SYSCLK12USBMUXSEL BIT(1) | 280 | #define AB9540_SYSCLK12CONFCTRL_SYSCLK12USBMUXSEL BIT(1) |
281 | #define AB9540_SYSCLK12CONFCTRL_INT384MHZMUXSEL_MASK 0x0C | 281 | #define AB9540_SYSCLK12CONFCTRL_INT384MHZMUXSEL0 BIT(2) |
282 | #define AB9540_SYSCLK12CONFCTRL_INT384MHZMUXSEL_SHIFT 2 | 282 | #define AB9540_SYSCLK12CONFCTRL_INT384MHZMUXSEL1 BIT(3) |
283 | #define AB9540_SYSCLK12CONFCTRL_SYSCLK12BUFMUX BIT(4) | 283 | #define AB9540_SYSCLK12CONFCTRL_SYSCLK12BUFMUX BIT(4) |
284 | #define AB9540_SYSCLK12CONFCTRL_SYSCLK12PLLMUX BIT(5) | 284 | #define AB9540_SYSCLK12CONFCTRL_SYSCLK12PLLMUX BIT(5) |
285 | #define AB9540_SYSCLK12CONFCTRL_SYSCLK2MUXVALID BIT(6) | 285 | #define AB9540_SYSCLK12CONFCTRL_SYSCLK2MUXVALID BIT(6) |
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h index 0390d5943ed6..f4acd898dac9 100644 --- a/include/linux/mfd/abx500/ab8500.h +++ b/include/linux/mfd/abx500/ab8500.h | |||
@@ -291,6 +291,8 @@ enum ab8500_version { | |||
291 | #define AB8540_INT_FSYNC2R 213 | 291 | #define AB8540_INT_FSYNC2R 213 |
292 | #define AB8540_INT_BITCLK2F 214 | 292 | #define AB8540_INT_BITCLK2F 214 |
293 | #define AB8540_INT_BITCLK2R 215 | 293 | #define AB8540_INT_BITCLK2R 215 |
294 | /* ab8540_irq_regoffset[27] -> IT[Source|Latch|Mask]33 */ | ||
295 | #define AB8540_INT_RTC_1S 216 | ||
294 | 296 | ||
295 | /* | 297 | /* |
296 | * AB8500_AB9540_NR_IRQS is used when configuring the IRQ numbers for the | 298 | * AB8500_AB9540_NR_IRQS is used when configuring the IRQ numbers for the |
diff --git a/include/linux/mfd/arizona/core.h b/include/linux/mfd/arizona/core.h index cc281368dc55..5cf8b91ce996 100644 --- a/include/linux/mfd/arizona/core.h +++ b/include/linux/mfd/arizona/core.h | |||
@@ -23,6 +23,7 @@ | |||
23 | enum arizona_type { | 23 | enum arizona_type { |
24 | WM5102 = 1, | 24 | WM5102 = 1, |
25 | WM5110 = 2, | 25 | WM5110 = 2, |
26 | WM8997 = 3, | ||
26 | }; | 27 | }; |
27 | 28 | ||
28 | #define ARIZONA_IRQ_GP1 0 | 29 | #define ARIZONA_IRQ_GP1 0 |
@@ -95,6 +96,8 @@ struct arizona { | |||
95 | 96 | ||
96 | struct arizona_pdata pdata; | 97 | struct arizona_pdata pdata; |
97 | 98 | ||
99 | unsigned int external_dcvdd:1; | ||
100 | |||
98 | int irq; | 101 | int irq; |
99 | struct irq_domain *virq; | 102 | struct irq_domain *virq; |
100 | struct regmap_irq_chip_data *aod_irq_chip; | 103 | struct regmap_irq_chip_data *aod_irq_chip; |
@@ -119,5 +122,6 @@ int arizona_set_irq_wake(struct arizona *arizona, int irq, int on); | |||
119 | 122 | ||
120 | int wm5102_patch(struct arizona *arizona); | 123 | int wm5102_patch(struct arizona *arizona); |
121 | int wm5110_patch(struct arizona *arizona); | 124 | int wm5110_patch(struct arizona *arizona); |
125 | int wm8997_patch(struct arizona *arizona); | ||
122 | 126 | ||
123 | #endif | 127 | #endif |
diff --git a/include/linux/mfd/arizona/pdata.h b/include/linux/mfd/arizona/pdata.h index 80dead1f7100..12a5c135c746 100644 --- a/include/linux/mfd/arizona/pdata.h +++ b/include/linux/mfd/arizona/pdata.h | |||
@@ -77,7 +77,7 @@ struct arizona_micbias { | |||
77 | int mV; /** Regulated voltage */ | 77 | int mV; /** Regulated voltage */ |
78 | unsigned int ext_cap:1; /** External capacitor fitted */ | 78 | unsigned int ext_cap:1; /** External capacitor fitted */ |
79 | unsigned int discharge:1; /** Actively discharge */ | 79 | unsigned int discharge:1; /** Actively discharge */ |
80 | unsigned int fast_start:1; /** Enable aggressive startup ramp rate */ | 80 | unsigned int soft_start:1; /** Disable aggressive startup ramp rate */ |
81 | unsigned int bypass:1; /** Use bypass mode */ | 81 | unsigned int bypass:1; /** Use bypass mode */ |
82 | }; | 82 | }; |
83 | 83 | ||
diff --git a/include/linux/mfd/arizona/registers.h b/include/linux/mfd/arizona/registers.h index 715b6ba3d52a..4706d3d46e56 100644 --- a/include/linux/mfd/arizona/registers.h +++ b/include/linux/mfd/arizona/registers.h | |||
@@ -215,6 +215,9 @@ | |||
215 | #define ARIZONA_DAC_DIGITAL_VOLUME_6R 0x43D | 215 | #define ARIZONA_DAC_DIGITAL_VOLUME_6R 0x43D |
216 | #define ARIZONA_DAC_VOLUME_LIMIT_6R 0x43E | 216 | #define ARIZONA_DAC_VOLUME_LIMIT_6R 0x43E |
217 | #define ARIZONA_NOISE_GATE_SELECT_6R 0x43F | 217 | #define ARIZONA_NOISE_GATE_SELECT_6R 0x43F |
218 | #define ARIZONA_DRE_ENABLE 0x440 | ||
219 | #define ARIZONA_DRE_CONTROL_2 0x442 | ||
220 | #define ARIZONA_DRE_CONTROL_3 0x443 | ||
218 | #define ARIZONA_DAC_AEC_CONTROL_1 0x450 | 221 | #define ARIZONA_DAC_AEC_CONTROL_1 0x450 |
219 | #define ARIZONA_NOISE_GATE_CONTROL 0x458 | 222 | #define ARIZONA_NOISE_GATE_CONTROL 0x458 |
220 | #define ARIZONA_PDM_SPK1_CTRL_1 0x490 | 223 | #define ARIZONA_PDM_SPK1_CTRL_1 0x490 |
@@ -1002,6 +1005,7 @@ | |||
1002 | #define ARIZONA_DSP2_CLOCKING_1 0x1201 | 1005 | #define ARIZONA_DSP2_CLOCKING_1 0x1201 |
1003 | #define ARIZONA_DSP2_STATUS_1 0x1204 | 1006 | #define ARIZONA_DSP2_STATUS_1 0x1204 |
1004 | #define ARIZONA_DSP2_STATUS_2 0x1205 | 1007 | #define ARIZONA_DSP2_STATUS_2 0x1205 |
1008 | #define ARIZONA_DSP2_STATUS_3 0x1206 | ||
1005 | #define ARIZONA_DSP2_SCRATCH_0 0x1240 | 1009 | #define ARIZONA_DSP2_SCRATCH_0 0x1240 |
1006 | #define ARIZONA_DSP2_SCRATCH_1 0x1241 | 1010 | #define ARIZONA_DSP2_SCRATCH_1 0x1241 |
1007 | #define ARIZONA_DSP2_SCRATCH_2 0x1242 | 1011 | #define ARIZONA_DSP2_SCRATCH_2 0x1242 |
@@ -1010,6 +1014,7 @@ | |||
1010 | #define ARIZONA_DSP3_CLOCKING_1 0x1301 | 1014 | #define ARIZONA_DSP3_CLOCKING_1 0x1301 |
1011 | #define ARIZONA_DSP3_STATUS_1 0x1304 | 1015 | #define ARIZONA_DSP3_STATUS_1 0x1304 |
1012 | #define ARIZONA_DSP3_STATUS_2 0x1305 | 1016 | #define ARIZONA_DSP3_STATUS_2 0x1305 |
1017 | #define ARIZONA_DSP3_STATUS_3 0x1306 | ||
1013 | #define ARIZONA_DSP3_SCRATCH_0 0x1340 | 1018 | #define ARIZONA_DSP3_SCRATCH_0 0x1340 |
1014 | #define ARIZONA_DSP3_SCRATCH_1 0x1341 | 1019 | #define ARIZONA_DSP3_SCRATCH_1 0x1341 |
1015 | #define ARIZONA_DSP3_SCRATCH_2 0x1342 | 1020 | #define ARIZONA_DSP3_SCRATCH_2 0x1342 |
@@ -1018,6 +1023,7 @@ | |||
1018 | #define ARIZONA_DSP4_CLOCKING_1 0x1401 | 1023 | #define ARIZONA_DSP4_CLOCKING_1 0x1401 |
1019 | #define ARIZONA_DSP4_STATUS_1 0x1404 | 1024 | #define ARIZONA_DSP4_STATUS_1 0x1404 |
1020 | #define ARIZONA_DSP4_STATUS_2 0x1405 | 1025 | #define ARIZONA_DSP4_STATUS_2 0x1405 |
1026 | #define ARIZONA_DSP4_STATUS_3 0x1406 | ||
1021 | #define ARIZONA_DSP4_SCRATCH_0 0x1440 | 1027 | #define ARIZONA_DSP4_SCRATCH_0 0x1440 |
1022 | #define ARIZONA_DSP4_SCRATCH_1 0x1441 | 1028 | #define ARIZONA_DSP4_SCRATCH_1 0x1441 |
1023 | #define ARIZONA_DSP4_SCRATCH_2 0x1442 | 1029 | #define ARIZONA_DSP4_SCRATCH_2 0x1442 |
@@ -3130,6 +3136,47 @@ | |||
3130 | #define ARIZONA_OUT6R_NGATE_SRC_WIDTH 12 /* OUT6R_NGATE_SRC - [11:0] */ | 3136 | #define ARIZONA_OUT6R_NGATE_SRC_WIDTH 12 /* OUT6R_NGATE_SRC - [11:0] */ |
3131 | 3137 | ||
3132 | /* | 3138 | /* |
3139 | * R1088 (0x440) - DRE Enable | ||
3140 | */ | ||
3141 | #define ARIZONA_DRE3L_ENA 0x0010 /* DRE3L_ENA */ | ||
3142 | #define ARIZONA_DRE3L_ENA_MASK 0x0010 /* DRE3L_ENA */ | ||
3143 | #define ARIZONA_DRE3L_ENA_SHIFT 4 /* DRE3L_ENA */ | ||
3144 | #define ARIZONA_DRE3L_ENA_WIDTH 1 /* DRE3L_ENA */ | ||
3145 | #define ARIZONA_DRE2R_ENA 0x0008 /* DRE2R_ENA */ | ||
3146 | #define ARIZONA_DRE2R_ENA_MASK 0x0008 /* DRE2R_ENA */ | ||
3147 | #define ARIZONA_DRE2R_ENA_SHIFT 3 /* DRE2R_ENA */ | ||
3148 | #define ARIZONA_DRE2R_ENA_WIDTH 1 /* DRE2R_ENA */ | ||
3149 | #define ARIZONA_DRE2L_ENA 0x0004 /* DRE2L_ENA */ | ||
3150 | #define ARIZONA_DRE2L_ENA_MASK 0x0004 /* DRE2L_ENA */ | ||
3151 | #define ARIZONA_DRE2L_ENA_SHIFT 2 /* DRE2L_ENA */ | ||
3152 | #define ARIZONA_DRE2L_ENA_WIDTH 1 /* DRE2L_ENA */ | ||
3153 | #define ARIZONA_DRE1R_ENA 0x0002 /* DRE1R_ENA */ | ||
3154 | #define ARIZONA_DRE1R_ENA_MASK 0x0002 /* DRE1R_ENA */ | ||
3155 | #define ARIZONA_DRE1R_ENA_SHIFT 1 /* DRE1R_ENA */ | ||
3156 | #define ARIZONA_DRE1R_ENA_WIDTH 1 /* DRE1R_ENA */ | ||
3157 | #define ARIZONA_DRE1L_ENA 0x0001 /* DRE1L_ENA */ | ||
3158 | #define ARIZONA_DRE1L_ENA_MASK 0x0001 /* DRE1L_ENA */ | ||
3159 | #define ARIZONA_DRE1L_ENA_SHIFT 0 /* DRE1L_ENA */ | ||
3160 | #define ARIZONA_DRE1L_ENA_WIDTH 1 /* DRE1L_ENA */ | ||
3161 | |||
3162 | /* | ||
3163 | * R1090 (0x442) - DRE Control 2 | ||
3164 | */ | ||
3165 | #define ARIZONA_DRE_T_LOW_MASK 0x3F00 /* DRE_T_LOW - [13:8] */ | ||
3166 | #define ARIZONA_DRE_T_LOW_SHIFT 8 /* DRE_T_LOW - [13:8] */ | ||
3167 | #define ARIZONA_DRE_T_LOW_WIDTH 6 /* DRE_T_LOW - [13:8] */ | ||
3168 | |||
3169 | /* | ||
3170 | * R1091 (0x443) - DRE Control 3 | ||
3171 | */ | ||
3172 | #define ARIZONA_DRE_GAIN_SHIFT_MASK 0xC000 /* DRE_GAIN_SHIFT - [15:14] */ | ||
3173 | #define ARIZONA_DRE_GAIN_SHIFT_SHIFT 14 /* DRE_GAIN_SHIFT - [15:14] */ | ||
3174 | #define ARIZONA_DRE_GAIN_SHIFT_WIDTH 2 /* DRE_GAIN_SHIFT - [15:14] */ | ||
3175 | #define ARIZONA_DRE_LOW_LEVEL_ABS_MASK 0x000F /* LOW_LEVEL_ABS - [3:0] */ | ||
3176 | #define ARIZONA_DRE_LOW_LEVEL_ABS_SHIFT 0 /* LOW_LEVEL_ABS - [3:0] */ | ||
3177 | #define ARIZONA_DRE_LOW_LEVEL_ABS_WIDTH 4 /* LOW_LEVEL_ABS - [3:0] */ | ||
3178 | |||
3179 | /* | ||
3133 | * R1104 (0x450) - DAC AEC Control 1 | 3180 | * R1104 (0x450) - DAC AEC Control 1 |
3134 | */ | 3181 | */ |
3135 | #define ARIZONA_AEC_LOOPBACK_SRC_MASK 0x003C /* AEC_LOOPBACK_SRC - [5:2] */ | 3182 | #define ARIZONA_AEC_LOOPBACK_SRC_MASK 0x003C /* AEC_LOOPBACK_SRC - [5:2] */ |
diff --git a/include/linux/mfd/davinci_voicecodec.h b/include/linux/mfd/davinci_voicecodec.h index 7dd6524d2aac..13a1ee95a233 100644 --- a/include/linux/mfd/davinci_voicecodec.h +++ b/include/linux/mfd/davinci_voicecodec.h | |||
@@ -28,6 +28,8 @@ | |||
28 | #include <linux/mfd/core.h> | 28 | #include <linux/mfd/core.h> |
29 | #include <linux/platform_data/edma.h> | 29 | #include <linux/platform_data/edma.h> |
30 | 30 | ||
31 | #include <mach/hardware.h> | ||
32 | |||
31 | /* | 33 | /* |
32 | * Register values. | 34 | * Register values. |
33 | */ | 35 | */ |
@@ -111,8 +113,6 @@ struct davinci_vc { | |||
111 | 113 | ||
112 | /* Memory resources */ | 114 | /* Memory resources */ |
113 | void __iomem *base; | 115 | void __iomem *base; |
114 | resource_size_t pbase; | ||
115 | size_t base_size; | ||
116 | 116 | ||
117 | /* MFD cells */ | 117 | /* MFD cells */ |
118 | struct mfd_cell cells[DAVINCI_VC_CELLS]; | 118 | struct mfd_cell cells[DAVINCI_VC_CELLS]; |
diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h index 689e6a0d9c99..ca0790fba2f5 100644 --- a/include/linux/mfd/dbx500-prcmu.h +++ b/include/linux/mfd/dbx500-prcmu.h | |||
@@ -134,6 +134,11 @@ enum prcmu_clock { | |||
134 | PRCMU_SIACLK, | 134 | PRCMU_SIACLK, |
135 | PRCMU_SVACLK, | 135 | PRCMU_SVACLK, |
136 | PRCMU_ACLK, | 136 | PRCMU_ACLK, |
137 | PRCMU_HVACLK, /* Ux540 only */ | ||
138 | PRCMU_G1CLK, /* Ux540 only */ | ||
139 | PRCMU_SDMMCHCLK, | ||
140 | PRCMU_CAMCLK, | ||
141 | PRCMU_BML8580CLK, | ||
137 | PRCMU_NUM_REG_CLOCKS, | 142 | PRCMU_NUM_REG_CLOCKS, |
138 | PRCMU_SYSCLK = PRCMU_NUM_REG_CLOCKS, | 143 | PRCMU_SYSCLK = PRCMU_NUM_REG_CLOCKS, |
139 | PRCMU_CDCLK, | 144 | PRCMU_CDCLK, |
@@ -148,6 +153,13 @@ enum prcmu_clock { | |||
148 | PRCMU_DSI0ESCCLK, | 153 | PRCMU_DSI0ESCCLK, |
149 | PRCMU_DSI1ESCCLK, | 154 | PRCMU_DSI1ESCCLK, |
150 | PRCMU_DSI2ESCCLK, | 155 | PRCMU_DSI2ESCCLK, |
156 | /* LCD DSI PLL - Ux540 only */ | ||
157 | PRCMU_PLLDSI_LCD, | ||
158 | PRCMU_DSI0CLK_LCD, | ||
159 | PRCMU_DSI1CLK_LCD, | ||
160 | PRCMU_DSI0ESCCLK_LCD, | ||
161 | PRCMU_DSI1ESCCLK_LCD, | ||
162 | PRCMU_DSI2ESCCLK_LCD, | ||
151 | }; | 163 | }; |
152 | 164 | ||
153 | /** | 165 | /** |
diff --git a/include/linux/mfd/kempld.h b/include/linux/mfd/kempld.h new file mode 100644 index 000000000000..b911ef3add03 --- /dev/null +++ b/include/linux/mfd/kempld.h | |||
@@ -0,0 +1,125 @@ | |||
1 | /* | ||
2 | * Kontron PLD driver definitions | ||
3 | * | ||
4 | * Copyright (c) 2010-2012 Kontron Europe GmbH | ||
5 | * Author: Michael Brunner <michael.brunner@kontron.com> | ||
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 2 as published | ||
9 | * by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef _LINUX_MFD_KEMPLD_H_ | ||
13 | #define _LINUX_MFD_KEMPLD_H_ | ||
14 | |||
15 | /* kempld register definitions */ | ||
16 | #define KEMPLD_IOINDEX 0xa80 | ||
17 | #define KEMPLD_IODATA 0xa81 | ||
18 | #define KEMPLD_MUTEX_KEY 0x80 | ||
19 | #define KEMPLD_VERSION 0x00 | ||
20 | #define KEMPLD_VERSION_LSB 0x00 | ||
21 | #define KEMPLD_VERSION_MSB 0x01 | ||
22 | #define KEMPLD_VERSION_GET_MINOR(x) (x & 0x1f) | ||
23 | #define KEMPLD_VERSION_GET_MAJOR(x) ((x >> 5) & 0x1f) | ||
24 | #define KEMPLD_VERSION_GET_NUMBER(x) ((x >> 10) & 0xf) | ||
25 | #define KEMPLD_VERSION_GET_TYPE(x) ((x >> 14) & 0x3) | ||
26 | #define KEMPLD_BUILDNR 0x02 | ||
27 | #define KEMPLD_BUILDNR_LSB 0x02 | ||
28 | #define KEMPLD_BUILDNR_MSB 0x03 | ||
29 | #define KEMPLD_FEATURE 0x04 | ||
30 | #define KEMPLD_FEATURE_LSB 0x04 | ||
31 | #define KEMPLD_FEATURE_MSB 0x05 | ||
32 | #define KEMPLD_FEATURE_BIT_I2C (1 << 0) | ||
33 | #define KEMPLD_FEATURE_BIT_WATCHDOG (1 << 1) | ||
34 | #define KEMPLD_FEATURE_BIT_GPIO (1 << 2) | ||
35 | #define KEMPLD_FEATURE_MASK_UART (7 << 3) | ||
36 | #define KEMPLD_FEATURE_BIT_NMI (1 << 8) | ||
37 | #define KEMPLD_FEATURE_BIT_SMI (1 << 9) | ||
38 | #define KEMPLD_FEATURE_BIT_SCI (1 << 10) | ||
39 | #define KEMPLD_SPEC 0x06 | ||
40 | #define KEMPLD_SPEC_GET_MINOR(x) (x & 0x0f) | ||
41 | #define KEMPLD_SPEC_GET_MAJOR(x) ((x >> 4) & 0x0f) | ||
42 | #define KEMPLD_IRQ_GPIO 0x35 | ||
43 | #define KEMPLD_IRQ_I2C 0x36 | ||
44 | #define KEMPLD_CFG 0x37 | ||
45 | #define KEMPLD_CFG_GPIO_I2C_MUX (1 << 0) | ||
46 | #define KEMPLD_CFG_BIOS_WP (1 << 7) | ||
47 | |||
48 | #define KEMPLD_CLK 33333333 | ||
49 | |||
50 | #define KEMPLD_TYPE_RELEASE 0x0 | ||
51 | #define KEMPLD_TYPE_DEBUG 0x1 | ||
52 | #define KEMPLD_TYPE_CUSTOM 0x2 | ||
53 | |||
54 | /** | ||
55 | * struct kempld_info - PLD device information structure | ||
56 | * @major: PLD major revision | ||
57 | * @minor: PLD minor revision | ||
58 | * @buildnr: PLD build number | ||
59 | * @number: PLD board specific index | ||
60 | * @type: PLD type | ||
61 | * @spec_major: PLD FW specification major revision | ||
62 | * @spec_minor: PLD FW specification minor revision | ||
63 | */ | ||
64 | struct kempld_info { | ||
65 | unsigned int major; | ||
66 | unsigned int minor; | ||
67 | unsigned int buildnr; | ||
68 | unsigned int number; | ||
69 | unsigned int type; | ||
70 | unsigned int spec_major; | ||
71 | unsigned int spec_minor; | ||
72 | }; | ||
73 | |||
74 | /** | ||
75 | * struct kempld_device_data - Internal representation of the PLD device | ||
76 | * @io_base: Pointer to the IO memory | ||
77 | * @io_index: Pointer to the IO index register | ||
78 | * @io_data: Pointer to the IO data register | ||
79 | * @pld_clock: PLD clock frequency | ||
80 | * @feature_mask: PLD feature mask | ||
81 | * @dev: Pointer to kernel device structure | ||
82 | * @info: KEMPLD info structure | ||
83 | * @lock: PLD mutex | ||
84 | */ | ||
85 | struct kempld_device_data { | ||
86 | void __iomem *io_base; | ||
87 | void __iomem *io_index; | ||
88 | void __iomem *io_data; | ||
89 | u32 pld_clock; | ||
90 | u32 feature_mask; | ||
91 | struct device *dev; | ||
92 | struct kempld_info info; | ||
93 | struct mutex lock; | ||
94 | }; | ||
95 | |||
96 | /** | ||
97 | * struct kempld_platform_data - PLD hardware configuration structure | ||
98 | * @pld_clock: PLD clock frequency | ||
99 | * @gpio_base GPIO base pin number | ||
100 | * @ioresource: IO addresses of the PLD | ||
101 | * @get_mutex: PLD specific get_mutex callback | ||
102 | * @release_mutex: PLD specific release_mutex callback | ||
103 | * @get_info: PLD specific get_info callback | ||
104 | * @register_cells: PLD specific register_cells callback | ||
105 | */ | ||
106 | struct kempld_platform_data { | ||
107 | u32 pld_clock; | ||
108 | int gpio_base; | ||
109 | struct resource *ioresource; | ||
110 | void (*get_hardware_mutex) (struct kempld_device_data *); | ||
111 | void (*release_hardware_mutex) (struct kempld_device_data *); | ||
112 | int (*get_info) (struct kempld_device_data *); | ||
113 | int (*register_cells) (struct kempld_device_data *); | ||
114 | }; | ||
115 | |||
116 | extern void kempld_get_mutex(struct kempld_device_data *pld); | ||
117 | extern void kempld_release_mutex(struct kempld_device_data *pld); | ||
118 | extern u8 kempld_read8(struct kempld_device_data *pld, u8 index); | ||
119 | extern void kempld_write8(struct kempld_device_data *pld, u8 index, u8 data); | ||
120 | extern u16 kempld_read16(struct kempld_device_data *pld, u8 index); | ||
121 | extern void kempld_write16(struct kempld_device_data *pld, u8 index, u16 data); | ||
122 | extern u32 kempld_read32(struct kempld_device_data *pld, u8 index); | ||
123 | extern void kempld_write32(struct kempld_device_data *pld, u8 index, u32 data); | ||
124 | |||
125 | #endif /* _LINUX_MFD_KEMPLD_H_ */ | ||
diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h index 1aa4f13cdfa6..244fb0d51589 100644 --- a/include/linux/mfd/max77693-private.h +++ b/include/linux/mfd/max77693-private.h | |||
@@ -85,6 +85,19 @@ enum max77693_pmic_reg { | |||
85 | MAX77693_PMIC_REG_END, | 85 | MAX77693_PMIC_REG_END, |
86 | }; | 86 | }; |
87 | 87 | ||
88 | /* MAX77693 CHG_CNFG_00 register */ | ||
89 | #define CHG_CNFG_00_CHG_MASK 0x1 | ||
90 | #define CHG_CNFG_00_BUCK_MASK 0x4 | ||
91 | |||
92 | /* MAX77693 CHG_CNFG_09 Register */ | ||
93 | #define CHG_CNFG_09_CHGIN_ILIM_MASK 0x7F | ||
94 | |||
95 | /* MAX77693 CHG_CTRL Register */ | ||
96 | #define SAFEOUT_CTRL_SAFEOUT1_MASK 0x3 | ||
97 | #define SAFEOUT_CTRL_SAFEOUT2_MASK 0xC | ||
98 | #define SAFEOUT_CTRL_ENSAFEOUT1_MASK 0x40 | ||
99 | #define SAFEOUT_CTRL_ENSAFEOUT2_MASK 0x80 | ||
100 | |||
88 | /* Slave addr = 0x4A: MUIC */ | 101 | /* Slave addr = 0x4A: MUIC */ |
89 | enum max77693_muic_reg { | 102 | enum max77693_muic_reg { |
90 | MAX77693_MUIC_REG_ID = 0x00, | 103 | MAX77693_MUIC_REG_ID = 0x00, |
diff --git a/include/linux/mfd/max77693.h b/include/linux/mfd/max77693.h index 3109a6c5c948..676f0f388992 100644 --- a/include/linux/mfd/max77693.h +++ b/include/linux/mfd/max77693.h | |||
@@ -30,6 +30,20 @@ | |||
30 | #ifndef __LINUX_MFD_MAX77693_H | 30 | #ifndef __LINUX_MFD_MAX77693_H |
31 | #define __LINUX_MFD_MAX77693_H | 31 | #define __LINUX_MFD_MAX77693_H |
32 | 32 | ||
33 | /* MAX77686 regulator IDs */ | ||
34 | enum max77693_regulators { | ||
35 | MAX77693_ESAFEOUT1 = 0, | ||
36 | MAX77693_ESAFEOUT2, | ||
37 | MAX77693_CHARGER, | ||
38 | MAX77693_REG_MAX, | ||
39 | }; | ||
40 | |||
41 | struct max77693_regulator_data { | ||
42 | int id; | ||
43 | struct regulator_init_data *initdata; | ||
44 | struct device_node *of_node; | ||
45 | }; | ||
46 | |||
33 | struct max77693_reg_data { | 47 | struct max77693_reg_data { |
34 | u8 addr; | 48 | u8 addr; |
35 | u8 data; | 49 | u8 data; |
@@ -52,6 +66,10 @@ struct max77693_muic_platform_data { | |||
52 | struct max77693_platform_data { | 66 | struct max77693_platform_data { |
53 | int wakeup; | 67 | int wakeup; |
54 | 68 | ||
69 | /* regulator data */ | ||
70 | struct max77693_regulator_data *regulators; | ||
71 | int num_regulators; | ||
72 | |||
55 | /* muic data */ | 73 | /* muic data */ |
56 | struct max77693_muic_platform_data *muic_data; | 74 | struct max77693_muic_platform_data *muic_data; |
57 | }; | 75 | }; |
diff --git a/include/linux/mfd/max8998-private.h b/include/linux/mfd/max8998-private.h index effa5d3b96ae..84844e0a5704 100644 --- a/include/linux/mfd/max8998-private.h +++ b/include/linux/mfd/max8998-private.h | |||
@@ -132,9 +132,12 @@ enum { | |||
132 | 132 | ||
133 | #define MAX8998_ENRAMP (1 << 4) | 133 | #define MAX8998_ENRAMP (1 << 4) |
134 | 134 | ||
135 | struct irq_domain; | ||
136 | |||
135 | /** | 137 | /** |
136 | * struct max8998_dev - max8998 master device for sub-drivers | 138 | * struct max8998_dev - max8998 master device for sub-drivers |
137 | * @dev: master device of the chip (can be used to access platform data) | 139 | * @dev: master device of the chip (can be used to access platform data) |
140 | * @pdata: platform data for the driver and subdrivers | ||
138 | * @i2c: i2c client private data for regulator | 141 | * @i2c: i2c client private data for regulator |
139 | * @rtc: i2c client private data for rtc | 142 | * @rtc: i2c client private data for rtc |
140 | * @iolock: mutex for serializing io access | 143 | * @iolock: mutex for serializing io access |
@@ -148,12 +151,14 @@ enum { | |||
148 | */ | 151 | */ |
149 | struct max8998_dev { | 152 | struct max8998_dev { |
150 | struct device *dev; | 153 | struct device *dev; |
154 | struct max8998_platform_data *pdata; | ||
151 | struct i2c_client *i2c; | 155 | struct i2c_client *i2c; |
152 | struct i2c_client *rtc; | 156 | struct i2c_client *rtc; |
153 | struct mutex iolock; | 157 | struct mutex iolock; |
154 | struct mutex irqlock; | 158 | struct mutex irqlock; |
155 | 159 | ||
156 | int irq_base; | 160 | unsigned int irq_base; |
161 | struct irq_domain *irq_domain; | ||
157 | int irq; | 162 | int irq; |
158 | int ono; | 163 | int ono; |
159 | u8 irq_masks_cur[MAX8998_NUM_IRQ_REGS]; | 164 | u8 irq_masks_cur[MAX8998_NUM_IRQ_REGS]; |
diff --git a/include/linux/mfd/max8998.h b/include/linux/mfd/max8998.h index 6823548d0c0a..e3956a654cbc 100644 --- a/include/linux/mfd/max8998.h +++ b/include/linux/mfd/max8998.h | |||
@@ -58,10 +58,12 @@ enum { | |||
58 | * max8998_regulator_data - regulator data | 58 | * max8998_regulator_data - regulator data |
59 | * @id: regulator id | 59 | * @id: regulator id |
60 | * @initdata: regulator init data (contraints, supplies, ...) | 60 | * @initdata: regulator init data (contraints, supplies, ...) |
61 | * @reg_node: DT node of regulator (unused on non-DT platforms) | ||
61 | */ | 62 | */ |
62 | struct max8998_regulator_data { | 63 | struct max8998_regulator_data { |
63 | int id; | 64 | int id; |
64 | struct regulator_init_data *initdata; | 65 | struct regulator_init_data *initdata; |
66 | struct device_node *reg_node; | ||
65 | }; | 67 | }; |
66 | 68 | ||
67 | /** | 69 | /** |
@@ -73,12 +75,8 @@ struct max8998_regulator_data { | |||
73 | * @buck_voltage_lock: Do NOT change the values of the following six | 75 | * @buck_voltage_lock: Do NOT change the values of the following six |
74 | * registers set by buck?_voltage?. The voltage of BUCK1/2 cannot | 76 | * registers set by buck?_voltage?. The voltage of BUCK1/2 cannot |
75 | * be other than the preset values. | 77 | * be other than the preset values. |
76 | * @buck1_voltage1: BUCK1 DVS mode 1 voltage register | 78 | * @buck1_voltage: BUCK1 DVS mode 1 voltage registers |
77 | * @buck1_voltage2: BUCK1 DVS mode 2 voltage register | 79 | * @buck2_voltage: BUCK2 DVS mode 2 voltage registers |
78 | * @buck1_voltage3: BUCK1 DVS mode 3 voltage register | ||
79 | * @buck1_voltage4: BUCK1 DVS mode 4 voltage register | ||
80 | * @buck2_voltage1: BUCK2 DVS mode 1 voltage register | ||
81 | * @buck2_voltage2: BUCK2 DVS mode 2 voltage register | ||
82 | * @buck1_set1: BUCK1 gpio pin 1 to set output voltage | 80 | * @buck1_set1: BUCK1 gpio pin 1 to set output voltage |
83 | * @buck1_set2: BUCK1 gpio pin 2 to set output voltage | 81 | * @buck1_set2: BUCK1 gpio pin 2 to set output voltage |
84 | * @buck1_default_idx: Default for BUCK1 gpio pin 1, 2 | 82 | * @buck1_default_idx: Default for BUCK1 gpio pin 1, 2 |
@@ -100,15 +98,11 @@ struct max8998_regulator_data { | |||
100 | struct max8998_platform_data { | 98 | struct max8998_platform_data { |
101 | struct max8998_regulator_data *regulators; | 99 | struct max8998_regulator_data *regulators; |
102 | int num_regulators; | 100 | int num_regulators; |
103 | int irq_base; | 101 | unsigned int irq_base; |
104 | int ono; | 102 | int ono; |
105 | bool buck_voltage_lock; | 103 | bool buck_voltage_lock; |
106 | int buck1_voltage1; | 104 | int buck1_voltage[4]; |
107 | int buck1_voltage2; | 105 | int buck2_voltage[2]; |
108 | int buck1_voltage3; | ||
109 | int buck1_voltage4; | ||
110 | int buck2_voltage1; | ||
111 | int buck2_voltage2; | ||
112 | int buck1_set1; | 106 | int buck1_set1; |
113 | int buck1_set2; | 107 | int buck1_set2; |
114 | int buck1_default_idx; | 108 | int buck1_default_idx; |
diff --git a/include/linux/mfd/mc13xxx.h b/include/linux/mfd/mc13xxx.h index bf070755982e..41ed59276c00 100644 --- a/include/linux/mfd/mc13xxx.h +++ b/include/linux/mfd/mc13xxx.h | |||
@@ -78,20 +78,30 @@ struct mc13xxx_regulator_platform_data { | |||
78 | struct mc13xxx_regulator_init_data *regulators; | 78 | struct mc13xxx_regulator_init_data *regulators; |
79 | }; | 79 | }; |
80 | 80 | ||
81 | enum { | ||
82 | /* MC13783 LED IDs */ | ||
83 | MC13783_LED_MD, | ||
84 | MC13783_LED_AD, | ||
85 | MC13783_LED_KP, | ||
86 | MC13783_LED_R1, | ||
87 | MC13783_LED_G1, | ||
88 | MC13783_LED_B1, | ||
89 | MC13783_LED_R2, | ||
90 | MC13783_LED_G2, | ||
91 | MC13783_LED_B2, | ||
92 | MC13783_LED_R3, | ||
93 | MC13783_LED_G3, | ||
94 | MC13783_LED_B3, | ||
95 | /* MC13892 LED IDs */ | ||
96 | MC13892_LED_MD, | ||
97 | MC13892_LED_AD, | ||
98 | MC13892_LED_KP, | ||
99 | MC13892_LED_R, | ||
100 | MC13892_LED_G, | ||
101 | MC13892_LED_B, | ||
102 | }; | ||
103 | |||
81 | struct mc13xxx_led_platform_data { | 104 | struct mc13xxx_led_platform_data { |
82 | #define MC13783_LED_MD 0 | ||
83 | #define MC13783_LED_AD 1 | ||
84 | #define MC13783_LED_KP 2 | ||
85 | #define MC13783_LED_R1 3 | ||
86 | #define MC13783_LED_G1 4 | ||
87 | #define MC13783_LED_B1 5 | ||
88 | #define MC13783_LED_R2 6 | ||
89 | #define MC13783_LED_G2 7 | ||
90 | #define MC13783_LED_B2 8 | ||
91 | #define MC13783_LED_R3 9 | ||
92 | #define MC13783_LED_G3 10 | ||
93 | #define MC13783_LED_B3 11 | ||
94 | #define MC13783_LED_MAX MC13783_LED_B3 | ||
95 | int id; | 105 | int id; |
96 | const char *name; | 106 | const char *name; |
97 | const char *default_trigger; | 107 | const char *default_trigger; |
@@ -100,46 +110,36 @@ struct mc13xxx_led_platform_data { | |||
100 | char max_current; | 110 | char max_current; |
101 | }; | 111 | }; |
102 | 112 | ||
113 | #define MAX_LED_CONTROL_REGS 6 | ||
114 | |||
103 | struct mc13xxx_leds_platform_data { | 115 | struct mc13xxx_leds_platform_data { |
104 | int num_leds; | ||
105 | struct mc13xxx_led_platform_data *led; | 116 | struct mc13xxx_led_platform_data *led; |
117 | int num_leds; | ||
106 | 118 | ||
107 | #define MC13783_LED_TRIODE_MD (1 << 0) | 119 | /* LED Control 0 */ |
108 | #define MC13783_LED_TRIODE_AD (1 << 1) | 120 | #define MC13783_LED_C0_ENABLE (1 << 0) |
109 | #define MC13783_LED_TRIODE_KP (1 << 2) | 121 | #define MC13783_LED_C0_TRIODE_MD (1 << 7) |
110 | #define MC13783_LED_BOOST_EN (1 << 3) | 122 | #define MC13783_LED_C0_TRIODE_AD (1 << 8) |
111 | #define MC13783_LED_TC1HALF (1 << 4) | 123 | #define MC13783_LED_C0_TRIODE_KP (1 << 9) |
112 | #define MC13783_LED_SLEWLIMTC (1 << 5) | 124 | #define MC13783_LED_C0_BOOST (1 << 10) |
113 | #define MC13783_LED_SLEWLIMBL (1 << 6) | 125 | #define MC13783_LED_C0_ABMODE(x) (((x) & 0x7) << 11) |
114 | #define MC13783_LED_TRIODE_TC1 (1 << 7) | 126 | #define MC13783_LED_C0_ABREF(x) (((x) & 0x3) << 14) |
115 | #define MC13783_LED_TRIODE_TC2 (1 << 8) | 127 | /* LED Control 1 */ |
116 | #define MC13783_LED_TRIODE_TC3 (1 << 9) | 128 | #define MC13783_LED_C1_TC1HALF (1 << 18) |
117 | int flags; | 129 | #define MC13783_LED_C1_SLEWLIM (1 << 23) |
118 | 130 | /* LED Control 2 */ | |
119 | #define MC13783_LED_AB_DISABLED 0 | 131 | #define MC13783_LED_C2_PERIOD(x) (((x) & 0x3) << 21) |
120 | #define MC13783_LED_AB_MD1 1 | 132 | #define MC13783_LED_C2_SLEWLIM (1 << 23) |
121 | #define MC13783_LED_AB_MD12 2 | 133 | /* LED Control 3 */ |
122 | #define MC13783_LED_AB_MD123 3 | 134 | #define MC13783_LED_C3_PERIOD(x) (((x) & 0x3) << 21) |
123 | #define MC13783_LED_AB_MD1234 4 | 135 | #define MC13783_LED_C3_TRIODE_TC1 (1 << 23) |
124 | #define MC13783_LED_AB_MD1234_AD1 5 | 136 | /* LED Control 4 */ |
125 | #define MC13783_LED_AB_MD1234_AD12 6 | 137 | #define MC13783_LED_C4_PERIOD(x) (((x) & 0x3) << 21) |
126 | #define MC13783_LED_AB_MD1_AD 7 | 138 | #define MC13783_LED_C4_TRIODE_TC2 (1 << 23) |
127 | char abmode; | 139 | /* LED Control 5 */ |
128 | 140 | #define MC13783_LED_C5_PERIOD(x) (((x) & 0x3) << 21) | |
129 | #define MC13783_LED_ABREF_200MV 0 | 141 | #define MC13783_LED_C5_TRIODE_TC3 (1 << 23) |
130 | #define MC13783_LED_ABREF_400MV 1 | 142 | u32 led_control[MAX_LED_CONTROL_REGS]; |
131 | #define MC13783_LED_ABREF_600MV 2 | ||
132 | #define MC13783_LED_ABREF_800MV 3 | ||
133 | char abref; | ||
134 | |||
135 | #define MC13783_LED_PERIOD_10MS 0 | ||
136 | #define MC13783_LED_PERIOD_100MS 1 | ||
137 | #define MC13783_LED_PERIOD_500MS 2 | ||
138 | #define MC13783_LED_PERIOD_2S 3 | ||
139 | char bl_period; | ||
140 | char tc1_period; | ||
141 | char tc2_period; | ||
142 | char tc3_period; | ||
143 | }; | 143 | }; |
144 | 144 | ||
145 | struct mc13xxx_buttons_platform_data { | 145 | struct mc13xxx_buttons_platform_data { |
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h index 9b81b2bdc46b..1a8dd7afe084 100644 --- a/include/linux/mfd/palmas.h +++ b/include/linux/mfd/palmas.h | |||
@@ -34,6 +34,19 @@ | |||
34 | ((a) == PALMAS_CHIP_ID)) | 34 | ((a) == PALMAS_CHIP_ID)) |
35 | #define is_palmas_charger(a) ((a) == PALMAS_CHIP_CHARGER_ID) | 35 | #define is_palmas_charger(a) ((a) == PALMAS_CHIP_CHARGER_ID) |
36 | 36 | ||
37 | /** | ||
38 | * Palmas PMIC feature types | ||
39 | * | ||
40 | * PALMAS_PMIC_FEATURE_SMPS10_BOOST - used when the PMIC provides SMPS10_BOOST | ||
41 | * regulator. | ||
42 | * | ||
43 | * PALMAS_PMIC_HAS(b, f) - macro to check if a bandgap device is capable of a | ||
44 | * specific feature (above) or not. Return non-zero, if yes. | ||
45 | */ | ||
46 | #define PALMAS_PMIC_FEATURE_SMPS10_BOOST BIT(0) | ||
47 | #define PALMAS_PMIC_HAS(b, f) \ | ||
48 | ((b)->features & PALMAS_PMIC_FEATURE_ ## f) | ||
49 | |||
37 | struct palmas_pmic; | 50 | struct palmas_pmic; |
38 | struct palmas_gpadc; | 51 | struct palmas_gpadc; |
39 | struct palmas_resource; | 52 | struct palmas_resource; |
@@ -54,6 +67,7 @@ struct palmas { | |||
54 | /* Stored chip id */ | 67 | /* Stored chip id */ |
55 | int id; | 68 | int id; |
56 | 69 | ||
70 | unsigned int features; | ||
57 | /* IRQ Data */ | 71 | /* IRQ Data */ |
58 | int irq; | 72 | int irq; |
59 | u32 irq_mask; | 73 | u32 irq_mask; |
diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h index 86bc635f8385..7a9f7089435d 100644 --- a/include/linux/mfd/rtsx_pci.h +++ b/include/linux/mfd/rtsx_pci.h | |||
@@ -575,6 +575,7 @@ | |||
575 | 575 | ||
576 | #define CARD_PWR_CTL 0xFD50 | 576 | #define CARD_PWR_CTL 0xFD50 |
577 | #define CARD_CLK_SWITCH 0xFD51 | 577 | #define CARD_CLK_SWITCH 0xFD51 |
578 | #define RTL8411B_PACKAGE_MODE 0xFD51 | ||
578 | #define CARD_SHARE_MODE 0xFD52 | 579 | #define CARD_SHARE_MODE 0xFD52 |
579 | #define CARD_DRIVE_SEL 0xFD53 | 580 | #define CARD_DRIVE_SEL 0xFD53 |
580 | #define CARD_STOP 0xFD54 | 581 | #define CARD_STOP 0xFD54 |
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h index f0f4de3b4ccc..378ae8a04c6a 100644 --- a/include/linux/mfd/samsung/core.h +++ b/include/linux/mfd/samsung/core.h | |||
@@ -14,8 +14,6 @@ | |||
14 | #ifndef __LINUX_MFD_SEC_CORE_H | 14 | #ifndef __LINUX_MFD_SEC_CORE_H |
15 | #define __LINUX_MFD_SEC_CORE_H | 15 | #define __LINUX_MFD_SEC_CORE_H |
16 | 16 | ||
17 | #define NUM_IRQ_REGS 4 | ||
18 | |||
19 | enum sec_device_type { | 17 | enum sec_device_type { |
20 | S5M8751X, | 18 | S5M8751X, |
21 | S5M8763X, | 19 | S5M8763X, |
@@ -44,8 +42,6 @@ struct sec_pmic_dev { | |||
44 | struct regmap *regmap; | 42 | struct regmap *regmap; |
45 | struct i2c_client *i2c; | 43 | struct i2c_client *i2c; |
46 | struct i2c_client *rtc; | 44 | struct i2c_client *rtc; |
47 | struct mutex iolock; | ||
48 | struct mutex irqlock; | ||
49 | 45 | ||
50 | int device_type; | 46 | int device_type; |
51 | int irq_base; | 47 | int irq_base; |
@@ -53,8 +49,6 @@ struct sec_pmic_dev { | |||
53 | struct regmap_irq_chip_data *irq_data; | 49 | struct regmap_irq_chip_data *irq_data; |
54 | 50 | ||
55 | int ono; | 51 | int ono; |
56 | u8 irq_masks_cur[NUM_IRQ_REGS]; | ||
57 | u8 irq_masks_cache[NUM_IRQ_REGS]; | ||
58 | int type; | 52 | int type; |
59 | bool wakeup; | 53 | bool wakeup; |
60 | }; | 54 | }; |
diff --git a/include/linux/mfd/samsung/s2mps11.h b/include/linux/mfd/samsung/s2mps11.h index ad2252f239d7..4e94dc65f987 100644 --- a/include/linux/mfd/samsung/s2mps11.h +++ b/include/linux/mfd/samsung/s2mps11.h | |||
@@ -189,6 +189,7 @@ enum s2mps11_regulators { | |||
189 | #define S2MPS11_ENABLE_SHIFT 0x06 | 189 | #define S2MPS11_ENABLE_SHIFT 0x06 |
190 | #define S2MPS11_LDO_N_VOLTAGES (S2MPS11_LDO_VSEL_MASK + 1) | 190 | #define S2MPS11_LDO_N_VOLTAGES (S2MPS11_LDO_VSEL_MASK + 1) |
191 | #define S2MPS11_BUCK_N_VOLTAGES (S2MPS11_BUCK_VSEL_MASK + 1) | 191 | #define S2MPS11_BUCK_N_VOLTAGES (S2MPS11_BUCK_VSEL_MASK + 1) |
192 | #define S2MPS11_RAMP_DELAY 25000 /* uV/us */ | ||
192 | 193 | ||
193 | #define S2MPS11_PMIC_EN_SHIFT 6 | 194 | #define S2MPS11_PMIC_EN_SHIFT 6 |
194 | #define S2MPS11_REGULATOR_MAX (S2MPS11_REG_MAX - 3) | 195 | #define S2MPS11_REGULATOR_MAX (S2MPS11_REG_MAX - 3) |
diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h index c79ad5d2f271..8d73fe29796a 100644 --- a/include/linux/mfd/ti_am335x_tscadc.h +++ b/include/linux/mfd/ti_am335x_tscadc.h | |||
@@ -30,8 +30,8 @@ | |||
30 | #define REG_IDLECONFIG 0x058 | 30 | #define REG_IDLECONFIG 0x058 |
31 | #define REG_CHARGECONFIG 0x05C | 31 | #define REG_CHARGECONFIG 0x05C |
32 | #define REG_CHARGEDELAY 0x060 | 32 | #define REG_CHARGEDELAY 0x060 |
33 | #define REG_STEPCONFIG(n) (0x64 + ((n - 1) * 8)) | 33 | #define REG_STEPCONFIG(n) (0x64 + ((n) * 8)) |
34 | #define REG_STEPDELAY(n) (0x68 + ((n - 1) * 8)) | 34 | #define REG_STEPDELAY(n) (0x68 + ((n) * 8)) |
35 | #define REG_FIFO0CNT 0xE4 | 35 | #define REG_FIFO0CNT 0xE4 |
36 | #define REG_FIFO0THR 0xE8 | 36 | #define REG_FIFO0THR 0xE8 |
37 | #define REG_FIFO1CNT 0xF0 | 37 | #define REG_FIFO1CNT 0xF0 |
@@ -46,8 +46,6 @@ | |||
46 | /* Step Enable */ | 46 | /* Step Enable */ |
47 | #define STEPENB_MASK (0x1FFFF << 0) | 47 | #define STEPENB_MASK (0x1FFFF << 0) |
48 | #define STEPENB(val) ((val) << 0) | 48 | #define STEPENB(val) ((val) << 0) |
49 | #define STPENB_STEPENB STEPENB(0x1FFFF) | ||
50 | #define STPENB_STEPENB_TC STEPENB(0x1FFF) | ||
51 | 49 | ||
52 | /* IRQ enable */ | 50 | /* IRQ enable */ |
53 | #define IRQENB_HW_PEN BIT(0) | 51 | #define IRQENB_HW_PEN BIT(0) |
@@ -73,8 +71,6 @@ | |||
73 | #define STEPCONFIG_INM_ADCREFM STEPCONFIG_INM(8) | 71 | #define STEPCONFIG_INM_ADCREFM STEPCONFIG_INM(8) |
74 | #define STEPCONFIG_INP_MASK (0xF << 19) | 72 | #define STEPCONFIG_INP_MASK (0xF << 19) |
75 | #define STEPCONFIG_INP(val) ((val) << 19) | 73 | #define STEPCONFIG_INP(val) ((val) << 19) |
76 | #define STEPCONFIG_INP_AN2 STEPCONFIG_INP(2) | ||
77 | #define STEPCONFIG_INP_AN3 STEPCONFIG_INP(3) | ||
78 | #define STEPCONFIG_INP_AN4 STEPCONFIG_INP(4) | 74 | #define STEPCONFIG_INP_AN4 STEPCONFIG_INP(4) |
79 | #define STEPCONFIG_INP_ADCREFM STEPCONFIG_INP(8) | 75 | #define STEPCONFIG_INP_ADCREFM STEPCONFIG_INP(8) |
80 | #define STEPCONFIG_FIFO1 BIT(26) | 76 | #define STEPCONFIG_FIFO1 BIT(26) |
@@ -96,7 +92,6 @@ | |||
96 | #define STEPCHARGE_INM_AN1 STEPCHARGE_INM(1) | 92 | #define STEPCHARGE_INM_AN1 STEPCHARGE_INM(1) |
97 | #define STEPCHARGE_INP_MASK (0xF << 19) | 93 | #define STEPCHARGE_INP_MASK (0xF << 19) |
98 | #define STEPCHARGE_INP(val) ((val) << 19) | 94 | #define STEPCHARGE_INP(val) ((val) << 19) |
99 | #define STEPCHARGE_INP_AN1 STEPCHARGE_INP(1) | ||
100 | #define STEPCHARGE_RFM_MASK (3 << 23) | 95 | #define STEPCHARGE_RFM_MASK (3 << 23) |
101 | #define STEPCHARGE_RFM(val) ((val) << 23) | 96 | #define STEPCHARGE_RFM(val) ((val) << 23) |
102 | #define STEPCHARGE_RFM_XNUR STEPCHARGE_RFM(1) | 97 | #define STEPCHARGE_RFM_XNUR STEPCHARGE_RFM(1) |
@@ -125,22 +120,17 @@ | |||
125 | 120 | ||
126 | #define TSCADC_CELLS 2 | 121 | #define TSCADC_CELLS 2 |
127 | 122 | ||
128 | enum tscadc_cells { | ||
129 | TSC_CELL, | ||
130 | ADC_CELL, | ||
131 | }; | ||
132 | |||
133 | struct mfd_tscadc_board { | ||
134 | struct tsc_data *tsc_init; | ||
135 | struct adc_data *adc_init; | ||
136 | }; | ||
137 | |||
138 | struct ti_tscadc_dev { | 123 | struct ti_tscadc_dev { |
139 | struct device *dev; | 124 | struct device *dev; |
140 | struct regmap *regmap_tscadc; | 125 | struct regmap *regmap_tscadc; |
141 | void __iomem *tscadc_base; | 126 | void __iomem *tscadc_base; |
142 | int irq; | 127 | int irq; |
128 | int used_cells; /* 1-2 */ | ||
129 | int tsc_cell; /* -1 if not used */ | ||
130 | int adc_cell; /* -1 if not used */ | ||
143 | struct mfd_cell cells[TSCADC_CELLS]; | 131 | struct mfd_cell cells[TSCADC_CELLS]; |
132 | u32 reg_se_cache; | ||
133 | spinlock_t reg_lock; | ||
144 | 134 | ||
145 | /* tsc device */ | 135 | /* tsc device */ |
146 | struct titsc *tsc; | 136 | struct titsc *tsc; |
@@ -149,4 +139,15 @@ struct ti_tscadc_dev { | |||
149 | struct adc_device *adc; | 139 | struct adc_device *adc; |
150 | }; | 140 | }; |
151 | 141 | ||
142 | static inline struct ti_tscadc_dev *ti_tscadc_dev_get(struct platform_device *p) | ||
143 | { | ||
144 | struct ti_tscadc_dev **tscadc_dev = p->dev.platform_data; | ||
145 | |||
146 | return *tscadc_dev; | ||
147 | } | ||
148 | |||
149 | void am335x_tsc_se_update(struct ti_tscadc_dev *tsadc); | ||
150 | void am335x_tsc_se_set(struct ti_tscadc_dev *tsadc, u32 val); | ||
151 | void am335x_tsc_se_clr(struct ti_tscadc_dev *tsadc, u32 val); | ||
152 | |||
152 | #endif | 153 | #endif |
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h index 99bf3e665997..ce3511326f80 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h | |||
@@ -81,10 +81,15 @@ int tmio_core_mmc_resume(void __iomem *cnf, int shift, unsigned long base); | |||
81 | void tmio_core_mmc_pwr(void __iomem *cnf, int shift, int state); | 81 | void tmio_core_mmc_pwr(void __iomem *cnf, int shift, int state); |
82 | void tmio_core_mmc_clk_div(void __iomem *cnf, int shift, int state); | 82 | void tmio_core_mmc_clk_div(void __iomem *cnf, int shift, int state); |
83 | 83 | ||
84 | struct dma_chan; | ||
85 | |||
84 | struct tmio_mmc_dma { | 86 | struct tmio_mmc_dma { |
85 | void *chan_priv_tx; | 87 | void *chan_priv_tx; |
86 | void *chan_priv_rx; | 88 | void *chan_priv_rx; |
89 | int slave_id_tx; | ||
90 | int slave_id_rx; | ||
87 | int alignment_shift; | 91 | int alignment_shift; |
92 | bool (*filter)(struct dma_chan *chan, void *arg); | ||
88 | }; | 93 | }; |
89 | 94 | ||
90 | struct tmio_mmc_host; | 95 | struct tmio_mmc_host; |
diff --git a/include/linux/mfd/tps6507x.h b/include/linux/mfd/tps6507x.h index c923e4864f55..c2ae56933539 100644 --- a/include/linux/mfd/tps6507x.h +++ b/include/linux/mfd/tps6507x.h | |||
@@ -163,7 +163,6 @@ struct tps6507x_dev { | |||
163 | 163 | ||
164 | /* Client devices */ | 164 | /* Client devices */ |
165 | struct tps6507x_pmic *pmic; | 165 | struct tps6507x_pmic *pmic; |
166 | struct tps6507x_ts *ts; | ||
167 | }; | 166 | }; |
168 | 167 | ||
169 | #endif /* __LINUX_MFD_TPS6507X_H */ | 168 | #endif /* __LINUX_MFD_TPS6507X_H */ |
diff --git a/include/linux/mfd/twl6040.h b/include/linux/mfd/twl6040.h index 94ac944d12f0..7e7fbce7a308 100644 --- a/include/linux/mfd/twl6040.h +++ b/include/linux/mfd/twl6040.h | |||
@@ -125,8 +125,15 @@ | |||
125 | 125 | ||
126 | #define TWL6040_HSDACENA (1 << 0) | 126 | #define TWL6040_HSDACENA (1 << 0) |
127 | #define TWL6040_HSDACMODE (1 << 1) | 127 | #define TWL6040_HSDACMODE (1 << 1) |
128 | #define TWL6040_HSDRVENA (1 << 2) | ||
128 | #define TWL6040_HSDRVMODE (1 << 3) | 129 | #define TWL6040_HSDRVMODE (1 << 3) |
129 | 130 | ||
131 | /* HFLCTL/R (0x14/0x16) fields */ | ||
132 | |||
133 | #define TWL6040_HFDACENA (1 << 0) | ||
134 | #define TWL6040_HFPGAENA (1 << 1) | ||
135 | #define TWL6040_HFDRVENA (1 << 4) | ||
136 | |||
130 | /* VIBCTLL/R (0x18/0x1A) fields */ | 137 | /* VIBCTLL/R (0x18/0x1A) fields */ |
131 | 138 | ||
132 | #define TWL6040_VIBENA (1 << 0) | 139 | #define TWL6040_VIBENA (1 << 0) |
diff --git a/include/linux/mfd/wm8994/core.h b/include/linux/mfd/wm8994/core.h index ae5c249530b4..40854ac0ba3d 100644 --- a/include/linux/mfd/wm8994/core.h +++ b/include/linux/mfd/wm8994/core.h | |||
@@ -29,6 +29,7 @@ enum wm8994_type { | |||
29 | 29 | ||
30 | struct regulator_dev; | 30 | struct regulator_dev; |
31 | struct regulator_bulk_data; | 31 | struct regulator_bulk_data; |
32 | struct irq_domain; | ||
32 | 33 | ||
33 | #define WM8994_NUM_GPIO_REGS 11 | 34 | #define WM8994_NUM_GPIO_REGS 11 |
34 | #define WM8994_NUM_LDO_REGS 2 | 35 | #define WM8994_NUM_LDO_REGS 2 |
@@ -73,6 +74,7 @@ struct wm8994 { | |||
73 | 74 | ||
74 | int irq; | 75 | int irq; |
75 | struct regmap_irq_chip_data *irq_data; | 76 | struct regmap_irq_chip_data *irq_data; |
77 | struct irq_domain *edge_irq; | ||
76 | 78 | ||
77 | /* Used over suspend/resume */ | 79 | /* Used over suspend/resume */ |
78 | bool suspended; | 80 | bool suspended; |
diff --git a/include/linux/mfd/wm8994/pdata.h b/include/linux/mfd/wm8994/pdata.h index 68e776594889..90c60524a496 100644 --- a/include/linux/mfd/wm8994/pdata.h +++ b/include/linux/mfd/wm8994/pdata.h | |||
@@ -182,6 +182,11 @@ struct wm8994_pdata { | |||
182 | */ | 182 | */ |
183 | int micdet_delay; | 183 | int micdet_delay; |
184 | 184 | ||
185 | /* Delay between microphone detect completing and reporting on | ||
186 | * insert (specified in ms) | ||
187 | */ | ||
188 | int mic_id_delay; | ||
189 | |||
185 | /* IRQ for microphone detection if brought out directly as a | 190 | /* IRQ for microphone detection if brought out directly as a |
186 | * signal. | 191 | * signal. |
187 | */ | 192 | */ |
@@ -223,6 +228,11 @@ struct wm8994_pdata { | |||
223 | * lines is mastered. | 228 | * lines is mastered. |
224 | */ | 229 | */ |
225 | int max_channels_clocked[WM8994_NUM_AIF]; | 230 | int max_channels_clocked[WM8994_NUM_AIF]; |
231 | |||
232 | /** | ||
233 | * GPIO for the IRQ pin if host only supports edge triggering | ||
234 | */ | ||
235 | int irq_gpio; | ||
226 | }; | 236 | }; |
227 | 237 | ||
228 | #endif | 238 | #endif |
diff --git a/include/linux/mfd/wm8994/registers.h b/include/linux/mfd/wm8994/registers.h index 053548961c15..db8cef3d5321 100644 --- a/include/linux/mfd/wm8994/registers.h +++ b/include/linux/mfd/wm8994/registers.h | |||
@@ -2668,6 +2668,10 @@ | |||
2668 | /* | 2668 | /* |
2669 | * R772 (0x304) - AIF1ADC LRCLK | 2669 | * R772 (0x304) - AIF1ADC LRCLK |
2670 | */ | 2670 | */ |
2671 | #define WM8958_AIF1_LRCLK_INV 0x1000 /* AIF1_LRCLK_INV */ | ||
2672 | #define WM8958_AIF1_LRCLK_INV_MASK 0x1000 /* AIF1_LRCLK_INV */ | ||
2673 | #define WM8958_AIF1_LRCLK_INV_SHIFT 12 /* AIF1_LRCLK_INV */ | ||
2674 | #define WM8958_AIF1_LRCLK_INV_WIDTH 1 /* AIF1_LRCLK_INV */ | ||
2671 | #define WM8994_AIF1ADC_LRCLK_DIR 0x0800 /* AIF1ADC_LRCLK_DIR */ | 2675 | #define WM8994_AIF1ADC_LRCLK_DIR 0x0800 /* AIF1ADC_LRCLK_DIR */ |
2672 | #define WM8994_AIF1ADC_LRCLK_DIR_MASK 0x0800 /* AIF1ADC_LRCLK_DIR */ | 2676 | #define WM8994_AIF1ADC_LRCLK_DIR_MASK 0x0800 /* AIF1ADC_LRCLK_DIR */ |
2673 | #define WM8994_AIF1ADC_LRCLK_DIR_SHIFT 11 /* AIF1ADC_LRCLK_DIR */ | 2677 | #define WM8994_AIF1ADC_LRCLK_DIR_SHIFT 11 /* AIF1ADC_LRCLK_DIR */ |
@@ -2679,6 +2683,10 @@ | |||
2679 | /* | 2683 | /* |
2680 | * R773 (0x305) - AIF1DAC LRCLK | 2684 | * R773 (0x305) - AIF1DAC LRCLK |
2681 | */ | 2685 | */ |
2686 | #define WM8958_AIF1_LRCLK_INV 0x1000 /* AIF1_LRCLK_INV */ | ||
2687 | #define WM8958_AIF1_LRCLK_INV_MASK 0x1000 /* AIF1_LRCLK_INV */ | ||
2688 | #define WM8958_AIF1_LRCLK_INV_SHIFT 12 /* AIF1_LRCLK_INV */ | ||
2689 | #define WM8958_AIF1_LRCLK_INV_WIDTH 1 /* AIF1_LRCLK_INV */ | ||
2682 | #define WM8994_AIF1DAC_LRCLK_DIR 0x0800 /* AIF1DAC_LRCLK_DIR */ | 2690 | #define WM8994_AIF1DAC_LRCLK_DIR 0x0800 /* AIF1DAC_LRCLK_DIR */ |
2683 | #define WM8994_AIF1DAC_LRCLK_DIR_MASK 0x0800 /* AIF1DAC_LRCLK_DIR */ | 2691 | #define WM8994_AIF1DAC_LRCLK_DIR_MASK 0x0800 /* AIF1DAC_LRCLK_DIR */ |
2684 | #define WM8994_AIF1DAC_LRCLK_DIR_SHIFT 11 /* AIF1DAC_LRCLK_DIR */ | 2692 | #define WM8994_AIF1DAC_LRCLK_DIR_SHIFT 11 /* AIF1DAC_LRCLK_DIR */ |
diff --git a/include/linux/mlx4/cmd.h b/include/linux/mlx4/cmd.h index adf6e0648f20..bb1c8096a7eb 100644 --- a/include/linux/mlx4/cmd.h +++ b/include/linux/mlx4/cmd.h | |||
@@ -111,6 +111,7 @@ enum { | |||
111 | MLX4_CMD_INIT2INIT_QP = 0x2d, | 111 | MLX4_CMD_INIT2INIT_QP = 0x2d, |
112 | MLX4_CMD_SUSPEND_QP = 0x32, | 112 | MLX4_CMD_SUSPEND_QP = 0x32, |
113 | MLX4_CMD_UNSUSPEND_QP = 0x33, | 113 | MLX4_CMD_UNSUSPEND_QP = 0x33, |
114 | MLX4_CMD_UPDATE_QP = 0x61, | ||
114 | /* special QP and management commands */ | 115 | /* special QP and management commands */ |
115 | MLX4_CMD_CONF_SPECIAL_QP = 0x23, | 116 | MLX4_CMD_CONF_SPECIAL_QP = 0x23, |
116 | MLX4_CMD_MAD_IFC = 0x24, | 117 | MLX4_CMD_MAD_IFC = 0x24, |
@@ -237,7 +238,7 @@ int mlx4_set_vf_mac(struct mlx4_dev *dev, int port, int vf, u64 mac); | |||
237 | int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan, u8 qos); | 238 | int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan, u8 qos); |
238 | int mlx4_set_vf_spoofchk(struct mlx4_dev *dev, int port, int vf, bool setting); | 239 | int mlx4_set_vf_spoofchk(struct mlx4_dev *dev, int port, int vf, bool setting); |
239 | int mlx4_get_vf_config(struct mlx4_dev *dev, int port, int vf, struct ifla_vf_info *ivf); | 240 | int mlx4_get_vf_config(struct mlx4_dev *dev, int port, int vf, struct ifla_vf_info *ivf); |
240 | 241 | int mlx4_set_vf_link_state(struct mlx4_dev *dev, int port, int vf, int link_state); | |
241 | 242 | ||
242 | #define MLX4_COMM_GET_IF_REV(cmd_chan_ver) (u8)((cmd_chan_ver) >> 8) | 243 | #define MLX4_COMM_GET_IF_REV(cmd_chan_ver) (u8)((cmd_chan_ver) >> 8) |
243 | 244 | ||
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index a51b0134ce18..52c23a892bab 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -157,7 +157,8 @@ enum { | |||
157 | MLX4_DEV_CAP_FLAGS2_REASSIGN_MAC_EN = 1LL << 4, | 157 | MLX4_DEV_CAP_FLAGS2_REASSIGN_MAC_EN = 1LL << 4, |
158 | MLX4_DEV_CAP_FLAG2_TS = 1LL << 5, | 158 | MLX4_DEV_CAP_FLAG2_TS = 1LL << 5, |
159 | MLX4_DEV_CAP_FLAG2_VLAN_CONTROL = 1LL << 6, | 159 | MLX4_DEV_CAP_FLAG2_VLAN_CONTROL = 1LL << 6, |
160 | MLX4_DEV_CAP_FLAG2_FSM = 1LL << 7 | 160 | MLX4_DEV_CAP_FLAG2_FSM = 1LL << 7, |
161 | MLX4_DEV_CAP_FLAG2_UPDATE_QP = 1LL << 8 | ||
161 | }; | 162 | }; |
162 | 163 | ||
163 | enum { | 164 | enum { |
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index 352eec9df1b8..262deac02c9e 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h | |||
@@ -152,6 +152,8 @@ enum { /* fl */ | |||
152 | }; | 152 | }; |
153 | enum { /* vlan_control */ | 153 | enum { /* vlan_control */ |
154 | MLX4_VLAN_CTRL_ETH_TX_BLOCK_TAGGED = 1 << 6, | 154 | MLX4_VLAN_CTRL_ETH_TX_BLOCK_TAGGED = 1 << 6, |
155 | MLX4_VLAN_CTRL_ETH_TX_BLOCK_PRIO_TAGGED = 1 << 5, /* 802.1p priority tag */ | ||
156 | MLX4_VLAN_CTRL_ETH_TX_BLOCK_UNTAGGED = 1 << 4, | ||
155 | MLX4_VLAN_CTRL_ETH_RX_BLOCK_TAGGED = 1 << 2, | 157 | MLX4_VLAN_CTRL_ETH_RX_BLOCK_TAGGED = 1 << 2, |
156 | MLX4_VLAN_CTRL_ETH_RX_BLOCK_PRIO_TAGGED = 1 << 1, /* 802.1p priority tag */ | 158 | MLX4_VLAN_CTRL_ETH_RX_BLOCK_PRIO_TAGGED = 1 << 1, /* 802.1p priority tag */ |
157 | MLX4_VLAN_CTRL_ETH_RX_BLOCK_UNTAGGED = 1 << 0 | 159 | MLX4_VLAN_CTRL_ETH_RX_BLOCK_UNTAGGED = 1 << 0 |
@@ -206,6 +208,40 @@ struct mlx4_qp_context { | |||
206 | u32 reserved5[10]; | 208 | u32 reserved5[10]; |
207 | }; | 209 | }; |
208 | 210 | ||
211 | struct mlx4_update_qp_context { | ||
212 | __be64 qp_mask; | ||
213 | __be64 primary_addr_path_mask; | ||
214 | __be64 secondary_addr_path_mask; | ||
215 | u64 reserved1; | ||
216 | struct mlx4_qp_context qp_context; | ||
217 | u64 reserved2[58]; | ||
218 | }; | ||
219 | |||
220 | enum { | ||
221 | MLX4_UPD_QP_MASK_PM_STATE = 32, | ||
222 | MLX4_UPD_QP_MASK_VSD = 33, | ||
223 | }; | ||
224 | |||
225 | enum { | ||
226 | MLX4_UPD_QP_PATH_MASK_PKEY_INDEX = 0 + 32, | ||
227 | MLX4_UPD_QP_PATH_MASK_FSM = 1 + 32, | ||
228 | MLX4_UPD_QP_PATH_MASK_MAC_INDEX = 2 + 32, | ||
229 | MLX4_UPD_QP_PATH_MASK_FVL = 3 + 32, | ||
230 | MLX4_UPD_QP_PATH_MASK_CV = 4 + 32, | ||
231 | MLX4_UPD_QP_PATH_MASK_VLAN_INDEX = 5 + 32, | ||
232 | MLX4_UPD_QP_PATH_MASK_ETH_HIDE_CQE_VLAN = 6 + 32, | ||
233 | MLX4_UPD_QP_PATH_MASK_ETH_TX_BLOCK_UNTAGGED = 7 + 32, | ||
234 | MLX4_UPD_QP_PATH_MASK_ETH_TX_BLOCK_1P = 8 + 32, | ||
235 | MLX4_UPD_QP_PATH_MASK_ETH_TX_BLOCK_TAGGED = 9 + 32, | ||
236 | MLX4_UPD_QP_PATH_MASK_ETH_RX_BLOCK_UNTAGGED = 10 + 32, | ||
237 | MLX4_UPD_QP_PATH_MASK_ETH_RX_BLOCK_1P = 11 + 32, | ||
238 | MLX4_UPD_QP_PATH_MASK_ETH_RX_BLOCK_TAGGED = 12 + 32, | ||
239 | MLX4_UPD_QP_PATH_MASK_FEUP = 13 + 32, | ||
240 | MLX4_UPD_QP_PATH_MASK_SCHED_QUEUE = 14 + 32, | ||
241 | MLX4_UPD_QP_PATH_MASK_IF_COUNTER_INDEX = 15 + 32, | ||
242 | MLX4_UPD_QP_PATH_MASK_FVL_RX = 16 + 32, | ||
243 | }; | ||
244 | |||
209 | enum { /* param3 */ | 245 | enum { /* param3 */ |
210 | MLX4_STRIP_VLAN = 1 << 30 | 246 | MLX4_STRIP_VLAN = 1 << 30 |
211 | }; | 247 | }; |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 66d881f1d576..f0224608d15e 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -25,11 +25,17 @@ struct file_ra_state; | |||
25 | struct user_struct; | 25 | struct user_struct; |
26 | struct writeback_control; | 26 | struct writeback_control; |
27 | 27 | ||
28 | #ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ | 28 | #ifndef CONFIG_NEED_MULTIPLE_NODES /* Don't use mapnrs, do it properly */ |
29 | extern unsigned long max_mapnr; | 29 | extern unsigned long max_mapnr; |
30 | |||
31 | static inline void set_max_mapnr(unsigned long limit) | ||
32 | { | ||
33 | max_mapnr = limit; | ||
34 | } | ||
35 | #else | ||
36 | static inline void set_max_mapnr(unsigned long limit) { } | ||
30 | #endif | 37 | #endif |
31 | 38 | ||
32 | extern unsigned long num_physpages; | ||
33 | extern unsigned long totalram_pages; | 39 | extern unsigned long totalram_pages; |
34 | extern void * high_memory; | 40 | extern void * high_memory; |
35 | extern int page_cluster; | 41 | extern int page_cluster; |
@@ -52,6 +58,9 @@ extern unsigned long sysctl_admin_reserve_kbytes; | |||
52 | /* to align the pointer to the (next) page boundary */ | 58 | /* to align the pointer to the (next) page boundary */ |
53 | #define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE) | 59 | #define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE) |
54 | 60 | ||
61 | /* test whether an address (unsigned long or pointer) is aligned to PAGE_SIZE */ | ||
62 | #define PAGE_ALIGNED(addr) IS_ALIGNED((unsigned long)addr, PAGE_SIZE) | ||
63 | |||
55 | /* | 64 | /* |
56 | * Linux kernel virtual memory manager primitives. | 65 | * Linux kernel virtual memory manager primitives. |
57 | * The idea being to have a "virtual" mm in the same way | 66 | * The idea being to have a "virtual" mm in the same way |
@@ -142,12 +151,6 @@ extern unsigned int kobjsize(const void *objp); | |||
142 | #define VM_STACK_FLAGS (VM_GROWSDOWN | VM_STACK_DEFAULT_FLAGS | VM_ACCOUNT) | 151 | #define VM_STACK_FLAGS (VM_GROWSDOWN | VM_STACK_DEFAULT_FLAGS | VM_ACCOUNT) |
143 | #endif | 152 | #endif |
144 | 153 | ||
145 | #define VM_READHINTMASK (VM_SEQ_READ | VM_RAND_READ) | ||
146 | #define VM_ClearReadHint(v) (v)->vm_flags &= ~VM_READHINTMASK | ||
147 | #define VM_NormalReadHint(v) (!((v)->vm_flags & VM_READHINTMASK)) | ||
148 | #define VM_SequentialReadHint(v) ((v)->vm_flags & VM_SEQ_READ) | ||
149 | #define VM_RandomReadHint(v) ((v)->vm_flags & VM_RAND_READ) | ||
150 | |||
151 | /* | 154 | /* |
152 | * Special vmas that are non-mergable, non-mlock()able. | 155 | * Special vmas that are non-mergable, non-mlock()able. |
153 | * Note: mm/huge_memory.c VM_NO_THP depends on this definition. | 156 | * Note: mm/huge_memory.c VM_NO_THP depends on this definition. |
@@ -1305,11 +1308,12 @@ extern void free_initmem(void); | |||
1305 | /* | 1308 | /* |
1306 | * Free reserved pages within range [PAGE_ALIGN(start), end & PAGE_MASK) | 1309 | * Free reserved pages within range [PAGE_ALIGN(start), end & PAGE_MASK) |
1307 | * into the buddy system. The freed pages will be poisoned with pattern | 1310 | * into the buddy system. The freed pages will be poisoned with pattern |
1308 | * "poison" if it's non-zero. | 1311 | * "poison" if it's within range [0, UCHAR_MAX]. |
1309 | * Return pages freed into the buddy system. | 1312 | * Return pages freed into the buddy system. |
1310 | */ | 1313 | */ |
1311 | extern unsigned long free_reserved_area(unsigned long start, unsigned long end, | 1314 | extern unsigned long free_reserved_area(void *start, void *end, |
1312 | int poison, char *s); | 1315 | int poison, char *s); |
1316 | |||
1313 | #ifdef CONFIG_HIGHMEM | 1317 | #ifdef CONFIG_HIGHMEM |
1314 | /* | 1318 | /* |
1315 | * Free a highmem page into the buddy system, adjusting totalhigh_pages | 1319 | * Free a highmem page into the buddy system, adjusting totalhigh_pages |
@@ -1318,10 +1322,8 @@ extern unsigned long free_reserved_area(unsigned long start, unsigned long end, | |||
1318 | extern void free_highmem_page(struct page *page); | 1322 | extern void free_highmem_page(struct page *page); |
1319 | #endif | 1323 | #endif |
1320 | 1324 | ||
1321 | static inline void adjust_managed_page_count(struct page *page, long count) | 1325 | extern void adjust_managed_page_count(struct page *page, long count); |
1322 | { | 1326 | extern void mem_init_print_info(const char *str); |
1323 | totalram_pages += count; | ||
1324 | } | ||
1325 | 1327 | ||
1326 | /* Free the reserved page into the buddy system, so it gets managed. */ | 1328 | /* Free the reserved page into the buddy system, so it gets managed. */ |
1327 | static inline void __free_reserved_page(struct page *page) | 1329 | static inline void __free_reserved_page(struct page *page) |
@@ -1345,18 +1347,29 @@ static inline void mark_page_reserved(struct page *page) | |||
1345 | 1347 | ||
1346 | /* | 1348 | /* |
1347 | * Default method to free all the __init memory into the buddy system. | 1349 | * Default method to free all the __init memory into the buddy system. |
1348 | * The freed pages will be poisoned with pattern "poison" if it is | 1350 | * The freed pages will be poisoned with pattern "poison" if it's within |
1349 | * non-zero. Return pages freed into the buddy system. | 1351 | * range [0, UCHAR_MAX]. |
1352 | * Return pages freed into the buddy system. | ||
1350 | */ | 1353 | */ |
1351 | static inline unsigned long free_initmem_default(int poison) | 1354 | static inline unsigned long free_initmem_default(int poison) |
1352 | { | 1355 | { |
1353 | extern char __init_begin[], __init_end[]; | 1356 | extern char __init_begin[], __init_end[]; |
1354 | 1357 | ||
1355 | return free_reserved_area(PAGE_ALIGN((unsigned long)&__init_begin) , | 1358 | return free_reserved_area(&__init_begin, &__init_end, |
1356 | ((unsigned long)&__init_end) & PAGE_MASK, | ||
1357 | poison, "unused kernel"); | 1359 | poison, "unused kernel"); |
1358 | } | 1360 | } |
1359 | 1361 | ||
1362 | static inline unsigned long get_num_physpages(void) | ||
1363 | { | ||
1364 | int nid; | ||
1365 | unsigned long phys_pages = 0; | ||
1366 | |||
1367 | for_each_online_node(nid) | ||
1368 | phys_pages += node_present_pages(nid); | ||
1369 | |||
1370 | return phys_pages; | ||
1371 | } | ||
1372 | |||
1360 | #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP | 1373 | #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP |
1361 | /* | 1374 | /* |
1362 | * With CONFIG_HAVE_MEMBLOCK_NODE_MAP set, an architecture may initialise its | 1375 | * With CONFIG_HAVE_MEMBLOCK_NODE_MAP set, an architecture may initialise its |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index ace9a5f01c64..fb425aa16c01 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -330,12 +330,9 @@ struct mm_struct { | |||
330 | unsigned long (*get_unmapped_area) (struct file *filp, | 330 | unsigned long (*get_unmapped_area) (struct file *filp, |
331 | unsigned long addr, unsigned long len, | 331 | unsigned long addr, unsigned long len, |
332 | unsigned long pgoff, unsigned long flags); | 332 | unsigned long pgoff, unsigned long flags); |
333 | void (*unmap_area) (struct mm_struct *mm, unsigned long addr); | ||
334 | #endif | 333 | #endif |
335 | unsigned long mmap_base; /* base of mmap area */ | 334 | unsigned long mmap_base; /* base of mmap area */ |
336 | unsigned long task_size; /* size of task vm space */ | 335 | unsigned long task_size; /* size of task vm space */ |
337 | unsigned long cached_hole_size; /* if non-zero, the largest hole below free_area_cache */ | ||
338 | unsigned long free_area_cache; /* first hole of size cached_hole_size or larger */ | ||
339 | unsigned long highest_vm_end; /* highest vma end address */ | 336 | unsigned long highest_vm_end; /* highest vma end address */ |
340 | pgd_t * pgd; | 337 | pgd_t * pgd; |
341 | atomic_t mm_users; /* How many users with user space? */ | 338 | atomic_t mm_users; /* How many users with user space? */ |
diff --git a/include/linux/mman.h b/include/linux/mman.h index 9aa863da287f..92dc257251e4 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h | |||
@@ -11,11 +11,17 @@ extern int sysctl_overcommit_memory; | |||
11 | extern int sysctl_overcommit_ratio; | 11 | extern int sysctl_overcommit_ratio; |
12 | extern struct percpu_counter vm_committed_as; | 12 | extern struct percpu_counter vm_committed_as; |
13 | 13 | ||
14 | #ifdef CONFIG_SMP | ||
15 | extern s32 vm_committed_as_batch; | ||
16 | #else | ||
17 | #define vm_committed_as_batch 0 | ||
18 | #endif | ||
19 | |||
14 | unsigned long vm_memory_committed(void); | 20 | unsigned long vm_memory_committed(void); |
15 | 21 | ||
16 | static inline void vm_acct_memory(long pages) | 22 | static inline void vm_acct_memory(long pages) |
17 | { | 23 | { |
18 | percpu_counter_add(&vm_committed_as, pages); | 24 | __percpu_counter_add(&vm_committed_as, pages, vm_committed_as_batch); |
19 | } | 25 | } |
20 | 26 | ||
21 | static inline void vm_unacct_memory(long pages) | 27 | static inline void vm_unacct_memory(long pages) |
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index f31725ba49f3..842de3e21e70 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
@@ -94,7 +94,11 @@ struct mmc_ext_csd { | |||
94 | u8 raw_ext_csd_structure; /* 194 */ | 94 | u8 raw_ext_csd_structure; /* 194 */ |
95 | u8 raw_card_type; /* 196 */ | 95 | u8 raw_card_type; /* 196 */ |
96 | u8 out_of_int_time; /* 198 */ | 96 | u8 out_of_int_time; /* 198 */ |
97 | u8 raw_s_a_timeout; /* 217 */ | 97 | u8 raw_pwr_cl_52_195; /* 200 */ |
98 | u8 raw_pwr_cl_26_195; /* 201 */ | ||
99 | u8 raw_pwr_cl_52_360; /* 202 */ | ||
100 | u8 raw_pwr_cl_26_360; /* 203 */ | ||
101 | u8 raw_s_a_timeout; /* 217 */ | ||
98 | u8 raw_hc_erase_gap_size; /* 221 */ | 102 | u8 raw_hc_erase_gap_size; /* 221 */ |
99 | u8 raw_erase_timeout_mult; /* 223 */ | 103 | u8 raw_erase_timeout_mult; /* 223 */ |
100 | u8 raw_hc_erase_grp_size; /* 224 */ | 104 | u8 raw_hc_erase_grp_size; /* 224 */ |
@@ -102,6 +106,10 @@ struct mmc_ext_csd { | |||
102 | u8 raw_sec_erase_mult; /* 230 */ | 106 | u8 raw_sec_erase_mult; /* 230 */ |
103 | u8 raw_sec_feature_support;/* 231 */ | 107 | u8 raw_sec_feature_support;/* 231 */ |
104 | u8 raw_trim_mult; /* 232 */ | 108 | u8 raw_trim_mult; /* 232 */ |
109 | u8 raw_pwr_cl_200_195; /* 236 */ | ||
110 | u8 raw_pwr_cl_200_360; /* 237 */ | ||
111 | u8 raw_pwr_cl_ddr_52_195; /* 238 */ | ||
112 | u8 raw_pwr_cl_ddr_52_360; /* 239 */ | ||
105 | u8 raw_bkops_status; /* 246 */ | 113 | u8 raw_bkops_status; /* 246 */ |
106 | u8 raw_sectors[4]; /* 212 - 4 bytes */ | 114 | u8 raw_sectors[4]; /* 212 - 4 bytes */ |
107 | 115 | ||
@@ -512,6 +520,7 @@ struct mmc_driver { | |||
512 | void (*remove)(struct mmc_card *); | 520 | void (*remove)(struct mmc_card *); |
513 | int (*suspend)(struct mmc_card *); | 521 | int (*suspend)(struct mmc_card *); |
514 | int (*resume)(struct mmc_card *); | 522 | int (*resume)(struct mmc_card *); |
523 | void (*shutdown)(struct mmc_card *); | ||
515 | }; | 524 | }; |
516 | 525 | ||
517 | extern int mmc_register_driver(struct mmc_driver *); | 526 | extern int mmc_register_driver(struct mmc_driver *); |
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index 39613b9a6fc5..443243b241d5 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h | |||
@@ -96,6 +96,8 @@ struct mmc_command { | |||
96 | */ | 96 | */ |
97 | 97 | ||
98 | unsigned int cmd_timeout_ms; /* in milliseconds */ | 98 | unsigned int cmd_timeout_ms; /* in milliseconds */ |
99 | /* Set this flag only for blocking sanitize request */ | ||
100 | bool sanitize_busy; | ||
99 | 101 | ||
100 | struct mmc_data *data; /* data segment associated with cmd */ | 102 | struct mmc_data *data; /* data segment associated with cmd */ |
101 | struct mmc_request *mrq; /* associated request */ | 103 | struct mmc_request *mrq; /* associated request */ |
@@ -188,6 +190,9 @@ extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort); | |||
188 | extern void mmc_release_host(struct mmc_host *host); | 190 | extern void mmc_release_host(struct mmc_host *host); |
189 | extern int mmc_try_claim_host(struct mmc_host *host); | 191 | extern int mmc_try_claim_host(struct mmc_host *host); |
190 | 192 | ||
193 | extern void mmc_get_card(struct mmc_card *card); | ||
194 | extern void mmc_put_card(struct mmc_card *card); | ||
195 | |||
191 | extern int mmc_flush_cache(struct mmc_card *); | 196 | extern int mmc_flush_cache(struct mmc_card *); |
192 | 197 | ||
193 | extern int mmc_detect_card_removed(struct mmc_host *host); | 198 | extern int mmc_detect_card_removed(struct mmc_host *host); |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index e326ae2882a0..3b0c33ae13e1 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -239,7 +239,7 @@ struct mmc_host { | |||
239 | #define MMC_CAP_SPI (1 << 4) /* Talks only SPI protocols */ | 239 | #define MMC_CAP_SPI (1 << 4) /* Talks only SPI protocols */ |
240 | #define MMC_CAP_NEEDS_POLL (1 << 5) /* Needs polling for card-detection */ | 240 | #define MMC_CAP_NEEDS_POLL (1 << 5) /* Needs polling for card-detection */ |
241 | #define MMC_CAP_8_BIT_DATA (1 << 6) /* Can the host do 8 bit transfers */ | 241 | #define MMC_CAP_8_BIT_DATA (1 << 6) /* Can the host do 8 bit transfers */ |
242 | 242 | #define MMC_CAP_AGGRESSIVE_PM (1 << 7) /* Suspend (e)MMC/SD at idle */ | |
243 | #define MMC_CAP_NONREMOVABLE (1 << 8) /* Nonremovable e.g. eMMC */ | 243 | #define MMC_CAP_NONREMOVABLE (1 << 8) /* Nonremovable e.g. eMMC */ |
244 | #define MMC_CAP_WAIT_WHILE_BUSY (1 << 9) /* Waits while card is busy */ | 244 | #define MMC_CAP_WAIT_WHILE_BUSY (1 << 9) /* Waits while card is busy */ |
245 | #define MMC_CAP_ERASE (1 << 10) /* Allow erase/trim commands */ | 245 | #define MMC_CAP_ERASE (1 << 10) /* Allow erase/trim commands */ |
@@ -264,7 +264,7 @@ struct mmc_host { | |||
264 | 264 | ||
265 | #define MMC_CAP2_BOOTPART_NOACC (1 << 0) /* Boot partition no access */ | 265 | #define MMC_CAP2_BOOTPART_NOACC (1 << 0) /* Boot partition no access */ |
266 | #define MMC_CAP2_CACHE_CTRL (1 << 1) /* Allow cache control */ | 266 | #define MMC_CAP2_CACHE_CTRL (1 << 1) /* Allow cache control */ |
267 | #define MMC_CAP2_POWEROFF_NOTIFY (1 << 2) /* Notify poweroff supported */ | 267 | #define MMC_CAP2_FULL_PWR_CYCLE (1 << 2) /* Can do full power cycle */ |
268 | #define MMC_CAP2_NO_MULTI_READ (1 << 3) /* Multiblock reads don't work */ | 268 | #define MMC_CAP2_NO_MULTI_READ (1 << 3) /* Multiblock reads don't work */ |
269 | #define MMC_CAP2_NO_SLEEP_CMD (1 << 4) /* Don't allow sleep command */ | 269 | #define MMC_CAP2_NO_SLEEP_CMD (1 << 4) /* Don't allow sleep command */ |
270 | #define MMC_CAP2_HS200_1_8V_SDR (1 << 5) /* can support */ | 270 | #define MMC_CAP2_HS200_1_8V_SDR (1 << 5) /* can support */ |
@@ -272,7 +272,6 @@ struct mmc_host { | |||
272 | #define MMC_CAP2_HS200 (MMC_CAP2_HS200_1_8V_SDR | \ | 272 | #define MMC_CAP2_HS200 (MMC_CAP2_HS200_1_8V_SDR | \ |
273 | MMC_CAP2_HS200_1_2V_SDR) | 273 | MMC_CAP2_HS200_1_2V_SDR) |
274 | #define MMC_CAP2_BROKEN_VOLTAGE (1 << 7) /* Use the broken voltage */ | 274 | #define MMC_CAP2_BROKEN_VOLTAGE (1 << 7) /* Use the broken voltage */ |
275 | #define MMC_CAP2_DETECT_ON_ERR (1 << 8) /* On I/O err check card removal */ | ||
276 | #define MMC_CAP2_HC_ERASE_SZ (1 << 9) /* High-capacity erase size */ | 275 | #define MMC_CAP2_HC_ERASE_SZ (1 << 9) /* High-capacity erase size */ |
277 | #define MMC_CAP2_CD_ACTIVE_HIGH (1 << 10) /* Card-detect signal active high */ | 276 | #define MMC_CAP2_CD_ACTIVE_HIGH (1 << 10) /* Card-detect signal active high */ |
278 | #define MMC_CAP2_RO_ACTIVE_HIGH (1 << 11) /* Write-protect signal active high */ | 277 | #define MMC_CAP2_RO_ACTIVE_HIGH (1 << 11) /* Write-protect signal active high */ |
@@ -281,6 +280,7 @@ struct mmc_host { | |||
281 | #define MMC_CAP2_PACKED_CMD (MMC_CAP2_PACKED_RD | \ | 280 | #define MMC_CAP2_PACKED_CMD (MMC_CAP2_PACKED_RD | \ |
282 | MMC_CAP2_PACKED_WR) | 281 | MMC_CAP2_PACKED_WR) |
283 | #define MMC_CAP2_NO_PRESCAN_POWERUP (1 << 14) /* Don't power up before scan */ | 282 | #define MMC_CAP2_NO_PRESCAN_POWERUP (1 << 14) /* Don't power up before scan */ |
283 | #define MMC_CAP2_SANITIZE (1 << 15) /* Support Sanitize */ | ||
284 | 284 | ||
285 | mmc_pm_flag_t pm_caps; /* supported pm features */ | 285 | mmc_pm_flag_t pm_caps; /* supported pm features */ |
286 | 286 | ||
@@ -369,7 +369,7 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *); | |||
369 | int mmc_add_host(struct mmc_host *); | 369 | int mmc_add_host(struct mmc_host *); |
370 | void mmc_remove_host(struct mmc_host *); | 370 | void mmc_remove_host(struct mmc_host *); |
371 | void mmc_free_host(struct mmc_host *); | 371 | void mmc_free_host(struct mmc_host *); |
372 | void mmc_of_parse(struct mmc_host *host); | 372 | int mmc_of_parse(struct mmc_host *host); |
373 | 373 | ||
374 | static inline void *mmc_priv(struct mmc_host *host) | 374 | static inline void *mmc_priv(struct mmc_host *host) |
375 | { | 375 | { |
@@ -425,10 +425,6 @@ static inline int mmc_regulator_get_supply(struct mmc_host *mmc) | |||
425 | } | 425 | } |
426 | #endif | 426 | #endif |
427 | 427 | ||
428 | int mmc_card_awake(struct mmc_host *host); | ||
429 | int mmc_card_sleep(struct mmc_host *host); | ||
430 | int mmc_card_can_sleep(struct mmc_host *host); | ||
431 | |||
432 | int mmc_pm_notify(struct notifier_block *notify_block, unsigned long, void *); | 428 | int mmc_pm_notify(struct notifier_block *notify_block, unsigned long, void *); |
433 | 429 | ||
434 | /* Module parameter */ | 430 | /* Module parameter */ |
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index b838ffc49e4a..e3c6a74d980a 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h | |||
@@ -95,6 +95,9 @@ struct sdhci_host { | |||
95 | /* The system physically doesn't support 1.8v, even if the host does */ | 95 | /* The system physically doesn't support 1.8v, even if the host does */ |
96 | #define SDHCI_QUIRK2_NO_1_8_V (1<<2) | 96 | #define SDHCI_QUIRK2_NO_1_8_V (1<<2) |
97 | #define SDHCI_QUIRK2_PRESET_VALUE_BROKEN (1<<3) | 97 | #define SDHCI_QUIRK2_PRESET_VALUE_BROKEN (1<<3) |
98 | #define SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON (1<<4) | ||
99 | /* Controller has a non-standard host control register */ | ||
100 | #define SDHCI_QUIRK2_BROKEN_HOST_CONTROL (1<<5) | ||
98 | 101 | ||
99 | int irq; /* Device IRQ */ | 102 | int irq; /* Device IRQ */ |
100 | void __iomem *ioaddr; /* Mapped address */ | 103 | void __iomem *ioaddr; /* Mapped address */ |
@@ -126,7 +129,7 @@ struct sdhci_host { | |||
126 | #define SDHCI_AUTO_CMD23 (1<<7) /* Auto CMD23 support */ | 129 | #define SDHCI_AUTO_CMD23 (1<<7) /* Auto CMD23 support */ |
127 | #define SDHCI_PV_ENABLED (1<<8) /* Preset value enabled */ | 130 | #define SDHCI_PV_ENABLED (1<<8) /* Preset value enabled */ |
128 | #define SDHCI_SDIO_IRQ_ENABLED (1<<9) /* SDIO irq enabled */ | 131 | #define SDHCI_SDIO_IRQ_ENABLED (1<<9) /* SDIO irq enabled */ |
129 | #define SDHCI_HS200_NEEDS_TUNING (1<<10) /* HS200 needs tuning */ | 132 | #define SDHCI_SDR104_NEEDS_TUNING (1<<10) /* SDR104/HS200 needs tuning */ |
130 | #define SDHCI_USING_RETUNING_TIMER (1<<11) /* Host is using a retuning timer for the card */ | 133 | #define SDHCI_USING_RETUNING_TIMER (1<<11) /* Host is using a retuning timer for the card */ |
131 | 134 | ||
132 | unsigned int version; /* SDHCI spec. version */ | 135 | unsigned int version; /* SDHCI spec. version */ |
@@ -139,6 +142,7 @@ struct sdhci_host { | |||
139 | u8 pwr; /* Current voltage */ | 142 | u8 pwr; /* Current voltage */ |
140 | 143 | ||
141 | bool runtime_suspended; /* Host is runtime suspended */ | 144 | bool runtime_suspended; /* Host is runtime suspended */ |
145 | bool bus_on; /* Bus power prevents runtime suspend */ | ||
142 | 146 | ||
143 | struct mmc_request *mrq; /* Current request */ | 147 | struct mmc_request *mrq; /* Current request */ |
144 | struct mmc_command *cmd; /* Current command */ | 148 | struct mmc_command *cmd; /* Current command */ |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 5c76737d836b..af4a3b77a8de 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -474,10 +474,16 @@ struct zone { | |||
474 | * frequently read in proximity to zone->lock. It's good to | 474 | * frequently read in proximity to zone->lock. It's good to |
475 | * give them a chance of being in the same cacheline. | 475 | * give them a chance of being in the same cacheline. |
476 | * | 476 | * |
477 | * Write access to present_pages and managed_pages at runtime should | 477 | * Write access to present_pages at runtime should be protected by |
478 | * be protected by lock_memory_hotplug()/unlock_memory_hotplug(). | 478 | * lock_memory_hotplug()/unlock_memory_hotplug(). Any reader who can't |
479 | * Any reader who can't tolerant drift of present_pages and | 479 | * tolerant drift of present_pages should hold memory hotplug lock to |
480 | * managed_pages should hold memory hotplug lock to get a stable value. | 480 | * get a stable value. |
481 | * | ||
482 | * Read access to managed_pages should be safe because it's unsigned | ||
483 | * long. Write access to zone->managed_pages and totalram_pages are | ||
484 | * protected by managed_page_count_lock at runtime. Idealy only | ||
485 | * adjust_managed_page_count() should be used instead of directly | ||
486 | * touching zone->managed_pages and totalram_pages. | ||
481 | */ | 487 | */ |
482 | unsigned long spanned_pages; | 488 | unsigned long spanned_pages; |
483 | unsigned long present_pages; | 489 | unsigned long present_pages; |
@@ -495,6 +501,13 @@ typedef enum { | |||
495 | ZONE_CONGESTED, /* zone has many dirty pages backed by | 501 | ZONE_CONGESTED, /* zone has many dirty pages backed by |
496 | * a congested BDI | 502 | * a congested BDI |
497 | */ | 503 | */ |
504 | ZONE_TAIL_LRU_DIRTY, /* reclaim scanning has recently found | ||
505 | * many dirty file pages at the tail | ||
506 | * of the LRU. | ||
507 | */ | ||
508 | ZONE_WRITEBACK, /* reclaim scanning has recently found | ||
509 | * many pages under writeback | ||
510 | */ | ||
498 | } zone_flags_t; | 511 | } zone_flags_t; |
499 | 512 | ||
500 | static inline void zone_set_flag(struct zone *zone, zone_flags_t flag) | 513 | static inline void zone_set_flag(struct zone *zone, zone_flags_t flag) |
@@ -517,6 +530,16 @@ static inline int zone_is_reclaim_congested(const struct zone *zone) | |||
517 | return test_bit(ZONE_CONGESTED, &zone->flags); | 530 | return test_bit(ZONE_CONGESTED, &zone->flags); |
518 | } | 531 | } |
519 | 532 | ||
533 | static inline int zone_is_reclaim_dirty(const struct zone *zone) | ||
534 | { | ||
535 | return test_bit(ZONE_TAIL_LRU_DIRTY, &zone->flags); | ||
536 | } | ||
537 | |||
538 | static inline int zone_is_reclaim_writeback(const struct zone *zone) | ||
539 | { | ||
540 | return test_bit(ZONE_WRITEBACK, &zone->flags); | ||
541 | } | ||
542 | |||
520 | static inline int zone_is_reclaim_locked(const struct zone *zone) | 543 | static inline int zone_is_reclaim_locked(const struct zone *zone) |
521 | { | 544 | { |
522 | return test_bit(ZONE_RECLAIM_LOCKED, &zone->flags); | 545 | return test_bit(ZONE_RECLAIM_LOCKED, &zone->flags); |
@@ -716,7 +739,10 @@ typedef struct pglist_data { | |||
716 | * or node_spanned_pages stay constant. Holding this will also | 739 | * or node_spanned_pages stay constant. Holding this will also |
717 | * guarantee that any pfn_valid() stays that way. | 740 | * guarantee that any pfn_valid() stays that way. |
718 | * | 741 | * |
719 | * Nests above zone->lock and zone->size_seqlock. | 742 | * pgdat_resize_lock() and pgdat_resize_unlock() are provided to |
743 | * manipulate node_size_lock without checking for CONFIG_MEMORY_HOTPLUG. | ||
744 | * | ||
745 | * Nests above zone->lock and zone->span_seqlock | ||
720 | */ | 746 | */ |
721 | spinlock_t node_size_lock; | 747 | spinlock_t node_size_lock; |
722 | #endif | 748 | #endif |
@@ -843,11 +869,6 @@ static inline int is_highmem_idx(enum zone_type idx) | |||
843 | #endif | 869 | #endif |
844 | } | 870 | } |
845 | 871 | ||
846 | static inline int is_normal_idx(enum zone_type idx) | ||
847 | { | ||
848 | return (idx == ZONE_NORMAL); | ||
849 | } | ||
850 | |||
851 | /** | 872 | /** |
852 | * is_highmem - helper function to quickly check if a struct zone is a | 873 | * is_highmem - helper function to quickly check if a struct zone is a |
853 | * highmem zone or not. This is an attempt to keep references | 874 | * highmem zone or not. This is an attempt to keep references |
@@ -866,29 +887,6 @@ static inline int is_highmem(struct zone *zone) | |||
866 | #endif | 887 | #endif |
867 | } | 888 | } |
868 | 889 | ||
869 | static inline int is_normal(struct zone *zone) | ||
870 | { | ||
871 | return zone == zone->zone_pgdat->node_zones + ZONE_NORMAL; | ||
872 | } | ||
873 | |||
874 | static inline int is_dma32(struct zone *zone) | ||
875 | { | ||
876 | #ifdef CONFIG_ZONE_DMA32 | ||
877 | return zone == zone->zone_pgdat->node_zones + ZONE_DMA32; | ||
878 | #else | ||
879 | return 0; | ||
880 | #endif | ||
881 | } | ||
882 | |||
883 | static inline int is_dma(struct zone *zone) | ||
884 | { | ||
885 | #ifdef CONFIG_ZONE_DMA | ||
886 | return zone == zone->zone_pgdat->node_zones + ZONE_DMA; | ||
887 | #else | ||
888 | return 0; | ||
889 | #endif | ||
890 | } | ||
891 | |||
892 | /* These two functions are used to setup the per zone pages min values */ | 890 | /* These two functions are used to setup the per zone pages min values */ |
893 | struct ctl_table; | 891 | struct ctl_table; |
894 | int min_free_kbytes_sysctl_handler(struct ctl_table *, int, | 892 | int min_free_kbytes_sysctl_handler(struct ctl_table *, int, |
@@ -1111,6 +1109,10 @@ struct mem_section { | |||
1111 | struct page_cgroup *page_cgroup; | 1109 | struct page_cgroup *page_cgroup; |
1112 | unsigned long pad; | 1110 | unsigned long pad; |
1113 | #endif | 1111 | #endif |
1112 | /* | ||
1113 | * WARNING: mem_section must be a power-of-2 in size for the | ||
1114 | * calculation and use of SECTION_ROOT_MASK to make sense. | ||
1115 | */ | ||
1114 | }; | 1116 | }; |
1115 | 1117 | ||
1116 | #ifdef CONFIG_SPARSEMEM_EXTREME | 1118 | #ifdef CONFIG_SPARSEMEM_EXTREME |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index b508016fb76d..b62d4af6c667 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -456,7 +456,8 @@ enum dmi_field { | |||
456 | }; | 456 | }; |
457 | 457 | ||
458 | struct dmi_strmatch { | 458 | struct dmi_strmatch { |
459 | unsigned char slot; | 459 | unsigned char slot:7; |
460 | unsigned char exact_match:1; | ||
460 | char substr[79]; | 461 | char substr[79]; |
461 | }; | 462 | }; |
462 | 463 | ||
@@ -474,7 +475,8 @@ struct dmi_system_id { | |||
474 | */ | 475 | */ |
475 | #define dmi_device_id dmi_system_id | 476 | #define dmi_device_id dmi_system_id |
476 | 477 | ||
477 | #define DMI_MATCH(a, b) { a, b } | 478 | #define DMI_MATCH(a, b) { .slot = a, .substr = b } |
479 | #define DMI_EXACT_MATCH(a, b) { .slot = a, .substr = b, .exact_match = 1 } | ||
478 | 480 | ||
479 | #define PLATFORM_NAME_SIZE 20 | 481 | #define PLATFORM_NAME_SIZE 20 |
480 | #define PLATFORM_MODULE_PREFIX "platform:" | 482 | #define PLATFORM_MODULE_PREFIX "platform:" |
@@ -577,4 +579,23 @@ struct mei_cl_device_id { | |||
577 | kernel_ulong_t driver_info; | 579 | kernel_ulong_t driver_info; |
578 | }; | 580 | }; |
579 | 581 | ||
582 | /* RapidIO */ | ||
583 | |||
584 | #define RIO_ANY_ID 0xffff | ||
585 | |||
586 | /** | ||
587 | * struct rio_device_id - RIO device identifier | ||
588 | * @did: RapidIO device ID | ||
589 | * @vid: RapidIO vendor ID | ||
590 | * @asm_did: RapidIO assembly device ID | ||
591 | * @asm_vid: RapidIO assembly vendor ID | ||
592 | * | ||
593 | * Identifies a RapidIO device based on both the device/vendor IDs and | ||
594 | * the assembly device/vendor IDs. | ||
595 | */ | ||
596 | struct rio_device_id { | ||
597 | __u16 did, vid; | ||
598 | __u16 asm_did, asm_vid; | ||
599 | }; | ||
600 | |||
580 | #endif /* LINUX_MOD_DEVICETABLE_H */ | 601 | #endif /* LINUX_MOD_DEVICETABLE_H */ |
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 137b4198fc03..27d9da3f86ff 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h | |||
@@ -439,7 +439,7 @@ extern struct kernel_param_ops param_ops_string; | |||
439 | extern int param_set_copystring(const char *val, const struct kernel_param *); | 439 | extern int param_set_copystring(const char *val, const struct kernel_param *); |
440 | extern int param_get_string(char *buffer, const struct kernel_param *kp); | 440 | extern int param_get_string(char *buffer, const struct kernel_param *kp); |
441 | 441 | ||
442 | /* for exporting parameters in /sys/parameters */ | 442 | /* for exporting parameters in /sys/module/.../parameters */ |
443 | 443 | ||
444 | struct module; | 444 | struct module; |
445 | 445 | ||
diff --git a/include/linux/msi.h b/include/linux/msi.h index 20c2d6dd5d25..ee66f3a12fb6 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h | |||
@@ -35,6 +35,7 @@ struct msi_desc { | |||
35 | 35 | ||
36 | u32 masked; /* mask bits */ | 36 | u32 masked; /* mask bits */ |
37 | unsigned int irq; | 37 | unsigned int irq; |
38 | unsigned int nvec_used; /* number of messages */ | ||
38 | struct list_head list; | 39 | struct list_head list; |
39 | 40 | ||
40 | union { | 41 | union { |
diff --git a/include/linux/mv643xx_eth.h b/include/linux/mv643xx_eth.h index 141d395bbb5f..6e8215b15998 100644 --- a/include/linux/mv643xx_eth.h +++ b/include/linux/mv643xx_eth.h | |||
@@ -30,6 +30,7 @@ struct mv643xx_eth_shared_platform_data { | |||
30 | #define MV643XX_ETH_PHY_ADDR(x) (0x80 | (x)) | 30 | #define MV643XX_ETH_PHY_ADDR(x) (0x80 | (x)) |
31 | #define MV643XX_ETH_PHY_NONE 0xff | 31 | #define MV643XX_ETH_PHY_NONE 0xff |
32 | 32 | ||
33 | struct device_node; | ||
33 | struct mv643xx_eth_platform_data { | 34 | struct mv643xx_eth_platform_data { |
34 | /* | 35 | /* |
35 | * Pointer back to our parent instance, and our port number. | 36 | * Pointer back to our parent instance, and our port number. |
@@ -41,6 +42,7 @@ struct mv643xx_eth_platform_data { | |||
41 | * Whether a PHY is present, and if yes, at which address. | 42 | * Whether a PHY is present, and if yes, at which address. |
42 | */ | 43 | */ |
43 | int phy_addr; | 44 | int phy_addr; |
45 | struct device_node *phy_node; | ||
44 | 46 | ||
45 | /* | 47 | /* |
46 | * Use this MAC address if it is valid, overriding the | 48 | * Use this MAC address if it is valid, overriding the |
diff --git a/include/linux/nbd.h b/include/linux/nbd.h index 4871170a04a0..ae4981ebd18e 100644 --- a/include/linux/nbd.h +++ b/include/linux/nbd.h | |||
@@ -41,6 +41,7 @@ struct nbd_device { | |||
41 | u64 bytesize; | 41 | u64 bytesize; |
42 | pid_t pid; /* pid of nbd-client, if attached */ | 42 | pid_t pid; /* pid of nbd-client, if attached */ |
43 | int xmit_timeout; | 43 | int xmit_timeout; |
44 | int disconnect; /* a disconnect has been requested by user */ | ||
44 | }; | 45 | }; |
45 | 46 | ||
46 | #endif | 47 | #endif |
diff --git a/include/linux/net.h b/include/linux/net.h index 99c9f0c103c2..4f27575ce1d6 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -79,9 +79,9 @@ enum sock_type { | |||
79 | #endif /* ARCH_HAS_SOCKET_TYPES */ | 79 | #endif /* ARCH_HAS_SOCKET_TYPES */ |
80 | 80 | ||
81 | enum sock_shutdown_cmd { | 81 | enum sock_shutdown_cmd { |
82 | SHUT_RD = 0, | 82 | SHUT_RD, |
83 | SHUT_WR = 1, | 83 | SHUT_WR, |
84 | SHUT_RDWR = 2, | 84 | SHUT_RDWR, |
85 | }; | 85 | }; |
86 | 86 | ||
87 | struct socket_wq { | 87 | struct socket_wq { |
diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h index 09906b7ca47d..a2a89a5c7be5 100644 --- a/include/linux/netdev_features.h +++ b/include/linux/netdev_features.h | |||
@@ -43,8 +43,9 @@ enum { | |||
43 | NETIF_F_FSO_BIT, /* ... FCoE segmentation */ | 43 | NETIF_F_FSO_BIT, /* ... FCoE segmentation */ |
44 | NETIF_F_GSO_GRE_BIT, /* ... GRE with TSO */ | 44 | NETIF_F_GSO_GRE_BIT, /* ... GRE with TSO */ |
45 | NETIF_F_GSO_UDP_TUNNEL_BIT, /* ... UDP TUNNEL with TSO */ | 45 | NETIF_F_GSO_UDP_TUNNEL_BIT, /* ... UDP TUNNEL with TSO */ |
46 | NETIF_F_GSO_MPLS_BIT, /* ... MPLS segmentation */ | ||
46 | /**/NETIF_F_GSO_LAST = /* last bit, see GSO_MASK */ | 47 | /**/NETIF_F_GSO_LAST = /* last bit, see GSO_MASK */ |
47 | NETIF_F_GSO_UDP_TUNNEL_BIT, | 48 | NETIF_F_GSO_MPLS_BIT, |
48 | 49 | ||
49 | NETIF_F_FCOE_CRC_BIT, /* FCoE CRC32 */ | 50 | NETIF_F_FCOE_CRC_BIT, /* FCoE CRC32 */ |
50 | NETIF_F_SCTP_CSUM_BIT, /* SCTP checksum offload */ | 51 | NETIF_F_SCTP_CSUM_BIT, /* SCTP checksum offload */ |
@@ -107,6 +108,7 @@ enum { | |||
107 | #define NETIF_F_RXALL __NETIF_F(RXALL) | 108 | #define NETIF_F_RXALL __NETIF_F(RXALL) |
108 | #define NETIF_F_GSO_GRE __NETIF_F(GSO_GRE) | 109 | #define NETIF_F_GSO_GRE __NETIF_F(GSO_GRE) |
109 | #define NETIF_F_GSO_UDP_TUNNEL __NETIF_F(GSO_UDP_TUNNEL) | 110 | #define NETIF_F_GSO_UDP_TUNNEL __NETIF_F(GSO_UDP_TUNNEL) |
111 | #define NETIF_F_GSO_MPLS __NETIF_F(GSO_MPLS) | ||
110 | #define NETIF_F_HW_VLAN_STAG_FILTER __NETIF_F(HW_VLAN_STAG_FILTER) | 112 | #define NETIF_F_HW_VLAN_STAG_FILTER __NETIF_F(HW_VLAN_STAG_FILTER) |
111 | #define NETIF_F_HW_VLAN_STAG_RX __NETIF_F(HW_VLAN_STAG_RX) | 113 | #define NETIF_F_HW_VLAN_STAG_RX __NETIF_F(HW_VLAN_STAG_RX) |
112 | #define NETIF_F_HW_VLAN_STAG_TX __NETIF_F(HW_VLAN_STAG_TX) | 114 | #define NETIF_F_HW_VLAN_STAG_TX __NETIF_F(HW_VLAN_STAG_TX) |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 96e4c21e15e0..bb82871b8494 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -324,12 +324,15 @@ struct napi_struct { | |||
324 | struct sk_buff *gro_list; | 324 | struct sk_buff *gro_list; |
325 | struct sk_buff *skb; | 325 | struct sk_buff *skb; |
326 | struct list_head dev_list; | 326 | struct list_head dev_list; |
327 | struct hlist_node napi_hash_node; | ||
328 | unsigned int napi_id; | ||
327 | }; | 329 | }; |
328 | 330 | ||
329 | enum { | 331 | enum { |
330 | NAPI_STATE_SCHED, /* Poll is scheduled */ | 332 | NAPI_STATE_SCHED, /* Poll is scheduled */ |
331 | NAPI_STATE_DISABLE, /* Disable pending */ | 333 | NAPI_STATE_DISABLE, /* Disable pending */ |
332 | NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */ | 334 | NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */ |
335 | NAPI_STATE_HASHED, /* In NAPI hash */ | ||
333 | }; | 336 | }; |
334 | 337 | ||
335 | enum gro_result { | 338 | enum gro_result { |
@@ -446,6 +449,32 @@ extern void __napi_complete(struct napi_struct *n); | |||
446 | extern void napi_complete(struct napi_struct *n); | 449 | extern void napi_complete(struct napi_struct *n); |
447 | 450 | ||
448 | /** | 451 | /** |
452 | * napi_by_id - lookup a NAPI by napi_id | ||
453 | * @napi_id: hashed napi_id | ||
454 | * | ||
455 | * lookup @napi_id in napi_hash table | ||
456 | * must be called under rcu_read_lock() | ||
457 | */ | ||
458 | extern struct napi_struct *napi_by_id(unsigned int napi_id); | ||
459 | |||
460 | /** | ||
461 | * napi_hash_add - add a NAPI to global hashtable | ||
462 | * @napi: napi context | ||
463 | * | ||
464 | * generate a new napi_id and store a @napi under it in napi_hash | ||
465 | */ | ||
466 | extern void napi_hash_add(struct napi_struct *napi); | ||
467 | |||
468 | /** | ||
469 | * napi_hash_del - remove a NAPI from global table | ||
470 | * @napi: napi context | ||
471 | * | ||
472 | * Warning: caller must observe rcu grace period | ||
473 | * before freeing memory containing @napi | ||
474 | */ | ||
475 | extern void napi_hash_del(struct napi_struct *napi); | ||
476 | |||
477 | /** | ||
449 | * napi_disable - prevent NAPI from scheduling | 478 | * napi_disable - prevent NAPI from scheduling |
450 | * @n: napi context | 479 | * @n: napi context |
451 | * | 480 | * |
@@ -800,6 +829,7 @@ struct netdev_fcoe_hbainfo { | |||
800 | * int (*ndo_set_vf_spoofchk)(struct net_device *dev, int vf, bool setting); | 829 | * int (*ndo_set_vf_spoofchk)(struct net_device *dev, int vf, bool setting); |
801 | * int (*ndo_get_vf_config)(struct net_device *dev, | 830 | * int (*ndo_get_vf_config)(struct net_device *dev, |
802 | * int vf, struct ifla_vf_info *ivf); | 831 | * int vf, struct ifla_vf_info *ivf); |
832 | * int (*ndo_set_vf_link_state)(struct net_device *dev, int vf, int link_state); | ||
803 | * int (*ndo_set_vf_port)(struct net_device *dev, int vf, | 833 | * int (*ndo_set_vf_port)(struct net_device *dev, int vf, |
804 | * struct nlattr *port[]); | 834 | * struct nlattr *port[]); |
805 | * int (*ndo_get_vf_port)(struct net_device *dev, int vf, struct sk_buff *skb); | 835 | * int (*ndo_get_vf_port)(struct net_device *dev, int vf, struct sk_buff *skb); |
@@ -943,6 +973,9 @@ struct net_device_ops { | |||
943 | gfp_t gfp); | 973 | gfp_t gfp); |
944 | void (*ndo_netpoll_cleanup)(struct net_device *dev); | 974 | void (*ndo_netpoll_cleanup)(struct net_device *dev); |
945 | #endif | 975 | #endif |
976 | #ifdef CONFIG_NET_LL_RX_POLL | ||
977 | int (*ndo_ll_poll)(struct napi_struct *dev); | ||
978 | #endif | ||
946 | int (*ndo_set_vf_mac)(struct net_device *dev, | 979 | int (*ndo_set_vf_mac)(struct net_device *dev, |
947 | int queue, u8 *mac); | 980 | int queue, u8 *mac); |
948 | int (*ndo_set_vf_vlan)(struct net_device *dev, | 981 | int (*ndo_set_vf_vlan)(struct net_device *dev, |
@@ -954,6 +987,8 @@ struct net_device_ops { | |||
954 | int (*ndo_get_vf_config)(struct net_device *dev, | 987 | int (*ndo_get_vf_config)(struct net_device *dev, |
955 | int vf, | 988 | int vf, |
956 | struct ifla_vf_info *ivf); | 989 | struct ifla_vf_info *ivf); |
990 | int (*ndo_set_vf_link_state)(struct net_device *dev, | ||
991 | int vf, int link_state); | ||
957 | int (*ndo_set_vf_port)(struct net_device *dev, | 992 | int (*ndo_set_vf_port)(struct net_device *dev, |
958 | int vf, | 993 | int vf, |
959 | struct nlattr *port[]); | 994 | struct nlattr *port[]); |
@@ -1088,6 +1123,8 @@ struct net_device { | |||
1088 | * need to set them appropriately. | 1123 | * need to set them appropriately. |
1089 | */ | 1124 | */ |
1090 | netdev_features_t hw_enc_features; | 1125 | netdev_features_t hw_enc_features; |
1126 | /* mask of fetures inheritable by MPLS */ | ||
1127 | netdev_features_t mpls_features; | ||
1091 | 1128 | ||
1092 | /* Interface index. Unique device identifier */ | 1129 | /* Interface index. Unique device identifier */ |
1093 | int ifindex; | 1130 | int ifindex; |
@@ -1140,8 +1177,10 @@ struct net_device { | |||
1140 | unsigned char addr_assign_type; /* hw address assignment type */ | 1177 | unsigned char addr_assign_type; /* hw address assignment type */ |
1141 | unsigned char addr_len; /* hardware address length */ | 1178 | unsigned char addr_len; /* hardware address length */ |
1142 | unsigned char neigh_priv_len; | 1179 | unsigned char neigh_priv_len; |
1143 | unsigned short dev_id; /* for shared network cards */ | 1180 | unsigned short dev_id; /* Used to differentiate devices |
1144 | 1181 | * that share the same link | |
1182 | * layer address | ||
1183 | */ | ||
1145 | spinlock_t addr_list_lock; | 1184 | spinlock_t addr_list_lock; |
1146 | struct netdev_hw_addr_list uc; /* Unicast mac addresses */ | 1185 | struct netdev_hw_addr_list uc; /* Unicast mac addresses */ |
1147 | struct netdev_hw_addr_list mc; /* Multicast mac addresses */ | 1186 | struct netdev_hw_addr_list mc; /* Multicast mac addresses */ |
@@ -1593,9 +1632,34 @@ struct packet_offload { | |||
1593 | #define NETDEV_RELEASE 0x0012 | 1632 | #define NETDEV_RELEASE 0x0012 |
1594 | #define NETDEV_NOTIFY_PEERS 0x0013 | 1633 | #define NETDEV_NOTIFY_PEERS 0x0013 |
1595 | #define NETDEV_JOIN 0x0014 | 1634 | #define NETDEV_JOIN 0x0014 |
1635 | #define NETDEV_CHANGEUPPER 0x0015 | ||
1596 | 1636 | ||
1597 | extern int register_netdevice_notifier(struct notifier_block *nb); | 1637 | extern int register_netdevice_notifier(struct notifier_block *nb); |
1598 | extern int unregister_netdevice_notifier(struct notifier_block *nb); | 1638 | extern int unregister_netdevice_notifier(struct notifier_block *nb); |
1639 | |||
1640 | struct netdev_notifier_info { | ||
1641 | struct net_device *dev; | ||
1642 | }; | ||
1643 | |||
1644 | struct netdev_notifier_change_info { | ||
1645 | struct netdev_notifier_info info; /* must be first */ | ||
1646 | unsigned int flags_changed; | ||
1647 | }; | ||
1648 | |||
1649 | static inline void netdev_notifier_info_init(struct netdev_notifier_info *info, | ||
1650 | struct net_device *dev) | ||
1651 | { | ||
1652 | info->dev = dev; | ||
1653 | } | ||
1654 | |||
1655 | static inline struct net_device * | ||
1656 | netdev_notifier_info_to_dev(const struct netdev_notifier_info *info) | ||
1657 | { | ||
1658 | return info->dev; | ||
1659 | } | ||
1660 | |||
1661 | extern int call_netdevice_notifiers_info(unsigned long val, struct net_device *dev, | ||
1662 | struct netdev_notifier_info *info); | ||
1599 | extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); | 1663 | extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); |
1600 | 1664 | ||
1601 | 1665 | ||
@@ -1779,6 +1843,19 @@ static inline int unregister_gifconf(unsigned int family) | |||
1779 | return register_gifconf(family, NULL); | 1843 | return register_gifconf(family, NULL); |
1780 | } | 1844 | } |
1781 | 1845 | ||
1846 | #ifdef CONFIG_NET_FLOW_LIMIT | ||
1847 | #define FLOW_LIMIT_HISTORY (1 << 7) /* must be ^2 and !overflow buckets */ | ||
1848 | struct sd_flow_limit { | ||
1849 | u64 count; | ||
1850 | unsigned int num_buckets; | ||
1851 | unsigned int history_head; | ||
1852 | u16 history[FLOW_LIMIT_HISTORY]; | ||
1853 | u8 buckets[]; | ||
1854 | }; | ||
1855 | |||
1856 | extern int netdev_flow_limit_table_len; | ||
1857 | #endif /* CONFIG_NET_FLOW_LIMIT */ | ||
1858 | |||
1782 | /* | 1859 | /* |
1783 | * Incoming packets are placed on per-cpu queues | 1860 | * Incoming packets are placed on per-cpu queues |
1784 | */ | 1861 | */ |
@@ -1808,6 +1885,10 @@ struct softnet_data { | |||
1808 | unsigned int dropped; | 1885 | unsigned int dropped; |
1809 | struct sk_buff_head input_pkt_queue; | 1886 | struct sk_buff_head input_pkt_queue; |
1810 | struct napi_struct backlog; | 1887 | struct napi_struct backlog; |
1888 | |||
1889 | #ifdef CONFIG_NET_FLOW_LIMIT | ||
1890 | struct sd_flow_limit __rcu *flow_limit; | ||
1891 | #endif | ||
1811 | }; | 1892 | }; |
1812 | 1893 | ||
1813 | static inline void input_queue_head_incr(struct softnet_data *sd) | 1894 | static inline void input_queue_head_incr(struct softnet_data *sd) |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 0060fde3160e..de70f7b45b68 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -35,7 +35,7 @@ static inline void nf_inet_addr_mask(const union nf_inet_addr *a1, | |||
35 | result->all[3] = a1->all[3] & mask->all[3]; | 35 | result->all[3] = a1->all[3] & mask->all[3]; |
36 | } | 36 | } |
37 | 37 | ||
38 | extern void netfilter_init(void); | 38 | extern int netfilter_init(void); |
39 | 39 | ||
40 | /* Largest hook number + 1 */ | 40 | /* Largest hook number + 1 */ |
41 | #define NF_MAX_HOOKS 8 | 41 | #define NF_MAX_HOOKS 8 |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 6358da5eeee8..7a6c396a263b 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -46,6 +46,7 @@ struct netlink_kernel_cfg { | |||
46 | void (*input)(struct sk_buff *skb); | 46 | void (*input)(struct sk_buff *skb); |
47 | struct mutex *cb_mutex; | 47 | struct mutex *cb_mutex; |
48 | void (*bind)(int group); | 48 | void (*bind)(int group); |
49 | bool (*compare)(struct net *net, struct sock *sk); | ||
49 | }; | 50 | }; |
50 | 51 | ||
51 | extern struct sock *__netlink_kernel_create(struct net *net, int unit, | 52 | extern struct sock *__netlink_kernel_create(struct net *net, int unit, |
@@ -84,6 +85,22 @@ int netlink_attachskb(struct sock *sk, struct sk_buff *skb, | |||
84 | void netlink_detachskb(struct sock *sk, struct sk_buff *skb); | 85 | void netlink_detachskb(struct sock *sk, struct sk_buff *skb); |
85 | int netlink_sendskb(struct sock *sk, struct sk_buff *skb); | 86 | int netlink_sendskb(struct sock *sk, struct sk_buff *skb); |
86 | 87 | ||
88 | static inline struct sk_buff * | ||
89 | netlink_skb_clone(struct sk_buff *skb, gfp_t gfp_mask) | ||
90 | { | ||
91 | struct sk_buff *nskb; | ||
92 | |||
93 | nskb = skb_clone(skb, gfp_mask); | ||
94 | if (!nskb) | ||
95 | return NULL; | ||
96 | |||
97 | /* This is a large skb, set destructor callback to release head */ | ||
98 | if (is_vmalloc_addr(skb->head)) | ||
99 | nskb->destructor = skb->destructor; | ||
100 | |||
101 | return nskb; | ||
102 | } | ||
103 | |||
87 | /* | 104 | /* |
88 | * skb should fit one page. This choice is good for headerless malloc. | 105 | * skb should fit one page. This choice is good for headerless malloc. |
89 | * But we should limit to 8K so that userspace does not have to | 106 | * But we should limit to 8K so that userspace does not have to |
@@ -144,4 +161,14 @@ static inline int netlink_dump_start(struct sock *ssk, struct sk_buff *skb, | |||
144 | return __netlink_dump_start(ssk, skb, nlh, control); | 161 | return __netlink_dump_start(ssk, skb, nlh, control); |
145 | } | 162 | } |
146 | 163 | ||
164 | struct netlink_tap { | ||
165 | struct net_device *dev; | ||
166 | struct module *module; | ||
167 | struct list_head list; | ||
168 | }; | ||
169 | |||
170 | extern int netlink_add_tap(struct netlink_tap *nt); | ||
171 | extern int __netlink_remove_tap(struct netlink_tap *nt); | ||
172 | extern int netlink_remove_tap(struct netlink_tap *nt); | ||
173 | |||
147 | #endif /* __LINUX_NETLINK_H */ | 174 | #endif /* __LINUX_NETLINK_H */ |
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index fa2cb76a7029..f3c7c24bec1c 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
@@ -53,10 +53,10 @@ struct netpoll_info { | |||
53 | }; | 53 | }; |
54 | 54 | ||
55 | #ifdef CONFIG_NETPOLL | 55 | #ifdef CONFIG_NETPOLL |
56 | extern int netpoll_rx_disable(struct net_device *dev); | 56 | extern void netpoll_rx_disable(struct net_device *dev); |
57 | extern void netpoll_rx_enable(struct net_device *dev); | 57 | extern void netpoll_rx_enable(struct net_device *dev); |
58 | #else | 58 | #else |
59 | static inline int netpoll_rx_disable(struct net_device *dev) { return 0; } | 59 | static inline void netpoll_rx_disable(struct net_device *dev) { return; } |
60 | static inline void netpoll_rx_enable(struct net_device *dev) { return; } | 60 | static inline void netpoll_rx_enable(struct net_device *dev) { return; } |
61 | #endif | 61 | #endif |
62 | 62 | ||
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 7b8fc73810ad..e36dee52f224 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
@@ -32,6 +32,15 @@ struct nfs4_acl { | |||
32 | struct nfs4_ace aces[0]; | 32 | struct nfs4_ace aces[0]; |
33 | }; | 33 | }; |
34 | 34 | ||
35 | #define NFS4_MAXLABELLEN 2048 | ||
36 | |||
37 | struct nfs4_label { | ||
38 | uint32_t lfs; | ||
39 | uint32_t pi; | ||
40 | u32 len; | ||
41 | char *label; | ||
42 | }; | ||
43 | |||
35 | typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier; | 44 | typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier; |
36 | 45 | ||
37 | struct nfs_stateid4 { | 46 | struct nfs_stateid4 { |
@@ -219,6 +228,14 @@ enum nfsstat4 { | |||
219 | NFS4ERR_REJECT_DELEG = 10085, /* on callback */ | 228 | NFS4ERR_REJECT_DELEG = 10085, /* on callback */ |
220 | NFS4ERR_RETURNCONFLICT = 10086, /* outstanding layoutreturn */ | 229 | NFS4ERR_RETURNCONFLICT = 10086, /* outstanding layoutreturn */ |
221 | NFS4ERR_DELEG_REVOKED = 10087, /* deleg./layout revoked */ | 230 | NFS4ERR_DELEG_REVOKED = 10087, /* deleg./layout revoked */ |
231 | |||
232 | /* nfs42 */ | ||
233 | NFS4ERR_PARTNER_NOTSUPP = 10088, | ||
234 | NFS4ERR_PARTNER_NO_AUTH = 10089, | ||
235 | NFS4ERR_METADATA_NOTSUPP = 10090, | ||
236 | NFS4ERR_OFFLOAD_DENIED = 10091, | ||
237 | NFS4ERR_WRONG_LFS = 10092, | ||
238 | NFS4ERR_BADLABEL = 10093, | ||
222 | }; | 239 | }; |
223 | 240 | ||
224 | static inline bool seqid_mutating_err(u32 err) | 241 | static inline bool seqid_mutating_err(u32 err) |
@@ -378,6 +395,7 @@ enum lock_type4 { | |||
378 | #define FATTR4_WORD1_FS_LAYOUT_TYPES (1UL << 30) | 395 | #define FATTR4_WORD1_FS_LAYOUT_TYPES (1UL << 30) |
379 | #define FATTR4_WORD2_LAYOUT_BLKSIZE (1UL << 1) | 396 | #define FATTR4_WORD2_LAYOUT_BLKSIZE (1UL << 1) |
380 | #define FATTR4_WORD2_MDSTHRESHOLD (1UL << 4) | 397 | #define FATTR4_WORD2_MDSTHRESHOLD (1UL << 4) |
398 | #define FATTR4_WORD2_SECURITY_LABEL (1UL << 17) | ||
381 | 399 | ||
382 | /* MDS threshold bitmap bits */ | 400 | /* MDS threshold bitmap bits */ |
383 | #define THRESHOLD_RD (1UL << 0) | 401 | #define THRESHOLD_RD (1UL << 0) |
@@ -390,11 +408,15 @@ enum lock_type4 { | |||
390 | #define NFS4_VERSION 4 | 408 | #define NFS4_VERSION 4 |
391 | #define NFS4_MINOR_VERSION 0 | 409 | #define NFS4_MINOR_VERSION 0 |
392 | 410 | ||
411 | #if defined(CONFIG_NFS_V4_2) | ||
412 | #define NFS4_MAX_MINOR_VERSION 2 | ||
413 | #else | ||
393 | #if defined(CONFIG_NFS_V4_1) | 414 | #if defined(CONFIG_NFS_V4_1) |
394 | #define NFS4_MAX_MINOR_VERSION 1 | 415 | #define NFS4_MAX_MINOR_VERSION 1 |
395 | #else | 416 | #else |
396 | #define NFS4_MAX_MINOR_VERSION 0 | 417 | #define NFS4_MAX_MINOR_VERSION 0 |
397 | #endif /* CONFIG_NFS_V4_1 */ | 418 | #endif /* CONFIG_NFS_V4_1 */ |
419 | #endif /* CONFIG_NFS_V4_2 */ | ||
398 | 420 | ||
399 | #define NFS4_DEBUG 1 | 421 | #define NFS4_DEBUG 1 |
400 | 422 | ||
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index fc01d5cb4cf1..7125cef74164 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -207,6 +207,7 @@ struct nfs_inode { | |||
207 | #define NFS_INO_INVALID_ACL 0x0010 /* cached acls are invalid */ | 207 | #define NFS_INO_INVALID_ACL 0x0010 /* cached acls are invalid */ |
208 | #define NFS_INO_REVAL_PAGECACHE 0x0020 /* must revalidate pagecache */ | 208 | #define NFS_INO_REVAL_PAGECACHE 0x0020 /* must revalidate pagecache */ |
209 | #define NFS_INO_REVAL_FORCED 0x0040 /* force revalidation ignoring a delegation */ | 209 | #define NFS_INO_REVAL_FORCED 0x0040 /* force revalidation ignoring a delegation */ |
210 | #define NFS_INO_INVALID_LABEL 0x0080 /* cached label is invalid */ | ||
210 | 211 | ||
211 | /* | 212 | /* |
212 | * Bit offsets in flags field | 213 | * Bit offsets in flags field |
@@ -336,7 +337,7 @@ extern void nfs_zap_mapping(struct inode *inode, struct address_space *mapping); | |||
336 | extern void nfs_zap_caches(struct inode *); | 337 | extern void nfs_zap_caches(struct inode *); |
337 | extern void nfs_invalidate_atime(struct inode *); | 338 | extern void nfs_invalidate_atime(struct inode *); |
338 | extern struct inode *nfs_fhget(struct super_block *, struct nfs_fh *, | 339 | extern struct inode *nfs_fhget(struct super_block *, struct nfs_fh *, |
339 | struct nfs_fattr *); | 340 | struct nfs_fattr *, struct nfs4_label *); |
340 | extern int nfs_refresh_inode(struct inode *, struct nfs_fattr *); | 341 | extern int nfs_refresh_inode(struct inode *, struct nfs_fattr *); |
341 | extern int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr); | 342 | extern int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr); |
342 | extern int nfs_post_op_update_inode_force_wcc(struct inode *inode, struct nfs_fattr *fattr); | 343 | extern int nfs_post_op_update_inode_force_wcc(struct inode *inode, struct nfs_fattr *fattr); |
@@ -347,15 +348,19 @@ extern int nfs_permission(struct inode *, int); | |||
347 | extern int nfs_open(struct inode *, struct file *); | 348 | extern int nfs_open(struct inode *, struct file *); |
348 | extern int nfs_release(struct inode *, struct file *); | 349 | extern int nfs_release(struct inode *, struct file *); |
349 | extern int nfs_attribute_timeout(struct inode *inode); | 350 | extern int nfs_attribute_timeout(struct inode *inode); |
351 | extern int nfs_attribute_cache_expired(struct inode *inode); | ||
350 | extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode); | 352 | extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode); |
351 | extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *); | 353 | extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *); |
352 | extern int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping); | 354 | extern int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping); |
353 | extern int nfs_setattr(struct dentry *, struct iattr *); | 355 | extern int nfs_setattr(struct dentry *, struct iattr *); |
354 | extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr); | 356 | extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr); |
357 | extern void nfs_setsecurity(struct inode *inode, struct nfs_fattr *fattr, | ||
358 | struct nfs4_label *label); | ||
355 | extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); | 359 | extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); |
356 | extern void put_nfs_open_context(struct nfs_open_context *ctx); | 360 | extern void put_nfs_open_context(struct nfs_open_context *ctx); |
357 | extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, fmode_t mode); | 361 | extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, fmode_t mode); |
358 | extern struct nfs_open_context *alloc_nfs_open_context(struct dentry *dentry, fmode_t f_mode); | 362 | extern struct nfs_open_context *alloc_nfs_open_context(struct dentry *dentry, fmode_t f_mode); |
363 | extern void nfs_inode_attach_open_context(struct nfs_open_context *ctx); | ||
359 | extern void nfs_file_set_open_context(struct file *filp, struct nfs_open_context *ctx); | 364 | extern void nfs_file_set_open_context(struct file *filp, struct nfs_open_context *ctx); |
360 | extern struct nfs_lock_context *nfs_get_lock_context(struct nfs_open_context *ctx); | 365 | extern struct nfs_lock_context *nfs_get_lock_context(struct nfs_open_context *ctx); |
361 | extern void nfs_put_lock_context(struct nfs_lock_context *l_ctx); | 366 | extern void nfs_put_lock_context(struct nfs_lock_context *l_ctx); |
@@ -468,7 +473,8 @@ extern const struct file_operations nfs_dir_operations; | |||
468 | extern const struct dentry_operations nfs_dentry_operations; | 473 | extern const struct dentry_operations nfs_dentry_operations; |
469 | 474 | ||
470 | extern void nfs_force_lookup_revalidate(struct inode *dir); | 475 | extern void nfs_force_lookup_revalidate(struct inode *dir); |
471 | extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, struct nfs_fattr *fattr); | 476 | extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, |
477 | struct nfs_fattr *fattr, struct nfs4_label *label); | ||
472 | extern int nfs_may_open(struct inode *inode, struct rpc_cred *cred, int openflags); | 478 | extern int nfs_may_open(struct inode *inode, struct rpc_cred *cred, int openflags); |
473 | extern void nfs_access_zap_cache(struct inode *inode); | 479 | extern void nfs_access_zap_cache(struct inode *inode); |
474 | 480 | ||
@@ -497,6 +503,24 @@ extern int nfs_mountpoint_expiry_timeout; | |||
497 | extern void nfs_release_automount_timer(void); | 503 | extern void nfs_release_automount_timer(void); |
498 | 504 | ||
499 | /* | 505 | /* |
506 | * linux/fs/nfs/nfs4proc.c | ||
507 | */ | ||
508 | #ifdef CONFIG_NFS_V4_SECURITY_LABEL | ||
509 | extern struct nfs4_label *nfs4_label_alloc(struct nfs_server *server, gfp_t flags); | ||
510 | static inline void nfs4_label_free(struct nfs4_label *label) | ||
511 | { | ||
512 | if (label) { | ||
513 | kfree(label->label); | ||
514 | kfree(label); | ||
515 | } | ||
516 | return; | ||
517 | } | ||
518 | #else | ||
519 | static inline struct nfs4_label *nfs4_label_alloc(struct nfs_server *server, gfp_t flags) { return NULL; } | ||
520 | static inline void nfs4_label_free(void *label) {} | ||
521 | #endif | ||
522 | |||
523 | /* | ||
500 | * linux/fs/nfs/unlink.c | 524 | * linux/fs/nfs/unlink.c |
501 | */ | 525 | */ |
502 | extern void nfs_complete_unlink(struct dentry *dentry, struct inode *); | 526 | extern void nfs_complete_unlink(struct dentry *dentry, struct inode *); |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 3b7fa2abecca..d2212432c456 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -146,7 +146,12 @@ struct nfs_server { | |||
146 | u32 attr_bitmask[3];/* V4 bitmask representing the set | 146 | u32 attr_bitmask[3];/* V4 bitmask representing the set |
147 | of attributes supported on this | 147 | of attributes supported on this |
148 | filesystem */ | 148 | filesystem */ |
149 | u32 cache_consistency_bitmask[2]; | 149 | u32 attr_bitmask_nl[3]; |
150 | /* V4 bitmask representing the | ||
151 | set of attributes supported | ||
152 | on this filesystem excluding | ||
153 | the label support bit. */ | ||
154 | u32 cache_consistency_bitmask[3]; | ||
150 | /* V4 bitmask representing the subset | 155 | /* V4 bitmask representing the subset |
151 | of change attribute, size, ctime | 156 | of change attribute, size, ctime |
152 | and mtime attributes supported by | 157 | and mtime attributes supported by |
@@ -200,5 +205,6 @@ struct nfs_server { | |||
200 | #define NFS_CAP_UIDGID_NOMAP (1U << 15) | 205 | #define NFS_CAP_UIDGID_NOMAP (1U << 15) |
201 | #define NFS_CAP_STATEID_NFSV41 (1U << 16) | 206 | #define NFS_CAP_STATEID_NFSV41 (1U << 16) |
202 | #define NFS_CAP_ATOMIC_OPEN_V1 (1U << 17) | 207 | #define NFS_CAP_ATOMIC_OPEN_V1 (1U << 17) |
208 | #define NFS_CAP_SECURITY_LABEL (1U << 18) | ||
203 | 209 | ||
204 | #endif | 210 | #endif |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 104b62f23ee0..8651574a305b 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -101,6 +101,7 @@ struct nfs_fattr { | |||
101 | #define NFS_ATTR_FATTR_MOUNTED_ON_FILEID (1U << 22) | 101 | #define NFS_ATTR_FATTR_MOUNTED_ON_FILEID (1U << 22) |
102 | #define NFS_ATTR_FATTR_OWNER_NAME (1U << 23) | 102 | #define NFS_ATTR_FATTR_OWNER_NAME (1U << 23) |
103 | #define NFS_ATTR_FATTR_GROUP_NAME (1U << 24) | 103 | #define NFS_ATTR_FATTR_GROUP_NAME (1U << 24) |
104 | #define NFS_ATTR_FATTR_V4_SECURITY_LABEL (1U << 25) | ||
104 | 105 | ||
105 | #define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \ | 106 | #define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \ |
106 | | NFS_ATTR_FATTR_MODE \ | 107 | | NFS_ATTR_FATTR_MODE \ |
@@ -120,7 +121,8 @@ struct nfs_fattr { | |||
120 | #define NFS_ATTR_FATTR_V3 (NFS_ATTR_FATTR \ | 121 | #define NFS_ATTR_FATTR_V3 (NFS_ATTR_FATTR \ |
121 | | NFS_ATTR_FATTR_SPACE_USED) | 122 | | NFS_ATTR_FATTR_SPACE_USED) |
122 | #define NFS_ATTR_FATTR_V4 (NFS_ATTR_FATTR \ | 123 | #define NFS_ATTR_FATTR_V4 (NFS_ATTR_FATTR \ |
123 | | NFS_ATTR_FATTR_SPACE_USED) | 124 | | NFS_ATTR_FATTR_SPACE_USED \ |
125 | | NFS_ATTR_FATTR_V4_SECURITY_LABEL) | ||
124 | 126 | ||
125 | /* | 127 | /* |
126 | * Info on the file system | 128 | * Info on the file system |
@@ -246,6 +248,7 @@ struct nfs4_layoutget_res { | |||
246 | struct nfs4_layoutget { | 248 | struct nfs4_layoutget { |
247 | struct nfs4_layoutget_args args; | 249 | struct nfs4_layoutget_args args; |
248 | struct nfs4_layoutget_res res; | 250 | struct nfs4_layoutget_res res; |
251 | struct rpc_cred *cred; | ||
249 | gfp_t gfp_flags; | 252 | gfp_t gfp_flags; |
250 | }; | 253 | }; |
251 | 254 | ||
@@ -347,6 +350,7 @@ struct nfs_openargs { | |||
347 | const u32 * open_bitmap; | 350 | const u32 * open_bitmap; |
348 | __u32 claim; | 351 | __u32 claim; |
349 | enum createmode4 createmode; | 352 | enum createmode4 createmode; |
353 | const struct nfs4_label *label; | ||
350 | }; | 354 | }; |
351 | 355 | ||
352 | struct nfs_openres { | 356 | struct nfs_openres { |
@@ -356,6 +360,7 @@ struct nfs_openres { | |||
356 | struct nfs4_change_info cinfo; | 360 | struct nfs4_change_info cinfo; |
357 | __u32 rflags; | 361 | __u32 rflags; |
358 | struct nfs_fattr * f_attr; | 362 | struct nfs_fattr * f_attr; |
363 | struct nfs4_label *f_label; | ||
359 | struct nfs_seqid * seqid; | 364 | struct nfs_seqid * seqid; |
360 | const struct nfs_server *server; | 365 | const struct nfs_server *server; |
361 | fmode_t delegation_type; | 366 | fmode_t delegation_type; |
@@ -598,6 +603,7 @@ struct nfs_entry { | |||
598 | int eof; | 603 | int eof; |
599 | struct nfs_fh * fh; | 604 | struct nfs_fh * fh; |
600 | struct nfs_fattr * fattr; | 605 | struct nfs_fattr * fattr; |
606 | struct nfs4_label *label; | ||
601 | unsigned char d_type; | 607 | unsigned char d_type; |
602 | struct nfs_server * server; | 608 | struct nfs_server * server; |
603 | }; | 609 | }; |
@@ -630,6 +636,7 @@ struct nfs_setattrargs { | |||
630 | struct iattr * iap; | 636 | struct iattr * iap; |
631 | const struct nfs_server * server; /* Needed for name mapping */ | 637 | const struct nfs_server * server; /* Needed for name mapping */ |
632 | const u32 * bitmask; | 638 | const u32 * bitmask; |
639 | const struct nfs4_label *label; | ||
633 | }; | 640 | }; |
634 | 641 | ||
635 | struct nfs_setaclargs { | 642 | struct nfs_setaclargs { |
@@ -665,6 +672,7 @@ struct nfs_getaclres { | |||
665 | struct nfs_setattrres { | 672 | struct nfs_setattrres { |
666 | struct nfs4_sequence_res seq_res; | 673 | struct nfs4_sequence_res seq_res; |
667 | struct nfs_fattr * fattr; | 674 | struct nfs_fattr * fattr; |
675 | struct nfs4_label *label; | ||
668 | const struct nfs_server * server; | 676 | const struct nfs_server * server; |
669 | }; | 677 | }; |
670 | 678 | ||
@@ -862,6 +870,7 @@ struct nfs4_create_arg { | |||
862 | const struct iattr * attrs; | 870 | const struct iattr * attrs; |
863 | const struct nfs_fh * dir_fh; | 871 | const struct nfs_fh * dir_fh; |
864 | const u32 * bitmask; | 872 | const u32 * bitmask; |
873 | const struct nfs4_label *label; | ||
865 | }; | 874 | }; |
866 | 875 | ||
867 | struct nfs4_create_res { | 876 | struct nfs4_create_res { |
@@ -869,6 +878,7 @@ struct nfs4_create_res { | |||
869 | const struct nfs_server * server; | 878 | const struct nfs_server * server; |
870 | struct nfs_fh * fh; | 879 | struct nfs_fh * fh; |
871 | struct nfs_fattr * fattr; | 880 | struct nfs_fattr * fattr; |
881 | struct nfs4_label *label; | ||
872 | struct nfs4_change_info dir_cinfo; | 882 | struct nfs4_change_info dir_cinfo; |
873 | }; | 883 | }; |
874 | 884 | ||
@@ -893,6 +903,7 @@ struct nfs4_getattr_res { | |||
893 | struct nfs4_sequence_res seq_res; | 903 | struct nfs4_sequence_res seq_res; |
894 | const struct nfs_server * server; | 904 | const struct nfs_server * server; |
895 | struct nfs_fattr * fattr; | 905 | struct nfs_fattr * fattr; |
906 | struct nfs4_label *label; | ||
896 | }; | 907 | }; |
897 | 908 | ||
898 | struct nfs4_link_arg { | 909 | struct nfs4_link_arg { |
@@ -907,6 +918,7 @@ struct nfs4_link_res { | |||
907 | struct nfs4_sequence_res seq_res; | 918 | struct nfs4_sequence_res seq_res; |
908 | const struct nfs_server * server; | 919 | const struct nfs_server * server; |
909 | struct nfs_fattr * fattr; | 920 | struct nfs_fattr * fattr; |
921 | struct nfs4_label *label; | ||
910 | struct nfs4_change_info cinfo; | 922 | struct nfs4_change_info cinfo; |
911 | struct nfs_fattr * dir_attr; | 923 | struct nfs_fattr * dir_attr; |
912 | }; | 924 | }; |
@@ -924,6 +936,7 @@ struct nfs4_lookup_res { | |||
924 | const struct nfs_server * server; | 936 | const struct nfs_server * server; |
925 | struct nfs_fattr * fattr; | 937 | struct nfs_fattr * fattr; |
926 | struct nfs_fh * fh; | 938 | struct nfs_fh * fh; |
939 | struct nfs4_label *label; | ||
927 | }; | 940 | }; |
928 | 941 | ||
929 | struct nfs4_lookup_root_arg { | 942 | struct nfs4_lookup_root_arg { |
@@ -1366,11 +1379,12 @@ struct nfs_rpc_ops { | |||
1366 | struct dentry *(*try_mount) (int, const char *, struct nfs_mount_info *, | 1379 | struct dentry *(*try_mount) (int, const char *, struct nfs_mount_info *, |
1367 | struct nfs_subversion *); | 1380 | struct nfs_subversion *); |
1368 | int (*getattr) (struct nfs_server *, struct nfs_fh *, | 1381 | int (*getattr) (struct nfs_server *, struct nfs_fh *, |
1369 | struct nfs_fattr *); | 1382 | struct nfs_fattr *, struct nfs4_label *); |
1370 | int (*setattr) (struct dentry *, struct nfs_fattr *, | 1383 | int (*setattr) (struct dentry *, struct nfs_fattr *, |
1371 | struct iattr *); | 1384 | struct iattr *); |
1372 | int (*lookup) (struct inode *, struct qstr *, | 1385 | int (*lookup) (struct inode *, struct qstr *, |
1373 | struct nfs_fh *, struct nfs_fattr *); | 1386 | struct nfs_fh *, struct nfs_fattr *, |
1387 | struct nfs4_label *); | ||
1374 | int (*access) (struct inode *, struct nfs_access_entry *); | 1388 | int (*access) (struct inode *, struct nfs_access_entry *); |
1375 | int (*readlink)(struct inode *, struct page *, unsigned int, | 1389 | int (*readlink)(struct inode *, struct page *, unsigned int, |
1376 | unsigned int); | 1390 | unsigned int); |
diff --git a/include/linux/of_device.h b/include/linux/of_device.h index 901b7435e890..9d27475feec1 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h | |||
@@ -4,12 +4,12 @@ | |||
4 | #include <linux/platform_device.h> | 4 | #include <linux/platform_device.h> |
5 | #include <linux/of_platform.h> /* temporary until merge */ | 5 | #include <linux/of_platform.h> /* temporary until merge */ |
6 | 6 | ||
7 | #ifdef CONFIG_OF_DEVICE | ||
8 | #include <linux/of.h> | 7 | #include <linux/of.h> |
9 | #include <linux/mod_devicetable.h> | 8 | #include <linux/mod_devicetable.h> |
10 | 9 | ||
11 | struct device; | 10 | struct device; |
12 | 11 | ||
12 | #ifdef CONFIG_OF | ||
13 | extern const struct of_device_id *of_match_device( | 13 | extern const struct of_device_id *of_match_device( |
14 | const struct of_device_id *matches, const struct device *dev); | 14 | const struct of_device_id *matches, const struct device *dev); |
15 | extern void of_device_make_bus_id(struct device *dev); | 15 | extern void of_device_make_bus_id(struct device *dev); |
@@ -43,7 +43,7 @@ static inline void of_device_node_put(struct device *dev) | |||
43 | of_node_put(dev->of_node); | 43 | of_node_put(dev->of_node); |
44 | } | 44 | } |
45 | 45 | ||
46 | #else /* CONFIG_OF_DEVICE */ | 46 | #else /* CONFIG_OF */ |
47 | 47 | ||
48 | static inline int of_driver_match_device(struct device *dev, | 48 | static inline int of_driver_match_device(struct device *dev, |
49 | struct device_driver *drv) | 49 | struct device_driver *drv) |
@@ -67,6 +67,6 @@ static inline const struct of_device_id *of_match_device( | |||
67 | { | 67 | { |
68 | return NULL; | 68 | return NULL; |
69 | } | 69 | } |
70 | #endif /* CONFIG_OF_DEVICE */ | 70 | #endif /* CONFIG_OF */ |
71 | 71 | ||
72 | #endif /* _LINUX_OF_DEVICE_H */ | 72 | #endif /* _LINUX_OF_DEVICE_H */ |
diff --git a/include/linux/of_dma.h b/include/linux/of_dma.h index 364dda734877..ae36298ba076 100644 --- a/include/linux/of_dma.h +++ b/include/linux/of_dma.h | |||
@@ -21,7 +21,6 @@ struct device_node; | |||
21 | struct of_dma { | 21 | struct of_dma { |
22 | struct list_head of_dma_controllers; | 22 | struct list_head of_dma_controllers; |
23 | struct device_node *of_node; | 23 | struct device_node *of_node; |
24 | int of_dma_nbcells; | ||
25 | struct dma_chan *(*of_dma_xlate) | 24 | struct dma_chan *(*of_dma_xlate) |
26 | (struct of_phandle_args *, struct of_dma *); | 25 | (struct of_phandle_args *, struct of_dma *); |
27 | void *of_dma_data; | 26 | void *of_dma_data; |
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 2a93b64a3869..05cb4a928252 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h | |||
@@ -13,8 +13,6 @@ | |||
13 | 13 | ||
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | #include <linux/mod_devicetable.h> | 15 | #include <linux/mod_devicetable.h> |
16 | |||
17 | #ifdef CONFIG_OF_DEVICE | ||
18 | #include <linux/pm.h> | 16 | #include <linux/pm.h> |
19 | #include <linux/of_device.h> | 17 | #include <linux/of_device.h> |
20 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
@@ -53,27 +51,6 @@ struct of_dev_auxdata { | |||
53 | { .compatible = _compat, .phys_addr = _phys, .name = _name, \ | 51 | { .compatible = _compat, .phys_addr = _phys, .name = _name, \ |
54 | .platform_data = _pdata } | 52 | .platform_data = _pdata } |
55 | 53 | ||
56 | /** | ||
57 | * of_platform_driver - Legacy of-aware driver for platform devices. | ||
58 | * | ||
59 | * An of_platform_driver driver is attached to a basic platform_device on | ||
60 | * the ibm ebus (ibmebus_bus_type). | ||
61 | */ | ||
62 | struct of_platform_driver | ||
63 | { | ||
64 | int (*probe)(struct platform_device* dev, | ||
65 | const struct of_device_id *match); | ||
66 | int (*remove)(struct platform_device* dev); | ||
67 | |||
68 | int (*suspend)(struct platform_device* dev, pm_message_t state); | ||
69 | int (*resume)(struct platform_device* dev); | ||
70 | int (*shutdown)(struct platform_device* dev); | ||
71 | |||
72 | struct device_driver driver; | ||
73 | }; | ||
74 | #define to_of_platform_driver(drv) \ | ||
75 | container_of(drv,struct of_platform_driver, driver) | ||
76 | |||
77 | extern const struct of_device_id of_default_bus_match_table[]; | 54 | extern const struct of_device_id of_default_bus_match_table[]; |
78 | 55 | ||
79 | /* Platform drivers register/unregister */ | 56 | /* Platform drivers register/unregister */ |
@@ -82,7 +59,6 @@ extern struct platform_device *of_device_alloc(struct device_node *np, | |||
82 | struct device *parent); | 59 | struct device *parent); |
83 | extern struct platform_device *of_find_device_by_node(struct device_node *np); | 60 | extern struct platform_device *of_find_device_by_node(struct device_node *np); |
84 | 61 | ||
85 | #ifdef CONFIG_OF_ADDRESS /* device reg helpers depend on OF_ADDRESS */ | ||
86 | /* Platform devices and busses creation */ | 62 | /* Platform devices and busses creation */ |
87 | extern struct platform_device *of_platform_device_create(struct device_node *np, | 63 | extern struct platform_device *of_platform_device_create(struct device_node *np, |
88 | const char *bus_id, | 64 | const char *bus_id, |
@@ -91,17 +67,12 @@ extern struct platform_device *of_platform_device_create(struct device_node *np, | |||
91 | extern int of_platform_bus_probe(struct device_node *root, | 67 | extern int of_platform_bus_probe(struct device_node *root, |
92 | const struct of_device_id *matches, | 68 | const struct of_device_id *matches, |
93 | struct device *parent); | 69 | struct device *parent); |
70 | #ifdef CONFIG_OF_ADDRESS | ||
94 | extern int of_platform_populate(struct device_node *root, | 71 | extern int of_platform_populate(struct device_node *root, |
95 | const struct of_device_id *matches, | 72 | const struct of_device_id *matches, |
96 | const struct of_dev_auxdata *lookup, | 73 | const struct of_dev_auxdata *lookup, |
97 | struct device *parent); | 74 | struct device *parent); |
98 | #endif /* CONFIG_OF_ADDRESS */ | 75 | #else |
99 | |||
100 | #endif /* CONFIG_OF_DEVICE */ | ||
101 | |||
102 | #if !defined(CONFIG_OF_ADDRESS) | ||
103 | struct of_dev_auxdata; | ||
104 | struct device_node; | ||
105 | static inline int of_platform_populate(struct device_node *root, | 76 | static inline int of_platform_populate(struct device_node *root, |
106 | const struct of_device_id *matches, | 77 | const struct of_device_id *matches, |
107 | const struct of_dev_auxdata *lookup, | 78 | const struct of_dev_auxdata *lookup, |
@@ -109,6 +80,6 @@ static inline int of_platform_populate(struct device_node *root, | |||
109 | { | 80 | { |
110 | return -ENODEV; | 81 | return -ENODEV; |
111 | } | 82 | } |
112 | #endif /* !CONFIG_OF_ADDRESS */ | 83 | #endif |
113 | 84 | ||
114 | #endif /* _LINUX_OF_PLATFORM_H */ | 85 | #endif /* _LINUX_OF_PLATFORM_H */ |
diff --git a/include/linux/pageblock-flags.h b/include/linux/pageblock-flags.h index be655e4a2a75..2ee8cd2466b5 100644 --- a/include/linux/pageblock-flags.h +++ b/include/linux/pageblock-flags.h | |||
@@ -80,10 +80,4 @@ void set_pageblock_flags_group(struct page *page, unsigned long flags, | |||
80 | PB_migrate_skip) | 80 | PB_migrate_skip) |
81 | #endif /* CONFIG_COMPACTION */ | 81 | #endif /* CONFIG_COMPACTION */ |
82 | 82 | ||
83 | #define get_pageblock_flags(page) \ | ||
84 | get_pageblock_flags_group(page, 0, PB_migrate_end) | ||
85 | #define set_pageblock_flags(page, flags) \ | ||
86 | set_pageblock_flags_group(page, flags, \ | ||
87 | 0, PB_migrate_end) | ||
88 | |||
89 | #endif /* PAGEBLOCK_FLAGS_H */ | 83 | #endif /* PAGEBLOCK_FLAGS_H */ |
diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h index 2aa12b8499c0..e4dbfab37729 100644 --- a/include/linux/pagevec.h +++ b/include/linux/pagevec.h | |||
@@ -21,7 +21,7 @@ struct pagevec { | |||
21 | }; | 21 | }; |
22 | 22 | ||
23 | void __pagevec_release(struct pagevec *pvec); | 23 | void __pagevec_release(struct pagevec *pvec); |
24 | void __pagevec_lru_add(struct pagevec *pvec, enum lru_list lru); | 24 | void __pagevec_lru_add(struct pagevec *pvec); |
25 | unsigned pagevec_lookup(struct pagevec *pvec, struct address_space *mapping, | 25 | unsigned pagevec_lookup(struct pagevec *pvec, struct address_space *mapping, |
26 | pgoff_t start, unsigned nr_pages); | 26 | pgoff_t start, unsigned nr_pages); |
27 | unsigned pagevec_lookup_tag(struct pagevec *pvec, | 27 | unsigned pagevec_lookup_tag(struct pagevec *pvec, |
@@ -64,36 +64,4 @@ static inline void pagevec_release(struct pagevec *pvec) | |||
64 | __pagevec_release(pvec); | 64 | __pagevec_release(pvec); |
65 | } | 65 | } |
66 | 66 | ||
67 | static inline void __pagevec_lru_add_anon(struct pagevec *pvec) | ||
68 | { | ||
69 | __pagevec_lru_add(pvec, LRU_INACTIVE_ANON); | ||
70 | } | ||
71 | |||
72 | static inline void __pagevec_lru_add_active_anon(struct pagevec *pvec) | ||
73 | { | ||
74 | __pagevec_lru_add(pvec, LRU_ACTIVE_ANON); | ||
75 | } | ||
76 | |||
77 | static inline void __pagevec_lru_add_file(struct pagevec *pvec) | ||
78 | { | ||
79 | __pagevec_lru_add(pvec, LRU_INACTIVE_FILE); | ||
80 | } | ||
81 | |||
82 | static inline void __pagevec_lru_add_active_file(struct pagevec *pvec) | ||
83 | { | ||
84 | __pagevec_lru_add(pvec, LRU_ACTIVE_FILE); | ||
85 | } | ||
86 | |||
87 | static inline void pagevec_lru_add_file(struct pagevec *pvec) | ||
88 | { | ||
89 | if (pagevec_count(pvec)) | ||
90 | __pagevec_lru_add_file(pvec); | ||
91 | } | ||
92 | |||
93 | static inline void pagevec_lru_add_anon(struct pagevec *pvec) | ||
94 | { | ||
95 | if (pagevec_count(pvec)) | ||
96 | __pagevec_lru_add_anon(pvec); | ||
97 | } | ||
98 | |||
99 | #endif /* _LINUX_PAGEVEC_H */ | 67 | #endif /* _LINUX_PAGEVEC_H */ |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 3a24e4ff3248..0fd1f1582fa1 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -364,7 +364,8 @@ static inline struct pci_dev *pci_physfn(struct pci_dev *dev) | |||
364 | return dev; | 364 | return dev; |
365 | } | 365 | } |
366 | 366 | ||
367 | struct pci_dev *alloc_pci_dev(void); | 367 | struct pci_dev *pci_alloc_dev(struct pci_bus *bus); |
368 | struct pci_dev * __deprecated alloc_pci_dev(void); | ||
368 | 369 | ||
369 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) | 370 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) |
370 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) | 371 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) |
@@ -1018,6 +1019,8 @@ int pci_request_selected_regions_exclusive(struct pci_dev *, int, const char *); | |||
1018 | void pci_release_selected_regions(struct pci_dev *, int); | 1019 | void pci_release_selected_regions(struct pci_dev *, int); |
1019 | 1020 | ||
1020 | /* drivers/pci/bus.c */ | 1021 | /* drivers/pci/bus.c */ |
1022 | struct pci_bus *pci_bus_get(struct pci_bus *bus); | ||
1023 | void pci_bus_put(struct pci_bus *bus); | ||
1021 | void pci_add_resource(struct list_head *resources, struct resource *res); | 1024 | void pci_add_resource(struct list_head *resources, struct resource *res); |
1022 | void pci_add_resource_offset(struct list_head *resources, struct resource *res, | 1025 | void pci_add_resource_offset(struct list_head *resources, struct resource *res, |
1023 | resource_size_t offset); | 1026 | resource_size_t offset); |
@@ -1643,6 +1646,7 @@ void pcibios_set_master(struct pci_dev *dev); | |||
1643 | int pcibios_set_pcie_reset_state(struct pci_dev *dev, | 1646 | int pcibios_set_pcie_reset_state(struct pci_dev *dev, |
1644 | enum pcie_reset_state state); | 1647 | enum pcie_reset_state state); |
1645 | int pcibios_add_device(struct pci_dev *dev); | 1648 | int pcibios_add_device(struct pci_dev *dev); |
1649 | void pcibios_release_device(struct pci_dev *dev); | ||
1646 | 1650 | ||
1647 | #ifdef CONFIG_PCI_MMCONFIG | 1651 | #ifdef CONFIG_PCI_MMCONFIG |
1648 | void __init pci_mmcfg_early_init(void); | 1652 | void __init pci_mmcfg_early_init(void); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index c12916248469..3bed2e89611b 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -556,7 +556,6 @@ | |||
556 | #define PCI_DEVICE_ID_AMD_8131_BRIDGE 0x7450 | 556 | #define PCI_DEVICE_ID_AMD_8131_BRIDGE 0x7450 |
557 | #define PCI_DEVICE_ID_AMD_8131_APIC 0x7451 | 557 | #define PCI_DEVICE_ID_AMD_8131_APIC 0x7451 |
558 | #define PCI_DEVICE_ID_AMD_8132_BRIDGE 0x7458 | 558 | #define PCI_DEVICE_ID_AMD_8132_BRIDGE 0x7458 |
559 | #define PCI_DEVICE_ID_AMD_HUDSON2_SMBUS 0x780b | ||
560 | #define PCI_DEVICE_ID_AMD_CS5535_IDE 0x208F | 559 | #define PCI_DEVICE_ID_AMD_CS5535_IDE 0x208F |
561 | #define PCI_DEVICE_ID_AMD_CS5536_ISA 0x2090 | 560 | #define PCI_DEVICE_ID_AMD_CS5536_ISA 0x2090 |
562 | #define PCI_DEVICE_ID_AMD_CS5536_FLASH 0x2091 | 561 | #define PCI_DEVICE_ID_AMD_CS5536_FLASH 0x2091 |
@@ -568,8 +567,9 @@ | |||
568 | #define PCI_DEVICE_ID_AMD_CS5536_IDE 0x209A | 567 | #define PCI_DEVICE_ID_AMD_CS5536_IDE 0x209A |
569 | #define PCI_DEVICE_ID_AMD_LX_VIDEO 0x2081 | 568 | #define PCI_DEVICE_ID_AMD_LX_VIDEO 0x2081 |
570 | #define PCI_DEVICE_ID_AMD_LX_AES 0x2082 | 569 | #define PCI_DEVICE_ID_AMD_LX_AES 0x2082 |
571 | #define PCI_DEVICE_ID_AMD_HUDSON2_IDE 0x780c | ||
572 | #define PCI_DEVICE_ID_AMD_HUDSON2_SATA_IDE 0x7800 | 570 | #define PCI_DEVICE_ID_AMD_HUDSON2_SATA_IDE 0x7800 |
571 | #define PCI_DEVICE_ID_AMD_HUDSON2_SMBUS 0x780b | ||
572 | #define PCI_DEVICE_ID_AMD_HUDSON2_IDE 0x780c | ||
573 | 573 | ||
574 | #define PCI_VENDOR_ID_TRIDENT 0x1023 | 574 | #define PCI_VENDOR_ID_TRIDENT 0x1023 |
575 | #define PCI_DEVICE_ID_TRIDENT_4DWAVE_DX 0x2000 | 575 | #define PCI_DEVICE_ID_TRIDENT_4DWAVE_DX 0x2000 |
@@ -2476,6 +2476,9 @@ | |||
2476 | 2476 | ||
2477 | #define PCI_VENDOR_ID_ASMEDIA 0x1b21 | 2477 | #define PCI_VENDOR_ID_ASMEDIA 0x1b21 |
2478 | 2478 | ||
2479 | #define PCI_VENDOR_ID_CIRCUITCO 0x1cc8 | ||
2480 | #define PCI_SUBSYSTEM_ID_CIRCUITCO_MINNOWBOARD 0x0001 | ||
2481 | |||
2479 | #define PCI_VENDOR_ID_TEKRAM 0x1de1 | 2482 | #define PCI_VENDOR_ID_TEKRAM 0x1de1 |
2480 | #define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 | 2483 | #define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 |
2481 | 2484 | ||
diff --git a/include/linux/percpu-refcount.h b/include/linux/percpu-refcount.h new file mode 100644 index 000000000000..95961f0bf62d --- /dev/null +++ b/include/linux/percpu-refcount.h | |||
@@ -0,0 +1,174 @@ | |||
1 | /* | ||
2 | * Percpu refcounts: | ||
3 | * (C) 2012 Google, Inc. | ||
4 | * Author: Kent Overstreet <koverstreet@google.com> | ||
5 | * | ||
6 | * This implements a refcount with similar semantics to atomic_t - atomic_inc(), | ||
7 | * atomic_dec_and_test() - but percpu. | ||
8 | * | ||
9 | * There's one important difference between percpu refs and normal atomic_t | ||
10 | * refcounts; you have to keep track of your initial refcount, and then when you | ||
11 | * start shutting down you call percpu_ref_kill() _before_ dropping the initial | ||
12 | * refcount. | ||
13 | * | ||
14 | * The refcount will have a range of 0 to ((1U << 31) - 1), i.e. one bit less | ||
15 | * than an atomic_t - this is because of the way shutdown works, see | ||
16 | * percpu_ref_kill()/PCPU_COUNT_BIAS. | ||
17 | * | ||
18 | * Before you call percpu_ref_kill(), percpu_ref_put() does not check for the | ||
19 | * refcount hitting 0 - it can't, if it was in percpu mode. percpu_ref_kill() | ||
20 | * puts the ref back in single atomic_t mode, collecting the per cpu refs and | ||
21 | * issuing the appropriate barriers, and then marks the ref as shutting down so | ||
22 | * that percpu_ref_put() will check for the ref hitting 0. After it returns, | ||
23 | * it's safe to drop the initial ref. | ||
24 | * | ||
25 | * USAGE: | ||
26 | * | ||
27 | * See fs/aio.c for some example usage; it's used there for struct kioctx, which | ||
28 | * is created when userspaces calls io_setup(), and destroyed when userspace | ||
29 | * calls io_destroy() or the process exits. | ||
30 | * | ||
31 | * In the aio code, kill_ioctx() is called when we wish to destroy a kioctx; it | ||
32 | * calls percpu_ref_kill(), then hlist_del_rcu() and sychronize_rcu() to remove | ||
33 | * the kioctx from the proccess's list of kioctxs - after that, there can't be | ||
34 | * any new users of the kioctx (from lookup_ioctx()) and it's then safe to drop | ||
35 | * the initial ref with percpu_ref_put(). | ||
36 | * | ||
37 | * Code that does a two stage shutdown like this often needs some kind of | ||
38 | * explicit synchronization to ensure the initial refcount can only be dropped | ||
39 | * once - percpu_ref_kill() does this for you, it returns true once and false if | ||
40 | * someone else already called it. The aio code uses it this way, but it's not | ||
41 | * necessary if the code has some other mechanism to synchronize teardown. | ||
42 | * around. | ||
43 | */ | ||
44 | |||
45 | #ifndef _LINUX_PERCPU_REFCOUNT_H | ||
46 | #define _LINUX_PERCPU_REFCOUNT_H | ||
47 | |||
48 | #include <linux/atomic.h> | ||
49 | #include <linux/kernel.h> | ||
50 | #include <linux/percpu.h> | ||
51 | #include <linux/rcupdate.h> | ||
52 | |||
53 | struct percpu_ref; | ||
54 | typedef void (percpu_ref_func_t)(struct percpu_ref *); | ||
55 | |||
56 | struct percpu_ref { | ||
57 | atomic_t count; | ||
58 | /* | ||
59 | * The low bit of the pointer indicates whether the ref is in percpu | ||
60 | * mode; if set, then get/put will manipulate the atomic_t (this is a | ||
61 | * hack because we need to keep the pointer around for | ||
62 | * percpu_ref_kill_rcu()) | ||
63 | */ | ||
64 | unsigned __percpu *pcpu_count; | ||
65 | percpu_ref_func_t *release; | ||
66 | percpu_ref_func_t *confirm_kill; | ||
67 | struct rcu_head rcu; | ||
68 | }; | ||
69 | |||
70 | int __must_check percpu_ref_init(struct percpu_ref *ref, | ||
71 | percpu_ref_func_t *release); | ||
72 | void percpu_ref_cancel_init(struct percpu_ref *ref); | ||
73 | void percpu_ref_kill_and_confirm(struct percpu_ref *ref, | ||
74 | percpu_ref_func_t *confirm_kill); | ||
75 | |||
76 | /** | ||
77 | * percpu_ref_kill - drop the initial ref | ||
78 | * @ref: percpu_ref to kill | ||
79 | * | ||
80 | * Must be used to drop the initial ref on a percpu refcount; must be called | ||
81 | * precisely once before shutdown. | ||
82 | * | ||
83 | * Puts @ref in non percpu mode, then does a call_rcu() before gathering up the | ||
84 | * percpu counters and dropping the initial ref. | ||
85 | */ | ||
86 | static inline void percpu_ref_kill(struct percpu_ref *ref) | ||
87 | { | ||
88 | return percpu_ref_kill_and_confirm(ref, NULL); | ||
89 | } | ||
90 | |||
91 | #define PCPU_STATUS_BITS 2 | ||
92 | #define PCPU_STATUS_MASK ((1 << PCPU_STATUS_BITS) - 1) | ||
93 | #define PCPU_REF_PTR 0 | ||
94 | #define PCPU_REF_DEAD 1 | ||
95 | |||
96 | #define REF_STATUS(count) (((unsigned long) count) & PCPU_STATUS_MASK) | ||
97 | |||
98 | /** | ||
99 | * percpu_ref_get - increment a percpu refcount | ||
100 | * @ref: percpu_ref to get | ||
101 | * | ||
102 | * Analagous to atomic_inc(). | ||
103 | */ | ||
104 | static inline void percpu_ref_get(struct percpu_ref *ref) | ||
105 | { | ||
106 | unsigned __percpu *pcpu_count; | ||
107 | |||
108 | rcu_read_lock_sched(); | ||
109 | |||
110 | pcpu_count = ACCESS_ONCE(ref->pcpu_count); | ||
111 | |||
112 | if (likely(REF_STATUS(pcpu_count) == PCPU_REF_PTR)) | ||
113 | __this_cpu_inc(*pcpu_count); | ||
114 | else | ||
115 | atomic_inc(&ref->count); | ||
116 | |||
117 | rcu_read_unlock_sched(); | ||
118 | } | ||
119 | |||
120 | /** | ||
121 | * percpu_ref_tryget - try to increment a percpu refcount | ||
122 | * @ref: percpu_ref to try-get | ||
123 | * | ||
124 | * Increment a percpu refcount unless it has already been killed. Returns | ||
125 | * %true on success; %false on failure. | ||
126 | * | ||
127 | * Completion of percpu_ref_kill() in itself doesn't guarantee that tryget | ||
128 | * will fail. For such guarantee, percpu_ref_kill_and_confirm() should be | ||
129 | * used. After the confirm_kill callback is invoked, it's guaranteed that | ||
130 | * no new reference will be given out by percpu_ref_tryget(). | ||
131 | */ | ||
132 | static inline bool percpu_ref_tryget(struct percpu_ref *ref) | ||
133 | { | ||
134 | unsigned __percpu *pcpu_count; | ||
135 | int ret = false; | ||
136 | |||
137 | rcu_read_lock_sched(); | ||
138 | |||
139 | pcpu_count = ACCESS_ONCE(ref->pcpu_count); | ||
140 | |||
141 | if (likely(REF_STATUS(pcpu_count) == PCPU_REF_PTR)) { | ||
142 | __this_cpu_inc(*pcpu_count); | ||
143 | ret = true; | ||
144 | } | ||
145 | |||
146 | rcu_read_unlock_sched(); | ||
147 | |||
148 | return ret; | ||
149 | } | ||
150 | |||
151 | /** | ||
152 | * percpu_ref_put - decrement a percpu refcount | ||
153 | * @ref: percpu_ref to put | ||
154 | * | ||
155 | * Decrement the refcount, and if 0, call the release function (which was passed | ||
156 | * to percpu_ref_init()) | ||
157 | */ | ||
158 | static inline void percpu_ref_put(struct percpu_ref *ref) | ||
159 | { | ||
160 | unsigned __percpu *pcpu_count; | ||
161 | |||
162 | rcu_read_lock_sched(); | ||
163 | |||
164 | pcpu_count = ACCESS_ONCE(ref->pcpu_count); | ||
165 | |||
166 | if (likely(REF_STATUS(pcpu_count) == PCPU_REF_PTR)) | ||
167 | __this_cpu_dec(*pcpu_count); | ||
168 | else if (unlikely(atomic_dec_and_test(&ref->count))) | ||
169 | ref->release(ref); | ||
170 | |||
171 | rcu_read_unlock_sched(); | ||
172 | } | ||
173 | |||
174 | #endif | ||
diff --git a/include/linux/phy.h b/include/linux/phy.h index 9e11039dd7a3..64ab823f7b74 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -49,6 +49,7 @@ | |||
49 | 49 | ||
50 | #define PHY_HAS_INTERRUPT 0x00000001 | 50 | #define PHY_HAS_INTERRUPT 0x00000001 |
51 | #define PHY_HAS_MAGICANEG 0x00000002 | 51 | #define PHY_HAS_MAGICANEG 0x00000002 |
52 | #define PHY_IS_INTERNAL 0x00000004 | ||
52 | 53 | ||
53 | /* Interface Mode definitions */ | 54 | /* Interface Mode definitions */ |
54 | typedef enum { | 55 | typedef enum { |
@@ -57,6 +58,7 @@ typedef enum { | |||
57 | PHY_INTERFACE_MODE_GMII, | 58 | PHY_INTERFACE_MODE_GMII, |
58 | PHY_INTERFACE_MODE_SGMII, | 59 | PHY_INTERFACE_MODE_SGMII, |
59 | PHY_INTERFACE_MODE_TBI, | 60 | PHY_INTERFACE_MODE_TBI, |
61 | PHY_INTERFACE_MODE_REVMII, | ||
60 | PHY_INTERFACE_MODE_RMII, | 62 | PHY_INTERFACE_MODE_RMII, |
61 | PHY_INTERFACE_MODE_RGMII, | 63 | PHY_INTERFACE_MODE_RGMII, |
62 | PHY_INTERFACE_MODE_RGMII_ID, | 64 | PHY_INTERFACE_MODE_RGMII_ID, |
@@ -261,6 +263,7 @@ struct phy_c45_device_ids { | |||
261 | * phy_id: UID for this device found during discovery | 263 | * phy_id: UID for this device found during discovery |
262 | * c45_ids: 802.3-c45 Device Identifers if is_c45. | 264 | * c45_ids: 802.3-c45 Device Identifers if is_c45. |
263 | * is_c45: Set to true if this phy uses clause 45 addressing. | 265 | * is_c45: Set to true if this phy uses clause 45 addressing. |
266 | * is_internal: Set to true if this phy is internal to a MAC. | ||
264 | * state: state of the PHY for management purposes | 267 | * state: state of the PHY for management purposes |
265 | * dev_flags: Device-specific flags used by the PHY driver. | 268 | * dev_flags: Device-specific flags used by the PHY driver. |
266 | * addr: Bus address of PHY | 269 | * addr: Bus address of PHY |
@@ -298,6 +301,7 @@ struct phy_device { | |||
298 | 301 | ||
299 | struct phy_c45_device_ids c45_ids; | 302 | struct phy_c45_device_ids c45_ids; |
300 | bool is_c45; | 303 | bool is_c45; |
304 | bool is_internal; | ||
301 | 305 | ||
302 | enum phy_state state; | 306 | enum phy_state state; |
303 | 307 | ||
@@ -508,6 +512,27 @@ static inline int phy_write(struct phy_device *phydev, u32 regnum, u16 val) | |||
508 | return mdiobus_write(phydev->bus, phydev->addr, regnum, val); | 512 | return mdiobus_write(phydev->bus, phydev->addr, regnum, val); |
509 | } | 513 | } |
510 | 514 | ||
515 | /** | ||
516 | * phy_interrupt_is_valid - Convenience function for testing a given PHY irq | ||
517 | * @phydev: the phy_device struct | ||
518 | * | ||
519 | * NOTE: must be kept in sync with addition/removal of PHY_POLL and | ||
520 | * PHY_IGNORE_INTERRUPT | ||
521 | */ | ||
522 | static inline bool phy_interrupt_is_valid(struct phy_device *phydev) | ||
523 | { | ||
524 | return phydev->irq != PHY_POLL && phydev->irq != PHY_IGNORE_INTERRUPT; | ||
525 | } | ||
526 | |||
527 | /** | ||
528 | * phy_is_internal - Convenience function for testing if a PHY is internal | ||
529 | * @phydev: the phy_device struct | ||
530 | */ | ||
531 | static inline bool phy_is_internal(struct phy_device *phydev) | ||
532 | { | ||
533 | return phydev->is_internal; | ||
534 | } | ||
535 | |||
511 | struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id, | 536 | struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id, |
512 | bool is_c45, struct phy_c45_device_ids *c45_ids); | 537 | bool is_c45, struct phy_c45_device_ids *c45_ids); |
513 | struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45); | 538 | struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45); |
@@ -545,6 +570,8 @@ void phy_drivers_unregister(struct phy_driver *drv, int n); | |||
545 | int phy_driver_register(struct phy_driver *new_driver); | 570 | int phy_driver_register(struct phy_driver *new_driver); |
546 | int phy_drivers_register(struct phy_driver *new_driver, int n); | 571 | int phy_drivers_register(struct phy_driver *new_driver, int n); |
547 | void phy_state_machine(struct work_struct *work); | 572 | void phy_state_machine(struct work_struct *work); |
573 | void phy_change(struct work_struct *work); | ||
574 | void phy_mac_interrupt(struct phy_device *phydev, int new_link); | ||
548 | void phy_start_machine(struct phy_device *phydev, | 575 | void phy_start_machine(struct phy_device *phydev, |
549 | void (*handler)(struct net_device *)); | 576 | void (*handler)(struct net_device *)); |
550 | void phy_stop_machine(struct phy_device *phydev); | 577 | void phy_stop_machine(struct phy_device *phydev); |
diff --git a/include/linux/pid.h b/include/linux/pid.h index a089a3c447fc..23705a53abba 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -86,11 +86,9 @@ extern struct task_struct *get_pid_task(struct pid *pid, enum pid_type); | |||
86 | extern struct pid *get_task_pid(struct task_struct *task, enum pid_type type); | 86 | extern struct pid *get_task_pid(struct task_struct *task, enum pid_type type); |
87 | 87 | ||
88 | /* | 88 | /* |
89 | * attach_pid() and detach_pid() must be called with the tasklist_lock | 89 | * these helpers must be called with the tasklist_lock write-held. |
90 | * write-held. | ||
91 | */ | 90 | */ |
92 | extern void attach_pid(struct task_struct *task, enum pid_type type, | 91 | extern void attach_pid(struct task_struct *task, enum pid_type); |
93 | struct pid *pid); | ||
94 | extern void detach_pid(struct task_struct *task, enum pid_type); | 92 | extern void detach_pid(struct task_struct *task, enum pid_type); |
95 | extern void change_pid(struct task_struct *task, enum pid_type, | 93 | extern void change_pid(struct task_struct *task, enum pid_type, |
96 | struct pid *pid); | 94 | struct pid *pid); |
diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.h index 4aad3cea69ae..18eccefea06e 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h | |||
@@ -40,6 +40,25 @@ extern int pinctrl_select_state(struct pinctrl *p, struct pinctrl_state *s); | |||
40 | extern struct pinctrl * __must_check devm_pinctrl_get(struct device *dev); | 40 | extern struct pinctrl * __must_check devm_pinctrl_get(struct device *dev); |
41 | extern void devm_pinctrl_put(struct pinctrl *p); | 41 | extern void devm_pinctrl_put(struct pinctrl *p); |
42 | 42 | ||
43 | #ifdef CONFIG_PM | ||
44 | extern int pinctrl_pm_select_default_state(struct device *dev); | ||
45 | extern int pinctrl_pm_select_sleep_state(struct device *dev); | ||
46 | extern int pinctrl_pm_select_idle_state(struct device *dev); | ||
47 | #else | ||
48 | static inline int pinctrl_pm_select_default_state(struct device *dev) | ||
49 | { | ||
50 | return 0; | ||
51 | } | ||
52 | static inline int pinctrl_pm_select_sleep_state(struct device *dev) | ||
53 | { | ||
54 | return 0; | ||
55 | } | ||
56 | static inline int pinctrl_pm_select_idle_state(struct device *dev) | ||
57 | { | ||
58 | return 0; | ||
59 | } | ||
60 | #endif | ||
61 | |||
43 | #else /* !CONFIG_PINCTRL */ | 62 | #else /* !CONFIG_PINCTRL */ |
44 | 63 | ||
45 | static inline int pinctrl_request_gpio(unsigned gpio) | 64 | static inline int pinctrl_request_gpio(unsigned gpio) |
@@ -92,6 +111,21 @@ static inline void devm_pinctrl_put(struct pinctrl *p) | |||
92 | { | 111 | { |
93 | } | 112 | } |
94 | 113 | ||
114 | static inline int pinctrl_pm_select_default_state(struct device *dev) | ||
115 | { | ||
116 | return 0; | ||
117 | } | ||
118 | |||
119 | static inline int pinctrl_pm_select_sleep_state(struct device *dev) | ||
120 | { | ||
121 | return 0; | ||
122 | } | ||
123 | |||
124 | static inline int pinctrl_pm_select_idle_state(struct device *dev) | ||
125 | { | ||
126 | return 0; | ||
127 | } | ||
128 | |||
95 | #endif /* CONFIG_PINCTRL */ | 129 | #endif /* CONFIG_PINCTRL */ |
96 | 130 | ||
97 | static inline struct pinctrl * __must_check pinctrl_get_select( | 131 | static inline struct pinctrl * __must_check pinctrl_get_select( |
@@ -158,47 +192,4 @@ static inline struct pinctrl * __must_check devm_pinctrl_get_select_default( | |||
158 | return devm_pinctrl_get_select(dev, PINCTRL_STATE_DEFAULT); | 192 | return devm_pinctrl_get_select(dev, PINCTRL_STATE_DEFAULT); |
159 | } | 193 | } |
160 | 194 | ||
161 | #ifdef CONFIG_PINCONF | ||
162 | |||
163 | extern int pin_config_get(const char *dev_name, const char *name, | ||
164 | unsigned long *config); | ||
165 | extern int pin_config_set(const char *dev_name, const char *name, | ||
166 | unsigned long config); | ||
167 | extern int pin_config_group_get(const char *dev_name, | ||
168 | const char *pin_group, | ||
169 | unsigned long *config); | ||
170 | extern int pin_config_group_set(const char *dev_name, | ||
171 | const char *pin_group, | ||
172 | unsigned long config); | ||
173 | |||
174 | #else | ||
175 | |||
176 | static inline int pin_config_get(const char *dev_name, const char *name, | ||
177 | unsigned long *config) | ||
178 | { | ||
179 | return 0; | ||
180 | } | ||
181 | |||
182 | static inline int pin_config_set(const char *dev_name, const char *name, | ||
183 | unsigned long config) | ||
184 | { | ||
185 | return 0; | ||
186 | } | ||
187 | |||
188 | static inline int pin_config_group_get(const char *dev_name, | ||
189 | const char *pin_group, | ||
190 | unsigned long *config) | ||
191 | { | ||
192 | return 0; | ||
193 | } | ||
194 | |||
195 | static inline int pin_config_group_set(const char *dev_name, | ||
196 | const char *pin_group, | ||
197 | unsigned long config) | ||
198 | { | ||
199 | return 0; | ||
200 | } | ||
201 | |||
202 | #endif | ||
203 | |||
204 | #endif /* __LINUX_PINCTRL_CONSUMER_H */ | 195 | #endif /* __LINUX_PINCTRL_CONSUMER_H */ |
diff --git a/include/linux/pinctrl/devinfo.h b/include/linux/pinctrl/devinfo.h index 6e5f8a985ea7..281cb91ddcf5 100644 --- a/include/linux/pinctrl/devinfo.h +++ b/include/linux/pinctrl/devinfo.h | |||
@@ -28,6 +28,10 @@ | |||
28 | struct dev_pin_info { | 28 | struct dev_pin_info { |
29 | struct pinctrl *p; | 29 | struct pinctrl *p; |
30 | struct pinctrl_state *default_state; | 30 | struct pinctrl_state *default_state; |
31 | #ifdef CONFIG_PM | ||
32 | struct pinctrl_state *sleep_state; | ||
33 | struct pinctrl_state *idle_state; | ||
34 | #endif | ||
31 | }; | 35 | }; |
32 | 36 | ||
33 | extern int pinctrl_bind_pins(struct device *dev); | 37 | extern int pinctrl_bind_pins(struct device *dev); |
diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h index 6aa238096622..bf7e989abcb5 100644 --- a/include/linux/pinctrl/pinconf-generic.h +++ b/include/linux/pinctrl/pinconf-generic.h | |||
@@ -29,12 +29,25 @@ | |||
29 | * if for example some other pin is going to drive the signal connected | 29 | * if for example some other pin is going to drive the signal connected |
30 | * to it for a while. Pins used for input are usually always high | 30 | * to it for a while. Pins used for input are usually always high |
31 | * impedance. | 31 | * impedance. |
32 | * @PIN_CONFIG_BIAS_BUS_HOLD: the pin will be set to weakly latch so that it | ||
33 | * weakly drives the last value on a tristate bus, also known as a "bus | ||
34 | * holder", "bus keeper" or "repeater". This allows another device on the | ||
35 | * bus to change the value by driving the bus high or low and switching to | ||
36 | * tristate. The argument is ignored. | ||
32 | * @PIN_CONFIG_BIAS_PULL_UP: the pin will be pulled up (usually with high | 37 | * @PIN_CONFIG_BIAS_PULL_UP: the pin will be pulled up (usually with high |
33 | * impedance to VDD). If the argument is != 0 pull-up is enabled, | 38 | * impedance to VDD). If the argument is != 0 pull-up is enabled, |
34 | * if it is 0, pull-up is disabled. | 39 | * if it is 0, pull-up is total, i.e. the pin is connected to VDD. |
35 | * @PIN_CONFIG_BIAS_PULL_DOWN: the pin will be pulled down (usually with high | 40 | * @PIN_CONFIG_BIAS_PULL_DOWN: the pin will be pulled down (usually with high |
36 | * impedance to GROUND). If the argument is != 0 pull-down is enabled, | 41 | * impedance to GROUND). If the argument is != 0 pull-down is enabled, |
37 | * if it is 0, pull-down is disabled. | 42 | * if it is 0, pull-down is total, i.e. the pin is connected to GROUND. |
43 | * @PIN_CONFIG_BIAS_PULL_PIN_DEFAULT: the pin will be pulled up or down based | ||
44 | * on embedded knowledge of the controller hardware, like current mux | ||
45 | * function. The pull direction and possibly strength too will normally | ||
46 | * be decided completely inside the hardware block and not be readable | ||
47 | * from the kernel side. | ||
48 | * If the argument is != 0 pull up/down is enabled, if it is 0, the | ||
49 | * configuration is ignored. The proper way to disable it is to use | ||
50 | * @PIN_CONFIG_BIAS_DISABLE. | ||
38 | * @PIN_CONFIG_DRIVE_PUSH_PULL: the pin will be driven actively high and | 51 | * @PIN_CONFIG_DRIVE_PUSH_PULL: the pin will be driven actively high and |
39 | * low, this is the most typical case and is typically achieved with two | 52 | * low, this is the most typical case and is typically achieved with two |
40 | * active transistors on the output. Setting this config will enable | 53 | * active transistors on the output. Setting this config will enable |
@@ -57,14 +70,14 @@ | |||
57 | * setting pins to this mode. | 70 | * setting pins to this mode. |
58 | * @PIN_CONFIG_INPUT_DEBOUNCE: this will configure the pin to debounce mode, | 71 | * @PIN_CONFIG_INPUT_DEBOUNCE: this will configure the pin to debounce mode, |
59 | * which means it will wait for signals to settle when reading inputs. The | 72 | * which means it will wait for signals to settle when reading inputs. The |
60 | * argument gives the debounce time on a custom format. Setting the | 73 | * argument gives the debounce time in usecs. Setting the |
61 | * argument to zero turns debouncing off. | 74 | * argument to zero turns debouncing off. |
62 | * @PIN_CONFIG_POWER_SOURCE: if the pin can select between different power | 75 | * @PIN_CONFIG_POWER_SOURCE: if the pin can select between different power |
63 | * supplies, the argument to this parameter (on a custom format) tells | 76 | * supplies, the argument to this parameter (on a custom format) tells |
64 | * the driver which alternative power source to use. | 77 | * the driver which alternative power source to use. |
65 | * @PIN_CONFIG_SLEW_RATE: if the pin can select slew rate, the argument to | 78 | * @PIN_CONFIG_SLEW_RATE: if the pin can select slew rate, the argument to |
66 | * this parameter (on a custom format) tells the driver which alternative | 79 | * this parameter (on a custom format) tells the driver which alternative |
67 | * slew rate to use. | 80 | * slew rate to use. |
68 | * @PIN_CONFIG_LOW_POWER_MODE: this will configure the pin for low power | 81 | * @PIN_CONFIG_LOW_POWER_MODE: this will configure the pin for low power |
69 | * operation, if several modes of operation are supported these can be | 82 | * operation, if several modes of operation are supported these can be |
70 | * passed in the argument on a custom form, else just use argument 1 | 83 | * passed in the argument on a custom form, else just use argument 1 |
@@ -78,8 +91,10 @@ | |||
78 | enum pin_config_param { | 91 | enum pin_config_param { |
79 | PIN_CONFIG_BIAS_DISABLE, | 92 | PIN_CONFIG_BIAS_DISABLE, |
80 | PIN_CONFIG_BIAS_HIGH_IMPEDANCE, | 93 | PIN_CONFIG_BIAS_HIGH_IMPEDANCE, |
94 | PIN_CONFIG_BIAS_BUS_HOLD, | ||
81 | PIN_CONFIG_BIAS_PULL_UP, | 95 | PIN_CONFIG_BIAS_PULL_UP, |
82 | PIN_CONFIG_BIAS_PULL_DOWN, | 96 | PIN_CONFIG_BIAS_PULL_DOWN, |
97 | PIN_CONFIG_BIAS_PULL_PIN_DEFAULT, | ||
83 | PIN_CONFIG_DRIVE_PUSH_PULL, | 98 | PIN_CONFIG_DRIVE_PUSH_PULL, |
84 | PIN_CONFIG_DRIVE_OPEN_DRAIN, | 99 | PIN_CONFIG_DRIVE_OPEN_DRAIN, |
85 | PIN_CONFIG_DRIVE_OPEN_SOURCE, | 100 | PIN_CONFIG_DRIVE_OPEN_SOURCE, |
diff --git a/include/linux/pinctrl/pinconf.h b/include/linux/pinctrl/pinconf.h index 1ad4f31ef6b8..f6998692bdc9 100644 --- a/include/linux/pinctrl/pinconf.h +++ b/include/linux/pinctrl/pinconf.h | |||
@@ -30,7 +30,7 @@ struct seq_file; | |||
30 | * @pin_config_set: configure an individual pin | 30 | * @pin_config_set: configure an individual pin |
31 | * @pin_config_group_get: get configurations for an entire pin group | 31 | * @pin_config_group_get: get configurations for an entire pin group |
32 | * @pin_config_group_set: configure all pins in a group | 32 | * @pin_config_group_set: configure all pins in a group |
33 | * @pin_config_group_dbg_set: optional debugfs to modify a pin configuration | 33 | * @pin_config_dbg_parse_modify: optional debugfs to modify a pin configuration |
34 | * @pin_config_dbg_show: optional debugfs display hook that will provide | 34 | * @pin_config_dbg_show: optional debugfs display hook that will provide |
35 | * per-device info for a certain pin in debugfs | 35 | * per-device info for a certain pin in debugfs |
36 | * @pin_config_group_dbg_show: optional debugfs display hook that will provide | 36 | * @pin_config_group_dbg_show: optional debugfs display hook that will provide |
diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h index 2c2a9e8d8578..5979147d2bda 100644 --- a/include/linux/pinctrl/pinctrl.h +++ b/include/linux/pinctrl/pinctrl.h | |||
@@ -49,7 +49,8 @@ struct pinctrl_pin_desc { | |||
49 | * @name: a name for the chip in this range | 49 | * @name: a name for the chip in this range |
50 | * @id: an ID number for the chip in this range | 50 | * @id: an ID number for the chip in this range |
51 | * @base: base offset of the GPIO range | 51 | * @base: base offset of the GPIO range |
52 | * @pin_base: base pin number of the GPIO range | 52 | * @pin_base: base pin number of the GPIO range if pins == NULL |
53 | * @pins: enumeration of pins in GPIO range or NULL | ||
53 | * @npins: number of pins in the GPIO range, including the base number | 54 | * @npins: number of pins in the GPIO range, including the base number |
54 | * @gc: an optional pointer to a gpio_chip | 55 | * @gc: an optional pointer to a gpio_chip |
55 | */ | 56 | */ |
@@ -59,6 +60,7 @@ struct pinctrl_gpio_range { | |||
59 | unsigned int id; | 60 | unsigned int id; |
60 | unsigned int base; | 61 | unsigned int base; |
61 | unsigned int pin_base; | 62 | unsigned int pin_base; |
63 | unsigned const *pins; | ||
62 | unsigned int npins; | 64 | unsigned int npins; |
63 | struct gpio_chip *gc; | 65 | struct gpio_chip *gc; |
64 | }; | 66 | }; |
diff --git a/include/linux/platform_data/brcmfmac-sdio.h b/include/linux/platform_data/brcmfmac-sdio.h index 1ade657d5fc1..b7174998c24a 100644 --- a/include/linux/platform_data/brcmfmac-sdio.h +++ b/include/linux/platform_data/brcmfmac-sdio.h | |||
@@ -90,6 +90,10 @@ void __init brcmfmac_init_pdata(void) | |||
90 | * oob_irq_nr, oob_irq_flags: the OOB interrupt information. The values are | 90 | * oob_irq_nr, oob_irq_flags: the OOB interrupt information. The values are |
91 | * used for registering the irq using request_irq function. | 91 | * used for registering the irq using request_irq function. |
92 | * | 92 | * |
93 | * broken_sg_support: flag for broken sg list support of SDIO host controller. | ||
94 | * Set this to true if the SDIO host controller has higher align requirement | ||
95 | * than 32 bytes for each scatterlist item. | ||
96 | * | ||
93 | * power_on: This function is called by the brcmfmac when the module gets | 97 | * power_on: This function is called by the brcmfmac when the module gets |
94 | * loaded. This can be particularly useful for low power devices. The platform | 98 | * loaded. This can be particularly useful for low power devices. The platform |
95 | * spcific routine may for example decide to power up the complete device. | 99 | * spcific routine may for example decide to power up the complete device. |
@@ -116,6 +120,7 @@ struct brcmfmac_sdio_platform_data { | |||
116 | bool oob_irq_supported; | 120 | bool oob_irq_supported; |
117 | unsigned int oob_irq_nr; | 121 | unsigned int oob_irq_nr; |
118 | unsigned long oob_irq_flags; | 122 | unsigned long oob_irq_flags; |
123 | bool broken_sg_support; | ||
119 | void (*power_on)(void); | 124 | void (*power_on)(void); |
120 | void (*power_off)(void); | 125 | void (*power_off)(void); |
121 | void (*reset)(void); | 126 | void (*reset)(void); |
diff --git a/include/linux/platform_data/clk-ux500.h b/include/linux/platform_data/clk-ux500.h index 320d9c39ea0a..9d98f3aaa16c 100644 --- a/include/linux/platform_data/clk-ux500.h +++ b/include/linux/platform_data/clk-ux500.h | |||
@@ -12,7 +12,9 @@ | |||
12 | 12 | ||
13 | void u8500_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base, | 13 | void u8500_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base, |
14 | u32 clkrst5_base, u32 clkrst6_base); | 14 | u32 clkrst5_base, u32 clkrst6_base); |
15 | void u9540_clk_init(void); | 15 | void u9540_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base, |
16 | void u8540_clk_init(void); | 16 | u32 clkrst5_base, u32 clkrst6_base); |
17 | void u8540_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base, | ||
18 | u32 clkrst5_base, u32 clkrst6_base); | ||
17 | 19 | ||
18 | #endif /* __CLK_UX500_H */ | 20 | #endif /* __CLK_UX500_H */ |
diff --git a/include/linux/platform_data/cyttsp4.h b/include/linux/platform_data/cyttsp4.h new file mode 100644 index 000000000000..6eba54aff1dc --- /dev/null +++ b/include/linux/platform_data/cyttsp4.h | |||
@@ -0,0 +1,76 @@ | |||
1 | /* | ||
2 | * Header file for: | ||
3 | * Cypress TrueTouch(TM) Standard Product (TTSP) touchscreen drivers. | ||
4 | * For use with Cypress Txx3xx parts. | ||
5 | * Supported parts include: | ||
6 | * CY8CTST341 | ||
7 | * CY8CTMA340 | ||
8 | * | ||
9 | * Copyright (C) 2009, 2010, 2011 Cypress Semiconductor, Inc. | ||
10 | * Copyright (C) 2012 Javier Martinez Canillas <javier@dowhile0.org> | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * version 2, and only version 2, as published by the | ||
15 | * Free Software Foundation. | ||
16 | * | ||
17 | * This program is distributed in the hope that it will be useful, | ||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | * GNU General Public License for more details. | ||
21 | * | ||
22 | * You should have received a copy of the GNU General Public License along | ||
23 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
24 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
25 | * | ||
26 | * Contact Cypress Semiconductor at www.cypress.com (kev@cypress.com) | ||
27 | * | ||
28 | */ | ||
29 | #ifndef _CYTTSP4_H_ | ||
30 | #define _CYTTSP4_H_ | ||
31 | |||
32 | #define CYTTSP4_MT_NAME "cyttsp4_mt" | ||
33 | #define CYTTSP4_I2C_NAME "cyttsp4_i2c_adapter" | ||
34 | #define CYTTSP4_SPI_NAME "cyttsp4_spi_adapter" | ||
35 | |||
36 | #define CY_TOUCH_SETTINGS_MAX 32 | ||
37 | |||
38 | struct touch_framework { | ||
39 | const uint16_t *abs; | ||
40 | uint8_t size; | ||
41 | uint8_t enable_vkeys; | ||
42 | } __packed; | ||
43 | |||
44 | struct cyttsp4_mt_platform_data { | ||
45 | struct touch_framework *frmwrk; | ||
46 | unsigned short flags; | ||
47 | char const *inp_dev_name; | ||
48 | }; | ||
49 | |||
50 | struct touch_settings { | ||
51 | const uint8_t *data; | ||
52 | uint32_t size; | ||
53 | uint8_t tag; | ||
54 | } __packed; | ||
55 | |||
56 | struct cyttsp4_core_platform_data { | ||
57 | int irq_gpio; | ||
58 | int rst_gpio; | ||
59 | int level_irq_udelay; | ||
60 | int (*xres)(struct cyttsp4_core_platform_data *pdata, | ||
61 | struct device *dev); | ||
62 | int (*init)(struct cyttsp4_core_platform_data *pdata, | ||
63 | int on, struct device *dev); | ||
64 | int (*power)(struct cyttsp4_core_platform_data *pdata, | ||
65 | int on, struct device *dev, atomic_t *ignore_irq); | ||
66 | int (*irq_stat)(struct cyttsp4_core_platform_data *pdata, | ||
67 | struct device *dev); | ||
68 | struct touch_settings *sett[CY_TOUCH_SETTINGS_MAX]; | ||
69 | }; | ||
70 | |||
71 | struct cyttsp4_platform_data { | ||
72 | struct cyttsp4_core_platform_data *core_pdata; | ||
73 | struct cyttsp4_mt_platform_data *mt_pdata; | ||
74 | }; | ||
75 | |||
76 | #endif /* _CYTTSP4_H_ */ | ||
diff --git a/include/linux/platform_data/dma-atmel.h b/include/linux/platform_data/dma-atmel.h index cab0997be3de..e95f19c65873 100644 --- a/include/linux/platform_data/dma-atmel.h +++ b/include/linux/platform_data/dma-atmel.h | |||
@@ -35,16 +35,20 @@ struct at_dma_slave { | |||
35 | 35 | ||
36 | 36 | ||
37 | /* Platform-configurable bits in CFG */ | 37 | /* Platform-configurable bits in CFG */ |
38 | #define ATC_PER_MSB(h) ((0x30U & (h)) >> 4) /* Extract most significant bits of a handshaking identifier */ | ||
39 | |||
38 | #define ATC_SRC_PER(h) (0xFU & (h)) /* Channel src rq associated with periph handshaking ifc h */ | 40 | #define ATC_SRC_PER(h) (0xFU & (h)) /* Channel src rq associated with periph handshaking ifc h */ |
39 | #define ATC_DST_PER(h) ((0xFU & (h)) << 4) /* Channel dst rq associated with periph handshaking ifc h */ | 41 | #define ATC_DST_PER(h) ((0xFU & (h)) << 4) /* Channel dst rq associated with periph handshaking ifc h */ |
40 | #define ATC_SRC_REP (0x1 << 8) /* Source Replay Mod */ | 42 | #define ATC_SRC_REP (0x1 << 8) /* Source Replay Mod */ |
41 | #define ATC_SRC_H2SEL (0x1 << 9) /* Source Handshaking Mod */ | 43 | #define ATC_SRC_H2SEL (0x1 << 9) /* Source Handshaking Mod */ |
42 | #define ATC_SRC_H2SEL_SW (0x0 << 9) | 44 | #define ATC_SRC_H2SEL_SW (0x0 << 9) |
43 | #define ATC_SRC_H2SEL_HW (0x1 << 9) | 45 | #define ATC_SRC_H2SEL_HW (0x1 << 9) |
46 | #define ATC_SRC_PER_MSB(h) (ATC_PER_MSB(h) << 10) /* Channel src rq (most significant bits) */ | ||
44 | #define ATC_DST_REP (0x1 << 12) /* Destination Replay Mod */ | 47 | #define ATC_DST_REP (0x1 << 12) /* Destination Replay Mod */ |
45 | #define ATC_DST_H2SEL (0x1 << 13) /* Destination Handshaking Mod */ | 48 | #define ATC_DST_H2SEL (0x1 << 13) /* Destination Handshaking Mod */ |
46 | #define ATC_DST_H2SEL_SW (0x0 << 13) | 49 | #define ATC_DST_H2SEL_SW (0x0 << 13) |
47 | #define ATC_DST_H2SEL_HW (0x1 << 13) | 50 | #define ATC_DST_H2SEL_HW (0x1 << 13) |
51 | #define ATC_DST_PER_MSB(h) (ATC_PER_MSB(h) << 14) /* Channel dst rq (most significant bits) */ | ||
48 | #define ATC_SOD (0x1 << 16) /* Stop On Done */ | 52 | #define ATC_SOD (0x1 << 16) /* Stop On Done */ |
49 | #define ATC_LOCK_IF (0x1 << 20) /* Interface Lock */ | 53 | #define ATC_LOCK_IF (0x1 << 20) /* Interface Lock */ |
50 | #define ATC_LOCK_B (0x1 << 21) /* AHB Bus Lock */ | 54 | #define ATC_LOCK_B (0x1 << 21) /* AHB Bus Lock */ |
diff --git a/include/linux/platform_data/dma-imx.h b/include/linux/platform_data/dma-imx.h index f6d30cc1cb77..beac6b8b6a7b 100644 --- a/include/linux/platform_data/dma-imx.h +++ b/include/linux/platform_data/dma-imx.h | |||
@@ -60,10 +60,8 @@ static inline int imx_dma_is_ipu(struct dma_chan *chan) | |||
60 | 60 | ||
61 | static inline int imx_dma_is_general_purpose(struct dma_chan *chan) | 61 | static inline int imx_dma_is_general_purpose(struct dma_chan *chan) |
62 | { | 62 | { |
63 | return strstr(dev_name(chan->device->dev), "sdma") || | 63 | return !strcmp(chan->device->dev->driver->name, "imx-sdma") || |
64 | !strcmp(dev_name(chan->device->dev), "imx1-dma") || | 64 | !strcmp(chan->device->dev->driver->name, "imx-dma"); |
65 | !strcmp(dev_name(chan->device->dev), "imx21-dma") || | ||
66 | !strcmp(dev_name(chan->device->dev), "imx27-dma"); | ||
67 | } | 65 | } |
68 | 66 | ||
69 | #endif | 67 | #endif |
diff --git a/include/linux/platform_data/g762.h b/include/linux/platform_data/g762.h new file mode 100644 index 000000000000..d3c51283764d --- /dev/null +++ b/include/linux/platform_data/g762.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * Platform data structure for g762 fan controller driver | ||
3 | * | ||
4 | * Copyright (C) 2013, Arnaud EBALARD <arno@natisbad.org> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #ifndef __LINUX_PLATFORM_DATA_G762_H__ | ||
21 | #define __LINUX_PLATFORM_DATA_G762_H__ | ||
22 | |||
23 | /* | ||
24 | * Following structure can be used to set g762 driver platform specific data | ||
25 | * during board init. Note that passing a sparse structure is possible but | ||
26 | * will result in non-specified attributes to be set to default value, hence | ||
27 | * overloading those installed during boot (e.g. by u-boot). | ||
28 | */ | ||
29 | |||
30 | struct g762_platform_data { | ||
31 | u32 fan_startv; | ||
32 | u32 fan_gear_mode; | ||
33 | u32 pwm_polarity; | ||
34 | u32 clk_freq; | ||
35 | }; | ||
36 | |||
37 | #endif /* __LINUX_PLATFORM_DATA_G762_H__ */ | ||
diff --git a/include/linux/platform_data/keypad-pxa27x.h b/include/linux/platform_data/keypad-pxa27x.h index 5ce8d5e6ea51..24625569d16d 100644 --- a/include/linux/platform_data/keypad-pxa27x.h +++ b/include/linux/platform_data/keypad-pxa27x.h | |||
@@ -36,10 +36,9 @@ | |||
36 | struct pxa27x_keypad_platform_data { | 36 | struct pxa27x_keypad_platform_data { |
37 | 37 | ||
38 | /* code map for the matrix keys */ | 38 | /* code map for the matrix keys */ |
39 | const struct matrix_keymap_data *matrix_keymap_data; | ||
39 | unsigned int matrix_key_rows; | 40 | unsigned int matrix_key_rows; |
40 | unsigned int matrix_key_cols; | 41 | unsigned int matrix_key_cols; |
41 | unsigned int *matrix_key_map; | ||
42 | int matrix_key_map_size; | ||
43 | 42 | ||
44 | /* direct keys */ | 43 | /* direct keys */ |
45 | int direct_key_num; | 44 | int direct_key_num; |
diff --git a/include/linux/platform_data/mmc-esdhc-imx.h b/include/linux/platform_data/mmc-esdhc-imx.h index b4a0521ce411..d44912d81578 100644 --- a/include/linux/platform_data/mmc-esdhc-imx.h +++ b/include/linux/platform_data/mmc-esdhc-imx.h | |||
@@ -40,5 +40,6 @@ struct esdhc_platform_data { | |||
40 | enum wp_types wp_type; | 40 | enum wp_types wp_type; |
41 | enum cd_types cd_type; | 41 | enum cd_types cd_type; |
42 | int max_bus_width; | 42 | int max_bus_width; |
43 | unsigned int f_max; | ||
43 | }; | 44 | }; |
44 | #endif /* __ASM_ARCH_IMX_ESDHC_H */ | 45 | #endif /* __ASM_ARCH_IMX_ESDHC_H */ |
diff --git a/include/linux/platform_data/net-cw1200.h b/include/linux/platform_data/net-cw1200.h new file mode 100644 index 000000000000..c6fbc3ce4ab0 --- /dev/null +++ b/include/linux/platform_data/net-cw1200.h | |||
@@ -0,0 +1,81 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2011 | ||
3 | * | ||
4 | * Author: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> | ||
5 | * License terms: GNU General Public License (GPL) version 2 | ||
6 | */ | ||
7 | |||
8 | #ifndef CW1200_PLAT_H_INCLUDED | ||
9 | #define CW1200_PLAT_H_INCLUDED | ||
10 | |||
11 | struct cw1200_platform_data_spi { | ||
12 | u8 spi_bits_per_word; /* REQUIRED */ | ||
13 | u16 ref_clk; /* REQUIRED (in KHz) */ | ||
14 | |||
15 | /* All others are optional */ | ||
16 | bool have_5ghz; | ||
17 | int reset; /* GPIO to RSTn signal (0 disables) */ | ||
18 | int powerup; /* GPIO to POWERUP signal (0 disables) */ | ||
19 | int (*power_ctrl)(const struct cw1200_platform_data_spi *pdata, | ||
20 | bool enable); /* Control 3v3 / 1v8 supply */ | ||
21 | int (*clk_ctrl)(const struct cw1200_platform_data_spi *pdata, | ||
22 | bool enable); /* Control CLK32K */ | ||
23 | const u8 *macaddr; /* if NULL, use cw1200_mac_template module parameter */ | ||
24 | const char *sdd_file; /* if NULL, will use default for detected hw type */ | ||
25 | }; | ||
26 | |||
27 | struct cw1200_platform_data_sdio { | ||
28 | u16 ref_clk; /* REQUIRED (in KHz) */ | ||
29 | |||
30 | /* All others are optional */ | ||
31 | bool have_5ghz; | ||
32 | bool no_nptb; /* SDIO hardware does not support non-power-of-2-blocksizes */ | ||
33 | int reset; /* GPIO to RSTn signal (0 disables) */ | ||
34 | int powerup; /* GPIO to POWERUP signal (0 disables) */ | ||
35 | int irq; /* IRQ line or 0 to use SDIO IRQ */ | ||
36 | int (*power_ctrl)(const struct cw1200_platform_data_sdio *pdata, | ||
37 | bool enable); /* Control 3v3 / 1v8 supply */ | ||
38 | int (*clk_ctrl)(const struct cw1200_platform_data_sdio *pdata, | ||
39 | bool enable); /* Control CLK32K */ | ||
40 | const u8 *macaddr; /* if NULL, use cw1200_mac_template module parameter */ | ||
41 | const char *sdd_file; /* if NULL, will use default for detected hw type */ | ||
42 | }; | ||
43 | |||
44 | |||
45 | /* An example of SPI support in your board setup file: | ||
46 | |||
47 | static struct cw1200_platform_data_spi cw1200_platform_data = { | ||
48 | .ref_clk = 38400, | ||
49 | .spi_bits_per_word = 16, | ||
50 | .reset = GPIO_RF_RESET, | ||
51 | .powerup = GPIO_RF_POWERUP, | ||
52 | .macaddr = wifi_mac_addr, | ||
53 | .sdd_file = "sdd_sagrad_1091_1098.bin", | ||
54 | }; | ||
55 | static struct spi_board_info myboard_spi_devices[] __initdata = { | ||
56 | { | ||
57 | .modalias = "cw1200_wlan_spi", | ||
58 | .max_speed_hz = 52000000, | ||
59 | .bus_num = 0, | ||
60 | .irq = WIFI_IRQ, | ||
61 | .platform_data = &cw1200_platform_data, | ||
62 | .chip_select = 0, | ||
63 | }, | ||
64 | }; | ||
65 | |||
66 | */ | ||
67 | |||
68 | /* An example of SDIO support in your board setup file: | ||
69 | |||
70 | static struct cw1200_platform_data_sdio my_cw1200_platform_data = { | ||
71 | .ref_clk = 38400, | ||
72 | .have_5ghz = false, | ||
73 | .sdd_file = "sdd_myplatform.bin", | ||
74 | }; | ||
75 | cw1200_sdio_set_platform_data(&my_cw1200_platform_data); | ||
76 | |||
77 | */ | ||
78 | |||
79 | void __init cw1200_sdio_set_platform_data(struct cw1200_platform_data_sdio *pdata); | ||
80 | |||
81 | #endif /* CW1200_PLAT_H_INCLUDED */ | ||
diff --git a/include/linux/platform_data/pwm-renesas-tpu.h b/include/linux/platform_data/pwm-renesas-tpu.h new file mode 100644 index 000000000000..a7220b10ddab --- /dev/null +++ b/include/linux/platform_data/pwm-renesas-tpu.h | |||
@@ -0,0 +1,16 @@ | |||
1 | #ifndef __PWM_RENESAS_TPU_H__ | ||
2 | #define __PWM_RENESAS_TPU_H__ | ||
3 | |||
4 | #include <linux/pwm.h> | ||
5 | |||
6 | #define TPU_CHANNEL_MAX 4 | ||
7 | |||
8 | struct tpu_pwm_channel_data { | ||
9 | enum pwm_polarity polarity; | ||
10 | }; | ||
11 | |||
12 | struct tpu_pwm_platform_data { | ||
13 | struct tpu_pwm_channel_data channels[TPU_CHANNEL_MAX]; | ||
14 | }; | ||
15 | |||
16 | #endif /* __PWM_RENESAS_TPU_H__ */ | ||
diff --git a/include/linux/platform_data/rcar-du.h b/include/linux/platform_data/rcar-du.h new file mode 100644 index 000000000000..80587fdbba3e --- /dev/null +++ b/include/linux/platform_data/rcar-du.h | |||
@@ -0,0 +1,54 @@ | |||
1 | /* | ||
2 | * rcar_du.h -- R-Car Display Unit DRM driver | ||
3 | * | ||
4 | * Copyright (C) 2013 Renesas Corporation | ||
5 | * | ||
6 | * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com) | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | */ | ||
13 | |||
14 | #ifndef __RCAR_DU_H__ | ||
15 | #define __RCAR_DU_H__ | ||
16 | |||
17 | #include <drm/drm_mode.h> | ||
18 | |||
19 | enum rcar_du_encoder_type { | ||
20 | RCAR_DU_ENCODER_UNUSED = 0, | ||
21 | RCAR_DU_ENCODER_VGA, | ||
22 | RCAR_DU_ENCODER_LVDS, | ||
23 | }; | ||
24 | |||
25 | struct rcar_du_panel_data { | ||
26 | unsigned int width_mm; /* Panel width in mm */ | ||
27 | unsigned int height_mm; /* Panel height in mm */ | ||
28 | struct drm_mode_modeinfo mode; | ||
29 | }; | ||
30 | |||
31 | struct rcar_du_encoder_lvds_data { | ||
32 | struct rcar_du_panel_data panel; | ||
33 | }; | ||
34 | |||
35 | struct rcar_du_encoder_vga_data { | ||
36 | /* TODO: Add DDC information for EDID retrieval */ | ||
37 | }; | ||
38 | |||
39 | struct rcar_du_encoder_data { | ||
40 | enum rcar_du_encoder_type encoder; | ||
41 | unsigned int output; | ||
42 | |||
43 | union { | ||
44 | struct rcar_du_encoder_lvds_data lvds; | ||
45 | struct rcar_du_encoder_vga_data vga; | ||
46 | } u; | ||
47 | }; | ||
48 | |||
49 | struct rcar_du_platform_data { | ||
50 | struct rcar_du_encoder_data *encoders; | ||
51 | unsigned int num_encoders; | ||
52 | }; | ||
53 | |||
54 | #endif /* __RCAR_DU_H__ */ | ||
diff --git a/include/linux/platform_data/remoteproc-omap.h b/include/linux/platform_data/remoteproc-omap.h index 3c1c6444ec4b..bfbd12b41162 100644 --- a/include/linux/platform_data/remoteproc-omap.h +++ b/include/linux/platform_data/remoteproc-omap.h | |||
@@ -50,7 +50,7 @@ void __init omap_rproc_reserve_cma(void); | |||
50 | 50 | ||
51 | #else | 51 | #else |
52 | 52 | ||
53 | void __init omap_rproc_reserve_cma(void) | 53 | static inline void __init omap_rproc_reserve_cma(void) |
54 | { | 54 | { |
55 | } | 55 | } |
56 | 56 | ||
diff --git a/include/linux/platform_data/si5351.h b/include/linux/platform_data/si5351.h index 92dabcaf6499..54334393ab92 100644 --- a/include/linux/platform_data/si5351.h +++ b/include/linux/platform_data/si5351.h | |||
@@ -79,6 +79,23 @@ enum si5351_drive_strength { | |||
79 | }; | 79 | }; |
80 | 80 | ||
81 | /** | 81 | /** |
82 | * enum si5351_disable_state - Si5351 clock output disable state | ||
83 | * @SI5351_DISABLE_DEFAULT: default, do not change eeprom config | ||
84 | * @SI5351_DISABLE_LOW: CLKx is set to a LOW state when disabled | ||
85 | * @SI5351_DISABLE_HIGH: CLKx is set to a HIGH state when disabled | ||
86 | * @SI5351_DISABLE_FLOATING: CLKx is set to a FLOATING state when | ||
87 | * disabled | ||
88 | * @SI5351_DISABLE_NEVER: CLKx is NEVER disabled | ||
89 | */ | ||
90 | enum si5351_disable_state { | ||
91 | SI5351_DISABLE_DEFAULT = 0, | ||
92 | SI5351_DISABLE_LOW, | ||
93 | SI5351_DISABLE_HIGH, | ||
94 | SI5351_DISABLE_FLOATING, | ||
95 | SI5351_DISABLE_NEVER, | ||
96 | }; | ||
97 | |||
98 | /** | ||
82 | * struct si5351_clkout_config - Si5351 clock output configuration | 99 | * struct si5351_clkout_config - Si5351 clock output configuration |
83 | * @clkout: clkout number | 100 | * @clkout: clkout number |
84 | * @multisynth_src: multisynth source clock | 101 | * @multisynth_src: multisynth source clock |
@@ -91,6 +108,7 @@ struct si5351_clkout_config { | |||
91 | enum si5351_multisynth_src multisynth_src; | 108 | enum si5351_multisynth_src multisynth_src; |
92 | enum si5351_clkout_src clkout_src; | 109 | enum si5351_clkout_src clkout_src; |
93 | enum si5351_drive_strength drive; | 110 | enum si5351_drive_strength drive; |
111 | enum si5351_disable_state disable_state; | ||
94 | bool pll_master; | 112 | bool pll_master; |
95 | unsigned long rate; | 113 | unsigned long rate; |
96 | }; | 114 | }; |
diff --git a/include/linux/platform_data/ssm2518.h b/include/linux/platform_data/ssm2518.h new file mode 100644 index 000000000000..9a8e3ea287e3 --- /dev/null +++ b/include/linux/platform_data/ssm2518.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * SSM2518 amplifier audio driver | ||
3 | * | ||
4 | * Copyright 2013 Analog Devices Inc. | ||
5 | * Author: Lars-Peter Clausen <lars@metafoo.de> | ||
6 | * | ||
7 | * Licensed under the GPL-2. | ||
8 | */ | ||
9 | |||
10 | #ifndef __LINUX_PLATFORM_DATA_SSM2518_H__ | ||
11 | #define __LINUX_PLATFORM_DATA_SSM2518_H__ | ||
12 | |||
13 | /** | ||
14 | * struct ssm2518_platform_data - Platform data for the ssm2518 driver | ||
15 | * @enable_gpio: GPIO connected to the nSD pin. Set to -1 if the nSD pin is | ||
16 | * hardwired. | ||
17 | */ | ||
18 | struct ssm2518_platform_data { | ||
19 | int enable_gpio; | ||
20 | }; | ||
21 | |||
22 | #endif | ||
diff --git a/include/linux/platform_data/ti_am335x_adc.h b/include/linux/platform_data/ti_am335x_adc.h deleted file mode 100644 index e41d5834cb84..000000000000 --- a/include/linux/platform_data/ti_am335x_adc.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | #ifndef __LINUX_TI_AM335X_ADC_H | ||
2 | #define __LINUX_TI_AM335X_ADC_H | ||
3 | |||
4 | /** | ||
5 | * struct adc_data ADC Input information | ||
6 | * @adc_channels: Number of analog inputs | ||
7 | * available for ADC. | ||
8 | */ | ||
9 | |||
10 | struct adc_data { | ||
11 | unsigned int adc_channels; | ||
12 | }; | ||
13 | |||
14 | #endif | ||
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index cd46ee58b9dc..ce8e4ffd78c7 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -180,6 +180,9 @@ struct platform_driver { | |||
180 | const struct platform_device_id *id_table; | 180 | const struct platform_device_id *id_table; |
181 | }; | 181 | }; |
182 | 182 | ||
183 | #define to_platform_driver(drv) (container_of((drv), struct platform_driver, \ | ||
184 | driver)) | ||
185 | |||
183 | /* | 186 | /* |
184 | * use a macro to avoid include chaining to get THIS_MODULE | 187 | * use a macro to avoid include chaining to get THIS_MODULE |
185 | */ | 188 | */ |
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 7d7e09efff9b..6fa7cea25da9 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
@@ -37,7 +37,6 @@ extern void pm_runtime_enable(struct device *dev); | |||
37 | extern void __pm_runtime_disable(struct device *dev, bool check_resume); | 37 | extern void __pm_runtime_disable(struct device *dev, bool check_resume); |
38 | extern void pm_runtime_allow(struct device *dev); | 38 | extern void pm_runtime_allow(struct device *dev); |
39 | extern void pm_runtime_forbid(struct device *dev); | 39 | extern void pm_runtime_forbid(struct device *dev); |
40 | extern int pm_generic_runtime_idle(struct device *dev); | ||
41 | extern int pm_generic_runtime_suspend(struct device *dev); | 40 | extern int pm_generic_runtime_suspend(struct device *dev); |
42 | extern int pm_generic_runtime_resume(struct device *dev); | 41 | extern int pm_generic_runtime_resume(struct device *dev); |
43 | extern void pm_runtime_no_callbacks(struct device *dev); | 42 | extern void pm_runtime_no_callbacks(struct device *dev); |
@@ -143,7 +142,6 @@ static inline bool pm_runtime_active(struct device *dev) { return true; } | |||
143 | static inline bool pm_runtime_status_suspended(struct device *dev) { return false; } | 142 | static inline bool pm_runtime_status_suspended(struct device *dev) { return false; } |
144 | static inline bool pm_runtime_enabled(struct device *dev) { return false; } | 143 | static inline bool pm_runtime_enabled(struct device *dev) { return false; } |
145 | 144 | ||
146 | static inline int pm_generic_runtime_idle(struct device *dev) { return 0; } | ||
147 | static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; } | 145 | static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; } |
148 | static inline int pm_generic_runtime_resume(struct device *dev) { return 0; } | 146 | static inline int pm_generic_runtime_resume(struct device *dev) { return 0; } |
149 | static inline void pm_runtime_no_callbacks(struct device *dev) {} | 147 | static inline void pm_runtime_no_callbacks(struct device *dev) {} |
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h index 7794d75ed155..907f3fd191ac 100644 --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h | |||
@@ -7,14 +7,20 @@ | |||
7 | #include <linux/timex.h> | 7 | #include <linux/timex.h> |
8 | #include <linux/alarmtimer.h> | 8 | #include <linux/alarmtimer.h> |
9 | 9 | ||
10 | union cpu_time_count { | 10 | |
11 | cputime_t cpu; | 11 | static inline unsigned long long cputime_to_expires(cputime_t expires) |
12 | unsigned long long sched; | 12 | { |
13 | }; | 13 | return (__force unsigned long long)expires; |
14 | } | ||
15 | |||
16 | static inline cputime_t expires_to_cputime(unsigned long long expires) | ||
17 | { | ||
18 | return (__force cputime_t)expires; | ||
19 | } | ||
14 | 20 | ||
15 | struct cpu_timer_list { | 21 | struct cpu_timer_list { |
16 | struct list_head entry; | 22 | struct list_head entry; |
17 | union cpu_time_count expires, incr; | 23 | unsigned long long expires, incr; |
18 | struct task_struct *task; | 24 | struct task_struct *task; |
19 | int firing; | 25 | int firing; |
20 | }; | 26 | }; |
diff --git a/include/linux/power/smartreflex.h b/include/linux/power/smartreflex.h index c0f44c2b006d..d8b187c3925d 100644 --- a/include/linux/power/smartreflex.h +++ b/include/linux/power/smartreflex.h | |||
@@ -299,11 +299,11 @@ void omap_sr_disable_reset_volt(struct voltagedomain *voltdm); | |||
299 | void omap_sr_register_pmic(struct omap_sr_pmic_data *pmic_data); | 299 | void omap_sr_register_pmic(struct omap_sr_pmic_data *pmic_data); |
300 | 300 | ||
301 | /* Smartreflex driver hooks to be called from Smartreflex class driver */ | 301 | /* Smartreflex driver hooks to be called from Smartreflex class driver */ |
302 | int sr_enable(struct voltagedomain *voltdm, unsigned long volt); | 302 | int sr_enable(struct omap_sr *sr, unsigned long volt); |
303 | void sr_disable(struct voltagedomain *voltdm); | 303 | void sr_disable(struct omap_sr *sr); |
304 | int sr_configure_errgen(struct voltagedomain *voltdm); | 304 | int sr_configure_errgen(struct omap_sr *sr); |
305 | int sr_disable_errgen(struct voltagedomain *voltdm); | 305 | int sr_disable_errgen(struct omap_sr *sr); |
306 | int sr_configure_minmax(struct voltagedomain *voltdm); | 306 | int sr_configure_minmax(struct omap_sr *sr); |
307 | 307 | ||
308 | /* API to register the smartreflex class driver with the smartreflex driver */ | 308 | /* API to register the smartreflex class driver with the smartreflex driver */ |
309 | int sr_register_class(struct omap_sr_class_data *class_data); | 309 | int sr_register_class(struct omap_sr_class_data *class_data); |
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 3828cefb4f65..804b90643a85 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h | |||
@@ -162,6 +162,8 @@ union power_supply_propval { | |||
162 | const char *strval; | 162 | const char *strval; |
163 | }; | 163 | }; |
164 | 164 | ||
165 | struct device_node; | ||
166 | |||
165 | struct power_supply { | 167 | struct power_supply { |
166 | const char *name; | 168 | const char *name; |
167 | enum power_supply_type type; | 169 | enum power_supply_type type; |
@@ -173,9 +175,7 @@ struct power_supply { | |||
173 | 175 | ||
174 | char **supplied_from; | 176 | char **supplied_from; |
175 | size_t num_supplies; | 177 | size_t num_supplies; |
176 | #ifdef CONFIG_OF | ||
177 | struct device_node *of_node; | 178 | struct device_node *of_node; |
178 | #endif | ||
179 | 179 | ||
180 | int (*get_property)(struct power_supply *psy, | 180 | int (*get_property)(struct power_supply *psy, |
181 | enum power_supply_property psp, | 181 | enum power_supply_property psp, |
diff --git a/include/linux/pstore.h b/include/linux/pstore.h index 75d01760c911..4aa80ba830a2 100644 --- a/include/linux/pstore.h +++ b/include/linux/pstore.h | |||
@@ -35,6 +35,10 @@ enum pstore_type_id { | |||
35 | PSTORE_TYPE_MCE = 1, | 35 | PSTORE_TYPE_MCE = 1, |
36 | PSTORE_TYPE_CONSOLE = 2, | 36 | PSTORE_TYPE_CONSOLE = 2, |
37 | PSTORE_TYPE_FTRACE = 3, | 37 | PSTORE_TYPE_FTRACE = 3, |
38 | /* PPC64 partition types */ | ||
39 | PSTORE_TYPE_PPC_RTAS = 4, | ||
40 | PSTORE_TYPE_PPC_OF = 5, | ||
41 | PSTORE_TYPE_PPC_COMMON = 6, | ||
38 | PSTORE_TYPE_UNKNOWN = 255 | 42 | PSTORE_TYPE_UNKNOWN = 255 |
39 | }; | 43 | }; |
40 | 44 | ||
@@ -54,12 +58,12 @@ struct pstore_info { | |||
54 | struct pstore_info *psi); | 58 | struct pstore_info *psi); |
55 | int (*write)(enum pstore_type_id type, | 59 | int (*write)(enum pstore_type_id type, |
56 | enum kmsg_dump_reason reason, u64 *id, | 60 | enum kmsg_dump_reason reason, u64 *id, |
57 | unsigned int part, int count, size_t size, | 61 | unsigned int part, int count, size_t hsize, |
58 | struct pstore_info *psi); | 62 | size_t size, struct pstore_info *psi); |
59 | int (*write_buf)(enum pstore_type_id type, | 63 | int (*write_buf)(enum pstore_type_id type, |
60 | enum kmsg_dump_reason reason, u64 *id, | 64 | enum kmsg_dump_reason reason, u64 *id, |
61 | unsigned int part, const char *buf, size_t size, | 65 | unsigned int part, const char *buf, size_t hsize, |
62 | struct pstore_info *psi); | 66 | size_t size, struct pstore_info *psi); |
63 | int (*erase)(enum pstore_type_id type, u64 id, | 67 | int (*erase)(enum pstore_type_id type, u64 id, |
64 | int count, struct timespec time, | 68 | int count, struct timespec time, |
65 | struct pstore_info *psi); | 69 | struct pstore_info *psi); |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 89573a33ab3c..07d0df6bf768 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -142,9 +142,6 @@ static inline void ptrace_init_task(struct task_struct *child, bool ptrace) | |||
142 | { | 142 | { |
143 | INIT_LIST_HEAD(&child->ptrace_entry); | 143 | INIT_LIST_HEAD(&child->ptrace_entry); |
144 | INIT_LIST_HEAD(&child->ptraced); | 144 | INIT_LIST_HEAD(&child->ptraced); |
145 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | ||
146 | atomic_set(&child->ptrace_bp_refcnt, 1); | ||
147 | #endif | ||
148 | child->jobctl = 0; | 145 | child->jobctl = 0; |
149 | child->ptrace = 0; | 146 | child->ptrace = 0; |
150 | child->parent = child->real_parent; | 147 | child->parent = child->real_parent; |
@@ -351,11 +348,4 @@ extern int task_current_syscall(struct task_struct *target, long *callno, | |||
351 | unsigned long args[6], unsigned int maxargs, | 348 | unsigned long args[6], unsigned int maxargs, |
352 | unsigned long *sp, unsigned long *pc); | 349 | unsigned long *sp, unsigned long *pc); |
353 | 350 | ||
354 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | ||
355 | extern int ptrace_get_breakpoints(struct task_struct *tsk); | ||
356 | extern void ptrace_put_breakpoints(struct task_struct *tsk); | ||
357 | #else | ||
358 | static inline void ptrace_put_breakpoints(struct task_struct *tsk) { } | ||
359 | #endif /* CONFIG_HAVE_HW_BREAKPOINT */ | ||
360 | |||
361 | #endif | 351 | #endif |
diff --git a/include/linux/pvclock_gtod.h b/include/linux/pvclock_gtod.h index 0ca75825b60d..a71d2dbd3610 100644 --- a/include/linux/pvclock_gtod.h +++ b/include/linux/pvclock_gtod.h | |||
@@ -3,6 +3,13 @@ | |||
3 | 3 | ||
4 | #include <linux/notifier.h> | 4 | #include <linux/notifier.h> |
5 | 5 | ||
6 | /* | ||
7 | * The pvclock gtod notifier is called when the system time is updated | ||
8 | * and is used to keep guest time synchronized with host time. | ||
9 | * | ||
10 | * The 'action' parameter in the notifier function is false (0), or | ||
11 | * true (non-zero) if system time was stepped. | ||
12 | */ | ||
6 | extern int pvclock_gtod_register_notifier(struct notifier_block *nb); | 13 | extern int pvclock_gtod_register_notifier(struct notifier_block *nb); |
7 | extern int pvclock_gtod_unregister_notifier(struct notifier_block *nb); | 14 | extern int pvclock_gtod_unregister_notifier(struct notifier_block *nb); |
8 | 15 | ||
diff --git a/include/linux/pwm.h b/include/linux/pwm.h index a4df2042b79c..f0feafd184a0 100644 --- a/include/linux/pwm.h +++ b/include/linux/pwm.h | |||
@@ -76,6 +76,7 @@ enum pwm_polarity { | |||
76 | enum { | 76 | enum { |
77 | PWMF_REQUESTED = 1 << 0, | 77 | PWMF_REQUESTED = 1 << 0, |
78 | PWMF_ENABLED = 1 << 1, | 78 | PWMF_ENABLED = 1 << 1, |
79 | PWMF_EXPORTED = 1 << 2, | ||
79 | }; | 80 | }; |
80 | 81 | ||
81 | struct pwm_device { | 82 | struct pwm_device { |
@@ -86,7 +87,9 @@ struct pwm_device { | |||
86 | struct pwm_chip *chip; | 87 | struct pwm_chip *chip; |
87 | void *chip_data; | 88 | void *chip_data; |
88 | 89 | ||
89 | unsigned int period; /* in nanoseconds */ | 90 | unsigned int period; /* in nanoseconds */ |
91 | unsigned int duty_cycle; /* in nanoseconds */ | ||
92 | enum pwm_polarity polarity; | ||
90 | }; | 93 | }; |
91 | 94 | ||
92 | static inline void pwm_set_period(struct pwm_device *pwm, unsigned int period) | 95 | static inline void pwm_set_period(struct pwm_device *pwm, unsigned int period) |
@@ -100,6 +103,17 @@ static inline unsigned int pwm_get_period(struct pwm_device *pwm) | |||
100 | return pwm ? pwm->period : 0; | 103 | return pwm ? pwm->period : 0; |
101 | } | 104 | } |
102 | 105 | ||
106 | static inline void pwm_set_duty_cycle(struct pwm_device *pwm, unsigned int duty) | ||
107 | { | ||
108 | if (pwm) | ||
109 | pwm->duty_cycle = duty; | ||
110 | } | ||
111 | |||
112 | static inline unsigned int pwm_get_duty_cycle(struct pwm_device *pwm) | ||
113 | { | ||
114 | return pwm ? pwm->duty_cycle : 0; | ||
115 | } | ||
116 | |||
103 | /* | 117 | /* |
104 | * pwm_set_polarity - configure the polarity of a PWM signal | 118 | * pwm_set_polarity - configure the polarity of a PWM signal |
105 | */ | 119 | */ |
@@ -278,4 +292,17 @@ static inline void pwm_add_table(struct pwm_lookup *table, size_t num) | |||
278 | } | 292 | } |
279 | #endif | 293 | #endif |
280 | 294 | ||
295 | #ifdef CONFIG_PWM_SYSFS | ||
296 | void pwmchip_sysfs_export(struct pwm_chip *chip); | ||
297 | void pwmchip_sysfs_unexport(struct pwm_chip *chip); | ||
298 | #else | ||
299 | static inline void pwmchip_sysfs_export(struct pwm_chip *chip) | ||
300 | { | ||
301 | } | ||
302 | |||
303 | static inline void pwmchip_sysfs_unexport(struct pwm_chip *chip) | ||
304 | { | ||
305 | } | ||
306 | #endif /* CONFIG_PWM_SYSFS */ | ||
307 | |||
281 | #endif /* __LINUX_PWM_H */ | 308 | #endif /* __LINUX_PWM_H */ |
diff --git a/include/linux/reboot.h b/include/linux/reboot.h index 23b36304cd88..8e00f9f6f963 100644 --- a/include/linux/reboot.h +++ b/include/linux/reboot.h | |||
@@ -10,6 +10,31 @@ | |||
10 | #define SYS_HALT 0x0002 /* Notify of system halt */ | 10 | #define SYS_HALT 0x0002 /* Notify of system halt */ |
11 | #define SYS_POWER_OFF 0x0003 /* Notify of system power off */ | 11 | #define SYS_POWER_OFF 0x0003 /* Notify of system power off */ |
12 | 12 | ||
13 | enum reboot_mode { | ||
14 | REBOOT_COLD = 0, | ||
15 | REBOOT_WARM, | ||
16 | REBOOT_HARD, | ||
17 | REBOOT_SOFT, | ||
18 | REBOOT_GPIO, | ||
19 | }; | ||
20 | extern enum reboot_mode reboot_mode; | ||
21 | |||
22 | enum reboot_type { | ||
23 | BOOT_TRIPLE = 't', | ||
24 | BOOT_KBD = 'k', | ||
25 | BOOT_BIOS = 'b', | ||
26 | BOOT_ACPI = 'a', | ||
27 | BOOT_EFI = 'e', | ||
28 | BOOT_CF9 = 'p', | ||
29 | BOOT_CF9_COND = 'q', | ||
30 | }; | ||
31 | extern enum reboot_type reboot_type; | ||
32 | |||
33 | extern int reboot_default; | ||
34 | extern int reboot_cpu; | ||
35 | extern int reboot_force; | ||
36 | |||
37 | |||
13 | extern int register_reboot_notifier(struct notifier_block *); | 38 | extern int register_reboot_notifier(struct notifier_block *); |
14 | extern int unregister_reboot_notifier(struct notifier_block *); | 39 | extern int unregister_reboot_notifier(struct notifier_block *); |
15 | 40 | ||
@@ -26,7 +51,7 @@ extern void machine_shutdown(void); | |||
26 | struct pt_regs; | 51 | struct pt_regs; |
27 | extern void machine_crash_shutdown(struct pt_regs *); | 52 | extern void machine_crash_shutdown(struct pt_regs *); |
28 | 53 | ||
29 | /* | 54 | /* |
30 | * Architecture independent implemenations of sys_reboot commands. | 55 | * Architecture independent implemenations of sys_reboot commands. |
31 | */ | 56 | */ |
32 | 57 | ||
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index 02d84e24b7c2..75981d0b57dc 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h | |||
@@ -23,6 +23,7 @@ struct irq_domain; | |||
23 | struct spi_device; | 23 | struct spi_device; |
24 | struct regmap; | 24 | struct regmap; |
25 | struct regmap_range_cfg; | 25 | struct regmap_range_cfg; |
26 | struct regmap_field; | ||
26 | 27 | ||
27 | /* An enum of all the supported cache types */ | 28 | /* An enum of all the supported cache types */ |
28 | enum regcache_type { | 29 | enum regcache_type { |
@@ -394,10 +395,15 @@ bool regmap_can_raw_write(struct regmap *map); | |||
394 | int regcache_sync(struct regmap *map); | 395 | int regcache_sync(struct regmap *map); |
395 | int regcache_sync_region(struct regmap *map, unsigned int min, | 396 | int regcache_sync_region(struct regmap *map, unsigned int min, |
396 | unsigned int max); | 397 | unsigned int max); |
398 | int regcache_drop_region(struct regmap *map, unsigned int min, | ||
399 | unsigned int max); | ||
397 | void regcache_cache_only(struct regmap *map, bool enable); | 400 | void regcache_cache_only(struct regmap *map, bool enable); |
398 | void regcache_cache_bypass(struct regmap *map, bool enable); | 401 | void regcache_cache_bypass(struct regmap *map, bool enable); |
399 | void regcache_mark_dirty(struct regmap *map); | 402 | void regcache_mark_dirty(struct regmap *map); |
400 | 403 | ||
404 | bool regmap_check_range_table(struct regmap *map, unsigned int reg, | ||
405 | const struct regmap_access_table *table); | ||
406 | |||
401 | int regmap_register_patch(struct regmap *map, const struct reg_default *regs, | 407 | int regmap_register_patch(struct regmap *map, const struct reg_default *regs, |
402 | int num_regs); | 408 | int num_regs); |
403 | 409 | ||
@@ -412,6 +418,36 @@ bool regmap_reg_in_ranges(unsigned int reg, | |||
412 | unsigned int nranges); | 418 | unsigned int nranges); |
413 | 419 | ||
414 | /** | 420 | /** |
421 | * Description of an register field | ||
422 | * | ||
423 | * @reg: Offset of the register within the regmap bank | ||
424 | * @lsb: lsb of the register field. | ||
425 | * @reg: msb of the register field. | ||
426 | */ | ||
427 | struct reg_field { | ||
428 | unsigned int reg; | ||
429 | unsigned int lsb; | ||
430 | unsigned int msb; | ||
431 | }; | ||
432 | |||
433 | #define REG_FIELD(_reg, _lsb, _msb) { \ | ||
434 | .reg = _reg, \ | ||
435 | .lsb = _lsb, \ | ||
436 | .msb = _msb, \ | ||
437 | } | ||
438 | |||
439 | struct regmap_field *regmap_field_alloc(struct regmap *regmap, | ||
440 | struct reg_field reg_field); | ||
441 | void regmap_field_free(struct regmap_field *field); | ||
442 | |||
443 | struct regmap_field *devm_regmap_field_alloc(struct device *dev, | ||
444 | struct regmap *regmap, struct reg_field reg_field); | ||
445 | void devm_regmap_field_free(struct device *dev, struct regmap_field *field); | ||
446 | |||
447 | int regmap_field_read(struct regmap_field *field, unsigned int *val); | ||
448 | int regmap_field_write(struct regmap_field *field, unsigned int val); | ||
449 | |||
450 | /** | ||
415 | * Description of an IRQ for the generic regmap irq_chip. | 451 | * Description of an IRQ for the generic regmap irq_chip. |
416 | * | 452 | * |
417 | * @reg_offset: Offset of the status/mask register within the bank | 453 | * @reg_offset: Offset of the status/mask register within the bank |
@@ -562,6 +598,13 @@ static inline int regcache_sync_region(struct regmap *map, unsigned int min, | |||
562 | return -EINVAL; | 598 | return -EINVAL; |
563 | } | 599 | } |
564 | 600 | ||
601 | static inline int regcache_drop_region(struct regmap *map, unsigned int min, | ||
602 | unsigned int max) | ||
603 | { | ||
604 | WARN_ONCE(1, "regmap API is disabled"); | ||
605 | return -EINVAL; | ||
606 | } | ||
607 | |||
565 | static inline void regcache_cache_only(struct regmap *map, bool enable) | 608 | static inline void regcache_cache_only(struct regmap *map, bool enable) |
566 | { | 609 | { |
567 | WARN_ONCE(1, "regmap API is disabled"); | 610 | WARN_ONCE(1, "regmap API is disabled"); |
diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h index 7c5ff0c55773..75307447cef9 100644 --- a/include/linux/regulator/ab8500.h +++ b/include/linux/regulator/ab8500.h | |||
@@ -336,8 +336,4 @@ static inline int ab8500_regulator_debug_exit(struct platform_device *pdev) | |||
336 | } | 336 | } |
337 | #endif | 337 | #endif |
338 | 338 | ||
339 | /* AB8500 external regulator functions. */ | ||
340 | int ab8500_ext_regulator_init(struct platform_device *pdev); | ||
341 | void ab8500_ext_regulator_exit(struct platform_device *pdev); | ||
342 | |||
343 | #endif | 339 | #endif |
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 145022a83085..3a76389c6aaa 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
@@ -165,6 +165,7 @@ int regulator_count_voltages(struct regulator *regulator); | |||
165 | int regulator_list_voltage(struct regulator *regulator, unsigned selector); | 165 | int regulator_list_voltage(struct regulator *regulator, unsigned selector); |
166 | int regulator_is_supported_voltage(struct regulator *regulator, | 166 | int regulator_is_supported_voltage(struct regulator *regulator, |
167 | int min_uV, int max_uV); | 167 | int min_uV, int max_uV); |
168 | unsigned int regulator_get_linear_step(struct regulator *regulator); | ||
168 | int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV); | 169 | int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV); |
169 | int regulator_set_voltage_time(struct regulator *regulator, | 170 | int regulator_set_voltage_time(struct regulator *regulator, |
170 | int old_uV, int new_uV); | 171 | int old_uV, int new_uV); |
diff --git a/include/linux/reservation.h b/include/linux/reservation.h new file mode 100644 index 000000000000..e9ee806a9d72 --- /dev/null +++ b/include/linux/reservation.h | |||
@@ -0,0 +1,62 @@ | |||
1 | /* | ||
2 | * Header file for reservations for dma-buf and ttm | ||
3 | * | ||
4 | * Copyright(C) 2011 Linaro Limited. All rights reserved. | ||
5 | * Copyright (C) 2012-2013 Canonical Ltd | ||
6 | * Copyright (C) 2012 Texas Instruments | ||
7 | * | ||
8 | * Authors: | ||
9 | * Rob Clark <rob.clark@linaro.org> | ||
10 | * Maarten Lankhorst <maarten.lankhorst@canonical.com> | ||
11 | * Thomas Hellstrom <thellstrom-at-vmware-dot-com> | ||
12 | * | ||
13 | * Based on bo.c which bears the following copyright notice, | ||
14 | * but is dual licensed: | ||
15 | * | ||
16 | * Copyright (c) 2006-2009 VMware, Inc., Palo Alto, CA., USA | ||
17 | * All Rights Reserved. | ||
18 | * | ||
19 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
20 | * copy of this software and associated documentation files (the | ||
21 | * "Software"), to deal in the Software without restriction, including | ||
22 | * without limitation the rights to use, copy, modify, merge, publish, | ||
23 | * distribute, sub license, and/or sell copies of the Software, and to | ||
24 | * permit persons to whom the Software is furnished to do so, subject to | ||
25 | * the following conditions: | ||
26 | * | ||
27 | * The above copyright notice and this permission notice (including the | ||
28 | * next paragraph) shall be included in all copies or substantial portions | ||
29 | * of the Software. | ||
30 | * | ||
31 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
32 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
33 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL | ||
34 | * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, | ||
35 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
36 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | ||
37 | * USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
38 | */ | ||
39 | #ifndef _LINUX_RESERVATION_H | ||
40 | #define _LINUX_RESERVATION_H | ||
41 | |||
42 | #include <linux/mutex.h> | ||
43 | |||
44 | extern struct ww_class reservation_ww_class; | ||
45 | |||
46 | struct reservation_object { | ||
47 | struct ww_mutex lock; | ||
48 | }; | ||
49 | |||
50 | static inline void | ||
51 | reservation_object_init(struct reservation_object *obj) | ||
52 | { | ||
53 | ww_mutex_init(&obj->lock, &reservation_ww_class); | ||
54 | } | ||
55 | |||
56 | static inline void | ||
57 | reservation_object_fini(struct reservation_object *obj) | ||
58 | { | ||
59 | ww_mutex_destroy(&obj->lock); | ||
60 | } | ||
61 | |||
62 | #endif /* _LINUX_RESERVATION_H */ | ||
diff --git a/include/linux/rio.h b/include/linux/rio.h index 18e099342e6f..b71d5738e683 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
21 | #include <linux/device.h> | 21 | #include <linux/device.h> |
22 | #include <linux/rio_regs.h> | 22 | #include <linux/rio_regs.h> |
23 | #include <linux/mod_devicetable.h> | ||
23 | #ifdef CONFIG_RAPIDIO_DMA_ENGINE | 24 | #ifdef CONFIG_RAPIDIO_DMA_ENGINE |
24 | #include <linux/dmaengine.h> | 25 | #include <linux/dmaengine.h> |
25 | #endif | 26 | #endif |
@@ -91,9 +92,24 @@ union rio_pw_msg; | |||
91 | /** | 92 | /** |
92 | * struct rio_switch - RIO switch info | 93 | * struct rio_switch - RIO switch info |
93 | * @node: Node in global list of switches | 94 | * @node: Node in global list of switches |
94 | * @switchid: Switch ID that is unique across a network | ||
95 | * @route_table: Copy of switch routing table | 95 | * @route_table: Copy of switch routing table |
96 | * @port_ok: Status of each port (one bit per port) - OK=1 or UNINIT=0 | 96 | * @port_ok: Status of each port (one bit per port) - OK=1 or UNINIT=0 |
97 | * @ops: pointer to switch-specific operations | ||
98 | * @lock: lock to serialize operations updates | ||
99 | * @nextdev: Array of per-port pointers to the next attached device | ||
100 | */ | ||
101 | struct rio_switch { | ||
102 | struct list_head node; | ||
103 | u8 *route_table; | ||
104 | u32 port_ok; | ||
105 | struct rio_switch_ops *ops; | ||
106 | spinlock_t lock; | ||
107 | struct rio_dev *nextdev[0]; | ||
108 | }; | ||
109 | |||
110 | /** | ||
111 | * struct rio_switch_ops - Per-switch operations | ||
112 | * @owner: The module owner of this structure | ||
97 | * @add_entry: Callback for switch-specific route add function | 113 | * @add_entry: Callback for switch-specific route add function |
98 | * @get_entry: Callback for switch-specific route get function | 114 | * @get_entry: Callback for switch-specific route get function |
99 | * @clr_table: Callback for switch-specific clear route table function | 115 | * @clr_table: Callback for switch-specific clear route table function |
@@ -101,14 +117,12 @@ union rio_pw_msg; | |||
101 | * @get_domain: Callback for switch-specific domain get function | 117 | * @get_domain: Callback for switch-specific domain get function |
102 | * @em_init: Callback for switch-specific error management init function | 118 | * @em_init: Callback for switch-specific error management init function |
103 | * @em_handle: Callback for switch-specific error management handler function | 119 | * @em_handle: Callback for switch-specific error management handler function |
104 | * @sw_sysfs: Callback that initializes switch-specific sysfs attributes | 120 | * |
105 | * @nextdev: Array of per-port pointers to the next attached device | 121 | * Defines the operations that are necessary to initialize/control |
122 | * a particular RIO switch device. | ||
106 | */ | 123 | */ |
107 | struct rio_switch { | 124 | struct rio_switch_ops { |
108 | struct list_head node; | 125 | struct module *owner; |
109 | u16 switchid; | ||
110 | u8 *route_table; | ||
111 | u32 port_ok; | ||
112 | int (*add_entry) (struct rio_mport *mport, u16 destid, u8 hopcount, | 126 | int (*add_entry) (struct rio_mport *mport, u16 destid, u8 hopcount, |
113 | u16 table, u16 route_destid, u8 route_port); | 127 | u16 table, u16 route_destid, u8 route_port); |
114 | int (*get_entry) (struct rio_mport *mport, u16 destid, u8 hopcount, | 128 | int (*get_entry) (struct rio_mport *mport, u16 destid, u8 hopcount, |
@@ -121,8 +135,6 @@ struct rio_switch { | |||
121 | u8 *sw_domain); | 135 | u8 *sw_domain); |
122 | int (*em_init) (struct rio_dev *dev); | 136 | int (*em_init) (struct rio_dev *dev); |
123 | int (*em_handle) (struct rio_dev *dev, u8 swport); | 137 | int (*em_handle) (struct rio_dev *dev, u8 swport); |
124 | int (*sw_sysfs) (struct rio_dev *dev, int create); | ||
125 | struct rio_dev *nextdev[0]; | ||
126 | }; | 138 | }; |
127 | 139 | ||
128 | /** | 140 | /** |
@@ -130,6 +142,7 @@ struct rio_switch { | |||
130 | * @global_list: Node in list of all RIO devices | 142 | * @global_list: Node in list of all RIO devices |
131 | * @net_list: Node in list of RIO devices in a network | 143 | * @net_list: Node in list of RIO devices in a network |
132 | * @net: Network this device is a part of | 144 | * @net: Network this device is a part of |
145 | * @do_enum: Enumeration flag | ||
133 | * @did: Device ID | 146 | * @did: Device ID |
134 | * @vid: Vendor ID | 147 | * @vid: Vendor ID |
135 | * @device_rev: Device revision | 148 | * @device_rev: Device revision |
@@ -158,6 +171,7 @@ struct rio_dev { | |||
158 | struct list_head global_list; /* node in list of all RIO devices */ | 171 | struct list_head global_list; /* node in list of all RIO devices */ |
159 | struct list_head net_list; /* node in per net list */ | 172 | struct list_head net_list; /* node in per net list */ |
160 | struct rio_net *net; /* RIO net this device resides in */ | 173 | struct rio_net *net; /* RIO net this device resides in */ |
174 | bool do_enum; | ||
161 | u16 did; | 175 | u16 did; |
162 | u16 vid; | 176 | u16 vid; |
163 | u32 device_rev; | 177 | u32 device_rev; |
@@ -297,10 +311,6 @@ struct rio_net { | |||
297 | struct rio_id_table destid_table; /* destID allocation table */ | 311 | struct rio_id_table destid_table; /* destID allocation table */ |
298 | }; | 312 | }; |
299 | 313 | ||
300 | /* Definitions used by switch sysfs initialization callback */ | ||
301 | #define RIO_SW_SYSFS_CREATE 1 /* Create switch attributes */ | ||
302 | #define RIO_SW_SYSFS_REMOVE 0 /* Remove switch attributes */ | ||
303 | |||
304 | /* Low-level architecture-dependent routines */ | 314 | /* Low-level architecture-dependent routines */ |
305 | 315 | ||
306 | /** | 316 | /** |
@@ -385,35 +395,6 @@ struct rio_driver { | |||
385 | 395 | ||
386 | #define to_rio_driver(drv) container_of(drv,struct rio_driver, driver) | 396 | #define to_rio_driver(drv) container_of(drv,struct rio_driver, driver) |
387 | 397 | ||
388 | /** | ||
389 | * struct rio_device_id - RIO device identifier | ||
390 | * @did: RIO device ID | ||
391 | * @vid: RIO vendor ID | ||
392 | * @asm_did: RIO assembly device ID | ||
393 | * @asm_vid: RIO assembly vendor ID | ||
394 | * | ||
395 | * Identifies a RIO device based on both the device/vendor IDs and | ||
396 | * the assembly device/vendor IDs. | ||
397 | */ | ||
398 | struct rio_device_id { | ||
399 | u16 did, vid; | ||
400 | u16 asm_did, asm_vid; | ||
401 | }; | ||
402 | |||
403 | /** | ||
404 | * struct rio_switch_ops - Per-switch operations | ||
405 | * @vid: RIO vendor ID | ||
406 | * @did: RIO device ID | ||
407 | * @init_hook: Callback that performs switch device initialization | ||
408 | * | ||
409 | * Defines the operations that are necessary to initialize/control | ||
410 | * a particular RIO switch device. | ||
411 | */ | ||
412 | struct rio_switch_ops { | ||
413 | u16 vid, did; | ||
414 | int (*init_hook) (struct rio_dev *rdev, int do_enum); | ||
415 | }; | ||
416 | |||
417 | union rio_pw_msg { | 398 | union rio_pw_msg { |
418 | struct { | 399 | struct { |
419 | u32 comptag; /* Component Tag CSR */ | 400 | u32 comptag; /* Component Tag CSR */ |
@@ -468,14 +449,29 @@ static inline struct rio_mport *dma_to_mport(struct dma_device *ddev) | |||
468 | 449 | ||
469 | /** | 450 | /** |
470 | * struct rio_scan - RIO enumeration and discovery operations | 451 | * struct rio_scan - RIO enumeration and discovery operations |
452 | * @owner: The module owner of this structure | ||
471 | * @enumerate: Callback to perform RapidIO fabric enumeration. | 453 | * @enumerate: Callback to perform RapidIO fabric enumeration. |
472 | * @discover: Callback to perform RapidIO fabric discovery. | 454 | * @discover: Callback to perform RapidIO fabric discovery. |
473 | */ | 455 | */ |
474 | struct rio_scan { | 456 | struct rio_scan { |
457 | struct module *owner; | ||
475 | int (*enumerate)(struct rio_mport *mport, u32 flags); | 458 | int (*enumerate)(struct rio_mport *mport, u32 flags); |
476 | int (*discover)(struct rio_mport *mport, u32 flags); | 459 | int (*discover)(struct rio_mport *mport, u32 flags); |
477 | }; | 460 | }; |
478 | 461 | ||
462 | /** | ||
463 | * struct rio_scan_node - list node to register RapidIO enumeration and | ||
464 | * discovery methods with RapidIO core. | ||
465 | * @mport_id: ID of an mport (net) serviced by this enumerator | ||
466 | * @node: node in global list of registered enumerators | ||
467 | * @ops: RIO enumeration and discovery operations | ||
468 | */ | ||
469 | struct rio_scan_node { | ||
470 | int mport_id; | ||
471 | struct list_head node; | ||
472 | struct rio_scan *ops; | ||
473 | }; | ||
474 | |||
479 | /* Architecture and hardware-specific functions */ | 475 | /* Architecture and hardware-specific functions */ |
480 | extern int rio_register_mport(struct rio_mport *); | 476 | extern int rio_register_mport(struct rio_mport *); |
481 | extern int rio_open_inb_mbox(struct rio_mport *, void *, int, int); | 477 | extern int rio_open_inb_mbox(struct rio_mport *, void *, int, int); |
diff --git a/include/linux/rio_ids.h b/include/linux/rio_ids.h index b66d13d1bdc0..2543bc163d54 100644 --- a/include/linux/rio_ids.h +++ b/include/linux/rio_ids.h | |||
@@ -13,8 +13,6 @@ | |||
13 | #ifndef LINUX_RIO_IDS_H | 13 | #ifndef LINUX_RIO_IDS_H |
14 | #define LINUX_RIO_IDS_H | 14 | #define LINUX_RIO_IDS_H |
15 | 15 | ||
16 | #define RIO_ANY_ID 0xffff | ||
17 | |||
18 | #define RIO_VID_FREESCALE 0x0002 | 16 | #define RIO_VID_FREESCALE 0x0002 |
19 | #define RIO_DID_MPC8560 0x0003 | 17 | #define RIO_DID_MPC8560 0x0003 |
20 | 18 | ||
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index 26806775b11b..adae88f5b0ab 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h | |||
@@ -244,6 +244,11 @@ size_t sg_copy_from_buffer(struct scatterlist *sgl, unsigned int nents, | |||
244 | size_t sg_copy_to_buffer(struct scatterlist *sgl, unsigned int nents, | 244 | size_t sg_copy_to_buffer(struct scatterlist *sgl, unsigned int nents, |
245 | void *buf, size_t buflen); | 245 | void *buf, size_t buflen); |
246 | 246 | ||
247 | size_t sg_pcopy_from_buffer(struct scatterlist *sgl, unsigned int nents, | ||
248 | void *buf, size_t buflen, off_t skip); | ||
249 | size_t sg_pcopy_to_buffer(struct scatterlist *sgl, unsigned int nents, | ||
250 | void *buf, size_t buflen, off_t skip); | ||
251 | |||
247 | /* | 252 | /* |
248 | * Maximum number of entries that will be allocated in one piece, if | 253 | * Maximum number of entries that will be allocated in one piece, if |
249 | * a list larger than this is required then chaining will be utilized. | 254 | * a list larger than this is required then chaining will be utilized. |
diff --git a/include/linux/sched.h b/include/linux/sched.h index ec80684a0127..50d04b92ceda 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -322,8 +322,6 @@ extern unsigned long | |||
322 | arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr, | 322 | arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr, |
323 | unsigned long len, unsigned long pgoff, | 323 | unsigned long len, unsigned long pgoff, |
324 | unsigned long flags); | 324 | unsigned long flags); |
325 | extern void arch_unmap_area(struct mm_struct *, unsigned long); | ||
326 | extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long); | ||
327 | #else | 325 | #else |
328 | static inline void arch_pick_mmap_layout(struct mm_struct *mm) {} | 326 | static inline void arch_pick_mmap_layout(struct mm_struct *mm) {} |
329 | #endif | 327 | #endif |
@@ -1401,9 +1399,6 @@ struct task_struct { | |||
1401 | } memcg_batch; | 1399 | } memcg_batch; |
1402 | unsigned int memcg_kmem_skip_account; | 1400 | unsigned int memcg_kmem_skip_account; |
1403 | #endif | 1401 | #endif |
1404 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | ||
1405 | atomic_t ptrace_bp_refcnt; | ||
1406 | #endif | ||
1407 | #ifdef CONFIG_UPROBES | 1402 | #ifdef CONFIG_UPROBES |
1408 | struct uprobe_task *utask; | 1403 | struct uprobe_task *utask; |
1409 | #endif | 1404 | #endif |
@@ -1950,8 +1945,6 @@ extern struct task_struct *find_task_by_vpid(pid_t nr); | |||
1950 | extern struct task_struct *find_task_by_pid_ns(pid_t nr, | 1945 | extern struct task_struct *find_task_by_pid_ns(pid_t nr, |
1951 | struct pid_namespace *ns); | 1946 | struct pid_namespace *ns); |
1952 | 1947 | ||
1953 | extern void __set_special_pids(struct pid *pid); | ||
1954 | |||
1955 | /* per-UID process charging. */ | 1948 | /* per-UID process charging. */ |
1956 | extern struct user_struct * alloc_uid(kuid_t); | 1949 | extern struct user_struct * alloc_uid(kuid_t); |
1957 | static inline struct user_struct *get_uid(struct user_struct *u) | 1950 | static inline struct user_struct *get_uid(struct user_struct *u) |
@@ -2439,6 +2432,15 @@ extern int __cond_resched_softirq(void); | |||
2439 | __cond_resched_softirq(); \ | 2432 | __cond_resched_softirq(); \ |
2440 | }) | 2433 | }) |
2441 | 2434 | ||
2435 | static inline void cond_resched_rcu(void) | ||
2436 | { | ||
2437 | #if defined(CONFIG_DEBUG_ATOMIC_SLEEP) || !defined(CONFIG_PREEMPT_RCU) | ||
2438 | rcu_read_unlock(); | ||
2439 | cond_resched(); | ||
2440 | rcu_read_lock(); | ||
2441 | #endif | ||
2442 | } | ||
2443 | |||
2442 | /* | 2444 | /* |
2443 | * Does a critical section need to be broken due to another | 2445 | * Does a critical section need to be broken due to another |
2444 | * task waiting?: (technically does not depend on CONFIG_PREEMPT, | 2446 | * task waiting?: (technically does not depend on CONFIG_PREEMPT, |
diff --git a/include/linux/sched_clock.h b/include/linux/sched_clock.h new file mode 100644 index 000000000000..fa7922c80a41 --- /dev/null +++ b/include/linux/sched_clock.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * sched_clock.h: support for extending counters to full 64-bit ns counter | ||
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 | #ifndef LINUX_SCHED_CLOCK | ||
9 | #define LINUX_SCHED_CLOCK | ||
10 | |||
11 | #ifdef CONFIG_GENERIC_SCHED_CLOCK | ||
12 | extern void sched_clock_postinit(void); | ||
13 | #else | ||
14 | static inline void sched_clock_postinit(void) { } | ||
15 | #endif | ||
16 | |||
17 | extern void setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate); | ||
18 | |||
19 | extern unsigned long long (*sched_clock_func)(void); | ||
20 | |||
21 | #endif | ||
diff --git a/include/linux/security.h b/include/linux/security.h index 4686491852a7..7ce53ae1266b 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/capability.h> | 26 | #include <linux/capability.h> |
27 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
28 | #include <linux/err.h> | 28 | #include <linux/err.h> |
29 | #include <linux/string.h> | ||
29 | 30 | ||
30 | struct linux_binprm; | 31 | struct linux_binprm; |
31 | struct cred; | 32 | struct cred; |
@@ -60,6 +61,9 @@ struct mm_struct; | |||
60 | #define SECURITY_CAP_NOAUDIT 0 | 61 | #define SECURITY_CAP_NOAUDIT 0 |
61 | #define SECURITY_CAP_AUDIT 1 | 62 | #define SECURITY_CAP_AUDIT 1 |
62 | 63 | ||
64 | /* LSM Agnostic defines for sb_set_mnt_opts */ | ||
65 | #define SECURITY_LSM_NATIVE_LABELS 1 | ||
66 | |||
63 | struct ctl_table; | 67 | struct ctl_table; |
64 | struct audit_krule; | 68 | struct audit_krule; |
65 | struct user_namespace; | 69 | struct user_namespace; |
@@ -306,6 +310,15 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
306 | * Parse a string of security data filling in the opts structure | 310 | * Parse a string of security data filling in the opts structure |
307 | * @options string containing all mount options known by the LSM | 311 | * @options string containing all mount options known by the LSM |
308 | * @opts binary data structure usable by the LSM | 312 | * @opts binary data structure usable by the LSM |
313 | * @dentry_init_security: | ||
314 | * Compute a context for a dentry as the inode is not yet available | ||
315 | * since NFSv4 has no label backed by an EA anyway. | ||
316 | * @dentry dentry to use in calculating the context. | ||
317 | * @mode mode used to determine resource type. | ||
318 | * @name name of the last path component used to create file | ||
319 | * @ctx pointer to place the pointer to the resulting context in. | ||
320 | * @ctxlen point to place the length of the resulting context. | ||
321 | * | ||
309 | * | 322 | * |
310 | * Security hooks for inode operations. | 323 | * Security hooks for inode operations. |
311 | * | 324 | * |
@@ -1313,6 +1326,13 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
1313 | * @pages contains the number of pages. | 1326 | * @pages contains the number of pages. |
1314 | * Return 0 if permission is granted. | 1327 | * Return 0 if permission is granted. |
1315 | * | 1328 | * |
1329 | * @ismaclabel: | ||
1330 | * Check if the extended attribute specified by @name | ||
1331 | * represents a MAC label. Returns 1 if name is a MAC | ||
1332 | * attribute otherwise returns 0. | ||
1333 | * @name full extended attribute name to check against | ||
1334 | * LSM as a MAC label. | ||
1335 | * | ||
1316 | * @secid_to_secctx: | 1336 | * @secid_to_secctx: |
1317 | * Convert secid to security context. If secdata is NULL the length of | 1337 | * Convert secid to security context. If secdata is NULL the length of |
1318 | * the result will be returned in seclen, but no secdata will be returned. | 1338 | * the result will be returned in seclen, but no secdata will be returned. |
@@ -1392,7 +1412,8 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
1392 | * @ctxlen contains the length of @ctx. | 1412 | * @ctxlen contains the length of @ctx. |
1393 | * | 1413 | * |
1394 | * @inode_getsecctx: | 1414 | * @inode_getsecctx: |
1395 | * Returns a string containing all relevant security context information | 1415 | * On success, returns 0 and fills out @ctx and @ctxlen with the security |
1416 | * context for the given @inode. | ||
1396 | * | 1417 | * |
1397 | * @inode we wish to get the security context of. | 1418 | * @inode we wish to get the security context of. |
1398 | * @ctx is a pointer in which to place the allocated security context. | 1419 | * @ctx is a pointer in which to place the allocated security context. |
@@ -1439,10 +1460,16 @@ struct security_operations { | |||
1439 | int (*sb_pivotroot) (struct path *old_path, | 1460 | int (*sb_pivotroot) (struct path *old_path, |
1440 | struct path *new_path); | 1461 | struct path *new_path); |
1441 | int (*sb_set_mnt_opts) (struct super_block *sb, | 1462 | int (*sb_set_mnt_opts) (struct super_block *sb, |
1442 | struct security_mnt_opts *opts); | 1463 | struct security_mnt_opts *opts, |
1464 | unsigned long kern_flags, | ||
1465 | unsigned long *set_kern_flags); | ||
1443 | int (*sb_clone_mnt_opts) (const struct super_block *oldsb, | 1466 | int (*sb_clone_mnt_opts) (const struct super_block *oldsb, |
1444 | struct super_block *newsb); | 1467 | struct super_block *newsb); |
1445 | int (*sb_parse_opts_str) (char *options, struct security_mnt_opts *opts); | 1468 | int (*sb_parse_opts_str) (char *options, struct security_mnt_opts *opts); |
1469 | int (*dentry_init_security) (struct dentry *dentry, int mode, | ||
1470 | struct qstr *name, void **ctx, | ||
1471 | u32 *ctxlen); | ||
1472 | |||
1446 | 1473 | ||
1447 | #ifdef CONFIG_SECURITY_PATH | 1474 | #ifdef CONFIG_SECURITY_PATH |
1448 | int (*path_unlink) (struct path *dir, struct dentry *dentry); | 1475 | int (*path_unlink) (struct path *dir, struct dentry *dentry); |
@@ -1590,6 +1617,7 @@ struct security_operations { | |||
1590 | 1617 | ||
1591 | int (*getprocattr) (struct task_struct *p, char *name, char **value); | 1618 | int (*getprocattr) (struct task_struct *p, char *name, char **value); |
1592 | int (*setprocattr) (struct task_struct *p, char *name, void *value, size_t size); | 1619 | int (*setprocattr) (struct task_struct *p, char *name, void *value, size_t size); |
1620 | int (*ismaclabel) (const char *name); | ||
1593 | int (*secid_to_secctx) (u32 secid, char **secdata, u32 *seclen); | 1621 | int (*secid_to_secctx) (u32 secid, char **secdata, u32 *seclen); |
1594 | int (*secctx_to_secid) (const char *secdata, u32 seclen, u32 *secid); | 1622 | int (*secctx_to_secid) (const char *secdata, u32 seclen, u32 *secid); |
1595 | void (*release_secctx) (char *secdata, u32 seclen); | 1623 | void (*release_secctx) (char *secdata, u32 seclen); |
@@ -1725,10 +1753,16 @@ int security_sb_mount(const char *dev_name, struct path *path, | |||
1725 | const char *type, unsigned long flags, void *data); | 1753 | const char *type, unsigned long flags, void *data); |
1726 | int security_sb_umount(struct vfsmount *mnt, int flags); | 1754 | int security_sb_umount(struct vfsmount *mnt, int flags); |
1727 | int security_sb_pivotroot(struct path *old_path, struct path *new_path); | 1755 | int security_sb_pivotroot(struct path *old_path, struct path *new_path); |
1728 | int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts); | 1756 | int security_sb_set_mnt_opts(struct super_block *sb, |
1757 | struct security_mnt_opts *opts, | ||
1758 | unsigned long kern_flags, | ||
1759 | unsigned long *set_kern_flags); | ||
1729 | int security_sb_clone_mnt_opts(const struct super_block *oldsb, | 1760 | int security_sb_clone_mnt_opts(const struct super_block *oldsb, |
1730 | struct super_block *newsb); | 1761 | struct super_block *newsb); |
1731 | int security_sb_parse_opts_str(char *options, struct security_mnt_opts *opts); | 1762 | int security_sb_parse_opts_str(char *options, struct security_mnt_opts *opts); |
1763 | int security_dentry_init_security(struct dentry *dentry, int mode, | ||
1764 | struct qstr *name, void **ctx, | ||
1765 | u32 *ctxlen); | ||
1732 | 1766 | ||
1733 | int security_inode_alloc(struct inode *inode); | 1767 | int security_inode_alloc(struct inode *inode); |
1734 | void security_inode_free(struct inode *inode); | 1768 | void security_inode_free(struct inode *inode); |
@@ -1840,6 +1874,7 @@ void security_d_instantiate(struct dentry *dentry, struct inode *inode); | |||
1840 | int security_getprocattr(struct task_struct *p, char *name, char **value); | 1874 | int security_getprocattr(struct task_struct *p, char *name, char **value); |
1841 | int security_setprocattr(struct task_struct *p, char *name, void *value, size_t size); | 1875 | int security_setprocattr(struct task_struct *p, char *name, void *value, size_t size); |
1842 | int security_netlink_send(struct sock *sk, struct sk_buff *skb); | 1876 | int security_netlink_send(struct sock *sk, struct sk_buff *skb); |
1877 | int security_ismaclabel(const char *name); | ||
1843 | int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen); | 1878 | int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen); |
1844 | int security_secctx_to_secid(const char *secdata, u32 seclen, u32 *secid); | 1879 | int security_secctx_to_secid(const char *secdata, u32 seclen, u32 *secid); |
1845 | void security_release_secctx(char *secdata, u32 seclen); | 1880 | void security_release_secctx(char *secdata, u32 seclen); |
@@ -2011,7 +2046,9 @@ static inline int security_sb_pivotroot(struct path *old_path, | |||
2011 | } | 2046 | } |
2012 | 2047 | ||
2013 | static inline int security_sb_set_mnt_opts(struct super_block *sb, | 2048 | static inline int security_sb_set_mnt_opts(struct super_block *sb, |
2014 | struct security_mnt_opts *opts) | 2049 | struct security_mnt_opts *opts, |
2050 | unsigned long kern_flags, | ||
2051 | unsigned long *set_kern_flags) | ||
2015 | { | 2052 | { |
2016 | return 0; | 2053 | return 0; |
2017 | } | 2054 | } |
@@ -2035,6 +2072,16 @@ static inline int security_inode_alloc(struct inode *inode) | |||
2035 | static inline void security_inode_free(struct inode *inode) | 2072 | static inline void security_inode_free(struct inode *inode) |
2036 | { } | 2073 | { } |
2037 | 2074 | ||
2075 | static inline int security_dentry_init_security(struct dentry *dentry, | ||
2076 | int mode, | ||
2077 | struct qstr *name, | ||
2078 | void **ctx, | ||
2079 | u32 *ctxlen) | ||
2080 | { | ||
2081 | return -EOPNOTSUPP; | ||
2082 | } | ||
2083 | |||
2084 | |||
2038 | static inline int security_inode_init_security(struct inode *inode, | 2085 | static inline int security_inode_init_security(struct inode *inode, |
2039 | struct inode *dir, | 2086 | struct inode *dir, |
2040 | const struct qstr *qstr, | 2087 | const struct qstr *qstr, |
@@ -2520,6 +2567,11 @@ static inline int security_netlink_send(struct sock *sk, struct sk_buff *skb) | |||
2520 | return cap_netlink_send(sk, skb); | 2567 | return cap_netlink_send(sk, skb); |
2521 | } | 2568 | } |
2522 | 2569 | ||
2570 | static inline int security_ismaclabel(const char *name) | ||
2571 | { | ||
2572 | return 0; | ||
2573 | } | ||
2574 | |||
2523 | static inline int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) | 2575 | static inline int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) |
2524 | { | 2576 | { |
2525 | return -EOPNOTSUPP; | 2577 | return -EOPNOTSUPP; |
diff --git a/include/linux/sem.h b/include/linux/sem.h index 53d42650b193..976ce3a19f1b 100644 --- a/include/linux/sem.h +++ b/include/linux/sem.h | |||
@@ -12,10 +12,12 @@ struct task_struct; | |||
12 | struct sem_array { | 12 | struct sem_array { |
13 | struct kern_ipc_perm ____cacheline_aligned_in_smp | 13 | struct kern_ipc_perm ____cacheline_aligned_in_smp |
14 | sem_perm; /* permissions .. see ipc.h */ | 14 | sem_perm; /* permissions .. see ipc.h */ |
15 | time_t sem_otime; /* last semop time */ | ||
16 | time_t sem_ctime; /* last change time */ | 15 | time_t sem_ctime; /* last change time */ |
17 | struct sem *sem_base; /* ptr to first semaphore in array */ | 16 | struct sem *sem_base; /* ptr to first semaphore in array */ |
18 | struct list_head sem_pending; /* pending operations to be processed */ | 17 | struct list_head pending_alter; /* pending operations */ |
18 | /* that alter the array */ | ||
19 | struct list_head pending_const; /* pending complex operations */ | ||
20 | /* that do not alter semvals */ | ||
19 | struct list_head list_id; /* undo requests on this array */ | 21 | struct list_head list_id; /* undo requests on this array */ |
20 | int sem_nsems; /* no. of semaphores in array */ | 22 | int sem_nsems; /* no. of semaphores in array */ |
21 | int complex_count; /* pending complex operations */ | 23 | int complex_count; /* pending complex operations */ |
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index 2da29ac178fc..4e32edc8f506 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
@@ -173,4 +173,10 @@ extern struct hlist_node *seq_hlist_start_head_rcu(struct hlist_head *head, | |||
173 | extern struct hlist_node *seq_hlist_next_rcu(void *v, | 173 | extern struct hlist_node *seq_hlist_next_rcu(void *v, |
174 | struct hlist_head *head, | 174 | struct hlist_head *head, |
175 | loff_t *ppos); | 175 | loff_t *ppos); |
176 | |||
177 | /* Helpers for iterating over per-cpu hlist_head-s in seq_files */ | ||
178 | extern struct hlist_node *seq_hlist_start_percpu(struct hlist_head __percpu *head, int *cpu, loff_t pos); | ||
179 | |||
180 | extern struct hlist_node *seq_hlist_next_percpu(void *v, struct hlist_head __percpu *head, int *cpu, loff_t *pos); | ||
181 | |||
176 | #endif | 182 | #endif |
diff --git a/include/linux/sh_dma.h b/include/linux/sh_dma.h index b64d6bec6f90..4e83f3e034f3 100644 --- a/include/linux/sh_dma.h +++ b/include/linux/sh_dma.h | |||
@@ -99,6 +99,4 @@ struct sh_dmae_pdata { | |||
99 | #define CHCR_TE 0x00000002 | 99 | #define CHCR_TE 0x00000002 |
100 | #define CHCR_IE 0x00000004 | 100 | #define CHCR_IE 0x00000004 |
101 | 101 | ||
102 | bool shdma_chan_filter(struct dma_chan *chan, void *arg); | ||
103 | |||
104 | #endif | 102 | #endif |
diff --git a/include/linux/shdma-base.h b/include/linux/shdma-base.h index a3728bf66f0e..382cf710ca9a 100644 --- a/include/linux/shdma-base.h +++ b/include/linux/shdma-base.h | |||
@@ -68,6 +68,8 @@ struct shdma_chan { | |||
68 | int id; /* Raw id of this channel */ | 68 | int id; /* Raw id of this channel */ |
69 | int irq; /* Channel IRQ */ | 69 | int irq; /* Channel IRQ */ |
70 | int slave_id; /* Client ID for slave DMA */ | 70 | int slave_id; /* Client ID for slave DMA */ |
71 | int hw_req; /* DMA request line for slave DMA - same | ||
72 | * as MID/RID, used with DT */ | ||
71 | enum shdma_pm_state pm_state; | 73 | enum shdma_pm_state pm_state; |
72 | }; | 74 | }; |
73 | 75 | ||
@@ -122,5 +124,6 @@ void shdma_chan_remove(struct shdma_chan *schan); | |||
122 | int shdma_init(struct device *dev, struct shdma_dev *sdev, | 124 | int shdma_init(struct device *dev, struct shdma_dev *sdev, |
123 | int chan_num); | 125 | int chan_num); |
124 | void shdma_cleanup(struct shdma_dev *sdev); | 126 | void shdma_cleanup(struct shdma_dev *sdev); |
127 | bool shdma_chan_filter(struct dma_chan *chan, void *arg); | ||
125 | 128 | ||
126 | #endif | 129 | #endif |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index dec1748cd002..5afefa01a13c 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -319,6 +319,8 @@ enum { | |||
319 | SKB_GSO_GRE = 1 << 6, | 319 | SKB_GSO_GRE = 1 << 6, |
320 | 320 | ||
321 | SKB_GSO_UDP_TUNNEL = 1 << 7, | 321 | SKB_GSO_UDP_TUNNEL = 1 << 7, |
322 | |||
323 | SKB_GSO_MPLS = 1 << 8, | ||
322 | }; | 324 | }; |
323 | 325 | ||
324 | #if BITS_PER_LONG > 32 | 326 | #if BITS_PER_LONG > 32 |
@@ -384,11 +386,13 @@ typedef unsigned char *sk_buff_data_t; | |||
384 | * @no_fcs: Request NIC to treat last 4 bytes as Ethernet FCS | 386 | * @no_fcs: Request NIC to treat last 4 bytes as Ethernet FCS |
385 | * @dma_cookie: a cookie to one of several possible DMA operations | 387 | * @dma_cookie: a cookie to one of several possible DMA operations |
386 | * done by skb DMA functions | 388 | * done by skb DMA functions |
389 | * @napi_id: id of the NAPI struct this skb came from | ||
387 | * @secmark: security marking | 390 | * @secmark: security marking |
388 | * @mark: Generic packet mark | 391 | * @mark: Generic packet mark |
389 | * @dropcount: total number of sk_receive_queue overflows | 392 | * @dropcount: total number of sk_receive_queue overflows |
390 | * @vlan_proto: vlan encapsulation protocol | 393 | * @vlan_proto: vlan encapsulation protocol |
391 | * @vlan_tci: vlan tag control information | 394 | * @vlan_tci: vlan tag control information |
395 | * @inner_protocol: Protocol (encapsulation) | ||
392 | * @inner_transport_header: Inner transport layer header (encapsulation) | 396 | * @inner_transport_header: Inner transport layer header (encapsulation) |
393 | * @inner_network_header: Network layer header (encapsulation) | 397 | * @inner_network_header: Network layer header (encapsulation) |
394 | * @inner_mac_header: Link layer header (encapsulation) | 398 | * @inner_mac_header: Link layer header (encapsulation) |
@@ -497,8 +501,11 @@ struct sk_buff { | |||
497 | /* 7/9 bit hole (depending on ndisc_nodetype presence) */ | 501 | /* 7/9 bit hole (depending on ndisc_nodetype presence) */ |
498 | kmemcheck_bitfield_end(flags2); | 502 | kmemcheck_bitfield_end(flags2); |
499 | 503 | ||
500 | #ifdef CONFIG_NET_DMA | 504 | #if defined CONFIG_NET_DMA || defined CONFIG_NET_LL_RX_POLL |
501 | dma_cookie_t dma_cookie; | 505 | union { |
506 | unsigned int napi_id; | ||
507 | dma_cookie_t dma_cookie; | ||
508 | }; | ||
502 | #endif | 509 | #endif |
503 | #ifdef CONFIG_NETWORK_SECMARK | 510 | #ifdef CONFIG_NETWORK_SECMARK |
504 | __u32 secmark; | 511 | __u32 secmark; |
@@ -509,12 +516,13 @@ struct sk_buff { | |||
509 | __u32 reserved_tailroom; | 516 | __u32 reserved_tailroom; |
510 | }; | 517 | }; |
511 | 518 | ||
512 | sk_buff_data_t inner_transport_header; | 519 | __be16 inner_protocol; |
513 | sk_buff_data_t inner_network_header; | 520 | __u16 inner_transport_header; |
514 | sk_buff_data_t inner_mac_header; | 521 | __u16 inner_network_header; |
515 | sk_buff_data_t transport_header; | 522 | __u16 inner_mac_header; |
516 | sk_buff_data_t network_header; | 523 | __u16 transport_header; |
517 | sk_buff_data_t mac_header; | 524 | __u16 network_header; |
525 | __u16 mac_header; | ||
518 | /* These elements must be at the end, see alloc_skb() for details. */ | 526 | /* These elements must be at the end, see alloc_skb() for details. */ |
519 | sk_buff_data_t tail; | 527 | sk_buff_data_t tail; |
520 | sk_buff_data_t end; | 528 | sk_buff_data_t end; |
@@ -1388,6 +1396,7 @@ static inline void skb_set_tail_pointer(struct sk_buff *skb, const int offset) | |||
1388 | skb_reset_tail_pointer(skb); | 1396 | skb_reset_tail_pointer(skb); |
1389 | skb->tail += offset; | 1397 | skb->tail += offset; |
1390 | } | 1398 | } |
1399 | |||
1391 | #else /* NET_SKBUFF_DATA_USES_OFFSET */ | 1400 | #else /* NET_SKBUFF_DATA_USES_OFFSET */ |
1392 | static inline unsigned char *skb_tail_pointer(const struct sk_buff *skb) | 1401 | static inline unsigned char *skb_tail_pointer(const struct sk_buff *skb) |
1393 | { | 1402 | { |
@@ -1528,7 +1537,6 @@ static inline void skb_reset_mac_len(struct sk_buff *skb) | |||
1528 | skb->mac_len = skb->network_header - skb->mac_header; | 1537 | skb->mac_len = skb->network_header - skb->mac_header; |
1529 | } | 1538 | } |
1530 | 1539 | ||
1531 | #ifdef NET_SKBUFF_DATA_USES_OFFSET | ||
1532 | static inline unsigned char *skb_inner_transport_header(const struct sk_buff | 1540 | static inline unsigned char *skb_inner_transport_header(const struct sk_buff |
1533 | *skb) | 1541 | *skb) |
1534 | { | 1542 | { |
@@ -1582,7 +1590,7 @@ static inline void skb_set_inner_mac_header(struct sk_buff *skb, | |||
1582 | } | 1590 | } |
1583 | static inline bool skb_transport_header_was_set(const struct sk_buff *skb) | 1591 | static inline bool skb_transport_header_was_set(const struct sk_buff *skb) |
1584 | { | 1592 | { |
1585 | return skb->transport_header != ~0U; | 1593 | return skb->transport_header != (typeof(skb->transport_header))~0U; |
1586 | } | 1594 | } |
1587 | 1595 | ||
1588 | static inline unsigned char *skb_transport_header(const struct sk_buff *skb) | 1596 | static inline unsigned char *skb_transport_header(const struct sk_buff *skb) |
@@ -1625,7 +1633,7 @@ static inline unsigned char *skb_mac_header(const struct sk_buff *skb) | |||
1625 | 1633 | ||
1626 | static inline int skb_mac_header_was_set(const struct sk_buff *skb) | 1634 | static inline int skb_mac_header_was_set(const struct sk_buff *skb) |
1627 | { | 1635 | { |
1628 | return skb->mac_header != ~0U; | 1636 | return skb->mac_header != (typeof(skb->mac_header))~0U; |
1629 | } | 1637 | } |
1630 | 1638 | ||
1631 | static inline void skb_reset_mac_header(struct sk_buff *skb) | 1639 | static inline void skb_reset_mac_header(struct sk_buff *skb) |
@@ -1639,112 +1647,6 @@ static inline void skb_set_mac_header(struct sk_buff *skb, const int offset) | |||
1639 | skb->mac_header += offset; | 1647 | skb->mac_header += offset; |
1640 | } | 1648 | } |
1641 | 1649 | ||
1642 | #else /* NET_SKBUFF_DATA_USES_OFFSET */ | ||
1643 | static inline unsigned char *skb_inner_transport_header(const struct sk_buff | ||
1644 | *skb) | ||
1645 | { | ||
1646 | return skb->inner_transport_header; | ||
1647 | } | ||
1648 | |||
1649 | static inline void skb_reset_inner_transport_header(struct sk_buff *skb) | ||
1650 | { | ||
1651 | skb->inner_transport_header = skb->data; | ||
1652 | } | ||
1653 | |||
1654 | static inline void skb_set_inner_transport_header(struct sk_buff *skb, | ||
1655 | const int offset) | ||
1656 | { | ||
1657 | skb->inner_transport_header = skb->data + offset; | ||
1658 | } | ||
1659 | |||
1660 | static inline unsigned char *skb_inner_network_header(const struct sk_buff *skb) | ||
1661 | { | ||
1662 | return skb->inner_network_header; | ||
1663 | } | ||
1664 | |||
1665 | static inline void skb_reset_inner_network_header(struct sk_buff *skb) | ||
1666 | { | ||
1667 | skb->inner_network_header = skb->data; | ||
1668 | } | ||
1669 | |||
1670 | static inline void skb_set_inner_network_header(struct sk_buff *skb, | ||
1671 | const int offset) | ||
1672 | { | ||
1673 | skb->inner_network_header = skb->data + offset; | ||
1674 | } | ||
1675 | |||
1676 | static inline unsigned char *skb_inner_mac_header(const struct sk_buff *skb) | ||
1677 | { | ||
1678 | return skb->inner_mac_header; | ||
1679 | } | ||
1680 | |||
1681 | static inline void skb_reset_inner_mac_header(struct sk_buff *skb) | ||
1682 | { | ||
1683 | skb->inner_mac_header = skb->data; | ||
1684 | } | ||
1685 | |||
1686 | static inline void skb_set_inner_mac_header(struct sk_buff *skb, | ||
1687 | const int offset) | ||
1688 | { | ||
1689 | skb->inner_mac_header = skb->data + offset; | ||
1690 | } | ||
1691 | static inline bool skb_transport_header_was_set(const struct sk_buff *skb) | ||
1692 | { | ||
1693 | return skb->transport_header != NULL; | ||
1694 | } | ||
1695 | |||
1696 | static inline unsigned char *skb_transport_header(const struct sk_buff *skb) | ||
1697 | { | ||
1698 | return skb->transport_header; | ||
1699 | } | ||
1700 | |||
1701 | static inline void skb_reset_transport_header(struct sk_buff *skb) | ||
1702 | { | ||
1703 | skb->transport_header = skb->data; | ||
1704 | } | ||
1705 | |||
1706 | static inline void skb_set_transport_header(struct sk_buff *skb, | ||
1707 | const int offset) | ||
1708 | { | ||
1709 | skb->transport_header = skb->data + offset; | ||
1710 | } | ||
1711 | |||
1712 | static inline unsigned char *skb_network_header(const struct sk_buff *skb) | ||
1713 | { | ||
1714 | return skb->network_header; | ||
1715 | } | ||
1716 | |||
1717 | static inline void skb_reset_network_header(struct sk_buff *skb) | ||
1718 | { | ||
1719 | skb->network_header = skb->data; | ||
1720 | } | ||
1721 | |||
1722 | static inline void skb_set_network_header(struct sk_buff *skb, const int offset) | ||
1723 | { | ||
1724 | skb->network_header = skb->data + offset; | ||
1725 | } | ||
1726 | |||
1727 | static inline unsigned char *skb_mac_header(const struct sk_buff *skb) | ||
1728 | { | ||
1729 | return skb->mac_header; | ||
1730 | } | ||
1731 | |||
1732 | static inline int skb_mac_header_was_set(const struct sk_buff *skb) | ||
1733 | { | ||
1734 | return skb->mac_header != NULL; | ||
1735 | } | ||
1736 | |||
1737 | static inline void skb_reset_mac_header(struct sk_buff *skb) | ||
1738 | { | ||
1739 | skb->mac_header = skb->data; | ||
1740 | } | ||
1741 | |||
1742 | static inline void skb_set_mac_header(struct sk_buff *skb, const int offset) | ||
1743 | { | ||
1744 | skb->mac_header = skb->data + offset; | ||
1745 | } | ||
1746 | #endif /* NET_SKBUFF_DATA_USES_OFFSET */ | ||
1747 | |||
1748 | static inline void skb_probe_transport_header(struct sk_buff *skb, | 1650 | static inline void skb_probe_transport_header(struct sk_buff *skb, |
1749 | const int offset_hint) | 1651 | const int offset_hint) |
1750 | { | 1652 | { |
@@ -2483,6 +2385,7 @@ extern void skb_split(struct sk_buff *skb, | |||
2483 | struct sk_buff *skb1, const u32 len); | 2385 | struct sk_buff *skb1, const u32 len); |
2484 | extern int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, | 2386 | extern int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, |
2485 | int shiftlen); | 2387 | int shiftlen); |
2388 | extern void skb_scrub_packet(struct sk_buff *skb); | ||
2486 | 2389 | ||
2487 | extern struct sk_buff *skb_segment(struct sk_buff *skb, | 2390 | extern struct sk_buff *skb_segment(struct sk_buff *skb, |
2488 | netdev_features_t features); | 2391 | netdev_features_t features); |
diff --git a/include/linux/smp.h b/include/linux/smp.h index c8488763277f..c181399f2c20 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/list.h> | 11 | #include <linux/list.h> |
12 | #include <linux/cpumask.h> | 12 | #include <linux/cpumask.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/irqflags.h> | ||
15 | 14 | ||
16 | extern void cpu_idle(void); | 15 | extern void cpu_idle(void); |
17 | 16 | ||
@@ -140,17 +139,14 @@ static inline int up_smp_call_function(smp_call_func_t func, void *info) | |||
140 | } | 139 | } |
141 | #define smp_call_function(func, info, wait) \ | 140 | #define smp_call_function(func, info, wait) \ |
142 | (up_smp_call_function(func, info)) | 141 | (up_smp_call_function(func, info)) |
143 | 142 | #define on_each_cpu(func, info, wait) \ | |
144 | static inline int on_each_cpu(smp_call_func_t func, void *info, int wait) | 143 | ({ \ |
145 | { | 144 | unsigned long __flags; \ |
146 | unsigned long flags; | 145 | local_irq_save(__flags); \ |
147 | 146 | func(info); \ | |
148 | local_irq_save(flags); | 147 | local_irq_restore(__flags); \ |
149 | func(info); | 148 | 0; \ |
150 | local_irq_restore(flags); | 149 | }) |
151 | return 0; | ||
152 | } | ||
153 | |||
154 | /* | 150 | /* |
155 | * Note we still need to test the mask even for UP | 151 | * Note we still need to test the mask even for UP |
156 | * because we actually can get an empty mask from | 152 | * because we actually can get an empty mask from |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 6ff26c8db7b9..28e440be1c07 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -308,6 +308,9 @@ struct spi_master { | |||
308 | 308 | ||
309 | /* bitmask of supported bits_per_word for transfers */ | 309 | /* bitmask of supported bits_per_word for transfers */ |
310 | u32 bits_per_word_mask; | 310 | u32 bits_per_word_mask; |
311 | #define SPI_BPW_MASK(bits) BIT((bits) - 1) | ||
312 | #define SPI_BIT_MASK(bits) (((bits) == 32) ? ~0UL : (BIT(bits) - 1)) | ||
313 | #define SPI_BPW_RANGE_MASK(min, max) (SPI_BIT_MASK(max) - SPI_BIT_MASK(min - 1)) | ||
311 | 314 | ||
312 | /* other constraints relevant to this driver */ | 315 | /* other constraints relevant to this driver */ |
313 | u16 flags; | 316 | u16 flags; |
diff --git a/include/linux/spi/xilinx_spi.h b/include/linux/spi/xilinx_spi.h index 6f17278810b0..333ecdfee0d9 100644 --- a/include/linux/spi/xilinx_spi.h +++ b/include/linux/spi/xilinx_spi.h | |||
@@ -11,7 +11,6 @@ | |||
11 | */ | 11 | */ |
12 | struct xspi_platform_data { | 12 | struct xspi_platform_data { |
13 | u16 num_chipselect; | 13 | u16 num_chipselect; |
14 | bool little_endian; | ||
15 | u8 bits_per_word; | 14 | u8 bits_per_word; |
16 | struct spi_board_info *devices; | 15 | struct spi_board_info *devices; |
17 | u8 num_devices; | 16 | u8 num_devices; |
diff --git a/include/linux/spinlock_api_smp.h b/include/linux/spinlock_api_smp.h index 51df117abe46..bdb9993f0fda 100644 --- a/include/linux/spinlock_api_smp.h +++ b/include/linux/spinlock_api_smp.h | |||
@@ -144,7 +144,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock) | |||
144 | LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock); | 144 | LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock); |
145 | } | 145 | } |
146 | 146 | ||
147 | #endif /* CONFIG_PREEMPT */ | 147 | #endif /* !CONFIG_GENERIC_LOCKBREAK || CONFIG_DEBUG_LOCK_ALLOC */ |
148 | 148 | ||
149 | static inline void __raw_spin_unlock(raw_spinlock_t *lock) | 149 | static inline void __raw_spin_unlock(raw_spinlock_t *lock) |
150 | { | 150 | { |
diff --git a/include/linux/ssb/ssb_driver_mips.h b/include/linux/ssb/ssb_driver_mips.h index afe79d40a99e..6535e4718fde 100644 --- a/include/linux/ssb/ssb_driver_mips.h +++ b/include/linux/ssb/ssb_driver_mips.h | |||
@@ -20,6 +20,18 @@ struct ssb_pflash { | |||
20 | u32 window_size; | 20 | u32 window_size; |
21 | }; | 21 | }; |
22 | 22 | ||
23 | #ifdef CONFIG_SSB_SFLASH | ||
24 | struct ssb_sflash { | ||
25 | bool present; | ||
26 | u32 window; | ||
27 | u32 blocksize; | ||
28 | u16 numblocks; | ||
29 | u32 size; | ||
30 | |||
31 | void *priv; | ||
32 | }; | ||
33 | #endif | ||
34 | |||
23 | struct ssb_mipscore { | 35 | struct ssb_mipscore { |
24 | struct ssb_device *dev; | 36 | struct ssb_device *dev; |
25 | 37 | ||
@@ -27,6 +39,9 @@ struct ssb_mipscore { | |||
27 | struct ssb_serial_port serial_ports[4]; | 39 | struct ssb_serial_port serial_ports[4]; |
28 | 40 | ||
29 | struct ssb_pflash pflash; | 41 | struct ssb_pflash pflash; |
42 | #ifdef CONFIG_SSB_SFLASH | ||
43 | struct ssb_sflash sflash; | ||
44 | #endif | ||
30 | }; | 45 | }; |
31 | 46 | ||
32 | extern void ssb_mipscore_init(struct ssb_mipscore *mcore); | 47 | extern void ssb_mipscore_init(struct ssb_mipscore *mcore); |
diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h index 3a7256955b10..f9f931c89e3e 100644 --- a/include/linux/ssb/ssb_regs.h +++ b/include/linux/ssb/ssb_regs.h | |||
@@ -172,6 +172,7 @@ | |||
172 | #define SSB_SPROMSIZE_WORDS_R4 220 | 172 | #define SSB_SPROMSIZE_WORDS_R4 220 |
173 | #define SSB_SPROMSIZE_BYTES_R123 (SSB_SPROMSIZE_WORDS_R123 * sizeof(u16)) | 173 | #define SSB_SPROMSIZE_BYTES_R123 (SSB_SPROMSIZE_WORDS_R123 * sizeof(u16)) |
174 | #define SSB_SPROMSIZE_BYTES_R4 (SSB_SPROMSIZE_WORDS_R4 * sizeof(u16)) | 174 | #define SSB_SPROMSIZE_BYTES_R4 (SSB_SPROMSIZE_WORDS_R4 * sizeof(u16)) |
175 | #define SSB_SPROMSIZE_WORDS_R10 230 | ||
175 | #define SSB_SPROM_BASE1 0x1000 | 176 | #define SSB_SPROM_BASE1 0x1000 |
176 | #define SSB_SPROM_BASE31 0x0800 | 177 | #define SSB_SPROM_BASE31 0x0800 |
177 | #define SSB_SPROM_REVISION 0x007E | 178 | #define SSB_SPROM_REVISION 0x007E |
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index c1b3ed3fb787..9e495d31516e 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h | |||
@@ -80,6 +80,10 @@ struct stmmac_mdio_bus_data { | |||
80 | unsigned int phy_mask; | 80 | unsigned int phy_mask; |
81 | int *irqs; | 81 | int *irqs; |
82 | int probed_phy_irq; | 82 | int probed_phy_irq; |
83 | #ifdef CONFIG_OF | ||
84 | int reset_gpio, active_low; | ||
85 | u32 delays[3]; | ||
86 | #endif | ||
83 | }; | 87 | }; |
84 | 88 | ||
85 | struct stmmac_dma_cfg { | 89 | struct stmmac_dma_cfg { |
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 303399b1ba59..6ce690de447f 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
@@ -57,6 +57,7 @@ struct cache_head { | |||
57 | #define CACHE_VALID 0 /* Entry contains valid data */ | 57 | #define CACHE_VALID 0 /* Entry contains valid data */ |
58 | #define CACHE_NEGATIVE 1 /* Negative entry - there is no match for the key */ | 58 | #define CACHE_NEGATIVE 1 /* Negative entry - there is no match for the key */ |
59 | #define CACHE_PENDING 2 /* An upcall has been sent but no reply received yet*/ | 59 | #define CACHE_PENDING 2 /* An upcall has been sent but no reply received yet*/ |
60 | #define CACHE_CLEANED 3 /* Entry has been cleaned from cache */ | ||
60 | 61 | ||
61 | #define CACHE_NEW_EXPIRY 120 /* keep new things pending confirmation for 120 seconds */ | 62 | #define CACHE_NEW_EXPIRY 120 /* keep new things pending confirmation for 120 seconds */ |
62 | 63 | ||
@@ -148,6 +149,24 @@ struct cache_deferred_req { | |||
148 | int too_many); | 149 | int too_many); |
149 | }; | 150 | }; |
150 | 151 | ||
152 | /* | ||
153 | * timestamps kept in the cache are expressed in seconds | ||
154 | * since boot. This is the best for measuring differences in | ||
155 | * real time. | ||
156 | */ | ||
157 | static inline time_t seconds_since_boot(void) | ||
158 | { | ||
159 | struct timespec boot; | ||
160 | getboottime(&boot); | ||
161 | return get_seconds() - boot.tv_sec; | ||
162 | } | ||
163 | |||
164 | static inline time_t convert_to_wallclock(time_t sinceboot) | ||
165 | { | ||
166 | struct timespec boot; | ||
167 | getboottime(&boot); | ||
168 | return boot.tv_sec + sinceboot; | ||
169 | } | ||
151 | 170 | ||
152 | extern const struct file_operations cache_file_operations_pipefs; | 171 | extern const struct file_operations cache_file_operations_pipefs; |
153 | extern const struct file_operations content_file_operations_pipefs; | 172 | extern const struct file_operations content_file_operations_pipefs; |
@@ -181,15 +200,10 @@ static inline void cache_put(struct cache_head *h, struct cache_detail *cd) | |||
181 | kref_put(&h->ref, cd->cache_put); | 200 | kref_put(&h->ref, cd->cache_put); |
182 | } | 201 | } |
183 | 202 | ||
184 | static inline int cache_valid(struct cache_head *h) | 203 | static inline int cache_is_expired(struct cache_detail *detail, struct cache_head *h) |
185 | { | 204 | { |
186 | /* If an item has been unhashed pending removal when | 205 | return (h->expiry_time < seconds_since_boot()) || |
187 | * the refcount drops to 0, the expiry_time will be | 206 | (detail->flush_time > h->last_refresh); |
188 | * set to 0. We don't want to consider such items | ||
189 | * valid in this context even though CACHE_VALID is | ||
190 | * set. | ||
191 | */ | ||
192 | return (h->expiry_time != 0 && test_bit(CACHE_VALID, &h->flags)); | ||
193 | } | 207 | } |
194 | 208 | ||
195 | extern int cache_check(struct cache_detail *detail, | 209 | extern int cache_check(struct cache_detail *detail, |
@@ -250,25 +264,6 @@ static inline int get_uint(char **bpp, unsigned int *anint) | |||
250 | return 0; | 264 | return 0; |
251 | } | 265 | } |
252 | 266 | ||
253 | /* | ||
254 | * timestamps kept in the cache are expressed in seconds | ||
255 | * since boot. This is the best for measuring differences in | ||
256 | * real time. | ||
257 | */ | ||
258 | static inline time_t seconds_since_boot(void) | ||
259 | { | ||
260 | struct timespec boot; | ||
261 | getboottime(&boot); | ||
262 | return get_seconds() - boot.tv_sec; | ||
263 | } | ||
264 | |||
265 | static inline time_t convert_to_wallclock(time_t sinceboot) | ||
266 | { | ||
267 | struct timespec boot; | ||
268 | getboottime(&boot); | ||
269 | return boot.tv_sec + sinceboot; | ||
270 | } | ||
271 | |||
272 | static inline time_t get_expiry(char **bpp) | 267 | static inline time_t get_expiry(char **bpp) |
273 | { | 268 | { |
274 | int rv; | 269 | int rv; |
diff --git a/include/linux/sunrpc/gss_api.h b/include/linux/sunrpc/gss_api.h index 161463e59624..1f911ccb2a75 100644 --- a/include/linux/sunrpc/gss_api.h +++ b/include/linux/sunrpc/gss_api.h | |||
@@ -151,6 +151,8 @@ struct gss_api_mech *gss_mech_get_by_pseudoflavor(u32); | |||
151 | /* Fill in an array with a list of supported pseudoflavors */ | 151 | /* Fill in an array with a list of supported pseudoflavors */ |
152 | int gss_mech_list_pseudoflavors(rpc_authflavor_t *, int); | 152 | int gss_mech_list_pseudoflavors(rpc_authflavor_t *, int); |
153 | 153 | ||
154 | struct gss_api_mech * gss_mech_get(struct gss_api_mech *); | ||
155 | |||
154 | /* For every successful gss_mech_get or gss_mech_get_by_* call there must be a | 156 | /* For every successful gss_mech_get or gss_mech_get_by_* call there must be a |
155 | * corresponding call to gss_mech_put. */ | 157 | * corresponding call to gss_mech_put. */ |
156 | void gss_mech_put(struct gss_api_mech *); | 158 | void gss_mech_put(struct gss_api_mech *); |
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 84ca436b76c2..6d870353674a 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
@@ -88,15 +88,6 @@ struct rpc_task { | |||
88 | tk_rebind_retry : 2; | 88 | tk_rebind_retry : 2; |
89 | }; | 89 | }; |
90 | 90 | ||
91 | /* support walking a list of tasks on a wait queue */ | ||
92 | #define task_for_each(task, pos, head) \ | ||
93 | list_for_each(pos, head) \ | ||
94 | if ((task=list_entry(pos, struct rpc_task, u.tk_wait.list)),1) | ||
95 | |||
96 | #define task_for_first(task, head) \ | ||
97 | if (!list_empty(head) && \ | ||
98 | ((task=list_entry((head)->next, struct rpc_task, u.tk_wait.list)),1)) | ||
99 | |||
100 | typedef void (*rpc_action)(struct rpc_task *); | 91 | typedef void (*rpc_action)(struct rpc_task *); |
101 | 92 | ||
102 | struct rpc_call_ops { | 93 | struct rpc_call_ops { |
@@ -238,7 +229,6 @@ struct rpc_task *rpc_wake_up_first(struct rpc_wait_queue *, | |||
238 | bool (*)(struct rpc_task *, void *), | 229 | bool (*)(struct rpc_task *, void *), |
239 | void *); | 230 | void *); |
240 | void rpc_wake_up_status(struct rpc_wait_queue *, int); | 231 | void rpc_wake_up_status(struct rpc_wait_queue *, int); |
241 | int rpc_queue_empty(struct rpc_wait_queue *); | ||
242 | void rpc_delay(struct rpc_task *, unsigned long); | 232 | void rpc_delay(struct rpc_task *, unsigned long); |
243 | void * rpc_malloc(struct rpc_task *, size_t); | 233 | void * rpc_malloc(struct rpc_task *, size_t); |
244 | void rpc_free(void *); | 234 | void rpc_free(void *); |
@@ -259,16 +249,6 @@ static inline int rpc_wait_for_completion_task(struct rpc_task *task) | |||
259 | return __rpc_wait_for_completion_task(task, NULL); | 249 | return __rpc_wait_for_completion_task(task, NULL); |
260 | } | 250 | } |
261 | 251 | ||
262 | static inline void rpc_task_set_priority(struct rpc_task *task, unsigned char prio) | ||
263 | { | ||
264 | task->tk_priority = prio - RPC_PRIORITY_LOW; | ||
265 | } | ||
266 | |||
267 | static inline int rpc_task_has_priority(struct rpc_task *task, unsigned char prio) | ||
268 | { | ||
269 | return (task->tk_priority + RPC_PRIORITY_LOW == prio); | ||
270 | } | ||
271 | |||
272 | #if defined(RPC_DEBUG) || defined (RPC_TRACEPOINTS) | 252 | #if defined(RPC_DEBUG) || defined (RPC_TRACEPOINTS) |
273 | static inline const char * rpc_qname(const struct rpc_wait_queue *q) | 253 | static inline const char * rpc_qname(const struct rpc_wait_queue *q) |
274 | { | 254 | { |
diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h index ff374ab30839..8d71d6577459 100644 --- a/include/linux/sunrpc/svcauth.h +++ b/include/linux/sunrpc/svcauth.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <linux/sunrpc/msg_prot.h> | 15 | #include <linux/sunrpc/msg_prot.h> |
16 | #include <linux/sunrpc/cache.h> | 16 | #include <linux/sunrpc/cache.h> |
17 | #include <linux/sunrpc/gss_api.h> | ||
17 | #include <linux/hash.h> | 18 | #include <linux/hash.h> |
18 | #include <linux/cred.h> | 19 | #include <linux/cred.h> |
19 | 20 | ||
@@ -23,13 +24,23 @@ struct svc_cred { | |||
23 | struct group_info *cr_group_info; | 24 | struct group_info *cr_group_info; |
24 | u32 cr_flavor; /* pseudoflavor */ | 25 | u32 cr_flavor; /* pseudoflavor */ |
25 | char *cr_principal; /* for gss */ | 26 | char *cr_principal; /* for gss */ |
27 | struct gss_api_mech *cr_gss_mech; | ||
26 | }; | 28 | }; |
27 | 29 | ||
30 | static inline void init_svc_cred(struct svc_cred *cred) | ||
31 | { | ||
32 | cred->cr_group_info = NULL; | ||
33 | cred->cr_principal = NULL; | ||
34 | cred->cr_gss_mech = NULL; | ||
35 | } | ||
36 | |||
28 | static inline void free_svc_cred(struct svc_cred *cred) | 37 | static inline void free_svc_cred(struct svc_cred *cred) |
29 | { | 38 | { |
30 | if (cred->cr_group_info) | 39 | if (cred->cr_group_info) |
31 | put_group_info(cred->cr_group_info); | 40 | put_group_info(cred->cr_group_info); |
32 | kfree(cred->cr_principal); | 41 | kfree(cred->cr_principal); |
42 | gss_mech_put(cred->cr_gss_mech); | ||
43 | init_svc_cred(cred); | ||
33 | } | 44 | } |
34 | 45 | ||
35 | struct svc_rqst; /* forward decl */ | 46 | struct svc_rqst; /* forward decl */ |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index d4e3f16d5e89..f73cabf59012 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -363,6 +363,7 @@ extern bool pm_wakeup_pending(void); | |||
363 | extern bool pm_get_wakeup_count(unsigned int *count, bool block); | 363 | extern bool pm_get_wakeup_count(unsigned int *count, bool block); |
364 | extern bool pm_save_wakeup_count(unsigned int count); | 364 | extern bool pm_save_wakeup_count(unsigned int count); |
365 | extern void pm_wakep_autosleep_enabled(bool set); | 365 | extern void pm_wakep_autosleep_enabled(bool set); |
366 | extern void pm_print_active_wakeup_sources(void); | ||
366 | 367 | ||
367 | static inline void lock_system_sleep(void) | 368 | static inline void lock_system_sleep(void) |
368 | { | 369 | { |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 1701ce4be746..d95cde5e257d 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/node.h> | 10 | #include <linux/node.h> |
11 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
12 | #include <linux/atomic.h> | 12 | #include <linux/atomic.h> |
13 | #include <linux/page-flags.h> | ||
13 | #include <asm/page.h> | 14 | #include <asm/page.h> |
14 | 15 | ||
15 | struct notifier_block; | 16 | struct notifier_block; |
@@ -19,10 +20,13 @@ struct bio; | |||
19 | #define SWAP_FLAG_PREFER 0x8000 /* set if swap priority specified */ | 20 | #define SWAP_FLAG_PREFER 0x8000 /* set if swap priority specified */ |
20 | #define SWAP_FLAG_PRIO_MASK 0x7fff | 21 | #define SWAP_FLAG_PRIO_MASK 0x7fff |
21 | #define SWAP_FLAG_PRIO_SHIFT 0 | 22 | #define SWAP_FLAG_PRIO_SHIFT 0 |
22 | #define SWAP_FLAG_DISCARD 0x10000 /* discard swap cluster after use */ | 23 | #define SWAP_FLAG_DISCARD 0x10000 /* enable discard for swap */ |
24 | #define SWAP_FLAG_DISCARD_ONCE 0x20000 /* discard swap area at swapon-time */ | ||
25 | #define SWAP_FLAG_DISCARD_PAGES 0x40000 /* discard page-clusters after use */ | ||
23 | 26 | ||
24 | #define SWAP_FLAGS_VALID (SWAP_FLAG_PRIO_MASK | SWAP_FLAG_PREFER | \ | 27 | #define SWAP_FLAGS_VALID (SWAP_FLAG_PRIO_MASK | SWAP_FLAG_PREFER | \ |
25 | SWAP_FLAG_DISCARD) | 28 | SWAP_FLAG_DISCARD | SWAP_FLAG_DISCARD_ONCE | \ |
29 | SWAP_FLAG_DISCARD_PAGES) | ||
26 | 30 | ||
27 | static inline int current_is_kswapd(void) | 31 | static inline int current_is_kswapd(void) |
28 | { | 32 | { |
@@ -146,14 +150,16 @@ struct swap_extent { | |||
146 | enum { | 150 | enum { |
147 | SWP_USED = (1 << 0), /* is slot in swap_info[] used? */ | 151 | SWP_USED = (1 << 0), /* is slot in swap_info[] used? */ |
148 | SWP_WRITEOK = (1 << 1), /* ok to write to this swap? */ | 152 | SWP_WRITEOK = (1 << 1), /* ok to write to this swap? */ |
149 | SWP_DISCARDABLE = (1 << 2), /* swapon+blkdev support discard */ | 153 | SWP_DISCARDABLE = (1 << 2), /* blkdev support discard */ |
150 | SWP_DISCARDING = (1 << 3), /* now discarding a free cluster */ | 154 | SWP_DISCARDING = (1 << 3), /* now discarding a free cluster */ |
151 | SWP_SOLIDSTATE = (1 << 4), /* blkdev seeks are cheap */ | 155 | SWP_SOLIDSTATE = (1 << 4), /* blkdev seeks are cheap */ |
152 | SWP_CONTINUED = (1 << 5), /* swap_map has count continuation */ | 156 | SWP_CONTINUED = (1 << 5), /* swap_map has count continuation */ |
153 | SWP_BLKDEV = (1 << 6), /* its a block device */ | 157 | SWP_BLKDEV = (1 << 6), /* its a block device */ |
154 | SWP_FILE = (1 << 7), /* set after swap_activate success */ | 158 | SWP_FILE = (1 << 7), /* set after swap_activate success */ |
159 | SWP_AREA_DISCARD = (1 << 8), /* single-time swap area discards */ | ||
160 | SWP_PAGE_DISCARD = (1 << 9), /* freed swap page-cluster discards */ | ||
155 | /* add others here before... */ | 161 | /* add others here before... */ |
156 | SWP_SCANNING = (1 << 8), /* refcount in scan_swap_map */ | 162 | SWP_SCANNING = (1 << 10), /* refcount in scan_swap_map */ |
157 | }; | 163 | }; |
158 | 164 | ||
159 | #define SWAP_CLUSTER_MAX 32UL | 165 | #define SWAP_CLUSTER_MAX 32UL |
@@ -233,8 +239,8 @@ extern unsigned long nr_free_pagecache_pages(void); | |||
233 | 239 | ||
234 | 240 | ||
235 | /* linux/mm/swap.c */ | 241 | /* linux/mm/swap.c */ |
236 | extern void __lru_cache_add(struct page *, enum lru_list lru); | 242 | extern void __lru_cache_add(struct page *); |
237 | extern void lru_cache_add_lru(struct page *, enum lru_list lru); | 243 | extern void lru_cache_add(struct page *); |
238 | extern void lru_add_page_tail(struct page *page, struct page *page_tail, | 244 | extern void lru_add_page_tail(struct page *page, struct page *page_tail, |
239 | struct lruvec *lruvec, struct list_head *head); | 245 | struct lruvec *lruvec, struct list_head *head); |
240 | extern void activate_page(struct page *); | 246 | extern void activate_page(struct page *); |
@@ -254,12 +260,14 @@ extern void add_page_to_unevictable_list(struct page *page); | |||
254 | */ | 260 | */ |
255 | static inline void lru_cache_add_anon(struct page *page) | 261 | static inline void lru_cache_add_anon(struct page *page) |
256 | { | 262 | { |
257 | __lru_cache_add(page, LRU_INACTIVE_ANON); | 263 | ClearPageActive(page); |
264 | __lru_cache_add(page); | ||
258 | } | 265 | } |
259 | 266 | ||
260 | static inline void lru_cache_add_file(struct page *page) | 267 | static inline void lru_cache_add_file(struct page *page) |
261 | { | 268 | { |
262 | __lru_cache_add(page, LRU_INACTIVE_FILE); | 269 | ClearPageActive(page); |
270 | __lru_cache_add(page); | ||
263 | } | 271 | } |
264 | 272 | ||
265 | /* linux/mm/vmscan.c */ | 273 | /* linux/mm/vmscan.c */ |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 5adbc33d1ab3..472120b4fac5 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -246,7 +246,6 @@ struct tcp_sock { | |||
246 | 246 | ||
247 | /* from STCP, retrans queue hinting */ | 247 | /* from STCP, retrans queue hinting */ |
248 | struct sk_buff* lost_skb_hint; | 248 | struct sk_buff* lost_skb_hint; |
249 | struct sk_buff *scoreboard_skb_hint; | ||
250 | struct sk_buff *retransmit_skb_hint; | 249 | struct sk_buff *retransmit_skb_hint; |
251 | 250 | ||
252 | struct sk_buff_head out_of_order_queue; /* Out of order segments go here */ | 251 | struct sk_buff_head out_of_order_queue; /* Out of order segments go here */ |
diff --git a/include/linux/tpm.h b/include/linux/tpm.h index fcb627ff8d3e..9a9051bb1a03 100644 --- a/include/linux/tpm.h +++ b/include/linux/tpm.h | |||
@@ -22,6 +22,8 @@ | |||
22 | #ifndef __LINUX_TPM_H__ | 22 | #ifndef __LINUX_TPM_H__ |
23 | #define __LINUX_TPM_H__ | 23 | #define __LINUX_TPM_H__ |
24 | 24 | ||
25 | #define TPM_DIGEST_SIZE 20 /* Max TPM v1.2 PCR size */ | ||
26 | |||
25 | /* | 27 | /* |
26 | * Chip num is this value or a valid tpm idx | 28 | * Chip num is this value or a valid tpm idx |
27 | */ | 29 | */ |
diff --git a/include/linux/vexpress.h b/include/linux/vexpress.h index ea7168a68081..617c01b8f74a 100644 --- a/include/linux/vexpress.h +++ b/include/linux/vexpress.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #define _LINUX_VEXPRESS_H | 15 | #define _LINUX_VEXPRESS_H |
16 | 16 | ||
17 | #include <linux/device.h> | 17 | #include <linux/device.h> |
18 | #include <linux/reboot.h> | ||
18 | 19 | ||
19 | #define VEXPRESS_SITE_MB 0 | 20 | #define VEXPRESS_SITE_MB 0 |
20 | #define VEXPRESS_SITE_DB1 1 | 21 | #define VEXPRESS_SITE_DB1 1 |
diff --git a/include/linux/virtio.h b/include/linux/virtio.h index 9ff8645b7e0b..36d36cc89329 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h | |||
@@ -34,13 +34,6 @@ struct virtqueue { | |||
34 | void *priv; | 34 | void *priv; |
35 | }; | 35 | }; |
36 | 36 | ||
37 | int virtqueue_add_buf(struct virtqueue *vq, | ||
38 | struct scatterlist sg[], | ||
39 | unsigned int out_num, | ||
40 | unsigned int in_num, | ||
41 | void *data, | ||
42 | gfp_t gfp); | ||
43 | |||
44 | int virtqueue_add_outbuf(struct virtqueue *vq, | 37 | int virtqueue_add_outbuf(struct virtqueue *vq, |
45 | struct scatterlist sg[], unsigned int num, | 38 | struct scatterlist sg[], unsigned int num, |
46 | void *data, | 39 | void *data, |
@@ -70,6 +63,10 @@ void virtqueue_disable_cb(struct virtqueue *vq); | |||
70 | 63 | ||
71 | bool virtqueue_enable_cb(struct virtqueue *vq); | 64 | bool virtqueue_enable_cb(struct virtqueue *vq); |
72 | 65 | ||
66 | unsigned virtqueue_enable_cb_prepare(struct virtqueue *vq); | ||
67 | |||
68 | bool virtqueue_poll(struct virtqueue *vq, unsigned); | ||
69 | |||
73 | bool virtqueue_enable_cb_delayed(struct virtqueue *vq); | 70 | bool virtqueue_enable_cb_delayed(struct virtqueue *vq); |
74 | 71 | ||
75 | void *virtqueue_detach_unused_buf(struct virtqueue *vq); | 72 | void *virtqueue_detach_unused_buf(struct virtqueue *vq); |
diff --git a/include/linux/virtio_ring.h b/include/linux/virtio_ring.h index ca3ad41c2c82..b300787af8e0 100644 --- a/include/linux/virtio_ring.h +++ b/include/linux/virtio_ring.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _LINUX_VIRTIO_RING_H | 1 | #ifndef _LINUX_VIRTIO_RING_H |
2 | #define _LINUX_VIRTIO_RING_H | 2 | #define _LINUX_VIRTIO_RING_H |
3 | 3 | ||
4 | #include <asm/barrier.h> | ||
4 | #include <linux/irqreturn.h> | 5 | #include <linux/irqreturn.h> |
5 | #include <uapi/linux/virtio_ring.h> | 6 | #include <uapi/linux/virtio_ring.h> |
6 | 7 | ||
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 7d5773a99f20..4b8a89189a29 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -10,12 +10,12 @@ | |||
10 | struct vm_area_struct; /* vma defining user mapping in mm_types.h */ | 10 | struct vm_area_struct; /* vma defining user mapping in mm_types.h */ |
11 | 11 | ||
12 | /* bits in flags of vmalloc's vm_struct below */ | 12 | /* bits in flags of vmalloc's vm_struct below */ |
13 | #define VM_IOREMAP 0x00000001 /* ioremap() and friends */ | 13 | #define VM_IOREMAP 0x00000001 /* ioremap() and friends */ |
14 | #define VM_ALLOC 0x00000002 /* vmalloc() */ | 14 | #define VM_ALLOC 0x00000002 /* vmalloc() */ |
15 | #define VM_MAP 0x00000004 /* vmap()ed pages */ | 15 | #define VM_MAP 0x00000004 /* vmap()ed pages */ |
16 | #define VM_USERMAP 0x00000008 /* suitable for remap_vmalloc_range */ | 16 | #define VM_USERMAP 0x00000008 /* suitable for remap_vmalloc_range */ |
17 | #define VM_VPAGES 0x00000010 /* buffer for pages was vmalloc'ed */ | 17 | #define VM_VPAGES 0x00000010 /* buffer for pages was vmalloc'ed */ |
18 | #define VM_UNLIST 0x00000020 /* vm_struct is not listed in vmlist */ | 18 | #define VM_UNINITIALIZED 0x00000020 /* vm_struct is not fully initialized */ |
19 | /* bits [20..32] reserved for arch specific ioremap internals */ | 19 | /* bits [20..32] reserved for arch specific ioremap internals */ |
20 | 20 | ||
21 | /* | 21 | /* |
@@ -82,6 +82,10 @@ extern void *vmap(struct page **pages, unsigned int count, | |||
82 | unsigned long flags, pgprot_t prot); | 82 | unsigned long flags, pgprot_t prot); |
83 | extern void vunmap(const void *addr); | 83 | extern void vunmap(const void *addr); |
84 | 84 | ||
85 | extern int remap_vmalloc_range_partial(struct vm_area_struct *vma, | ||
86 | unsigned long uaddr, void *kaddr, | ||
87 | unsigned long size); | ||
88 | |||
85 | extern int remap_vmalloc_range(struct vm_area_struct *vma, void *addr, | 89 | extern int remap_vmalloc_range(struct vm_area_struct *vma, void *addr, |
86 | unsigned long pgoff); | 90 | unsigned long pgoff); |
87 | void vmalloc_sync_all(void); | 91 | void vmalloc_sync_all(void); |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 623488fdc1f5..a0ed78ab54d7 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -303,6 +303,33 @@ enum { | |||
303 | WQ_CPU_INTENSIVE = 1 << 5, /* cpu instensive workqueue */ | 303 | WQ_CPU_INTENSIVE = 1 << 5, /* cpu instensive workqueue */ |
304 | WQ_SYSFS = 1 << 6, /* visible in sysfs, see wq_sysfs_register() */ | 304 | WQ_SYSFS = 1 << 6, /* visible in sysfs, see wq_sysfs_register() */ |
305 | 305 | ||
306 | /* | ||
307 | * Per-cpu workqueues are generally preferred because they tend to | ||
308 | * show better performance thanks to cache locality. Per-cpu | ||
309 | * workqueues exclude the scheduler from choosing the CPU to | ||
310 | * execute the worker threads, which has an unfortunate side effect | ||
311 | * of increasing power consumption. | ||
312 | * | ||
313 | * The scheduler considers a CPU idle if it doesn't have any task | ||
314 | * to execute and tries to keep idle cores idle to conserve power; | ||
315 | * however, for example, a per-cpu work item scheduled from an | ||
316 | * interrupt handler on an idle CPU will force the scheduler to | ||
317 | * excute the work item on that CPU breaking the idleness, which in | ||
318 | * turn may lead to more scheduling choices which are sub-optimal | ||
319 | * in terms of power consumption. | ||
320 | * | ||
321 | * Workqueues marked with WQ_POWER_EFFICIENT are per-cpu by default | ||
322 | * but become unbound if workqueue.power_efficient kernel param is | ||
323 | * specified. Per-cpu workqueues which are identified to | ||
324 | * contribute significantly to power-consumption are identified and | ||
325 | * marked with this flag and enabling the power_efficient mode | ||
326 | * leads to noticeable power saving at the cost of small | ||
327 | * performance disadvantage. | ||
328 | * | ||
329 | * http://thread.gmane.org/gmane.linux.kernel/1480396 | ||
330 | */ | ||
331 | WQ_POWER_EFFICIENT = 1 << 7, | ||
332 | |||
306 | __WQ_DRAINING = 1 << 16, /* internal: workqueue is draining */ | 333 | __WQ_DRAINING = 1 << 16, /* internal: workqueue is draining */ |
307 | __WQ_ORDERED = 1 << 17, /* internal: workqueue is ordered */ | 334 | __WQ_ORDERED = 1 << 17, /* internal: workqueue is ordered */ |
308 | 335 | ||
@@ -333,11 +360,19 @@ enum { | |||
333 | * | 360 | * |
334 | * system_freezable_wq is equivalent to system_wq except that it's | 361 | * system_freezable_wq is equivalent to system_wq except that it's |
335 | * freezable. | 362 | * freezable. |
363 | * | ||
364 | * *_power_efficient_wq are inclined towards saving power and converted | ||
365 | * into WQ_UNBOUND variants if 'wq_power_efficient' is enabled; otherwise, | ||
366 | * they are same as their non-power-efficient counterparts - e.g. | ||
367 | * system_power_efficient_wq is identical to system_wq if | ||
368 | * 'wq_power_efficient' is disabled. See WQ_POWER_EFFICIENT for more info. | ||
336 | */ | 369 | */ |
337 | extern struct workqueue_struct *system_wq; | 370 | extern struct workqueue_struct *system_wq; |
338 | extern struct workqueue_struct *system_long_wq; | 371 | extern struct workqueue_struct *system_long_wq; |
339 | extern struct workqueue_struct *system_unbound_wq; | 372 | extern struct workqueue_struct *system_unbound_wq; |
340 | extern struct workqueue_struct *system_freezable_wq; | 373 | extern struct workqueue_struct *system_freezable_wq; |
374 | extern struct workqueue_struct *system_power_efficient_wq; | ||
375 | extern struct workqueue_struct *system_freezable_power_efficient_wq; | ||
341 | 376 | ||
342 | static inline struct workqueue_struct * __deprecated __system_nrt_wq(void) | 377 | static inline struct workqueue_struct * __deprecated __system_nrt_wq(void) |
343 | { | 378 | { |
@@ -410,11 +445,12 @@ __alloc_workqueue_key(const char *fmt, unsigned int flags, int max_active, | |||
410 | alloc_workqueue(fmt, WQ_UNBOUND | __WQ_ORDERED | (flags), 1, ##args) | 445 | alloc_workqueue(fmt, WQ_UNBOUND | __WQ_ORDERED | (flags), 1, ##args) |
411 | 446 | ||
412 | #define create_workqueue(name) \ | 447 | #define create_workqueue(name) \ |
413 | alloc_workqueue((name), WQ_MEM_RECLAIM, 1) | 448 | alloc_workqueue("%s", WQ_MEM_RECLAIM, 1, (name)) |
414 | #define create_freezable_workqueue(name) \ | 449 | #define create_freezable_workqueue(name) \ |
415 | alloc_workqueue((name), WQ_FREEZABLE | WQ_UNBOUND | WQ_MEM_RECLAIM, 1) | 450 | alloc_workqueue("%s", WQ_FREEZABLE | WQ_UNBOUND | WQ_MEM_RECLAIM, \ |
451 | 1, (name)) | ||
416 | #define create_singlethread_workqueue(name) \ | 452 | #define create_singlethread_workqueue(name) \ |
417 | alloc_workqueue((name), WQ_UNBOUND | WQ_MEM_RECLAIM, 1) | 453 | alloc_workqueue("%s", WQ_UNBOUND | WQ_MEM_RECLAIM, 1, (name)) |
418 | 454 | ||
419 | extern void destroy_workqueue(struct workqueue_struct *wq); | 455 | extern void destroy_workqueue(struct workqueue_struct *wq); |
420 | 456 | ||
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index abfe11787af3..4e198ca1f685 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -47,11 +47,16 @@ enum wb_reason { | |||
47 | WB_REASON_LAPTOP_TIMER, | 47 | WB_REASON_LAPTOP_TIMER, |
48 | WB_REASON_FREE_MORE_MEM, | 48 | WB_REASON_FREE_MORE_MEM, |
49 | WB_REASON_FS_FREE_SPACE, | 49 | WB_REASON_FS_FREE_SPACE, |
50 | /* | ||
51 | * There is no bdi forker thread any more and works are done | ||
52 | * by emergency worker, however, this is TPs userland visible | ||
53 | * and we'll be exposing exactly the same information, | ||
54 | * so it has a mismatch name. | ||
55 | */ | ||
50 | WB_REASON_FORKER_THREAD, | 56 | WB_REASON_FORKER_THREAD, |
51 | 57 | ||
52 | WB_REASON_MAX, | 58 | WB_REASON_MAX, |
53 | }; | 59 | }; |
54 | extern const char *wb_reason_name[]; | ||
55 | 60 | ||
56 | /* | 61 | /* |
57 | * A control structure which tells the writeback code what to do. These are | 62 | * A control structure which tells the writeback code what to do. These are |
@@ -95,7 +100,6 @@ int try_to_writeback_inodes_sb_nr(struct super_block *, unsigned long nr, | |||
95 | void sync_inodes_sb(struct super_block *); | 100 | void sync_inodes_sb(struct super_block *); |
96 | long writeback_inodes_wb(struct bdi_writeback *wb, long nr_pages, | 101 | long writeback_inodes_wb(struct bdi_writeback *wb, long nr_pages, |
97 | enum wb_reason reason); | 102 | enum wb_reason reason); |
98 | long wb_do_writeback(struct bdi_writeback *wb, int force_wait); | ||
99 | void wakeup_flusher_threads(long nr_pages, enum wb_reason reason); | 103 | void wakeup_flusher_threads(long nr_pages, enum wb_reason reason); |
100 | void inode_wait_for_writeback(struct inode *inode); | 104 | void inode_wait_for_writeback(struct inode *inode); |
101 | 105 | ||
diff --git a/include/linux/zbud.h b/include/linux/zbud.h new file mode 100644 index 000000000000..2571a5cfa5fc --- /dev/null +++ b/include/linux/zbud.h | |||
@@ -0,0 +1,22 @@ | |||
1 | #ifndef _ZBUD_H_ | ||
2 | #define _ZBUD_H_ | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | struct zbud_pool; | ||
7 | |||
8 | struct zbud_ops { | ||
9 | int (*evict)(struct zbud_pool *pool, unsigned long handle); | ||
10 | }; | ||
11 | |||
12 | struct zbud_pool *zbud_create_pool(gfp_t gfp, struct zbud_ops *ops); | ||
13 | void zbud_destroy_pool(struct zbud_pool *pool); | ||
14 | int zbud_alloc(struct zbud_pool *pool, int size, gfp_t gfp, | ||
15 | unsigned long *handle); | ||
16 | void zbud_free(struct zbud_pool *pool, unsigned long handle); | ||
17 | int zbud_reclaim_page(struct zbud_pool *pool, unsigned int retries); | ||
18 | void *zbud_map(struct zbud_pool *pool, unsigned long handle); | ||
19 | void zbud_unmap(struct zbud_pool *pool, unsigned long handle); | ||
20 | u64 zbud_get_pool_size(struct zbud_pool *pool); | ||
21 | |||
22 | #endif /* _ZBUD_H_ */ | ||