diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2011-02-15 04:24:31 -0500 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2011-02-15 04:24:31 -0500 |
| commit | 0a9d59a2461477bd9ed143c01af9df3f8f00fa81 (patch) | |
| tree | df997d1cfb0786427a0df1fbd6f0640fa4248cf4 /include/linux | |
| parent | a23ce6da9677d245aa0aadc99f4197030350ab54 (diff) | |
| parent | 795abaf1e4e188c4171e3cd3dbb11a9fcacaf505 (diff) | |
Merge branch 'master' into for-next
Diffstat (limited to 'include/linux')
116 files changed, 1485 insertions, 521 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 2296d8b1931f..b0ada6f37dd6 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | header-y += byteorder/ | 1 | header-y += byteorder/ |
| 2 | header-y += can/ | 2 | header-y += can/ |
| 3 | header-y += caif/ | ||
| 3 | header-y += dvb/ | 4 | header-y += dvb/ |
| 4 | header-y += hdlc/ | 5 | header-y += hdlc/ |
| 5 | header-y += isdn/ | 6 | header-y += isdn/ |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 67c91b4418b0..a2e910e01293 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -306,9 +306,6 @@ extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, | |||
| 306 | u32 *mask, u32 req); | 306 | u32 *mask, u32 req); |
| 307 | extern void acpi_early_init(void); | 307 | extern void acpi_early_init(void); |
| 308 | 308 | ||
| 309 | int acpi_os_map_generic_address(struct acpi_generic_address *addr); | ||
| 310 | void acpi_os_unmap_generic_address(struct acpi_generic_address *addr); | ||
| 311 | |||
| 312 | #else /* !CONFIG_ACPI */ | 309 | #else /* !CONFIG_ACPI */ |
| 313 | 310 | ||
| 314 | #define acpi_disabled 1 | 311 | #define acpi_disabled 1 |
| @@ -352,4 +349,14 @@ static inline int acpi_table_parse(char *id, | |||
| 352 | return -1; | 349 | return -1; |
| 353 | } | 350 | } |
| 354 | #endif /* !CONFIG_ACPI */ | 351 | #endif /* !CONFIG_ACPI */ |
| 352 | |||
| 353 | #ifdef CONFIG_ACPI_SLEEP | ||
| 354 | int suspend_nvs_register(unsigned long start, unsigned long size); | ||
| 355 | #else | ||
| 356 | static inline int suspend_nvs_register(unsigned long a, unsigned long b) | ||
| 357 | { | ||
| 358 | return 0; | ||
| 359 | } | ||
| 360 | #endif | ||
| 361 | |||
| 355 | #endif /*_LINUX_ACPI_H*/ | 362 | #endif /*_LINUX_ACPI_H*/ |
diff --git a/include/linux/acpi_io.h b/include/linux/acpi_io.h new file mode 100644 index 000000000000..7180013a4a3a --- /dev/null +++ b/include/linux/acpi_io.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #ifndef _ACPI_IO_H_ | ||
| 2 | #define _ACPI_IO_H_ | ||
| 3 | |||
| 4 | #include <linux/io.h> | ||
| 5 | #include <acpi/acpi.h> | ||
| 6 | |||
| 7 | static inline void __iomem *acpi_os_ioremap(acpi_physical_address phys, | ||
| 8 | acpi_size size) | ||
| 9 | { | ||
| 10 | return ioremap_cache(phys, size); | ||
| 11 | } | ||
| 12 | |||
| 13 | int acpi_os_map_generic_address(struct acpi_generic_address *addr); | ||
| 14 | void acpi_os_unmap_generic_address(struct acpi_generic_address *addr); | ||
| 15 | |||
| 16 | #endif | ||
diff --git a/include/linux/amba/pl08x.h b/include/linux/amba/pl08x.h index 521a0f8974ac..3111385b8ca7 100644 --- a/include/linux/amba/pl08x.h +++ b/include/linux/amba/pl08x.h | |||
| @@ -12,7 +12,6 @@ | |||
| 12 | * | 12 | * |
| 13 | * Please credit ARM.com | 13 | * Please credit ARM.com |
| 14 | * Documentation: ARM DDI 0196D | 14 | * Documentation: ARM DDI 0196D |
| 15 | * | ||
| 16 | */ | 15 | */ |
| 17 | 16 | ||
| 18 | #ifndef AMBA_PL08X_H | 17 | #ifndef AMBA_PL08X_H |
| @@ -22,6 +21,15 @@ | |||
| 22 | #include <linux/dmaengine.h> | 21 | #include <linux/dmaengine.h> |
| 23 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
| 24 | 23 | ||
| 24 | struct pl08x_lli; | ||
| 25 | struct pl08x_driver_data; | ||
| 26 | |||
| 27 | /* Bitmasks for selecting AHB ports for DMA transfers */ | ||
| 28 | enum { | ||
| 29 | PL08X_AHB1 = (1 << 0), | ||
| 30 | PL08X_AHB2 = (1 << 1) | ||
| 31 | }; | ||
| 32 | |||
| 25 | /** | 33 | /** |
| 26 | * struct pl08x_channel_data - data structure to pass info between | 34 | * struct pl08x_channel_data - data structure to pass info between |
| 27 | * platform and PL08x driver regarding channel configuration | 35 | * platform and PL08x driver regarding channel configuration |
| @@ -46,8 +54,10 @@ | |||
| 46 | * @circular_buffer: whether the buffer passed in is circular and | 54 | * @circular_buffer: whether the buffer passed in is circular and |
| 47 | * shall simply be looped round round (like a record baby round | 55 | * shall simply be looped round round (like a record baby round |
| 48 | * round round round) | 56 | * round round round) |
| 49 | * @single: the device connected to this channel will request single | 57 | * @single: the device connected to this channel will request single DMA |
| 50 | * DMA transfers, not bursts. (Bursts are default.) | 58 | * transfers, not bursts. (Bursts are default.) |
| 59 | * @periph_buses: the device connected to this channel is accessible via | ||
| 60 | * these buses (use PL08X_AHB1 | PL08X_AHB2). | ||
| 51 | */ | 61 | */ |
| 52 | struct pl08x_channel_data { | 62 | struct pl08x_channel_data { |
| 53 | char *bus_id; | 63 | char *bus_id; |
| @@ -55,10 +65,10 @@ struct pl08x_channel_data { | |||
| 55 | int max_signal; | 65 | int max_signal; |
| 56 | u32 muxval; | 66 | u32 muxval; |
| 57 | u32 cctl; | 67 | u32 cctl; |
| 58 | u32 ccfg; | ||
| 59 | dma_addr_t addr; | 68 | dma_addr_t addr; |
| 60 | bool circular_buffer; | 69 | bool circular_buffer; |
| 61 | bool single; | 70 | bool single; |
| 71 | u8 periph_buses; | ||
| 62 | }; | 72 | }; |
| 63 | 73 | ||
| 64 | /** | 74 | /** |
| @@ -67,24 +77,23 @@ struct pl08x_channel_data { | |||
| 67 | * @addr: current address | 77 | * @addr: current address |
| 68 | * @maxwidth: the maximum width of a transfer on this bus | 78 | * @maxwidth: the maximum width of a transfer on this bus |
| 69 | * @buswidth: the width of this bus in bytes: 1, 2 or 4 | 79 | * @buswidth: the width of this bus in bytes: 1, 2 or 4 |
| 70 | * @fill_bytes: bytes required to fill to the next bus memory | 80 | * @fill_bytes: bytes required to fill to the next bus memory boundary |
| 71 | * boundary | ||
| 72 | */ | 81 | */ |
| 73 | struct pl08x_bus_data { | 82 | struct pl08x_bus_data { |
| 74 | dma_addr_t addr; | 83 | dma_addr_t addr; |
| 75 | u8 maxwidth; | 84 | u8 maxwidth; |
| 76 | u8 buswidth; | 85 | u8 buswidth; |
| 77 | u32 fill_bytes; | 86 | size_t fill_bytes; |
| 78 | }; | 87 | }; |
| 79 | 88 | ||
| 80 | /** | 89 | /** |
| 81 | * struct pl08x_phy_chan - holder for the physical channels | 90 | * struct pl08x_phy_chan - holder for the physical channels |
| 82 | * @id: physical index to this channel | 91 | * @id: physical index to this channel |
| 83 | * @lock: a lock to use when altering an instance of this struct | 92 | * @lock: a lock to use when altering an instance of this struct |
| 84 | * @signal: the physical signal (aka channel) serving this | 93 | * @signal: the physical signal (aka channel) serving this physical channel |
| 85 | * physical channel right now | 94 | * right now |
| 86 | * @serving: the virtual channel currently being served by this | 95 | * @serving: the virtual channel currently being served by this physical |
| 87 | * physical channel | 96 | * channel |
| 88 | */ | 97 | */ |
| 89 | struct pl08x_phy_chan { | 98 | struct pl08x_phy_chan { |
| 90 | unsigned int id; | 99 | unsigned int id; |
| @@ -92,11 +101,6 @@ struct pl08x_phy_chan { | |||
| 92 | spinlock_t lock; | 101 | spinlock_t lock; |
| 93 | int signal; | 102 | int signal; |
| 94 | struct pl08x_dma_chan *serving; | 103 | struct pl08x_dma_chan *serving; |
| 95 | u32 csrc; | ||
| 96 | u32 cdst; | ||
| 97 | u32 clli; | ||
| 98 | u32 cctl; | ||
| 99 | u32 ccfg; | ||
| 100 | }; | 104 | }; |
| 101 | 105 | ||
| 102 | /** | 106 | /** |
| @@ -108,26 +112,23 @@ struct pl08x_txd { | |||
| 108 | struct dma_async_tx_descriptor tx; | 112 | struct dma_async_tx_descriptor tx; |
| 109 | struct list_head node; | 113 | struct list_head node; |
| 110 | enum dma_data_direction direction; | 114 | enum dma_data_direction direction; |
| 111 | struct pl08x_bus_data srcbus; | 115 | dma_addr_t src_addr; |
| 112 | struct pl08x_bus_data dstbus; | 116 | dma_addr_t dst_addr; |
| 113 | int len; | 117 | size_t len; |
| 114 | dma_addr_t llis_bus; | 118 | dma_addr_t llis_bus; |
| 115 | void *llis_va; | 119 | struct pl08x_lli *llis_va; |
| 116 | struct pl08x_channel_data *cd; | 120 | /* Default cctl value for LLIs */ |
| 117 | bool active; | 121 | u32 cctl; |
| 118 | /* | 122 | /* |
| 119 | * Settings to be put into the physical channel when we | 123 | * Settings to be put into the physical channel when we |
| 120 | * trigger this txd | 124 | * trigger this txd. Other registers are in llis_va[0]. |
| 121 | */ | 125 | */ |
| 122 | u32 csrc; | 126 | u32 ccfg; |
| 123 | u32 cdst; | ||
| 124 | u32 clli; | ||
| 125 | u32 cctl; | ||
| 126 | }; | 127 | }; |
| 127 | 128 | ||
| 128 | /** | 129 | /** |
| 129 | * struct pl08x_dma_chan_state - holds the PL08x specific virtual | 130 | * struct pl08x_dma_chan_state - holds the PL08x specific virtual channel |
| 130 | * channel states | 131 | * states |
| 131 | * @PL08X_CHAN_IDLE: the channel is idle | 132 | * @PL08X_CHAN_IDLE: the channel is idle |
| 132 | * @PL08X_CHAN_RUNNING: the channel has allocated a physical transport | 133 | * @PL08X_CHAN_RUNNING: the channel has allocated a physical transport |
| 133 | * channel and is running a transfer on it | 134 | * channel and is running a transfer on it |
| @@ -147,6 +148,8 @@ enum pl08x_dma_chan_state { | |||
| 147 | * struct pl08x_dma_chan - this structure wraps a DMA ENGINE channel | 148 | * struct pl08x_dma_chan - this structure wraps a DMA ENGINE channel |
| 148 | * @chan: wrappped abstract channel | 149 | * @chan: wrappped abstract channel |
| 149 | * @phychan: the physical channel utilized by this channel, if there is one | 150 | * @phychan: the physical channel utilized by this channel, if there is one |
| 151 | * @phychan_hold: if non-zero, hold on to the physical channel even if we | ||
| 152 | * have no pending entries | ||
| 150 | * @tasklet: tasklet scheduled by the IRQ to handle actual work etc | 153 | * @tasklet: tasklet scheduled by the IRQ to handle actual work etc |
| 151 | * @name: name of channel | 154 | * @name: name of channel |
| 152 | * @cd: channel platform data | 155 | * @cd: channel platform data |
| @@ -154,53 +157,49 @@ enum pl08x_dma_chan_state { | |||
| 154 | * @runtime_direction: current direction of this channel according to | 157 | * @runtime_direction: current direction of this channel according to |
| 155 | * runtime config | 158 | * runtime config |
| 156 | * @lc: last completed transaction on this channel | 159 | * @lc: last completed transaction on this channel |
| 157 | * @desc_list: queued transactions pending on this channel | 160 | * @pend_list: queued transactions pending on this channel |
| 158 | * @at: active transaction on this channel | 161 | * @at: active transaction on this channel |
| 159 | * @lockflags: sometimes we let a lock last between two function calls, | ||
| 160 | * especially prep/submit, and then we need to store the IRQ flags | ||
| 161 | * in the channel state, here | ||
| 162 | * @lock: a lock for this channel data | 162 | * @lock: a lock for this channel data |
| 163 | * @host: a pointer to the host (internal use) | 163 | * @host: a pointer to the host (internal use) |
| 164 | * @state: whether the channel is idle, paused, running etc | 164 | * @state: whether the channel is idle, paused, running etc |
| 165 | * @slave: whether this channel is a device (slave) or for memcpy | 165 | * @slave: whether this channel is a device (slave) or for memcpy |
| 166 | * @waiting: a TX descriptor on this channel which is waiting for | 166 | * @waiting: a TX descriptor on this channel which is waiting for a physical |
| 167 | * a physical channel to become available | 167 | * channel to become available |
| 168 | */ | 168 | */ |
| 169 | struct pl08x_dma_chan { | 169 | struct pl08x_dma_chan { |
| 170 | struct dma_chan chan; | 170 | struct dma_chan chan; |
| 171 | struct pl08x_phy_chan *phychan; | 171 | struct pl08x_phy_chan *phychan; |
| 172 | int phychan_hold; | ||
| 172 | struct tasklet_struct tasklet; | 173 | struct tasklet_struct tasklet; |
| 173 | char *name; | 174 | char *name; |
| 174 | struct pl08x_channel_data *cd; | 175 | struct pl08x_channel_data *cd; |
| 175 | dma_addr_t runtime_addr; | 176 | dma_addr_t runtime_addr; |
| 176 | enum dma_data_direction runtime_direction; | 177 | enum dma_data_direction runtime_direction; |
| 177 | atomic_t last_issued; | ||
| 178 | dma_cookie_t lc; | 178 | dma_cookie_t lc; |
| 179 | struct list_head desc_list; | 179 | struct list_head pend_list; |
| 180 | struct pl08x_txd *at; | 180 | struct pl08x_txd *at; |
| 181 | unsigned long lockflags; | ||
| 182 | spinlock_t lock; | 181 | spinlock_t lock; |
| 183 | void *host; | 182 | struct pl08x_driver_data *host; |
| 184 | enum pl08x_dma_chan_state state; | 183 | enum pl08x_dma_chan_state state; |
| 185 | bool slave; | 184 | bool slave; |
| 186 | struct pl08x_txd *waiting; | 185 | struct pl08x_txd *waiting; |
| 187 | }; | 186 | }; |
| 188 | 187 | ||
| 189 | /** | 188 | /** |
| 190 | * struct pl08x_platform_data - the platform configuration for the | 189 | * struct pl08x_platform_data - the platform configuration for the PL08x |
| 191 | * PL08x PrimeCells. | 190 | * PrimeCells. |
| 192 | * @slave_channels: the channels defined for the different devices on the | 191 | * @slave_channels: the channels defined for the different devices on the |
| 193 | * platform, all inclusive, including multiplexed channels. The available | 192 | * platform, all inclusive, including multiplexed channels. The available |
| 194 | * physical channels will be multiplexed around these signals as they | 193 | * physical channels will be multiplexed around these signals as they are |
| 195 | * are requested, just enumerate all possible channels. | 194 | * requested, just enumerate all possible channels. |
| 196 | * @get_signal: request a physical signal to be used for a DMA | 195 | * @get_signal: request a physical signal to be used for a DMA transfer |
| 197 | * transfer immediately: if there is some multiplexing or similar blocking | 196 | * immediately: if there is some multiplexing or similar blocking the use |
| 198 | * the use of the channel the transfer can be denied by returning | 197 | * of the channel the transfer can be denied by returning less than zero, |
| 199 | * less than zero, else it returns the allocated signal number | 198 | * else it returns the allocated signal number |
| 200 | * @put_signal: indicate to the platform that this physical signal is not | 199 | * @put_signal: indicate to the platform that this physical signal is not |
| 201 | * running any DMA transfer and multiplexing can be recycled | 200 | * running any DMA transfer and multiplexing can be recycled |
| 202 | * @bus_bit_lli: Bit[0] of the address indicated which AHB bus master the | 201 | * @lli_buses: buses which LLIs can be fetched from: PL08X_AHB1 | PL08X_AHB2 |
| 203 | * LLI addresses are on 0/1 Master 1/2. | 202 | * @mem_buses: buses which memory can be accessed from: PL08X_AHB1 | PL08X_AHB2 |
| 204 | */ | 203 | */ |
| 205 | struct pl08x_platform_data { | 204 | struct pl08x_platform_data { |
| 206 | struct pl08x_channel_data *slave_channels; | 205 | struct pl08x_channel_data *slave_channels; |
| @@ -208,6 +207,8 @@ struct pl08x_platform_data { | |||
| 208 | struct pl08x_channel_data memcpy_channel; | 207 | struct pl08x_channel_data memcpy_channel; |
| 209 | int (*get_signal)(struct pl08x_dma_chan *); | 208 | int (*get_signal)(struct pl08x_dma_chan *); |
| 210 | void (*put_signal)(struct pl08x_dma_chan *); | 209 | void (*put_signal)(struct pl08x_dma_chan *); |
| 210 | u8 lli_buses; | ||
| 211 | u8 mem_buses; | ||
| 211 | }; | 212 | }; |
| 212 | 213 | ||
| 213 | #ifdef CONFIG_AMBA_PL08X | 214 | #ifdef CONFIG_AMBA_PL08X |
diff --git a/include/linux/auto_fs4.h b/include/linux/auto_fs4.h index 8b49ac48a5b7..e02982fa2953 100644 --- a/include/linux/auto_fs4.h +++ b/include/linux/auto_fs4.h | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | #define AUTOFS_MIN_PROTO_VERSION 3 | 24 | #define AUTOFS_MIN_PROTO_VERSION 3 |
| 25 | #define AUTOFS_MAX_PROTO_VERSION 5 | 25 | #define AUTOFS_MAX_PROTO_VERSION 5 |
| 26 | 26 | ||
| 27 | #define AUTOFS_PROTO_SUBVERSION 1 | 27 | #define AUTOFS_PROTO_SUBVERSION 2 |
| 28 | 28 | ||
| 29 | /* Mask for expire behaviour */ | 29 | /* Mask for expire behaviour */ |
| 30 | #define AUTOFS_EXP_IMMEDIATE 1 | 30 | #define AUTOFS_EXP_IMMEDIATE 1 |
diff --git a/include/linux/caif/Kbuild b/include/linux/caif/Kbuild new file mode 100644 index 000000000000..a9cf250689dc --- /dev/null +++ b/include/linux/caif/Kbuild | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | header-y += caif_socket.h | ||
| 2 | header-y += if_caif.h | ||
diff --git a/include/linux/compaction.h b/include/linux/compaction.h index 5ac51552d908..dfa2ed4c0d26 100644 --- a/include/linux/compaction.h +++ b/include/linux/compaction.h | |||
| @@ -11,6 +11,9 @@ | |||
| 11 | /* The full zone was compacted */ | 11 | /* The full zone was compacted */ |
| 12 | #define COMPACT_COMPLETE 3 | 12 | #define COMPACT_COMPLETE 3 |
| 13 | 13 | ||
| 14 | #define COMPACT_MODE_DIRECT_RECLAIM 0 | ||
| 15 | #define COMPACT_MODE_KSWAPD 1 | ||
| 16 | |||
| 14 | #ifdef CONFIG_COMPACTION | 17 | #ifdef CONFIG_COMPACTION |
| 15 | extern int sysctl_compact_memory; | 18 | extern int sysctl_compact_memory; |
| 16 | extern int sysctl_compaction_handler(struct ctl_table *table, int write, | 19 | extern int sysctl_compaction_handler(struct ctl_table *table, int write, |
| @@ -21,7 +24,12 @@ extern int sysctl_extfrag_handler(struct ctl_table *table, int write, | |||
| 21 | 24 | ||
| 22 | extern int fragmentation_index(struct zone *zone, unsigned int order); | 25 | extern int fragmentation_index(struct zone *zone, unsigned int order); |
| 23 | extern unsigned long try_to_compact_pages(struct zonelist *zonelist, | 26 | extern unsigned long try_to_compact_pages(struct zonelist *zonelist, |
| 24 | int order, gfp_t gfp_mask, nodemask_t *mask); | 27 | int order, gfp_t gfp_mask, nodemask_t *mask, |
| 28 | bool sync); | ||
| 29 | extern unsigned long compaction_suitable(struct zone *zone, int order); | ||
| 30 | extern unsigned long compact_zone_order(struct zone *zone, int order, | ||
| 31 | gfp_t gfp_mask, bool sync, | ||
| 32 | int compact_mode); | ||
| 25 | 33 | ||
| 26 | /* Do not skip compaction more than 64 times */ | 34 | /* Do not skip compaction more than 64 times */ |
| 27 | #define COMPACT_MAX_DEFER_SHIFT 6 | 35 | #define COMPACT_MAX_DEFER_SHIFT 6 |
| @@ -54,7 +62,20 @@ static inline bool compaction_deferred(struct zone *zone) | |||
| 54 | 62 | ||
| 55 | #else | 63 | #else |
| 56 | static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, | 64 | static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, |
| 57 | int order, gfp_t gfp_mask, nodemask_t *nodemask) | 65 | int order, gfp_t gfp_mask, nodemask_t *nodemask, |
| 66 | bool sync) | ||
| 67 | { | ||
| 68 | return COMPACT_CONTINUE; | ||
| 69 | } | ||
| 70 | |||
| 71 | static inline unsigned long compaction_suitable(struct zone *zone, int order) | ||
| 72 | { | ||
| 73 | return COMPACT_SKIPPED; | ||
| 74 | } | ||
| 75 | |||
| 76 | static inline unsigned long compact_zone_order(struct zone *zone, int order, | ||
| 77 | gfp_t gfp_mask, bool sync, | ||
| 78 | int compact_mode) | ||
| 58 | { | 79 | { |
| 59 | return COMPACT_CONTINUE; | 80 | return COMPACT_CONTINUE; |
| 60 | } | 81 | } |
diff --git a/include/linux/console.h b/include/linux/console.h index 9774fe6a1a97..7453cfd593c8 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
| @@ -139,9 +139,9 @@ extern int update_console_cmdline(char *name, int idx, char *name_new, int idx_n | |||
| 139 | extern void register_console(struct console *); | 139 | extern void register_console(struct console *); |
| 140 | extern int unregister_console(struct console *); | 140 | extern int unregister_console(struct console *); |
| 141 | extern struct console *console_drivers; | 141 | extern struct console *console_drivers; |
| 142 | extern void acquire_console_sem(void); | 142 | extern void console_lock(void); |
| 143 | extern int try_acquire_console_sem(void); | 143 | extern int console_trylock(void); |
| 144 | extern void release_console_sem(void); | 144 | extern void console_unlock(void); |
| 145 | extern void console_conditional_schedule(void); | 145 | extern void console_conditional_schedule(void); |
| 146 | extern void console_unblank(void); | 146 | extern void console_unblank(void); |
| 147 | extern struct tty_driver *console_device(int *); | 147 | extern struct tty_driver *console_device(int *); |
diff --git a/include/linux/cper.h b/include/linux/cper.h index bf972f81e2a7..3104aaff5dd0 100644 --- a/include/linux/cper.h +++ b/include/linux/cper.h | |||
| @@ -39,10 +39,12 @@ | |||
| 39 | * Severity difinition for error_severity in struct cper_record_header | 39 | * Severity difinition for error_severity in struct cper_record_header |
| 40 | * and section_severity in struct cper_section_descriptor | 40 | * and section_severity in struct cper_section_descriptor |
| 41 | */ | 41 | */ |
| 42 | #define CPER_SEV_RECOVERABLE 0x0 | 42 | enum { |
| 43 | #define CPER_SEV_FATAL 0x1 | 43 | CPER_SEV_RECOVERABLE, |
| 44 | #define CPER_SEV_CORRECTED 0x2 | 44 | CPER_SEV_FATAL, |
| 45 | #define CPER_SEV_INFORMATIONAL 0x3 | 45 | CPER_SEV_CORRECTED, |
| 46 | CPER_SEV_INFORMATIONAL, | ||
| 47 | }; | ||
| 46 | 48 | ||
| 47 | /* | 49 | /* |
| 48 | * Validation bits difinition for validation_bits in struct | 50 | * Validation bits difinition for validation_bits in struct |
| @@ -201,6 +203,47 @@ | |||
| 201 | UUID_LE(0x036F84E1, 0x7F37, 0x428c, 0xA7, 0x9E, 0x57, 0x5F, \ | 203 | UUID_LE(0x036F84E1, 0x7F37, 0x428c, 0xA7, 0x9E, 0x57, 0x5F, \ |
| 202 | 0xDF, 0xAA, 0x84, 0xEC) | 204 | 0xDF, 0xAA, 0x84, 0xEC) |
| 203 | 205 | ||
| 206 | #define CPER_PROC_VALID_TYPE 0x0001 | ||
| 207 | #define CPER_PROC_VALID_ISA 0x0002 | ||
| 208 | #define CPER_PROC_VALID_ERROR_TYPE 0x0004 | ||
| 209 | #define CPER_PROC_VALID_OPERATION 0x0008 | ||
| 210 | #define CPER_PROC_VALID_FLAGS 0x0010 | ||
| 211 | #define CPER_PROC_VALID_LEVEL 0x0020 | ||
| 212 | #define CPER_PROC_VALID_VERSION 0x0040 | ||
| 213 | #define CPER_PROC_VALID_BRAND_INFO 0x0080 | ||
| 214 | #define CPER_PROC_VALID_ID 0x0100 | ||
| 215 | #define CPER_PROC_VALID_TARGET_ADDRESS 0x0200 | ||
| 216 | #define CPER_PROC_VALID_REQUESTOR_ID 0x0400 | ||
| 217 | #define CPER_PROC_VALID_RESPONDER_ID 0x0800 | ||
| 218 | #define CPER_PROC_VALID_IP 0x1000 | ||
| 219 | |||
| 220 | #define CPER_MEM_VALID_ERROR_STATUS 0x0001 | ||
| 221 | #define CPER_MEM_VALID_PHYSICAL_ADDRESS 0x0002 | ||
| 222 | #define CPER_MEM_VALID_PHYSICAL_ADDRESS_MASK 0x0004 | ||
| 223 | #define CPER_MEM_VALID_NODE 0x0008 | ||
| 224 | #define CPER_MEM_VALID_CARD 0x0010 | ||
| 225 | #define CPER_MEM_VALID_MODULE 0x0020 | ||
| 226 | #define CPER_MEM_VALID_BANK 0x0040 | ||
| 227 | #define CPER_MEM_VALID_DEVICE 0x0080 | ||
| 228 | #define CPER_MEM_VALID_ROW 0x0100 | ||
| 229 | #define CPER_MEM_VALID_COLUMN 0x0200 | ||
| 230 | #define CPER_MEM_VALID_BIT_POSITION 0x0400 | ||
| 231 | #define CPER_MEM_VALID_REQUESTOR_ID 0x0800 | ||
| 232 | #define CPER_MEM_VALID_RESPONDER_ID 0x1000 | ||
| 233 | #define CPER_MEM_VALID_TARGET_ID 0x2000 | ||
| 234 | #define CPER_MEM_VALID_ERROR_TYPE 0x4000 | ||
| 235 | |||
| 236 | #define CPER_PCIE_VALID_PORT_TYPE 0x0001 | ||
| 237 | #define CPER_PCIE_VALID_VERSION 0x0002 | ||
| 238 | #define CPER_PCIE_VALID_COMMAND_STATUS 0x0004 | ||
| 239 | #define CPER_PCIE_VALID_DEVICE_ID 0x0008 | ||
| 240 | #define CPER_PCIE_VALID_SERIAL_NUMBER 0x0010 | ||
| 241 | #define CPER_PCIE_VALID_BRIDGE_CONTROL_STATUS 0x0020 | ||
| 242 | #define CPER_PCIE_VALID_CAPABILITY 0x0040 | ||
| 243 | #define CPER_PCIE_VALID_AER_INFO 0x0080 | ||
| 244 | |||
| 245 | #define CPER_PCIE_SLOT_SHIFT 3 | ||
| 246 | |||
| 204 | /* | 247 | /* |
| 205 | * All tables and structs must be byte-packed to match CPER | 248 | * All tables and structs must be byte-packed to match CPER |
| 206 | * specification, since the tables are provided by the system BIOS | 249 | * specification, since the tables are provided by the system BIOS |
| @@ -306,6 +349,41 @@ struct cper_sec_mem_err { | |||
| 306 | __u8 error_type; | 349 | __u8 error_type; |
| 307 | }; | 350 | }; |
| 308 | 351 | ||
| 352 | struct cper_sec_pcie { | ||
| 353 | __u64 validation_bits; | ||
| 354 | __u32 port_type; | ||
| 355 | struct { | ||
| 356 | __u8 minor; | ||
| 357 | __u8 major; | ||
| 358 | __u8 reserved[2]; | ||
| 359 | } version; | ||
| 360 | __u16 command; | ||
| 361 | __u16 status; | ||
| 362 | __u32 reserved; | ||
| 363 | struct { | ||
| 364 | __u16 vendor_id; | ||
| 365 | __u16 device_id; | ||
| 366 | __u8 class_code[3]; | ||
| 367 | __u8 function; | ||
| 368 | __u8 device; | ||
| 369 | __u16 segment; | ||
| 370 | __u8 bus; | ||
| 371 | __u8 secondary_bus; | ||
| 372 | __u16 slot; | ||
| 373 | __u8 reserved; | ||
| 374 | } device_id; | ||
| 375 | struct { | ||
| 376 | __u32 lower; | ||
| 377 | __u32 upper; | ||
| 378 | } serial_number; | ||
| 379 | struct { | ||
| 380 | __u16 secondary_status; | ||
| 381 | __u16 control; | ||
| 382 | } bridge; | ||
| 383 | __u8 capability[60]; | ||
| 384 | __u8 aer_info[96]; | ||
| 385 | }; | ||
| 386 | |||
| 309 | /* Reset to default packing */ | 387 | /* Reset to default packing */ |
| 310 | #pragma pack() | 388 | #pragma pack() |
| 311 | 389 | ||
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 1be416bbbb82..36719ead50e8 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
| @@ -47,13 +47,7 @@ struct cpuidle_state { | |||
| 47 | 47 | ||
| 48 | /* Idle State Flags */ | 48 | /* Idle State Flags */ |
| 49 | #define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */ | 49 | #define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */ |
| 50 | #define CPUIDLE_FLAG_CHECK_BM (0x02) /* BM activity will exit state */ | ||
| 51 | #define CPUIDLE_FLAG_POLL (0x10) /* no latency, no savings */ | ||
| 52 | #define CPUIDLE_FLAG_SHALLOW (0x20) /* low latency, minimal savings */ | ||
| 53 | #define CPUIDLE_FLAG_BALANCED (0x40) /* medium latency, moderate savings */ | ||
| 54 | #define CPUIDLE_FLAG_DEEP (0x80) /* high latency, large savings */ | ||
| 55 | #define CPUIDLE_FLAG_IGNORE (0x100) /* ignore during this idle period */ | 50 | #define CPUIDLE_FLAG_IGNORE (0x100) /* ignore during this idle period */ |
| 56 | #define CPUIDLE_FLAG_TLB_FLUSHED (0x200) /* tlb will be flushed */ | ||
| 57 | 51 | ||
| 58 | #define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000) | 52 | #define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000) |
| 59 | 53 | ||
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 59fcd24b1468..f958c19e3ca5 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
| @@ -167,6 +167,8 @@ struct dentry_operations { | |||
| 167 | void (*d_release)(struct dentry *); | 167 | void (*d_release)(struct dentry *); |
| 168 | void (*d_iput)(struct dentry *, struct inode *); | 168 | void (*d_iput)(struct dentry *, struct inode *); |
| 169 | char *(*d_dname)(struct dentry *, char *, int); | 169 | char *(*d_dname)(struct dentry *, char *, int); |
| 170 | struct vfsmount *(*d_automount)(struct path *); | ||
| 171 | int (*d_manage)(struct dentry *, bool, bool); | ||
| 170 | } ____cacheline_aligned; | 172 | } ____cacheline_aligned; |
| 171 | 173 | ||
| 172 | /* | 174 | /* |
| @@ -205,13 +207,18 @@ struct dentry_operations { | |||
| 205 | 207 | ||
| 206 | #define DCACHE_CANT_MOUNT 0x0100 | 208 | #define DCACHE_CANT_MOUNT 0x0100 |
| 207 | #define DCACHE_GENOCIDE 0x0200 | 209 | #define DCACHE_GENOCIDE 0x0200 |
| 208 | #define DCACHE_MOUNTED 0x0400 /* is a mountpoint */ | ||
| 209 | 210 | ||
| 210 | #define DCACHE_OP_HASH 0x1000 | 211 | #define DCACHE_OP_HASH 0x1000 |
| 211 | #define DCACHE_OP_COMPARE 0x2000 | 212 | #define DCACHE_OP_COMPARE 0x2000 |
| 212 | #define DCACHE_OP_REVALIDATE 0x4000 | 213 | #define DCACHE_OP_REVALIDATE 0x4000 |
| 213 | #define DCACHE_OP_DELETE 0x8000 | 214 | #define DCACHE_OP_DELETE 0x8000 |
| 214 | 215 | ||
| 216 | #define DCACHE_MOUNTED 0x10000 /* is a mountpoint */ | ||
| 217 | #define DCACHE_NEED_AUTOMOUNT 0x20000 /* handle automount on this dir */ | ||
| 218 | #define DCACHE_MANAGE_TRANSIT 0x40000 /* manage transit from this dirent */ | ||
| 219 | #define DCACHE_MANAGED_DENTRY \ | ||
| 220 | (DCACHE_MOUNTED|DCACHE_NEED_AUTOMOUNT|DCACHE_MANAGE_TRANSIT) | ||
| 221 | |||
| 215 | extern seqlock_t rename_lock; | 222 | extern seqlock_t rename_lock; |
| 216 | 223 | ||
| 217 | static inline int dname_external(struct dentry *dentry) | 224 | static inline int dname_external(struct dentry *dentry) |
| @@ -399,7 +406,12 @@ static inline void dont_mount(struct dentry *dentry) | |||
| 399 | 406 | ||
| 400 | extern void dput(struct dentry *); | 407 | extern void dput(struct dentry *); |
| 401 | 408 | ||
| 402 | static inline int d_mountpoint(struct dentry *dentry) | 409 | static inline bool d_managed(struct dentry *dentry) |
| 410 | { | ||
| 411 | return dentry->d_flags & DCACHE_MANAGED_DENTRY; | ||
| 412 | } | ||
| 413 | |||
| 414 | static inline bool d_mountpoint(struct dentry *dentry) | ||
| 403 | { | 415 | { |
| 404 | return dentry->d_flags & DCACHE_MOUNTED; | 416 | return dentry->d_flags & DCACHE_MOUNTED; |
| 405 | } | 417 | } |
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 2970022faa63..272496d1fae4 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
| @@ -193,6 +193,13 @@ struct dm_target { | |||
| 193 | char *error; | 193 | char *error; |
| 194 | }; | 194 | }; |
| 195 | 195 | ||
| 196 | /* Each target can link one of these into the table */ | ||
| 197 | struct dm_target_callbacks { | ||
| 198 | struct list_head list; | ||
| 199 | int (*congested_fn) (struct dm_target_callbacks *, int); | ||
| 200 | void (*unplug_fn)(struct dm_target_callbacks *); | ||
| 201 | }; | ||
| 202 | |||
| 196 | int dm_register_target(struct target_type *t); | 203 | int dm_register_target(struct target_type *t); |
| 197 | void dm_unregister_target(struct target_type *t); | 204 | void dm_unregister_target(struct target_type *t); |
| 198 | 205 | ||
| @@ -269,6 +276,11 @@ int dm_table_add_target(struct dm_table *t, const char *type, | |||
| 269 | sector_t start, sector_t len, char *params); | 276 | sector_t start, sector_t len, char *params); |
| 270 | 277 | ||
| 271 | /* | 278 | /* |
| 279 | * Target_ctr should call this if it needs to add any callbacks. | ||
| 280 | */ | ||
| 281 | void dm_table_add_target_callbacks(struct dm_table *t, struct dm_target_callbacks *cb); | ||
| 282 | |||
| 283 | /* | ||
| 272 | * Finally call this to make the table ready for use. | 284 | * Finally call this to make the table ready for use. |
| 273 | */ | 285 | */ |
| 274 | int dm_table_complete(struct dm_table *t); | 286 | int dm_table_complete(struct dm_table *t); |
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h index 49eab360d5d4..78bbf47bbb96 100644 --- a/include/linux/dm-ioctl.h +++ b/include/linux/dm-ioctl.h | |||
| @@ -44,7 +44,7 @@ | |||
| 44 | * Remove a device, destroy any tables. | 44 | * Remove a device, destroy any tables. |
| 45 | * | 45 | * |
| 46 | * DM_DEV_RENAME: | 46 | * DM_DEV_RENAME: |
| 47 | * Rename a device. | 47 | * Rename a device or set its uuid if none was previously supplied. |
| 48 | * | 48 | * |
| 49 | * DM_SUSPEND: | 49 | * DM_SUSPEND: |
| 50 | * This performs both suspend and resume, depending which flag is | 50 | * This performs both suspend and resume, depending which flag is |
| @@ -267,9 +267,9 @@ enum { | |||
| 267 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) | 267 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
| 268 | 268 | ||
| 269 | #define DM_VERSION_MAJOR 4 | 269 | #define DM_VERSION_MAJOR 4 |
| 270 | #define DM_VERSION_MINOR 18 | 270 | #define DM_VERSION_MINOR 19 |
| 271 | #define DM_VERSION_PATCHLEVEL 0 | 271 | #define DM_VERSION_PATCHLEVEL 1 |
| 272 | #define DM_VERSION_EXTRA "-ioctl (2010-06-29)" | 272 | #define DM_VERSION_EXTRA "-ioctl (2011-01-07)" |
| 273 | 273 | ||
| 274 | /* Status bits */ | 274 | /* Status bits */ |
| 275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ | 275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
| @@ -322,4 +322,10 @@ enum { | |||
| 322 | */ | 322 | */ |
| 323 | #define DM_UEVENT_GENERATED_FLAG (1 << 13) /* Out */ | 323 | #define DM_UEVENT_GENERATED_FLAG (1 << 13) /* Out */ |
| 324 | 324 | ||
| 325 | /* | ||
| 326 | * If set, rename changes the uuid not the name. Only permitted | ||
| 327 | * if no uuid was previously supplied: an existing uuid cannot be changed. | ||
| 328 | */ | ||
| 329 | #define DM_UUID_FLAG (1 << 14) /* In */ | ||
| 330 | |||
| 325 | #endif /* _LINUX_DM_IOCTL_H */ | 331 | #endif /* _LINUX_DM_IOCTL_H */ |
diff --git a/include/linux/dm-log-userspace.h b/include/linux/dm-log-userspace.h index 0c3c3a2110c4..eeace7d3ff15 100644 --- a/include/linux/dm-log-userspace.h +++ b/include/linux/dm-log-userspace.h | |||
| @@ -370,6 +370,16 @@ | |||
| 370 | #define DM_ULOG_REQUEST_TYPE(request_type) \ | 370 | #define DM_ULOG_REQUEST_TYPE(request_type) \ |
| 371 | (DM_ULOG_REQUEST_MASK & (request_type)) | 371 | (DM_ULOG_REQUEST_MASK & (request_type)) |
| 372 | 372 | ||
| 373 | /* | ||
| 374 | * DM_ULOG_REQUEST_VERSION is incremented when there is a | ||
| 375 | * change to the way information is passed between kernel | ||
| 376 | * and userspace. This could be a structure change of | ||
| 377 | * dm_ulog_request or a change in the way requests are | ||
| 378 | * issued/handled. Changes are outlined here: | ||
| 379 | * version 1: Initial implementation | ||
| 380 | */ | ||
| 381 | #define DM_ULOG_REQUEST_VERSION 1 | ||
| 382 | |||
| 373 | struct dm_ulog_request { | 383 | struct dm_ulog_request { |
| 374 | /* | 384 | /* |
| 375 | * The local unique identifier (luid) and the universally unique | 385 | * The local unique identifier (luid) and the universally unique |
| @@ -383,8 +393,9 @@ struct dm_ulog_request { | |||
| 383 | */ | 393 | */ |
| 384 | uint64_t luid; | 394 | uint64_t luid; |
| 385 | char uuid[DM_UUID_LEN]; | 395 | char uuid[DM_UUID_LEN]; |
| 386 | char padding[7]; /* Padding because DM_UUID_LEN = 129 */ | 396 | char padding[3]; /* Padding because DM_UUID_LEN = 129 */ |
| 387 | 397 | ||
| 398 | uint32_t version; /* See DM_ULOG_REQUEST_VERSION */ | ||
| 388 | int32_t error; /* Used to report back processing errors */ | 399 | int32_t error; /* Used to report back processing errors */ |
| 389 | 400 | ||
| 390 | uint32_t seq; /* Sequence number for request */ | 401 | uint32_t seq; /* Sequence number for request */ |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 8cd00ad98d37..9bebd7f16ef1 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
| @@ -532,7 +532,7 @@ static inline int dmaengine_resume(struct dma_chan *chan) | |||
| 532 | return dmaengine_device_control(chan, DMA_RESUME, 0); | 532 | return dmaengine_device_control(chan, DMA_RESUME, 0); |
| 533 | } | 533 | } |
| 534 | 534 | ||
| 535 | static inline int dmaengine_submit(struct dma_async_tx_descriptor *desc) | 535 | static inline dma_cookie_t dmaengine_submit(struct dma_async_tx_descriptor *desc) |
| 536 | { | 536 | { |
| 537 | return desc->tx_submit(desc); | 537 | return desc->tx_submit(desc); |
| 538 | } | 538 | } |
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index bec8b82889bf..ab68f785fd19 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
| @@ -99,6 +99,17 @@ static inline int is_broadcast_ether_addr(const u8 *addr) | |||
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | /** | 101 | /** |
| 102 | * is_unicast_ether_addr - Determine if the Ethernet address is unicast | ||
| 103 | * @addr: Pointer to a six-byte array containing the Ethernet address | ||
| 104 | * | ||
| 105 | * Return true if the address is a unicast address. | ||
| 106 | */ | ||
| 107 | static inline int is_unicast_ether_addr(const u8 *addr) | ||
| 108 | { | ||
| 109 | return !is_multicast_ether_addr(addr); | ||
| 110 | } | ||
| 111 | |||
| 112 | /** | ||
| 102 | * is_valid_ether_addr - Determine if the given Ethernet address is valid | 113 | * is_valid_ether_addr - Determine if the given Ethernet address is valid |
| 103 | * @addr: Pointer to a six-byte array containing the Ethernet address | 114 | * @addr: Pointer to a six-byte array containing the Ethernet address |
| 104 | * | 115 | * |
diff --git a/include/linux/fcntl.h b/include/linux/fcntl.h index afc00af3229b..a562fa5fb4e3 100644 --- a/include/linux/fcntl.h +++ b/include/linux/fcntl.h | |||
| @@ -45,6 +45,7 @@ | |||
| 45 | #define AT_REMOVEDIR 0x200 /* Remove directory instead of | 45 | #define AT_REMOVEDIR 0x200 /* Remove directory instead of |
| 46 | unlinking file. */ | 46 | unlinking file. */ |
| 47 | #define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */ | 47 | #define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */ |
| 48 | #define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount traversal */ | ||
| 48 | 49 | ||
| 49 | #ifdef __KERNEL__ | 50 | #ifdef __KERNEL__ |
| 50 | 51 | ||
diff --git a/include/linux/file.h b/include/linux/file.h index b1e12970f617..e85baebf6279 100644 --- a/include/linux/file.h +++ b/include/linux/file.h | |||
| @@ -23,7 +23,7 @@ extern struct file *alloc_file(struct path *, fmode_t mode, | |||
| 23 | 23 | ||
| 24 | static inline void fput_light(struct file *file, int fput_needed) | 24 | static inline void fput_light(struct file *file, int fput_needed) |
| 25 | { | 25 | { |
| 26 | if (unlikely(fput_needed)) | 26 | if (fput_needed) |
| 27 | fput(file); | 27 | fput(file); |
| 28 | } | 28 | } |
| 29 | 29 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 3984f2358d1f..bd3215940c37 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -242,6 +242,7 @@ struct inodes_stat_t { | |||
| 242 | #define S_SWAPFILE 256 /* Do not truncate: swapon got its bmaps */ | 242 | #define S_SWAPFILE 256 /* Do not truncate: swapon got its bmaps */ |
| 243 | #define S_PRIVATE 512 /* Inode is fs-internal */ | 243 | #define S_PRIVATE 512 /* Inode is fs-internal */ |
| 244 | #define S_IMA 1024 /* Inode has an associated IMA struct */ | 244 | #define S_IMA 1024 /* Inode has an associated IMA struct */ |
| 245 | #define S_AUTOMOUNT 2048 /* Automount/referral quasi-directory */ | ||
| 245 | 246 | ||
| 246 | /* | 247 | /* |
| 247 | * Note that nosuid etc flags are inode-specific: setting some file-system | 248 | * Note that nosuid etc flags are inode-specific: setting some file-system |
| @@ -277,6 +278,7 @@ struct inodes_stat_t { | |||
| 277 | #define IS_SWAPFILE(inode) ((inode)->i_flags & S_SWAPFILE) | 278 | #define IS_SWAPFILE(inode) ((inode)->i_flags & S_SWAPFILE) |
| 278 | #define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE) | 279 | #define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE) |
| 279 | #define IS_IMA(inode) ((inode)->i_flags & S_IMA) | 280 | #define IS_IMA(inode) ((inode)->i_flags & S_IMA) |
| 281 | #define IS_AUTOMOUNT(inode) ((inode)->i_flags & S_AUTOMOUNT) | ||
| 280 | 282 | ||
| 281 | /* the read-only stuff doesn't really belong here, but any other place is | 283 | /* the read-only stuff doesn't really belong here, but any other place is |
| 282 | probably as bad and I don't want to create yet another include file. */ | 284 | probably as bad and I don't want to create yet another include file. */ |
| @@ -666,7 +668,7 @@ struct block_device { | |||
| 666 | int bd_holders; | 668 | int bd_holders; |
| 667 | bool bd_write_holder; | 669 | bool bd_write_holder; |
| 668 | #ifdef CONFIG_SYSFS | 670 | #ifdef CONFIG_SYSFS |
| 669 | struct gendisk * bd_holder_disk; /* for sysfs slave linkng */ | 671 | struct list_head bd_holder_disks; |
| 670 | #endif | 672 | #endif |
| 671 | struct block_device * bd_contains; | 673 | struct block_device * bd_contains; |
| 672 | unsigned bd_block_size; | 674 | unsigned bd_block_size; |
| @@ -1066,7 +1068,6 @@ struct lock_manager_operations { | |||
| 1066 | int (*fl_grant)(struct file_lock *, struct file_lock *, int); | 1068 | int (*fl_grant)(struct file_lock *, struct file_lock *, int); |
| 1067 | void (*fl_release_private)(struct file_lock *); | 1069 | void (*fl_release_private)(struct file_lock *); |
| 1068 | void (*fl_break)(struct file_lock *); | 1070 | void (*fl_break)(struct file_lock *); |
| 1069 | int (*fl_mylease)(struct file_lock *, struct file_lock *); | ||
| 1070 | int (*fl_change)(struct file_lock **, int); | 1071 | int (*fl_change)(struct file_lock **, int); |
| 1071 | }; | 1072 | }; |
| 1072 | 1073 | ||
| @@ -1482,8 +1483,8 @@ struct fiemap_extent_info { | |||
| 1482 | unsigned int fi_flags; /* Flags as passed from user */ | 1483 | unsigned int fi_flags; /* Flags as passed from user */ |
| 1483 | unsigned int fi_extents_mapped; /* Number of mapped extents */ | 1484 | unsigned int fi_extents_mapped; /* Number of mapped extents */ |
| 1484 | unsigned int fi_extents_max; /* Size of fiemap_extent array */ | 1485 | unsigned int fi_extents_max; /* Size of fiemap_extent array */ |
| 1485 | struct fiemap_extent *fi_extents_start; /* Start of fiemap_extent | 1486 | struct fiemap_extent __user *fi_extents_start; /* Start of |
| 1486 | * array */ | 1487 | fiemap_extent array */ |
| 1487 | }; | 1488 | }; |
| 1488 | int fiemap_fill_next_extent(struct fiemap_extent_info *info, u64 logical, | 1489 | int fiemap_fill_next_extent(struct fiemap_extent_info *info, u64 logical, |
| 1489 | u64 phys, u64 len, u32 flags); | 1490 | u64 phys, u64 len, u32 flags); |
| @@ -1551,6 +1552,8 @@ struct file_operations { | |||
| 1551 | ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); | 1552 | ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); |
| 1552 | ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); | 1553 | ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); |
| 1553 | int (*setlease)(struct file *, long, struct file_lock **); | 1554 | int (*setlease)(struct file *, long, struct file_lock **); |
| 1555 | long (*fallocate)(struct file *file, int mode, loff_t offset, | ||
| 1556 | loff_t len); | ||
| 1554 | }; | 1557 | }; |
| 1555 | 1558 | ||
| 1556 | #define IPERM_FLAG_RCU 0x0001 | 1559 | #define IPERM_FLAG_RCU 0x0001 |
| @@ -1581,8 +1584,6 @@ struct inode_operations { | |||
| 1581 | ssize_t (*listxattr) (struct dentry *, char *, size_t); | 1584 | ssize_t (*listxattr) (struct dentry *, char *, size_t); |
| 1582 | int (*removexattr) (struct dentry *, const char *); | 1585 | int (*removexattr) (struct dentry *, const char *); |
| 1583 | void (*truncate_range)(struct inode *, loff_t, loff_t); | 1586 | void (*truncate_range)(struct inode *, loff_t, loff_t); |
| 1584 | long (*fallocate)(struct inode *inode, int mode, loff_t offset, | ||
| 1585 | loff_t len); | ||
| 1586 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, | 1587 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, |
| 1587 | u64 len); | 1588 | u64 len); |
| 1588 | } ____cacheline_aligned; | 1589 | } ____cacheline_aligned; |
| @@ -2058,12 +2059,18 @@ extern struct block_device *blkdev_get_by_dev(dev_t dev, fmode_t mode, | |||
| 2058 | extern int blkdev_put(struct block_device *bdev, fmode_t mode); | 2059 | extern int blkdev_put(struct block_device *bdev, fmode_t mode); |
| 2059 | #ifdef CONFIG_SYSFS | 2060 | #ifdef CONFIG_SYSFS |
| 2060 | extern int bd_link_disk_holder(struct block_device *bdev, struct gendisk *disk); | 2061 | extern int bd_link_disk_holder(struct block_device *bdev, struct gendisk *disk); |
| 2062 | extern void bd_unlink_disk_holder(struct block_device *bdev, | ||
| 2063 | struct gendisk *disk); | ||
| 2061 | #else | 2064 | #else |
| 2062 | static inline int bd_link_disk_holder(struct block_device *bdev, | 2065 | static inline int bd_link_disk_holder(struct block_device *bdev, |
| 2063 | struct gendisk *disk) | 2066 | struct gendisk *disk) |
| 2064 | { | 2067 | { |
| 2065 | return 0; | 2068 | return 0; |
| 2066 | } | 2069 | } |
| 2070 | static inline void bd_unlink_disk_holder(struct block_device *bdev, | ||
| 2071 | struct gendisk *disk) | ||
| 2072 | { | ||
| 2073 | } | ||
| 2067 | #endif | 2074 | #endif |
| 2068 | #endif | 2075 | #endif |
| 2069 | 2076 | ||
| @@ -2548,9 +2555,12 @@ int proc_nr_inodes(struct ctl_table *table, int write, | |||
| 2548 | void __user *buffer, size_t *lenp, loff_t *ppos); | 2555 | void __user *buffer, size_t *lenp, loff_t *ppos); |
| 2549 | int __init get_filesystem_list(char *buf); | 2556 | int __init get_filesystem_list(char *buf); |
| 2550 | 2557 | ||
| 2558 | #define __FMODE_EXEC ((__force int) FMODE_EXEC) | ||
| 2559 | #define __FMODE_NONOTIFY ((__force int) FMODE_NONOTIFY) | ||
| 2560 | |||
| 2551 | #define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE]) | 2561 | #define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE]) |
| 2552 | #define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \ | 2562 | #define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \ |
| 2553 | (flag & FMODE_NONOTIFY))) | 2563 | (flag & __FMODE_NONOTIFY))) |
| 2554 | 2564 | ||
| 2555 | #endif /* __KERNEL__ */ | 2565 | #endif /* __KERNEL__ */ |
| 2556 | #endif /* _LINUX_FS_H */ | 2566 | #endif /* _LINUX_FS_H */ |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index f54adfcbec9c..0b84c61607e8 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
| @@ -34,6 +34,7 @@ struct vm_area_struct; | |||
| 34 | #else | 34 | #else |
| 35 | #define ___GFP_NOTRACK 0 | 35 | #define ___GFP_NOTRACK 0 |
| 36 | #endif | 36 | #endif |
| 37 | #define ___GFP_NO_KSWAPD 0x400000u | ||
| 37 | 38 | ||
| 38 | /* | 39 | /* |
| 39 | * GFP bitmasks.. | 40 | * GFP bitmasks.. |
| @@ -81,13 +82,15 @@ struct vm_area_struct; | |||
| 81 | #define __GFP_RECLAIMABLE ((__force gfp_t)___GFP_RECLAIMABLE) /* Page is reclaimable */ | 82 | #define __GFP_RECLAIMABLE ((__force gfp_t)___GFP_RECLAIMABLE) /* Page is reclaimable */ |
| 82 | #define __GFP_NOTRACK ((__force gfp_t)___GFP_NOTRACK) /* Don't track with kmemcheck */ | 83 | #define __GFP_NOTRACK ((__force gfp_t)___GFP_NOTRACK) /* Don't track with kmemcheck */ |
| 83 | 84 | ||
| 85 | #define __GFP_NO_KSWAPD ((__force gfp_t)___GFP_NO_KSWAPD) | ||
| 86 | |||
| 84 | /* | 87 | /* |
| 85 | * This may seem redundant, but it's a way of annotating false positives vs. | 88 | * This may seem redundant, but it's a way of annotating false positives vs. |
| 86 | * allocations that simply cannot be supported (e.g. page tables). | 89 | * allocations that simply cannot be supported (e.g. page tables). |
| 87 | */ | 90 | */ |
| 88 | #define __GFP_NOTRACK_FALSE_POSITIVE (__GFP_NOTRACK) | 91 | #define __GFP_NOTRACK_FALSE_POSITIVE (__GFP_NOTRACK) |
| 89 | 92 | ||
| 90 | #define __GFP_BITS_SHIFT 22 /* Room for 22 __GFP_FOO bits */ | 93 | #define __GFP_BITS_SHIFT 23 /* Room for 23 __GFP_FOO bits */ |
| 91 | #define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1)) | 94 | #define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1)) |
| 92 | 95 | ||
| 93 | /* This equals 0, but use constants in case they ever change */ | 96 | /* This equals 0, but use constants in case they ever change */ |
| @@ -106,6 +109,9 @@ struct vm_area_struct; | |||
| 106 | __GFP_HARDWALL | __GFP_HIGHMEM | \ | 109 | __GFP_HARDWALL | __GFP_HIGHMEM | \ |
| 107 | __GFP_MOVABLE) | 110 | __GFP_MOVABLE) |
| 108 | #define GFP_IOFS (__GFP_IO | __GFP_FS) | 111 | #define GFP_IOFS (__GFP_IO | __GFP_FS) |
| 112 | #define GFP_TRANSHUGE (GFP_HIGHUSER_MOVABLE | __GFP_COMP | \ | ||
| 113 | __GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN | \ | ||
| 114 | __GFP_NO_KSWAPD) | ||
| 109 | 115 | ||
| 110 | #ifdef CONFIG_NUMA | 116 | #ifdef CONFIG_NUMA |
| 111 | #define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) | 117 | #define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) |
| @@ -243,7 +249,7 @@ static inline enum zone_type gfp_zone(gfp_t flags) | |||
| 243 | ((1 << ZONES_SHIFT) - 1); | 249 | ((1 << ZONES_SHIFT) - 1); |
| 244 | 250 | ||
| 245 | if (__builtin_constant_p(bit)) | 251 | if (__builtin_constant_p(bit)) |
| 246 | MAYBE_BUILD_BUG_ON((GFP_ZONE_BAD >> bit) & 1); | 252 | BUILD_BUG_ON((GFP_ZONE_BAD >> bit) & 1); |
| 247 | else { | 253 | else { |
| 248 | #ifdef CONFIG_DEBUG_VM | 254 | #ifdef CONFIG_DEBUG_VM |
| 249 | BUG_ON((GFP_ZONE_BAD >> bit) & 1); | 255 | BUG_ON((GFP_ZONE_BAD >> bit) & 1); |
| @@ -325,14 +331,17 @@ alloc_pages(gfp_t gfp_mask, unsigned int order) | |||
| 325 | { | 331 | { |
| 326 | return alloc_pages_current(gfp_mask, order); | 332 | return alloc_pages_current(gfp_mask, order); |
| 327 | } | 333 | } |
| 328 | extern struct page *alloc_page_vma(gfp_t gfp_mask, | 334 | extern struct page *alloc_pages_vma(gfp_t gfp_mask, int order, |
| 329 | struct vm_area_struct *vma, unsigned long addr); | 335 | struct vm_area_struct *vma, unsigned long addr); |
| 330 | #else | 336 | #else |
| 331 | #define alloc_pages(gfp_mask, order) \ | 337 | #define alloc_pages(gfp_mask, order) \ |
| 332 | alloc_pages_node(numa_node_id(), gfp_mask, order) | 338 | alloc_pages_node(numa_node_id(), gfp_mask, order) |
| 333 | #define alloc_page_vma(gfp_mask, vma, addr) alloc_pages(gfp_mask, 0) | 339 | #define alloc_pages_vma(gfp_mask, order, vma, addr) \ |
| 340 | alloc_pages(gfp_mask, order) | ||
| 334 | #endif | 341 | #endif |
| 335 | #define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0) | 342 | #define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0) |
| 343 | #define alloc_page_vma(gfp_mask, vma, addr) \ | ||
| 344 | alloc_pages_vma(gfp_mask, 0, vma, addr) | ||
| 336 | 345 | ||
| 337 | extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order); | 346 | extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order); |
| 338 | extern unsigned long get_zeroed_page(gfp_t gfp_mask); | 347 | extern unsigned long get_zeroed_page(gfp_t gfp_mask); |
diff --git a/include/linux/gpio.h b/include/linux/gpio.h index f79d67f413e4..32720baf70f1 100644 --- a/include/linux/gpio.h +++ b/include/linux/gpio.h | |||
| @@ -30,18 +30,18 @@ static inline int gpio_is_valid(int number) | |||
| 30 | return 0; | 30 | return 0; |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | static inline int __must_check gpio_request(unsigned gpio, const char *label) | 33 | static inline int gpio_request(unsigned gpio, const char *label) |
| 34 | { | 34 | { |
| 35 | return -ENOSYS; | 35 | return -ENOSYS; |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | static inline int __must_check gpio_request_one(unsigned gpio, | 38 | static inline int gpio_request_one(unsigned gpio, |
| 39 | unsigned long flags, const char *label) | 39 | unsigned long flags, const char *label) |
| 40 | { | 40 | { |
| 41 | return -ENOSYS; | 41 | return -ENOSYS; |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | static inline int __must_check gpio_request_array(struct gpio *array, size_t num) | 44 | static inline int gpio_request_array(struct gpio *array, size_t num) |
| 45 | { | 45 | { |
| 46 | return -ENOSYS; | 46 | return -ENOSYS; |
| 47 | } | 47 | } |
| @@ -62,12 +62,12 @@ static inline void gpio_free_array(struct gpio *array, size_t num) | |||
| 62 | WARN_ON(1); | 62 | WARN_ON(1); |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | static inline int __must_check gpio_direction_input(unsigned gpio) | 65 | static inline int gpio_direction_input(unsigned gpio) |
| 66 | { | 66 | { |
| 67 | return -ENOSYS; | 67 | return -ENOSYS; |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | static inline int __must_check gpio_direction_output(unsigned gpio, int value) | 70 | static inline int gpio_direction_output(unsigned gpio, int value) |
| 71 | { | 71 | { |
| 72 | return -ENOSYS; | 72 | return -ENOSYS; |
| 73 | } | 73 | } |
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h new file mode 100644 index 000000000000..8e6c8c42bc3c --- /dev/null +++ b/include/linux/huge_mm.h | |||
| @@ -0,0 +1,179 @@ | |||
| 1 | #ifndef _LINUX_HUGE_MM_H | ||
| 2 | #define _LINUX_HUGE_MM_H | ||
| 3 | |||
| 4 | extern int do_huge_pmd_anonymous_page(struct mm_struct *mm, | ||
| 5 | struct vm_area_struct *vma, | ||
| 6 | unsigned long address, pmd_t *pmd, | ||
| 7 | unsigned int flags); | ||
| 8 | extern int copy_huge_pmd(struct mm_struct *dst_mm, struct mm_struct *src_mm, | ||
| 9 | pmd_t *dst_pmd, pmd_t *src_pmd, unsigned long addr, | ||
| 10 | struct vm_area_struct *vma); | ||
| 11 | extern int do_huge_pmd_wp_page(struct mm_struct *mm, struct vm_area_struct *vma, | ||
| 12 | unsigned long address, pmd_t *pmd, | ||
| 13 | pmd_t orig_pmd); | ||
| 14 | extern pgtable_t get_pmd_huge_pte(struct mm_struct *mm); | ||
| 15 | extern struct page *follow_trans_huge_pmd(struct mm_struct *mm, | ||
| 16 | unsigned long addr, | ||
| 17 | pmd_t *pmd, | ||
| 18 | unsigned int flags); | ||
| 19 | extern int zap_huge_pmd(struct mmu_gather *tlb, | ||
| 20 | struct vm_area_struct *vma, | ||
| 21 | pmd_t *pmd); | ||
| 22 | extern int mincore_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd, | ||
| 23 | unsigned long addr, unsigned long end, | ||
| 24 | unsigned char *vec); | ||
| 25 | extern int change_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd, | ||
| 26 | unsigned long addr, pgprot_t newprot); | ||
| 27 | |||
| 28 | enum transparent_hugepage_flag { | ||
| 29 | TRANSPARENT_HUGEPAGE_FLAG, | ||
| 30 | TRANSPARENT_HUGEPAGE_REQ_MADV_FLAG, | ||
| 31 | TRANSPARENT_HUGEPAGE_DEFRAG_FLAG, | ||
| 32 | TRANSPARENT_HUGEPAGE_DEFRAG_REQ_MADV_FLAG, | ||
| 33 | TRANSPARENT_HUGEPAGE_DEFRAG_KHUGEPAGED_FLAG, | ||
| 34 | #ifdef CONFIG_DEBUG_VM | ||
| 35 | TRANSPARENT_HUGEPAGE_DEBUG_COW_FLAG, | ||
| 36 | #endif | ||
| 37 | }; | ||
| 38 | |||
| 39 | enum page_check_address_pmd_flag { | ||
| 40 | PAGE_CHECK_ADDRESS_PMD_FLAG, | ||
| 41 | PAGE_CHECK_ADDRESS_PMD_NOTSPLITTING_FLAG, | ||
| 42 | PAGE_CHECK_ADDRESS_PMD_SPLITTING_FLAG, | ||
| 43 | }; | ||
| 44 | extern pmd_t *page_check_address_pmd(struct page *page, | ||
| 45 | struct mm_struct *mm, | ||
| 46 | unsigned long address, | ||
| 47 | enum page_check_address_pmd_flag flag); | ||
| 48 | |||
| 49 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
| 50 | #define HPAGE_PMD_SHIFT HPAGE_SHIFT | ||
| 51 | #define HPAGE_PMD_MASK HPAGE_MASK | ||
| 52 | #define HPAGE_PMD_SIZE HPAGE_SIZE | ||
| 53 | |||
| 54 | #define transparent_hugepage_enabled(__vma) \ | ||
| 55 | ((transparent_hugepage_flags & \ | ||
| 56 | (1<<TRANSPARENT_HUGEPAGE_FLAG) || \ | ||
| 57 | (transparent_hugepage_flags & \ | ||
| 58 | (1<<TRANSPARENT_HUGEPAGE_REQ_MADV_FLAG) && \ | ||
| 59 | ((__vma)->vm_flags & VM_HUGEPAGE))) && \ | ||
| 60 | !((__vma)->vm_flags & VM_NOHUGEPAGE)) | ||
| 61 | #define transparent_hugepage_defrag(__vma) \ | ||
| 62 | ((transparent_hugepage_flags & \ | ||
| 63 | (1<<TRANSPARENT_HUGEPAGE_DEFRAG_FLAG)) || \ | ||
| 64 | (transparent_hugepage_flags & \ | ||
| 65 | (1<<TRANSPARENT_HUGEPAGE_DEFRAG_REQ_MADV_FLAG) && \ | ||
| 66 | (__vma)->vm_flags & VM_HUGEPAGE)) | ||
| 67 | #ifdef CONFIG_DEBUG_VM | ||
| 68 | #define transparent_hugepage_debug_cow() \ | ||
| 69 | (transparent_hugepage_flags & \ | ||
| 70 | (1<<TRANSPARENT_HUGEPAGE_DEBUG_COW_FLAG)) | ||
| 71 | #else /* CONFIG_DEBUG_VM */ | ||
| 72 | #define transparent_hugepage_debug_cow() 0 | ||
| 73 | #endif /* CONFIG_DEBUG_VM */ | ||
| 74 | |||
| 75 | extern unsigned long transparent_hugepage_flags; | ||
| 76 | extern int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm, | ||
| 77 | pmd_t *dst_pmd, pmd_t *src_pmd, | ||
| 78 | struct vm_area_struct *vma, | ||
| 79 | unsigned long addr, unsigned long end); | ||
| 80 | extern int handle_pte_fault(struct mm_struct *mm, | ||
| 81 | struct vm_area_struct *vma, unsigned long address, | ||
| 82 | pte_t *pte, pmd_t *pmd, unsigned int flags); | ||
| 83 | extern int split_huge_page(struct page *page); | ||
| 84 | extern void __split_huge_page_pmd(struct mm_struct *mm, pmd_t *pmd); | ||
| 85 | #define split_huge_page_pmd(__mm, __pmd) \ | ||
| 86 | do { \ | ||
| 87 | pmd_t *____pmd = (__pmd); \ | ||
| 88 | if (unlikely(pmd_trans_huge(*____pmd))) \ | ||
| 89 | __split_huge_page_pmd(__mm, ____pmd); \ | ||
| 90 | } while (0) | ||
| 91 | #define wait_split_huge_page(__anon_vma, __pmd) \ | ||
| 92 | do { \ | ||
| 93 | pmd_t *____pmd = (__pmd); \ | ||
| 94 | spin_unlock_wait(&(__anon_vma)->root->lock); \ | ||
| 95 | /* \ | ||
| 96 | * spin_unlock_wait() is just a loop in C and so the \ | ||
| 97 | * CPU can reorder anything around it. \ | ||
| 98 | */ \ | ||
| 99 | smp_mb(); \ | ||
| 100 | BUG_ON(pmd_trans_splitting(*____pmd) || \ | ||
| 101 | pmd_trans_huge(*____pmd)); \ | ||
| 102 | } while (0) | ||
| 103 | #define HPAGE_PMD_ORDER (HPAGE_PMD_SHIFT-PAGE_SHIFT) | ||
| 104 | #define HPAGE_PMD_NR (1<<HPAGE_PMD_ORDER) | ||
| 105 | #if HPAGE_PMD_ORDER > MAX_ORDER | ||
| 106 | #error "hugepages can't be allocated by the buddy allocator" | ||
| 107 | #endif | ||
| 108 | extern int hugepage_madvise(struct vm_area_struct *vma, | ||
| 109 | unsigned long *vm_flags, int advice); | ||
| 110 | extern void __vma_adjust_trans_huge(struct vm_area_struct *vma, | ||
| 111 | unsigned long start, | ||
| 112 | unsigned long end, | ||
| 113 | long adjust_next); | ||
| 114 | static inline void vma_adjust_trans_huge(struct vm_area_struct *vma, | ||
| 115 | unsigned long start, | ||
| 116 | unsigned long end, | ||
| 117 | long adjust_next) | ||
| 118 | { | ||
| 119 | if (!vma->anon_vma || vma->vm_ops || vma->vm_file) | ||
| 120 | return; | ||
| 121 | __vma_adjust_trans_huge(vma, start, end, adjust_next); | ||
| 122 | } | ||
| 123 | static inline int hpage_nr_pages(struct page *page) | ||
| 124 | { | ||
| 125 | if (unlikely(PageTransHuge(page))) | ||
| 126 | return HPAGE_PMD_NR; | ||
| 127 | return 1; | ||
| 128 | } | ||
| 129 | static inline struct page *compound_trans_head(struct page *page) | ||
| 130 | { | ||
| 131 | if (PageTail(page)) { | ||
| 132 | struct page *head; | ||
| 133 | head = page->first_page; | ||
| 134 | smp_rmb(); | ||
| 135 | /* | ||
| 136 | * head may be a dangling pointer. | ||
| 137 | * __split_huge_page_refcount clears PageTail before | ||
| 138 | * overwriting first_page, so if PageTail is still | ||
| 139 | * there it means the head pointer isn't dangling. | ||
| 140 | */ | ||
| 141 | if (PageTail(page)) | ||
| 142 | return head; | ||
| 143 | } | ||
| 144 | return page; | ||
| 145 | } | ||
| 146 | #else /* CONFIG_TRANSPARENT_HUGEPAGE */ | ||
| 147 | #define HPAGE_PMD_SHIFT ({ BUG(); 0; }) | ||
| 148 | #define HPAGE_PMD_MASK ({ BUG(); 0; }) | ||
| 149 | #define HPAGE_PMD_SIZE ({ BUG(); 0; }) | ||
| 150 | |||
| 151 | #define hpage_nr_pages(x) 1 | ||
| 152 | |||
| 153 | #define transparent_hugepage_enabled(__vma) 0 | ||
| 154 | |||
| 155 | #define transparent_hugepage_flags 0UL | ||
| 156 | static inline int split_huge_page(struct page *page) | ||
| 157 | { | ||
| 158 | return 0; | ||
| 159 | } | ||
| 160 | #define split_huge_page_pmd(__mm, __pmd) \ | ||
| 161 | do { } while (0) | ||
| 162 | #define wait_split_huge_page(__anon_vma, __pmd) \ | ||
| 163 | do { } while (0) | ||
| 164 | #define compound_trans_head(page) compound_head(page) | ||
| 165 | static inline int hugepage_madvise(struct vm_area_struct *vma, | ||
| 166 | unsigned long *vm_flags, int advice) | ||
| 167 | { | ||
| 168 | BUG(); | ||
| 169 | return 0; | ||
| 170 | } | ||
| 171 | static inline void vma_adjust_trans_huge(struct vm_area_struct *vma, | ||
| 172 | unsigned long start, | ||
| 173 | unsigned long end, | ||
| 174 | long adjust_next) | ||
| 175 | { | ||
| 176 | } | ||
| 177 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ | ||
| 178 | |||
| 179 | #endif /* _LINUX_HUGE_MM_H */ | ||
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 6042228954a7..294169e31364 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
| @@ -959,7 +959,7 @@ struct ieee80211_ht_info { | |||
| 959 | /* block-ack parameters */ | 959 | /* block-ack parameters */ |
| 960 | #define IEEE80211_ADDBA_PARAM_POLICY_MASK 0x0002 | 960 | #define IEEE80211_ADDBA_PARAM_POLICY_MASK 0x0002 |
| 961 | #define IEEE80211_ADDBA_PARAM_TID_MASK 0x003C | 961 | #define IEEE80211_ADDBA_PARAM_TID_MASK 0x003C |
| 962 | #define IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK 0xFFA0 | 962 | #define IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK 0xFFC0 |
| 963 | #define IEEE80211_DELBA_PARAM_TID_MASK 0xF000 | 963 | #define IEEE80211_DELBA_PARAM_TID_MASK 0xF000 |
| 964 | #define IEEE80211_DELBA_PARAM_INITIATOR_MASK 0x0800 | 964 | #define IEEE80211_DELBA_PARAM_INITIATOR_MASK 0x0800 |
| 965 | 965 | ||
diff --git a/include/linux/input/bu21013.h b/include/linux/input/bu21013.h index e470d387dd49..05e03284b92a 100644 --- a/include/linux/input/bu21013.h +++ b/include/linux/input/bu21013.h | |||
| @@ -12,8 +12,6 @@ | |||
| 12 | * @cs_en: pointer to the cs enable function | 12 | * @cs_en: pointer to the cs enable function |
| 13 | * @cs_dis: pointer to the cs disable function | 13 | * @cs_dis: pointer to the cs disable function |
| 14 | * @irq_read_val: pointer to read the pen irq value function | 14 | * @irq_read_val: pointer to read the pen irq value function |
| 15 | * @x_max_res: xmax resolution | ||
| 16 | * @y_max_res: ymax resolution | ||
| 17 | * @touch_x_max: touch x max | 15 | * @touch_x_max: touch x max |
| 18 | * @touch_y_max: touch y max | 16 | * @touch_y_max: touch y max |
| 19 | * @cs_pin: chip select pin | 17 | * @cs_pin: chip select pin |
| @@ -29,8 +27,6 @@ struct bu21013_platform_device { | |||
| 29 | int (*cs_en)(int reset_pin); | 27 | int (*cs_en)(int reset_pin); |
| 30 | int (*cs_dis)(int reset_pin); | 28 | int (*cs_dis)(int reset_pin); |
| 31 | int (*irq_read_val)(void); | 29 | int (*irq_read_val)(void); |
| 32 | int x_max_res; | ||
| 33 | int y_max_res; | ||
| 34 | int touch_x_max; | 30 | int touch_x_max; |
| 35 | int touch_y_max; | 31 | int touch_y_max; |
| 36 | unsigned int cs_pin; | 32 | unsigned int cs_pin; |
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h index 65aae34759de..045f2f275cd0 100644 --- a/include/linux/ipmi.h +++ b/include/linux/ipmi.h | |||
| @@ -454,6 +454,44 @@ unsigned int ipmi_addr_length(int addr_type); | |||
| 454 | /* Validate that the given IPMI address is valid. */ | 454 | /* Validate that the given IPMI address is valid. */ |
| 455 | int ipmi_validate_addr(struct ipmi_addr *addr, int len); | 455 | int ipmi_validate_addr(struct ipmi_addr *addr, int len); |
| 456 | 456 | ||
| 457 | /* | ||
| 458 | * How did the IPMI driver find out about the device? | ||
| 459 | */ | ||
| 460 | enum ipmi_addr_src { | ||
| 461 | SI_INVALID = 0, SI_HOTMOD, SI_HARDCODED, SI_SPMI, SI_ACPI, SI_SMBIOS, | ||
| 462 | SI_PCI, SI_DEVICETREE, SI_DEFAULT | ||
| 463 | }; | ||
| 464 | |||
| 465 | union ipmi_smi_info_union { | ||
| 466 | /* | ||
| 467 | * the acpi_info element is defined for the SI_ACPI | ||
| 468 | * address type | ||
| 469 | */ | ||
| 470 | struct { | ||
| 471 | void *acpi_handle; | ||
| 472 | } acpi_info; | ||
| 473 | }; | ||
| 474 | |||
| 475 | struct ipmi_smi_info { | ||
| 476 | enum ipmi_addr_src addr_src; | ||
| 477 | |||
| 478 | /* | ||
| 479 | * Base device for the interface. Don't forget to put this when | ||
| 480 | * you are done. | ||
| 481 | */ | ||
| 482 | struct device *dev; | ||
| 483 | |||
| 484 | /* | ||
| 485 | * The addr_info provides more detailed info for some IPMI | ||
| 486 | * devices, depending on the addr_src. Currently only SI_ACPI | ||
| 487 | * info is provided. | ||
| 488 | */ | ||
| 489 | union ipmi_smi_info_union addr_info; | ||
| 490 | }; | ||
| 491 | |||
| 492 | /* This is to get the private info of ipmi_smi_t */ | ||
| 493 | extern int ipmi_get_smi_info(int if_num, struct ipmi_smi_info *data); | ||
| 494 | |||
| 457 | #endif /* __KERNEL__ */ | 495 | #endif /* __KERNEL__ */ |
| 458 | 496 | ||
| 459 | 497 | ||
diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h index 4b48318ac542..906590aa6907 100644 --- a/include/linux/ipmi_smi.h +++ b/include/linux/ipmi_smi.h | |||
| @@ -39,6 +39,7 @@ | |||
| 39 | #include <linux/module.h> | 39 | #include <linux/module.h> |
| 40 | #include <linux/device.h> | 40 | #include <linux/device.h> |
| 41 | #include <linux/platform_device.h> | 41 | #include <linux/platform_device.h> |
| 42 | #include <linux/ipmi.h> | ||
| 42 | 43 | ||
| 43 | /* This files describes the interface for IPMI system management interface | 44 | /* This files describes the interface for IPMI system management interface |
| 44 | drivers to bind into the IPMI message handler. */ | 45 | drivers to bind into the IPMI message handler. */ |
| @@ -86,6 +87,13 @@ struct ipmi_smi_handlers { | |||
| 86 | int (*start_processing)(void *send_info, | 87 | int (*start_processing)(void *send_info, |
| 87 | ipmi_smi_t new_intf); | 88 | ipmi_smi_t new_intf); |
| 88 | 89 | ||
| 90 | /* | ||
| 91 | * Get the detailed private info of the low level interface and store | ||
| 92 | * it into the structure of ipmi_smi_data. For example: the | ||
| 93 | * ACPI device handle will be returned for the pnp_acpi IPMI device. | ||
| 94 | */ | ||
| 95 | int (*get_smi_info)(void *send_info, struct ipmi_smi_info *data); | ||
| 96 | |||
| 89 | /* Called to enqueue an SMI message to be sent. This | 97 | /* Called to enqueue an SMI message to be sent. This |
| 90 | operation is not allowed to fail. If an error occurs, it | 98 | operation is not allowed to fail. If an error occurs, it |
| 91 | should report back the error in a received message. It may | 99 | should report back the error in a received message. It may |
diff --git a/include/linux/irq.h b/include/linux/irq.h index abde2527c699..80fcb53057bc 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -74,7 +74,8 @@ typedef void (*irq_flow_handler_t)(unsigned int irq, | |||
| 74 | 74 | ||
| 75 | #define IRQF_MODIFY_MASK \ | 75 | #define IRQF_MODIFY_MASK \ |
| 76 | (IRQ_TYPE_SENSE_MASK | IRQ_NOPROBE | IRQ_NOREQUEST | \ | 76 | (IRQ_TYPE_SENSE_MASK | IRQ_NOPROBE | IRQ_NOREQUEST | \ |
| 77 | IRQ_NOAUTOEN | IRQ_MOVE_PCNTXT | IRQ_LEVEL) | 77 | IRQ_NOAUTOEN | IRQ_MOVE_PCNTXT | IRQ_LEVEL | IRQ_NO_BALANCING | \ |
| 78 | IRQ_PER_CPU) | ||
| 78 | 79 | ||
| 79 | #ifdef CONFIG_IRQ_PER_CPU | 80 | #ifdef CONFIG_IRQ_PER_CPU |
| 80 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) | 81 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) |
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index 979c68cc7458..c1a95b7b58de 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h | |||
| @@ -57,7 +57,7 @@ struct irq_desc { | |||
| 57 | #endif | 57 | #endif |
| 58 | 58 | ||
| 59 | struct timer_rand_state *timer_rand_state; | 59 | struct timer_rand_state *timer_rand_state; |
| 60 | unsigned int *kstat_irqs; | 60 | unsigned int __percpu *kstat_irqs; |
| 61 | irq_flow_handler_t handle_irq; | 61 | irq_flow_handler_t handle_irq; |
| 62 | struct irqaction *action; /* IRQ action list */ | 62 | struct irqaction *action; /* IRQ action list */ |
| 63 | unsigned int status; /* IRQ status */ | 63 | unsigned int status; /* IRQ status */ |
| @@ -101,13 +101,6 @@ static inline struct irq_desc *move_irq_desc(struct irq_desc *desc, int node) | |||
| 101 | #define get_irq_desc_msi(desc) ((desc)->irq_data.msi_desc) | 101 | #define get_irq_desc_msi(desc) ((desc)->irq_data.msi_desc) |
| 102 | 102 | ||
| 103 | /* | 103 | /* |
| 104 | * Monolithic do_IRQ implementation. | ||
| 105 | */ | ||
| 106 | #ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ | ||
| 107 | extern unsigned int __do_IRQ(unsigned int irq); | ||
| 108 | #endif | ||
| 109 | |||
| 110 | /* | ||
| 111 | * Architectures call this to let the generic IRQ layer | 104 | * Architectures call this to let the generic IRQ layer |
| 112 | * handle an interrupt. If the descriptor is attached to an | 105 | * handle an interrupt. If the descriptor is attached to an |
| 113 | * irqchip-style controller then we call the ->handle_irq() handler, | 106 | * irqchip-style controller then we call the ->handle_irq() handler, |
| @@ -115,14 +108,7 @@ extern unsigned int __do_IRQ(unsigned int irq); | |||
| 115 | */ | 108 | */ |
| 116 | static inline void generic_handle_irq_desc(unsigned int irq, struct irq_desc *desc) | 109 | static inline void generic_handle_irq_desc(unsigned int irq, struct irq_desc *desc) |
| 117 | { | 110 | { |
| 118 | #ifdef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ | ||
| 119 | desc->handle_irq(irq, desc); | 111 | desc->handle_irq(irq, desc); |
| 120 | #else | ||
| 121 | if (likely(desc->handle_irq)) | ||
| 122 | desc->handle_irq(irq, desc); | ||
| 123 | else | ||
| 124 | __do_IRQ(irq); | ||
| 125 | #endif | ||
| 126 | } | 112 | } |
| 127 | 113 | ||
| 128 | static inline void generic_handle_irq(unsigned int irq) | 114 | static inline void generic_handle_irq(unsigned int irq) |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 57dac7022b63..2fe6e84894a4 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -243,6 +243,8 @@ extern int test_taint(unsigned flag); | |||
| 243 | extern unsigned long get_taint(void); | 243 | extern unsigned long get_taint(void); |
| 244 | extern int root_mountflags; | 244 | extern int root_mountflags; |
| 245 | 245 | ||
| 246 | extern bool early_boot_irqs_disabled; | ||
| 247 | |||
| 246 | /* Values used for system_state */ | 248 | /* Values used for system_state */ |
| 247 | extern enum system_states { | 249 | extern enum system_states { |
| 248 | SYSTEM_BOOTING, | 250 | SYSTEM_BOOTING, |
| @@ -573,12 +575,6 @@ struct sysinfo { | |||
| 573 | char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ | 575 | char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ |
| 574 | }; | 576 | }; |
| 575 | 577 | ||
| 576 | /* Force a compilation error if condition is true */ | ||
| 577 | #define BUILD_BUG_ON(condition) ((void)BUILD_BUG_ON_ZERO(condition)) | ||
| 578 | |||
| 579 | /* Force a compilation error if condition is constant and true */ | ||
| 580 | #define MAYBE_BUILD_BUG_ON(cond) ((void)sizeof(char[1 - 2 * !!(cond)])) | ||
| 581 | |||
| 582 | /* Force a compilation error if a constant expression is not a power of 2 */ | 578 | /* Force a compilation error if a constant expression is not a power of 2 */ |
| 583 | #define BUILD_BUG_ON_NOT_POWER_OF_2(n) \ | 579 | #define BUILD_BUG_ON_NOT_POWER_OF_2(n) \ |
| 584 | BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0)) | 580 | BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0)) |
| @@ -590,6 +586,32 @@ struct sysinfo { | |||
| 590 | #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) | 586 | #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) |
| 591 | #define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); })) | 587 | #define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); })) |
| 592 | 588 | ||
| 589 | /** | ||
| 590 | * BUILD_BUG_ON - break compile if a condition is true. | ||
| 591 | * @condition: the condition which the compiler should know is false. | ||
| 592 | * | ||
| 593 | * If you have some code which relies on certain constants being equal, or | ||
| 594 | * other compile-time-evaluated condition, you should use BUILD_BUG_ON to | ||
| 595 | * detect if someone changes it. | ||
| 596 | * | ||
| 597 | * The implementation uses gcc's reluctance to create a negative array, but | ||
| 598 | * gcc (as of 4.4) only emits that error for obvious cases (eg. not arguments | ||
| 599 | * to inline functions). So as a fallback we use the optimizer; if it can't | ||
| 600 | * prove the condition is false, it will cause a link error on the undefined | ||
| 601 | * "__build_bug_on_failed". This error message can be harder to track down | ||
| 602 | * though, hence the two different methods. | ||
| 603 | */ | ||
| 604 | #ifndef __OPTIMIZE__ | ||
| 605 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) | ||
| 606 | #else | ||
| 607 | extern int __build_bug_on_failed; | ||
| 608 | #define BUILD_BUG_ON(condition) \ | ||
| 609 | do { \ | ||
| 610 | ((void)sizeof(char[1 - 2*!!(condition)])); \ | ||
| 611 | if (condition) __build_bug_on_failed = 1; \ | ||
| 612 | } while(0) | ||
| 613 | #endif | ||
| 614 | |||
| 593 | /* Trap pasters of __FUNCTION__ at compile-time */ | 615 | /* Trap pasters of __FUNCTION__ at compile-time */ |
| 594 | #define __FUNCTION__ (__func__) | 616 | #define __FUNCTION__ (__func__) |
| 595 | 617 | ||
| @@ -600,6 +622,13 @@ struct sysinfo { | |||
| 600 | #define NUMA_BUILD 0 | 622 | #define NUMA_BUILD 0 |
| 601 | #endif | 623 | #endif |
| 602 | 624 | ||
| 625 | /* This helps us avoid #ifdef CONFIG_COMPACTION */ | ||
| 626 | #ifdef CONFIG_COMPACTION | ||
| 627 | #define COMPACTION_BUILD 1 | ||
| 628 | #else | ||
| 629 | #define COMPACTION_BUILD 0 | ||
| 630 | #endif | ||
| 631 | |||
| 603 | /* Rebuild everything on CONFIG_FTRACE_MCOUNT_RECORD */ | 632 | /* Rebuild everything on CONFIG_FTRACE_MCOUNT_RECORD */ |
| 604 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD | 633 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD |
| 605 | # define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD | 634 | # define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD |
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index 44e83ba12b5b..0cce2db580c3 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
| @@ -46,16 +46,14 @@ DECLARE_PER_CPU(struct kernel_stat, kstat); | |||
| 46 | extern unsigned long long nr_context_switches(void); | 46 | extern unsigned long long nr_context_switches(void); |
| 47 | 47 | ||
| 48 | #ifndef CONFIG_GENERIC_HARDIRQS | 48 | #ifndef CONFIG_GENERIC_HARDIRQS |
| 49 | #define kstat_irqs_this_cpu(irq) \ | ||
| 50 | (this_cpu_read(kstat.irqs[irq]) | ||
| 51 | 49 | ||
| 52 | struct irq_desc; | 50 | struct irq_desc; |
| 53 | 51 | ||
| 54 | static inline void kstat_incr_irqs_this_cpu(unsigned int irq, | 52 | static inline void kstat_incr_irqs_this_cpu(unsigned int irq, |
| 55 | struct irq_desc *desc) | 53 | struct irq_desc *desc) |
| 56 | { | 54 | { |
| 57 | kstat_this_cpu.irqs[irq]++; | 55 | __this_cpu_inc(kstat.irqs[irq]); |
| 58 | kstat_this_cpu.irqs_sum++; | 56 | __this_cpu_inc(kstat.irqs_sum); |
| 59 | } | 57 | } |
| 60 | 58 | ||
| 61 | static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu) | 59 | static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu) |
| @@ -65,17 +63,18 @@ static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu) | |||
| 65 | #else | 63 | #else |
| 66 | #include <linux/irq.h> | 64 | #include <linux/irq.h> |
| 67 | extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu); | 65 | extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu); |
| 68 | #define kstat_irqs_this_cpu(DESC) \ | 66 | |
| 69 | ((DESC)->kstat_irqs[smp_processor_id()]) | 67 | #define kstat_incr_irqs_this_cpu(irqno, DESC) \ |
| 70 | #define kstat_incr_irqs_this_cpu(irqno, DESC) do {\ | 68 | do { \ |
| 71 | ((DESC)->kstat_irqs[smp_processor_id()]++);\ | 69 | __this_cpu_inc(*(DESC)->kstat_irqs); \ |
| 72 | kstat_this_cpu.irqs_sum++; } while (0) | 70 | __this_cpu_inc(kstat.irqs_sum); \ |
| 71 | } while (0) | ||
| 73 | 72 | ||
| 74 | #endif | 73 | #endif |
| 75 | 74 | ||
| 76 | static inline void kstat_incr_softirqs_this_cpu(unsigned int irq) | 75 | static inline void kstat_incr_softirqs_this_cpu(unsigned int irq) |
| 77 | { | 76 | { |
| 78 | kstat_this_cpu.softirqs[irq]++; | 77 | __this_cpu_inc(kstat.softirqs[irq]); |
| 79 | } | 78 | } |
| 80 | 79 | ||
| 81 | static inline unsigned int kstat_softirqs_cpu(unsigned int irq, int cpu) | 80 | static inline unsigned int kstat_softirqs_cpu(unsigned int irq, int cpu) |
diff --git a/include/linux/khugepaged.h b/include/linux/khugepaged.h new file mode 100644 index 000000000000..6b394f0b5148 --- /dev/null +++ b/include/linux/khugepaged.h | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | #ifndef _LINUX_KHUGEPAGED_H | ||
| 2 | #define _LINUX_KHUGEPAGED_H | ||
| 3 | |||
| 4 | #include <linux/sched.h> /* MMF_VM_HUGEPAGE */ | ||
| 5 | |||
| 6 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
| 7 | extern int __khugepaged_enter(struct mm_struct *mm); | ||
| 8 | extern void __khugepaged_exit(struct mm_struct *mm); | ||
| 9 | extern int khugepaged_enter_vma_merge(struct vm_area_struct *vma); | ||
| 10 | |||
| 11 | #define khugepaged_enabled() \ | ||
| 12 | (transparent_hugepage_flags & \ | ||
| 13 | ((1<<TRANSPARENT_HUGEPAGE_FLAG) | \ | ||
| 14 | (1<<TRANSPARENT_HUGEPAGE_REQ_MADV_FLAG))) | ||
| 15 | #define khugepaged_always() \ | ||
| 16 | (transparent_hugepage_flags & \ | ||
| 17 | (1<<TRANSPARENT_HUGEPAGE_FLAG)) | ||
| 18 | #define khugepaged_req_madv() \ | ||
| 19 | (transparent_hugepage_flags & \ | ||
| 20 | (1<<TRANSPARENT_HUGEPAGE_REQ_MADV_FLAG)) | ||
| 21 | #define khugepaged_defrag() \ | ||
| 22 | (transparent_hugepage_flags & \ | ||
| 23 | (1<<TRANSPARENT_HUGEPAGE_DEFRAG_KHUGEPAGED_FLAG)) | ||
| 24 | |||
| 25 | static inline int khugepaged_fork(struct mm_struct *mm, struct mm_struct *oldmm) | ||
| 26 | { | ||
| 27 | if (test_bit(MMF_VM_HUGEPAGE, &oldmm->flags)) | ||
| 28 | return __khugepaged_enter(mm); | ||
| 29 | return 0; | ||
| 30 | } | ||
| 31 | |||
| 32 | static inline void khugepaged_exit(struct mm_struct *mm) | ||
| 33 | { | ||
| 34 | if (test_bit(MMF_VM_HUGEPAGE, &mm->flags)) | ||
| 35 | __khugepaged_exit(mm); | ||
| 36 | } | ||
| 37 | |||
| 38 | static inline int khugepaged_enter(struct vm_area_struct *vma) | ||
| 39 | { | ||
| 40 | if (!test_bit(MMF_VM_HUGEPAGE, &vma->vm_mm->flags)) | ||
| 41 | if ((khugepaged_always() || | ||
| 42 | (khugepaged_req_madv() && | ||
| 43 | vma->vm_flags & VM_HUGEPAGE)) && | ||
| 44 | !(vma->vm_flags & VM_NOHUGEPAGE)) | ||
| 45 | if (__khugepaged_enter(vma->vm_mm)) | ||
| 46 | return -ENOMEM; | ||
| 47 | return 0; | ||
| 48 | } | ||
| 49 | #else /* CONFIG_TRANSPARENT_HUGEPAGE */ | ||
| 50 | static inline int khugepaged_fork(struct mm_struct *mm, struct mm_struct *oldmm) | ||
| 51 | { | ||
| 52 | return 0; | ||
| 53 | } | ||
| 54 | static inline void khugepaged_exit(struct mm_struct *mm) | ||
| 55 | { | ||
| 56 | } | ||
| 57 | static inline int khugepaged_enter(struct vm_area_struct *vma) | ||
| 58 | { | ||
| 59 | return 0; | ||
| 60 | } | ||
| 61 | static inline int khugepaged_enter_vma_merge(struct vm_area_struct *vma) | ||
| 62 | { | ||
| 63 | return 0; | ||
| 64 | } | ||
| 65 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ | ||
| 66 | |||
| 67 | #endif /* _LINUX_KHUGEPAGED_H */ | ||
diff --git a/include/linux/klist.h b/include/linux/klist.h index e91a4e59b771..a370ce57cf1d 100644 --- a/include/linux/klist.h +++ b/include/linux/klist.h | |||
| @@ -22,7 +22,7 @@ struct klist { | |||
| 22 | struct list_head k_list; | 22 | struct list_head k_list; |
| 23 | void (*get)(struct klist_node *); | 23 | void (*get)(struct klist_node *); |
| 24 | void (*put)(struct klist_node *); | 24 | void (*put)(struct klist_node *); |
| 25 | } __attribute__ ((aligned (4))); | 25 | } __attribute__ ((aligned (sizeof(void *)))); |
| 26 | 26 | ||
| 27 | #define KLIST_INIT(_name, _get, _put) \ | 27 | #define KLIST_INIT(_name, _get, _put) \ |
| 28 | { .k_lock = __SPIN_LOCK_UNLOCKED(_name.k_lock), \ | 28 | { .k_lock = __SPIN_LOCK_UNLOCKED(_name.k_lock), \ |
diff --git a/include/linux/kmemcheck.h b/include/linux/kmemcheck.h index 08d7dc4ddf40..39f8453239f7 100644 --- a/include/linux/kmemcheck.h +++ b/include/linux/kmemcheck.h | |||
| @@ -76,7 +76,7 @@ bool kmemcheck_is_obj_initialized(unsigned long addr, size_t size); | |||
| 76 | \ | 76 | \ |
| 77 | _n = (long) &((ptr)->name##_end) \ | 77 | _n = (long) &((ptr)->name##_end) \ |
| 78 | - (long) &((ptr)->name##_begin); \ | 78 | - (long) &((ptr)->name##_begin); \ |
| 79 | MAYBE_BUILD_BUG_ON(_n < 0); \ | 79 | BUILD_BUG_ON(_n < 0); \ |
| 80 | \ | 80 | \ |
| 81 | kmemcheck_mark_initialized(&((ptr)->name##_begin), _n); \ | 81 | kmemcheck_mark_initialized(&((ptr)->name##_begin), _n); \ |
| 82 | } while (0) | 82 | } while (0) |
diff --git a/include/linux/list_bl.h b/include/linux/list_bl.h index 9ee97e7f2be4..5bad17d1acde 100644 --- a/include/linux/list_bl.h +++ b/include/linux/list_bl.h | |||
| @@ -62,7 +62,8 @@ static inline void hlist_bl_set_first(struct hlist_bl_head *h, | |||
| 62 | struct hlist_bl_node *n) | 62 | struct hlist_bl_node *n) |
| 63 | { | 63 | { |
| 64 | LIST_BL_BUG_ON((unsigned long)n & LIST_BL_LOCKMASK); | 64 | LIST_BL_BUG_ON((unsigned long)n & LIST_BL_LOCKMASK); |
| 65 | LIST_BL_BUG_ON(!((unsigned long)h->first & LIST_BL_LOCKMASK)); | 65 | LIST_BL_BUG_ON(((unsigned long)h->first & LIST_BL_LOCKMASK) != |
| 66 | LIST_BL_LOCKMASK); | ||
| 66 | h->first = (struct hlist_bl_node *)((unsigned long)n | LIST_BL_LOCKMASK); | 67 | h->first = (struct hlist_bl_node *)((unsigned long)n | LIST_BL_LOCKMASK); |
| 67 | } | 68 | } |
| 68 | 69 | ||
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 71c09b26c759..4aef1dda6406 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
| @@ -436,16 +436,8 @@ do { \ | |||
| 436 | #endif /* CONFIG_LOCKDEP */ | 436 | #endif /* CONFIG_LOCKDEP */ |
| 437 | 437 | ||
| 438 | #ifdef CONFIG_TRACE_IRQFLAGS | 438 | #ifdef CONFIG_TRACE_IRQFLAGS |
| 439 | extern void early_boot_irqs_off(void); | ||
| 440 | extern void early_boot_irqs_on(void); | ||
| 441 | extern void print_irqtrace_events(struct task_struct *curr); | 439 | extern void print_irqtrace_events(struct task_struct *curr); |
| 442 | #else | 440 | #else |
| 443 | static inline void early_boot_irqs_off(void) | ||
| 444 | { | ||
| 445 | } | ||
| 446 | static inline void early_boot_irqs_on(void) | ||
| 447 | { | ||
| 448 | } | ||
| 449 | static inline void print_irqtrace_events(struct task_struct *curr) | 441 | static inline void print_irqtrace_events(struct task_struct *curr) |
| 450 | { | 442 | { |
| 451 | } | 443 | } |
| @@ -522,12 +514,15 @@ static inline void print_irqtrace_events(struct task_struct *curr) | |||
| 522 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 514 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
| 523 | # ifdef CONFIG_PROVE_LOCKING | 515 | # ifdef CONFIG_PROVE_LOCKING |
| 524 | # define lock_map_acquire(l) lock_acquire(l, 0, 0, 0, 2, NULL, _THIS_IP_) | 516 | # define lock_map_acquire(l) lock_acquire(l, 0, 0, 0, 2, NULL, _THIS_IP_) |
| 517 | # define lock_map_acquire_read(l) lock_acquire(l, 0, 0, 2, 2, NULL, _THIS_IP_) | ||
| 525 | # else | 518 | # else |
| 526 | # define lock_map_acquire(l) lock_acquire(l, 0, 0, 0, 1, NULL, _THIS_IP_) | 519 | # define lock_map_acquire(l) lock_acquire(l, 0, 0, 0, 1, NULL, _THIS_IP_) |
| 520 | # define lock_map_acquire_read(l) lock_acquire(l, 0, 0, 2, 1, NULL, _THIS_IP_) | ||
| 527 | # endif | 521 | # endif |
| 528 | # define lock_map_release(l) lock_release(l, 1, _THIS_IP_) | 522 | # define lock_map_release(l) lock_release(l, 1, _THIS_IP_) |
| 529 | #else | 523 | #else |
| 530 | # define lock_map_acquire(l) do { } while (0) | 524 | # define lock_map_acquire(l) do { } while (0) |
| 525 | # define lock_map_acquire_read(l) do { } while (0) | ||
| 531 | # define lock_map_release(l) do { } while (0) | 526 | # define lock_map_release(l) do { } while (0) |
| 532 | #endif | 527 | #endif |
| 533 | 528 | ||
diff --git a/include/linux/magic.h b/include/linux/magic.h index ff690d05f129..62730ea2b56e 100644 --- a/include/linux/magic.h +++ b/include/linux/magic.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #define TMPFS_MAGIC 0x01021994 | 16 | #define TMPFS_MAGIC 0x01021994 |
| 17 | #define HUGETLBFS_MAGIC 0x958458f6 /* some random number */ | 17 | #define HUGETLBFS_MAGIC 0x958458f6 /* some random number */ |
| 18 | #define SQUASHFS_MAGIC 0x73717368 | 18 | #define SQUASHFS_MAGIC 0x73717368 |
| 19 | #define ECRYPTFS_SUPER_MAGIC 0xf15f | ||
| 19 | #define EFS_SUPER_MAGIC 0x414A53 | 20 | #define EFS_SUPER_MAGIC 0x414A53 |
| 20 | #define EXT2_SUPER_MAGIC 0xEF53 | 21 | #define EXT2_SUPER_MAGIC 0xEF53 |
| 21 | #define EXT3_SUPER_MAGIC 0xEF53 | 22 | #define EXT3_SUPER_MAGIC 0xEF53 |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 159a0762aeaf..f512e189be5a 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
| @@ -25,6 +25,11 @@ struct page_cgroup; | |||
| 25 | struct page; | 25 | struct page; |
| 26 | struct mm_struct; | 26 | struct mm_struct; |
| 27 | 27 | ||
| 28 | /* Stats that can be updated by kernel. */ | ||
| 29 | enum mem_cgroup_page_stat_item { | ||
| 30 | MEMCG_NR_FILE_MAPPED, /* # of pages charged as file rss */ | ||
| 31 | }; | ||
| 32 | |||
| 28 | extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, | 33 | extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, |
| 29 | struct list_head *dst, | 34 | struct list_head *dst, |
| 30 | unsigned long *scanned, int order, | 35 | unsigned long *scanned, int order, |
| @@ -93,7 +98,7 @@ extern int | |||
| 93 | mem_cgroup_prepare_migration(struct page *page, | 98 | mem_cgroup_prepare_migration(struct page *page, |
| 94 | struct page *newpage, struct mem_cgroup **ptr); | 99 | struct page *newpage, struct mem_cgroup **ptr); |
| 95 | extern void mem_cgroup_end_migration(struct mem_cgroup *mem, | 100 | extern void mem_cgroup_end_migration(struct mem_cgroup *mem, |
| 96 | struct page *oldpage, struct page *newpage); | 101 | struct page *oldpage, struct page *newpage, bool migration_ok); |
| 97 | 102 | ||
| 98 | /* | 103 | /* |
| 99 | * For memory reclaim. | 104 | * For memory reclaim. |
| @@ -121,11 +126,30 @@ static inline bool mem_cgroup_disabled(void) | |||
| 121 | return false; | 126 | return false; |
| 122 | } | 127 | } |
| 123 | 128 | ||
| 124 | void mem_cgroup_update_file_mapped(struct page *page, int val); | 129 | void mem_cgroup_update_page_stat(struct page *page, |
| 130 | enum mem_cgroup_page_stat_item idx, | ||
| 131 | int val); | ||
| 132 | |||
| 133 | static inline void mem_cgroup_inc_page_stat(struct page *page, | ||
| 134 | enum mem_cgroup_page_stat_item idx) | ||
| 135 | { | ||
| 136 | mem_cgroup_update_page_stat(page, idx, 1); | ||
| 137 | } | ||
| 138 | |||
| 139 | static inline void mem_cgroup_dec_page_stat(struct page *page, | ||
| 140 | enum mem_cgroup_page_stat_item idx) | ||
| 141 | { | ||
| 142 | mem_cgroup_update_page_stat(page, idx, -1); | ||
| 143 | } | ||
| 144 | |||
| 125 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, | 145 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, |
| 126 | gfp_t gfp_mask); | 146 | gfp_t gfp_mask); |
| 127 | u64 mem_cgroup_get_limit(struct mem_cgroup *mem); | 147 | u64 mem_cgroup_get_limit(struct mem_cgroup *mem); |
| 128 | 148 | ||
| 149 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
| 150 | void mem_cgroup_split_huge_fixup(struct page *head, struct page *tail); | ||
| 151 | #endif | ||
| 152 | |||
| 129 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ | 153 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ |
| 130 | struct mem_cgroup; | 154 | struct mem_cgroup; |
| 131 | 155 | ||
| @@ -231,8 +255,7 @@ mem_cgroup_prepare_migration(struct page *page, struct page *newpage, | |||
| 231 | } | 255 | } |
| 232 | 256 | ||
| 233 | static inline void mem_cgroup_end_migration(struct mem_cgroup *mem, | 257 | static inline void mem_cgroup_end_migration(struct mem_cgroup *mem, |
| 234 | struct page *oldpage, | 258 | struct page *oldpage, struct page *newpage, bool migration_ok) |
| 235 | struct page *newpage) | ||
| 236 | { | 259 | { |
| 237 | } | 260 | } |
| 238 | 261 | ||
| @@ -293,8 +316,13 @@ mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p) | |||
| 293 | { | 316 | { |
| 294 | } | 317 | } |
| 295 | 318 | ||
| 296 | static inline void mem_cgroup_update_file_mapped(struct page *page, | 319 | static inline void mem_cgroup_inc_page_stat(struct page *page, |
| 297 | int val) | 320 | enum mem_cgroup_page_stat_item idx) |
| 321 | { | ||
| 322 | } | ||
| 323 | |||
| 324 | static inline void mem_cgroup_dec_page_stat(struct page *page, | ||
| 325 | enum mem_cgroup_page_stat_item idx) | ||
| 298 | { | 326 | { |
| 299 | } | 327 | } |
| 300 | 328 | ||
| @@ -311,6 +339,11 @@ u64 mem_cgroup_get_limit(struct mem_cgroup *mem) | |||
| 311 | return 0; | 339 | return 0; |
| 312 | } | 340 | } |
| 313 | 341 | ||
| 342 | static inline void mem_cgroup_split_huge_fixup(struct page *head, | ||
| 343 | struct page *tail) | ||
| 344 | { | ||
| 345 | } | ||
| 346 | |||
| 314 | #endif /* CONFIG_CGROUP_MEM_CONT */ | 347 | #endif /* CONFIG_CGROUP_MEM_CONT */ |
| 315 | 348 | ||
| 316 | #endif /* _LINUX_MEMCONTROL_H */ | 349 | #endif /* _LINUX_MEMCONTROL_H */ |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 31c237a00c48..8122018d3000 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
| @@ -13,12 +13,16 @@ struct mem_section; | |||
| 13 | #ifdef CONFIG_MEMORY_HOTPLUG | 13 | #ifdef CONFIG_MEMORY_HOTPLUG |
| 14 | 14 | ||
| 15 | /* | 15 | /* |
| 16 | * Types for free bootmem. | 16 | * Types for free bootmem stored in page->lru.next. These have to be in |
| 17 | * The normal smallest mapcount is -1. Here is smaller value than it. | 17 | * some random range in unsigned long space for debugging purposes. |
| 18 | */ | 18 | */ |
| 19 | #define SECTION_INFO (-1 - 1) | 19 | enum { |
| 20 | #define MIX_SECTION_INFO (-1 - 2) | 20 | MEMORY_HOTPLUG_MIN_BOOTMEM_TYPE = 12, |
| 21 | #define NODE_INFO (-1 - 3) | 21 | SECTION_INFO = MEMORY_HOTPLUG_MIN_BOOTMEM_TYPE, |
| 22 | MIX_SECTION_INFO, | ||
| 23 | NODE_INFO, | ||
| 24 | MEMORY_HOTPLUG_MAX_BOOTMEM_TYPE = NODE_INFO, | ||
| 25 | }; | ||
| 22 | 26 | ||
| 23 | /* | 27 | /* |
| 24 | * pgdat resizing functions | 28 | * pgdat resizing functions |
| @@ -161,6 +165,12 @@ extern void register_page_bootmem_info_node(struct pglist_data *pgdat); | |||
| 161 | extern void put_page_bootmem(struct page *page); | 165 | extern void put_page_bootmem(struct page *page); |
| 162 | #endif | 166 | #endif |
| 163 | 167 | ||
| 168 | /* | ||
| 169 | * Lock for memory hotplug guarantees 1) all callbacks for memory hotplug | ||
| 170 | * notifier will be called under this. 2) offline/online/add/remove memory | ||
| 171 | * will not run simultaneously. | ||
| 172 | */ | ||
| 173 | |||
| 164 | void lock_memory_hotplug(void); | 174 | void lock_memory_hotplug(void); |
| 165 | void unlock_memory_hotplug(void); | 175 | void unlock_memory_hotplug(void); |
| 166 | 176 | ||
diff --git a/include/linux/mfd/ab8500.h b/include/linux/mfd/ab8500.h index 85cf2c28fac6..37f56b7c4c15 100644 --- a/include/linux/mfd/ab8500.h +++ b/include/linux/mfd/ab8500.h | |||
| @@ -74,30 +74,37 @@ | |||
| 74 | #define AB8500_INT_ACC_DETECT_21DB_F 37 | 74 | #define AB8500_INT_ACC_DETECT_21DB_F 37 |
| 75 | #define AB8500_INT_ACC_DETECT_21DB_R 38 | 75 | #define AB8500_INT_ACC_DETECT_21DB_R 38 |
| 76 | #define AB8500_INT_GP_SW_ADC_CONV_END 39 | 76 | #define AB8500_INT_GP_SW_ADC_CONV_END 39 |
| 77 | #define AB8500_INT_BTEMP_LOW 72 | 77 | #define AB8500_INT_ADP_SOURCE_ERROR 72 |
| 78 | #define AB8500_INT_BTEMP_LOW_MEDIUM 73 | 78 | #define AB8500_INT_ADP_SINK_ERROR 73 |
| 79 | #define AB8500_INT_BTEMP_MEDIUM_HIGH 74 | 79 | #define AB8500_INT_ADP_PROBE_PLUG 74 |
| 80 | #define AB8500_INT_BTEMP_HIGH 75 | 80 | #define AB8500_INT_ADP_PROBE_UNPLUG 75 |
| 81 | #define AB8500_INT_USB_CHARGER_NOT_OK 81 | 81 | #define AB8500_INT_ADP_SENSE_OFF 76 |
| 82 | #define AB8500_INT_ID_WAKEUP_R 82 | 82 | #define AB8500_INT_USB_PHY_POWER_ERR 78 |
| 83 | #define AB8500_INT_ID_DET_R1R 84 | 83 | #define AB8500_INT_USB_LINK_STATUS 79 |
| 84 | #define AB8500_INT_ID_DET_R2R 85 | 84 | #define AB8500_INT_BTEMP_LOW 80 |
| 85 | #define AB8500_INT_ID_DET_R3R 86 | 85 | #define AB8500_INT_BTEMP_LOW_MEDIUM 81 |
| 86 | #define AB8500_INT_ID_DET_R4R 87 | 86 | #define AB8500_INT_BTEMP_MEDIUM_HIGH 82 |
| 87 | #define AB8500_INT_ID_WAKEUP_F 88 | 87 | #define AB8500_INT_BTEMP_HIGH 83 |
| 88 | #define AB8500_INT_ID_DET_R1F 90 | 88 | #define AB8500_INT_USB_CHARGER_NOT_OK 89 |
| 89 | #define AB8500_INT_ID_DET_R2F 91 | 89 | #define AB8500_INT_ID_WAKEUP_R 90 |
| 90 | #define AB8500_INT_ID_DET_R3F 92 | 90 | #define AB8500_INT_ID_DET_R1R 92 |
| 91 | #define AB8500_INT_ID_DET_R4F 93 | 91 | #define AB8500_INT_ID_DET_R2R 93 |
| 92 | #define AB8500_INT_USB_CHG_DET_DONE 94 | 92 | #define AB8500_INT_ID_DET_R3R 94 |
| 93 | #define AB8500_INT_USB_CH_TH_PROT_F 96 | 93 | #define AB8500_INT_ID_DET_R4R 95 |
| 94 | #define AB8500_INT_USB_CH_TH_PROP_R 97 | 94 | #define AB8500_INT_ID_WAKEUP_F 96 |
| 95 | #define AB8500_INT_MAIN_CH_TH_PROP_F 98 | 95 | #define AB8500_INT_ID_DET_R1F 98 |
| 96 | #define AB8500_INT_MAIN_CH_TH_PROT_R 99 | 96 | #define AB8500_INT_ID_DET_R2F 99 |
| 97 | #define AB8500_INT_USB_CHARGER_NOT_OKF 103 | 97 | #define AB8500_INT_ID_DET_R3F 100 |
| 98 | #define AB8500_INT_ID_DET_R4F 101 | ||
| 99 | #define AB8500_INT_USB_CHG_DET_DONE 102 | ||
| 100 | #define AB8500_INT_USB_CH_TH_PROT_F 104 | ||
| 101 | #define AB8500_INT_USB_CH_TH_PROT_R 105 | ||
| 102 | #define AB8500_INT_MAIN_CH_TH_PROT_F 106 | ||
| 103 | #define AB8500_INT_MAIN_CH_TH_PROT_R 107 | ||
| 104 | #define AB8500_INT_USB_CHARGER_NOT_OKF 111 | ||
| 98 | 105 | ||
| 99 | #define AB8500_NR_IRQS 104 | 106 | #define AB8500_NR_IRQS 112 |
| 100 | #define AB8500_NUM_IRQ_REGS 13 | 107 | #define AB8500_NUM_IRQ_REGS 14 |
| 101 | 108 | ||
| 102 | /** | 109 | /** |
| 103 | * struct ab8500 - ab8500 internal structure | 110 | * struct ab8500 - ab8500 internal structure |
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index 5582ab3d3e48..835996e167e1 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h | |||
| @@ -47,6 +47,12 @@ struct mfd_cell { | |||
| 47 | 47 | ||
| 48 | /* don't check for resource conflicts */ | 48 | /* don't check for resource conflicts */ |
| 49 | bool ignore_resource_conflicts; | 49 | bool ignore_resource_conflicts; |
| 50 | |||
| 51 | /* | ||
| 52 | * Disable runtime PM callbacks for this subdevice - see | ||
| 53 | * pm_runtime_no_callbacks(). | ||
| 54 | */ | ||
| 55 | bool pm_runtime_no_callbacks; | ||
| 50 | }; | 56 | }; |
| 51 | 57 | ||
| 52 | extern int mfd_add_devices(struct device *parent, int id, | 58 | extern int mfd_add_devices(struct device *parent, int id, |
diff --git a/include/linux/mfd/max8998-private.h b/include/linux/mfd/max8998-private.h index 7363dea6bbcd..effa5d3b96ae 100644 --- a/include/linux/mfd/max8998-private.h +++ b/include/linux/mfd/max8998-private.h | |||
| @@ -159,10 +159,12 @@ struct max8998_dev { | |||
| 159 | u8 irq_masks_cur[MAX8998_NUM_IRQ_REGS]; | 159 | u8 irq_masks_cur[MAX8998_NUM_IRQ_REGS]; |
| 160 | u8 irq_masks_cache[MAX8998_NUM_IRQ_REGS]; | 160 | u8 irq_masks_cache[MAX8998_NUM_IRQ_REGS]; |
| 161 | int type; | 161 | int type; |
| 162 | bool wakeup; | ||
| 162 | }; | 163 | }; |
| 163 | 164 | ||
| 164 | int max8998_irq_init(struct max8998_dev *max8998); | 165 | int max8998_irq_init(struct max8998_dev *max8998); |
| 165 | void max8998_irq_exit(struct max8998_dev *max8998); | 166 | void max8998_irq_exit(struct max8998_dev *max8998); |
| 167 | int max8998_irq_resume(struct max8998_dev *max8998); | ||
| 166 | 168 | ||
| 167 | extern int max8998_read_reg(struct i2c_client *i2c, u8 reg, u8 *dest); | 169 | extern int max8998_read_reg(struct i2c_client *i2c, u8 reg, u8 *dest); |
| 168 | extern int max8998_bulk_read(struct i2c_client *i2c, u8 reg, int count, | 170 | extern int max8998_bulk_read(struct i2c_client *i2c, u8 reg, int count, |
diff --git a/include/linux/mfd/max8998.h b/include/linux/mfd/max8998.h index f8c9f884aff2..61daa167b576 100644 --- a/include/linux/mfd/max8998.h +++ b/include/linux/mfd/max8998.h | |||
| @@ -70,24 +70,43 @@ struct max8998_regulator_data { | |||
| 70 | * @num_regulators: number of regultors used | 70 | * @num_regulators: number of regultors used |
| 71 | * @irq_base: base IRQ number for max8998, required for IRQs | 71 | * @irq_base: base IRQ number for max8998, required for IRQs |
| 72 | * @ono: power onoff IRQ number for max8998 | 72 | * @ono: power onoff IRQ number for max8998 |
| 73 | * @buck1_max_voltage1: BUCK1 maximum alowed voltage register 1 | 73 | * @buck_voltage_lock: Do NOT change the values of the following six |
| 74 | * @buck1_max_voltage2: BUCK1 maximum alowed voltage register 2 | 74 | * registers set by buck?_voltage?. The voltage of BUCK1/2 cannot |
| 75 | * @buck2_max_voltage: BUCK2 maximum alowed voltage | 75 | * be other than the preset values. |
| 76 | * @buck1_voltage1: BUCK1 DVS mode 1 voltage register | ||
| 77 | * @buck1_voltage2: BUCK1 DVS mode 2 voltage register | ||
| 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 | ||
| 76 | * @buck1_set1: BUCK1 gpio pin 1 to set output voltage | 82 | * @buck1_set1: BUCK1 gpio pin 1 to set output voltage |
| 77 | * @buck1_set2: BUCK1 gpio pin 2 to set output voltage | 83 | * @buck1_set2: BUCK1 gpio pin 2 to set output voltage |
| 84 | * @buck1_default_idx: Default for BUCK1 gpio pin 1, 2 | ||
| 78 | * @buck2_set3: BUCK2 gpio pin to set output voltage | 85 | * @buck2_set3: BUCK2 gpio pin to set output voltage |
| 86 | * @buck2_default_idx: Default for BUCK2 gpio pin. | ||
| 87 | * @wakeup: Allow to wake up from suspend | ||
| 88 | * @rtc_delay: LP3974 RTC chip bug that requires delay after a register | ||
| 89 | * write before reading it. | ||
| 79 | */ | 90 | */ |
| 80 | struct max8998_platform_data { | 91 | struct max8998_platform_data { |
| 81 | struct max8998_regulator_data *regulators; | 92 | struct max8998_regulator_data *regulators; |
| 82 | int num_regulators; | 93 | int num_regulators; |
| 83 | int irq_base; | 94 | int irq_base; |
| 84 | int ono; | 95 | int ono; |
| 85 | int buck1_max_voltage1; | 96 | bool buck_voltage_lock; |
| 86 | int buck1_max_voltage2; | 97 | int buck1_voltage1; |
| 87 | int buck2_max_voltage; | 98 | int buck1_voltage2; |
| 99 | int buck1_voltage3; | ||
| 100 | int buck1_voltage4; | ||
| 101 | int buck2_voltage1; | ||
| 102 | int buck2_voltage2; | ||
| 88 | int buck1_set1; | 103 | int buck1_set1; |
| 89 | int buck1_set2; | 104 | int buck1_set2; |
| 105 | int buck1_default_idx; | ||
| 90 | int buck2_set3; | 106 | int buck2_set3; |
| 107 | int buck2_default_idx; | ||
| 108 | bool wakeup; | ||
| 109 | bool rtc_delay; | ||
| 91 | }; | 110 | }; |
| 92 | 111 | ||
| 93 | #endif /* __LINUX_MFD_MAX8998_H */ | 112 | #endif /* __LINUX_MFD_MAX8998_H */ |
diff --git a/include/linux/mfd/wm831x/core.h b/include/linux/mfd/wm831x/core.h index a1239c48b41a..903280d21866 100644 --- a/include/linux/mfd/wm831x/core.h +++ b/include/linux/mfd/wm831x/core.h | |||
| @@ -245,6 +245,7 @@ enum wm831x_parent { | |||
| 245 | WM8320 = 0x8320, | 245 | WM8320 = 0x8320, |
| 246 | WM8321 = 0x8321, | 246 | WM8321 = 0x8321, |
| 247 | WM8325 = 0x8325, | 247 | WM8325 = 0x8325, |
| 248 | WM8326 = 0x8326, | ||
| 248 | }; | 249 | }; |
| 249 | 250 | ||
| 250 | struct wm831x { | 251 | struct wm831x { |
diff --git a/include/linux/migrate.h b/include/linux/migrate.h index 085527fb8261..e39aeecfe9a2 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h | |||
| @@ -13,9 +13,11 @@ extern void putback_lru_pages(struct list_head *l); | |||
| 13 | extern int migrate_page(struct address_space *, | 13 | extern int migrate_page(struct address_space *, |
| 14 | struct page *, struct page *); | 14 | struct page *, struct page *); |
| 15 | extern int migrate_pages(struct list_head *l, new_page_t x, | 15 | extern int migrate_pages(struct list_head *l, new_page_t x, |
| 16 | unsigned long private, int offlining); | 16 | unsigned long private, bool offlining, |
| 17 | bool sync); | ||
| 17 | extern int migrate_huge_pages(struct list_head *l, new_page_t x, | 18 | extern int migrate_huge_pages(struct list_head *l, new_page_t x, |
| 18 | unsigned long private, int offlining); | 19 | unsigned long private, bool offlining, |
| 20 | bool sync); | ||
| 19 | 21 | ||
| 20 | extern int fail_migrate_page(struct address_space *, | 22 | extern int fail_migrate_page(struct address_space *, |
| 21 | struct page *, struct page *); | 23 | struct page *, struct page *); |
| @@ -33,9 +35,11 @@ extern int migrate_huge_page_move_mapping(struct address_space *mapping, | |||
| 33 | 35 | ||
| 34 | static inline void putback_lru_pages(struct list_head *l) {} | 36 | static inline void putback_lru_pages(struct list_head *l) {} |
| 35 | static inline int migrate_pages(struct list_head *l, new_page_t x, | 37 | static inline int migrate_pages(struct list_head *l, new_page_t x, |
| 36 | unsigned long private, int offlining) { return -ENOSYS; } | 38 | unsigned long private, bool offlining, |
| 39 | bool sync) { return -ENOSYS; } | ||
| 37 | static inline int migrate_huge_pages(struct list_head *l, new_page_t x, | 40 | static inline int migrate_huge_pages(struct list_head *l, new_page_t x, |
| 38 | unsigned long private, int offlining) { return -ENOSYS; } | 41 | unsigned long private, bool offlining, |
| 42 | bool sync) { return -ENOSYS; } | ||
| 39 | 43 | ||
| 40 | static inline int migrate_prep(void) { return -ENOSYS; } | 44 | static inline int migrate_prep(void) { return -ENOSYS; } |
| 41 | static inline int migrate_prep_local(void) { return -ENOSYS; } | 45 | static inline int migrate_prep_local(void) { return -ENOSYS; } |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index a7b15bc7648e..049214642036 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
| @@ -144,6 +144,11 @@ enum { | |||
| 144 | MLX4_STAT_RATE_OFFSET = 5 | 144 | MLX4_STAT_RATE_OFFSET = 5 |
| 145 | }; | 145 | }; |
| 146 | 146 | ||
| 147 | enum mlx4_protocol { | ||
| 148 | MLX4_PROTOCOL_IB, | ||
| 149 | MLX4_PROTOCOL_EN, | ||
| 150 | }; | ||
| 151 | |||
| 147 | enum { | 152 | enum { |
| 148 | MLX4_MTT_FLAG_PRESENT = 1 | 153 | MLX4_MTT_FLAG_PRESENT = 1 |
| 149 | }; | 154 | }; |
| @@ -500,8 +505,9 @@ int mlx4_INIT_PORT(struct mlx4_dev *dev, int port); | |||
| 500 | int mlx4_CLOSE_PORT(struct mlx4_dev *dev, int port); | 505 | int mlx4_CLOSE_PORT(struct mlx4_dev *dev, int port); |
| 501 | 506 | ||
| 502 | int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], | 507 | int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], |
| 503 | int block_mcast_loopback); | 508 | int block_mcast_loopback, enum mlx4_protocol protocol); |
| 504 | int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]); | 509 | int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], |
| 510 | enum mlx4_protocol protocol); | ||
| 505 | 511 | ||
| 506 | int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *index); | 512 | int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *index); |
| 507 | void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int index); | 513 | void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int index); |
diff --git a/include/linux/mlx4/driver.h b/include/linux/mlx4/driver.h index f407cd4bfb34..e1eebf78caba 100644 --- a/include/linux/mlx4/driver.h +++ b/include/linux/mlx4/driver.h | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | #define MLX4_DRIVER_H | 34 | #define MLX4_DRIVER_H |
| 35 | 35 | ||
| 36 | #include <linux/device.h> | 36 | #include <linux/device.h> |
| 37 | #include <linux/mlx4/device.h> | ||
| 37 | 38 | ||
| 38 | struct mlx4_dev; | 39 | struct mlx4_dev; |
| 39 | 40 | ||
| @@ -44,11 +45,6 @@ enum mlx4_dev_event { | |||
| 44 | MLX4_DEV_EVENT_PORT_REINIT, | 45 | MLX4_DEV_EVENT_PORT_REINIT, |
| 45 | }; | 46 | }; |
| 46 | 47 | ||
| 47 | enum mlx4_protocol { | ||
| 48 | MLX4_PROTOCOL_IB, | ||
| 49 | MLX4_PROTOCOL_EN, | ||
| 50 | }; | ||
| 51 | |||
| 52 | struct mlx4_interface { | 48 | struct mlx4_interface { |
| 53 | void * (*add) (struct mlx4_dev *dev); | 49 | void * (*add) (struct mlx4_dev *dev); |
| 54 | void (*remove)(struct mlx4_dev *dev, void *context); | 50 | void (*remove)(struct mlx4_dev *dev, void *context); |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 721f451c3029..f6385fc17ad4 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/mm_types.h> | 14 | #include <linux/mm_types.h> |
| 15 | #include <linux/range.h> | 15 | #include <linux/range.h> |
| 16 | #include <linux/pfn.h> | 16 | #include <linux/pfn.h> |
| 17 | #include <linux/bit_spinlock.h> | ||
| 17 | 18 | ||
| 18 | struct mempolicy; | 19 | struct mempolicy; |
| 19 | struct anon_vma; | 20 | struct anon_vma; |
| @@ -82,6 +83,7 @@ extern unsigned int kobjsize(const void *objp); | |||
| 82 | #define VM_GROWSUP 0x00000200 | 83 | #define VM_GROWSUP 0x00000200 |
| 83 | #else | 84 | #else |
| 84 | #define VM_GROWSUP 0x00000000 | 85 | #define VM_GROWSUP 0x00000000 |
| 86 | #define VM_NOHUGEPAGE 0x00000200 /* MADV_NOHUGEPAGE marked this vma */ | ||
| 85 | #endif | 87 | #endif |
| 86 | #define VM_PFNMAP 0x00000400 /* Page-ranges managed without "struct page", just pure PFN */ | 88 | #define VM_PFNMAP 0x00000400 /* Page-ranges managed without "struct page", just pure PFN */ |
| 87 | #define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */ | 89 | #define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */ |
| @@ -101,7 +103,11 @@ extern unsigned int kobjsize(const void *objp); | |||
| 101 | #define VM_NORESERVE 0x00200000 /* should the VM suppress accounting */ | 103 | #define VM_NORESERVE 0x00200000 /* should the VM suppress accounting */ |
| 102 | #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */ | 104 | #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */ |
| 103 | #define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */ | 105 | #define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */ |
| 106 | #ifndef CONFIG_TRANSPARENT_HUGEPAGE | ||
| 104 | #define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */ | 107 | #define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */ |
| 108 | #else | ||
| 109 | #define VM_HUGEPAGE 0x01000000 /* MADV_HUGEPAGE marked this vma */ | ||
| 110 | #endif | ||
| 105 | #define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it */ | 111 | #define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it */ |
| 106 | #define VM_ALWAYSDUMP 0x04000000 /* Always include in core dumps */ | 112 | #define VM_ALWAYSDUMP 0x04000000 /* Always include in core dumps */ |
| 107 | 113 | ||
| @@ -242,6 +248,7 @@ struct inode; | |||
| 242 | * files which need it (119 of them) | 248 | * files which need it (119 of them) |
| 243 | */ | 249 | */ |
| 244 | #include <linux/page-flags.h> | 250 | #include <linux/page-flags.h> |
| 251 | #include <linux/huge_mm.h> | ||
| 245 | 252 | ||
| 246 | /* | 253 | /* |
| 247 | * Methods to modify the page usage count. | 254 | * Methods to modify the page usage count. |
| @@ -305,6 +312,39 @@ static inline int is_vmalloc_or_module_addr(const void *x) | |||
| 305 | } | 312 | } |
| 306 | #endif | 313 | #endif |
| 307 | 314 | ||
| 315 | static inline void compound_lock(struct page *page) | ||
| 316 | { | ||
| 317 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
| 318 | bit_spin_lock(PG_compound_lock, &page->flags); | ||
| 319 | #endif | ||
| 320 | } | ||
| 321 | |||
| 322 | static inline void compound_unlock(struct page *page) | ||
| 323 | { | ||
| 324 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
| 325 | bit_spin_unlock(PG_compound_lock, &page->flags); | ||
| 326 | #endif | ||
| 327 | } | ||
| 328 | |||
| 329 | static inline unsigned long compound_lock_irqsave(struct page *page) | ||
| 330 | { | ||
| 331 | unsigned long uninitialized_var(flags); | ||
| 332 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
| 333 | local_irq_save(flags); | ||
| 334 | compound_lock(page); | ||
| 335 | #endif | ||
| 336 | return flags; | ||
| 337 | } | ||
| 338 | |||
| 339 | static inline void compound_unlock_irqrestore(struct page *page, | ||
| 340 | unsigned long flags) | ||
| 341 | { | ||
| 342 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
| 343 | compound_unlock(page); | ||
| 344 | local_irq_restore(flags); | ||
| 345 | #endif | ||
| 346 | } | ||
| 347 | |||
| 308 | static inline struct page *compound_head(struct page *page) | 348 | static inline struct page *compound_head(struct page *page) |
| 309 | { | 349 | { |
| 310 | if (unlikely(PageTail(page))) | 350 | if (unlikely(PageTail(page))) |
| @@ -319,9 +359,29 @@ static inline int page_count(struct page *page) | |||
| 319 | 359 | ||
| 320 | static inline void get_page(struct page *page) | 360 | static inline void get_page(struct page *page) |
| 321 | { | 361 | { |
| 322 | page = compound_head(page); | 362 | /* |
| 323 | VM_BUG_ON(atomic_read(&page->_count) == 0); | 363 | * Getting a normal page or the head of a compound page |
| 364 | * requires to already have an elevated page->_count. Only if | ||
| 365 | * we're getting a tail page, the elevated page->_count is | ||
| 366 | * required only in the head page, so for tail pages the | ||
| 367 | * bugcheck only verifies that the page->_count isn't | ||
| 368 | * negative. | ||
| 369 | */ | ||
| 370 | VM_BUG_ON(atomic_read(&page->_count) < !PageTail(page)); | ||
| 324 | atomic_inc(&page->_count); | 371 | atomic_inc(&page->_count); |
| 372 | /* | ||
| 373 | * Getting a tail page will elevate both the head and tail | ||
| 374 | * page->_count(s). | ||
| 375 | */ | ||
| 376 | if (unlikely(PageTail(page))) { | ||
| 377 | /* | ||
| 378 | * This is safe only because | ||
| 379 | * __split_huge_page_refcount can't run under | ||
| 380 | * get_page(). | ||
| 381 | */ | ||
| 382 | VM_BUG_ON(atomic_read(&page->first_page->_count) <= 0); | ||
| 383 | atomic_inc(&page->first_page->_count); | ||
| 384 | } | ||
| 325 | } | 385 | } |
| 326 | 386 | ||
| 327 | static inline struct page *virt_to_head_page(const void *x) | 387 | static inline struct page *virt_to_head_page(const void *x) |
| @@ -339,6 +399,27 @@ static inline void init_page_count(struct page *page) | |||
| 339 | atomic_set(&page->_count, 1); | 399 | atomic_set(&page->_count, 1); |
| 340 | } | 400 | } |
| 341 | 401 | ||
| 402 | /* | ||
| 403 | * PageBuddy() indicate that the page is free and in the buddy system | ||
| 404 | * (see mm/page_alloc.c). | ||
| 405 | */ | ||
| 406 | static inline int PageBuddy(struct page *page) | ||
| 407 | { | ||
| 408 | return atomic_read(&page->_mapcount) == -2; | ||
| 409 | } | ||
| 410 | |||
| 411 | static inline void __SetPageBuddy(struct page *page) | ||
| 412 | { | ||
| 413 | VM_BUG_ON(atomic_read(&page->_mapcount) != -1); | ||
| 414 | atomic_set(&page->_mapcount, -2); | ||
| 415 | } | ||
| 416 | |||
| 417 | static inline void __ClearPageBuddy(struct page *page) | ||
| 418 | { | ||
| 419 | VM_BUG_ON(!PageBuddy(page)); | ||
| 420 | atomic_set(&page->_mapcount, -1); | ||
| 421 | } | ||
| 422 | |||
| 342 | void put_page(struct page *page); | 423 | void put_page(struct page *page); |
| 343 | void put_pages_list(struct list_head *pages); | 424 | void put_pages_list(struct list_head *pages); |
| 344 | 425 | ||
| @@ -370,11 +451,40 @@ static inline int compound_order(struct page *page) | |||
| 370 | return (unsigned long)page[1].lru.prev; | 451 | return (unsigned long)page[1].lru.prev; |
| 371 | } | 452 | } |
| 372 | 453 | ||
| 454 | static inline int compound_trans_order(struct page *page) | ||
| 455 | { | ||
| 456 | int order; | ||
| 457 | unsigned long flags; | ||
| 458 | |||
| 459 | if (!PageHead(page)) | ||
| 460 | return 0; | ||
| 461 | |||
| 462 | flags = compound_lock_irqsave(page); | ||
| 463 | order = compound_order(page); | ||
| 464 | compound_unlock_irqrestore(page, flags); | ||
| 465 | return order; | ||
| 466 | } | ||
| 467 | |||
| 373 | static inline void set_compound_order(struct page *page, unsigned long order) | 468 | static inline void set_compound_order(struct page *page, unsigned long order) |
| 374 | { | 469 | { |
| 375 | page[1].lru.prev = (void *)order; | 470 | page[1].lru.prev = (void *)order; |
| 376 | } | 471 | } |
| 377 | 472 | ||
| 473 | #ifdef CONFIG_MMU | ||
| 474 | /* | ||
| 475 | * Do pte_mkwrite, but only if the vma says VM_WRITE. We do this when | ||
| 476 | * servicing faults for write access. In the normal case, do always want | ||
| 477 | * pte_mkwrite. But get_user_pages can cause write faults for mappings | ||
| 478 | * that do not have writing enabled, when used by access_process_vm. | ||
| 479 | */ | ||
| 480 | static inline pte_t maybe_mkwrite(pte_t pte, struct vm_area_struct *vma) | ||
| 481 | { | ||
| 482 | if (likely(vma->vm_flags & VM_WRITE)) | ||
| 483 | pte = pte_mkwrite(pte); | ||
| 484 | return pte; | ||
| 485 | } | ||
| 486 | #endif | ||
| 487 | |||
| 378 | /* | 488 | /* |
| 379 | * Multiple processes may "see" the same page. E.g. for untouched | 489 | * Multiple processes may "see" the same page. E.g. for untouched |
| 380 | * mappings of /dev/null, all processes see the same page full of | 490 | * mappings of /dev/null, all processes see the same page full of |
| @@ -657,7 +767,7 @@ static inline struct address_space *page_mapping(struct page *page) | |||
| 657 | VM_BUG_ON(PageSlab(page)); | 767 | VM_BUG_ON(PageSlab(page)); |
| 658 | if (unlikely(PageSwapCache(page))) | 768 | if (unlikely(PageSwapCache(page))) |
| 659 | mapping = &swapper_space; | 769 | mapping = &swapper_space; |
| 660 | else if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON)) | 770 | else if ((unsigned long)mapping & PAGE_MAPPING_ANON) |
| 661 | mapping = NULL; | 771 | mapping = NULL; |
| 662 | return mapping; | 772 | return mapping; |
| 663 | } | 773 | } |
| @@ -1064,7 +1174,8 @@ static inline int __pmd_alloc(struct mm_struct *mm, pud_t *pud, | |||
| 1064 | int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address); | 1174 | int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address); |
| 1065 | #endif | 1175 | #endif |
| 1066 | 1176 | ||
| 1067 | int __pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address); | 1177 | int __pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma, |
| 1178 | pmd_t *pmd, unsigned long address); | ||
| 1068 | int __pte_alloc_kernel(pmd_t *pmd, unsigned long address); | 1179 | int __pte_alloc_kernel(pmd_t *pmd, unsigned long address); |
| 1069 | 1180 | ||
| 1070 | /* | 1181 | /* |
| @@ -1133,16 +1244,18 @@ static inline void pgtable_page_dtor(struct page *page) | |||
| 1133 | pte_unmap(pte); \ | 1244 | pte_unmap(pte); \ |
| 1134 | } while (0) | 1245 | } while (0) |
| 1135 | 1246 | ||
| 1136 | #define pte_alloc_map(mm, pmd, address) \ | 1247 | #define pte_alloc_map(mm, vma, pmd, address) \ |
| 1137 | ((unlikely(!pmd_present(*(pmd))) && __pte_alloc(mm, pmd, address))? \ | 1248 | ((unlikely(pmd_none(*(pmd))) && __pte_alloc(mm, vma, \ |
| 1138 | NULL: pte_offset_map(pmd, address)) | 1249 | pmd, address))? \ |
| 1250 | NULL: pte_offset_map(pmd, address)) | ||
| 1139 | 1251 | ||
| 1140 | #define pte_alloc_map_lock(mm, pmd, address, ptlp) \ | 1252 | #define pte_alloc_map_lock(mm, pmd, address, ptlp) \ |
| 1141 | ((unlikely(!pmd_present(*(pmd))) && __pte_alloc(mm, pmd, address))? \ | 1253 | ((unlikely(pmd_none(*(pmd))) && __pte_alloc(mm, NULL, \ |
| 1254 | pmd, address))? \ | ||
| 1142 | NULL: pte_offset_map_lock(mm, pmd, address, ptlp)) | 1255 | NULL: pte_offset_map_lock(mm, pmd, address, ptlp)) |
| 1143 | 1256 | ||
| 1144 | #define pte_alloc_kernel(pmd, address) \ | 1257 | #define pte_alloc_kernel(pmd, address) \ |
| 1145 | ((unlikely(!pmd_present(*(pmd))) && __pte_alloc_kernel(pmd, address))? \ | 1258 | ((unlikely(pmd_none(*(pmd))) && __pte_alloc_kernel(pmd, address))? \ |
| 1146 | NULL: pte_offset_kernel(pmd, address)) | 1259 | NULL: pte_offset_kernel(pmd, address)) |
| 1147 | 1260 | ||
| 1148 | extern void free_area_init(unsigned long * zones_size); | 1261 | extern void free_area_init(unsigned long * zones_size); |
| @@ -1415,6 +1528,8 @@ struct page *follow_page(struct vm_area_struct *, unsigned long address, | |||
| 1415 | #define FOLL_GET 0x04 /* do get_page on page */ | 1528 | #define FOLL_GET 0x04 /* do get_page on page */ |
| 1416 | #define FOLL_DUMP 0x08 /* give error on hole if it would be zero */ | 1529 | #define FOLL_DUMP 0x08 /* give error on hole if it would be zero */ |
| 1417 | #define FOLL_FORCE 0x10 /* get_user_pages read/write w/o permission */ | 1530 | #define FOLL_FORCE 0x10 /* get_user_pages read/write w/o permission */ |
| 1531 | #define FOLL_MLOCK 0x40 /* mark page as mlocked */ | ||
| 1532 | #define FOLL_SPLIT 0x80 /* don't return transhuge pages, split them */ | ||
| 1418 | 1533 | ||
| 1419 | typedef int (*pte_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr, | 1534 | typedef int (*pte_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr, |
| 1420 | void *data); | 1535 | void *data); |
| @@ -1518,5 +1633,14 @@ static inline int is_hwpoison_address(unsigned long addr) | |||
| 1518 | 1633 | ||
| 1519 | extern void dump_page(struct page *page); | 1634 | extern void dump_page(struct page *page); |
| 1520 | 1635 | ||
| 1636 | #if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_HUGETLBFS) | ||
| 1637 | extern void clear_huge_page(struct page *page, | ||
| 1638 | unsigned long addr, | ||
| 1639 | unsigned int pages_per_huge_page); | ||
| 1640 | extern void copy_user_huge_page(struct page *dst, struct page *src, | ||
| 1641 | unsigned long addr, struct vm_area_struct *vma, | ||
| 1642 | unsigned int pages_per_huge_page); | ||
| 1643 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE || CONFIG_HUGETLBFS */ | ||
| 1644 | |||
| 1521 | #endif /* __KERNEL__ */ | 1645 | #endif /* __KERNEL__ */ |
| 1522 | #endif /* _LINUX_MM_H */ | 1646 | #endif /* _LINUX_MM_H */ |
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h index 8835b877b8db..8f7d24712dc1 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef LINUX_MM_INLINE_H | 1 | #ifndef LINUX_MM_INLINE_H |
| 2 | #define LINUX_MM_INLINE_H | 2 | #define LINUX_MM_INLINE_H |
| 3 | 3 | ||
| 4 | #include <linux/huge_mm.h> | ||
| 5 | |||
| 4 | /** | 6 | /** |
| 5 | * page_is_file_cache - should the page be on a file LRU or anon LRU? | 7 | * page_is_file_cache - should the page be on a file LRU or anon LRU? |
| 6 | * @page: the page to test | 8 | * @page: the page to test |
| @@ -20,18 +22,25 @@ static inline int page_is_file_cache(struct page *page) | |||
| 20 | } | 22 | } |
| 21 | 23 | ||
| 22 | static inline void | 24 | static inline void |
| 23 | add_page_to_lru_list(struct zone *zone, struct page *page, enum lru_list l) | 25 | __add_page_to_lru_list(struct zone *zone, struct page *page, enum lru_list l, |
| 26 | struct list_head *head) | ||
| 24 | { | 27 | { |
| 25 | list_add(&page->lru, &zone->lru[l].list); | 28 | list_add(&page->lru, head); |
| 26 | __inc_zone_state(zone, NR_LRU_BASE + l); | 29 | __mod_zone_page_state(zone, NR_LRU_BASE + l, hpage_nr_pages(page)); |
| 27 | mem_cgroup_add_lru_list(page, l); | 30 | mem_cgroup_add_lru_list(page, l); |
| 28 | } | 31 | } |
| 29 | 32 | ||
| 30 | static inline void | 33 | static inline void |
| 34 | add_page_to_lru_list(struct zone *zone, struct page *page, enum lru_list l) | ||
| 35 | { | ||
| 36 | __add_page_to_lru_list(zone, page, l, &zone->lru[l].list); | ||
| 37 | } | ||
| 38 | |||
| 39 | static inline void | ||
| 31 | del_page_from_lru_list(struct zone *zone, struct page *page, enum lru_list l) | 40 | del_page_from_lru_list(struct zone *zone, struct page *page, enum lru_list l) |
| 32 | { | 41 | { |
| 33 | list_del(&page->lru); | 42 | list_del(&page->lru); |
| 34 | __dec_zone_state(zone, NR_LRU_BASE + l); | 43 | __mod_zone_page_state(zone, NR_LRU_BASE + l, -hpage_nr_pages(page)); |
| 35 | mem_cgroup_del_lru_list(page, l); | 44 | mem_cgroup_del_lru_list(page, l); |
| 36 | } | 45 | } |
| 37 | 46 | ||
| @@ -66,7 +75,7 @@ del_page_from_lru(struct zone *zone, struct page *page) | |||
| 66 | l += LRU_ACTIVE; | 75 | l += LRU_ACTIVE; |
| 67 | } | 76 | } |
| 68 | } | 77 | } |
| 69 | __dec_zone_state(zone, NR_LRU_BASE + l); | 78 | __mod_zone_page_state(zone, NR_LRU_BASE + l, -hpage_nr_pages(page)); |
| 70 | mem_cgroup_del_lru_list(page, l); | 79 | mem_cgroup_del_lru_list(page, l); |
| 71 | } | 80 | } |
| 72 | 81 | ||
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index bb7288a782fd..26bc4e2cd275 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
| @@ -310,6 +310,9 @@ struct mm_struct { | |||
| 310 | #ifdef CONFIG_MMU_NOTIFIER | 310 | #ifdef CONFIG_MMU_NOTIFIER |
| 311 | struct mmu_notifier_mm *mmu_notifier_mm; | 311 | struct mmu_notifier_mm *mmu_notifier_mm; |
| 312 | #endif | 312 | #endif |
| 313 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
| 314 | pgtable_t pmd_huge_pte; /* protected by page_table_lock */ | ||
| 315 | #endif | ||
| 313 | /* How many tasks sharing this mm are OOM_DISABLE */ | 316 | /* How many tasks sharing this mm are OOM_DISABLE */ |
| 314 | atomic_t oom_disable_count; | 317 | atomic_t oom_disable_count; |
| 315 | }; | 318 | }; |
diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h index bf173502d744..38d393092812 100644 --- a/include/linux/mmc/sh_mmcif.h +++ b/include/linux/mmc/sh_mmcif.h | |||
| @@ -94,12 +94,12 @@ struct sh_mmcif_plat_data { | |||
| 94 | 94 | ||
| 95 | static inline u32 sh_mmcif_readl(void __iomem *addr, int reg) | 95 | static inline u32 sh_mmcif_readl(void __iomem *addr, int reg) |
| 96 | { | 96 | { |
| 97 | return readl(addr + reg); | 97 | return __raw_readl(addr + reg); |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | static inline void sh_mmcif_writel(void __iomem *addr, int reg, u32 val) | 100 | static inline void sh_mmcif_writel(void __iomem *addr, int reg, u32 val) |
| 101 | { | 101 | { |
| 102 | writel(val, addr + reg); | 102 | __raw_writel(val, addr + reg); |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | #define SH_MMCIF_BBS 512 /* boot block size */ | 105 | #define SH_MMCIF_BBS 512 /* boot block size */ |
diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h index 43dcfbdc39de..cc2e7dfea9d7 100644 --- a/include/linux/mmu_notifier.h +++ b/include/linux/mmu_notifier.h | |||
| @@ -62,6 +62,16 @@ struct mmu_notifier_ops { | |||
| 62 | unsigned long address); | 62 | unsigned long address); |
| 63 | 63 | ||
| 64 | /* | 64 | /* |
| 65 | * test_young is called to check the young/accessed bitflag in | ||
| 66 | * the secondary pte. This is used to know if the page is | ||
| 67 | * frequently used without actually clearing the flag or tearing | ||
| 68 | * down the secondary mapping on the page. | ||
| 69 | */ | ||
| 70 | int (*test_young)(struct mmu_notifier *mn, | ||
| 71 | struct mm_struct *mm, | ||
| 72 | unsigned long address); | ||
| 73 | |||
| 74 | /* | ||
| 65 | * change_pte is called in cases that pte mapping to page is changed: | 75 | * change_pte is called in cases that pte mapping to page is changed: |
| 66 | * for example, when ksm remaps pte to point to a new shared page. | 76 | * for example, when ksm remaps pte to point to a new shared page. |
| 67 | */ | 77 | */ |
| @@ -163,6 +173,8 @@ extern void __mmu_notifier_mm_destroy(struct mm_struct *mm); | |||
| 163 | extern void __mmu_notifier_release(struct mm_struct *mm); | 173 | extern void __mmu_notifier_release(struct mm_struct *mm); |
| 164 | extern int __mmu_notifier_clear_flush_young(struct mm_struct *mm, | 174 | extern int __mmu_notifier_clear_flush_young(struct mm_struct *mm, |
| 165 | unsigned long address); | 175 | unsigned long address); |
| 176 | extern int __mmu_notifier_test_young(struct mm_struct *mm, | ||
| 177 | unsigned long address); | ||
| 166 | extern void __mmu_notifier_change_pte(struct mm_struct *mm, | 178 | extern void __mmu_notifier_change_pte(struct mm_struct *mm, |
| 167 | unsigned long address, pte_t pte); | 179 | unsigned long address, pte_t pte); |
| 168 | extern void __mmu_notifier_invalidate_page(struct mm_struct *mm, | 180 | extern void __mmu_notifier_invalidate_page(struct mm_struct *mm, |
| @@ -186,6 +198,14 @@ static inline int mmu_notifier_clear_flush_young(struct mm_struct *mm, | |||
| 186 | return 0; | 198 | return 0; |
| 187 | } | 199 | } |
| 188 | 200 | ||
| 201 | static inline int mmu_notifier_test_young(struct mm_struct *mm, | ||
| 202 | unsigned long address) | ||
| 203 | { | ||
| 204 | if (mm_has_notifiers(mm)) | ||
| 205 | return __mmu_notifier_test_young(mm, address); | ||
| 206 | return 0; | ||
| 207 | } | ||
| 208 | |||
| 189 | static inline void mmu_notifier_change_pte(struct mm_struct *mm, | 209 | static inline void mmu_notifier_change_pte(struct mm_struct *mm, |
| 190 | unsigned long address, pte_t pte) | 210 | unsigned long address, pte_t pte) |
| 191 | { | 211 | { |
| @@ -243,6 +263,32 @@ static inline void mmu_notifier_mm_destroy(struct mm_struct *mm) | |||
| 243 | __pte; \ | 263 | __pte; \ |
| 244 | }) | 264 | }) |
| 245 | 265 | ||
| 266 | #define pmdp_clear_flush_notify(__vma, __address, __pmdp) \ | ||
| 267 | ({ \ | ||
| 268 | pmd_t __pmd; \ | ||
| 269 | struct vm_area_struct *___vma = __vma; \ | ||
| 270 | unsigned long ___address = __address; \ | ||
| 271 | VM_BUG_ON(__address & ~HPAGE_PMD_MASK); \ | ||
| 272 | mmu_notifier_invalidate_range_start(___vma->vm_mm, ___address, \ | ||
| 273 | (__address)+HPAGE_PMD_SIZE);\ | ||
| 274 | __pmd = pmdp_clear_flush(___vma, ___address, __pmdp); \ | ||
| 275 | mmu_notifier_invalidate_range_end(___vma->vm_mm, ___address, \ | ||
| 276 | (__address)+HPAGE_PMD_SIZE); \ | ||
| 277 | __pmd; \ | ||
| 278 | }) | ||
| 279 | |||
| 280 | #define pmdp_splitting_flush_notify(__vma, __address, __pmdp) \ | ||
| 281 | ({ \ | ||
| 282 | struct vm_area_struct *___vma = __vma; \ | ||
| 283 | unsigned long ___address = __address; \ | ||
| 284 | VM_BUG_ON(__address & ~HPAGE_PMD_MASK); \ | ||
| 285 | mmu_notifier_invalidate_range_start(___vma->vm_mm, ___address, \ | ||
| 286 | (__address)+HPAGE_PMD_SIZE);\ | ||
| 287 | pmdp_splitting_flush(___vma, ___address, __pmdp); \ | ||
| 288 | mmu_notifier_invalidate_range_end(___vma->vm_mm, ___address, \ | ||
| 289 | (__address)+HPAGE_PMD_SIZE); \ | ||
| 290 | }) | ||
| 291 | |||
| 246 | #define ptep_clear_flush_young_notify(__vma, __address, __ptep) \ | 292 | #define ptep_clear_flush_young_notify(__vma, __address, __ptep) \ |
| 247 | ({ \ | 293 | ({ \ |
| 248 | int __young; \ | 294 | int __young; \ |
| @@ -254,6 +300,17 @@ static inline void mmu_notifier_mm_destroy(struct mm_struct *mm) | |||
| 254 | __young; \ | 300 | __young; \ |
| 255 | }) | 301 | }) |
| 256 | 302 | ||
| 303 | #define pmdp_clear_flush_young_notify(__vma, __address, __pmdp) \ | ||
| 304 | ({ \ | ||
| 305 | int __young; \ | ||
| 306 | struct vm_area_struct *___vma = __vma; \ | ||
| 307 | unsigned long ___address = __address; \ | ||
| 308 | __young = pmdp_clear_flush_young(___vma, ___address, __pmdp); \ | ||
| 309 | __young |= mmu_notifier_clear_flush_young(___vma->vm_mm, \ | ||
| 310 | ___address); \ | ||
| 311 | __young; \ | ||
| 312 | }) | ||
| 313 | |||
| 257 | #define set_pte_at_notify(__mm, __address, __ptep, __pte) \ | 314 | #define set_pte_at_notify(__mm, __address, __ptep, __pte) \ |
| 258 | ({ \ | 315 | ({ \ |
| 259 | struct mm_struct *___mm = __mm; \ | 316 | struct mm_struct *___mm = __mm; \ |
| @@ -276,6 +333,12 @@ static inline int mmu_notifier_clear_flush_young(struct mm_struct *mm, | |||
| 276 | return 0; | 333 | return 0; |
| 277 | } | 334 | } |
| 278 | 335 | ||
| 336 | static inline int mmu_notifier_test_young(struct mm_struct *mm, | ||
| 337 | unsigned long address) | ||
| 338 | { | ||
| 339 | return 0; | ||
| 340 | } | ||
| 341 | |||
| 279 | static inline void mmu_notifier_change_pte(struct mm_struct *mm, | 342 | static inline void mmu_notifier_change_pte(struct mm_struct *mm, |
| 280 | unsigned long address, pte_t pte) | 343 | unsigned long address, pte_t pte) |
| 281 | { | 344 | { |
| @@ -305,7 +368,10 @@ static inline void mmu_notifier_mm_destroy(struct mm_struct *mm) | |||
| 305 | } | 368 | } |
| 306 | 369 | ||
| 307 | #define ptep_clear_flush_young_notify ptep_clear_flush_young | 370 | #define ptep_clear_flush_young_notify ptep_clear_flush_young |
| 371 | #define pmdp_clear_flush_young_notify pmdp_clear_flush_young | ||
| 308 | #define ptep_clear_flush_notify ptep_clear_flush | 372 | #define ptep_clear_flush_notify ptep_clear_flush |
| 373 | #define pmdp_clear_flush_notify pmdp_clear_flush | ||
| 374 | #define pmdp_splitting_flush_notify pmdp_splitting_flush | ||
| 309 | #define set_pte_at_notify set_pte_at | 375 | #define set_pte_at_notify set_pte_at |
| 310 | 376 | ||
| 311 | #endif /* CONFIG_MMU_NOTIFIER */ | 377 | #endif /* CONFIG_MMU_NOTIFIER */ |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 52f96d78c0e8..e56f835274c9 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
| @@ -114,6 +114,7 @@ enum zone_stat_item { | |||
| 114 | NUMA_LOCAL, /* allocation from local node */ | 114 | NUMA_LOCAL, /* allocation from local node */ |
| 115 | NUMA_OTHER, /* allocation from other node */ | 115 | NUMA_OTHER, /* allocation from other node */ |
| 116 | #endif | 116 | #endif |
| 117 | NR_ANON_TRANSPARENT_HUGEPAGES, | ||
| 117 | NR_VM_ZONE_STAT_ITEMS }; | 118 | NR_VM_ZONE_STAT_ITEMS }; |
| 118 | 119 | ||
| 119 | /* | 120 | /* |
| @@ -458,12 +459,6 @@ static inline int zone_is_oom_locked(const struct zone *zone) | |||
| 458 | return test_bit(ZONE_OOM_LOCKED, &zone->flags); | 459 | return test_bit(ZONE_OOM_LOCKED, &zone->flags); |
| 459 | } | 460 | } |
| 460 | 461 | ||
| 461 | #ifdef CONFIG_SMP | ||
| 462 | unsigned long zone_nr_free_pages(struct zone *zone); | ||
| 463 | #else | ||
| 464 | #define zone_nr_free_pages(zone) zone_page_state(zone, NR_FREE_PAGES) | ||
| 465 | #endif /* CONFIG_SMP */ | ||
| 466 | |||
| 467 | /* | 462 | /* |
| 468 | * The "priority" of VM scanning is how much of the queues we will scan in one | 463 | * The "priority" of VM scanning is how much of the queues we will scan in one |
| 469 | * go. A value of 12 for DEF_PRIORITY implies that we will scan 1/4096th of the | 464 | * go. A value of 12 for DEF_PRIORITY implies that we will scan 1/4096th of the |
| @@ -645,6 +640,7 @@ typedef struct pglist_data { | |||
| 645 | wait_queue_head_t kswapd_wait; | 640 | wait_queue_head_t kswapd_wait; |
| 646 | struct task_struct *kswapd; | 641 | struct task_struct *kswapd; |
| 647 | int kswapd_max_order; | 642 | int kswapd_max_order; |
| 643 | enum zone_type classzone_idx; | ||
| 648 | } pg_data_t; | 644 | } pg_data_t; |
| 649 | 645 | ||
| 650 | #define node_present_pages(nid) (NODE_DATA(nid)->node_present_pages) | 646 | #define node_present_pages(nid) (NODE_DATA(nid)->node_present_pages) |
| @@ -660,8 +656,10 @@ typedef struct pglist_data { | |||
| 660 | 656 | ||
| 661 | extern struct mutex zonelists_mutex; | 657 | extern struct mutex zonelists_mutex; |
| 662 | void build_all_zonelists(void *data); | 658 | void build_all_zonelists(void *data); |
| 663 | void wakeup_kswapd(struct zone *zone, int order); | 659 | void wakeup_kswapd(struct zone *zone, int order, enum zone_type classzone_idx); |
| 664 | int zone_watermark_ok(struct zone *z, int order, unsigned long mark, | 660 | bool zone_watermark_ok(struct zone *z, int order, unsigned long mark, |
| 661 | int classzone_idx, int alloc_flags); | ||
| 662 | bool zone_watermark_ok_safe(struct zone *z, int order, unsigned long mark, | ||
| 665 | int classzone_idx, int alloc_flags); | 663 | int classzone_idx, int alloc_flags); |
| 666 | enum memmap_context { | 664 | enum memmap_context { |
| 667 | MEMMAP_EARLY, | 665 | MEMMAP_EARLY, |
diff --git a/include/linux/module.h b/include/linux/module.h index 8b17fd8c790d..9bdf27c7615b 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -58,6 +58,12 @@ struct module_attribute { | |||
| 58 | void (*free)(struct module *); | 58 | void (*free)(struct module *); |
| 59 | }; | 59 | }; |
| 60 | 60 | ||
| 61 | struct module_version_attribute { | ||
| 62 | struct module_attribute mattr; | ||
| 63 | const char *module_name; | ||
| 64 | const char *version; | ||
| 65 | }; | ||
| 66 | |||
| 61 | struct module_kobject | 67 | struct module_kobject |
| 62 | { | 68 | { |
| 63 | struct kobject kobj; | 69 | struct kobject kobj; |
| @@ -161,7 +167,28 @@ extern struct module __this_module; | |||
| 161 | Using this automatically adds a checksum of the .c files and the | 167 | Using this automatically adds a checksum of the .c files and the |
| 162 | local headers in "srcversion". | 168 | local headers in "srcversion". |
| 163 | */ | 169 | */ |
| 170 | |||
| 171 | #if defined(MODULE) || !defined(CONFIG_SYSFS) | ||
| 164 | #define MODULE_VERSION(_version) MODULE_INFO(version, _version) | 172 | #define MODULE_VERSION(_version) MODULE_INFO(version, _version) |
| 173 | #else | ||
| 174 | #define MODULE_VERSION(_version) \ | ||
| 175 | extern ssize_t __modver_version_show(struct module_attribute *, \ | ||
| 176 | struct module *, char *); \ | ||
| 177 | static struct module_version_attribute __modver_version_attr \ | ||
| 178 | __used \ | ||
| 179 | __attribute__ ((__section__ ("__modver"),aligned(sizeof(void *)))) \ | ||
| 180 | = { \ | ||
| 181 | .mattr = { \ | ||
| 182 | .attr = { \ | ||
| 183 | .name = "version", \ | ||
| 184 | .mode = S_IRUGO, \ | ||
| 185 | }, \ | ||
| 186 | .show = __modver_version_show, \ | ||
| 187 | }, \ | ||
| 188 | .module_name = KBUILD_MODNAME, \ | ||
| 189 | .version = _version, \ | ||
| 190 | } | ||
| 191 | #endif | ||
| 165 | 192 | ||
| 166 | /* Optional firmware file (or files) needed by the module | 193 | /* Optional firmware file (or files) needed by the module |
| 167 | * format is simply firmware file name. Multiple firmware | 194 | * format is simply firmware file name. Multiple firmware |
| @@ -350,7 +377,7 @@ struct module | |||
| 350 | keeping pointers to this stuff */ | 377 | keeping pointers to this stuff */ |
| 351 | char *args; | 378 | char *args; |
| 352 | #ifdef CONFIG_TRACEPOINTS | 379 | #ifdef CONFIG_TRACEPOINTS |
| 353 | struct tracepoint *tracepoints; | 380 | struct tracepoint * const *tracepoints_ptrs; |
| 354 | unsigned int num_tracepoints; | 381 | unsigned int num_tracepoints; |
| 355 | #endif | 382 | #endif |
| 356 | #ifdef HAVE_JUMP_LABEL | 383 | #ifdef HAVE_JUMP_LABEL |
| @@ -362,7 +389,7 @@ struct module | |||
| 362 | unsigned int num_trace_bprintk_fmt; | 389 | unsigned int num_trace_bprintk_fmt; |
| 363 | #endif | 390 | #endif |
| 364 | #ifdef CONFIG_EVENT_TRACING | 391 | #ifdef CONFIG_EVENT_TRACING |
| 365 | struct ftrace_event_call *trace_events; | 392 | struct ftrace_event_call **trace_events; |
| 366 | unsigned int num_trace_events; | 393 | unsigned int num_trace_events; |
| 367 | #endif | 394 | #endif |
| 368 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD | 395 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD |
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 112adf8bd47d..07b41951e3fa 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h | |||
| @@ -16,15 +16,17 @@ | |||
| 16 | /* Chosen so that structs with an unsigned long line up. */ | 16 | /* Chosen so that structs with an unsigned long line up. */ |
| 17 | #define MAX_PARAM_PREFIX_LEN (64 - sizeof(unsigned long)) | 17 | #define MAX_PARAM_PREFIX_LEN (64 - sizeof(unsigned long)) |
| 18 | 18 | ||
| 19 | #ifdef MODULE | ||
| 20 | #define ___module_cat(a,b) __mod_ ## a ## b | 19 | #define ___module_cat(a,b) __mod_ ## a ## b |
| 21 | #define __module_cat(a,b) ___module_cat(a,b) | 20 | #define __module_cat(a,b) ___module_cat(a,b) |
| 21 | #ifdef MODULE | ||
| 22 | #define __MODULE_INFO(tag, name, info) \ | 22 | #define __MODULE_INFO(tag, name, info) \ |
| 23 | static const char __module_cat(name,__LINE__)[] \ | 23 | static const char __module_cat(name,__LINE__)[] \ |
| 24 | __used __attribute__((section(".modinfo"), unused, aligned(1))) \ | 24 | __used __attribute__((section(".modinfo"), unused, aligned(1))) \ |
| 25 | = __stringify(tag) "=" info | 25 | = __stringify(tag) "=" info |
| 26 | #else /* !MODULE */ | 26 | #else /* !MODULE */ |
| 27 | #define __MODULE_INFO(tag, name, info) | 27 | /* This struct is here for syntactic coherency, it is not used */ |
| 28 | #define __MODULE_INFO(tag, name, info) \ | ||
| 29 | struct __module_cat(name,__LINE__) {} | ||
| 28 | #endif | 30 | #endif |
| 29 | #define __MODULE_PARM_TYPE(name, _type) \ | 31 | #define __MODULE_PARM_TYPE(name, _type) \ |
| 30 | __MODULE_INFO(parmtype, name##type, #name ":" _type) | 32 | __MODULE_INFO(parmtype, name##type, #name ":" _type) |
diff --git a/include/linux/mount.h b/include/linux/mount.h index 1869ea24a739..604f122a2326 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
| @@ -60,7 +60,7 @@ struct vfsmount { | |||
| 60 | struct super_block *mnt_sb; /* pointer to superblock */ | 60 | struct super_block *mnt_sb; /* pointer to superblock */ |
| 61 | #ifdef CONFIG_SMP | 61 | #ifdef CONFIG_SMP |
| 62 | struct mnt_pcp __percpu *mnt_pcp; | 62 | struct mnt_pcp __percpu *mnt_pcp; |
| 63 | atomic_t mnt_longrefs; | 63 | atomic_t mnt_longterm; /* how many of the refs are longterm */ |
| 64 | #else | 64 | #else |
| 65 | int mnt_count; | 65 | int mnt_count; |
| 66 | int mnt_writers; | 66 | int mnt_writers; |
| @@ -96,8 +96,6 @@ extern int mnt_clone_write(struct vfsmount *mnt); | |||
| 96 | extern void mnt_drop_write(struct vfsmount *mnt); | 96 | extern void mnt_drop_write(struct vfsmount *mnt); |
| 97 | extern void mntput(struct vfsmount *mnt); | 97 | extern void mntput(struct vfsmount *mnt); |
| 98 | extern struct vfsmount *mntget(struct vfsmount *mnt); | 98 | extern struct vfsmount *mntget(struct vfsmount *mnt); |
| 99 | extern void mntput_long(struct vfsmount *mnt); | ||
| 100 | extern struct vfsmount *mntget_long(struct vfsmount *mnt); | ||
| 101 | extern void mnt_pin(struct vfsmount *mnt); | 99 | extern void mnt_pin(struct vfsmount *mnt); |
| 102 | extern void mnt_unpin(struct vfsmount *mnt); | 100 | extern void mnt_unpin(struct vfsmount *mnt); |
| 103 | extern int __mnt_is_readonly(struct vfsmount *mnt); | 101 | extern int __mnt_is_readonly(struct vfsmount *mnt); |
| @@ -110,12 +108,7 @@ extern struct vfsmount *vfs_kern_mount(struct file_system_type *type, | |||
| 110 | int flags, const char *name, | 108 | int flags, const char *name, |
| 111 | void *data); | 109 | void *data); |
| 112 | 110 | ||
| 113 | struct nameidata; | 111 | extern void mnt_set_expiry(struct vfsmount *mnt, struct list_head *expiry_list); |
| 114 | |||
| 115 | struct path; | ||
| 116 | extern int do_add_mount(struct vfsmount *newmnt, struct path *path, | ||
| 117 | int mnt_flags, struct list_head *fslist); | ||
| 118 | |||
| 119 | extern void mark_mounts_for_expiry(struct list_head *mounts); | 112 | extern void mark_mounts_for_expiry(struct list_head *mounts); |
| 120 | 113 | ||
| 121 | extern dev_t name_to_dev_t(char *name); | 114 | extern dev_t name_to_dev_t(char *name); |
diff --git a/include/linux/mroute.h b/include/linux/mroute.h index 0fa7a3a874c8..b21d567692b2 100644 --- a/include/linux/mroute.h +++ b/include/linux/mroute.h | |||
| @@ -150,6 +150,7 @@ static inline int ip_mroute_opt(int opt) | |||
| 150 | extern int ip_mroute_setsockopt(struct sock *, int, char __user *, unsigned int); | 150 | extern int ip_mroute_setsockopt(struct sock *, int, char __user *, unsigned int); |
| 151 | extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *); | 151 | extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *); |
| 152 | extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg); | 152 | extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg); |
| 153 | extern int ipmr_compat_ioctl(struct sock *sk, unsigned int cmd, void __user *arg); | ||
| 153 | extern int ip_mr_init(void); | 154 | extern int ip_mr_init(void); |
| 154 | #else | 155 | #else |
| 155 | static inline | 156 | static inline |
diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h index 6091ab77f388..9d2deb200f54 100644 --- a/include/linux/mroute6.h +++ b/include/linux/mroute6.h | |||
| @@ -136,6 +136,7 @@ extern int ip6_mroute_setsockopt(struct sock *, int, char __user *, unsigned int | |||
| 136 | extern int ip6_mroute_getsockopt(struct sock *, int, char __user *, int __user *); | 136 | extern int ip6_mroute_getsockopt(struct sock *, int, char __user *, int __user *); |
| 137 | extern int ip6_mr_input(struct sk_buff *skb); | 137 | extern int ip6_mr_input(struct sk_buff *skb); |
| 138 | extern int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg); | 138 | extern int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg); |
| 139 | extern int ip6mr_compat_ioctl(struct sock *sk, unsigned int cmd, void __user *arg); | ||
| 139 | extern int ip6_mr_init(void); | 140 | extern int ip6_mr_init(void); |
| 140 | extern void ip6_mr_cleanup(void); | 141 | extern void ip6_mr_cleanup(void); |
| 141 | #else | 142 | #else |
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h index 4dd0c2cd7659..a9baee6864af 100644 --- a/include/linux/mtd/cfi.h +++ b/include/linux/mtd/cfi.h | |||
| @@ -527,8 +527,7 @@ struct cfi_extquery *cfi_read_pri(struct map_info *map, uint16_t adr, uint16_t s | |||
| 527 | struct cfi_fixup { | 527 | struct cfi_fixup { |
| 528 | uint16_t mfr; | 528 | uint16_t mfr; |
| 529 | uint16_t id; | 529 | uint16_t id; |
| 530 | void (*fixup)(struct mtd_info *mtd, void* param); | 530 | void (*fixup)(struct mtd_info *mtd); |
| 531 | void* param; | ||
| 532 | }; | 531 | }; |
| 533 | 532 | ||
| 534 | #define CFI_MFR_ANY 0xFFFF | 533 | #define CFI_MFR_ANY 0xFFFF |
diff --git a/include/linux/mtd/fsmc.h b/include/linux/mtd/fsmc.h index 5d2556700ec2..6987995ad3cf 100644 --- a/include/linux/mtd/fsmc.h +++ b/include/linux/mtd/fsmc.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #ifndef __MTD_FSMC_H | 16 | #ifndef __MTD_FSMC_H |
| 17 | #define __MTD_FSMC_H | 17 | #define __MTD_FSMC_H |
| 18 | 18 | ||
| 19 | #include <linux/io.h> | ||
| 19 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
| 20 | #include <linux/mtd/physmap.h> | 21 | #include <linux/mtd/physmap.h> |
| 21 | #include <linux/types.h> | 22 | #include <linux/types.h> |
| @@ -27,7 +28,7 @@ | |||
| 27 | 28 | ||
| 28 | /* | 29 | /* |
| 29 | * The placement of the Command Latch Enable (CLE) and | 30 | * The placement of the Command Latch Enable (CLE) and |
| 30 | * Address Latch Enable (ALE) is twised around in the | 31 | * Address Latch Enable (ALE) is twisted around in the |
| 31 | * SPEAR310 implementation. | 32 | * SPEAR310 implementation. |
| 32 | */ | 33 | */ |
| 33 | #if defined(CONFIG_MACH_SPEAR310) | 34 | #if defined(CONFIG_MACH_SPEAR310) |
| @@ -62,7 +63,7 @@ struct fsmc_nor_bank_regs { | |||
| 62 | 63 | ||
| 63 | /* ctrl_tim register definitions */ | 64 | /* ctrl_tim register definitions */ |
| 64 | 65 | ||
| 65 | struct fsms_nand_bank_regs { | 66 | struct fsmc_nand_bank_regs { |
| 66 | uint32_t pc; | 67 | uint32_t pc; |
| 67 | uint32_t sts; | 68 | uint32_t sts; |
| 68 | uint32_t comm; | 69 | uint32_t comm; |
| @@ -78,7 +79,7 @@ struct fsms_nand_bank_regs { | |||
| 78 | struct fsmc_regs { | 79 | struct fsmc_regs { |
| 79 | struct fsmc_nor_bank_regs nor_bank_regs[FSMC_MAX_NOR_BANKS]; | 80 | struct fsmc_nor_bank_regs nor_bank_regs[FSMC_MAX_NOR_BANKS]; |
| 80 | uint8_t reserved_1[0x40 - 0x20]; | 81 | uint8_t reserved_1[0x40 - 0x20]; |
| 81 | struct fsms_nand_bank_regs bank_regs[FSMC_MAX_NAND_BANKS]; | 82 | struct fsmc_nand_bank_regs bank_regs[FSMC_MAX_NAND_BANKS]; |
| 82 | uint8_t reserved_2[0xfe0 - 0xc0]; | 83 | uint8_t reserved_2[0xfe0 - 0xc0]; |
| 83 | uint32_t peripid0; /* 0xfe0 */ | 84 | uint32_t peripid0; /* 0xfe0 */ |
| 84 | uint32_t peripid1; /* 0xfe4 */ | 85 | uint32_t peripid1; /* 0xfe4 */ |
| @@ -114,25 +115,6 @@ struct fsmc_regs { | |||
| 114 | #define FSMC_THOLD_4 (4 << 16) | 115 | #define FSMC_THOLD_4 (4 << 16) |
| 115 | #define FSMC_THIZ_1 (1 << 24) | 116 | #define FSMC_THIZ_1 (1 << 24) |
| 116 | 117 | ||
| 117 | /* peripid2 register definitions */ | ||
| 118 | #define FSMC_REVISION_MSK (0xf) | ||
| 119 | #define FSMC_REVISION_SHFT (0x4) | ||
| 120 | |||
| 121 | #define FSMC_VER1 1 | ||
| 122 | #define FSMC_VER2 2 | ||
| 123 | #define FSMC_VER3 3 | ||
| 124 | #define FSMC_VER4 4 | ||
| 125 | #define FSMC_VER5 5 | ||
| 126 | #define FSMC_VER6 6 | ||
| 127 | #define FSMC_VER7 7 | ||
| 128 | #define FSMC_VER8 8 | ||
| 129 | |||
| 130 | static inline uint32_t get_fsmc_version(struct fsmc_regs *regs) | ||
| 131 | { | ||
| 132 | return (readl(®s->peripid2) >> FSMC_REVISION_SHFT) & | ||
| 133 | FSMC_REVISION_MSK; | ||
| 134 | } | ||
| 135 | |||
| 136 | /* | 118 | /* |
| 137 | * There are 13 bytes of ecc for every 512 byte block in FSMC version 8 | 119 | * There are 13 bytes of ecc for every 512 byte block in FSMC version 8 |
| 138 | * and it has to be read consecutively and immediately after the 512 | 120 | * and it has to be read consecutively and immediately after the 512 |
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index fe8d77ebec13..9d5306bad117 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
| @@ -144,6 +144,17 @@ struct mtd_info { | |||
| 144 | */ | 144 | */ |
| 145 | uint32_t writesize; | 145 | uint32_t writesize; |
| 146 | 146 | ||
| 147 | /* | ||
| 148 | * Size of the write buffer used by the MTD. MTD devices having a write | ||
| 149 | * buffer can write multiple writesize chunks at a time. E.g. while | ||
| 150 | * writing 4 * writesize bytes to a device with 2 * writesize bytes | ||
| 151 | * buffer the MTD driver can (but doesn't have to) do 2 writesize | ||
| 152 | * operations, but not 4. Currently, all NANDs have writebufsize | ||
| 153 | * equivalent to writesize (NAND page size). Some NOR flashes do have | ||
| 154 | * writebufsize greater than writesize. | ||
| 155 | */ | ||
| 156 | uint32_t writebufsize; | ||
| 157 | |||
| 147 | uint32_t oobsize; // Amount of OOB data per block (e.g. 16) | 158 | uint32_t oobsize; // Amount of OOB data per block (e.g. 16) |
| 148 | uint32_t oobavail; // Available OOB bytes per block | 159 | uint32_t oobavail; // Available OOB bytes per block |
| 149 | 160 | ||
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 63e17d01fde9..1f489b247a29 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
| @@ -448,6 +448,8 @@ struct nand_buffers { | |||
| 448 | * See the defines for further explanation. | 448 | * See the defines for further explanation. |
| 449 | * @badblockpos: [INTERN] position of the bad block marker in the oob | 449 | * @badblockpos: [INTERN] position of the bad block marker in the oob |
| 450 | * area. | 450 | * area. |
| 451 | * @badblockbits: [INTERN] number of bits to left-shift the bad block | ||
| 452 | * number | ||
| 451 | * @cellinfo: [INTERN] MLC/multichip data from chip ident | 453 | * @cellinfo: [INTERN] MLC/multichip data from chip ident |
| 452 | * @numchips: [INTERN] number of physical chips | 454 | * @numchips: [INTERN] number of physical chips |
| 453 | * @chipsize: [INTERN] the size of one chip for multichip arrays | 455 | * @chipsize: [INTERN] the size of one chip for multichip arrays |
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h index 0c8815bfae1c..ae418e41d8f5 100644 --- a/include/linux/mtd/onenand.h +++ b/include/linux/mtd/onenand.h | |||
| @@ -118,6 +118,8 @@ struct onenand_chip { | |||
| 118 | int (*chip_probe)(struct mtd_info *mtd); | 118 | int (*chip_probe)(struct mtd_info *mtd); |
| 119 | int (*block_markbad)(struct mtd_info *mtd, loff_t ofs); | 119 | int (*block_markbad)(struct mtd_info *mtd, loff_t ofs); |
| 120 | int (*scan_bbt)(struct mtd_info *mtd); | 120 | int (*scan_bbt)(struct mtd_info *mtd); |
| 121 | int (*enable)(struct mtd_info *mtd); | ||
| 122 | int (*disable)(struct mtd_info *mtd); | ||
| 121 | 123 | ||
| 122 | struct completion complete; | 124 | struct completion complete; |
| 123 | int irq; | 125 | int irq; |
| @@ -137,6 +139,14 @@ struct onenand_chip { | |||
| 137 | void *bbm; | 139 | void *bbm; |
| 138 | 140 | ||
| 139 | void *priv; | 141 | void *priv; |
| 142 | |||
| 143 | /* | ||
| 144 | * Shows that the current operation is composed | ||
| 145 | * of sequence of commands. For example, cache program. | ||
| 146 | * Such command status OnGo bit is checked at the end of | ||
| 147 | * sequence. | ||
| 148 | */ | ||
| 149 | unsigned int ongoing; | ||
| 140 | }; | 150 | }; |
| 141 | 151 | ||
| 142 | /* | 152 | /* |
| @@ -171,6 +181,9 @@ struct onenand_chip { | |||
| 171 | #define ONENAND_IS_2PLANE(this) (0) | 181 | #define ONENAND_IS_2PLANE(this) (0) |
| 172 | #endif | 182 | #endif |
| 173 | 183 | ||
| 184 | #define ONENAND_IS_CACHE_PROGRAM(this) \ | ||
| 185 | (this->options & ONENAND_HAS_CACHE_PROGRAM) | ||
| 186 | |||
| 174 | /* Check byte access in OneNAND */ | 187 | /* Check byte access in OneNAND */ |
| 175 | #define ONENAND_CHECK_BYTE_ACCESS(addr) (addr & 0x1) | 188 | #define ONENAND_CHECK_BYTE_ACCESS(addr) (addr & 0x1) |
| 176 | 189 | ||
| @@ -181,6 +194,7 @@ struct onenand_chip { | |||
| 181 | #define ONENAND_HAS_UNLOCK_ALL (0x0002) | 194 | #define ONENAND_HAS_UNLOCK_ALL (0x0002) |
| 182 | #define ONENAND_HAS_2PLANE (0x0004) | 195 | #define ONENAND_HAS_2PLANE (0x0004) |
| 183 | #define ONENAND_HAS_4KB_PAGE (0x0008) | 196 | #define ONENAND_HAS_4KB_PAGE (0x0008) |
| 197 | #define ONENAND_HAS_CACHE_PROGRAM (0x0010) | ||
| 184 | #define ONENAND_SKIP_UNLOCK_CHECK (0x0100) | 198 | #define ONENAND_SKIP_UNLOCK_CHECK (0x0100) |
| 185 | #define ONENAND_PAGEBUF_ALLOC (0x1000) | 199 | #define ONENAND_PAGEBUF_ALLOC (0x1000) |
| 186 | #define ONENAND_OOBBUF_ALLOC (0x2000) | 200 | #define ONENAND_OOBBUF_ALLOC (0x2000) |
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h index 2b54316591d2..4a0a8ba90a72 100644 --- a/include/linux/mtd/partitions.h +++ b/include/linux/mtd/partitions.h | |||
| @@ -89,7 +89,7 @@ static inline int mtd_has_cmdlinepart(void) { return 1; } | |||
| 89 | static inline int mtd_has_cmdlinepart(void) { return 0; } | 89 | static inline int mtd_has_cmdlinepart(void) { return 0; } |
| 90 | #endif | 90 | #endif |
| 91 | 91 | ||
| 92 | int mtd_is_master(struct mtd_info *mtd); | 92 | int mtd_is_partition(struct mtd_info *mtd); |
| 93 | int mtd_add_partition(struct mtd_info *master, char *name, | 93 | int mtd_add_partition(struct mtd_info *master, char *name, |
| 94 | long long offset, long long length); | 94 | long long offset, long long length); |
| 95 | int mtd_del_partition(struct mtd_info *master, int partno); | 95 | int mtd_del_partition(struct mtd_info *master, int partno); |
diff --git a/include/linux/namei.h b/include/linux/namei.h index 18d06add0a40..f276d4fa01fc 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
| @@ -45,6 +45,7 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND}; | |||
| 45 | * - ending slashes ok even for nonexistent files | 45 | * - ending slashes ok even for nonexistent files |
| 46 | * - internal "there are more path components" flag | 46 | * - internal "there are more path components" flag |
| 47 | * - dentry cache is untrusted; force a real lookup | 47 | * - dentry cache is untrusted; force a real lookup |
| 48 | * - suppress terminal automount | ||
| 48 | */ | 49 | */ |
| 49 | #define LOOKUP_FOLLOW 0x0001 | 50 | #define LOOKUP_FOLLOW 0x0001 |
| 50 | #define LOOKUP_DIRECTORY 0x0002 | 51 | #define LOOKUP_DIRECTORY 0x0002 |
| @@ -53,6 +54,7 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND}; | |||
| 53 | #define LOOKUP_PARENT 0x0010 | 54 | #define LOOKUP_PARENT 0x0010 |
| 54 | #define LOOKUP_REVAL 0x0020 | 55 | #define LOOKUP_REVAL 0x0020 |
| 55 | #define LOOKUP_RCU 0x0040 | 56 | #define LOOKUP_RCU 0x0040 |
| 57 | #define LOOKUP_NO_AUTOMOUNT 0x0080 | ||
| 56 | /* | 58 | /* |
| 57 | * Intent data | 59 | * Intent data |
| 58 | */ | 60 | */ |
| @@ -79,7 +81,8 @@ extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry | |||
| 79 | 81 | ||
| 80 | extern struct dentry *lookup_one_len(const char *, struct dentry *, int); | 82 | extern struct dentry *lookup_one_len(const char *, struct dentry *, int); |
| 81 | 83 | ||
| 82 | extern int follow_down(struct path *); | 84 | extern int follow_down_one(struct path *); |
| 85 | extern int follow_down(struct path *, bool); | ||
| 83 | extern int follow_up(struct path *); | 86 | extern int follow_up(struct path *); |
| 84 | 87 | ||
| 85 | extern struct dentry *lock_rename(struct dentry *, struct dentry *); | 88 | extern struct dentry *lock_rename(struct dentry *, struct dentry *); |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index be4957cf6511..d971346b0340 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -520,9 +520,6 @@ struct netdev_queue { | |||
| 520 | * please use this field instead of dev->trans_start | 520 | * please use this field instead of dev->trans_start |
| 521 | */ | 521 | */ |
| 522 | unsigned long trans_start; | 522 | unsigned long trans_start; |
| 523 | u64 tx_bytes; | ||
| 524 | u64 tx_packets; | ||
| 525 | u64 tx_dropped; | ||
| 526 | } ____cacheline_aligned_in_smp; | 523 | } ____cacheline_aligned_in_smp; |
| 527 | 524 | ||
| 528 | static inline int netdev_queue_numa_node_read(const struct netdev_queue *q) | 525 | static inline int netdev_queue_numa_node_read(const struct netdev_queue *q) |
| @@ -2265,8 +2262,6 @@ extern void dev_load(struct net *net, const char *name); | |||
| 2265 | extern void dev_mcast_init(void); | 2262 | extern void dev_mcast_init(void); |
| 2266 | extern struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev, | 2263 | extern struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev, |
| 2267 | struct rtnl_link_stats64 *storage); | 2264 | struct rtnl_link_stats64 *storage); |
| 2268 | extern void dev_txq_stats_fold(const struct net_device *dev, | ||
| 2269 | struct rtnl_link_stats64 *stats); | ||
| 2270 | 2265 | ||
| 2271 | extern int netdev_max_backlog; | 2266 | extern int netdev_max_backlog; |
| 2272 | extern int netdev_tstamp_prequeue; | 2267 | extern int netdev_tstamp_prequeue; |
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 9b46300b4305..134716e5e350 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
| @@ -65,6 +65,9 @@ | |||
| 65 | 65 | ||
| 66 | #define NFS4_CDFC4_FORE 0x1 | 66 | #define NFS4_CDFC4_FORE 0x1 |
| 67 | #define NFS4_CDFC4_BACK 0x2 | 67 | #define NFS4_CDFC4_BACK 0x2 |
| 68 | #define NFS4_CDFC4_BOTH 0x3 | ||
| 69 | #define NFS4_CDFC4_FORE_OR_BOTH 0x3 | ||
| 70 | #define NFS4_CDFC4_BACK_OR_BOTH 0x7 | ||
| 68 | 71 | ||
| 69 | #define NFS4_SET_TO_SERVER_TIME 0 | 72 | #define NFS4_SET_TO_SERVER_TIME 0 |
| 70 | #define NFS4_SET_TO_CLIENT_TIME 1 | 73 | #define NFS4_SET_TO_CLIENT_TIME 1 |
| @@ -140,6 +143,9 @@ | |||
| 140 | #define SEQ4_STATUS_CB_PATH_DOWN_SESSION 0x00000200 | 143 | #define SEQ4_STATUS_CB_PATH_DOWN_SESSION 0x00000200 |
| 141 | #define SEQ4_STATUS_BACKCHANNEL_FAULT 0x00000400 | 144 | #define SEQ4_STATUS_BACKCHANNEL_FAULT 0x00000400 |
| 142 | 145 | ||
| 146 | #define NFS4_SECINFO_STYLE4_CURRENT_FH 0 | ||
| 147 | #define NFS4_SECINFO_STYLE4_PARENT 1 | ||
| 148 | |||
| 143 | #define NFS4_MAX_UINT64 (~(u64)0) | 149 | #define NFS4_MAX_UINT64 (~(u64)0) |
| 144 | 150 | ||
| 145 | /* An NFS4 sessions server must support at least NFS4_MAX_OPS operations. | 151 | /* An NFS4 sessions server must support at least NFS4_MAX_OPS operations. |
diff --git a/include/linux/nfs4_acl.h b/include/linux/nfs4_acl.h deleted file mode 100644 index c9c05a78e9bb..000000000000 --- a/include/linux/nfs4_acl.h +++ /dev/null | |||
| @@ -1,61 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * include/linux/nfs4_acl.c | ||
| 3 | * | ||
| 4 | * Common NFSv4 ACL handling definitions. | ||
| 5 | * | ||
| 6 | * Copyright (c) 2002 The Regents of the University of Michigan. | ||
| 7 | * All rights reserved. | ||
| 8 | * | ||
| 9 | * Marius Aamodt Eriksen <marius@umich.edu> | ||
| 10 | * | ||
| 11 | * Redistribution and use in source and binary forms, with or without | ||
| 12 | * modification, are permitted provided that the following conditions | ||
| 13 | * are met: | ||
| 14 | * | ||
| 15 | * 1. Redistributions of source code must retain the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer. | ||
| 17 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 18 | * notice, this list of conditions and the following disclaimer in the | ||
| 19 | * documentation and/or other materials provided with the distribution. | ||
| 20 | * 3. Neither the name of the University nor the names of its | ||
| 21 | * contributors may be used to endorse or promote products derived | ||
| 22 | * from this software without specific prior written permission. | ||
| 23 | * | ||
| 24 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
| 25 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
| 26 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
| 27 | * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
| 29 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
| 30 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | ||
| 31 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| 32 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| 33 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
| 34 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 35 | */ | ||
| 36 | |||
| 37 | #ifndef LINUX_NFS4_ACL_H | ||
| 38 | #define LINUX_NFS4_ACL_H | ||
| 39 | |||
| 40 | #include <linux/posix_acl.h> | ||
| 41 | |||
| 42 | /* Maximum ACL we'll accept from client; chosen (somewhat arbitrarily) to | ||
| 43 | * fit in a page: */ | ||
| 44 | #define NFS4_ACL_MAX 170 | ||
| 45 | |||
| 46 | struct nfs4_acl *nfs4_acl_new(int); | ||
| 47 | int nfs4_acl_get_whotype(char *, u32); | ||
| 48 | int nfs4_acl_write_who(int who, char *p); | ||
| 49 | int nfs4_acl_permission(struct nfs4_acl *acl, uid_t owner, gid_t group, | ||
| 50 | uid_t who, u32 mask); | ||
| 51 | |||
| 52 | #define NFS4_ACL_TYPE_DEFAULT 0x01 | ||
| 53 | #define NFS4_ACL_DIR 0x02 | ||
| 54 | #define NFS4_ACL_OWNER 0x04 | ||
| 55 | |||
| 56 | struct nfs4_acl *nfs4_acl_posix_to_nfsv4(struct posix_acl *, | ||
| 57 | struct posix_acl *, unsigned int flags); | ||
| 58 | int nfs4_acl_nfsv4_to_posix(struct nfs4_acl *, struct posix_acl **, | ||
| 59 | struct posix_acl **, unsigned int flags); | ||
| 60 | |||
| 61 | #endif /* LINUX_NFS4_ACL_H */ | ||
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 0779bb8f95be..6023efa9f5d9 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -215,7 +215,6 @@ struct nfs_inode { | |||
| 215 | #define NFS_INO_ADVISE_RDPLUS (0) /* advise readdirplus */ | 215 | #define NFS_INO_ADVISE_RDPLUS (0) /* advise readdirplus */ |
| 216 | #define NFS_INO_STALE (1) /* possible stale inode */ | 216 | #define NFS_INO_STALE (1) /* possible stale inode */ |
| 217 | #define NFS_INO_ACL_LRU_SET (2) /* Inode is on the LRU list */ | 217 | #define NFS_INO_ACL_LRU_SET (2) /* Inode is on the LRU list */ |
| 218 | #define NFS_INO_MOUNTPOINT (3) /* inode is remote mountpoint */ | ||
| 219 | #define NFS_INO_FLUSHING (4) /* inode is flushing out data */ | 218 | #define NFS_INO_FLUSHING (4) /* inode is flushing out data */ |
| 220 | #define NFS_INO_FSCACHE (5) /* inode can be cached by FS-Cache */ | 219 | #define NFS_INO_FSCACHE (5) /* inode can be cached by FS-Cache */ |
| 221 | #define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */ | 220 | #define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */ |
diff --git a/include/linux/nfsacl.h b/include/linux/nfsacl.h index f321b578edeb..fabcb1e5c460 100644 --- a/include/linux/nfsacl.h +++ b/include/linux/nfsacl.h | |||
| @@ -51,10 +51,10 @@ nfsacl_size(struct posix_acl *acl_access, struct posix_acl *acl_default) | |||
| 51 | return w; | 51 | return w; |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | extern unsigned int | 54 | extern int |
| 55 | nfsacl_encode(struct xdr_buf *buf, unsigned int base, struct inode *inode, | 55 | nfsacl_encode(struct xdr_buf *buf, unsigned int base, struct inode *inode, |
| 56 | struct posix_acl *acl, int encode_entries, int typeflag); | 56 | struct posix_acl *acl, int encode_entries, int typeflag); |
| 57 | extern unsigned int | 57 | extern int |
| 58 | nfsacl_decode(struct xdr_buf *buf, unsigned int base, unsigned int *aclcnt, | 58 | nfsacl_decode(struct xdr_buf *buf, unsigned int base, unsigned int *aclcnt, |
| 59 | struct posix_acl **pacl); | 59 | struct posix_acl **pacl); |
| 60 | 60 | ||
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index 8ae78a61eea4..bd316159278c 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | #define NFSEXP_NOHIDE 0x0200 | 35 | #define NFSEXP_NOHIDE 0x0200 |
| 36 | #define NFSEXP_NOSUBTREECHECK 0x0400 | 36 | #define NFSEXP_NOSUBTREECHECK 0x0400 |
| 37 | #define NFSEXP_NOAUTHNLM 0x0800 /* Don't authenticate NLM requests - just trust */ | 37 | #define NFSEXP_NOAUTHNLM 0x0800 /* Don't authenticate NLM requests - just trust */ |
| 38 | #define NFSEXP_MSNFS 0x1000 /* do silly things that MS clients expect */ | 38 | #define NFSEXP_MSNFS 0x1000 /* do silly things that MS clients expect; no longer supported */ |
| 39 | #define NFSEXP_FSID 0x2000 | 39 | #define NFSEXP_FSID 0x2000 |
| 40 | #define NFSEXP_CROSSMOUNT 0x4000 | 40 | #define NFSEXP_CROSSMOUNT 0x4000 |
| 41 | #define NFSEXP_NOACL 0x8000 /* reserved for possible ACL related use */ | 41 | #define NFSEXP_NOACL 0x8000 /* reserved for possible ACL related use */ |
diff --git a/include/linux/nfsd_idmap.h b/include/linux/nfsd_idmap.h deleted file mode 100644 index d4a2ac18bd4c..000000000000 --- a/include/linux/nfsd_idmap.h +++ /dev/null | |||
| @@ -1,64 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * include/linux/nfsd_idmap.h | ||
| 3 | * | ||
| 4 | * Mapping of UID to name and vice versa. | ||
| 5 | * | ||
| 6 | * Copyright (c) 2002, 2003 The Regents of the University of | ||
| 7 | * Michigan. All rights reserved. | ||
| 8 | > * | ||
| 9 | * Marius Aamodt Eriksen <marius@umich.edu> | ||
| 10 | * | ||
| 11 | * Redistribution and use in source and binary forms, with or without | ||
| 12 | * modification, are permitted provided that the following conditions | ||
| 13 | * are met: | ||
| 14 | * | ||
| 15 | * 1. Redistributions of source code must retain the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer. | ||
| 17 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 18 | * notice, this list of conditions and the following disclaimer in the | ||
| 19 | * documentation and/or other materials provided with the distribution. | ||
| 20 | * 3. Neither the name of the University nor the names of its | ||
| 21 | * contributors may be used to endorse or promote products derived | ||
| 22 | * from this software without specific prior written permission. | ||
| 23 | * | ||
| 24 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
| 25 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
| 26 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
| 27 | * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
| 29 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
| 30 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | ||
| 31 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| 32 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| 33 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
| 34 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 35 | */ | ||
| 36 | |||
| 37 | #ifndef LINUX_NFSD_IDMAP_H | ||
| 38 | #define LINUX_NFSD_IDMAP_H | ||
| 39 | |||
| 40 | #include <linux/in.h> | ||
| 41 | #include <linux/sunrpc/svc.h> | ||
| 42 | |||
| 43 | /* XXX from linux/nfs_idmap.h */ | ||
| 44 | #define IDMAP_NAMESZ 128 | ||
| 45 | |||
| 46 | #ifdef CONFIG_NFSD_V4 | ||
| 47 | int nfsd_idmap_init(void); | ||
| 48 | void nfsd_idmap_shutdown(void); | ||
| 49 | #else | ||
| 50 | static inline int nfsd_idmap_init(void) | ||
| 51 | { | ||
| 52 | return 0; | ||
| 53 | } | ||
| 54 | static inline void nfsd_idmap_shutdown(void) | ||
| 55 | { | ||
| 56 | } | ||
| 57 | #endif | ||
| 58 | |||
| 59 | int nfsd_map_name_to_uid(struct svc_rqst *, const char *, size_t, __u32 *); | ||
| 60 | int nfsd_map_name_to_gid(struct svc_rqst *, const char *, size_t, __u32 *); | ||
| 61 | int nfsd_map_uid_to_name(struct svc_rqst *, __u32, char *); | ||
| 62 | int nfsd_map_gid_to_name(struct svc_rqst *, __u32, char *); | ||
| 63 | |||
| 64 | #endif /* LINUX_NFSD_IDMAP_H */ | ||
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 2b89b712565b..821ffb954f14 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
| @@ -148,6 +148,10 @@ | |||
| 148 | * @NL80211_CMD_SET_MPATH: Set mesh path attributes for mesh path to | 148 | * @NL80211_CMD_SET_MPATH: Set mesh path attributes for mesh path to |
| 149 | * destination %NL80211_ATTR_MAC on the interface identified by | 149 | * destination %NL80211_ATTR_MAC on the interface identified by |
| 150 | * %NL80211_ATTR_IFINDEX. | 150 | * %NL80211_ATTR_IFINDEX. |
| 151 | * @NL80211_CMD_NEW_MPATH: Create a new mesh path for the destination given by | ||
| 152 | * %NL80211_ATTR_MAC via %NL80211_ATTR_MPATH_NEXT_HOP. | ||
| 153 | * @NL80211_CMD_DEL_MPATH: Delete a mesh path to the destination given by | ||
| 154 | * %NL80211_ATTR_MAC. | ||
| 151 | * @NL80211_CMD_NEW_PATH: Add a mesh path with given attributes to the | 155 | * @NL80211_CMD_NEW_PATH: Add a mesh path with given attributes to the |
| 152 | * the interface identified by %NL80211_ATTR_IFINDEX. | 156 | * the interface identified by %NL80211_ATTR_IFINDEX. |
| 153 | * @NL80211_CMD_DEL_PATH: Remove a mesh path identified by %NL80211_ATTR_MAC | 157 | * @NL80211_CMD_DEL_PATH: Remove a mesh path identified by %NL80211_ATTR_MAC |
| @@ -612,7 +616,7 @@ enum nl80211_commands { | |||
| 612 | * consisting of a nested array. | 616 | * consisting of a nested array. |
| 613 | * | 617 | * |
| 614 | * @NL80211_ATTR_MESH_ID: mesh id (1-32 bytes). | 618 | * @NL80211_ATTR_MESH_ID: mesh id (1-32 bytes). |
| 615 | * @NL80211_ATTR_PLINK_ACTION: action to perform on the mesh peer link. | 619 | * @NL80211_ATTR_STA_PLINK_ACTION: action to perform on the mesh peer link. |
| 616 | * @NL80211_ATTR_MPATH_NEXT_HOP: MAC address of the next hop for a mesh path. | 620 | * @NL80211_ATTR_MPATH_NEXT_HOP: MAC address of the next hop for a mesh path. |
| 617 | * @NL80211_ATTR_MPATH_INFO: information about a mesh_path, part of mesh path | 621 | * @NL80211_ATTR_MPATH_INFO: information about a mesh_path, part of mesh path |
| 618 | * info given for %NL80211_CMD_GET_MPATH, nested attribute described at | 622 | * info given for %NL80211_CMD_GET_MPATH, nested attribute described at |
| @@ -879,7 +883,9 @@ enum nl80211_commands { | |||
| 879 | * See &enum nl80211_key_default_types. | 883 | * See &enum nl80211_key_default_types. |
| 880 | * | 884 | * |
| 881 | * @NL80211_ATTR_MESH_SETUP: Optional mesh setup parameters. These cannot be | 885 | * @NL80211_ATTR_MESH_SETUP: Optional mesh setup parameters. These cannot be |
| 882 | * changed once the mesh is active. | 886 | * changed once the mesh is active. |
| 887 | * @NL80211_ATTR_MESH_CONFIG: Mesh configuration parameters, a nested attribute | ||
| 888 | * containing attributes from &enum nl80211_meshconf_params. | ||
| 883 | * | 889 | * |
| 884 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 890 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 885 | * @__NL80211_ATTR_AFTER_LAST: internal use | 891 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| @@ -1225,8 +1231,6 @@ enum nl80211_rate_info { | |||
| 1225 | * @NL80211_STA_INFO_INACTIVE_TIME: time since last activity (u32, msecs) | 1231 | * @NL80211_STA_INFO_INACTIVE_TIME: time since last activity (u32, msecs) |
| 1226 | * @NL80211_STA_INFO_RX_BYTES: total received bytes (u32, from this station) | 1232 | * @NL80211_STA_INFO_RX_BYTES: total received bytes (u32, from this station) |
| 1227 | * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station) | 1233 | * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station) |
| 1228 | * @__NL80211_STA_INFO_AFTER_LAST: internal | ||
| 1229 | * @NL80211_STA_INFO_MAX: highest possible station info attribute | ||
| 1230 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) | 1234 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) |
| 1231 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute | 1235 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute |
| 1232 | * containing info as possible, see &enum nl80211_sta_info_txrate. | 1236 | * containing info as possible, see &enum nl80211_sta_info_txrate. |
| @@ -1236,6 +1240,11 @@ enum nl80211_rate_info { | |||
| 1236 | * @NL80211_STA_INFO_TX_RETRIES: total retries (u32, to this station) | 1240 | * @NL80211_STA_INFO_TX_RETRIES: total retries (u32, to this station) |
| 1237 | * @NL80211_STA_INFO_TX_FAILED: total failed packets (u32, to this station) | 1241 | * @NL80211_STA_INFO_TX_FAILED: total failed packets (u32, to this station) |
| 1238 | * @NL80211_STA_INFO_SIGNAL_AVG: signal strength average (u8, dBm) | 1242 | * @NL80211_STA_INFO_SIGNAL_AVG: signal strength average (u8, dBm) |
| 1243 | * @NL80211_STA_INFO_LLID: the station's mesh LLID | ||
| 1244 | * @NL80211_STA_INFO_PLID: the station's mesh PLID | ||
| 1245 | * @NL80211_STA_INFO_PLINK_STATE: peer link state for the station | ||
| 1246 | * @__NL80211_STA_INFO_AFTER_LAST: internal | ||
| 1247 | * @NL80211_STA_INFO_MAX: highest possible station info attribute | ||
| 1239 | */ | 1248 | */ |
| 1240 | enum nl80211_sta_info { | 1249 | enum nl80211_sta_info { |
| 1241 | __NL80211_STA_INFO_INVALID, | 1250 | __NL80211_STA_INFO_INVALID, |
| @@ -1626,7 +1635,7 @@ enum nl80211_mntr_flags { | |||
| 1626 | * @NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME: The interval of time (in TUs) | 1635 | * @NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME: The interval of time (in TUs) |
| 1627 | * that it takes for an HWMP information element to propagate across the mesh | 1636 | * that it takes for an HWMP information element to propagate across the mesh |
| 1628 | * | 1637 | * |
| 1629 | * @NL80211_MESHCONF_ROOTMODE: whether root mode is enabled or not | 1638 | * @NL80211_MESHCONF_HWMP_ROOTMODE: whether root mode is enabled or not |
| 1630 | * | 1639 | * |
| 1631 | * @NL80211_MESHCONF_ELEMENT_TTL: specifies the value of TTL field set at a | 1640 | * @NL80211_MESHCONF_ELEMENT_TTL: specifies the value of TTL field set at a |
| 1632 | * source mesh point for path selection elements. | 1641 | * source mesh point for path selection elements. |
| @@ -1678,6 +1687,7 @@ enum nl80211_meshconf_params { | |||
| 1678 | * element that vendors will use to identify the path selection methods and | 1687 | * element that vendors will use to identify the path selection methods and |
| 1679 | * metrics in use. | 1688 | * metrics in use. |
| 1680 | * | 1689 | * |
| 1690 | * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number | ||
| 1681 | * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use | 1691 | * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use |
| 1682 | */ | 1692 | */ |
| 1683 | enum nl80211_mesh_setup_params { | 1693 | enum nl80211_mesh_setup_params { |
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h index 0ef22a1f129e..c84d900fbbb3 100644 --- a/include/linux/of_fdt.h +++ b/include/linux/of_fdt.h | |||
| @@ -97,7 +97,7 @@ extern void early_init_dt_check_for_initrd(unsigned long node); | |||
| 97 | extern int early_init_dt_scan_memory(unsigned long node, const char *uname, | 97 | extern int early_init_dt_scan_memory(unsigned long node, const char *uname, |
| 98 | int depth, void *data); | 98 | int depth, void *data); |
| 99 | extern void early_init_dt_add_memory_arch(u64 base, u64 size); | 99 | extern void early_init_dt_add_memory_arch(u64 base, u64 size); |
| 100 | extern u64 early_init_dt_alloc_memory_arch(u64 size, u64 align); | 100 | extern void * early_init_dt_alloc_memory_arch(u64 size, u64 align); |
| 101 | extern u64 dt_mem_next_cell(int s, __be32 **cellp); | 101 | extern u64 dt_mem_next_cell(int s, __be32 **cellp); |
| 102 | 102 | ||
| 103 | /* | 103 | /* |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 5f38c460367e..0db8037e2725 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
| @@ -48,9 +48,6 @@ | |||
| 48 | * struct page (these bits with information) are always mapped into kernel | 48 | * struct page (these bits with information) are always mapped into kernel |
| 49 | * address space... | 49 | * address space... |
| 50 | * | 50 | * |
| 51 | * PG_buddy is set to indicate that the page is free and in the buddy system | ||
| 52 | * (see mm/page_alloc.c). | ||
| 53 | * | ||
| 54 | * PG_hwpoison indicates that a page got corrupted in hardware and contains | 51 | * PG_hwpoison indicates that a page got corrupted in hardware and contains |
| 55 | * data with incorrect ECC bits that triggered a machine check. Accessing is | 52 | * data with incorrect ECC bits that triggered a machine check. Accessing is |
| 56 | * not safe since it may cause another machine check. Don't touch! | 53 | * not safe since it may cause another machine check. Don't touch! |
| @@ -96,7 +93,6 @@ enum pageflags { | |||
| 96 | PG_swapcache, /* Swap page: swp_entry_t in private */ | 93 | PG_swapcache, /* Swap page: swp_entry_t in private */ |
| 97 | PG_mappedtodisk, /* Has blocks allocated on-disk */ | 94 | PG_mappedtodisk, /* Has blocks allocated on-disk */ |
| 98 | PG_reclaim, /* To be reclaimed asap */ | 95 | PG_reclaim, /* To be reclaimed asap */ |
| 99 | PG_buddy, /* Page is free, on buddy lists */ | ||
| 100 | PG_swapbacked, /* Page is backed by RAM/swap */ | 96 | PG_swapbacked, /* Page is backed by RAM/swap */ |
| 101 | PG_unevictable, /* Page is "unevictable" */ | 97 | PG_unevictable, /* Page is "unevictable" */ |
| 102 | #ifdef CONFIG_MMU | 98 | #ifdef CONFIG_MMU |
| @@ -108,6 +104,9 @@ enum pageflags { | |||
| 108 | #ifdef CONFIG_MEMORY_FAILURE | 104 | #ifdef CONFIG_MEMORY_FAILURE |
| 109 | PG_hwpoison, /* hardware poisoned page. Don't touch */ | 105 | PG_hwpoison, /* hardware poisoned page. Don't touch */ |
| 110 | #endif | 106 | #endif |
| 107 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
| 108 | PG_compound_lock, | ||
| 109 | #endif | ||
| 111 | __NR_PAGEFLAGS, | 110 | __NR_PAGEFLAGS, |
| 112 | 111 | ||
| 113 | /* Filesystems */ | 112 | /* Filesystems */ |
| @@ -198,7 +197,7 @@ static inline int __TestClearPage##uname(struct page *page) { return 0; } | |||
| 198 | struct page; /* forward declaration */ | 197 | struct page; /* forward declaration */ |
| 199 | 198 | ||
| 200 | TESTPAGEFLAG(Locked, locked) TESTSETFLAG(Locked, locked) | 199 | TESTPAGEFLAG(Locked, locked) TESTSETFLAG(Locked, locked) |
| 201 | PAGEFLAG(Error, error) | 200 | PAGEFLAG(Error, error) TESTCLEARFLAG(Error, error) |
| 202 | PAGEFLAG(Referenced, referenced) TESTCLEARFLAG(Referenced, referenced) | 201 | PAGEFLAG(Referenced, referenced) TESTCLEARFLAG(Referenced, referenced) |
| 203 | PAGEFLAG(Dirty, dirty) TESTSCFLAG(Dirty, dirty) __CLEARPAGEFLAG(Dirty, dirty) | 202 | PAGEFLAG(Dirty, dirty) TESTSCFLAG(Dirty, dirty) __CLEARPAGEFLAG(Dirty, dirty) |
| 204 | PAGEFLAG(LRU, lru) __CLEARPAGEFLAG(LRU, lru) | 203 | PAGEFLAG(LRU, lru) __CLEARPAGEFLAG(LRU, lru) |
| @@ -230,7 +229,6 @@ PAGEFLAG(OwnerPriv1, owner_priv_1) TESTCLEARFLAG(OwnerPriv1, owner_priv_1) | |||
| 230 | * risky: they bypass page accounting. | 229 | * risky: they bypass page accounting. |
| 231 | */ | 230 | */ |
| 232 | TESTPAGEFLAG(Writeback, writeback) TESTSCFLAG(Writeback, writeback) | 231 | TESTPAGEFLAG(Writeback, writeback) TESTSCFLAG(Writeback, writeback) |
| 233 | __PAGEFLAG(Buddy, buddy) | ||
| 234 | PAGEFLAG(MappedToDisk, mappedtodisk) | 232 | PAGEFLAG(MappedToDisk, mappedtodisk) |
| 235 | 233 | ||
| 236 | /* PG_readahead is only used for file reads; PG_reclaim is only for writes */ | 234 | /* PG_readahead is only used for file reads; PG_reclaim is only for writes */ |
| @@ -344,7 +342,7 @@ static inline void set_page_writeback(struct page *page) | |||
| 344 | * tests can be used in performance sensitive paths. PageCompound is | 342 | * tests can be used in performance sensitive paths. PageCompound is |
| 345 | * generally not used in hot code paths. | 343 | * generally not used in hot code paths. |
| 346 | */ | 344 | */ |
| 347 | __PAGEFLAG(Head, head) | 345 | __PAGEFLAG(Head, head) CLEARPAGEFLAG(Head, head) |
| 348 | __PAGEFLAG(Tail, tail) | 346 | __PAGEFLAG(Tail, tail) |
| 349 | 347 | ||
| 350 | static inline int PageCompound(struct page *page) | 348 | static inline int PageCompound(struct page *page) |
| @@ -352,6 +350,13 @@ static inline int PageCompound(struct page *page) | |||
| 352 | return page->flags & ((1L << PG_head) | (1L << PG_tail)); | 350 | return page->flags & ((1L << PG_head) | (1L << PG_tail)); |
| 353 | 351 | ||
| 354 | } | 352 | } |
| 353 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
| 354 | static inline void ClearPageCompound(struct page *page) | ||
| 355 | { | ||
| 356 | BUG_ON(!PageHead(page)); | ||
| 357 | ClearPageHead(page); | ||
| 358 | } | ||
| 359 | #endif | ||
| 355 | #else | 360 | #else |
| 356 | /* | 361 | /* |
| 357 | * Reduce page flag use as much as possible by overlapping | 362 | * Reduce page flag use as much as possible by overlapping |
| @@ -389,14 +394,61 @@ static inline void __ClearPageTail(struct page *page) | |||
| 389 | page->flags &= ~PG_head_tail_mask; | 394 | page->flags &= ~PG_head_tail_mask; |
| 390 | } | 395 | } |
| 391 | 396 | ||
| 397 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
| 398 | static inline void ClearPageCompound(struct page *page) | ||
| 399 | { | ||
| 400 | BUG_ON((page->flags & PG_head_tail_mask) != (1 << PG_compound)); | ||
| 401 | clear_bit(PG_compound, &page->flags); | ||
| 402 | } | ||
| 403 | #endif | ||
| 404 | |||
| 392 | #endif /* !PAGEFLAGS_EXTENDED */ | 405 | #endif /* !PAGEFLAGS_EXTENDED */ |
| 393 | 406 | ||
| 407 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
| 408 | /* | ||
| 409 | * PageHuge() only returns true for hugetlbfs pages, but not for | ||
| 410 | * normal or transparent huge pages. | ||
| 411 | * | ||
| 412 | * PageTransHuge() returns true for both transparent huge and | ||
| 413 | * hugetlbfs pages, but not normal pages. PageTransHuge() can only be | ||
| 414 | * called only in the core VM paths where hugetlbfs pages can't exist. | ||
| 415 | */ | ||
| 416 | static inline int PageTransHuge(struct page *page) | ||
| 417 | { | ||
| 418 | VM_BUG_ON(PageTail(page)); | ||
| 419 | return PageHead(page); | ||
| 420 | } | ||
| 421 | |||
| 422 | static inline int PageTransCompound(struct page *page) | ||
| 423 | { | ||
| 424 | return PageCompound(page); | ||
| 425 | } | ||
| 426 | |||
| 427 | #else | ||
| 428 | |||
| 429 | static inline int PageTransHuge(struct page *page) | ||
| 430 | { | ||
| 431 | return 0; | ||
| 432 | } | ||
| 433 | |||
| 434 | static inline int PageTransCompound(struct page *page) | ||
| 435 | { | ||
| 436 | return 0; | ||
| 437 | } | ||
| 438 | #endif | ||
| 439 | |||
| 394 | #ifdef CONFIG_MMU | 440 | #ifdef CONFIG_MMU |
| 395 | #define __PG_MLOCKED (1 << PG_mlocked) | 441 | #define __PG_MLOCKED (1 << PG_mlocked) |
| 396 | #else | 442 | #else |
| 397 | #define __PG_MLOCKED 0 | 443 | #define __PG_MLOCKED 0 |
| 398 | #endif | 444 | #endif |
| 399 | 445 | ||
| 446 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
| 447 | #define __PG_COMPOUND_LOCK (1 << PG_compound_lock) | ||
| 448 | #else | ||
| 449 | #define __PG_COMPOUND_LOCK 0 | ||
| 450 | #endif | ||
| 451 | |||
| 400 | /* | 452 | /* |
| 401 | * Flags checked when a page is freed. Pages being freed should not have | 453 | * Flags checked when a page is freed. Pages being freed should not have |
| 402 | * these flags set. It they are, there is a problem. | 454 | * these flags set. It they are, there is a problem. |
| @@ -404,9 +456,10 @@ static inline void __ClearPageTail(struct page *page) | |||
| 404 | #define PAGE_FLAGS_CHECK_AT_FREE \ | 456 | #define PAGE_FLAGS_CHECK_AT_FREE \ |
| 405 | (1 << PG_lru | 1 << PG_locked | \ | 457 | (1 << PG_lru | 1 << PG_locked | \ |
| 406 | 1 << PG_private | 1 << PG_private_2 | \ | 458 | 1 << PG_private | 1 << PG_private_2 | \ |
| 407 | 1 << PG_buddy | 1 << PG_writeback | 1 << PG_reserved | \ | 459 | 1 << PG_writeback | 1 << PG_reserved | \ |
| 408 | 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active | \ | 460 | 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active | \ |
| 409 | 1 << PG_unevictable | __PG_MLOCKED | __PG_HWPOISON) | 461 | 1 << PG_unevictable | __PG_MLOCKED | __PG_HWPOISON | \ |
| 462 | __PG_COMPOUND_LOCK) | ||
| 410 | 463 | ||
| 411 | /* | 464 | /* |
| 412 | * Flags checked when a page is prepped for return by the page allocator. | 465 | * Flags checked when a page is prepped for return by the page allocator. |
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index b02195dfc1b0..6d6cb7a57bb3 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h | |||
| @@ -35,12 +35,15 @@ struct page_cgroup *lookup_page_cgroup(struct page *page); | |||
| 35 | 35 | ||
| 36 | enum { | 36 | enum { |
| 37 | /* flags for mem_cgroup */ | 37 | /* flags for mem_cgroup */ |
| 38 | PCG_LOCK, /* page cgroup is locked */ | 38 | PCG_LOCK, /* Lock for pc->mem_cgroup and following bits. */ |
| 39 | PCG_CACHE, /* charged as cache */ | 39 | PCG_CACHE, /* charged as cache */ |
| 40 | PCG_USED, /* this object is in use. */ | 40 | PCG_USED, /* this object is in use. */ |
| 41 | PCG_ACCT_LRU, /* page has been accounted for */ | ||
| 42 | PCG_FILE_MAPPED, /* page is accounted as "mapped" */ | ||
| 43 | PCG_MIGRATION, /* under page migration */ | 41 | PCG_MIGRATION, /* under page migration */ |
| 42 | /* flags for mem_cgroup and file and I/O status */ | ||
| 43 | PCG_MOVE_LOCK, /* For race between move_account v.s. following bits */ | ||
| 44 | PCG_FILE_MAPPED, /* page is accounted as "mapped" */ | ||
| 45 | /* No lock in page_cgroup */ | ||
| 46 | PCG_ACCT_LRU, /* page has been accounted for (under lru_lock) */ | ||
| 44 | }; | 47 | }; |
| 45 | 48 | ||
| 46 | #define TESTPCGFLAG(uname, lname) \ | 49 | #define TESTPCGFLAG(uname, lname) \ |
| @@ -94,6 +97,10 @@ static inline enum zone_type page_cgroup_zid(struct page_cgroup *pc) | |||
| 94 | 97 | ||
| 95 | static inline void lock_page_cgroup(struct page_cgroup *pc) | 98 | static inline void lock_page_cgroup(struct page_cgroup *pc) |
| 96 | { | 99 | { |
| 100 | /* | ||
| 101 | * Don't take this lock in IRQ context. | ||
| 102 | * This lock is for pc->mem_cgroup, USED, CACHE, MIGRATION | ||
| 103 | */ | ||
| 97 | bit_spin_lock(PCG_LOCK, &pc->flags); | 104 | bit_spin_lock(PCG_LOCK, &pc->flags); |
| 98 | } | 105 | } |
| 99 | 106 | ||
| @@ -107,6 +114,24 @@ static inline int page_is_cgroup_locked(struct page_cgroup *pc) | |||
| 107 | return bit_spin_is_locked(PCG_LOCK, &pc->flags); | 114 | return bit_spin_is_locked(PCG_LOCK, &pc->flags); |
| 108 | } | 115 | } |
| 109 | 116 | ||
| 117 | static inline void move_lock_page_cgroup(struct page_cgroup *pc, | ||
| 118 | unsigned long *flags) | ||
| 119 | { | ||
| 120 | /* | ||
| 121 | * We know updates to pc->flags of page cache's stats are from both of | ||
| 122 | * usual context or IRQ context. Disable IRQ to avoid deadlock. | ||
| 123 | */ | ||
| 124 | local_irq_save(*flags); | ||
| 125 | bit_spin_lock(PCG_MOVE_LOCK, &pc->flags); | ||
| 126 | } | ||
| 127 | |||
| 128 | static inline void move_unlock_page_cgroup(struct page_cgroup *pc, | ||
| 129 | unsigned long *flags) | ||
| 130 | { | ||
| 131 | bit_spin_unlock(PCG_MOVE_LOCK, &pc->flags); | ||
| 132 | local_irq_restore(*flags); | ||
| 133 | } | ||
| 134 | |||
| 110 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ | 135 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ |
| 111 | struct page_cgroup; | 136 | struct page_cgroup; |
| 112 | 137 | ||
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 2d1ffe3cf1ee..9c66e994540f 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
| @@ -48,7 +48,7 @@ static inline void mapping_clear_unevictable(struct address_space *mapping) | |||
| 48 | 48 | ||
| 49 | static inline int mapping_unevictable(struct address_space *mapping) | 49 | static inline int mapping_unevictable(struct address_space *mapping) |
| 50 | { | 50 | { |
| 51 | if (likely(mapping)) | 51 | if (mapping) |
| 52 | return test_bit(AS_UNEVICTABLE, &mapping->flags); | 52 | return test_bit(AS_UNEVICTABLE, &mapping->flags); |
| 53 | return !!mapping; | 53 | return !!mapping; |
| 54 | } | 54 | } |
diff --git a/include/linux/path.h b/include/linux/path.h index a581e8c06533..edc98dec6266 100644 --- a/include/linux/path.h +++ b/include/linux/path.h | |||
| @@ -10,9 +10,7 @@ struct path { | |||
| 10 | }; | 10 | }; |
| 11 | 11 | ||
| 12 | extern void path_get(struct path *); | 12 | extern void path_get(struct path *); |
| 13 | extern void path_get_long(struct path *); | ||
| 14 | extern void path_put(struct path *); | 13 | extern void path_put(struct path *); |
| 15 | extern void path_put_long(struct path *); | ||
| 16 | 14 | ||
| 17 | static inline int path_equal(const struct path *path1, const struct path *path2) | 15 | static inline int path_equal(const struct path *path1, const struct path *path2) |
| 18 | { | 16 | { |
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index c8b6473c5f42..44623500f419 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h | |||
| @@ -35,9 +35,12 @@ static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) | |||
| 35 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), | 35 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), |
| 36 | pbus->number); | 36 | pbus->number); |
| 37 | } | 37 | } |
| 38 | #endif | ||
| 39 | |||
| 40 | #ifdef CONFIG_ACPI_APEI | ||
| 41 | extern bool aer_acpi_firmware_first(void); | ||
| 38 | #else | 42 | #else |
| 39 | static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) | 43 | static inline bool aer_acpi_firmware_first(void) { return false; } |
| 40 | { return NULL; } | ||
| 41 | #endif | 44 | #endif |
| 42 | 45 | ||
| 43 | #endif /* _PCI_ACPI_H_ */ | 46 | #endif /* _PCI_ACPI_H_ */ |
diff --git a/include/linux/pci-aspm.h b/include/linux/pci-aspm.h index 91ba0b338b47..ce6810512c66 100644 --- a/include/linux/pci-aspm.h +++ b/include/linux/pci-aspm.h | |||
| @@ -27,6 +27,7 @@ extern void pcie_aspm_init_link_state(struct pci_dev *pdev); | |||
| 27 | extern void pcie_aspm_exit_link_state(struct pci_dev *pdev); | 27 | extern void pcie_aspm_exit_link_state(struct pci_dev *pdev); |
| 28 | extern void pcie_aspm_pm_state_change(struct pci_dev *pdev); | 28 | extern void pcie_aspm_pm_state_change(struct pci_dev *pdev); |
| 29 | extern void pci_disable_link_state(struct pci_dev *pdev, int state); | 29 | extern void pci_disable_link_state(struct pci_dev *pdev, int state); |
| 30 | extern void pcie_clear_aspm(void); | ||
| 30 | extern void pcie_no_aspm(void); | 31 | extern void pcie_no_aspm(void); |
| 31 | #else | 32 | #else |
| 32 | static inline void pcie_aspm_init_link_state(struct pci_dev *pdev) | 33 | static inline void pcie_aspm_init_link_state(struct pci_dev *pdev) |
| @@ -41,7 +42,9 @@ static inline void pcie_aspm_pm_state_change(struct pci_dev *pdev) | |||
| 41 | static inline void pci_disable_link_state(struct pci_dev *pdev, int state) | 42 | static inline void pci_disable_link_state(struct pci_dev *pdev, int state) |
| 42 | { | 43 | { |
| 43 | } | 44 | } |
| 44 | 45 | static inline void pcie_clear_aspm(void) | |
| 46 | { | ||
| 47 | } | ||
| 45 | static inline void pcie_no_aspm(void) | 48 | static inline void pcie_no_aspm(void) |
| 46 | { | 49 | { |
| 47 | } | 50 | } |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 7454408c41b6..559d02897075 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -806,7 +806,7 @@ size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size); | |||
| 806 | 806 | ||
| 807 | /* Power management related routines */ | 807 | /* Power management related routines */ |
| 808 | int pci_save_state(struct pci_dev *dev); | 808 | int pci_save_state(struct pci_dev *dev); |
| 809 | int pci_restore_state(struct pci_dev *dev); | 809 | void pci_restore_state(struct pci_dev *dev); |
| 810 | int __pci_complete_power_transition(struct pci_dev *dev, pci_power_t state); | 810 | int __pci_complete_power_transition(struct pci_dev *dev, pci_power_t state); |
| 811 | int pci_set_power_state(struct pci_dev *dev, pci_power_t state); | 811 | int pci_set_power_state(struct pci_dev *dev, pci_power_t state); |
| 812 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); | 812 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); |
| @@ -820,7 +820,6 @@ int pci_prepare_to_sleep(struct pci_dev *dev); | |||
| 820 | int pci_back_from_sleep(struct pci_dev *dev); | 820 | int pci_back_from_sleep(struct pci_dev *dev); |
| 821 | bool pci_dev_run_wake(struct pci_dev *dev); | 821 | bool pci_dev_run_wake(struct pci_dev *dev); |
| 822 | bool pci_check_pme_status(struct pci_dev *dev); | 822 | bool pci_check_pme_status(struct pci_dev *dev); |
| 823 | void pci_wakeup_event(struct pci_dev *dev); | ||
| 824 | void pci_pme_wakeup_bus(struct pci_bus *bus); | 823 | void pci_pme_wakeup_bus(struct pci_bus *bus); |
| 825 | 824 | ||
| 826 | static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, | 825 | static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, |
| @@ -994,6 +993,14 @@ extern void pci_restore_msi_state(struct pci_dev *dev); | |||
| 994 | extern int pci_msi_enabled(void); | 993 | extern int pci_msi_enabled(void); |
| 995 | #endif | 994 | #endif |
| 996 | 995 | ||
| 996 | #ifdef CONFIG_PCIEPORTBUS | ||
| 997 | extern bool pcie_ports_disabled; | ||
| 998 | extern bool pcie_ports_auto; | ||
| 999 | #else | ||
| 1000 | #define pcie_ports_disabled true | ||
| 1001 | #define pcie_ports_auto false | ||
| 1002 | #endif | ||
| 1003 | |||
| 997 | #ifndef CONFIG_PCIEASPM | 1004 | #ifndef CONFIG_PCIEASPM |
| 998 | static inline int pcie_aspm_enabled(void) | 1005 | static inline int pcie_aspm_enabled(void) |
| 999 | { | 1006 | { |
| @@ -1003,6 +1010,14 @@ static inline int pcie_aspm_enabled(void) | |||
| 1003 | extern int pcie_aspm_enabled(void); | 1010 | extern int pcie_aspm_enabled(void); |
| 1004 | #endif | 1011 | #endif |
| 1005 | 1012 | ||
| 1013 | #ifdef CONFIG_PCIEAER | ||
| 1014 | void pci_no_aer(void); | ||
| 1015 | bool pci_aer_available(void); | ||
| 1016 | #else | ||
| 1017 | static inline void pci_no_aer(void) { } | ||
| 1018 | static inline bool pci_aer_available(void) { return false; } | ||
| 1019 | #endif | ||
| 1020 | |||
| 1006 | #ifndef CONFIG_PCIE_ECRC | 1021 | #ifndef CONFIG_PCIE_ECRC |
| 1007 | static inline void pcie_set_ecrc_checking(struct pci_dev *dev) | 1022 | static inline void pcie_set_ecrc_checking(struct pci_dev *dev) |
| 1008 | { | 1023 | { |
| @@ -1168,10 +1183,8 @@ static inline int pci_save_state(struct pci_dev *dev) | |||
| 1168 | return 0; | 1183 | return 0; |
| 1169 | } | 1184 | } |
| 1170 | 1185 | ||
| 1171 | static inline int pci_restore_state(struct pci_dev *dev) | 1186 | static inline void pci_restore_state(struct pci_dev *dev) |
| 1172 | { | 1187 | { } |
| 1173 | return 0; | ||
| 1174 | } | ||
| 1175 | 1188 | ||
| 1176 | static inline int pci_set_power_state(struct pci_dev *dev, pci_power_t state) | 1189 | static inline int pci_set_power_state(struct pci_dev *dev, pci_power_t state) |
| 1177 | { | 1190 | { |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index ae0dc453e3e2..3adb06ebf841 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -2478,7 +2478,8 @@ | |||
| 2478 | #define PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MIN 0x1c41 | 2478 | #define PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MIN 0x1c41 |
| 2479 | #define PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MAX 0x1c5f | 2479 | #define PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MAX 0x1c5f |
| 2480 | #define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS 0x1d22 | 2480 | #define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS 0x1d22 |
| 2481 | #define PCI_DEVICE_ID_INTEL_PATSBURG_LPC 0x1d40 | 2481 | #define PCI_DEVICE_ID_INTEL_PATSBURG_LPC_0 0x1d40 |
| 2482 | #define PCI_DEVICE_ID_INTEL_PATSBURG_LPC_1 0x1d41 | ||
| 2482 | #define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410 | 2483 | #define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410 |
| 2483 | #define PCI_DEVICE_ID_INTEL_82801AA_1 0x2411 | 2484 | #define PCI_DEVICE_ID_INTEL_82801AA_1 0x2411 |
| 2484 | #define PCI_DEVICE_ID_INTEL_82801AA_3 0x2413 | 2485 | #define PCI_DEVICE_ID_INTEL_82801AA_3 0x2413 |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index af83076c31a6..5b7e6b1ba54f 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
| @@ -309,6 +309,14 @@ | |||
| 309 | #define PCI_MSIX_PBA 8 | 309 | #define PCI_MSIX_PBA 8 |
| 310 | #define PCI_MSIX_FLAGS_BIRMASK (7 << 0) | 310 | #define PCI_MSIX_FLAGS_BIRMASK (7 << 0) |
| 311 | 311 | ||
| 312 | /* MSI-X entry's format */ | ||
| 313 | #define PCI_MSIX_ENTRY_SIZE 16 | ||
| 314 | #define PCI_MSIX_ENTRY_LOWER_ADDR 0 | ||
| 315 | #define PCI_MSIX_ENTRY_UPPER_ADDR 4 | ||
| 316 | #define PCI_MSIX_ENTRY_DATA 8 | ||
| 317 | #define PCI_MSIX_ENTRY_VECTOR_CTRL 12 | ||
| 318 | #define PCI_MSIX_ENTRY_CTRL_MASKBIT 1 | ||
| 319 | |||
| 312 | /* CompactPCI Hotswap Register */ | 320 | /* CompactPCI Hotswap Register */ |
| 313 | 321 | ||
| 314 | #define PCI_CHSWP_CSR 2 /* Control and Status Register */ | 322 | #define PCI_CHSWP_CSR 2 /* Control and Status Register */ |
| @@ -496,6 +504,8 @@ | |||
| 496 | #define PCI_EXP_RTCTL_CRSSVE 0x10 /* CRS Software Visibility Enable */ | 504 | #define PCI_EXP_RTCTL_CRSSVE 0x10 /* CRS Software Visibility Enable */ |
| 497 | #define PCI_EXP_RTCAP 30 /* Root Capabilities */ | 505 | #define PCI_EXP_RTCAP 30 /* Root Capabilities */ |
| 498 | #define PCI_EXP_RTSTA 32 /* Root Status */ | 506 | #define PCI_EXP_RTSTA 32 /* Root Status */ |
| 507 | #define PCI_EXP_RTSTA_PME 0x10000 /* PME status */ | ||
| 508 | #define PCI_EXP_RTSTA_PENDING 0x20000 /* PME pending */ | ||
| 499 | #define PCI_EXP_DEVCAP2 36 /* Device Capabilities 2 */ | 509 | #define PCI_EXP_DEVCAP2 36 /* Device Capabilities 2 */ |
| 500 | #define PCI_EXP_DEVCAP2_ARI 0x20 /* Alternative Routing-ID */ | 510 | #define PCI_EXP_DEVCAP2_ARI 0x20 /* Alternative Routing-ID */ |
| 501 | #define PCI_EXP_DEVCTL2 40 /* Device Control 2 */ | 511 | #define PCI_EXP_DEVCTL2 40 /* Device Control 2 */ |
diff --git a/include/linux/posix_acl.h b/include/linux/posix_acl.h index d68283a898bb..54211c1cd926 100644 --- a/include/linux/posix_acl.h +++ b/include/linux/posix_acl.h | |||
| @@ -71,6 +71,7 @@ posix_acl_release(struct posix_acl *acl) | |||
| 71 | 71 | ||
| 72 | /* posix_acl.c */ | 72 | /* posix_acl.c */ |
| 73 | 73 | ||
| 74 | extern void posix_acl_init(struct posix_acl *, int); | ||
| 74 | extern struct posix_acl *posix_acl_alloc(int, gfp_t); | 75 | extern struct posix_acl *posix_acl_alloc(int, gfp_t); |
| 75 | extern struct posix_acl *posix_acl_clone(const struct posix_acl *, gfp_t); | 76 | extern struct posix_acl *posix_acl_clone(const struct posix_acl *, gfp_t); |
| 76 | extern int posix_acl_valid(const struct posix_acl *); | 77 | extern int posix_acl_valid(const struct posix_acl *); |
diff --git a/include/linux/power/gpio-charger.h b/include/linux/power/gpio-charger.h new file mode 100644 index 000000000000..de1dfe09a03d --- /dev/null +++ b/include/linux/power/gpio-charger.h | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de> | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it | ||
| 5 | * under the terms of the GNU General Public License as published by the | ||
| 6 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 7 | * option) any later version. | ||
| 8 | * | ||
| 9 | * You should have received a copy of the GNU General Public License along | ||
| 10 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 11 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 12 | * | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef __LINUX_POWER_GPIO_CHARGER_H__ | ||
| 16 | #define __LINUX_POWER_GPIO_CHARGER_H__ | ||
| 17 | |||
| 18 | #include <linux/power_supply.h> | ||
| 19 | #include <linux/types.h> | ||
| 20 | |||
| 21 | /** | ||
| 22 | * struct gpio_charger_platform_data - platform_data for gpio_charger devices | ||
| 23 | * @name: Name for the chargers power_supply device | ||
| 24 | * @type: Type of the charger | ||
| 25 | * @gpio: GPIO which is used to indicate the chargers status | ||
| 26 | * @gpio_active_low: Should be set to 1 if the GPIO is active low otherwise 0 | ||
| 27 | * @supplied_to: Array of battery names to which this chargers supplies power | ||
| 28 | * @num_supplicants: Number of entries in the supplied_to array | ||
| 29 | */ | ||
| 30 | struct gpio_charger_platform_data { | ||
| 31 | const char *name; | ||
| 32 | enum power_supply_type type; | ||
| 33 | |||
| 34 | int gpio; | ||
| 35 | int gpio_active_low; | ||
| 36 | |||
| 37 | char **supplied_to; | ||
| 38 | size_t num_supplicants; | ||
| 39 | }; | ||
| 40 | |||
| 41 | #endif | ||
diff --git a/include/linux/power/max17042_battery.h b/include/linux/power/max17042_battery.h new file mode 100644 index 000000000000..7995deb8bfc1 --- /dev/null +++ b/include/linux/power/max17042_battery.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* | ||
| 2 | * Fuel gauge driver for Maxim 17042 / 8966 / 8997 | ||
| 3 | * Note that Maxim 8966 and 8997 are mfd and this is its subdevice. | ||
| 4 | * | ||
| 5 | * Copyright (C) 2011 Samsung Electronics | ||
| 6 | * MyungJoo Ham <myungjoo.ham@samsung.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 | * This program is distributed in the hope that it will be useful, | ||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | * GNU General Public License for more details. | ||
| 17 | * | ||
| 18 | * You should have received a copy of the GNU General Public License | ||
| 19 | * along with this program; if not, write to the Free Software | ||
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 21 | */ | ||
| 22 | |||
| 23 | #ifndef __MAX17042_BATTERY_H_ | ||
| 24 | #define __MAX17042_BATTERY_H_ | ||
| 25 | |||
| 26 | struct max17042_platform_data { | ||
| 27 | bool enable_current_sense; | ||
| 28 | }; | ||
| 29 | |||
| 30 | #endif /* __MAX17042_BATTERY_H_ */ | ||
diff --git a/include/linux/quota.h b/include/linux/quota.h index 94c1f03b50eb..9a85412e0db6 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
| @@ -322,9 +322,12 @@ struct dquot_operations { | |||
| 322 | qsize_t *(*get_reserved_space) (struct inode *); | 322 | qsize_t *(*get_reserved_space) (struct inode *); |
| 323 | }; | 323 | }; |
| 324 | 324 | ||
| 325 | struct path; | ||
| 326 | |||
| 325 | /* Operations handling requests from userspace */ | 327 | /* Operations handling requests from userspace */ |
| 326 | struct quotactl_ops { | 328 | struct quotactl_ops { |
| 327 | int (*quota_on)(struct super_block *, int, int, char *); | 329 | int (*quota_on)(struct super_block *, int, int, struct path *); |
| 330 | int (*quota_on_meta)(struct super_block *, int, int); | ||
| 328 | int (*quota_off)(struct super_block *, int); | 331 | int (*quota_off)(struct super_block *, int); |
| 329 | int (*quota_sync)(struct super_block *, int, int); | 332 | int (*quota_sync)(struct super_block *, int, int); |
| 330 | int (*get_info)(struct super_block *, int, struct if_dqinfo *); | 333 | int (*get_info)(struct super_block *, int, struct if_dqinfo *); |
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index 223b14cd129c..eb354f6f26b3 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
| @@ -76,11 +76,9 @@ int dquot_mark_dquot_dirty(struct dquot *dquot); | |||
| 76 | 76 | ||
| 77 | int dquot_file_open(struct inode *inode, struct file *file); | 77 | int dquot_file_open(struct inode *inode, struct file *file); |
| 78 | 78 | ||
| 79 | int dquot_quota_on(struct super_block *sb, int type, int format_id, | ||
| 80 | char *path); | ||
| 81 | int dquot_enable(struct inode *inode, int type, int format_id, | 79 | int dquot_enable(struct inode *inode, int type, int format_id, |
| 82 | unsigned int flags); | 80 | unsigned int flags); |
| 83 | int dquot_quota_on_path(struct super_block *sb, int type, int format_id, | 81 | int dquot_quota_on(struct super_block *sb, int type, int format_id, |
| 84 | struct path *path); | 82 | struct path *path); |
| 85 | int dquot_quota_on_mount(struct super_block *sb, char *qf_name, | 83 | int dquot_quota_on_mount(struct super_block *sb, char *qf_name, |
| 86 | int format_id, int type); | 84 | int format_id, int type); |
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index ab2baa5c4884..23241c2fecce 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h | |||
| @@ -146,6 +146,22 @@ static inline void *radix_tree_deref_slot(void **pslot) | |||
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | /** | 148 | /** |
| 149 | * radix_tree_deref_slot_protected - dereference a slot without RCU lock but with tree lock held | ||
| 150 | * @pslot: pointer to slot, returned by radix_tree_lookup_slot | ||
| 151 | * Returns: item that was stored in that slot with any direct pointer flag | ||
| 152 | * removed. | ||
| 153 | * | ||
| 154 | * Similar to radix_tree_deref_slot but only used during migration when a pages | ||
| 155 | * mapping is being moved. The caller does not hold the RCU read lock but it | ||
| 156 | * must hold the tree lock to prevent parallel updates. | ||
| 157 | */ | ||
| 158 | static inline void *radix_tree_deref_slot_protected(void **pslot, | ||
| 159 | spinlock_t *treelock) | ||
| 160 | { | ||
| 161 | return rcu_dereference_protected(*pslot, lockdep_is_held(treelock)); | ||
| 162 | } | ||
| 163 | |||
| 164 | /** | ||
| 149 | * radix_tree_deref_retry - check radix_tree_deref_slot | 165 | * radix_tree_deref_retry - check radix_tree_deref_slot |
| 150 | * @arg: pointer returned by radix_tree_deref_slot | 166 | * @arg: pointer returned by radix_tree_deref_slot |
| 151 | * Returns: 0 if retry is not required, otherwise retry is required | 167 | * Returns: 0 if retry is not required, otherwise retry is required |
diff --git a/include/linux/rculist_bl.h b/include/linux/rculist_bl.h index b872b493724d..cf1244fbf3b6 100644 --- a/include/linux/rculist_bl.h +++ b/include/linux/rculist_bl.h | |||
| @@ -11,7 +11,8 @@ static inline void hlist_bl_set_first_rcu(struct hlist_bl_head *h, | |||
| 11 | struct hlist_bl_node *n) | 11 | struct hlist_bl_node *n) |
| 12 | { | 12 | { |
| 13 | LIST_BL_BUG_ON((unsigned long)n & LIST_BL_LOCKMASK); | 13 | LIST_BL_BUG_ON((unsigned long)n & LIST_BL_LOCKMASK); |
| 14 | LIST_BL_BUG_ON(!((unsigned long)h->first & LIST_BL_LOCKMASK)); | 14 | LIST_BL_BUG_ON(((unsigned long)h->first & LIST_BL_LOCKMASK) != |
| 15 | LIST_BL_LOCKMASK); | ||
| 15 | rcu_assign_pointer(h->first, | 16 | rcu_assign_pointer(h->first, |
| 16 | (struct hlist_bl_node *)((unsigned long)n | LIST_BL_LOCKMASK)); | 17 | (struct hlist_bl_node *)((unsigned long)n | LIST_BL_LOCKMASK)); |
| 17 | } | 18 | } |
diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h index fcb9884df618..a5930cb66145 100644 --- a/include/linux/res_counter.h +++ b/include/linux/res_counter.h | |||
| @@ -182,6 +182,26 @@ static inline bool res_counter_check_under_limit(struct res_counter *cnt) | |||
| 182 | return ret; | 182 | return ret; |
| 183 | } | 183 | } |
| 184 | 184 | ||
| 185 | /** | ||
| 186 | * res_counter_check_margin - check if the counter allows charging | ||
| 187 | * @cnt: the resource counter to check | ||
| 188 | * @bytes: the number of bytes to check the remaining space against | ||
| 189 | * | ||
| 190 | * Returns a boolean value on whether the counter can be charged | ||
| 191 | * @bytes or whether this would exceed the limit. | ||
| 192 | */ | ||
| 193 | static inline bool res_counter_check_margin(struct res_counter *cnt, | ||
| 194 | unsigned long bytes) | ||
| 195 | { | ||
| 196 | bool ret; | ||
| 197 | unsigned long flags; | ||
| 198 | |||
| 199 | spin_lock_irqsave(&cnt->lock, flags); | ||
| 200 | ret = cnt->limit - cnt->usage >= bytes; | ||
| 201 | spin_unlock_irqrestore(&cnt->lock, flags); | ||
| 202 | return ret; | ||
| 203 | } | ||
| 204 | |||
| 185 | static inline bool res_counter_check_under_soft_limit(struct res_counter *cnt) | 205 | static inline bool res_counter_check_under_soft_limit(struct res_counter *cnt) |
| 186 | { | 206 | { |
| 187 | bool ret; | 207 | bool ret; |
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index bb83c0da2071..e9fd04ca1e51 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
| @@ -198,6 +198,8 @@ enum ttu_flags { | |||
| 198 | }; | 198 | }; |
| 199 | #define TTU_ACTION(x) ((x) & TTU_ACTION_MASK) | 199 | #define TTU_ACTION(x) ((x) & TTU_ACTION_MASK) |
| 200 | 200 | ||
| 201 | bool is_vma_temporary_stack(struct vm_area_struct *vma); | ||
| 202 | |||
| 201 | int try_to_unmap(struct page *, enum ttu_flags flags); | 203 | int try_to_unmap(struct page *, enum ttu_flags flags); |
| 202 | int try_to_unmap_one(struct page *, struct vm_area_struct *, | 204 | int try_to_unmap_one(struct page *, struct vm_area_struct *, |
| 203 | unsigned long address, enum ttu_flags flags); | 205 | unsigned long address, enum ttu_flags flags); |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 3c995b4d742c..a0b639f8e805 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
| @@ -235,8 +235,6 @@ extern int rtc_irq_set_freq(struct rtc_device *rtc, | |||
| 235 | struct rtc_task *task, int freq); | 235 | struct rtc_task *task, int freq); |
| 236 | extern int rtc_update_irq_enable(struct rtc_device *rtc, unsigned int enabled); | 236 | extern int rtc_update_irq_enable(struct rtc_device *rtc, unsigned int enabled); |
| 237 | extern int rtc_alarm_irq_enable(struct rtc_device *rtc, unsigned int enabled); | 237 | extern int rtc_alarm_irq_enable(struct rtc_device *rtc, unsigned int enabled); |
| 238 | extern int rtc_dev_update_irq_enable_emul(struct rtc_device *rtc, | ||
| 239 | unsigned int enabled); | ||
| 240 | 238 | ||
| 241 | void rtc_aie_update_irq(void *private); | 239 | void rtc_aie_update_irq(void *private); |
| 242 | void rtc_uie_update_irq(void *private); | 240 | void rtc_uie_update_irq(void *private); |
| @@ -246,8 +244,6 @@ int rtc_register(rtc_task_t *task); | |||
| 246 | int rtc_unregister(rtc_task_t *task); | 244 | int rtc_unregister(rtc_task_t *task); |
| 247 | int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); | 245 | int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); |
| 248 | 246 | ||
| 249 | void rtc_timer_enqueue(struct rtc_device *rtc, struct rtc_timer *timer); | ||
| 250 | void rtc_timer_remove(struct rtc_device *rtc, struct rtc_timer *timer); | ||
| 251 | void rtc_timer_init(struct rtc_timer *timer, void (*f)(void* p), void* data); | 247 | void rtc_timer_init(struct rtc_timer *timer, void (*f)(void* p), void* data); |
| 252 | int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer* timer, | 248 | int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer* timer, |
| 253 | ktime_t expires, ktime_t period); | 249 | ktime_t expires, ktime_t period); |
diff --git a/include/linux/s3c_adc_battery.h b/include/linux/s3c_adc_battery.h index dbce22faa660..fbe58b7e63eb 100644 --- a/include/linux/s3c_adc_battery.h +++ b/include/linux/s3c_adc_battery.h | |||
| @@ -14,6 +14,7 @@ struct s3c_adc_bat_pdata { | |||
| 14 | void (*disable_charger)(void); | 14 | void (*disable_charger)(void); |
| 15 | 15 | ||
| 16 | int gpio_charge_finished; | 16 | int gpio_charge_finished; |
| 17 | int gpio_inverted; | ||
| 17 | 18 | ||
| 18 | const struct s3c_adc_bat_thresh *lut_noac; | 19 | const struct s3c_adc_bat_thresh *lut_noac; |
| 19 | unsigned int lut_noac_cnt; | 20 | unsigned int lut_noac_cnt; |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 96e23215e276..d747f948b34e 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -21,7 +21,8 @@ | |||
| 21 | #define CLONE_DETACHED 0x00400000 /* Unused, ignored */ | 21 | #define CLONE_DETACHED 0x00400000 /* Unused, ignored */ |
| 22 | #define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */ | 22 | #define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */ |
| 23 | #define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */ | 23 | #define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */ |
| 24 | #define CLONE_STOPPED 0x02000000 /* Start in stopped state */ | 24 | /* 0x02000000 was previously the unused CLONE_STOPPED (Start in stopped state) |
| 25 | and is now available for re-use. */ | ||
| 25 | #define CLONE_NEWUTS 0x04000000 /* New utsname group? */ | 26 | #define CLONE_NEWUTS 0x04000000 /* New utsname group? */ |
| 26 | #define CLONE_NEWIPC 0x08000000 /* New ipcs */ | 27 | #define CLONE_NEWIPC 0x08000000 /* New ipcs */ |
| 27 | #define CLONE_NEWUSER 0x10000000 /* New user namespace */ | 28 | #define CLONE_NEWUSER 0x10000000 /* New user namespace */ |
| @@ -433,6 +434,7 @@ extern int get_dumpable(struct mm_struct *mm); | |||
| 433 | #endif | 434 | #endif |
| 434 | /* leave room for more dump flags */ | 435 | /* leave room for more dump flags */ |
| 435 | #define MMF_VM_MERGEABLE 16 /* KSM may merge identical pages */ | 436 | #define MMF_VM_MERGEABLE 16 /* KSM may merge identical pages */ |
| 437 | #define MMF_VM_HUGEPAGE 17 /* set when VM_HUGEPAGE is set on vma */ | ||
| 436 | 438 | ||
| 437 | #define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK) | 439 | #define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK) |
| 438 | 440 | ||
| @@ -633,6 +635,8 @@ struct signal_struct { | |||
| 633 | 635 | ||
| 634 | int oom_adj; /* OOM kill score adjustment (bit shift) */ | 636 | int oom_adj; /* OOM kill score adjustment (bit shift) */ |
| 635 | int oom_score_adj; /* OOM kill score adjustment */ | 637 | int oom_score_adj; /* OOM kill score adjustment */ |
| 638 | int oom_score_adj_min; /* OOM kill score adjustment minimum value. | ||
| 639 | * Only settable by CAP_SYS_RESOURCE. */ | ||
| 636 | 640 | ||
| 637 | struct mutex cred_guard_mutex; /* guard against foreign influences on | 641 | struct mutex cred_guard_mutex; /* guard against foreign influences on |
| 638 | * credential calculations | 642 | * credential calculations |
diff --git a/include/linux/security.h b/include/linux/security.h index c642bb8b8f5a..b2b7f9749f5e 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -1662,7 +1662,7 @@ int security_capset(struct cred *new, const struct cred *old, | |||
| 1662 | const kernel_cap_t *effective, | 1662 | const kernel_cap_t *effective, |
| 1663 | const kernel_cap_t *inheritable, | 1663 | const kernel_cap_t *inheritable, |
| 1664 | const kernel_cap_t *permitted); | 1664 | const kernel_cap_t *permitted); |
| 1665 | int security_capable(int cap); | 1665 | int security_capable(const struct cred *cred, int cap); |
| 1666 | int security_real_capable(struct task_struct *tsk, int cap); | 1666 | int security_real_capable(struct task_struct *tsk, int cap); |
| 1667 | int security_real_capable_noaudit(struct task_struct *tsk, int cap); | 1667 | int security_real_capable_noaudit(struct task_struct *tsk, int cap); |
| 1668 | int security_sysctl(struct ctl_table *table, int op); | 1668 | int security_sysctl(struct ctl_table *table, int op); |
| @@ -1856,9 +1856,9 @@ static inline int security_capset(struct cred *new, | |||
| 1856 | return cap_capset(new, old, effective, inheritable, permitted); | 1856 | return cap_capset(new, old, effective, inheritable, permitted); |
| 1857 | } | 1857 | } |
| 1858 | 1858 | ||
| 1859 | static inline int security_capable(int cap) | 1859 | static inline int security_capable(const struct cred *cred, int cap) |
| 1860 | { | 1860 | { |
| 1861 | return cap_capable(current, current_cred(), cap, SECURITY_CAP_AUDIT); | 1861 | return cap_capable(current, cred, cap, SECURITY_CAP_AUDIT); |
| 1862 | } | 1862 | } |
| 1863 | 1863 | ||
| 1864 | static inline int security_real_capable(struct task_struct *tsk, int cap) | 1864 | static inline int security_real_capable(struct task_struct *tsk, int cap) |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 20ec0a64cb9f..bf221d65d9ad 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -255,6 +255,11 @@ typedef unsigned int sk_buff_data_t; | |||
| 255 | typedef unsigned char *sk_buff_data_t; | 255 | typedef unsigned char *sk_buff_data_t; |
| 256 | #endif | 256 | #endif |
| 257 | 257 | ||
| 258 | #if defined(CONFIG_NF_DEFRAG_IPV4) || defined(CONFIG_NF_DEFRAG_IPV4_MODULE) || \ | ||
| 259 | defined(CONFIG_NF_DEFRAG_IPV6) || defined(CONFIG_NF_DEFRAG_IPV6_MODULE) | ||
| 260 | #define NET_SKBUFF_NF_DEFRAG_NEEDED 1 | ||
| 261 | #endif | ||
| 262 | |||
| 258 | /** | 263 | /** |
| 259 | * struct sk_buff - socket buffer | 264 | * struct sk_buff - socket buffer |
| 260 | * @next: Next buffer in list | 265 | * @next: Next buffer in list |
| @@ -362,6 +367,8 @@ struct sk_buff { | |||
| 362 | void (*destructor)(struct sk_buff *skb); | 367 | void (*destructor)(struct sk_buff *skb); |
| 363 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 368 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) |
| 364 | struct nf_conntrack *nfct; | 369 | struct nf_conntrack *nfct; |
| 370 | #endif | ||
| 371 | #ifdef NET_SKBUFF_NF_DEFRAG_NEEDED | ||
| 365 | struct sk_buff *nfct_reasm; | 372 | struct sk_buff *nfct_reasm; |
| 366 | #endif | 373 | #endif |
| 367 | #ifdef CONFIG_BRIDGE_NETFILTER | 374 | #ifdef CONFIG_BRIDGE_NETFILTER |
| @@ -2057,6 +2064,8 @@ static inline void nf_conntrack_get(struct nf_conntrack *nfct) | |||
| 2057 | if (nfct) | 2064 | if (nfct) |
| 2058 | atomic_inc(&nfct->use); | 2065 | atomic_inc(&nfct->use); |
| 2059 | } | 2066 | } |
| 2067 | #endif | ||
| 2068 | #ifdef NET_SKBUFF_NF_DEFRAG_NEEDED | ||
| 2060 | static inline void nf_conntrack_get_reasm(struct sk_buff *skb) | 2069 | static inline void nf_conntrack_get_reasm(struct sk_buff *skb) |
| 2061 | { | 2070 | { |
| 2062 | if (skb) | 2071 | if (skb) |
| @@ -2085,6 +2094,8 @@ static inline void nf_reset(struct sk_buff *skb) | |||
| 2085 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 2094 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) |
| 2086 | nf_conntrack_put(skb->nfct); | 2095 | nf_conntrack_put(skb->nfct); |
| 2087 | skb->nfct = NULL; | 2096 | skb->nfct = NULL; |
| 2097 | #endif | ||
| 2098 | #ifdef NET_SKBUFF_NF_DEFRAG_NEEDED | ||
| 2088 | nf_conntrack_put_reasm(skb->nfct_reasm); | 2099 | nf_conntrack_put_reasm(skb->nfct_reasm); |
| 2089 | skb->nfct_reasm = NULL; | 2100 | skb->nfct_reasm = NULL; |
| 2090 | #endif | 2101 | #endif |
| @@ -2101,6 +2112,8 @@ static inline void __nf_copy(struct sk_buff *dst, const struct sk_buff *src) | |||
| 2101 | dst->nfct = src->nfct; | 2112 | dst->nfct = src->nfct; |
| 2102 | nf_conntrack_get(src->nfct); | 2113 | nf_conntrack_get(src->nfct); |
| 2103 | dst->nfctinfo = src->nfctinfo; | 2114 | dst->nfctinfo = src->nfctinfo; |
| 2115 | #endif | ||
| 2116 | #ifdef NET_SKBUFF_NF_DEFRAG_NEEDED | ||
| 2104 | dst->nfct_reasm = src->nfct_reasm; | 2117 | dst->nfct_reasm = src->nfct_reasm; |
| 2105 | nf_conntrack_get_reasm(src->nfct_reasm); | 2118 | nf_conntrack_get_reasm(src->nfct_reasm); |
| 2106 | #endif | 2119 | #endif |
| @@ -2114,6 +2127,8 @@ static inline void nf_copy(struct sk_buff *dst, const struct sk_buff *src) | |||
| 2114 | { | 2127 | { |
| 2115 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 2128 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) |
| 2116 | nf_conntrack_put(dst->nfct); | 2129 | nf_conntrack_put(dst->nfct); |
| 2130 | #endif | ||
| 2131 | #ifdef NET_SKBUFF_NF_DEFRAG_NEEDED | ||
| 2117 | nf_conntrack_put_reasm(dst->nfct_reasm); | 2132 | nf_conntrack_put_reasm(dst->nfct_reasm); |
| 2118 | #endif | 2133 | #endif |
| 2119 | #ifdef CONFIG_BRIDGE_NETFILTER | 2134 | #ifdef CONFIG_BRIDGE_NETFILTER |
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h index c50b458b8a3f..082884295f80 100644 --- a/include/linux/sunrpc/bc_xprt.h +++ b/include/linux/sunrpc/bc_xprt.h | |||
| @@ -47,14 +47,6 @@ static inline int svc_is_backchannel(const struct svc_rqst *rqstp) | |||
| 47 | return 1; | 47 | return 1; |
| 48 | return 0; | 48 | return 0; |
| 49 | } | 49 | } |
| 50 | static inline struct nfs4_sessionid *bc_xprt_sid(struct svc_rqst *rqstp) | ||
| 51 | { | ||
| 52 | if (svc_is_backchannel(rqstp)) | ||
| 53 | return (struct nfs4_sessionid *) | ||
| 54 | rqstp->rq_server->sv_bc_xprt->xpt_bc_sid; | ||
| 55 | return NULL; | ||
| 56 | } | ||
| 57 | |||
| 58 | #else /* CONFIG_NFS_V4_1 */ | 50 | #else /* CONFIG_NFS_V4_1 */ |
| 59 | static inline int xprt_setup_backchannel(struct rpc_xprt *xprt, | 51 | static inline int xprt_setup_backchannel(struct rpc_xprt *xprt, |
| 60 | unsigned int min_reqs) | 52 | unsigned int min_reqs) |
| @@ -67,11 +59,6 @@ static inline int svc_is_backchannel(const struct svc_rqst *rqstp) | |||
| 67 | return 0; | 59 | return 0; |
| 68 | } | 60 | } |
| 69 | 61 | ||
| 70 | static inline struct nfs4_sessionid *bc_xprt_sid(struct svc_rqst *rqstp) | ||
| 71 | { | ||
| 72 | return NULL; | ||
| 73 | } | ||
| 74 | |||
| 75 | static inline void xprt_free_bc_request(struct rpc_rqst *req) | 62 | static inline void xprt_free_bc_request(struct rpc_rqst *req) |
| 76 | { | 63 | { |
| 77 | } | 64 | } |
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 78aa104250b7..7898ea13de70 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
| @@ -256,10 +256,13 @@ static inline time_t get_expiry(char **bpp) | |||
| 256 | return rv - boot.tv_sec; | 256 | return rv - boot.tv_sec; |
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | #ifdef CONFIG_NFSD_DEPRECATED | ||
| 259 | static inline void sunrpc_invalidate(struct cache_head *h, | 260 | static inline void sunrpc_invalidate(struct cache_head *h, |
| 260 | struct cache_detail *detail) | 261 | struct cache_detail *detail) |
| 261 | { | 262 | { |
| 262 | h->expiry_time = seconds_since_boot() - 1; | 263 | h->expiry_time = seconds_since_boot() - 1; |
| 263 | detail->nextcheck = seconds_since_boot(); | 264 | detail->nextcheck = seconds_since_boot(); |
| 264 | } | 265 | } |
| 266 | #endif /* CONFIG_NFSD_DEPRECATED */ | ||
| 267 | |||
| 265 | #endif /* _LINUX_SUNRPC_CACHE_H_ */ | 268 | #endif /* _LINUX_SUNRPC_CACHE_H_ */ |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index c81d4d8be3a9..ea29330b78bd 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
| @@ -269,6 +269,7 @@ struct svc_rqst { | |||
| 269 | struct cache_req rq_chandle; /* handle passed to caches for | 269 | struct cache_req rq_chandle; /* handle passed to caches for |
| 270 | * request delaying | 270 | * request delaying |
| 271 | */ | 271 | */ |
| 272 | bool rq_dropme; | ||
| 272 | /* Catering to nfsd */ | 273 | /* Catering to nfsd */ |
| 273 | struct auth_domain * rq_client; /* RPC peer info */ | 274 | struct auth_domain * rq_client; /* RPC peer info */ |
| 274 | struct auth_domain * rq_gssclient; /* "gss/"-style peer info */ | 275 | struct auth_domain * rq_gssclient; /* "gss/"-style peer info */ |
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index 357da5e0daa3..7ad9751a0d87 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h | |||
| @@ -63,7 +63,6 @@ struct svc_xprt { | |||
| 63 | #define XPT_LISTENER 11 /* listening endpoint */ | 63 | #define XPT_LISTENER 11 /* listening endpoint */ |
| 64 | #define XPT_CACHE_AUTH 12 /* cache auth info */ | 64 | #define XPT_CACHE_AUTH 12 /* cache auth info */ |
| 65 | 65 | ||
| 66 | struct svc_pool *xpt_pool; /* current pool iff queued */ | ||
| 67 | struct svc_serv *xpt_server; /* service for transport */ | 66 | struct svc_serv *xpt_server; /* service for transport */ |
| 68 | atomic_t xpt_reserved; /* space on outq that is rsvd */ | 67 | atomic_t xpt_reserved; /* space on outq that is rsvd */ |
| 69 | struct mutex xpt_mutex; /* to serialize sending data */ | 68 | struct mutex xpt_mutex; /* to serialize sending data */ |
| @@ -78,9 +77,9 @@ struct svc_xprt { | |||
| 78 | size_t xpt_remotelen; /* length of address */ | 77 | size_t xpt_remotelen; /* length of address */ |
| 79 | struct rpc_wait_queue xpt_bc_pending; /* backchannel wait queue */ | 78 | struct rpc_wait_queue xpt_bc_pending; /* backchannel wait queue */ |
| 80 | struct list_head xpt_users; /* callbacks on free */ | 79 | struct list_head xpt_users; /* callbacks on free */ |
| 81 | void *xpt_bc_sid; /* back channel session ID */ | ||
| 82 | 80 | ||
| 83 | struct net *xpt_net; | 81 | struct net *xpt_net; |
| 82 | struct rpc_xprt *xpt_bc_xprt; /* NFSv4.1 backchannel */ | ||
| 84 | }; | 83 | }; |
| 85 | 84 | ||
| 86 | static inline void unregister_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u) | 85 | static inline void unregister_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u) |
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index 1b353a76c304..04dba23c59f2 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
| @@ -28,7 +28,6 @@ struct svc_sock { | |||
| 28 | /* private TCP part */ | 28 | /* private TCP part */ |
| 29 | u32 sk_reclen; /* length of record */ | 29 | u32 sk_reclen; /* length of record */ |
| 30 | u32 sk_tcplen; /* current read length */ | 30 | u32 sk_tcplen; /* current read length */ |
| 31 | struct rpc_xprt *sk_bc_xprt; /* NFSv4.1 backchannel xprt */ | ||
| 32 | }; | 31 | }; |
| 33 | 32 | ||
| 34 | /* | 33 | /* |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 89d10d279a20..bef0f535f746 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
| @@ -321,6 +321,7 @@ void xprt_conditional_disconnect(struct rpc_xprt *xprt, unsigned int cookie); | |||
| 321 | #define XPRT_CLOSING (6) | 321 | #define XPRT_CLOSING (6) |
| 322 | #define XPRT_CONNECTION_ABORT (7) | 322 | #define XPRT_CONNECTION_ABORT (7) |
| 323 | #define XPRT_CONNECTION_CLOSE (8) | 323 | #define XPRT_CONNECTION_CLOSE (8) |
| 324 | #define XPRT_INITIALIZED (9) | ||
| 324 | 325 | ||
| 325 | static inline void xprt_set_connected(struct rpc_xprt *xprt) | 326 | static inline void xprt_set_connected(struct rpc_xprt *xprt) |
| 326 | { | 327 | { |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index c1f499835b2a..5a89e3612875 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
| @@ -258,23 +258,6 @@ static inline int hibernate(void) { return -ENOSYS; } | |||
| 258 | static inline bool system_entering_hibernation(void) { return false; } | 258 | static inline bool system_entering_hibernation(void) { return false; } |
| 259 | #endif /* CONFIG_HIBERNATION */ | 259 | #endif /* CONFIG_HIBERNATION */ |
| 260 | 260 | ||
| 261 | #ifdef CONFIG_SUSPEND_NVS | ||
| 262 | extern int suspend_nvs_register(unsigned long start, unsigned long size); | ||
| 263 | extern int suspend_nvs_alloc(void); | ||
| 264 | extern void suspend_nvs_free(void); | ||
| 265 | extern void suspend_nvs_save(void); | ||
| 266 | extern void suspend_nvs_restore(void); | ||
| 267 | #else /* CONFIG_SUSPEND_NVS */ | ||
| 268 | static inline int suspend_nvs_register(unsigned long a, unsigned long b) | ||
| 269 | { | ||
| 270 | return 0; | ||
| 271 | } | ||
| 272 | static inline int suspend_nvs_alloc(void) { return 0; } | ||
| 273 | static inline void suspend_nvs_free(void) {} | ||
| 274 | static inline void suspend_nvs_save(void) {} | ||
| 275 | static inline void suspend_nvs_restore(void) {} | ||
| 276 | #endif /* CONFIG_SUSPEND_NVS */ | ||
| 277 | |||
| 278 | #ifdef CONFIG_PM_SLEEP | 261 | #ifdef CONFIG_PM_SLEEP |
| 279 | void save_processor_state(void); | 262 | void save_processor_state(void); |
| 280 | void restore_processor_state(void); | 263 | void restore_processor_state(void); |
diff --git a/include/linux/swap.h b/include/linux/swap.h index eba53e71d2cc..4d559325d919 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
| @@ -208,6 +208,8 @@ extern unsigned int nr_free_pagecache_pages(void); | |||
| 208 | /* linux/mm/swap.c */ | 208 | /* linux/mm/swap.c */ |
| 209 | extern void __lru_cache_add(struct page *, enum lru_list lru); | 209 | extern void __lru_cache_add(struct page *, enum lru_list lru); |
| 210 | extern void lru_cache_add_lru(struct page *, enum lru_list lru); | 210 | extern void lru_cache_add_lru(struct page *, enum lru_list lru); |
| 211 | extern void lru_add_page_tail(struct zone* zone, | ||
| 212 | struct page *page, struct page *page_tail); | ||
| 211 | extern void activate_page(struct page *); | 213 | extern void activate_page(struct page *); |
| 212 | extern void mark_page_accessed(struct page *); | 214 | extern void mark_page_accessed(struct page *); |
| 213 | extern void lru_add_drain(void); | 215 | extern void lru_add_drain(void); |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 18cd0684fc4e..98664db1be47 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -125,39 +125,37 @@ extern struct trace_event_functions enter_syscall_print_funcs; | |||
| 125 | extern struct trace_event_functions exit_syscall_print_funcs; | 125 | extern struct trace_event_functions exit_syscall_print_funcs; |
| 126 | 126 | ||
| 127 | #define SYSCALL_TRACE_ENTER_EVENT(sname) \ | 127 | #define SYSCALL_TRACE_ENTER_EVENT(sname) \ |
| 128 | static struct syscall_metadata \ | 128 | static struct syscall_metadata __syscall_meta_##sname; \ |
| 129 | __attribute__((__aligned__(4))) __syscall_meta_##sname; \ | ||
| 130 | static struct ftrace_event_call __used \ | 129 | static struct ftrace_event_call __used \ |
| 131 | __attribute__((__aligned__(4))) \ | ||
| 132 | __attribute__((section("_ftrace_events"))) \ | ||
| 133 | event_enter_##sname = { \ | 130 | event_enter_##sname = { \ |
| 134 | .name = "sys_enter"#sname, \ | 131 | .name = "sys_enter"#sname, \ |
| 135 | .class = &event_class_syscall_enter, \ | 132 | .class = &event_class_syscall_enter, \ |
| 136 | .event.funcs = &enter_syscall_print_funcs, \ | 133 | .event.funcs = &enter_syscall_print_funcs, \ |
| 137 | .data = (void *)&__syscall_meta_##sname,\ | 134 | .data = (void *)&__syscall_meta_##sname,\ |
| 138 | }; \ | 135 | }; \ |
| 136 | static struct ftrace_event_call __used \ | ||
| 137 | __attribute__((section("_ftrace_events"))) \ | ||
| 138 | *__event_enter_##sname = &event_enter_##sname; \ | ||
| 139 | __TRACE_EVENT_FLAGS(enter_##sname, TRACE_EVENT_FL_CAP_ANY) | 139 | __TRACE_EVENT_FLAGS(enter_##sname, TRACE_EVENT_FL_CAP_ANY) |
| 140 | 140 | ||
| 141 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ | 141 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ |
| 142 | static struct syscall_metadata \ | 142 | static struct syscall_metadata __syscall_meta_##sname; \ |
| 143 | __attribute__((__aligned__(4))) __syscall_meta_##sname; \ | ||
| 144 | static struct ftrace_event_call __used \ | 143 | static struct ftrace_event_call __used \ |
| 145 | __attribute__((__aligned__(4))) \ | ||
| 146 | __attribute__((section("_ftrace_events"))) \ | ||
| 147 | event_exit_##sname = { \ | 144 | event_exit_##sname = { \ |
| 148 | .name = "sys_exit"#sname, \ | 145 | .name = "sys_exit"#sname, \ |
| 149 | .class = &event_class_syscall_exit, \ | 146 | .class = &event_class_syscall_exit, \ |
| 150 | .event.funcs = &exit_syscall_print_funcs, \ | 147 | .event.funcs = &exit_syscall_print_funcs, \ |
| 151 | .data = (void *)&__syscall_meta_##sname,\ | 148 | .data = (void *)&__syscall_meta_##sname,\ |
| 152 | }; \ | 149 | }; \ |
| 150 | static struct ftrace_event_call __used \ | ||
| 151 | __attribute__((section("_ftrace_events"))) \ | ||
| 152 | *__event_exit_##sname = &event_exit_##sname; \ | ||
| 153 | __TRACE_EVENT_FLAGS(exit_##sname, TRACE_EVENT_FL_CAP_ANY) | 153 | __TRACE_EVENT_FLAGS(exit_##sname, TRACE_EVENT_FL_CAP_ANY) |
| 154 | 154 | ||
| 155 | #define SYSCALL_METADATA(sname, nb) \ | 155 | #define SYSCALL_METADATA(sname, nb) \ |
| 156 | SYSCALL_TRACE_ENTER_EVENT(sname); \ | 156 | SYSCALL_TRACE_ENTER_EVENT(sname); \ |
| 157 | SYSCALL_TRACE_EXIT_EVENT(sname); \ | 157 | SYSCALL_TRACE_EXIT_EVENT(sname); \ |
| 158 | static struct syscall_metadata __used \ | 158 | static struct syscall_metadata __used \ |
| 159 | __attribute__((__aligned__(4))) \ | ||
| 160 | __attribute__((section("__syscalls_metadata"))) \ | ||
| 161 | __syscall_meta_##sname = { \ | 159 | __syscall_meta_##sname = { \ |
| 162 | .name = "sys"#sname, \ | 160 | .name = "sys"#sname, \ |
| 163 | .nb_args = nb, \ | 161 | .nb_args = nb, \ |
| @@ -166,14 +164,15 @@ extern struct trace_event_functions exit_syscall_print_funcs; | |||
| 166 | .enter_event = &event_enter_##sname, \ | 164 | .enter_event = &event_enter_##sname, \ |
| 167 | .exit_event = &event_exit_##sname, \ | 165 | .exit_event = &event_exit_##sname, \ |
| 168 | .enter_fields = LIST_HEAD_INIT(__syscall_meta_##sname.enter_fields), \ | 166 | .enter_fields = LIST_HEAD_INIT(__syscall_meta_##sname.enter_fields), \ |
| 169 | }; | 167 | }; \ |
| 168 | static struct syscall_metadata __used \ | ||
| 169 | __attribute__((section("__syscalls_metadata"))) \ | ||
| 170 | *__p_syscall_meta_##sname = &__syscall_meta_##sname; | ||
| 170 | 171 | ||
| 171 | #define SYSCALL_DEFINE0(sname) \ | 172 | #define SYSCALL_DEFINE0(sname) \ |
| 172 | SYSCALL_TRACE_ENTER_EVENT(_##sname); \ | 173 | SYSCALL_TRACE_ENTER_EVENT(_##sname); \ |
| 173 | SYSCALL_TRACE_EXIT_EVENT(_##sname); \ | 174 | SYSCALL_TRACE_EXIT_EVENT(_##sname); \ |
| 174 | static struct syscall_metadata __used \ | 175 | static struct syscall_metadata __used \ |
| 175 | __attribute__((__aligned__(4))) \ | ||
| 176 | __attribute__((section("__syscalls_metadata"))) \ | ||
| 177 | __syscall_meta__##sname = { \ | 176 | __syscall_meta__##sname = { \ |
| 178 | .name = "sys_"#sname, \ | 177 | .name = "sys_"#sname, \ |
| 179 | .nb_args = 0, \ | 178 | .nb_args = 0, \ |
| @@ -181,6 +180,9 @@ extern struct trace_event_functions exit_syscall_print_funcs; | |||
| 181 | .exit_event = &event_exit__##sname, \ | 180 | .exit_event = &event_exit__##sname, \ |
| 182 | .enter_fields = LIST_HEAD_INIT(__syscall_meta__##sname.enter_fields), \ | 181 | .enter_fields = LIST_HEAD_INIT(__syscall_meta__##sname.enter_fields), \ |
| 183 | }; \ | 182 | }; \ |
| 183 | static struct syscall_metadata __used \ | ||
| 184 | __attribute__((section("__syscalls_metadata"))) \ | ||
| 185 | *__p_syscall_meta_##sname = &__syscall_meta__##sname; \ | ||
| 184 | asmlinkage long sys_##sname(void) | 186 | asmlinkage long sys_##sname(void) |
| 185 | #else | 187 | #else |
| 186 | #define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void) | 188 | #define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void) |
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h index 387fa7d05c98..7faf933cced7 100644 --- a/include/linux/sysrq.h +++ b/include/linux/sysrq.h | |||
| @@ -17,6 +17,9 @@ | |||
| 17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
| 18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
| 19 | 19 | ||
| 20 | /* Enable/disable SYSRQ support by default (0==no, 1==yes). */ | ||
| 21 | #define SYSRQ_DEFAULT_ENABLE 1 | ||
| 22 | |||
| 20 | /* Possible values of bitmask for enabling sysrq functions */ | 23 | /* Possible values of bitmask for enabling sysrq functions */ |
| 21 | /* 0x0001 is reserved for enable everything */ | 24 | /* 0x0001 is reserved for enable everything */ |
| 22 | #define SYSRQ_ENABLE_LOG 0x0002 | 25 | #define SYSRQ_ENABLE_LOG 0x0002 |
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 1de8b9eb841b..8651556dbd52 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
| @@ -77,7 +77,7 @@ struct thermal_cooling_device { | |||
| 77 | char type[THERMAL_NAME_LENGTH]; | 77 | char type[THERMAL_NAME_LENGTH]; |
| 78 | struct device device; | 78 | struct device device; |
| 79 | void *devdata; | 79 | void *devdata; |
| 80 | struct thermal_cooling_device_ops *ops; | 80 | const struct thermal_cooling_device_ops *ops; |
| 81 | struct list_head node; | 81 | struct list_head node; |
| 82 | }; | 82 | }; |
| 83 | 83 | ||
| @@ -114,7 +114,7 @@ struct thermal_zone_device { | |||
| 114 | int last_temperature; | 114 | int last_temperature; |
| 115 | bool passive; | 115 | bool passive; |
| 116 | unsigned int forced_passive; | 116 | unsigned int forced_passive; |
| 117 | struct thermal_zone_device_ops *ops; | 117 | const struct thermal_zone_device_ops *ops; |
| 118 | struct list_head cooling_devices; | 118 | struct list_head cooling_devices; |
| 119 | struct idr idr; | 119 | struct idr idr; |
| 120 | struct mutex lock; /* protect cooling devices list */ | 120 | struct mutex lock; /* protect cooling devices list */ |
| @@ -127,13 +127,41 @@ struct thermal_zone_device { | |||
| 127 | struct thermal_hwmon_attr temp_crit; /* hwmon sys attr */ | 127 | struct thermal_hwmon_attr temp_crit; /* hwmon sys attr */ |
| 128 | #endif | 128 | #endif |
| 129 | }; | 129 | }; |
| 130 | /* Adding event notification support elements */ | ||
| 131 | #define THERMAL_GENL_FAMILY_NAME "thermal_event" | ||
| 132 | #define THERMAL_GENL_VERSION 0x01 | ||
| 133 | #define THERMAL_GENL_MCAST_GROUP_NAME "thermal_mc_group" | ||
| 134 | |||
| 135 | enum events { | ||
| 136 | THERMAL_AUX0, | ||
| 137 | THERMAL_AUX1, | ||
| 138 | THERMAL_CRITICAL, | ||
| 139 | THERMAL_DEV_FAULT, | ||
| 140 | }; | ||
| 141 | |||
| 142 | struct thermal_genl_event { | ||
| 143 | u32 orig; | ||
| 144 | enum events event; | ||
| 145 | }; | ||
| 146 | /* attributes of thermal_genl_family */ | ||
| 147 | enum { | ||
| 148 | THERMAL_GENL_ATTR_UNSPEC, | ||
| 149 | THERMAL_GENL_ATTR_EVENT, | ||
| 150 | __THERMAL_GENL_ATTR_MAX, | ||
| 151 | }; | ||
| 152 | #define THERMAL_GENL_ATTR_MAX (__THERMAL_GENL_ATTR_MAX - 1) | ||
| 153 | |||
| 154 | /* commands supported by the thermal_genl_family */ | ||
| 155 | enum { | ||
| 156 | THERMAL_GENL_CMD_UNSPEC, | ||
| 157 | THERMAL_GENL_CMD_EVENT, | ||
| 158 | __THERMAL_GENL_CMD_MAX, | ||
| 159 | }; | ||
| 160 | #define THERMAL_GENL_CMD_MAX (__THERMAL_GENL_CMD_MAX - 1) | ||
| 130 | 161 | ||
| 131 | struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, | 162 | struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, |
| 132 | struct | 163 | const struct thermal_zone_device_ops *, int tc1, int tc2, |
| 133 | thermal_zone_device_ops | 164 | int passive_freq, int polling_freq); |
| 134 | *, int tc1, int tc2, | ||
| 135 | int passive_freq, | ||
| 136 | int polling_freq); | ||
| 137 | void thermal_zone_device_unregister(struct thermal_zone_device *); | 165 | void thermal_zone_device_unregister(struct thermal_zone_device *); |
| 138 | 166 | ||
| 139 | int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, | 167 | int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, |
| @@ -142,9 +170,8 @@ int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, | |||
| 142 | struct thermal_cooling_device *); | 170 | struct thermal_cooling_device *); |
| 143 | void thermal_zone_device_update(struct thermal_zone_device *); | 171 | void thermal_zone_device_update(struct thermal_zone_device *); |
| 144 | struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, | 172 | struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, |
| 145 | struct | 173 | const struct thermal_cooling_device_ops *); |
| 146 | thermal_cooling_device_ops | ||
| 147 | *); | ||
| 148 | void thermal_cooling_device_unregister(struct thermal_cooling_device *); | 174 | void thermal_cooling_device_unregister(struct thermal_cooling_device *); |
| 175 | extern int generate_netlink_event(u32 orig, enum events event); | ||
| 149 | 176 | ||
| 150 | #endif /* __THERMAL_H__ */ | 177 | #endif /* __THERMAL_H__ */ |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index c6814616653b..97c84a58efb8 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
| @@ -33,12 +33,7 @@ struct tracepoint { | |||
| 33 | void (*regfunc)(void); | 33 | void (*regfunc)(void); |
| 34 | void (*unregfunc)(void); | 34 | void (*unregfunc)(void); |
| 35 | struct tracepoint_func __rcu *funcs; | 35 | struct tracepoint_func __rcu *funcs; |
| 36 | } __attribute__((aligned(32))); /* | 36 | }; |
| 37 | * Aligned on 32 bytes because it is | ||
| 38 | * globally visible and gcc happily | ||
| 39 | * align these on the structure size. | ||
| 40 | * Keep in sync with vmlinux.lds.h. | ||
| 41 | */ | ||
| 42 | 37 | ||
| 43 | /* | 38 | /* |
| 44 | * Connect a probe to a tracepoint. | 39 | * Connect a probe to a tracepoint. |
| @@ -61,15 +56,15 @@ extern void tracepoint_probe_update_all(void); | |||
| 61 | 56 | ||
| 62 | struct tracepoint_iter { | 57 | struct tracepoint_iter { |
| 63 | struct module *module; | 58 | struct module *module; |
| 64 | struct tracepoint *tracepoint; | 59 | struct tracepoint * const *tracepoint; |
| 65 | }; | 60 | }; |
| 66 | 61 | ||
| 67 | extern void tracepoint_iter_start(struct tracepoint_iter *iter); | 62 | extern void tracepoint_iter_start(struct tracepoint_iter *iter); |
| 68 | extern void tracepoint_iter_next(struct tracepoint_iter *iter); | 63 | extern void tracepoint_iter_next(struct tracepoint_iter *iter); |
| 69 | extern void tracepoint_iter_stop(struct tracepoint_iter *iter); | 64 | extern void tracepoint_iter_stop(struct tracepoint_iter *iter); |
| 70 | extern void tracepoint_iter_reset(struct tracepoint_iter *iter); | 65 | extern void tracepoint_iter_reset(struct tracepoint_iter *iter); |
| 71 | extern int tracepoint_get_iter_range(struct tracepoint **tracepoint, | 66 | extern int tracepoint_get_iter_range(struct tracepoint * const **tracepoint, |
| 72 | struct tracepoint *begin, struct tracepoint *end); | 67 | struct tracepoint * const *begin, struct tracepoint * const *end); |
| 73 | 68 | ||
| 74 | /* | 69 | /* |
| 75 | * tracepoint_synchronize_unregister must be called between the last tracepoint | 70 | * tracepoint_synchronize_unregister must be called between the last tracepoint |
| @@ -84,11 +79,13 @@ static inline void tracepoint_synchronize_unregister(void) | |||
| 84 | #define PARAMS(args...) args | 79 | #define PARAMS(args...) args |
| 85 | 80 | ||
| 86 | #ifdef CONFIG_TRACEPOINTS | 81 | #ifdef CONFIG_TRACEPOINTS |
| 87 | extern void tracepoint_update_probe_range(struct tracepoint *begin, | 82 | extern |
| 88 | struct tracepoint *end); | 83 | void tracepoint_update_probe_range(struct tracepoint * const *begin, |
| 84 | struct tracepoint * const *end); | ||
| 89 | #else | 85 | #else |
| 90 | static inline void tracepoint_update_probe_range(struct tracepoint *begin, | 86 | static inline |
| 91 | struct tracepoint *end) | 87 | void tracepoint_update_probe_range(struct tracepoint * const *begin, |
| 88 | struct tracepoint * const *end) | ||
| 92 | { } | 89 | { } |
| 93 | #endif /* CONFIG_TRACEPOINTS */ | 90 | #endif /* CONFIG_TRACEPOINTS */ |
| 94 | 91 | ||
| @@ -174,12 +171,20 @@ do_trace: \ | |||
| 174 | { \ | 171 | { \ |
| 175 | } | 172 | } |
| 176 | 173 | ||
| 174 | /* | ||
| 175 | * We have no guarantee that gcc and the linker won't up-align the tracepoint | ||
| 176 | * structures, so we create an array of pointers that will be used for iteration | ||
| 177 | * on the tracepoints. | ||
| 178 | */ | ||
| 177 | #define DEFINE_TRACE_FN(name, reg, unreg) \ | 179 | #define DEFINE_TRACE_FN(name, reg, unreg) \ |
| 178 | static const char __tpstrtab_##name[] \ | 180 | static const char __tpstrtab_##name[] \ |
| 179 | __attribute__((section("__tracepoints_strings"))) = #name; \ | 181 | __attribute__((section("__tracepoints_strings"))) = #name; \ |
| 180 | struct tracepoint __tracepoint_##name \ | 182 | struct tracepoint __tracepoint_##name \ |
| 181 | __attribute__((section("__tracepoints"), aligned(32))) = \ | 183 | __attribute__((section("__tracepoints"))) = \ |
| 182 | { __tpstrtab_##name, 0, reg, unreg, NULL } | 184 | { __tpstrtab_##name, 0, reg, unreg, NULL }; \ |
| 185 | static struct tracepoint * const __tracepoint_ptr_##name __used \ | ||
| 186 | __attribute__((section("__tracepoints_ptrs"))) = \ | ||
| 187 | &__tracepoint_##name; | ||
| 183 | 188 | ||
| 184 | #define DEFINE_TRACE(name) \ | 189 | #define DEFINE_TRACE(name) \ |
| 185 | DEFINE_TRACE_FN(name, NULL, NULL); | 190 | DEFINE_TRACE_FN(name, NULL, NULL); |
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h index 5e86dc771da4..81a927930bfd 100644 --- a/include/linux/usb/cdc.h +++ b/include/linux/usb/cdc.h | |||
| @@ -89,7 +89,7 @@ struct usb_cdc_acm_descriptor { | |||
| 89 | 89 | ||
| 90 | #define USB_CDC_COMM_FEATURE 0x01 | 90 | #define USB_CDC_COMM_FEATURE 0x01 |
| 91 | #define USB_CDC_CAP_LINE 0x02 | 91 | #define USB_CDC_CAP_LINE 0x02 |
| 92 | #define USB_CDC_CAP_BRK 0x04 | 92 | #define USB_CDC_CAP_BRK 0x04 |
| 93 | #define USB_CDC_CAP_NOTIFY 0x08 | 93 | #define USB_CDC_CAP_NOTIFY 0x08 |
| 94 | 94 | ||
| 95 | /* "Union Functional Descriptor" from CDC spec 5.2.3.8 */ | 95 | /* "Union Functional Descriptor" from CDC spec 5.2.3.8 */ |
| @@ -271,6 +271,11 @@ struct usb_cdc_notification { | |||
| 271 | __le16 wLength; | 271 | __le16 wLength; |
| 272 | } __attribute__ ((packed)); | 272 | } __attribute__ ((packed)); |
| 273 | 273 | ||
| 274 | struct usb_cdc_speed_change { | ||
| 275 | __le32 DLBitRRate; /* contains the downlink bit rate (IN pipe) */ | ||
| 276 | __le32 ULBitRate; /* contains the uplink bit rate (OUT pipe) */ | ||
| 277 | } __attribute__ ((packed)); | ||
| 278 | |||
| 274 | /*-------------------------------------------------------------------------*/ | 279 | /*-------------------------------------------------------------------------*/ |
| 275 | 280 | ||
| 276 | /* | 281 | /* |
| @@ -292,7 +297,7 @@ struct usb_cdc_ncm_ntb_parameters { | |||
| 292 | __le16 wNdpOutDivisor; | 297 | __le16 wNdpOutDivisor; |
| 293 | __le16 wNdpOutPayloadRemainder; | 298 | __le16 wNdpOutPayloadRemainder; |
| 294 | __le16 wNdpOutAlignment; | 299 | __le16 wNdpOutAlignment; |
| 295 | __le16 wPadding2; | 300 | __le16 wNtbOutMaxDatagrams; |
| 296 | } __attribute__ ((packed)); | 301 | } __attribute__ ((packed)); |
| 297 | 302 | ||
| 298 | /* | 303 | /* |
| @@ -307,7 +312,7 @@ struct usb_cdc_ncm_nth16 { | |||
| 307 | __le16 wHeaderLength; | 312 | __le16 wHeaderLength; |
| 308 | __le16 wSequence; | 313 | __le16 wSequence; |
| 309 | __le16 wBlockLength; | 314 | __le16 wBlockLength; |
| 310 | __le16 wFpIndex; | 315 | __le16 wNdpIndex; |
| 311 | } __attribute__ ((packed)); | 316 | } __attribute__ ((packed)); |
| 312 | 317 | ||
| 313 | struct usb_cdc_ncm_nth32 { | 318 | struct usb_cdc_ncm_nth32 { |
| @@ -315,7 +320,7 @@ struct usb_cdc_ncm_nth32 { | |||
| 315 | __le16 wHeaderLength; | 320 | __le16 wHeaderLength; |
| 316 | __le16 wSequence; | 321 | __le16 wSequence; |
| 317 | __le32 dwBlockLength; | 322 | __le32 dwBlockLength; |
| 318 | __le32 dwFpIndex; | 323 | __le32 dwNdpIndex; |
| 319 | } __attribute__ ((packed)); | 324 | } __attribute__ ((packed)); |
| 320 | 325 | ||
| 321 | /* | 326 | /* |
| @@ -337,7 +342,7 @@ struct usb_cdc_ncm_dpe16 { | |||
| 337 | struct usb_cdc_ncm_ndp16 { | 342 | struct usb_cdc_ncm_ndp16 { |
| 338 | __le32 dwSignature; | 343 | __le32 dwSignature; |
| 339 | __le16 wLength; | 344 | __le16 wLength; |
| 340 | __le16 wNextFpIndex; | 345 | __le16 wNextNdpIndex; |
| 341 | struct usb_cdc_ncm_dpe16 dpe16[0]; | 346 | struct usb_cdc_ncm_dpe16 dpe16[0]; |
| 342 | } __attribute__ ((packed)); | 347 | } __attribute__ ((packed)); |
| 343 | 348 | ||
| @@ -375,6 +380,7 @@ struct usb_cdc_ncm_ndp32 { | |||
| 375 | #define USB_CDC_NCM_NCAP_ENCAP_COMMAND (1 << 2) | 380 | #define USB_CDC_NCM_NCAP_ENCAP_COMMAND (1 << 2) |
| 376 | #define USB_CDC_NCM_NCAP_MAX_DATAGRAM_SIZE (1 << 3) | 381 | #define USB_CDC_NCM_NCAP_MAX_DATAGRAM_SIZE (1 << 3) |
| 377 | #define USB_CDC_NCM_NCAP_CRC_MODE (1 << 4) | 382 | #define USB_CDC_NCM_NCAP_CRC_MODE (1 << 4) |
| 383 | #define USB_CDC_NCM_NCAP_NTB_INPUT_SIZE (1 << 5) | ||
| 378 | 384 | ||
| 379 | /* CDC NCM subclass Table 6-3: NTB Parameter Structure */ | 385 | /* CDC NCM subclass Table 6-3: NTB Parameter Structure */ |
| 380 | #define USB_CDC_NCM_NTB16_SUPPORTED (1 << 0) | 386 | #define USB_CDC_NCM_NTB16_SUPPORTED (1 << 0) |
| @@ -392,6 +398,13 @@ struct usb_cdc_ncm_ndp32 { | |||
| 392 | #define USB_CDC_NCM_NTB_MIN_IN_SIZE 2048 | 398 | #define USB_CDC_NCM_NTB_MIN_IN_SIZE 2048 |
| 393 | #define USB_CDC_NCM_NTB_MIN_OUT_SIZE 2048 | 399 | #define USB_CDC_NCM_NTB_MIN_OUT_SIZE 2048 |
| 394 | 400 | ||
| 401 | /* NTB Input Size Structure */ | ||
| 402 | struct usb_cdc_ncm_ndp_input_size { | ||
| 403 | __le32 dwNtbInMaxSize; | ||
| 404 | __le16 wNtbInMaxDatagrams; | ||
| 405 | __le16 wReserved; | ||
| 406 | } __attribute__ ((packed)); | ||
| 407 | |||
| 395 | /* CDC NCM subclass 6.2.11 SetCrcMode */ | 408 | /* CDC NCM subclass 6.2.11 SetCrcMode */ |
| 396 | #define USB_CDC_NCM_CRC_NOT_APPENDED 0x00 | 409 | #define USB_CDC_NCM_CRC_NOT_APPENDED 0x00 |
| 397 | #define USB_CDC_NCM_CRC_APPENDED 0x01 | 410 | #define USB_CDC_NCM_CRC_APPENDED 0x01 |
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index dd6ee49a0844..a854fe89484e 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h | |||
| @@ -112,6 +112,7 @@ struct usb_hcd { | |||
| 112 | /* Flags that get set only during HCD registration or removal. */ | 112 | /* Flags that get set only during HCD registration or removal. */ |
| 113 | unsigned rh_registered:1;/* is root hub registered? */ | 113 | unsigned rh_registered:1;/* is root hub registered? */ |
| 114 | unsigned rh_pollable:1; /* may we poll the root hub? */ | 114 | unsigned rh_pollable:1; /* may we poll the root hub? */ |
| 115 | unsigned msix_enabled:1; /* driver has MSI-X enabled? */ | ||
| 115 | 116 | ||
| 116 | /* The next flag is a stopgap, to be removed when all the HCDs | 117 | /* The next flag is a stopgap, to be removed when all the HCDs |
| 117 | * support the new root-hub polling mechanism. */ | 118 | * support the new root-hub polling mechanism. */ |
diff --git a/include/linux/usb/msm_hsusb_hw.h b/include/linux/usb/msm_hsusb_hw.h index b92e17349c7b..7d1babbff071 100644 --- a/include/linux/usb/msm_hsusb_hw.h +++ b/include/linux/usb/msm_hsusb_hw.h | |||
| @@ -16,12 +16,8 @@ | |||
| 16 | #ifndef __LINUX_USB_GADGET_MSM72K_UDC_H__ | 16 | #ifndef __LINUX_USB_GADGET_MSM72K_UDC_H__ |
| 17 | #define __LINUX_USB_GADGET_MSM72K_UDC_H__ | 17 | #define __LINUX_USB_GADGET_MSM72K_UDC_H__ |
| 18 | 18 | ||
| 19 | #ifdef CONFIG_ARCH_MSM7X00A | ||
| 20 | #define USB_SBUSCFG (MSM_USB_BASE + 0x0090) | ||
| 21 | #else | ||
| 22 | #define USB_AHBBURST (MSM_USB_BASE + 0x0090) | 19 | #define USB_AHBBURST (MSM_USB_BASE + 0x0090) |
| 23 | #define USB_AHBMODE (MSM_USB_BASE + 0x0098) | 20 | #define USB_AHBMODE (MSM_USB_BASE + 0x0098) |
| 24 | #endif | ||
| 25 | #define USB_CAPLENGTH (MSM_USB_BASE + 0x0100) /* 8 bit */ | 21 | #define USB_CAPLENGTH (MSM_USB_BASE + 0x0100) /* 8 bit */ |
| 26 | 22 | ||
| 27 | #define USB_USBCMD (MSM_USB_BASE + 0x0140) | 23 | #define USB_USBCMD (MSM_USB_BASE + 0x0140) |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 16d682f4f7c3..c9049139a7a5 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
| @@ -347,6 +347,9 @@ extern int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port, | |||
| 347 | extern int usb_serial_handle_sysrq_char(struct usb_serial_port *port, | 347 | extern int usb_serial_handle_sysrq_char(struct usb_serial_port *port, |
| 348 | unsigned int ch); | 348 | unsigned int ch); |
| 349 | extern int usb_serial_handle_break(struct usb_serial_port *port); | 349 | extern int usb_serial_handle_break(struct usb_serial_port *port); |
| 350 | extern void usb_serial_handle_dcd_change(struct usb_serial_port *usb_port, | ||
| 351 | struct tty_struct *tty, | ||
| 352 | unsigned int status); | ||
| 350 | 353 | ||
| 351 | 354 | ||
| 352 | extern int usb_serial_bus_register(struct usb_serial_driver *device); | 355 | extern int usb_serial_bus_register(struct usb_serial_driver *device); |
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index 0093dd7c1d6f..800617b4ddd5 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h | |||
| @@ -109,7 +109,10 @@ static inline bool virtio_has_feature(const struct virtio_device *vdev, | |||
| 109 | unsigned int fbit) | 109 | unsigned int fbit) |
| 110 | { | 110 | { |
| 111 | /* Did you forget to fix assumptions on max features? */ | 111 | /* Did you forget to fix assumptions on max features? */ |
| 112 | MAYBE_BUILD_BUG_ON(fbit >= 32); | 112 | if (__builtin_constant_p(fbit)) |
| 113 | BUILD_BUG_ON(fbit >= 32); | ||
| 114 | else | ||
| 115 | BUG_ON(fbit >= 32); | ||
| 113 | 116 | ||
| 114 | if (fbit < VIRTIO_TRANSPORT_F_START) | 117 | if (fbit < VIRTIO_TRANSPORT_F_START) |
| 115 | virtio_check_driver_offered_feature(vdev, fbit); | 118 | virtio_check_driver_offered_feature(vdev, fbit); |
diff --git a/include/linux/virtio_console.h b/include/linux/virtio_console.h index a85064db8f94..e4d333543a33 100644 --- a/include/linux/virtio_console.h +++ b/include/linux/virtio_console.h | |||
| @@ -7,7 +7,8 @@ | |||
| 7 | * This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so | 7 | * This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so |
| 8 | * anyone can use the definitions to implement compatible drivers/servers. | 8 | * anyone can use the definitions to implement compatible drivers/servers. |
| 9 | * | 9 | * |
| 10 | * Copyright (C) Red Hat, Inc., 2009, 2010 | 10 | * Copyright (C) Red Hat, Inc., 2009, 2010, 2011 |
| 11 | * Copyright (C) Amit Shah <amit.shah@redhat.com>, 2009, 2010, 2011 | ||
| 11 | */ | 12 | */ |
| 12 | 13 | ||
| 13 | /* Feature bits */ | 14 | /* Feature bits */ |
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 44b54f619ac6..4ed6fcd6b726 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
| @@ -59,8 +59,9 @@ extern void *vmalloc_exec(unsigned long size); | |||
| 59 | extern void *vmalloc_32(unsigned long size); | 59 | extern void *vmalloc_32(unsigned long size); |
| 60 | extern void *vmalloc_32_user(unsigned long size); | 60 | extern void *vmalloc_32_user(unsigned long size); |
| 61 | extern void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot); | 61 | extern void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot); |
| 62 | extern void *__vmalloc_area(struct vm_struct *area, gfp_t gfp_mask, | 62 | extern void *__vmalloc_node_range(unsigned long size, unsigned long align, |
| 63 | pgprot_t prot); | 63 | unsigned long start, unsigned long end, gfp_t gfp_mask, |
| 64 | pgprot_t prot, int node, void *caller); | ||
| 64 | extern void vfree(const void *addr); | 65 | extern void vfree(const void *addr); |
| 65 | 66 | ||
| 66 | extern void *vmap(struct page **pages, unsigned int count, | 67 | extern void *vmap(struct page **pages, unsigned int count, |
| @@ -90,9 +91,6 @@ extern struct vm_struct *__get_vm_area_caller(unsigned long size, | |||
| 90 | unsigned long flags, | 91 | unsigned long flags, |
| 91 | unsigned long start, unsigned long end, | 92 | unsigned long start, unsigned long end, |
| 92 | void *caller); | 93 | void *caller); |
| 93 | extern struct vm_struct *get_vm_area_node(unsigned long size, | ||
| 94 | unsigned long flags, int node, | ||
| 95 | gfp_t gfp_mask); | ||
| 96 | extern struct vm_struct *remove_vm_area(const void *addr); | 94 | extern struct vm_struct *remove_vm_area(const void *addr); |
| 97 | 95 | ||
| 98 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, | 96 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, |
| @@ -120,7 +118,7 @@ extern __init void vm_area_register_early(struct vm_struct *vm, size_t align); | |||
| 120 | #ifdef CONFIG_SMP | 118 | #ifdef CONFIG_SMP |
| 121 | struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets, | 119 | struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets, |
| 122 | const size_t *sizes, int nr_vms, | 120 | const size_t *sizes, int nr_vms, |
| 123 | size_t align, gfp_t gfp_mask); | 121 | size_t align); |
| 124 | 122 | ||
| 125 | void pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms); | 123 | void pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms); |
| 126 | #endif | 124 | #endif |
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index eaaea37b3b75..833e676d6d92 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
| @@ -254,6 +254,11 @@ extern void dec_zone_state(struct zone *, enum zone_stat_item); | |||
| 254 | extern void __dec_zone_state(struct zone *, enum zone_stat_item); | 254 | extern void __dec_zone_state(struct zone *, enum zone_stat_item); |
| 255 | 255 | ||
| 256 | void refresh_cpu_vm_stats(int); | 256 | void refresh_cpu_vm_stats(int); |
| 257 | |||
| 258 | int calculate_pressure_threshold(struct zone *zone); | ||
| 259 | int calculate_normal_threshold(struct zone *zone); | ||
| 260 | void set_pgdat_percpu_threshold(pg_data_t *pgdat, | ||
| 261 | int (*calculate_pressure)(struct zone *)); | ||
| 257 | #else /* CONFIG_SMP */ | 262 | #else /* CONFIG_SMP */ |
| 258 | 263 | ||
| 259 | /* | 264 | /* |
| @@ -298,6 +303,8 @@ static inline void __dec_zone_page_state(struct page *page, | |||
| 298 | #define dec_zone_page_state __dec_zone_page_state | 303 | #define dec_zone_page_state __dec_zone_page_state |
| 299 | #define mod_zone_page_state __mod_zone_page_state | 304 | #define mod_zone_page_state __mod_zone_page_state |
| 300 | 305 | ||
| 306 | #define set_pgdat_percpu_threshold(pgdat, callback) { } | ||
| 307 | |||
| 301 | static inline void refresh_cpu_vm_stats(int cpu) { } | 308 | static inline void refresh_cpu_vm_stats(int cpu) { } |
| 302 | #endif | 309 | #endif |
| 303 | 310 | ||
