diff options
Diffstat (limited to 'include/linux')
105 files changed, 2426 insertions, 1121 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index d9a754474878..e53840d941d4 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
| @@ -387,10 +387,12 @@ header-y += utsname.h | |||
| 387 | header-y += uuid.h | 387 | header-y += uuid.h |
| 388 | header-y += uvcvideo.h | 388 | header-y += uvcvideo.h |
| 389 | header-y += v4l2-common.h | 389 | header-y += v4l2-common.h |
| 390 | header-y += v4l2-controls.h | ||
| 390 | header-y += v4l2-dv-timings.h | 391 | header-y += v4l2-dv-timings.h |
| 391 | header-y += v4l2-mediabus.h | 392 | header-y += v4l2-mediabus.h |
| 392 | header-y += v4l2-subdev.h | 393 | header-y += v4l2-subdev.h |
| 393 | header-y += veth.h | 394 | header-y += veth.h |
| 395 | header-y += vfio.h | ||
| 394 | header-y += vhost.h | 396 | header-y += vhost.h |
| 395 | header-y += videodev2.h | 397 | header-y += videodev2.h |
| 396 | header-y += virtio_9p.h | 398 | header-y += virtio_9p.h |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 3ad510b25283..4f2a76224509 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -96,7 +96,7 @@ void acpi_table_print_madt_entry (struct acpi_subtable_header *madt); | |||
| 96 | void acpi_numa_slit_init (struct acpi_table_slit *slit); | 96 | void acpi_numa_slit_init (struct acpi_table_slit *slit); |
| 97 | void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa); | 97 | void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa); |
| 98 | void acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa); | 98 | void acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa); |
| 99 | void acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma); | 99 | int acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma); |
| 100 | void acpi_numa_arch_fixup(void); | 100 | void acpi_numa_arch_fixup(void); |
| 101 | 101 | ||
| 102 | #ifdef CONFIG_ACPI_HOTPLUG_CPU | 102 | #ifdef CONFIG_ACPI_HOTPLUG_CPU |
diff --git a/include/linux/amba/pl08x.h b/include/linux/amba/pl08x.h index 02549017212a..2a5f64a11b77 100644 --- a/include/linux/amba/pl08x.h +++ b/include/linux/amba/pl08x.h | |||
| @@ -21,8 +21,9 @@ | |||
| 21 | #include <linux/dmaengine.h> | 21 | #include <linux/dmaengine.h> |
| 22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
| 23 | 23 | ||
| 24 | struct pl08x_lli; | ||
| 25 | struct pl08x_driver_data; | 24 | struct pl08x_driver_data; |
| 25 | struct pl08x_phy_chan; | ||
| 26 | struct pl08x_txd; | ||
| 26 | 27 | ||
| 27 | /* Bitmasks for selecting AHB ports for DMA transfers */ | 28 | /* Bitmasks for selecting AHB ports for DMA transfers */ |
| 28 | enum { | 29 | enum { |
| @@ -46,170 +47,29 @@ enum { | |||
| 46 | * devices with static assignments | 47 | * devices with static assignments |
| 47 | * @muxval: a number usually used to poke into some mux regiser to | 48 | * @muxval: a number usually used to poke into some mux regiser to |
| 48 | * mux in the signal to this channel | 49 | * mux in the signal to this channel |
| 49 | * @cctl_opt: default options for the channel control register | 50 | * @cctl_memcpy: options for the channel control register for memcpy |
| 51 | * *** not used for slave channels *** | ||
| 50 | * @addr: source/target address in physical memory for this DMA channel, | 52 | * @addr: source/target address in physical memory for this DMA channel, |
| 51 | * can be the address of a FIFO register for burst requests for example. | 53 | * can be the address of a FIFO register for burst requests for example. |
| 52 | * This can be left undefined if the PrimeCell API is used for configuring | 54 | * This can be left undefined if the PrimeCell API is used for configuring |
| 53 | * this. | 55 | * this. |
| 54 | * @circular_buffer: whether the buffer passed in is circular and | ||
| 55 | * shall simply be looped round round (like a record baby round | ||
| 56 | * round round round) | ||
| 57 | * @single: the device connected to this channel will request single DMA | 56 | * @single: the device connected to this channel will request single DMA |
| 58 | * transfers, not bursts. (Bursts are default.) | 57 | * transfers, not bursts. (Bursts are default.) |
| 59 | * @periph_buses: the device connected to this channel is accessible via | 58 | * @periph_buses: the device connected to this channel is accessible via |
| 60 | * these buses (use PL08X_AHB1 | PL08X_AHB2). | 59 | * these buses (use PL08X_AHB1 | PL08X_AHB2). |
| 61 | */ | 60 | */ |
| 62 | struct pl08x_channel_data { | 61 | struct pl08x_channel_data { |
| 63 | char *bus_id; | 62 | const char *bus_id; |
| 64 | int min_signal; | 63 | int min_signal; |
| 65 | int max_signal; | 64 | int max_signal; |
| 66 | u32 muxval; | 65 | u32 muxval; |
| 67 | u32 cctl; | 66 | u32 cctl_memcpy; |
| 68 | dma_addr_t addr; | 67 | dma_addr_t addr; |
| 69 | bool circular_buffer; | ||
| 70 | bool single; | 68 | bool single; |
| 71 | u8 periph_buses; | 69 | u8 periph_buses; |
| 72 | }; | 70 | }; |
| 73 | 71 | ||
| 74 | /** | 72 | /** |
| 75 | * Struct pl08x_bus_data - information of source or destination | ||
| 76 | * busses for a transfer | ||
| 77 | * @addr: current address | ||
| 78 | * @maxwidth: the maximum width of a transfer on this bus | ||
| 79 | * @buswidth: the width of this bus in bytes: 1, 2 or 4 | ||
| 80 | */ | ||
| 81 | struct pl08x_bus_data { | ||
| 82 | dma_addr_t addr; | ||
| 83 | u8 maxwidth; | ||
| 84 | u8 buswidth; | ||
| 85 | }; | ||
| 86 | |||
| 87 | /** | ||
| 88 | * struct pl08x_phy_chan - holder for the physical channels | ||
| 89 | * @id: physical index to this channel | ||
| 90 | * @lock: a lock to use when altering an instance of this struct | ||
| 91 | * @signal: the physical signal (aka channel) serving this physical channel | ||
| 92 | * right now | ||
| 93 | * @serving: the virtual channel currently being served by this physical | ||
| 94 | * channel | ||
| 95 | * @locked: channel unavailable for the system, e.g. dedicated to secure | ||
| 96 | * world | ||
| 97 | */ | ||
| 98 | struct pl08x_phy_chan { | ||
| 99 | unsigned int id; | ||
| 100 | void __iomem *base; | ||
| 101 | spinlock_t lock; | ||
| 102 | int signal; | ||
| 103 | struct pl08x_dma_chan *serving; | ||
| 104 | bool locked; | ||
| 105 | }; | ||
| 106 | |||
| 107 | /** | ||
| 108 | * struct pl08x_sg - structure containing data per sg | ||
| 109 | * @src_addr: src address of sg | ||
| 110 | * @dst_addr: dst address of sg | ||
| 111 | * @len: transfer len in bytes | ||
| 112 | * @node: node for txd's dsg_list | ||
| 113 | */ | ||
| 114 | struct pl08x_sg { | ||
| 115 | dma_addr_t src_addr; | ||
| 116 | dma_addr_t dst_addr; | ||
| 117 | size_t len; | ||
| 118 | struct list_head node; | ||
| 119 | }; | ||
| 120 | |||
| 121 | /** | ||
| 122 | * struct pl08x_txd - wrapper for struct dma_async_tx_descriptor | ||
| 123 | * @tx: async tx descriptor | ||
| 124 | * @node: node for txd list for channels | ||
| 125 | * @dsg_list: list of children sg's | ||
| 126 | * @direction: direction of transfer | ||
| 127 | * @llis_bus: DMA memory address (physical) start for the LLIs | ||
| 128 | * @llis_va: virtual memory address start for the LLIs | ||
| 129 | * @cctl: control reg values for current txd | ||
| 130 | * @ccfg: config reg values for current txd | ||
| 131 | */ | ||
| 132 | struct pl08x_txd { | ||
| 133 | struct dma_async_tx_descriptor tx; | ||
| 134 | struct list_head node; | ||
| 135 | struct list_head dsg_list; | ||
| 136 | enum dma_transfer_direction direction; | ||
| 137 | dma_addr_t llis_bus; | ||
| 138 | struct pl08x_lli *llis_va; | ||
| 139 | /* Default cctl value for LLIs */ | ||
| 140 | u32 cctl; | ||
| 141 | /* | ||
| 142 | * Settings to be put into the physical channel when we | ||
| 143 | * trigger this txd. Other registers are in llis_va[0]. | ||
| 144 | */ | ||
| 145 | u32 ccfg; | ||
| 146 | }; | ||
| 147 | |||
| 148 | /** | ||
| 149 | * struct pl08x_dma_chan_state - holds the PL08x specific virtual channel | ||
| 150 | * states | ||
| 151 | * @PL08X_CHAN_IDLE: the channel is idle | ||
| 152 | * @PL08X_CHAN_RUNNING: the channel has allocated a physical transport | ||
| 153 | * channel and is running a transfer on it | ||
| 154 | * @PL08X_CHAN_PAUSED: the channel has allocated a physical transport | ||
| 155 | * channel, but the transfer is currently paused | ||
| 156 | * @PL08X_CHAN_WAITING: the channel is waiting for a physical transport | ||
| 157 | * channel to become available (only pertains to memcpy channels) | ||
| 158 | */ | ||
| 159 | enum pl08x_dma_chan_state { | ||
| 160 | PL08X_CHAN_IDLE, | ||
| 161 | PL08X_CHAN_RUNNING, | ||
| 162 | PL08X_CHAN_PAUSED, | ||
| 163 | PL08X_CHAN_WAITING, | ||
| 164 | }; | ||
| 165 | |||
| 166 | /** | ||
| 167 | * struct pl08x_dma_chan - this structure wraps a DMA ENGINE channel | ||
| 168 | * @chan: wrappped abstract channel | ||
| 169 | * @phychan: the physical channel utilized by this channel, if there is one | ||
| 170 | * @phychan_hold: if non-zero, hold on to the physical channel even if we | ||
| 171 | * have no pending entries | ||
| 172 | * @tasklet: tasklet scheduled by the IRQ to handle actual work etc | ||
| 173 | * @name: name of channel | ||
| 174 | * @cd: channel platform data | ||
| 175 | * @runtime_addr: address for RX/TX according to the runtime config | ||
| 176 | * @runtime_direction: current direction of this channel according to | ||
| 177 | * runtime config | ||
| 178 | * @pend_list: queued transactions pending on this channel | ||
| 179 | * @at: active transaction on this channel | ||
| 180 | * @lock: a lock for this channel data | ||
| 181 | * @host: a pointer to the host (internal use) | ||
| 182 | * @state: whether the channel is idle, paused, running etc | ||
| 183 | * @slave: whether this channel is a device (slave) or for memcpy | ||
| 184 | * @device_fc: Flow Controller Settings for ccfg register. Only valid for slave | ||
| 185 | * channels. Fill with 'true' if peripheral should be flow controller. Direction | ||
| 186 | * will be selected at Runtime. | ||
| 187 | * @waiting: a TX descriptor on this channel which is waiting for a physical | ||
| 188 | * channel to become available | ||
| 189 | */ | ||
| 190 | struct pl08x_dma_chan { | ||
| 191 | struct dma_chan chan; | ||
| 192 | struct pl08x_phy_chan *phychan; | ||
| 193 | int phychan_hold; | ||
| 194 | struct tasklet_struct tasklet; | ||
| 195 | char *name; | ||
| 196 | const struct pl08x_channel_data *cd; | ||
| 197 | dma_addr_t src_addr; | ||
| 198 | dma_addr_t dst_addr; | ||
| 199 | u32 src_cctl; | ||
| 200 | u32 dst_cctl; | ||
| 201 | enum dma_transfer_direction runtime_direction; | ||
| 202 | struct list_head pend_list; | ||
| 203 | struct pl08x_txd *at; | ||
| 204 | spinlock_t lock; | ||
| 205 | struct pl08x_driver_data *host; | ||
| 206 | enum pl08x_dma_chan_state state; | ||
| 207 | bool slave; | ||
| 208 | bool device_fc; | ||
| 209 | struct pl08x_txd *waiting; | ||
| 210 | }; | ||
| 211 | |||
| 212 | /** | ||
| 213 | * struct pl08x_platform_data - the platform configuration for the PL08x | 73 | * struct pl08x_platform_data - the platform configuration for the PL08x |
| 214 | * PrimeCells. | 74 | * PrimeCells. |
| 215 | * @slave_channels: the channels defined for the different devices on the | 75 | * @slave_channels: the channels defined for the different devices on the |
| @@ -229,8 +89,8 @@ struct pl08x_platform_data { | |||
| 229 | const struct pl08x_channel_data *slave_channels; | 89 | const struct pl08x_channel_data *slave_channels; |
| 230 | unsigned int num_slave_channels; | 90 | unsigned int num_slave_channels; |
| 231 | struct pl08x_channel_data memcpy_channel; | 91 | struct pl08x_channel_data memcpy_channel; |
| 232 | int (*get_signal)(struct pl08x_dma_chan *); | 92 | int (*get_signal)(const struct pl08x_channel_data *); |
| 233 | void (*put_signal)(struct pl08x_dma_chan *); | 93 | void (*put_signal)(const struct pl08x_channel_data *, int); |
| 234 | u8 lli_buses; | 94 | u8 lli_buses; |
| 235 | u8 mem_buses; | 95 | u8 mem_buses; |
| 236 | }; | 96 | }; |
diff --git a/include/linux/atmel-ssc.h b/include/linux/atmel-ssc.h index 06023393fba9..4eb31752e2b7 100644 --- a/include/linux/atmel-ssc.h +++ b/include/linux/atmel-ssc.h | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/platform_device.h> | 4 | #include <linux/platform_device.h> |
| 5 | #include <linux/list.h> | 5 | #include <linux/list.h> |
| 6 | #include <linux/io.h> | ||
| 6 | 7 | ||
| 7 | struct ssc_device { | 8 | struct ssc_device { |
| 8 | struct list_head list; | 9 | struct list_head list; |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 22f292a917a3..36abf2aa7e68 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
| @@ -130,6 +130,7 @@ | |||
| 130 | #define AUDIT_LAST_KERN_ANOM_MSG 1799 | 130 | #define AUDIT_LAST_KERN_ANOM_MSG 1799 |
| 131 | #define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */ | 131 | #define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */ |
| 132 | #define AUDIT_ANOM_ABEND 1701 /* Process ended abnormally */ | 132 | #define AUDIT_ANOM_ABEND 1701 /* Process ended abnormally */ |
| 133 | #define AUDIT_ANOM_LINK 1702 /* Suspicious use of file links */ | ||
| 133 | #define AUDIT_INTEGRITY_DATA 1800 /* Data integrity verification */ | 134 | #define AUDIT_INTEGRITY_DATA 1800 /* Data integrity verification */ |
| 134 | #define AUDIT_INTEGRITY_METADATA 1801 /* Metadata integrity verification */ | 135 | #define AUDIT_INTEGRITY_METADATA 1801 /* Metadata integrity verification */ |
| 135 | #define AUDIT_INTEGRITY_STATUS 1802 /* Integrity enable status */ | 136 | #define AUDIT_INTEGRITY_STATUS 1802 /* Integrity enable status */ |
| @@ -687,6 +688,8 @@ extern void audit_log_d_path(struct audit_buffer *ab, | |||
| 687 | const struct path *path); | 688 | const struct path *path); |
| 688 | extern void audit_log_key(struct audit_buffer *ab, | 689 | extern void audit_log_key(struct audit_buffer *ab, |
| 689 | char *key); | 690 | char *key); |
| 691 | extern void audit_log_link_denied(const char *operation, | ||
| 692 | struct path *link); | ||
| 690 | extern void audit_log_lost(const char *message); | 693 | extern void audit_log_lost(const char *message); |
| 691 | #ifdef CONFIG_SECURITY | 694 | #ifdef CONFIG_SECURITY |
| 692 | extern void audit_log_secctx(struct audit_buffer *ab, u32 secid); | 695 | extern void audit_log_secctx(struct audit_buffer *ab, u32 secid); |
| @@ -716,6 +719,7 @@ extern int audit_enabled; | |||
| 716 | #define audit_log_untrustedstring(a,s) do { ; } while (0) | 719 | #define audit_log_untrustedstring(a,s) do { ; } while (0) |
| 717 | #define audit_log_d_path(b, p, d) do { ; } while (0) | 720 | #define audit_log_d_path(b, p, d) do { ; } while (0) |
| 718 | #define audit_log_key(b, k) do { ; } while (0) | 721 | #define audit_log_key(b, k) do { ; } while (0) |
| 722 | #define audit_log_link_denied(o, l) do { ; } while (0) | ||
| 719 | #define audit_log_secctx(b,s) do { ; } while (0) | 723 | #define audit_log_secctx(b,s) do { ; } while (0) |
| 720 | #define audit_enabled 0 | 724 | #define audit_enabled 0 |
| 721 | #endif | 725 | #endif |
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 489de625cd25..2a9a9abc9126 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
| 18 | #include <linux/writeback.h> | 18 | #include <linux/writeback.h> |
| 19 | #include <linux/atomic.h> | 19 | #include <linux/atomic.h> |
| 20 | #include <linux/sysctl.h> | ||
| 20 | 21 | ||
| 21 | struct page; | 22 | struct page; |
| 22 | struct device; | 23 | struct device; |
| @@ -123,7 +124,6 @@ void bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages, | |||
| 123 | void bdi_start_background_writeback(struct backing_dev_info *bdi); | 124 | void bdi_start_background_writeback(struct backing_dev_info *bdi); |
| 124 | int bdi_writeback_thread(void *data); | 125 | int bdi_writeback_thread(void *data); |
| 125 | int bdi_has_dirty_io(struct backing_dev_info *bdi); | 126 | int bdi_has_dirty_io(struct backing_dev_info *bdi); |
| 126 | void bdi_arm_supers_timer(void); | ||
| 127 | void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi); | 127 | void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi); |
| 128 | void bdi_lock_two(struct bdi_writeback *wb1, struct bdi_writeback *wb2); | 128 | void bdi_lock_two(struct bdi_writeback *wb1, struct bdi_writeback *wb2); |
| 129 | 129 | ||
| @@ -304,6 +304,8 @@ void clear_bdi_congested(struct backing_dev_info *bdi, int sync); | |||
| 304 | void set_bdi_congested(struct backing_dev_info *bdi, int sync); | 304 | void set_bdi_congested(struct backing_dev_info *bdi, int sync); |
| 305 | long congestion_wait(int sync, long timeout); | 305 | long congestion_wait(int sync, long timeout); |
| 306 | long wait_iff_congested(struct zone *zone, int sync, long timeout); | 306 | long wait_iff_congested(struct zone *zone, int sync, long timeout); |
| 307 | int pdflush_proc_obsolete(struct ctl_table *table, int write, | ||
| 308 | void __user *buffer, size_t *lenp, loff_t *ppos); | ||
| 307 | 309 | ||
| 308 | static inline bool bdi_cap_writeback_dirty(struct backing_dev_info *bdi) | 310 | static inline bool bdi_cap_writeback_dirty(struct backing_dev_info *bdi) |
| 309 | { | 311 | { |
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h index 3c80885fa829..d323a4b4143c 100644 --- a/include/linux/bcma/bcma_driver_chipcommon.h +++ b/include/linux/bcma/bcma_driver_chipcommon.h | |||
| @@ -89,6 +89,12 @@ | |||
| 89 | #define BCMA_CC_CHIPST_4313_OTP_PRESENT 2 | 89 | #define BCMA_CC_CHIPST_4313_OTP_PRESENT 2 |
| 90 | #define BCMA_CC_CHIPST_4331_SPROM_PRESENT 2 | 90 | #define BCMA_CC_CHIPST_4331_SPROM_PRESENT 2 |
| 91 | #define BCMA_CC_CHIPST_4331_OTP_PRESENT 4 | 91 | #define BCMA_CC_CHIPST_4331_OTP_PRESENT 4 |
| 92 | #define BCMA_CC_CHIPST_43228_ILP_DIV_EN 0x00000001 | ||
| 93 | #define BCMA_CC_CHIPST_43228_OTP_PRESENT 0x00000002 | ||
| 94 | #define BCMA_CC_CHIPST_43228_SERDES_REFCLK_PADSEL 0x00000004 | ||
| 95 | #define BCMA_CC_CHIPST_43228_SDIO_MODE 0x00000008 | ||
| 96 | #define BCMA_CC_CHIPST_43228_SDIO_OTP_PRESENT 0x00000010 | ||
| 97 | #define BCMA_CC_CHIPST_43228_SDIO_RESET 0x00000020 | ||
| 92 | #define BCMA_CC_CHIPST_4706_PKG_OPTION BIT(0) /* 0: full-featured package 1: low-cost package */ | 98 | #define BCMA_CC_CHIPST_4706_PKG_OPTION BIT(0) /* 0: full-featured package 1: low-cost package */ |
| 93 | #define BCMA_CC_CHIPST_4706_SFLASH_PRESENT BIT(1) /* 0: parallel, 1: serial flash is present */ | 99 | #define BCMA_CC_CHIPST_4706_SFLASH_PRESENT BIT(1) /* 0: parallel, 1: serial flash is present */ |
| 94 | #define BCMA_CC_CHIPST_4706_SFLASH_TYPE BIT(2) /* 0: 8b-p/ST-s flash, 1: 16b-p/Atmal-s flash */ | 100 | #define BCMA_CC_CHIPST_4706_SFLASH_TYPE BIT(2) /* 0: 8b-p/ST-s flash, 1: 16b-p/Atmal-s flash */ |
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index 0edb65dd8edd..7b7ac9ccec7a 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h | |||
| @@ -160,6 +160,7 @@ enum rq_flag_bits { | |||
| 160 | __REQ_FLUSH_SEQ, /* request for flush sequence */ | 160 | __REQ_FLUSH_SEQ, /* request for flush sequence */ |
| 161 | __REQ_IO_STAT, /* account I/O stat */ | 161 | __REQ_IO_STAT, /* account I/O stat */ |
| 162 | __REQ_MIXED_MERGE, /* merge of different types, fail separately */ | 162 | __REQ_MIXED_MERGE, /* merge of different types, fail separately */ |
| 163 | __REQ_KERNEL, /* direct IO to kernel pages */ | ||
| 163 | __REQ_NR_BITS, /* stops here */ | 164 | __REQ_NR_BITS, /* stops here */ |
| 164 | }; | 165 | }; |
| 165 | 166 | ||
| @@ -201,5 +202,6 @@ enum rq_flag_bits { | |||
| 201 | #define REQ_IO_STAT (1 << __REQ_IO_STAT) | 202 | #define REQ_IO_STAT (1 << __REQ_IO_STAT) |
| 202 | #define REQ_MIXED_MERGE (1 << __REQ_MIXED_MERGE) | 203 | #define REQ_MIXED_MERGE (1 << __REQ_MIXED_MERGE) |
| 203 | #define REQ_SECURE (1 << __REQ_SECURE) | 204 | #define REQ_SECURE (1 << __REQ_SECURE) |
| 205 | #define REQ_KERNEL (1 << __REQ_KERNEL) | ||
| 204 | 206 | ||
| 205 | #endif /* __LINUX_BLK_TYPES_H */ | 207 | #endif /* __LINUX_BLK_TYPES_H */ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 07954b05b86c..4a2ab7c85393 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -46,16 +46,23 @@ struct blkcg_gq; | |||
| 46 | struct request; | 46 | struct request; |
| 47 | typedef void (rq_end_io_fn)(struct request *, int); | 47 | typedef void (rq_end_io_fn)(struct request *, int); |
| 48 | 48 | ||
| 49 | #define BLK_RL_SYNCFULL (1U << 0) | ||
| 50 | #define BLK_RL_ASYNCFULL (1U << 1) | ||
| 51 | |||
| 49 | struct request_list { | 52 | struct request_list { |
| 53 | struct request_queue *q; /* the queue this rl belongs to */ | ||
| 54 | #ifdef CONFIG_BLK_CGROUP | ||
| 55 | struct blkcg_gq *blkg; /* blkg this request pool belongs to */ | ||
| 56 | #endif | ||
| 50 | /* | 57 | /* |
| 51 | * count[], starved[], and wait[] are indexed by | 58 | * count[], starved[], and wait[] are indexed by |
| 52 | * BLK_RW_SYNC/BLK_RW_ASYNC | 59 | * BLK_RW_SYNC/BLK_RW_ASYNC |
| 53 | */ | 60 | */ |
| 54 | int count[2]; | 61 | int count[2]; |
| 55 | int starved[2]; | 62 | int starved[2]; |
| 56 | int elvpriv; | 63 | mempool_t *rq_pool; |
| 57 | mempool_t *rq_pool; | 64 | wait_queue_head_t wait[2]; |
| 58 | wait_queue_head_t wait[2]; | 65 | unsigned int flags; |
| 59 | }; | 66 | }; |
| 60 | 67 | ||
| 61 | /* | 68 | /* |
| @@ -138,6 +145,7 @@ struct request { | |||
| 138 | struct hd_struct *part; | 145 | struct hd_struct *part; |
| 139 | unsigned long start_time; | 146 | unsigned long start_time; |
| 140 | #ifdef CONFIG_BLK_CGROUP | 147 | #ifdef CONFIG_BLK_CGROUP |
| 148 | struct request_list *rl; /* rl this rq is alloced from */ | ||
| 141 | unsigned long long start_time_ns; | 149 | unsigned long long start_time_ns; |
| 142 | unsigned long long io_start_time_ns; /* when passed to hardware */ | 150 | unsigned long long io_start_time_ns; /* when passed to hardware */ |
| 143 | #endif | 151 | #endif |
| @@ -282,11 +290,16 @@ struct request_queue { | |||
| 282 | struct list_head queue_head; | 290 | struct list_head queue_head; |
| 283 | struct request *last_merge; | 291 | struct request *last_merge; |
| 284 | struct elevator_queue *elevator; | 292 | struct elevator_queue *elevator; |
| 293 | int nr_rqs[2]; /* # allocated [a]sync rqs */ | ||
| 294 | int nr_rqs_elvpriv; /* # allocated rqs w/ elvpriv */ | ||
| 285 | 295 | ||
| 286 | /* | 296 | /* |
| 287 | * the queue request freelist, one for reads and one for writes | 297 | * If blkcg is not used, @q->root_rl serves all requests. If blkcg |
| 298 | * is used, root blkg allocates from @q->root_rl and all other | ||
| 299 | * blkgs from their own blkg->rl. Which one to use should be | ||
| 300 | * determined using bio_request_list(). | ||
| 288 | */ | 301 | */ |
| 289 | struct request_list rq; | 302 | struct request_list root_rl; |
| 290 | 303 | ||
| 291 | request_fn_proc *request_fn; | 304 | request_fn_proc *request_fn; |
| 292 | make_request_fn *make_request_fn; | 305 | make_request_fn *make_request_fn; |
| @@ -561,27 +574,25 @@ static inline bool rq_is_sync(struct request *rq) | |||
| 561 | return rw_is_sync(rq->cmd_flags); | 574 | return rw_is_sync(rq->cmd_flags); |
| 562 | } | 575 | } |
| 563 | 576 | ||
| 564 | static inline int blk_queue_full(struct request_queue *q, int sync) | 577 | static inline bool blk_rl_full(struct request_list *rl, bool sync) |
| 565 | { | 578 | { |
| 566 | if (sync) | 579 | unsigned int flag = sync ? BLK_RL_SYNCFULL : BLK_RL_ASYNCFULL; |
| 567 | return test_bit(QUEUE_FLAG_SYNCFULL, &q->queue_flags); | 580 | |
| 568 | return test_bit(QUEUE_FLAG_ASYNCFULL, &q->queue_flags); | 581 | return rl->flags & flag; |
| 569 | } | 582 | } |
| 570 | 583 | ||
| 571 | static inline void blk_set_queue_full(struct request_queue *q, int sync) | 584 | static inline void blk_set_rl_full(struct request_list *rl, bool sync) |
| 572 | { | 585 | { |
| 573 | if (sync) | 586 | unsigned int flag = sync ? BLK_RL_SYNCFULL : BLK_RL_ASYNCFULL; |
| 574 | queue_flag_set(QUEUE_FLAG_SYNCFULL, q); | 587 | |
| 575 | else | 588 | rl->flags |= flag; |
| 576 | queue_flag_set(QUEUE_FLAG_ASYNCFULL, q); | ||
| 577 | } | 589 | } |
| 578 | 590 | ||
| 579 | static inline void blk_clear_queue_full(struct request_queue *q, int sync) | 591 | static inline void blk_clear_rl_full(struct request_list *rl, bool sync) |
| 580 | { | 592 | { |
| 581 | if (sync) | 593 | unsigned int flag = sync ? BLK_RL_SYNCFULL : BLK_RL_ASYNCFULL; |
| 582 | queue_flag_clear(QUEUE_FLAG_SYNCFULL, q); | 594 | |
| 583 | else | 595 | rl->flags &= ~flag; |
| 584 | queue_flag_clear(QUEUE_FLAG_ASYNCFULL, q); | ||
| 585 | } | 596 | } |
| 586 | 597 | ||
| 587 | 598 | ||
| @@ -590,7 +601,7 @@ static inline void blk_clear_queue_full(struct request_queue *q, int sync) | |||
| 590 | * it already be started by driver. | 601 | * it already be started by driver. |
| 591 | */ | 602 | */ |
| 592 | #define RQ_NOMERGE_FLAGS \ | 603 | #define RQ_NOMERGE_FLAGS \ |
| 593 | (REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA) | 604 | (REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA | REQ_DISCARD) |
| 594 | #define rq_mergeable(rq) \ | 605 | #define rq_mergeable(rq) \ |
| 595 | (!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && \ | 606 | (!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && \ |
| 596 | (((rq)->cmd_flags & REQ_DISCARD) || \ | 607 | (((rq)->cmd_flags & REQ_DISCARD) || \ |
| @@ -883,6 +894,8 @@ extern void blk_queue_flush_queueable(struct request_queue *q, bool queueable); | |||
| 883 | extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev); | 894 | extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev); |
| 884 | 895 | ||
| 885 | extern int blk_rq_map_sg(struct request_queue *, struct request *, struct scatterlist *); | 896 | extern int blk_rq_map_sg(struct request_queue *, struct request *, struct scatterlist *); |
| 897 | extern int blk_bio_map_sg(struct request_queue *q, struct bio *bio, | ||
| 898 | struct scatterlist *sglist); | ||
| 886 | extern void blk_dump_rq_flags(struct request *, char *); | 899 | extern void blk_dump_rq_flags(struct request *, char *); |
| 887 | extern long nr_blockdev_pages(void); | 900 | extern long nr_blockdev_pages(void); |
| 888 | 901 | ||
| @@ -911,11 +924,15 @@ struct blk_plug { | |||
| 911 | }; | 924 | }; |
| 912 | #define BLK_MAX_REQUEST_COUNT 16 | 925 | #define BLK_MAX_REQUEST_COUNT 16 |
| 913 | 926 | ||
| 927 | struct blk_plug_cb; | ||
| 928 | typedef void (*blk_plug_cb_fn)(struct blk_plug_cb *, bool); | ||
| 914 | struct blk_plug_cb { | 929 | struct blk_plug_cb { |
| 915 | struct list_head list; | 930 | struct list_head list; |
| 916 | void (*callback)(struct blk_plug_cb *); | 931 | blk_plug_cb_fn callback; |
| 932 | void *data; | ||
| 917 | }; | 933 | }; |
| 918 | 934 | extern struct blk_plug_cb *blk_check_plugged(blk_plug_cb_fn unplug, | |
| 935 | void *data, int size); | ||
| 919 | extern void blk_start_plug(struct blk_plug *); | 936 | extern void blk_start_plug(struct blk_plug *); |
| 920 | extern void blk_finish_plug(struct blk_plug *); | 937 | extern void blk_finish_plug(struct blk_plug *); |
| 921 | extern void blk_flush_plug_list(struct blk_plug *, bool); | 938 | extern void blk_flush_plug_list(struct blk_plug *, bool); |
| @@ -1124,6 +1141,16 @@ static inline int queue_limit_discard_alignment(struct queue_limits *lim, sector | |||
| 1124 | & (lim->discard_granularity - 1); | 1141 | & (lim->discard_granularity - 1); |
| 1125 | } | 1142 | } |
| 1126 | 1143 | ||
| 1144 | static inline int bdev_discard_alignment(struct block_device *bdev) | ||
| 1145 | { | ||
| 1146 | struct request_queue *q = bdev_get_queue(bdev); | ||
| 1147 | |||
| 1148 | if (bdev != bdev->bd_contains) | ||
| 1149 | return bdev->bd_part->discard_alignment; | ||
| 1150 | |||
| 1151 | return q->limits.discard_alignment; | ||
| 1152 | } | ||
| 1153 | |||
| 1127 | static inline unsigned int queue_discard_zeroes_data(struct request_queue *q) | 1154 | static inline unsigned int queue_discard_zeroes_data(struct request_queue *q) |
| 1128 | { | 1155 | { |
| 1129 | if (q->limits.max_discard_sectors && q->limits.discard_zeroes_data == 1) | 1156 | if (q->limits.max_discard_sectors && q->limits.discard_zeroes_data == 1) |
diff --git a/include/linux/blkpg.h b/include/linux/blkpg.h index faf8a45af210..a8519446c111 100644 --- a/include/linux/blkpg.h +++ b/include/linux/blkpg.h | |||
| @@ -40,6 +40,7 @@ struct blkpg_ioctl_arg { | |||
| 40 | /* The subfunctions (for the op field) */ | 40 | /* The subfunctions (for the op field) */ |
| 41 | #define BLKPG_ADD_PARTITION 1 | 41 | #define BLKPG_ADD_PARTITION 1 |
| 42 | #define BLKPG_DEL_PARTITION 2 | 42 | #define BLKPG_DEL_PARTITION 2 |
| 43 | #define BLKPG_RESIZE_PARTITION 3 | ||
| 43 | 44 | ||
| 44 | /* Sizes of name fields. Unused at present. */ | 45 | /* Sizes of name fields. Unused at present. */ |
| 45 | #define BLKPG_DEVNAMELTH 64 | 46 | #define BLKPG_DEVNAMELTH 64 |
diff --git a/include/linux/bsg-lib.h b/include/linux/bsg-lib.h index f55ab8cdc106..4d0fb3df2f4a 100644 --- a/include/linux/bsg-lib.h +++ b/include/linux/bsg-lib.h | |||
| @@ -67,7 +67,6 @@ void bsg_job_done(struct bsg_job *job, int result, | |||
| 67 | int bsg_setup_queue(struct device *dev, struct request_queue *q, char *name, | 67 | int bsg_setup_queue(struct device *dev, struct request_queue *q, char *name, |
| 68 | bsg_job_fn *job_fn, int dd_job_size); | 68 | bsg_job_fn *job_fn, int dd_job_size); |
| 69 | void bsg_request_fn(struct request_queue *q); | 69 | void bsg_request_fn(struct request_queue *q); |
| 70 | void bsg_remove_queue(struct request_queue *q); | ||
| 71 | void bsg_goose_queue(struct request_queue *q); | 70 | void bsg_goose_queue(struct request_queue *q); |
| 72 | 71 | ||
| 73 | #endif | 72 | #endif |
diff --git a/include/linux/can.h b/include/linux/can.h index 018055efc034..e52958d7c2d1 100644 --- a/include/linux/can.h +++ b/include/linux/can.h | |||
| @@ -74,20 +74,21 @@ struct can_frame { | |||
| 74 | /* | 74 | /* |
| 75 | * defined bits for canfd_frame.flags | 75 | * defined bits for canfd_frame.flags |
| 76 | * | 76 | * |
| 77 | * As the default for CAN FD should be to support the high data rate in the | 77 | * The use of struct canfd_frame implies the Extended Data Length (EDL) bit to |
| 78 | * payload section of the frame (HDR) and to support up to 64 byte in the | 78 | * be set in the CAN frame bitstream on the wire. The EDL bit switch turns |
| 79 | * data section (EDL) the bits are only set in the non-default case. | 79 | * the CAN controllers bitstream processor into the CAN FD mode which creates |
| 80 | * Btw. as long as there's no real implementation for CAN FD network driver | 80 | * two new options within the CAN FD frame specification: |
| 81 | * these bits are only preliminary. | ||
| 82 | * | 81 | * |
| 83 | * RX: NOHDR/NOEDL - info about received CAN FD frame | 82 | * Bit Rate Switch - to indicate a second bitrate is/was used for the payload |
| 84 | * ESI - bit from originating CAN controller | 83 | * Error State Indicator - represents the error state of the transmitting node |
| 85 | * TX: NOHDR/NOEDL - control per-frame settings if supported by CAN controller | 84 | * |
| 86 | * ESI - bit is set by local CAN controller | 85 | * As the CANFD_ESI bit is internally generated by the transmitting CAN |
| 86 | * controller only the CANFD_BRS bit is relevant for real CAN controllers when | ||
| 87 | * building a CAN FD frame for transmission. Setting the CANFD_ESI bit can make | ||
| 88 | * sense for virtual CAN interfaces to test applications with echoed frames. | ||
| 87 | */ | 89 | */ |
| 88 | #define CANFD_NOHDR 0x01 /* frame without high data rate */ | 90 | #define CANFD_BRS 0x01 /* bit rate switch (second bitrate for payload data) */ |
| 89 | #define CANFD_NOEDL 0x02 /* frame without extended data length */ | 91 | #define CANFD_ESI 0x02 /* error state indicator of the transmitting node */ |
| 90 | #define CANFD_ESI 0x04 /* error state indicator */ | ||
| 91 | 92 | ||
| 92 | /** | 93 | /** |
| 93 | * struct canfd_frame - CAN flexible data rate frame structure | 94 | * struct canfd_frame - CAN flexible data rate frame structure |
diff --git a/include/linux/cgroup_subsys.h b/include/linux/cgroup_subsys.h index 0bd390ce98b2..dfae957398c3 100644 --- a/include/linux/cgroup_subsys.h +++ b/include/linux/cgroup_subsys.h | |||
| @@ -31,7 +31,7 @@ SUBSYS(cpuacct) | |||
| 31 | 31 | ||
| 32 | /* */ | 32 | /* */ |
| 33 | 33 | ||
| 34 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 34 | #ifdef CONFIG_MEMCG |
| 35 | SUBSYS(mem_cgroup) | 35 | SUBSYS(mem_cgroup) |
| 36 | #endif | 36 | #endif |
| 37 | 37 | ||
| @@ -72,3 +72,9 @@ SUBSYS(net_prio) | |||
| 72 | #endif | 72 | #endif |
| 73 | 73 | ||
| 74 | /* */ | 74 | /* */ |
| 75 | |||
| 76 | #ifdef CONFIG_CGROUP_HUGETLB | ||
| 77 | SUBSYS(hugetlb) | ||
| 78 | #endif | ||
| 79 | |||
| 80 | /* */ | ||
diff --git a/include/linux/compaction.h b/include/linux/compaction.h index 51a90b7f2d60..ef658147e4e8 100644 --- a/include/linux/compaction.h +++ b/include/linux/compaction.h | |||
| @@ -22,7 +22,7 @@ extern int sysctl_extfrag_handler(struct ctl_table *table, int write, | |||
| 22 | extern int fragmentation_index(struct zone *zone, unsigned int order); | 22 | extern int fragmentation_index(struct zone *zone, unsigned int order); |
| 23 | extern unsigned long try_to_compact_pages(struct zonelist *zonelist, | 23 | extern unsigned long try_to_compact_pages(struct zonelist *zonelist, |
| 24 | int order, gfp_t gfp_mask, nodemask_t *mask, | 24 | int order, gfp_t gfp_mask, nodemask_t *mask, |
| 25 | bool sync); | 25 | bool sync, bool *contended); |
| 26 | extern int compact_pgdat(pg_data_t *pgdat, int order); | 26 | extern int compact_pgdat(pg_data_t *pgdat, int order); |
| 27 | extern unsigned long compaction_suitable(struct zone *zone, int order); | 27 | extern unsigned long compaction_suitable(struct zone *zone, int order); |
| 28 | 28 | ||
| @@ -58,13 +58,13 @@ static inline bool compaction_deferred(struct zone *zone, int order) | |||
| 58 | if (++zone->compact_considered > defer_limit) | 58 | if (++zone->compact_considered > defer_limit) |
| 59 | zone->compact_considered = defer_limit; | 59 | zone->compact_considered = defer_limit; |
| 60 | 60 | ||
| 61 | return zone->compact_considered < (1UL << zone->compact_defer_shift); | 61 | return zone->compact_considered < defer_limit; |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | #else | 64 | #else |
| 65 | static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, | 65 | static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, |
| 66 | int order, gfp_t gfp_mask, nodemask_t *nodemask, | 66 | int order, gfp_t gfp_mask, nodemask_t *nodemask, |
| 67 | bool sync) | 67 | bool sync, bool *contended) |
| 68 | { | 68 | { |
| 69 | return COMPACT_CONTINUE; | 69 | return COMPACT_CONTINUE; |
| 70 | } | 70 | } |
| @@ -85,7 +85,7 @@ static inline void defer_compaction(struct zone *zone, int order) | |||
| 85 | 85 | ||
| 86 | static inline bool compaction_deferred(struct zone *zone, int order) | 86 | static inline bool compaction_deferred(struct zone *zone, int order) |
| 87 | { | 87 | { |
| 88 | return 1; | 88 | return true; |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | #endif /* CONFIG_COMPACTION */ | 91 | #endif /* CONFIG_COMPACTION */ |
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 2f4079175afb..934bc34d5f99 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
| @@ -49,6 +49,13 @@ | |||
| 49 | #endif | 49 | #endif |
| 50 | #endif | 50 | #endif |
| 51 | 51 | ||
| 52 | #if __GNUC_MINOR__ >= 6 | ||
| 53 | /* | ||
| 54 | * Tell the optimizer that something else uses this function or variable. | ||
| 55 | */ | ||
| 56 | #define __visible __attribute__((externally_visible)) | ||
| 57 | #endif | ||
| 58 | |||
| 52 | #if __GNUC_MINOR__ > 0 | 59 | #if __GNUC_MINOR__ > 0 |
| 53 | #define __compiletime_object_size(obj) __builtin_object_size(obj, 0) | 60 | #define __compiletime_object_size(obj) __builtin_object_size(obj, 0) |
| 54 | #endif | 61 | #endif |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 923d093c9cea..f430e4162f41 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
| @@ -278,6 +278,10 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); | |||
| 278 | # define __section(S) __attribute__ ((__section__(#S))) | 278 | # define __section(S) __attribute__ ((__section__(#S))) |
| 279 | #endif | 279 | #endif |
| 280 | 280 | ||
| 281 | #ifndef __visible | ||
| 282 | #define __visible | ||
| 283 | #endif | ||
| 284 | |||
| 281 | /* Are two types/vars the same type (ignoring qualifiers)? */ | 285 | /* Are two types/vars the same type (ignoring qualifiers)? */ |
| 282 | #ifndef __same_type | 286 | #ifndef __same_type |
| 283 | # define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) | 287 | # define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) |
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 040b13b5c14a..279b1eaa8b73 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
| @@ -194,6 +194,10 @@ static inline int cpuidle_play_dead(void) {return -ENODEV; } | |||
| 194 | 194 | ||
| 195 | #ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED | 195 | #ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED |
| 196 | void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, atomic_t *a); | 196 | void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, atomic_t *a); |
| 197 | #else | ||
| 198 | static inline void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, atomic_t *a) | ||
| 199 | { | ||
| 200 | } | ||
| 197 | #endif | 201 | #endif |
| 198 | 202 | ||
| 199 | /****************************** | 203 | /****************************** |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index caa34e50537e..59200795482e 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
| @@ -206,6 +206,8 @@ struct dentry_operations { | |||
| 206 | #define DCACHE_MANAGED_DENTRY \ | 206 | #define DCACHE_MANAGED_DENTRY \ |
| 207 | (DCACHE_MOUNTED|DCACHE_NEED_AUTOMOUNT|DCACHE_MANAGE_TRANSIT) | 207 | (DCACHE_MOUNTED|DCACHE_NEED_AUTOMOUNT|DCACHE_MANAGE_TRANSIT) |
| 208 | 208 | ||
| 209 | #define DCACHE_DENTRY_KILLED 0x100000 | ||
| 210 | |||
| 209 | extern seqlock_t rename_lock; | 211 | extern seqlock_t rename_lock; |
| 210 | 212 | ||
| 211 | static inline int dname_external(struct dentry *dentry) | 213 | static inline int dname_external(struct dentry *dentry) |
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h index f50d4058c5fb..c12d452cb40d 100644 --- a/include/linux/dvb/frontend.h +++ b/include/linux/dvb/frontend.h | |||
| @@ -62,6 +62,7 @@ typedef enum fe_caps { | |||
| 62 | FE_CAN_8VSB = 0x200000, | 62 | FE_CAN_8VSB = 0x200000, |
| 63 | FE_CAN_16VSB = 0x400000, | 63 | FE_CAN_16VSB = 0x400000, |
| 64 | FE_HAS_EXTENDED_CAPS = 0x800000, /* We need more bitspace for newer APIs, indicate this. */ | 64 | FE_HAS_EXTENDED_CAPS = 0x800000, /* We need more bitspace for newer APIs, indicate this. */ |
| 65 | FE_CAN_MULTISTREAM = 0x4000000, /* frontend supports multistream filtering */ | ||
| 65 | FE_CAN_TURBO_FEC = 0x8000000, /* frontend supports "turbo fec modulation" */ | 66 | FE_CAN_TURBO_FEC = 0x8000000, /* frontend supports "turbo fec modulation" */ |
| 66 | FE_CAN_2G_MODULATION = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */ | 67 | FE_CAN_2G_MODULATION = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */ |
| 67 | FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */ | 68 | FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */ |
| @@ -121,16 +122,27 @@ typedef enum fe_sec_mini_cmd { | |||
| 121 | } fe_sec_mini_cmd_t; | 122 | } fe_sec_mini_cmd_t; |
| 122 | 123 | ||
| 123 | 124 | ||
| 125 | /** | ||
| 126 | * enum fe_status - enumerates the possible frontend status | ||
| 127 | * @FE_HAS_SIGNAL: found something above the noise level | ||
| 128 | * @FE_HAS_CARRIER: found a DVB signal | ||
| 129 | * @FE_HAS_VITERBI: FEC is stable | ||
| 130 | * @FE_HAS_SYNC: found sync bytes | ||
| 131 | * @FE_HAS_LOCK: everything's working | ||
| 132 | * @FE_TIMEDOUT: no lock within the last ~2 seconds | ||
| 133 | * @FE_REINIT: frontend was reinitialized, application is recommended | ||
| 134 | * to reset DiSEqC, tone and parameters | ||
| 135 | */ | ||
| 136 | |||
| 124 | typedef enum fe_status { | 137 | typedef enum fe_status { |
| 125 | FE_HAS_SIGNAL = 0x01, /* found something above the noise level */ | 138 | FE_HAS_SIGNAL = 0x01, |
| 126 | FE_HAS_CARRIER = 0x02, /* found a DVB signal */ | 139 | FE_HAS_CARRIER = 0x02, |
| 127 | FE_HAS_VITERBI = 0x04, /* FEC is stable */ | 140 | FE_HAS_VITERBI = 0x04, |
| 128 | FE_HAS_SYNC = 0x08, /* found sync bytes */ | 141 | FE_HAS_SYNC = 0x08, |
| 129 | FE_HAS_LOCK = 0x10, /* everything's working... */ | 142 | FE_HAS_LOCK = 0x10, |
| 130 | FE_TIMEDOUT = 0x20, /* no lock within the last ~2 seconds */ | 143 | FE_TIMEDOUT = 0x20, |
| 131 | FE_REINIT = 0x40 /* frontend was reinitialized, */ | 144 | FE_REINIT = 0x40, |
| 132 | } fe_status_t; /* application is recommended to reset */ | 145 | } fe_status_t; |
| 133 | /* DiSEqC, tone and parameters */ | ||
| 134 | 146 | ||
| 135 | typedef enum fe_spectral_inversion { | 147 | typedef enum fe_spectral_inversion { |
| 136 | INVERSION_OFF, | 148 | INVERSION_OFF, |
| @@ -152,6 +164,7 @@ typedef enum fe_code_rate { | |||
| 152 | FEC_AUTO, | 164 | FEC_AUTO, |
| 153 | FEC_3_5, | 165 | FEC_3_5, |
| 154 | FEC_9_10, | 166 | FEC_9_10, |
| 167 | FEC_2_5, | ||
| 155 | } fe_code_rate_t; | 168 | } fe_code_rate_t; |
| 156 | 169 | ||
| 157 | 170 | ||
| @@ -169,6 +182,7 @@ typedef enum fe_modulation { | |||
| 169 | APSK_16, | 182 | APSK_16, |
| 170 | APSK_32, | 183 | APSK_32, |
| 171 | DQPSK, | 184 | DQPSK, |
| 185 | QAM_4_NR, | ||
| 172 | } fe_modulation_t; | 186 | } fe_modulation_t; |
| 173 | 187 | ||
| 174 | typedef enum fe_transmit_mode { | 188 | typedef enum fe_transmit_mode { |
| @@ -179,6 +193,8 @@ typedef enum fe_transmit_mode { | |||
| 179 | TRANSMISSION_MODE_1K, | 193 | TRANSMISSION_MODE_1K, |
| 180 | TRANSMISSION_MODE_16K, | 194 | TRANSMISSION_MODE_16K, |
| 181 | TRANSMISSION_MODE_32K, | 195 | TRANSMISSION_MODE_32K, |
| 196 | TRANSMISSION_MODE_C1, | ||
| 197 | TRANSMISSION_MODE_C3780, | ||
| 182 | } fe_transmit_mode_t; | 198 | } fe_transmit_mode_t; |
| 183 | 199 | ||
| 184 | #if defined(__DVB_CORE__) || !defined (__KERNEL__) | 200 | #if defined(__DVB_CORE__) || !defined (__KERNEL__) |
| @@ -202,6 +218,9 @@ typedef enum fe_guard_interval { | |||
| 202 | GUARD_INTERVAL_1_128, | 218 | GUARD_INTERVAL_1_128, |
| 203 | GUARD_INTERVAL_19_128, | 219 | GUARD_INTERVAL_19_128, |
| 204 | GUARD_INTERVAL_19_256, | 220 | GUARD_INTERVAL_19_256, |
| 221 | GUARD_INTERVAL_PN420, | ||
| 222 | GUARD_INTERVAL_PN595, | ||
| 223 | GUARD_INTERVAL_PN945, | ||
| 205 | } fe_guard_interval_t; | 224 | } fe_guard_interval_t; |
| 206 | 225 | ||
| 207 | 226 | ||
| @@ -213,6 +232,12 @@ typedef enum fe_hierarchy { | |||
| 213 | HIERARCHY_AUTO | 232 | HIERARCHY_AUTO |
| 214 | } fe_hierarchy_t; | 233 | } fe_hierarchy_t; |
| 215 | 234 | ||
| 235 | enum fe_interleaving { | ||
| 236 | INTERLEAVING_NONE, | ||
| 237 | INTERLEAVING_AUTO, | ||
| 238 | INTERLEAVING_240, | ||
| 239 | INTERLEAVING_720, | ||
| 240 | }; | ||
| 216 | 241 | ||
| 217 | #if defined(__DVB_CORE__) || !defined (__KERNEL__) | 242 | #if defined(__DVB_CORE__) || !defined (__KERNEL__) |
| 218 | struct dvb_qpsk_parameters { | 243 | struct dvb_qpsk_parameters { |
| @@ -314,9 +339,9 @@ struct dvb_frontend_event { | |||
| 314 | 339 | ||
| 315 | #define DTV_ISDBT_LAYER_ENABLED 41 | 340 | #define DTV_ISDBT_LAYER_ENABLED 41 |
| 316 | 341 | ||
| 317 | #define DTV_ISDBS_TS_ID 42 | 342 | #define DTV_STREAM_ID 42 |
| 318 | 343 | #define DTV_ISDBS_TS_ID_LEGACY DTV_STREAM_ID | |
| 319 | #define DTV_DVBT2_PLP_ID 43 | 344 | #define DTV_DVBT2_PLP_ID_LEGACY 43 |
| 320 | 345 | ||
| 321 | #define DTV_ENUM_DELSYS 44 | 346 | #define DTV_ENUM_DELSYS 44 |
| 322 | 347 | ||
| @@ -337,7 +362,10 @@ struct dvb_frontend_event { | |||
| 337 | #define DTV_ATSCMH_SCCC_CODE_MODE_C 58 | 362 | #define DTV_ATSCMH_SCCC_CODE_MODE_C 58 |
| 338 | #define DTV_ATSCMH_SCCC_CODE_MODE_D 59 | 363 | #define DTV_ATSCMH_SCCC_CODE_MODE_D 59 |
| 339 | 364 | ||
| 340 | #define DTV_MAX_COMMAND DTV_ATSCMH_SCCC_CODE_MODE_D | 365 | #define DTV_INTERLEAVING 60 |
| 366 | #define DTV_LNA 61 | ||
| 367 | |||
| 368 | #define DTV_MAX_COMMAND DTV_LNA | ||
| 341 | 369 | ||
| 342 | typedef enum fe_pilot { | 370 | typedef enum fe_pilot { |
| 343 | PILOT_ON, | 371 | PILOT_ON, |
| @@ -366,7 +394,7 @@ typedef enum fe_delivery_system { | |||
| 366 | SYS_ISDBC, | 394 | SYS_ISDBC, |
| 367 | SYS_ATSC, | 395 | SYS_ATSC, |
| 368 | SYS_ATSCMH, | 396 | SYS_ATSCMH, |
| 369 | SYS_DMBTH, | 397 | SYS_DTMB, |
| 370 | SYS_CMMB, | 398 | SYS_CMMB, |
| 371 | SYS_DAB, | 399 | SYS_DAB, |
| 372 | SYS_DVBT2, | 400 | SYS_DVBT2, |
| @@ -374,8 +402,9 @@ typedef enum fe_delivery_system { | |||
| 374 | SYS_DVBC_ANNEX_C, | 402 | SYS_DVBC_ANNEX_C, |
| 375 | } fe_delivery_system_t; | 403 | } fe_delivery_system_t; |
| 376 | 404 | ||
| 377 | 405 | /* backward compatibility */ | |
| 378 | #define SYS_DVBC_ANNEX_AC SYS_DVBC_ANNEX_A | 406 | #define SYS_DVBC_ANNEX_AC SYS_DVBC_ANNEX_A |
| 407 | #define SYS_DMBTH SYS_DTMB /* DMB-TH is legacy name, use DTMB instead */ | ||
| 379 | 408 | ||
| 380 | /* ATSC-MH */ | 409 | /* ATSC-MH */ |
| 381 | 410 | ||
| @@ -409,6 +438,8 @@ enum atscmh_rs_code_mode { | |||
| 409 | ATSCMH_RSCODE_RES = 3, | 438 | ATSCMH_RSCODE_RES = 3, |
| 410 | }; | 439 | }; |
| 411 | 440 | ||
| 441 | #define NO_STREAM_ID_FILTER (~0U) | ||
| 442 | #define LNA_AUTO (~0U) | ||
| 412 | 443 | ||
| 413 | struct dtv_cmds_h { | 444 | struct dtv_cmds_h { |
| 414 | char *name; /* A display name for debugging purposes */ | 445 | char *name; /* A display name for debugging purposes */ |
diff --git a/include/linux/dvb/version.h b/include/linux/dvb/version.h index 43d9e8d462d4..20e5eac2ffd3 100644 --- a/include/linux/dvb/version.h +++ b/include/linux/dvb/version.h | |||
| @@ -24,6 +24,6 @@ | |||
| 24 | #define _DVBVERSION_H_ | 24 | #define _DVBVERSION_H_ |
| 25 | 25 | ||
| 26 | #define DVB_API_VERSION 5 | 26 | #define DVB_API_VERSION 5 |
| 27 | #define DVB_API_VERSION_MINOR 6 | 27 | #define DVB_API_VERSION_MINOR 8 |
| 28 | 28 | ||
| 29 | #endif /*_DVBVERSION_H_*/ | 29 | #endif /*_DVBVERSION_H_*/ |
diff --git a/include/linux/efi.h b/include/linux/efi.h index 103adc6d7e3a..ec45ccd8708a 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
| @@ -503,6 +503,8 @@ extern u64 efi_mem_attribute (unsigned long phys_addr, unsigned long size); | |||
| 503 | extern int __init efi_uart_console_only (void); | 503 | extern int __init efi_uart_console_only (void); |
| 504 | extern void efi_initialize_iomem_resources(struct resource *code_resource, | 504 | extern void efi_initialize_iomem_resources(struct resource *code_resource, |
| 505 | struct resource *data_resource, struct resource *bss_resource); | 505 | struct resource *data_resource, struct resource *bss_resource); |
| 506 | extern unsigned long efi_get_time(void); | ||
| 507 | extern int efi_set_rtc_mmss(unsigned long nowtime); | ||
| 506 | extern void efi_reserve_boot_services(void); | 508 | extern void efi_reserve_boot_services(void); |
| 507 | extern struct efi_memory_map memmap; | 509 | extern struct efi_memory_map memmap; |
| 508 | 510 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index b178f9e91e23..aa110476a95b 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -165,6 +165,8 @@ struct inodes_stat_t { | |||
| 165 | #define READ 0 | 165 | #define READ 0 |
| 166 | #define WRITE RW_MASK | 166 | #define WRITE RW_MASK |
| 167 | #define READA RWA_MASK | 167 | #define READA RWA_MASK |
| 168 | #define KERNEL_READ (READ|REQ_KERNEL) | ||
| 169 | #define KERNEL_WRITE (WRITE|REQ_KERNEL) | ||
| 168 | 170 | ||
| 169 | #define READ_SYNC (READ | REQ_SYNC) | 171 | #define READ_SYNC (READ | REQ_SYNC) |
| 170 | #define WRITE_SYNC (WRITE | REQ_SYNC | REQ_NOIDLE) | 172 | #define WRITE_SYNC (WRITE | REQ_SYNC | REQ_NOIDLE) |
| @@ -412,6 +414,7 @@ struct inodes_stat_t { | |||
| 412 | #include <linux/shrinker.h> | 414 | #include <linux/shrinker.h> |
| 413 | #include <linux/migrate_mode.h> | 415 | #include <linux/migrate_mode.h> |
| 414 | #include <linux/uidgid.h> | 416 | #include <linux/uidgid.h> |
| 417 | #include <linux/lockdep.h> | ||
| 415 | 418 | ||
| 416 | #include <asm/byteorder.h> | 419 | #include <asm/byteorder.h> |
| 417 | 420 | ||
| @@ -427,6 +430,7 @@ struct kstatfs; | |||
| 427 | struct vm_area_struct; | 430 | struct vm_area_struct; |
| 428 | struct vfsmount; | 431 | struct vfsmount; |
| 429 | struct cred; | 432 | struct cred; |
| 433 | struct swap_info_struct; | ||
| 430 | 434 | ||
| 431 | extern void __init inode_init(void); | 435 | extern void __init inode_init(void); |
| 432 | extern void __init inode_init_early(void); | 436 | extern void __init inode_init_early(void); |
| @@ -437,6 +441,8 @@ extern unsigned long get_max_files(void); | |||
| 437 | extern int sysctl_nr_open; | 441 | extern int sysctl_nr_open; |
| 438 | extern struct inodes_stat_t inodes_stat; | 442 | extern struct inodes_stat_t inodes_stat; |
| 439 | extern int leases_enable, lease_break_time; | 443 | extern int leases_enable, lease_break_time; |
| 444 | extern int sysctl_protected_symlinks; | ||
| 445 | extern int sysctl_protected_hardlinks; | ||
| 440 | 446 | ||
| 441 | struct buffer_head; | 447 | struct buffer_head; |
| 442 | typedef int (get_block_t)(struct inode *inode, sector_t iblock, | 448 | typedef int (get_block_t)(struct inode *inode, sector_t iblock, |
| @@ -636,6 +642,11 @@ struct address_space_operations { | |||
| 636 | int (*is_partially_uptodate) (struct page *, read_descriptor_t *, | 642 | int (*is_partially_uptodate) (struct page *, read_descriptor_t *, |
| 637 | unsigned long); | 643 | unsigned long); |
| 638 | int (*error_remove_page)(struct address_space *, struct page *); | 644 | int (*error_remove_page)(struct address_space *, struct page *); |
| 645 | |||
| 646 | /* swapfile support */ | ||
| 647 | int (*swap_activate)(struct swap_info_struct *sis, struct file *file, | ||
| 648 | sector_t *span); | ||
| 649 | void (*swap_deactivate)(struct file *file); | ||
| 639 | }; | 650 | }; |
| 640 | 651 | ||
| 641 | extern const struct address_space_operations empty_aops; | 652 | extern const struct address_space_operations empty_aops; |
| @@ -1154,7 +1165,6 @@ struct lock_manager_operations { | |||
| 1154 | int (*lm_compare_owner)(struct file_lock *, struct file_lock *); | 1165 | int (*lm_compare_owner)(struct file_lock *, struct file_lock *); |
| 1155 | void (*lm_notify)(struct file_lock *); /* unblock callback */ | 1166 | void (*lm_notify)(struct file_lock *); /* unblock callback */ |
| 1156 | int (*lm_grant)(struct file_lock *, struct file_lock *, int); | 1167 | int (*lm_grant)(struct file_lock *, struct file_lock *, int); |
| 1157 | void (*lm_release_private)(struct file_lock *); | ||
| 1158 | void (*lm_break)(struct file_lock *); | 1168 | void (*lm_break)(struct file_lock *); |
| 1159 | int (*lm_change)(struct file_lock **, int); | 1169 | int (*lm_change)(struct file_lock **, int); |
| 1160 | }; | 1170 | }; |
| @@ -1438,6 +1448,8 @@ extern void f_delown(struct file *filp); | |||
| 1438 | extern pid_t f_getown(struct file *filp); | 1448 | extern pid_t f_getown(struct file *filp); |
| 1439 | extern int send_sigurg(struct fown_struct *fown); | 1449 | extern int send_sigurg(struct fown_struct *fown); |
| 1440 | 1450 | ||
| 1451 | struct mm_struct; | ||
| 1452 | |||
| 1441 | /* | 1453 | /* |
| 1442 | * Umount options | 1454 | * Umount options |
| 1443 | */ | 1455 | */ |
| @@ -1451,10 +1463,34 @@ extern int send_sigurg(struct fown_struct *fown); | |||
| 1451 | extern struct list_head super_blocks; | 1463 | extern struct list_head super_blocks; |
| 1452 | extern spinlock_t sb_lock; | 1464 | extern spinlock_t sb_lock; |
| 1453 | 1465 | ||
| 1466 | /* Possible states of 'frozen' field */ | ||
| 1467 | enum { | ||
| 1468 | SB_UNFROZEN = 0, /* FS is unfrozen */ | ||
| 1469 | SB_FREEZE_WRITE = 1, /* Writes, dir ops, ioctls frozen */ | ||
| 1470 | SB_FREEZE_PAGEFAULT = 2, /* Page faults stopped as well */ | ||
| 1471 | SB_FREEZE_FS = 3, /* For internal FS use (e.g. to stop | ||
| 1472 | * internal threads if needed) */ | ||
| 1473 | SB_FREEZE_COMPLETE = 4, /* ->freeze_fs finished successfully */ | ||
| 1474 | }; | ||
| 1475 | |||
| 1476 | #define SB_FREEZE_LEVELS (SB_FREEZE_COMPLETE - 1) | ||
| 1477 | |||
| 1478 | struct sb_writers { | ||
| 1479 | /* Counters for counting writers at each level */ | ||
| 1480 | struct percpu_counter counter[SB_FREEZE_LEVELS]; | ||
| 1481 | wait_queue_head_t wait; /* queue for waiting for | ||
| 1482 | writers / faults to finish */ | ||
| 1483 | int frozen; /* Is sb frozen? */ | ||
| 1484 | wait_queue_head_t wait_unfrozen; /* queue for waiting for | ||
| 1485 | sb to be thawed */ | ||
| 1486 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
| 1487 | struct lockdep_map lock_map[SB_FREEZE_LEVELS]; | ||
| 1488 | #endif | ||
| 1489 | }; | ||
| 1490 | |||
| 1454 | struct super_block { | 1491 | struct super_block { |
| 1455 | struct list_head s_list; /* Keep this first */ | 1492 | struct list_head s_list; /* Keep this first */ |
| 1456 | dev_t s_dev; /* search index; _not_ kdev_t */ | 1493 | dev_t s_dev; /* search index; _not_ kdev_t */ |
| 1457 | unsigned char s_dirt; | ||
| 1458 | unsigned char s_blocksize_bits; | 1494 | unsigned char s_blocksize_bits; |
| 1459 | unsigned long s_blocksize; | 1495 | unsigned long s_blocksize; |
| 1460 | loff_t s_maxbytes; /* Max file size */ | 1496 | loff_t s_maxbytes; /* Max file size */ |
| @@ -1498,8 +1534,7 @@ struct super_block { | |||
| 1498 | struct hlist_node s_instances; | 1534 | struct hlist_node s_instances; |
| 1499 | struct quota_info s_dquot; /* Diskquota specific options */ | 1535 | struct quota_info s_dquot; /* Diskquota specific options */ |
| 1500 | 1536 | ||
| 1501 | int s_frozen; | 1537 | struct sb_writers s_writers; |
| 1502 | wait_queue_head_t s_wait_unfrozen; | ||
| 1503 | 1538 | ||
| 1504 | char s_id[32]; /* Informational name */ | 1539 | char s_id[32]; /* Informational name */ |
| 1505 | u8 s_uuid[16]; /* UUID */ | 1540 | u8 s_uuid[16]; /* UUID */ |
| @@ -1554,14 +1589,117 @@ extern struct timespec current_fs_time(struct super_block *sb); | |||
| 1554 | /* | 1589 | /* |
| 1555 | * Snapshotting support. | 1590 | * Snapshotting support. |
| 1556 | */ | 1591 | */ |
| 1557 | enum { | ||
| 1558 | SB_UNFROZEN = 0, | ||
| 1559 | SB_FREEZE_WRITE = 1, | ||
| 1560 | SB_FREEZE_TRANS = 2, | ||
| 1561 | }; | ||
| 1562 | 1592 | ||
| 1563 | #define vfs_check_frozen(sb, level) \ | 1593 | void __sb_end_write(struct super_block *sb, int level); |
| 1564 | wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level))) | 1594 | int __sb_start_write(struct super_block *sb, int level, bool wait); |
| 1595 | |||
| 1596 | /** | ||
| 1597 | * sb_end_write - drop write access to a superblock | ||
| 1598 | * @sb: the super we wrote to | ||
| 1599 | * | ||
| 1600 | * Decrement number of writers to the filesystem. Wake up possible waiters | ||
| 1601 | * wanting to freeze the filesystem. | ||
| 1602 | */ | ||
| 1603 | static inline void sb_end_write(struct super_block *sb) | ||
| 1604 | { | ||
| 1605 | __sb_end_write(sb, SB_FREEZE_WRITE); | ||
| 1606 | } | ||
| 1607 | |||
| 1608 | /** | ||
| 1609 | * sb_end_pagefault - drop write access to a superblock from a page fault | ||
| 1610 | * @sb: the super we wrote to | ||
| 1611 | * | ||
| 1612 | * Decrement number of processes handling write page fault to the filesystem. | ||
| 1613 | * Wake up possible waiters wanting to freeze the filesystem. | ||
| 1614 | */ | ||
| 1615 | static inline void sb_end_pagefault(struct super_block *sb) | ||
| 1616 | { | ||
| 1617 | __sb_end_write(sb, SB_FREEZE_PAGEFAULT); | ||
| 1618 | } | ||
| 1619 | |||
| 1620 | /** | ||
| 1621 | * sb_end_intwrite - drop write access to a superblock for internal fs purposes | ||
| 1622 | * @sb: the super we wrote to | ||
| 1623 | * | ||
| 1624 | * Decrement fs-internal number of writers to the filesystem. Wake up possible | ||
| 1625 | * waiters wanting to freeze the filesystem. | ||
| 1626 | */ | ||
| 1627 | static inline void sb_end_intwrite(struct super_block *sb) | ||
| 1628 | { | ||
| 1629 | __sb_end_write(sb, SB_FREEZE_FS); | ||
| 1630 | } | ||
| 1631 | |||
| 1632 | /** | ||
| 1633 | * sb_start_write - get write access to a superblock | ||
| 1634 | * @sb: the super we write to | ||
| 1635 | * | ||
| 1636 | * When a process wants to write data or metadata to a file system (i.e. dirty | ||
| 1637 | * a page or an inode), it should embed the operation in a sb_start_write() - | ||
| 1638 | * sb_end_write() pair to get exclusion against file system freezing. This | ||
| 1639 | * function increments number of writers preventing freezing. If the file | ||
| 1640 | * system is already frozen, the function waits until the file system is | ||
| 1641 | * thawed. | ||
| 1642 | * | ||
| 1643 | * Since freeze protection behaves as a lock, users have to preserve | ||
| 1644 | * ordering of freeze protection and other filesystem locks. Generally, | ||
| 1645 | * freeze protection should be the outermost lock. In particular, we have: | ||
| 1646 | * | ||
| 1647 | * sb_start_write | ||
| 1648 | * -> i_mutex (write path, truncate, directory ops, ...) | ||
| 1649 | * -> s_umount (freeze_super, thaw_super) | ||
| 1650 | */ | ||
| 1651 | static inline void sb_start_write(struct super_block *sb) | ||
| 1652 | { | ||
| 1653 | __sb_start_write(sb, SB_FREEZE_WRITE, true); | ||
| 1654 | } | ||
| 1655 | |||
| 1656 | static inline int sb_start_write_trylock(struct super_block *sb) | ||
| 1657 | { | ||
| 1658 | return __sb_start_write(sb, SB_FREEZE_WRITE, false); | ||
| 1659 | } | ||
| 1660 | |||
| 1661 | /** | ||
| 1662 | * sb_start_pagefault - get write access to a superblock from a page fault | ||
| 1663 | * @sb: the super we write to | ||
| 1664 | * | ||
| 1665 | * When a process starts handling write page fault, it should embed the | ||
| 1666 | * operation into sb_start_pagefault() - sb_end_pagefault() pair to get | ||
| 1667 | * exclusion against file system freezing. This is needed since the page fault | ||
| 1668 | * is going to dirty a page. This function increments number of running page | ||
| 1669 | * faults preventing freezing. If the file system is already frozen, the | ||
| 1670 | * function waits until the file system is thawed. | ||
| 1671 | * | ||
| 1672 | * Since page fault freeze protection behaves as a lock, users have to preserve | ||
| 1673 | * ordering of freeze protection and other filesystem locks. It is advised to | ||
| 1674 | * put sb_start_pagefault() close to mmap_sem in lock ordering. Page fault | ||
| 1675 | * handling code implies lock dependency: | ||
| 1676 | * | ||
| 1677 | * mmap_sem | ||
| 1678 | * -> sb_start_pagefault | ||
| 1679 | */ | ||
| 1680 | static inline void sb_start_pagefault(struct super_block *sb) | ||
| 1681 | { | ||
| 1682 | __sb_start_write(sb, SB_FREEZE_PAGEFAULT, true); | ||
| 1683 | } | ||
| 1684 | |||
| 1685 | /* | ||
| 1686 | * sb_start_intwrite - get write access to a superblock for internal fs purposes | ||
| 1687 | * @sb: the super we write to | ||
| 1688 | * | ||
| 1689 | * This is the third level of protection against filesystem freezing. It is | ||
| 1690 | * free for use by a filesystem. The only requirement is that it must rank | ||
| 1691 | * below sb_start_pagefault. | ||
| 1692 | * | ||
| 1693 | * For example filesystem can call sb_start_intwrite() when starting a | ||
| 1694 | * transaction which somewhat eases handling of freezing for internal sources | ||
| 1695 | * of filesystem changes (internal fs threads, discarding preallocation on file | ||
| 1696 | * close, etc.). | ||
| 1697 | */ | ||
| 1698 | static inline void sb_start_intwrite(struct super_block *sb) | ||
| 1699 | { | ||
| 1700 | __sb_start_write(sb, SB_FREEZE_FS, true); | ||
| 1701 | } | ||
| 1702 | |||
| 1565 | 1703 | ||
| 1566 | extern bool inode_owner_or_capable(const struct inode *inode); | 1704 | extern bool inode_owner_or_capable(const struct inode *inode); |
| 1567 | 1705 | ||
| @@ -1722,7 +1860,6 @@ struct super_operations { | |||
| 1722 | int (*drop_inode) (struct inode *); | 1860 | int (*drop_inode) (struct inode *); |
| 1723 | void (*evict_inode) (struct inode *); | 1861 | void (*evict_inode) (struct inode *); |
| 1724 | void (*put_super) (struct super_block *); | 1862 | void (*put_super) (struct super_block *); |
| 1725 | void (*write_super) (struct super_block *); | ||
| 1726 | int (*sync_fs)(struct super_block *sb, int wait); | 1863 | int (*sync_fs)(struct super_block *sb, int wait); |
| 1727 | int (*freeze_fs) (struct super_block *); | 1864 | int (*freeze_fs) (struct super_block *); |
| 1728 | int (*unfreeze_fs) (struct super_block *); | 1865 | int (*unfreeze_fs) (struct super_block *); |
| @@ -1885,6 +2022,7 @@ struct file_system_type { | |||
| 1885 | struct lock_class_key s_lock_key; | 2022 | struct lock_class_key s_lock_key; |
| 1886 | struct lock_class_key s_umount_key; | 2023 | struct lock_class_key s_umount_key; |
| 1887 | struct lock_class_key s_vfs_rename_key; | 2024 | struct lock_class_key s_vfs_rename_key; |
| 2025 | struct lock_class_key s_writers_key[SB_FREEZE_LEVELS]; | ||
| 1888 | 2026 | ||
| 1889 | struct lock_class_key i_lock_key; | 2027 | struct lock_class_key i_lock_key; |
| 1890 | struct lock_class_key i_mutex_key; | 2028 | struct lock_class_key i_mutex_key; |
| @@ -2257,7 +2395,6 @@ extern int vfs_fsync_range(struct file *file, loff_t start, loff_t end, | |||
| 2257 | int datasync); | 2395 | int datasync); |
| 2258 | extern int vfs_fsync(struct file *file, int datasync); | 2396 | extern int vfs_fsync(struct file *file, int datasync); |
| 2259 | extern int generic_write_sync(struct file *file, loff_t pos, loff_t count); | 2397 | extern int generic_write_sync(struct file *file, loff_t pos, loff_t count); |
| 2260 | extern void sync_supers(void); | ||
| 2261 | extern void emergency_sync(void); | 2398 | extern void emergency_sync(void); |
| 2262 | extern void emergency_remount(void); | 2399 | extern void emergency_remount(void); |
| 2263 | #ifdef CONFIG_BLOCK | 2400 | #ifdef CONFIG_BLOCK |
| @@ -2327,9 +2464,6 @@ static inline void i_readcount_inc(struct inode *inode) | |||
| 2327 | } | 2464 | } |
| 2328 | #endif | 2465 | #endif |
| 2329 | extern int do_pipe_flags(int *, int); | 2466 | extern int do_pipe_flags(int *, int); |
| 2330 | extern struct file *create_read_pipe(struct file *f, int flags); | ||
| 2331 | extern struct file *create_write_pipe(int flags); | ||
| 2332 | extern void free_write_pipe(struct file *); | ||
| 2333 | 2467 | ||
| 2334 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); | 2468 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); |
| 2335 | extern struct file * open_exec(const char *); | 2469 | extern struct file * open_exec(const char *); |
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index af961d6f7ab1..642928cf57b4 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
| @@ -306,9 +306,10 @@ extern void *perf_trace_buf_prepare(int size, unsigned short type, | |||
| 306 | 306 | ||
| 307 | static inline void | 307 | static inline void |
| 308 | perf_trace_buf_submit(void *raw_data, int size, int rctx, u64 addr, | 308 | perf_trace_buf_submit(void *raw_data, int size, int rctx, u64 addr, |
| 309 | u64 count, struct pt_regs *regs, void *head) | 309 | u64 count, struct pt_regs *regs, void *head, |
| 310 | struct task_struct *task) | ||
| 310 | { | 311 | { |
| 311 | perf_tp_event(addr, count, raw_data, size, regs, head, rctx); | 312 | perf_tp_event(addr, count, raw_data, size, regs, head, rctx, task); |
| 312 | } | 313 | } |
| 313 | #endif | 314 | #endif |
| 314 | 315 | ||
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index 9303348965fb..d8c713e148e3 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
| @@ -57,6 +57,9 @@ | |||
| 57 | * | 57 | * |
| 58 | * 7.19 | 58 | * 7.19 |
| 59 | * - add FUSE_FALLOCATE | 59 | * - add FUSE_FALLOCATE |
| 60 | * | ||
| 61 | * 7.20 | ||
| 62 | * - add FUSE_AUTO_INVAL_DATA | ||
| 60 | */ | 63 | */ |
| 61 | 64 | ||
| 62 | #ifndef _LINUX_FUSE_H | 65 | #ifndef _LINUX_FUSE_H |
| @@ -88,7 +91,7 @@ | |||
| 88 | #define FUSE_KERNEL_VERSION 7 | 91 | #define FUSE_KERNEL_VERSION 7 |
| 89 | 92 | ||
| 90 | /** Minor version number of this interface */ | 93 | /** Minor version number of this interface */ |
| 91 | #define FUSE_KERNEL_MINOR_VERSION 19 | 94 | #define FUSE_KERNEL_MINOR_VERSION 20 |
| 92 | 95 | ||
| 93 | /** The node ID of the root inode */ | 96 | /** The node ID of the root inode */ |
| 94 | #define FUSE_ROOT_ID 1 | 97 | #define FUSE_ROOT_ID 1 |
| @@ -163,10 +166,19 @@ struct fuse_file_lock { | |||
| 163 | /** | 166 | /** |
| 164 | * INIT request/reply flags | 167 | * INIT request/reply flags |
| 165 | * | 168 | * |
| 169 | * FUSE_ASYNC_READ: asynchronous read requests | ||
| 166 | * FUSE_POSIX_LOCKS: remote locking for POSIX file locks | 170 | * FUSE_POSIX_LOCKS: remote locking for POSIX file locks |
| 171 | * FUSE_FILE_OPS: kernel sends file handle for fstat, etc... (not yet supported) | ||
| 172 | * FUSE_ATOMIC_O_TRUNC: handles the O_TRUNC open flag in the filesystem | ||
| 167 | * FUSE_EXPORT_SUPPORT: filesystem handles lookups of "." and ".." | 173 | * FUSE_EXPORT_SUPPORT: filesystem handles lookups of "." and ".." |
| 174 | * FUSE_BIG_WRITES: filesystem can handle write size larger than 4kB | ||
| 168 | * FUSE_DONT_MASK: don't apply umask to file mode on create operations | 175 | * FUSE_DONT_MASK: don't apply umask to file mode on create operations |
| 176 | * FUSE_SPLICE_WRITE: kernel supports splice write on the device | ||
| 177 | * FUSE_SPLICE_MOVE: kernel supports splice move on the device | ||
| 178 | * FUSE_SPLICE_READ: kernel supports splice read on the device | ||
| 169 | * FUSE_FLOCK_LOCKS: remote locking for BSD style file locks | 179 | * FUSE_FLOCK_LOCKS: remote locking for BSD style file locks |
| 180 | * FUSE_HAS_IOCTL_DIR: kernel supports ioctl on directories | ||
| 181 | * FUSE_AUTO_INVAL_DATA: automatically invalidate cached pages | ||
| 170 | */ | 182 | */ |
| 171 | #define FUSE_ASYNC_READ (1 << 0) | 183 | #define FUSE_ASYNC_READ (1 << 0) |
| 172 | #define FUSE_POSIX_LOCKS (1 << 1) | 184 | #define FUSE_POSIX_LOCKS (1 << 1) |
| @@ -175,7 +187,12 @@ struct fuse_file_lock { | |||
| 175 | #define FUSE_EXPORT_SUPPORT (1 << 4) | 187 | #define FUSE_EXPORT_SUPPORT (1 << 4) |
| 176 | #define FUSE_BIG_WRITES (1 << 5) | 188 | #define FUSE_BIG_WRITES (1 << 5) |
| 177 | #define FUSE_DONT_MASK (1 << 6) | 189 | #define FUSE_DONT_MASK (1 << 6) |
| 190 | #define FUSE_SPLICE_WRITE (1 << 7) | ||
| 191 | #define FUSE_SPLICE_MOVE (1 << 8) | ||
| 192 | #define FUSE_SPLICE_READ (1 << 9) | ||
| 178 | #define FUSE_FLOCK_LOCKS (1 << 10) | 193 | #define FUSE_FLOCK_LOCKS (1 << 10) |
| 194 | #define FUSE_HAS_IOCTL_DIR (1 << 11) | ||
| 195 | #define FUSE_AUTO_INVAL_DATA (1 << 12) | ||
| 179 | 196 | ||
| 180 | /** | 197 | /** |
| 181 | * CUSE INIT request/reply flags | 198 | * CUSE INIT request/reply flags |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index ae0aaa9d42fa..4f440b3e89fe 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
| @@ -97,7 +97,13 @@ struct partition_meta_info { | |||
| 97 | 97 | ||
| 98 | struct hd_struct { | 98 | struct hd_struct { |
| 99 | sector_t start_sect; | 99 | sector_t start_sect; |
| 100 | /* | ||
| 101 | * nr_sects is protected by sequence counter. One might extend a | ||
| 102 | * partition while IO is happening to it and update of nr_sects | ||
| 103 | * can be non-atomic on 32bit machines with 64bit sector_t. | ||
| 104 | */ | ||
| 100 | sector_t nr_sects; | 105 | sector_t nr_sects; |
| 106 | seqcount_t nr_sects_seq; | ||
| 101 | sector_t alignment_offset; | 107 | sector_t alignment_offset; |
| 102 | unsigned int discard_alignment; | 108 | unsigned int discard_alignment; |
| 103 | struct device __dev; | 109 | struct device __dev; |
| @@ -647,6 +653,57 @@ static inline void hd_struct_put(struct hd_struct *part) | |||
| 647 | __delete_partition(part); | 653 | __delete_partition(part); |
| 648 | } | 654 | } |
| 649 | 655 | ||
| 656 | /* | ||
| 657 | * Any access of part->nr_sects which is not protected by partition | ||
| 658 | * bd_mutex or gendisk bdev bd_mutex, should be done using this | ||
| 659 | * accessor function. | ||
| 660 | * | ||
| 661 | * Code written along the lines of i_size_read() and i_size_write(). | ||
| 662 | * CONFIG_PREEMPT case optimizes the case of UP kernel with preemption | ||
| 663 | * on. | ||
| 664 | */ | ||
| 665 | static inline sector_t part_nr_sects_read(struct hd_struct *part) | ||
| 666 | { | ||
| 667 | #if BITS_PER_LONG==32 && defined(CONFIG_LBDAF) && defined(CONFIG_SMP) | ||
| 668 | sector_t nr_sects; | ||
| 669 | unsigned seq; | ||
| 670 | do { | ||
| 671 | seq = read_seqcount_begin(&part->nr_sects_seq); | ||
| 672 | nr_sects = part->nr_sects; | ||
| 673 | } while (read_seqcount_retry(&part->nr_sects_seq, seq)); | ||
| 674 | return nr_sects; | ||
| 675 | #elif BITS_PER_LONG==32 && defined(CONFIG_LBDAF) && defined(CONFIG_PREEMPT) | ||
| 676 | sector_t nr_sects; | ||
| 677 | |||
| 678 | preempt_disable(); | ||
| 679 | nr_sects = part->nr_sects; | ||
| 680 | preempt_enable(); | ||
| 681 | return nr_sects; | ||
| 682 | #else | ||
| 683 | return part->nr_sects; | ||
| 684 | #endif | ||
| 685 | } | ||
| 686 | |||
| 687 | /* | ||
| 688 | * Should be called with mutex lock held (typically bd_mutex) of partition | ||
| 689 | * to provide mutual exlusion among writers otherwise seqcount might be | ||
| 690 | * left in wrong state leaving the readers spinning infinitely. | ||
| 691 | */ | ||
| 692 | static inline void part_nr_sects_write(struct hd_struct *part, sector_t size) | ||
| 693 | { | ||
| 694 | #if BITS_PER_LONG==32 && defined(CONFIG_LBDAF) && defined(CONFIG_SMP) | ||
| 695 | write_seqcount_begin(&part->nr_sects_seq); | ||
| 696 | part->nr_sects = size; | ||
| 697 | write_seqcount_end(&part->nr_sects_seq); | ||
| 698 | #elif BITS_PER_LONG==32 && defined(CONFIG_LBDAF) && defined(CONFIG_PREEMPT) | ||
| 699 | preempt_disable(); | ||
| 700 | part->nr_sects = size; | ||
| 701 | preempt_enable(); | ||
| 702 | #else | ||
| 703 | part->nr_sects = size; | ||
| 704 | #endif | ||
| 705 | } | ||
| 706 | |||
| 650 | #else /* CONFIG_BLOCK */ | 707 | #else /* CONFIG_BLOCK */ |
| 651 | 708 | ||
| 652 | static inline void printk_all_partitions(void) { } | 709 | static inline void printk_all_partitions(void) { } |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 1e49be49d324..4883f393f50a 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
| @@ -23,6 +23,7 @@ struct vm_area_struct; | |||
| 23 | #define ___GFP_REPEAT 0x400u | 23 | #define ___GFP_REPEAT 0x400u |
| 24 | #define ___GFP_NOFAIL 0x800u | 24 | #define ___GFP_NOFAIL 0x800u |
| 25 | #define ___GFP_NORETRY 0x1000u | 25 | #define ___GFP_NORETRY 0x1000u |
| 26 | #define ___GFP_MEMALLOC 0x2000u | ||
| 26 | #define ___GFP_COMP 0x4000u | 27 | #define ___GFP_COMP 0x4000u |
| 27 | #define ___GFP_ZERO 0x8000u | 28 | #define ___GFP_ZERO 0x8000u |
| 28 | #define ___GFP_NOMEMALLOC 0x10000u | 29 | #define ___GFP_NOMEMALLOC 0x10000u |
| @@ -76,9 +77,14 @@ struct vm_area_struct; | |||
| 76 | #define __GFP_REPEAT ((__force gfp_t)___GFP_REPEAT) /* See above */ | 77 | #define __GFP_REPEAT ((__force gfp_t)___GFP_REPEAT) /* See above */ |
| 77 | #define __GFP_NOFAIL ((__force gfp_t)___GFP_NOFAIL) /* See above */ | 78 | #define __GFP_NOFAIL ((__force gfp_t)___GFP_NOFAIL) /* See above */ |
| 78 | #define __GFP_NORETRY ((__force gfp_t)___GFP_NORETRY) /* See above */ | 79 | #define __GFP_NORETRY ((__force gfp_t)___GFP_NORETRY) /* See above */ |
| 80 | #define __GFP_MEMALLOC ((__force gfp_t)___GFP_MEMALLOC)/* Allow access to emergency reserves */ | ||
| 79 | #define __GFP_COMP ((__force gfp_t)___GFP_COMP) /* Add compound page metadata */ | 81 | #define __GFP_COMP ((__force gfp_t)___GFP_COMP) /* Add compound page metadata */ |
| 80 | #define __GFP_ZERO ((__force gfp_t)___GFP_ZERO) /* Return zeroed page on success */ | 82 | #define __GFP_ZERO ((__force gfp_t)___GFP_ZERO) /* Return zeroed page on success */ |
| 81 | #define __GFP_NOMEMALLOC ((__force gfp_t)___GFP_NOMEMALLOC) /* Don't use emergency reserves */ | 83 | #define __GFP_NOMEMALLOC ((__force gfp_t)___GFP_NOMEMALLOC) /* Don't use emergency reserves. |
| 84 | * This takes precedence over the | ||
| 85 | * __GFP_MEMALLOC flag if both are | ||
| 86 | * set | ||
| 87 | */ | ||
| 82 | #define __GFP_HARDWALL ((__force gfp_t)___GFP_HARDWALL) /* Enforce hardwall cpuset memory allocs */ | 88 | #define __GFP_HARDWALL ((__force gfp_t)___GFP_HARDWALL) /* Enforce hardwall cpuset memory allocs */ |
| 83 | #define __GFP_THISNODE ((__force gfp_t)___GFP_THISNODE)/* No fallback, no policies */ | 89 | #define __GFP_THISNODE ((__force gfp_t)___GFP_THISNODE)/* No fallback, no policies */ |
| 84 | #define __GFP_RECLAIMABLE ((__force gfp_t)___GFP_RECLAIMABLE) /* Page is reclaimable */ | 90 | #define __GFP_RECLAIMABLE ((__force gfp_t)___GFP_RECLAIMABLE) /* Page is reclaimable */ |
| @@ -129,7 +135,7 @@ struct vm_area_struct; | |||
| 129 | /* Control page allocator reclaim behavior */ | 135 | /* Control page allocator reclaim behavior */ |
| 130 | #define GFP_RECLAIM_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS|\ | 136 | #define GFP_RECLAIM_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS|\ |
| 131 | __GFP_NOWARN|__GFP_REPEAT|__GFP_NOFAIL|\ | 137 | __GFP_NOWARN|__GFP_REPEAT|__GFP_NOFAIL|\ |
| 132 | __GFP_NORETRY|__GFP_NOMEMALLOC) | 138 | __GFP_NORETRY|__GFP_MEMALLOC|__GFP_NOMEMALLOC) |
| 133 | 139 | ||
| 134 | /* Control slab gfp mask during early boot */ | 140 | /* Control slab gfp mask during early boot */ |
| 135 | #define GFP_BOOT_MASK (__GFP_BITS_MASK & ~(__GFP_WAIT|__GFP_IO|__GFP_FS)) | 141 | #define GFP_BOOT_MASK (__GFP_BITS_MASK & ~(__GFP_WAIT|__GFP_IO|__GFP_FS)) |
| @@ -379,6 +385,9 @@ void drain_local_pages(void *dummy); | |||
| 379 | */ | 385 | */ |
| 380 | extern gfp_t gfp_allowed_mask; | 386 | extern gfp_t gfp_allowed_mask; |
| 381 | 387 | ||
| 388 | /* Returns true if the gfp_mask allows use of ALLOC_NO_WATERMARK */ | ||
| 389 | bool gfp_pfmemalloc_allowed(gfp_t gfp_mask); | ||
| 390 | |||
| 382 | extern void pm_restrict_gfp_mask(void); | 391 | extern void pm_restrict_gfp_mask(void); |
| 383 | extern void pm_restore_gfp_mask(void); | 392 | extern void pm_restore_gfp_mask(void); |
| 384 | 393 | ||
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index bb7f30971858..305f23cd7cff 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | * | 22 | * |
| 23 | * - bits 16-25 are the hardirq count (max # of nested hardirqs: 1024) | 23 | * - bits 16-25 are the hardirq count (max # of nested hardirqs: 1024) |
| 24 | * - bit 26 is the NMI_MASK | 24 | * - bit 26 is the NMI_MASK |
| 25 | * - bit 28 is the PREEMPT_ACTIVE flag | 25 | * - bit 27 is the PREEMPT_ACTIVE flag |
| 26 | * | 26 | * |
| 27 | * PREEMPT_MASK: 0x000000ff | 27 | * PREEMPT_MASK: 0x000000ff |
| 28 | * SOFTIRQ_MASK: 0x0000ff00 | 28 | * SOFTIRQ_MASK: 0x0000ff00 |
diff --git a/include/linux/highmem.h b/include/linux/highmem.h index 774fa47b3b5b..ef788b5b4a35 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h | |||
| @@ -39,10 +39,17 @@ extern unsigned long totalhigh_pages; | |||
| 39 | 39 | ||
| 40 | void kmap_flush_unused(void); | 40 | void kmap_flush_unused(void); |
| 41 | 41 | ||
| 42 | struct page *kmap_to_page(void *addr); | ||
| 43 | |||
| 42 | #else /* CONFIG_HIGHMEM */ | 44 | #else /* CONFIG_HIGHMEM */ |
| 43 | 45 | ||
| 44 | static inline unsigned int nr_free_highpages(void) { return 0; } | 46 | static inline unsigned int nr_free_highpages(void) { return 0; } |
| 45 | 47 | ||
| 48 | static inline struct page *kmap_to_page(void *addr) | ||
| 49 | { | ||
| 50 | return virt_to_page(addr); | ||
| 51 | } | ||
| 52 | |||
| 46 | #define totalhigh_pages 0UL | 53 | #define totalhigh_pages 0UL |
| 47 | 54 | ||
| 48 | #ifndef ARCH_HAS_KMAP | 55 | #ifndef ARCH_HAS_KMAP |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index d5d6bbe2259e..225164842ab6 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
| @@ -4,9 +4,11 @@ | |||
| 4 | #include <linux/mm_types.h> | 4 | #include <linux/mm_types.h> |
| 5 | #include <linux/fs.h> | 5 | #include <linux/fs.h> |
| 6 | #include <linux/hugetlb_inline.h> | 6 | #include <linux/hugetlb_inline.h> |
| 7 | #include <linux/cgroup.h> | ||
| 7 | 8 | ||
| 8 | struct ctl_table; | 9 | struct ctl_table; |
| 9 | struct user_struct; | 10 | struct user_struct; |
| 11 | struct mmu_gather; | ||
| 10 | 12 | ||
| 11 | #ifdef CONFIG_HUGETLB_PAGE | 13 | #ifdef CONFIG_HUGETLB_PAGE |
| 12 | 14 | ||
| @@ -20,6 +22,11 @@ struct hugepage_subpool { | |||
| 20 | long max_hpages, used_hpages; | 22 | long max_hpages, used_hpages; |
| 21 | }; | 23 | }; |
| 22 | 24 | ||
| 25 | extern spinlock_t hugetlb_lock; | ||
| 26 | extern int hugetlb_max_hstate __read_mostly; | ||
| 27 | #define for_each_hstate(h) \ | ||
| 28 | for ((h) = hstates; (h) < &hstates[hugetlb_max_hstate]; (h)++) | ||
| 29 | |||
| 23 | struct hugepage_subpool *hugepage_new_subpool(long nr_blocks); | 30 | struct hugepage_subpool *hugepage_new_subpool(long nr_blocks); |
| 24 | void hugepage_put_subpool(struct hugepage_subpool *spool); | 31 | void hugepage_put_subpool(struct hugepage_subpool *spool); |
| 25 | 32 | ||
| @@ -40,9 +47,14 @@ int follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *, | |||
| 40 | struct page **, struct vm_area_struct **, | 47 | struct page **, struct vm_area_struct **, |
| 41 | unsigned long *, int *, int, unsigned int flags); | 48 | unsigned long *, int *, int, unsigned int flags); |
| 42 | void unmap_hugepage_range(struct vm_area_struct *, | 49 | void unmap_hugepage_range(struct vm_area_struct *, |
| 43 | unsigned long, unsigned long, struct page *); | 50 | unsigned long, unsigned long, struct page *); |
| 44 | void __unmap_hugepage_range(struct vm_area_struct *, | 51 | void __unmap_hugepage_range_final(struct mmu_gather *tlb, |
| 45 | unsigned long, unsigned long, struct page *); | 52 | struct vm_area_struct *vma, |
| 53 | unsigned long start, unsigned long end, | ||
| 54 | struct page *ref_page); | ||
| 55 | void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, | ||
| 56 | unsigned long start, unsigned long end, | ||
| 57 | struct page *ref_page); | ||
| 46 | int hugetlb_prefault(struct address_space *, struct vm_area_struct *); | 58 | int hugetlb_prefault(struct address_space *, struct vm_area_struct *); |
| 47 | void hugetlb_report_meminfo(struct seq_file *); | 59 | void hugetlb_report_meminfo(struct seq_file *); |
| 48 | int hugetlb_report_node_meminfo(int, char *); | 60 | int hugetlb_report_node_meminfo(int, char *); |
| @@ -98,7 +110,6 @@ static inline unsigned long hugetlb_total_pages(void) | |||
| 98 | #define follow_huge_addr(mm, addr, write) ERR_PTR(-EINVAL) | 110 | #define follow_huge_addr(mm, addr, write) ERR_PTR(-EINVAL) |
| 99 | #define copy_hugetlb_page_range(src, dst, vma) ({ BUG(); 0; }) | 111 | #define copy_hugetlb_page_range(src, dst, vma) ({ BUG(); 0; }) |
| 100 | #define hugetlb_prefault(mapping, vma) ({ BUG(); 0; }) | 112 | #define hugetlb_prefault(mapping, vma) ({ BUG(); 0; }) |
| 101 | #define unmap_hugepage_range(vma, start, end, page) BUG() | ||
| 102 | static inline void hugetlb_report_meminfo(struct seq_file *m) | 113 | static inline void hugetlb_report_meminfo(struct seq_file *m) |
| 103 | { | 114 | { |
| 104 | } | 115 | } |
| @@ -112,13 +123,31 @@ static inline void hugetlb_report_meminfo(struct seq_file *m) | |||
| 112 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) | 123 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) |
| 113 | #define hugetlb_fault(mm, vma, addr, flags) ({ BUG(); 0; }) | 124 | #define hugetlb_fault(mm, vma, addr, flags) ({ BUG(); 0; }) |
| 114 | #define huge_pte_offset(mm, address) 0 | 125 | #define huge_pte_offset(mm, address) 0 |
| 115 | #define dequeue_hwpoisoned_huge_page(page) 0 | 126 | static inline int dequeue_hwpoisoned_huge_page(struct page *page) |
| 127 | { | ||
| 128 | return 0; | ||
| 129 | } | ||
| 130 | |||
| 116 | static inline void copy_huge_page(struct page *dst, struct page *src) | 131 | static inline void copy_huge_page(struct page *dst, struct page *src) |
| 117 | { | 132 | { |
| 118 | } | 133 | } |
| 119 | 134 | ||
| 120 | #define hugetlb_change_protection(vma, address, end, newprot) | 135 | #define hugetlb_change_protection(vma, address, end, newprot) |
| 121 | 136 | ||
| 137 | static inline void __unmap_hugepage_range_final(struct mmu_gather *tlb, | ||
| 138 | struct vm_area_struct *vma, unsigned long start, | ||
| 139 | unsigned long end, struct page *ref_page) | ||
| 140 | { | ||
| 141 | BUG(); | ||
| 142 | } | ||
| 143 | |||
| 144 | static inline void __unmap_hugepage_range(struct mmu_gather *tlb, | ||
| 145 | struct vm_area_struct *vma, unsigned long start, | ||
| 146 | unsigned long end, struct page *ref_page) | ||
| 147 | { | ||
| 148 | BUG(); | ||
| 149 | } | ||
| 150 | |||
| 122 | #endif /* !CONFIG_HUGETLB_PAGE */ | 151 | #endif /* !CONFIG_HUGETLB_PAGE */ |
| 123 | 152 | ||
| 124 | #define HUGETLB_ANON_FILE "anon_hugepage" | 153 | #define HUGETLB_ANON_FILE "anon_hugepage" |
| @@ -199,10 +228,15 @@ struct hstate { | |||
| 199 | unsigned long resv_huge_pages; | 228 | unsigned long resv_huge_pages; |
| 200 | unsigned long surplus_huge_pages; | 229 | unsigned long surplus_huge_pages; |
| 201 | unsigned long nr_overcommit_huge_pages; | 230 | unsigned long nr_overcommit_huge_pages; |
| 231 | struct list_head hugepage_activelist; | ||
| 202 | struct list_head hugepage_freelists[MAX_NUMNODES]; | 232 | struct list_head hugepage_freelists[MAX_NUMNODES]; |
| 203 | unsigned int nr_huge_pages_node[MAX_NUMNODES]; | 233 | unsigned int nr_huge_pages_node[MAX_NUMNODES]; |
| 204 | unsigned int free_huge_pages_node[MAX_NUMNODES]; | 234 | unsigned int free_huge_pages_node[MAX_NUMNODES]; |
| 205 | unsigned int surplus_huge_pages_node[MAX_NUMNODES]; | 235 | unsigned int surplus_huge_pages_node[MAX_NUMNODES]; |
| 236 | #ifdef CONFIG_CGROUP_HUGETLB | ||
| 237 | /* cgroup control files */ | ||
| 238 | struct cftype cgroup_files[5]; | ||
| 239 | #endif | ||
| 206 | char name[HSTATE_NAME_LEN]; | 240 | char name[HSTATE_NAME_LEN]; |
| 207 | }; | 241 | }; |
| 208 | 242 | ||
| @@ -302,6 +336,11 @@ static inline unsigned hstate_index_to_shift(unsigned index) | |||
| 302 | return hstates[index].order + PAGE_SHIFT; | 336 | return hstates[index].order + PAGE_SHIFT; |
| 303 | } | 337 | } |
| 304 | 338 | ||
| 339 | static inline int hstate_index(struct hstate *h) | ||
| 340 | { | ||
| 341 | return h - hstates; | ||
| 342 | } | ||
| 343 | |||
| 305 | #else | 344 | #else |
| 306 | struct hstate {}; | 345 | struct hstate {}; |
| 307 | #define alloc_huge_page_node(h, nid) NULL | 346 | #define alloc_huge_page_node(h, nid) NULL |
| @@ -320,6 +359,7 @@ static inline unsigned int pages_per_huge_page(struct hstate *h) | |||
| 320 | return 1; | 359 | return 1; |
| 321 | } | 360 | } |
| 322 | #define hstate_index_to_shift(index) 0 | 361 | #define hstate_index_to_shift(index) 0 |
| 362 | #define hstate_index(h) 0 | ||
| 323 | #endif | 363 | #endif |
| 324 | 364 | ||
| 325 | #endif /* _LINUX_HUGETLB_H */ | 365 | #endif /* _LINUX_HUGETLB_H */ |
diff --git a/include/linux/hugetlb_cgroup.h b/include/linux/hugetlb_cgroup.h new file mode 100644 index 000000000000..d73878c694b3 --- /dev/null +++ b/include/linux/hugetlb_cgroup.h | |||
| @@ -0,0 +1,126 @@ | |||
| 1 | /* | ||
| 2 | * Copyright IBM Corporation, 2012 | ||
| 3 | * Author Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify it | ||
| 6 | * under the terms of version 2.1 of the GNU Lesser General Public License | ||
| 7 | * as published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it would be useful, but | ||
| 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| 12 | * | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef _LINUX_HUGETLB_CGROUP_H | ||
| 16 | #define _LINUX_HUGETLB_CGROUP_H | ||
| 17 | |||
| 18 | #include <linux/res_counter.h> | ||
| 19 | |||
| 20 | struct hugetlb_cgroup; | ||
| 21 | /* | ||
| 22 | * Minimum page order trackable by hugetlb cgroup. | ||
| 23 | * At least 3 pages are necessary for all the tracking information. | ||
| 24 | */ | ||
| 25 | #define HUGETLB_CGROUP_MIN_ORDER 2 | ||
| 26 | |||
| 27 | #ifdef CONFIG_CGROUP_HUGETLB | ||
| 28 | |||
| 29 | static inline struct hugetlb_cgroup *hugetlb_cgroup_from_page(struct page *page) | ||
| 30 | { | ||
| 31 | VM_BUG_ON(!PageHuge(page)); | ||
| 32 | |||
| 33 | if (compound_order(page) < HUGETLB_CGROUP_MIN_ORDER) | ||
| 34 | return NULL; | ||
| 35 | return (struct hugetlb_cgroup *)page[2].lru.next; | ||
| 36 | } | ||
| 37 | |||
| 38 | static inline | ||
| 39 | int set_hugetlb_cgroup(struct page *page, struct hugetlb_cgroup *h_cg) | ||
| 40 | { | ||
| 41 | VM_BUG_ON(!PageHuge(page)); | ||
| 42 | |||
| 43 | if (compound_order(page) < HUGETLB_CGROUP_MIN_ORDER) | ||
| 44 | return -1; | ||
| 45 | page[2].lru.next = (void *)h_cg; | ||
| 46 | return 0; | ||
| 47 | } | ||
| 48 | |||
| 49 | static inline bool hugetlb_cgroup_disabled(void) | ||
| 50 | { | ||
| 51 | if (hugetlb_subsys.disabled) | ||
| 52 | return true; | ||
| 53 | return false; | ||
| 54 | } | ||
| 55 | |||
| 56 | extern int hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages, | ||
| 57 | struct hugetlb_cgroup **ptr); | ||
| 58 | extern void hugetlb_cgroup_commit_charge(int idx, unsigned long nr_pages, | ||
| 59 | struct hugetlb_cgroup *h_cg, | ||
| 60 | struct page *page); | ||
| 61 | extern void hugetlb_cgroup_uncharge_page(int idx, unsigned long nr_pages, | ||
| 62 | struct page *page); | ||
| 63 | extern void hugetlb_cgroup_uncharge_cgroup(int idx, unsigned long nr_pages, | ||
| 64 | struct hugetlb_cgroup *h_cg); | ||
| 65 | extern int hugetlb_cgroup_file_init(int idx) __init; | ||
| 66 | extern void hugetlb_cgroup_migrate(struct page *oldhpage, | ||
| 67 | struct page *newhpage); | ||
| 68 | |||
| 69 | #else | ||
| 70 | static inline struct hugetlb_cgroup *hugetlb_cgroup_from_page(struct page *page) | ||
| 71 | { | ||
| 72 | return NULL; | ||
| 73 | } | ||
| 74 | |||
| 75 | static inline | ||
| 76 | int set_hugetlb_cgroup(struct page *page, struct hugetlb_cgroup *h_cg) | ||
| 77 | { | ||
| 78 | return 0; | ||
| 79 | } | ||
| 80 | |||
| 81 | static inline bool hugetlb_cgroup_disabled(void) | ||
| 82 | { | ||
| 83 | return true; | ||
| 84 | } | ||
| 85 | |||
| 86 | static inline int | ||
| 87 | hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages, | ||
| 88 | struct hugetlb_cgroup **ptr) | ||
| 89 | { | ||
| 90 | return 0; | ||
| 91 | } | ||
| 92 | |||
| 93 | static inline void | ||
| 94 | hugetlb_cgroup_commit_charge(int idx, unsigned long nr_pages, | ||
| 95 | struct hugetlb_cgroup *h_cg, | ||
| 96 | struct page *page) | ||
| 97 | { | ||
| 98 | return; | ||
| 99 | } | ||
| 100 | |||
| 101 | static inline void | ||
| 102 | hugetlb_cgroup_uncharge_page(int idx, unsigned long nr_pages, struct page *page) | ||
| 103 | { | ||
| 104 | return; | ||
| 105 | } | ||
| 106 | |||
| 107 | static inline void | ||
| 108 | hugetlb_cgroup_uncharge_cgroup(int idx, unsigned long nr_pages, | ||
| 109 | struct hugetlb_cgroup *h_cg) | ||
| 110 | { | ||
| 111 | return; | ||
| 112 | } | ||
| 113 | |||
| 114 | static inline int __init hugetlb_cgroup_file_init(int idx) | ||
| 115 | { | ||
| 116 | return 0; | ||
| 117 | } | ||
| 118 | |||
| 119 | static inline void hugetlb_cgroup_migrate(struct page *oldhpage, | ||
| 120 | struct page *newhpage) | ||
| 121 | { | ||
| 122 | return; | ||
| 123 | } | ||
| 124 | |||
| 125 | #endif /* CONFIG_MEM_RES_CTLR_HUGETLB */ | ||
| 126 | #endif | ||
diff --git a/include/linux/i2c-pnx.h b/include/linux/i2c-pnx.h index 1bc74afe7a35..49ed17fdf055 100644 --- a/include/linux/i2c-pnx.h +++ b/include/linux/i2c-pnx.h | |||
| @@ -22,6 +22,7 @@ struct i2c_pnx_mif { | |||
| 22 | struct timer_list timer; /* Timeout */ | 22 | struct timer_list timer; /* Timeout */ |
| 23 | u8 * buf; /* Data buffer */ | 23 | u8 * buf; /* Data buffer */ |
| 24 | int len; /* Length of data buffer */ | 24 | int len; /* Length of data buffer */ |
| 25 | int order; /* RX Bytes to order via TX */ | ||
| 25 | }; | 26 | }; |
| 26 | 27 | ||
| 27 | struct i2c_pnx_algo_data { | 28 | struct i2c_pnx_algo_data { |
diff --git a/include/linux/if_team.h b/include/linux/if_team.h index 6960fc1841a7..aa2e167e1ef4 100644 --- a/include/linux/if_team.h +++ b/include/linux/if_team.h | |||
| @@ -96,21 +96,6 @@ static inline void team_netpoll_send_skb(struct team_port *port, | |||
| 96 | } | 96 | } |
| 97 | #endif | 97 | #endif |
| 98 | 98 | ||
| 99 | static inline int team_dev_queue_xmit(struct team *team, struct team_port *port, | ||
| 100 | struct sk_buff *skb) | ||
| 101 | { | ||
| 102 | BUILD_BUG_ON(sizeof(skb->queue_mapping) != | ||
| 103 | sizeof(qdisc_skb_cb(skb)->slave_dev_queue_mapping)); | ||
| 104 | skb_set_queue_mapping(skb, qdisc_skb_cb(skb)->slave_dev_queue_mapping); | ||
| 105 | |||
| 106 | skb->dev = port->dev; | ||
| 107 | if (unlikely(netpoll_tx_running(port->dev))) { | ||
| 108 | team_netpoll_send_skb(port, skb); | ||
| 109 | return 0; | ||
| 110 | } | ||
| 111 | return dev_queue_xmit(skb); | ||
| 112 | } | ||
| 113 | |||
| 114 | struct team_mode_ops { | 99 | struct team_mode_ops { |
| 115 | int (*init)(struct team *team); | 100 | int (*init)(struct team *team); |
| 116 | void (*exit)(struct team *team); | 101 | void (*exit)(struct team *team); |
| @@ -200,6 +185,21 @@ struct team { | |||
| 200 | long mode_priv[TEAM_MODE_PRIV_LONGS]; | 185 | long mode_priv[TEAM_MODE_PRIV_LONGS]; |
| 201 | }; | 186 | }; |
| 202 | 187 | ||
| 188 | static inline int team_dev_queue_xmit(struct team *team, struct team_port *port, | ||
| 189 | struct sk_buff *skb) | ||
| 190 | { | ||
| 191 | BUILD_BUG_ON(sizeof(skb->queue_mapping) != | ||
| 192 | sizeof(qdisc_skb_cb(skb)->slave_dev_queue_mapping)); | ||
| 193 | skb_set_queue_mapping(skb, qdisc_skb_cb(skb)->slave_dev_queue_mapping); | ||
| 194 | |||
| 195 | skb->dev = port->dev; | ||
| 196 | if (unlikely(netpoll_tx_running(team->dev))) { | ||
| 197 | team_netpoll_send_skb(port, skb); | ||
| 198 | return 0; | ||
| 199 | } | ||
| 200 | return dev_queue_xmit(skb); | ||
| 201 | } | ||
| 202 | |||
| 203 | static inline struct hlist_head *team_port_index_hash(struct team *team, | 203 | static inline struct hlist_head *team_port_index_hash(struct team *team, |
| 204 | int port_index) | 204 | int port_index) |
| 205 | { | 205 | { |
diff --git a/include/linux/iio/frequency/adf4350.h b/include/linux/iio/frequency/adf4350.h index b76b4a87065e..be91f344d5fc 100644 --- a/include/linux/iio/frequency/adf4350.h +++ b/include/linux/iio/frequency/adf4350.h | |||
| @@ -87,6 +87,8 @@ | |||
| 87 | #define ADF4350_MAX_BANDSEL_CLK 125000 /* Hz */ | 87 | #define ADF4350_MAX_BANDSEL_CLK 125000 /* Hz */ |
| 88 | #define ADF4350_MAX_FREQ_REFIN 250000000 /* Hz */ | 88 | #define ADF4350_MAX_FREQ_REFIN 250000000 /* Hz */ |
| 89 | #define ADF4350_MAX_MODULUS 4095 | 89 | #define ADF4350_MAX_MODULUS 4095 |
| 90 | #define ADF4350_MAX_R_CNT 1023 | ||
| 91 | |||
| 90 | 92 | ||
| 91 | /** | 93 | /** |
| 92 | * struct adf4350_platform_data - platform specific information | 94 | * struct adf4350_platform_data - platform specific information |
diff --git a/include/linux/input/eeti_ts.h b/include/linux/input/eeti_ts.h index f875b316249d..16625d799b6f 100644 --- a/include/linux/input/eeti_ts.h +++ b/include/linux/input/eeti_ts.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define LINUX_INPUT_EETI_TS_H | 2 | #define LINUX_INPUT_EETI_TS_H |
| 3 | 3 | ||
| 4 | struct eeti_ts_platform_data { | 4 | struct eeti_ts_platform_data { |
| 5 | int irq_gpio; | ||
| 5 | unsigned int irq_active_high; | 6 | unsigned int irq_active_high; |
| 6 | }; | 7 | }; |
| 7 | 8 | ||
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index e68a8e53bb59..c5f856a040b9 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -42,7 +42,6 @@ | |||
| 42 | * | 42 | * |
| 43 | * IRQF_DISABLED - keep irqs disabled when calling the action handler. | 43 | * IRQF_DISABLED - keep irqs disabled when calling the action handler. |
| 44 | * DEPRECATED. This flag is a NOOP and scheduled to be removed | 44 | * DEPRECATED. This flag is a NOOP and scheduled to be removed |
| 45 | * IRQF_SAMPLE_RANDOM - irq is used to feed the random generator | ||
| 46 | * IRQF_SHARED - allow sharing the irq among several devices | 45 | * IRQF_SHARED - allow sharing the irq among several devices |
| 47 | * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur | 46 | * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur |
| 48 | * IRQF_TIMER - Flag to mark this interrupt as timer interrupt | 47 | * IRQF_TIMER - Flag to mark this interrupt as timer interrupt |
| @@ -61,7 +60,6 @@ | |||
| 61 | * resume time. | 60 | * resume time. |
| 62 | */ | 61 | */ |
| 63 | #define IRQF_DISABLED 0x00000020 | 62 | #define IRQF_DISABLED 0x00000020 |
| 64 | #define IRQF_SAMPLE_RANDOM 0x00000040 | ||
| 65 | #define IRQF_SHARED 0x00000080 | 63 | #define IRQF_SHARED 0x00000080 |
| 66 | #define IRQF_PROBE_SHARED 0x00000100 | 64 | #define IRQF_PROBE_SHARED 0x00000100 |
| 67 | #define __IRQF_TIMER 0x00000200 | 65 | #define __IRQF_TIMER 0x00000200 |
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 54d6d690073c..f3b99e1c1042 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #define __LINUX_IOMMU_H | 20 | #define __LINUX_IOMMU_H |
| 21 | 21 | ||
| 22 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
| 23 | #include <linux/types.h> | ||
| 23 | 24 | ||
| 24 | #define IOMMU_READ (1) | 25 | #define IOMMU_READ (1) |
| 25 | #define IOMMU_WRITE (2) | 26 | #define IOMMU_WRITE (2) |
| @@ -30,6 +31,7 @@ struct iommu_group; | |||
| 30 | struct bus_type; | 31 | struct bus_type; |
| 31 | struct device; | 32 | struct device; |
| 32 | struct iommu_domain; | 33 | struct iommu_domain; |
| 34 | struct notifier_block; | ||
| 33 | 35 | ||
| 34 | /* iommu fault flags */ | 36 | /* iommu fault flags */ |
| 35 | #define IOMMU_FAULT_READ 0x0 | 37 | #define IOMMU_FAULT_READ 0x0 |
| @@ -254,72 +256,78 @@ static inline void iommu_set_fault_handler(struct iommu_domain *domain, | |||
| 254 | { | 256 | { |
| 255 | } | 257 | } |
| 256 | 258 | ||
| 257 | int iommu_attach_group(struct iommu_domain *domain, struct iommu_group *group) | 259 | static inline int iommu_attach_group(struct iommu_domain *domain, |
| 260 | struct iommu_group *group) | ||
| 258 | { | 261 | { |
| 259 | return -ENODEV; | 262 | return -ENODEV; |
| 260 | } | 263 | } |
| 261 | 264 | ||
| 262 | void iommu_detach_group(struct iommu_domain *domain, struct iommu_group *group) | 265 | static inline void iommu_detach_group(struct iommu_domain *domain, |
| 266 | struct iommu_group *group) | ||
| 263 | { | 267 | { |
| 264 | } | 268 | } |
| 265 | 269 | ||
| 266 | struct iommu_group *iommu_group_alloc(void) | 270 | static inline struct iommu_group *iommu_group_alloc(void) |
| 267 | { | 271 | { |
| 268 | return ERR_PTR(-ENODEV); | 272 | return ERR_PTR(-ENODEV); |
| 269 | } | 273 | } |
| 270 | 274 | ||
| 271 | void *iommu_group_get_iommudata(struct iommu_group *group) | 275 | static inline void *iommu_group_get_iommudata(struct iommu_group *group) |
| 272 | { | 276 | { |
| 273 | return NULL; | 277 | return NULL; |
| 274 | } | 278 | } |
| 275 | 279 | ||
| 276 | void iommu_group_set_iommudata(struct iommu_group *group, void *iommu_data, | 280 | static inline void iommu_group_set_iommudata(struct iommu_group *group, |
| 277 | void (*release)(void *iommu_data)) | 281 | void *iommu_data, |
| 282 | void (*release)(void *iommu_data)) | ||
| 278 | { | 283 | { |
| 279 | } | 284 | } |
| 280 | 285 | ||
| 281 | int iommu_group_set_name(struct iommu_group *group, const char *name) | 286 | static inline int iommu_group_set_name(struct iommu_group *group, |
| 287 | const char *name) | ||
| 282 | { | 288 | { |
| 283 | return -ENODEV; | 289 | return -ENODEV; |
| 284 | } | 290 | } |
| 285 | 291 | ||
| 286 | int iommu_group_add_device(struct iommu_group *group, struct device *dev) | 292 | static inline int iommu_group_add_device(struct iommu_group *group, |
| 293 | struct device *dev) | ||
| 287 | { | 294 | { |
| 288 | return -ENODEV; | 295 | return -ENODEV; |
| 289 | } | 296 | } |
| 290 | 297 | ||
| 291 | void iommu_group_remove_device(struct device *dev) | 298 | static inline void iommu_group_remove_device(struct device *dev) |
| 292 | { | 299 | { |
| 293 | } | 300 | } |
| 294 | 301 | ||
| 295 | int iommu_group_for_each_dev(struct iommu_group *group, void *data, | 302 | static inline int iommu_group_for_each_dev(struct iommu_group *group, |
| 296 | int (*fn)(struct device *, void *)) | 303 | void *data, |
| 304 | int (*fn)(struct device *, void *)) | ||
| 297 | { | 305 | { |
| 298 | return -ENODEV; | 306 | return -ENODEV; |
| 299 | } | 307 | } |
| 300 | 308 | ||
| 301 | struct iommu_group *iommu_group_get(struct device *dev) | 309 | static inline struct iommu_group *iommu_group_get(struct device *dev) |
| 302 | { | 310 | { |
| 303 | return NULL; | 311 | return NULL; |
| 304 | } | 312 | } |
| 305 | 313 | ||
| 306 | void iommu_group_put(struct iommu_group *group) | 314 | static inline void iommu_group_put(struct iommu_group *group) |
| 307 | { | 315 | { |
| 308 | } | 316 | } |
| 309 | 317 | ||
| 310 | int iommu_group_register_notifier(struct iommu_group *group, | 318 | static inline int iommu_group_register_notifier(struct iommu_group *group, |
| 311 | struct notifier_block *nb) | 319 | struct notifier_block *nb) |
| 312 | { | 320 | { |
| 313 | return -ENODEV; | 321 | return -ENODEV; |
| 314 | } | 322 | } |
| 315 | 323 | ||
| 316 | int iommu_group_unregister_notifier(struct iommu_group *group, | 324 | static inline int iommu_group_unregister_notifier(struct iommu_group *group, |
| 317 | struct notifier_block *nb) | 325 | struct notifier_block *nb) |
| 318 | { | 326 | { |
| 319 | return 0; | 327 | return 0; |
| 320 | } | 328 | } |
| 321 | 329 | ||
| 322 | int iommu_group_id(struct iommu_group *group) | 330 | static inline int iommu_group_id(struct iommu_group *group) |
| 323 | { | 331 | { |
| 324 | return -ENODEV; | 332 | return -ENODEV; |
| 325 | } | 333 | } |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 379e433e15e0..879db26ec401 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
| @@ -369,6 +369,7 @@ struct ipv6_pinfo { | |||
| 369 | __u8 rcv_tclass; | 369 | __u8 rcv_tclass; |
| 370 | 370 | ||
| 371 | __u32 dst_cookie; | 371 | __u32 dst_cookie; |
| 372 | __u32 rx_dst_cookie; | ||
| 372 | 373 | ||
| 373 | struct ipv6_mc_socklist __rcu *ipv6_mc_list; | 374 | struct ipv6_mc_socklist __rcu *ipv6_mc_list; |
| 374 | struct ipv6_ac_socklist *ipv6_ac_list; | 375 | struct ipv6_ac_socklist *ipv6_ac_list; |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 553fb66da130..216b0ba109d7 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -349,6 +349,7 @@ enum { | |||
| 349 | IRQCHIP_MASK_ON_SUSPEND = (1 << 2), | 349 | IRQCHIP_MASK_ON_SUSPEND = (1 << 2), |
| 350 | IRQCHIP_ONOFFLINE_ENABLED = (1 << 3), | 350 | IRQCHIP_ONOFFLINE_ENABLED = (1 << 3), |
| 351 | IRQCHIP_SKIP_SET_WAKE = (1 << 4), | 351 | IRQCHIP_SKIP_SET_WAKE = (1 << 4), |
| 352 | IRQCHIP_ONESHOT_SAFE = (1 << 5), | ||
| 352 | }; | 353 | }; |
| 353 | 354 | ||
| 354 | /* This include will go away once we isolated irq_desc usage to core code */ | 355 | /* This include will go away once we isolated irq_desc usage to core code */ |
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index f1e2527006bd..9a323d12de1c 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h | |||
| @@ -39,7 +39,6 @@ struct module; | |||
| 39 | */ | 39 | */ |
| 40 | struct irq_desc { | 40 | struct irq_desc { |
| 41 | struct irq_data irq_data; | 41 | struct irq_data irq_data; |
| 42 | struct timer_rand_state *timer_rand_state; | ||
| 43 | unsigned int __percpu *kstat_irqs; | 42 | unsigned int __percpu *kstat_irqs; |
| 44 | irq_flow_handler_t handle_irq; | 43 | irq_flow_handler_t handle_irq; |
| 45 | #ifdef CONFIG_IRQ_PREFLOW_FASTEOI | 44 | #ifdef CONFIG_IRQ_PREFLOW_FASTEOI |
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 5abb533eb8eb..0d5b17bf5e51 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h | |||
| @@ -112,6 +112,11 @@ struct irq_domain { | |||
| 112 | }; | 112 | }; |
| 113 | 113 | ||
| 114 | #ifdef CONFIG_IRQ_DOMAIN | 114 | #ifdef CONFIG_IRQ_DOMAIN |
| 115 | struct irq_domain *irq_domain_add_simple(struct device_node *of_node, | ||
| 116 | unsigned int size, | ||
| 117 | unsigned int first_irq, | ||
| 118 | const struct irq_domain_ops *ops, | ||
| 119 | void *host_data); | ||
| 115 | struct irq_domain *irq_domain_add_legacy(struct device_node *of_node, | 120 | struct irq_domain *irq_domain_add_legacy(struct device_node *of_node, |
| 116 | unsigned int size, | 121 | unsigned int size, |
| 117 | unsigned int first_irq, | 122 | unsigned int first_irq, |
| @@ -144,16 +149,31 @@ static inline struct irq_domain *irq_domain_add_legacy_isa( | |||
| 144 | 149 | ||
| 145 | extern void irq_domain_remove(struct irq_domain *host); | 150 | extern void irq_domain_remove(struct irq_domain *host); |
| 146 | 151 | ||
| 152 | extern int irq_domain_associate_many(struct irq_domain *domain, | ||
| 153 | unsigned int irq_base, | ||
| 154 | irq_hw_number_t hwirq_base, int count); | ||
| 155 | static inline int irq_domain_associate(struct irq_domain *domain, unsigned int irq, | ||
| 156 | irq_hw_number_t hwirq) | ||
| 157 | { | ||
| 158 | return irq_domain_associate_many(domain, irq, hwirq, 1); | ||
| 159 | } | ||
| 160 | |||
| 147 | extern unsigned int irq_create_mapping(struct irq_domain *host, | 161 | extern unsigned int irq_create_mapping(struct irq_domain *host, |
| 148 | irq_hw_number_t hwirq); | 162 | irq_hw_number_t hwirq); |
| 149 | extern void irq_dispose_mapping(unsigned int virq); | 163 | extern void irq_dispose_mapping(unsigned int virq); |
| 150 | extern unsigned int irq_find_mapping(struct irq_domain *host, | 164 | extern unsigned int irq_find_mapping(struct irq_domain *host, |
| 151 | irq_hw_number_t hwirq); | 165 | irq_hw_number_t hwirq); |
| 152 | extern unsigned int irq_create_direct_mapping(struct irq_domain *host); | 166 | extern unsigned int irq_create_direct_mapping(struct irq_domain *host); |
| 153 | extern void irq_radix_revmap_insert(struct irq_domain *host, unsigned int virq, | 167 | extern int irq_create_strict_mappings(struct irq_domain *domain, |
| 154 | irq_hw_number_t hwirq); | 168 | unsigned int irq_base, |
| 155 | extern unsigned int irq_radix_revmap_lookup(struct irq_domain *host, | 169 | irq_hw_number_t hwirq_base, int count); |
| 156 | irq_hw_number_t hwirq); | 170 | |
| 171 | static inline int irq_create_identity_mapping(struct irq_domain *host, | ||
| 172 | irq_hw_number_t hwirq) | ||
| 173 | { | ||
| 174 | return irq_create_strict_mappings(host, hwirq, hwirq, 1); | ||
| 175 | } | ||
| 176 | |||
| 157 | extern unsigned int irq_linear_revmap(struct irq_domain *host, | 177 | extern unsigned int irq_linear_revmap(struct irq_domain *host, |
| 158 | irq_hw_number_t hwirq); | 178 | irq_hw_number_t hwirq); |
| 159 | 179 | ||
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index f334c7fab967..3efc43f3f162 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
| @@ -1125,6 +1125,7 @@ extern int jbd2_journal_destroy (journal_t *); | |||
| 1125 | extern int jbd2_journal_recover (journal_t *journal); | 1125 | extern int jbd2_journal_recover (journal_t *journal); |
| 1126 | extern int jbd2_journal_wipe (journal_t *, int); | 1126 | extern int jbd2_journal_wipe (journal_t *, int); |
| 1127 | extern int jbd2_journal_skip_recovery (journal_t *); | 1127 | extern int jbd2_journal_skip_recovery (journal_t *); |
| 1128 | extern void jbd2_journal_update_sb_errno(journal_t *); | ||
| 1128 | extern void jbd2_journal_update_sb_log_tail (journal_t *, tid_t, | 1129 | extern void jbd2_journal_update_sb_log_tail (journal_t *, tid_t, |
| 1129 | unsigned long, int); | 1130 | unsigned long, int); |
| 1130 | extern void __jbd2_journal_abort_hard (journal_t *); | 1131 | extern void __jbd2_journal_abort_hard (journal_t *); |
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 265e2c3cbd1c..82680541576d 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
| @@ -39,9 +39,6 @@ | |||
| 39 | # error Invalid value of HZ. | 39 | # error Invalid value of HZ. |
| 40 | #endif | 40 | #endif |
| 41 | 41 | ||
| 42 | /* LATCH is used in the interval timer and ftape setup. */ | ||
| 43 | #define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ | ||
| 44 | |||
| 45 | /* Suppose we want to divide two numbers NOM and DEN: NOM/DEN, then we can | 42 | /* Suppose we want to divide two numbers NOM and DEN: NOM/DEN, then we can |
| 46 | * improve accuracy by shifting LSH bits, hence calculating: | 43 | * improve accuracy by shifting LSH bits, hence calculating: |
| 47 | * (NOM << LSH) / DEN | 44 | * (NOM << LSH) / DEN |
| @@ -54,18 +51,30 @@ | |||
| 54 | #define SH_DIV(NOM,DEN,LSH) ( (((NOM) / (DEN)) << (LSH)) \ | 51 | #define SH_DIV(NOM,DEN,LSH) ( (((NOM) / (DEN)) << (LSH)) \ |
| 55 | + ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN)) | 52 | + ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN)) |
| 56 | 53 | ||
| 57 | /* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */ | 54 | #ifdef CLOCK_TICK_RATE |
| 58 | #define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8)) | 55 | /* LATCH is used in the interval timer and ftape setup. */ |
| 56 | # define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ | ||
| 57 | |||
| 58 | /* | ||
| 59 | * HZ is the requested value. However the CLOCK_TICK_RATE may not allow | ||
| 60 | * for exactly HZ. So SHIFTED_HZ is high res HZ ("<< 8" is for accuracy) | ||
| 61 | */ | ||
| 62 | # define SHIFTED_HZ (SH_DIV(CLOCK_TICK_RATE, LATCH, 8)) | ||
| 63 | #else | ||
| 64 | # define SHIFTED_HZ (HZ << 8) | ||
| 65 | #endif | ||
| 59 | 66 | ||
| 60 | /* TICK_NSEC is the time between ticks in nsec assuming real ACTHZ */ | 67 | /* TICK_NSEC is the time between ticks in nsec assuming SHIFTED_HZ */ |
| 61 | #define TICK_NSEC (SH_DIV (1000000UL * 1000, ACTHZ, 8)) | 68 | #define TICK_NSEC (SH_DIV(1000000UL * 1000, SHIFTED_HZ, 8)) |
| 62 | 69 | ||
| 63 | /* TICK_USEC is the time between ticks in usec assuming fake USER_HZ */ | 70 | /* TICK_USEC is the time between ticks in usec assuming fake USER_HZ */ |
| 64 | #define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ) | 71 | #define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ) |
| 65 | 72 | ||
| 66 | /* TICK_USEC_TO_NSEC is the time between ticks in nsec assuming real ACTHZ and */ | 73 | /* |
| 67 | /* a value TUSEC for TICK_USEC (can be set bij adjtimex) */ | 74 | * TICK_USEC_TO_NSEC is the time between ticks in nsec assuming SHIFTED_HZ and |
| 68 | #define TICK_USEC_TO_NSEC(TUSEC) (SH_DIV (TUSEC * USER_HZ * 1000, ACTHZ, 8)) | 75 | * a value TUSEC for TICK_USEC (can be set bij adjtimex) |
| 76 | */ | ||
| 77 | #define TICK_USEC_TO_NSEC(TUSEC) (SH_DIV(TUSEC * USER_HZ * 1000, SHIFTED_HZ, 8)) | ||
| 69 | 78 | ||
| 70 | /* some arch's have a small-data section that can be accessed register-relative | 79 | /* some arch's have a small-data section that can be accessed register-relative |
| 71 | * but that can only take up to, say, 4-byte variables. jiffies being part of | 80 | * but that can only take up to, say, 4-byte variables. jiffies being part of |
diff --git a/include/linux/kdb.h b/include/linux/kdb.h index 064725854db8..42d9e863a313 100644 --- a/include/linux/kdb.h +++ b/include/linux/kdb.h | |||
| @@ -75,8 +75,6 @@ extern const char *kdb_diemsg; | |||
| 75 | #define KDB_FLAG_CATASTROPHIC (1 << 1) /* A catastrophic event has occurred */ | 75 | #define KDB_FLAG_CATASTROPHIC (1 << 1) /* A catastrophic event has occurred */ |
| 76 | #define KDB_FLAG_CMD_INTERRUPT (1 << 2) /* Previous command was interrupted */ | 76 | #define KDB_FLAG_CMD_INTERRUPT (1 << 2) /* Previous command was interrupted */ |
| 77 | #define KDB_FLAG_NOIPI (1 << 3) /* Do not send IPIs */ | 77 | #define KDB_FLAG_NOIPI (1 << 3) /* Do not send IPIs */ |
| 78 | #define KDB_FLAG_ONLY_DO_DUMP (1 << 4) /* Only do a dump, used when | ||
| 79 | * kdb is off */ | ||
| 80 | #define KDB_FLAG_NO_CONSOLE (1 << 5) /* No console is available, | 78 | #define KDB_FLAG_NO_CONSOLE (1 << 5) /* No console is available, |
| 81 | * kdb is disabled */ | 79 | * kdb is disabled */ |
| 82 | #define KDB_FLAG_NO_VT_CONSOLE (1 << 6) /* No VT console is available, do | 80 | #define KDB_FLAG_NO_VT_CONSOLE (1 << 6) /* No VT console is available, do |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 604382143bcf..2451f1f7a1d9 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -82,10 +82,18 @@ | |||
| 82 | __x - (__x % (y)); \ | 82 | __x - (__x % (y)); \ |
| 83 | } \ | 83 | } \ |
| 84 | ) | 84 | ) |
| 85 | |||
| 86 | /* | ||
| 87 | * Divide positive or negative dividend by positive divisor and round | ||
| 88 | * to closest integer. Result is undefined for negative divisors. | ||
| 89 | */ | ||
| 85 | #define DIV_ROUND_CLOSEST(x, divisor)( \ | 90 | #define DIV_ROUND_CLOSEST(x, divisor)( \ |
| 86 | { \ | 91 | { \ |
| 87 | typeof(divisor) __divisor = divisor; \ | 92 | typeof(x) __x = x; \ |
| 88 | (((x) + ((__divisor) / 2)) / (__divisor)); \ | 93 | typeof(divisor) __d = divisor; \ |
| 94 | (((typeof(x))-1) > 0 || (__x) > 0) ? \ | ||
| 95 | (((__x) + ((__d) / 2)) / (__d)) : \ | ||
| 96 | (((__x) - ((__d) / 2)) / (__d)); \ | ||
| 89 | } \ | 97 | } \ |
| 90 | ) | 98 | ) |
| 91 | 99 | ||
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index fc615a97e2d3..1e57449395b1 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
| @@ -224,7 +224,7 @@ static inline int kobject_uevent_env(struct kobject *kobj, | |||
| 224 | 224 | ||
| 225 | static inline __printf(2, 3) | 225 | static inline __printf(2, 3) |
| 226 | int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) | 226 | int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) |
| 227 | { return 0; } | 227 | { return -ENOMEM; } |
| 228 | 228 | ||
| 229 | static inline int kobject_action_type(const char *buf, size_t count, | 229 | static inline int kobject_action_type(const char *buf, size_t count, |
| 230 | enum kobject_action *type) | 230 | enum kobject_action *type) |
diff --git a/include/linux/kref.h b/include/linux/kref.h index 9c07dcebded7..65af6887872f 100644 --- a/include/linux/kref.h +++ b/include/linux/kref.h | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/bug.h> | 18 | #include <linux/bug.h> |
| 19 | #include <linux/atomic.h> | 19 | #include <linux/atomic.h> |
| 20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
| 21 | #include <linux/mutex.h> | ||
| 21 | 22 | ||
| 22 | struct kref { | 23 | struct kref { |
| 23 | atomic_t refcount; | 24 | atomic_t refcount; |
| @@ -93,4 +94,21 @@ static inline int kref_put(struct kref *kref, void (*release)(struct kref *kref) | |||
| 93 | { | 94 | { |
| 94 | return kref_sub(kref, 1, release); | 95 | return kref_sub(kref, 1, release); |
| 95 | } | 96 | } |
| 97 | |||
| 98 | static inline int kref_put_mutex(struct kref *kref, | ||
| 99 | void (*release)(struct kref *kref), | ||
| 100 | struct mutex *lock) | ||
| 101 | { | ||
| 102 | WARN_ON(release == NULL); | ||
| 103 | if (unlikely(!atomic_add_unless(&kref->refcount, -1, 1))) { | ||
| 104 | mutex_lock(lock); | ||
| 105 | if (unlikely(!atomic_dec_and_test(&kref->refcount))) { | ||
| 106 | mutex_unlock(lock); | ||
| 107 | return 0; | ||
| 108 | } | ||
| 109 | release(kref); | ||
| 110 | return 1; | ||
| 111 | } | ||
| 112 | return 0; | ||
| 113 | } | ||
| 96 | #endif /* _KREF_H_ */ | 114 | #endif /* _KREF_H_ */ |
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 603bec2913b0..06177ba10a16 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
| @@ -58,13 +58,6 @@ union ktime { | |||
| 58 | 58 | ||
| 59 | typedef union ktime ktime_t; /* Kill this */ | 59 | typedef union ktime ktime_t; /* Kill this */ |
| 60 | 60 | ||
| 61 | #define KTIME_MAX ((s64)~((u64)1 << 63)) | ||
| 62 | #if (BITS_PER_LONG == 64) | ||
| 63 | # define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) | ||
| 64 | #else | ||
| 65 | # define KTIME_SEC_MAX LONG_MAX | ||
| 66 | #endif | ||
| 67 | |||
| 68 | /* | 61 | /* |
| 69 | * ktime_t definitions when using the 64-bit scalar representation: | 62 | * ktime_t definitions when using the 64-bit scalar representation: |
| 70 | */ | 63 | */ |
diff --git a/include/linux/mISDNhw.h b/include/linux/mISDNhw.h index d0752eca9b44..9d96d5d4dfed 100644 --- a/include/linux/mISDNhw.h +++ b/include/linux/mISDNhw.h | |||
| @@ -183,7 +183,7 @@ extern int mISDN_initbchannel(struct bchannel *, unsigned short, | |||
| 183 | unsigned short); | 183 | unsigned short); |
| 184 | extern int mISDN_freedchannel(struct dchannel *); | 184 | extern int mISDN_freedchannel(struct dchannel *); |
| 185 | extern void mISDN_clear_bchannel(struct bchannel *); | 185 | extern void mISDN_clear_bchannel(struct bchannel *); |
| 186 | extern int mISDN_freebchannel(struct bchannel *); | 186 | extern void mISDN_freebchannel(struct bchannel *); |
| 187 | extern int mISDN_ctrl_bchannel(struct bchannel *, struct mISDN_ctrl_req *); | 187 | extern int mISDN_ctrl_bchannel(struct bchannel *, struct mISDN_ctrl_req *); |
| 188 | extern void queue_ch_frame(struct mISDNchannel *, u_int, | 188 | extern void queue_ch_frame(struct mISDNchannel *, u_int, |
| 189 | int, struct sk_buff *); | 189 | int, struct sk_buff *); |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 83e7ba90d6e5..8d9489fdab2e 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
| @@ -38,7 +38,7 @@ struct mem_cgroup_reclaim_cookie { | |||
| 38 | unsigned int generation; | 38 | unsigned int generation; |
| 39 | }; | 39 | }; |
| 40 | 40 | ||
| 41 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 41 | #ifdef CONFIG_MEMCG |
| 42 | /* | 42 | /* |
| 43 | * All "charge" functions with gfp_mask should use GFP_KERNEL or | 43 | * All "charge" functions with gfp_mask should use GFP_KERNEL or |
| 44 | * (gfp_mask & GFP_RECLAIM_MASK). In current implementatin, memcg doesn't | 44 | * (gfp_mask & GFP_RECLAIM_MASK). In current implementatin, memcg doesn't |
| @@ -72,8 +72,6 @@ extern void mem_cgroup_uncharge_end(void); | |||
| 72 | extern void mem_cgroup_uncharge_page(struct page *page); | 72 | extern void mem_cgroup_uncharge_page(struct page *page); |
| 73 | extern void mem_cgroup_uncharge_cache_page(struct page *page); | 73 | extern void mem_cgroup_uncharge_cache_page(struct page *page); |
| 74 | 74 | ||
| 75 | extern void mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask, | ||
| 76 | int order); | ||
| 77 | bool __mem_cgroup_same_or_subtree(const struct mem_cgroup *root_memcg, | 75 | bool __mem_cgroup_same_or_subtree(const struct mem_cgroup *root_memcg, |
| 78 | struct mem_cgroup *memcg); | 76 | struct mem_cgroup *memcg); |
| 79 | int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *memcg); | 77 | int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *memcg); |
| @@ -100,9 +98,9 @@ int mm_match_cgroup(const struct mm_struct *mm, const struct mem_cgroup *cgroup) | |||
| 100 | 98 | ||
| 101 | extern struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *memcg); | 99 | extern struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *memcg); |
| 102 | 100 | ||
| 103 | extern int | 101 | extern void |
| 104 | mem_cgroup_prepare_migration(struct page *page, | 102 | mem_cgroup_prepare_migration(struct page *page, struct page *newpage, |
| 105 | struct page *newpage, struct mem_cgroup **memcgp, gfp_t gfp_mask); | 103 | struct mem_cgroup **memcgp); |
| 106 | extern void mem_cgroup_end_migration(struct mem_cgroup *memcg, | 104 | extern void mem_cgroup_end_migration(struct mem_cgroup *memcg, |
| 107 | struct page *oldpage, struct page *newpage, bool migration_ok); | 105 | struct page *oldpage, struct page *newpage, bool migration_ok); |
| 108 | 106 | ||
| @@ -124,7 +122,7 @@ extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, | |||
| 124 | extern void mem_cgroup_replace_page_cache(struct page *oldpage, | 122 | extern void mem_cgroup_replace_page_cache(struct page *oldpage, |
| 125 | struct page *newpage); | 123 | struct page *newpage); |
| 126 | 124 | ||
| 127 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | 125 | #ifdef CONFIG_MEMCG_SWAP |
| 128 | extern int do_swap_account; | 126 | extern int do_swap_account; |
| 129 | #endif | 127 | #endif |
| 130 | 128 | ||
| @@ -182,7 +180,6 @@ static inline void mem_cgroup_dec_page_stat(struct page *page, | |||
| 182 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, | 180 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, |
| 183 | gfp_t gfp_mask, | 181 | gfp_t gfp_mask, |
| 184 | unsigned long *total_scanned); | 182 | unsigned long *total_scanned); |
| 185 | u64 mem_cgroup_get_limit(struct mem_cgroup *memcg); | ||
| 186 | 183 | ||
| 187 | void mem_cgroup_count_vm_event(struct mm_struct *mm, enum vm_event_item idx); | 184 | void mem_cgroup_count_vm_event(struct mm_struct *mm, enum vm_event_item idx); |
| 188 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 185 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
| @@ -193,7 +190,7 @@ void mem_cgroup_split_huge_fixup(struct page *head); | |||
| 193 | bool mem_cgroup_bad_page_check(struct page *page); | 190 | bool mem_cgroup_bad_page_check(struct page *page); |
| 194 | void mem_cgroup_print_bad_page(struct page *page); | 191 | void mem_cgroup_print_bad_page(struct page *page); |
| 195 | #endif | 192 | #endif |
| 196 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ | 193 | #else /* CONFIG_MEMCG */ |
| 197 | struct mem_cgroup; | 194 | struct mem_cgroup; |
| 198 | 195 | ||
| 199 | static inline int mem_cgroup_newpage_charge(struct page *page, | 196 | static inline int mem_cgroup_newpage_charge(struct page *page, |
| @@ -279,11 +276,10 @@ static inline struct cgroup_subsys_state | |||
| 279 | return NULL; | 276 | return NULL; |
| 280 | } | 277 | } |
| 281 | 278 | ||
| 282 | static inline int | 279 | static inline void |
| 283 | mem_cgroup_prepare_migration(struct page *page, struct page *newpage, | 280 | mem_cgroup_prepare_migration(struct page *page, struct page *newpage, |
| 284 | struct mem_cgroup **memcgp, gfp_t gfp_mask) | 281 | struct mem_cgroup **memcgp) |
| 285 | { | 282 | { |
| 286 | return 0; | ||
| 287 | } | 283 | } |
| 288 | 284 | ||
| 289 | static inline void mem_cgroup_end_migration(struct mem_cgroup *memcg, | 285 | static inline void mem_cgroup_end_migration(struct mem_cgroup *memcg, |
| @@ -366,12 +362,6 @@ unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, | |||
| 366 | return 0; | 362 | return 0; |
| 367 | } | 363 | } |
| 368 | 364 | ||
| 369 | static inline | ||
| 370 | u64 mem_cgroup_get_limit(struct mem_cgroup *memcg) | ||
| 371 | { | ||
| 372 | return 0; | ||
| 373 | } | ||
| 374 | |||
| 375 | static inline void mem_cgroup_split_huge_fixup(struct page *head) | 365 | static inline void mem_cgroup_split_huge_fixup(struct page *head) |
| 376 | { | 366 | { |
| 377 | } | 367 | } |
| @@ -384,9 +374,9 @@ static inline void mem_cgroup_replace_page_cache(struct page *oldpage, | |||
| 384 | struct page *newpage) | 374 | struct page *newpage) |
| 385 | { | 375 | { |
| 386 | } | 376 | } |
| 387 | #endif /* CONFIG_CGROUP_MEM_RES_CTLR */ | 377 | #endif /* CONFIG_MEMCG */ |
| 388 | 378 | ||
| 389 | #if !defined(CONFIG_CGROUP_MEM_RES_CTLR) || !defined(CONFIG_DEBUG_VM) | 379 | #if !defined(CONFIG_MEMCG) || !defined(CONFIG_DEBUG_VM) |
| 390 | static inline bool | 380 | static inline bool |
| 391 | mem_cgroup_bad_page_check(struct page *page) | 381 | mem_cgroup_bad_page_check(struct page *page) |
| 392 | { | 382 | { |
| @@ -406,7 +396,7 @@ enum { | |||
| 406 | }; | 396 | }; |
| 407 | 397 | ||
| 408 | struct sock; | 398 | struct sock; |
| 409 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM | 399 | #ifdef CONFIG_MEMCG_KMEM |
| 410 | void sock_update_memcg(struct sock *sk); | 400 | void sock_update_memcg(struct sock *sk); |
| 411 | void sock_release_memcg(struct sock *sk); | 401 | void sock_release_memcg(struct sock *sk); |
| 412 | #else | 402 | #else |
| @@ -416,6 +406,6 @@ static inline void sock_update_memcg(struct sock *sk) | |||
| 416 | static inline void sock_release_memcg(struct sock *sk) | 406 | static inline void sock_release_memcg(struct sock *sk) |
| 417 | { | 407 | { |
| 418 | } | 408 | } |
| 419 | #endif /* CONFIG_CGROUP_MEM_RES_CTLR_KMEM */ | 409 | #endif /* CONFIG_MEMCG_KMEM */ |
| 420 | #endif /* _LINUX_MEMCONTROL_H */ | 410 | #endif /* _LINUX_MEMCONTROL_H */ |
| 421 | 411 | ||
diff --git a/include/linux/memory.h b/include/linux/memory.h index 1ac7f6e405f9..ff9a9f8e0ed9 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | #include <linux/compiler.h> | 19 | #include <linux/compiler.h> |
| 20 | #include <linux/mutex.h> | 20 | #include <linux/mutex.h> |
| 21 | 21 | ||
| 22 | #define MIN_MEMORY_BLOCK_SIZE (1 << SECTION_SIZE_BITS) | 22 | #define MIN_MEMORY_BLOCK_SIZE (1UL << SECTION_SIZE_BITS) |
| 23 | 23 | ||
| 24 | struct memory_block { | 24 | struct memory_block { |
| 25 | unsigned long start_section_nr; | 25 | unsigned long start_section_nr; |
diff --git a/include/linux/mempool.h b/include/linux/mempool.h index 7c08052e3321..39ed62ab5b8a 100644 --- a/include/linux/mempool.h +++ b/include/linux/mempool.h | |||
| @@ -26,7 +26,8 @@ typedef struct mempool_s { | |||
| 26 | extern mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn, | 26 | extern mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn, |
| 27 | mempool_free_t *free_fn, void *pool_data); | 27 | mempool_free_t *free_fn, void *pool_data); |
| 28 | extern mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn, | 28 | extern mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn, |
| 29 | mempool_free_t *free_fn, void *pool_data, int nid); | 29 | mempool_free_t *free_fn, void *pool_data, |
| 30 | gfp_t gfp_mask, int nid); | ||
| 30 | 31 | ||
| 31 | extern int mempool_resize(mempool_t *pool, int new_min_nr, gfp_t gfp_mask); | 32 | extern int mempool_resize(mempool_t *pool, int new_min_nr, gfp_t gfp_mask); |
| 32 | extern void mempool_destroy(mempool_t *pool); | 33 | extern void mempool_destroy(mempool_t *pool); |
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index 3a8435a8058f..cebe97ee98b8 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h | |||
| @@ -16,6 +16,8 @@ | |||
| 16 | 16 | ||
| 17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
| 18 | 18 | ||
| 19 | struct irq_domain; | ||
| 20 | |||
| 19 | /* | 21 | /* |
| 20 | * This struct describes the MFD part ("cell"). | 22 | * This struct describes the MFD part ("cell"). |
| 21 | * After registration the copy of this structure will become the platform data | 23 | * After registration the copy of this structure will become the platform data |
| @@ -98,7 +100,7 @@ static inline const struct mfd_cell *mfd_get_cell(struct platform_device *pdev) | |||
| 98 | extern int mfd_add_devices(struct device *parent, int id, | 100 | extern int mfd_add_devices(struct device *parent, int id, |
| 99 | struct mfd_cell *cells, int n_devs, | 101 | struct mfd_cell *cells, int n_devs, |
| 100 | struct resource *mem_base, | 102 | struct resource *mem_base, |
| 101 | int irq_base); | 103 | int irq_base, struct irq_domain *irq_domain); |
| 102 | 104 | ||
| 103 | extern void mfd_remove_devices(struct device *parent); | 105 | extern void mfd_remove_devices(struct device *parent); |
| 104 | 106 | ||
diff --git a/include/linux/mfd/ezx-pcap.h b/include/linux/mfd/ezx-pcap.h index 40c372165f3e..32a1b5cfeba1 100644 --- a/include/linux/mfd/ezx-pcap.h +++ b/include/linux/mfd/ezx-pcap.h | |||
| @@ -16,6 +16,7 @@ struct pcap_subdev { | |||
| 16 | struct pcap_platform_data { | 16 | struct pcap_platform_data { |
| 17 | unsigned int irq_base; | 17 | unsigned int irq_base; |
| 18 | unsigned int config; | 18 | unsigned int config; |
| 19 | int gpio; | ||
| 19 | void (*init) (void *); /* board specific init */ | 20 | void (*init) (void *); /* board specific init */ |
| 20 | int num_subdevs; | 21 | int num_subdevs; |
| 21 | struct pcap_subdev *subdevs; | 22 | struct pcap_subdev *subdevs; |
diff --git a/include/linux/mfd/tps65217.h b/include/linux/mfd/tps65217.h index 12c06870829a..7cd83d826ed8 100644 --- a/include/linux/mfd/tps65217.h +++ b/include/linux/mfd/tps65217.h | |||
| @@ -22,6 +22,9 @@ | |||
| 22 | #include <linux/regulator/driver.h> | 22 | #include <linux/regulator/driver.h> |
| 23 | #include <linux/regulator/machine.h> | 23 | #include <linux/regulator/machine.h> |
| 24 | 24 | ||
| 25 | /* TPS chip id list */ | ||
| 26 | #define TPS65217 0xF0 | ||
| 27 | |||
| 25 | /* I2C ID for TPS65217 part */ | 28 | /* I2C ID for TPS65217 part */ |
| 26 | #define TPS65217_I2C_ID 0x24 | 29 | #define TPS65217_I2C_ID 0x24 |
| 27 | 30 | ||
| @@ -248,13 +251,11 @@ struct tps_info { | |||
| 248 | struct tps65217 { | 251 | struct tps65217 { |
| 249 | struct device *dev; | 252 | struct device *dev; |
| 250 | struct tps65217_board *pdata; | 253 | struct tps65217_board *pdata; |
| 254 | unsigned int id; | ||
| 251 | struct regulator_desc desc[TPS65217_NUM_REGULATOR]; | 255 | struct regulator_desc desc[TPS65217_NUM_REGULATOR]; |
| 252 | struct regulator_dev *rdev[TPS65217_NUM_REGULATOR]; | 256 | struct regulator_dev *rdev[TPS65217_NUM_REGULATOR]; |
| 253 | struct tps_info *info[TPS65217_NUM_REGULATOR]; | 257 | struct tps_info *info[TPS65217_NUM_REGULATOR]; |
| 254 | struct regmap *regmap; | 258 | struct regmap *regmap; |
| 255 | |||
| 256 | /* Client devices */ | ||
| 257 | struct platform_device *regulator_pdev[TPS65217_NUM_REGULATOR]; | ||
| 258 | }; | 259 | }; |
| 259 | 260 | ||
| 260 | static inline struct tps65217 *dev_to_tps65217(struct device *dev) | 261 | static inline struct tps65217 *dev_to_tps65217(struct device *dev) |
| @@ -262,6 +263,11 @@ static inline struct tps65217 *dev_to_tps65217(struct device *dev) | |||
| 262 | return dev_get_drvdata(dev); | 263 | return dev_get_drvdata(dev); |
| 263 | } | 264 | } |
| 264 | 265 | ||
| 266 | static inline int tps65217_chip_id(struct tps65217 *tps65217) | ||
| 267 | { | ||
| 268 | return tps65217->id; | ||
| 269 | } | ||
| 270 | |||
| 265 | int tps65217_reg_read(struct tps65217 *tps, unsigned int reg, | 271 | int tps65217_reg_read(struct tps65217 *tps, unsigned int reg, |
| 266 | unsigned int *val); | 272 | unsigned int *val); |
| 267 | int tps65217_reg_write(struct tps65217 *tps, unsigned int reg, | 273 | int tps65217_reg_write(struct tps65217 *tps, unsigned int reg, |
diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h index 61f0905bdc48..de201203bc7c 100644 --- a/include/linux/micrel_phy.h +++ b/include/linux/micrel_phy.h | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | /* | ||
| 2 | * include/linux/micrel_phy.h | ||
| 3 | * | ||
| 4 | * Micrel PHY IDs | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify it | ||
| 7 | * under the terms of the GNU General Public License as published by the | ||
| 8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 9 | * option) any later version. | ||
| 10 | * | ||
| 11 | */ | ||
| 12 | |||
| 1 | #ifndef _MICREL_PHY_H | 13 | #ifndef _MICREL_PHY_H |
| 2 | #define _MICREL_PHY_H | 14 | #define _MICREL_PHY_H |
| 3 | 15 | ||
| @@ -5,10 +17,11 @@ | |||
| 5 | 17 | ||
| 6 | #define PHY_ID_KSZ9021 0x00221610 | 18 | #define PHY_ID_KSZ9021 0x00221610 |
| 7 | #define PHY_ID_KS8737 0x00221720 | 19 | #define PHY_ID_KS8737 0x00221720 |
| 8 | #define PHY_ID_KS8041 0x00221510 | 20 | #define PHY_ID_KSZ8021 0x00221555 |
| 9 | #define PHY_ID_KS8051 0x00221550 | 21 | #define PHY_ID_KSZ8041 0x00221510 |
| 22 | #define PHY_ID_KSZ8051 0x00221550 | ||
| 10 | /* both for ks8001 Rev. A/B, and for ks8721 Rev 3. */ | 23 | /* both for ks8001 Rev. A/B, and for ks8721 Rev 3. */ |
| 11 | #define PHY_ID_KS8001 0x0022161A | 24 | #define PHY_ID_KSZ8001 0x0022161A |
| 12 | 25 | ||
| 13 | /* struct phy_device dev_flags definitions */ | 26 | /* struct phy_device dev_flags definitions */ |
| 14 | #define MICREL_PHY_50MHZ_CLK 0x00000001 | 27 | #define MICREL_PHY_50MHZ_CLK 0x00000001 |
diff --git a/include/linux/migrate.h b/include/linux/migrate.h index 855c337b20c3..ce7e6671968b 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h | |||
| @@ -15,7 +15,7 @@ extern int migrate_page(struct address_space *, | |||
| 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, bool offlining, | 16 | unsigned long private, bool offlining, |
| 17 | enum migrate_mode mode); | 17 | enum migrate_mode mode); |
| 18 | extern int migrate_huge_pages(struct list_head *l, new_page_t x, | 18 | extern int migrate_huge_page(struct page *, new_page_t x, |
| 19 | unsigned long private, bool offlining, | 19 | unsigned long private, bool offlining, |
| 20 | enum migrate_mode mode); | 20 | enum migrate_mode mode); |
| 21 | 21 | ||
| @@ -36,7 +36,7 @@ static inline void putback_lru_pages(struct list_head *l) {} | |||
| 36 | static inline int migrate_pages(struct list_head *l, new_page_t x, | 36 | static inline int migrate_pages(struct list_head *l, new_page_t x, |
| 37 | unsigned long private, bool offlining, | 37 | unsigned long private, bool offlining, |
| 38 | enum migrate_mode mode) { return -ENOSYS; } | 38 | enum migrate_mode mode) { return -ENOSYS; } |
| 39 | static inline int migrate_huge_pages(struct list_head *l, new_page_t x, | 39 | static inline int migrate_huge_page(struct page *page, new_page_t x, |
| 40 | unsigned long private, bool offlining, | 40 | unsigned long private, bool offlining, |
| 41 | enum migrate_mode mode) { return -ENOSYS; } | 41 | enum migrate_mode mode) { return -ENOSYS; } |
| 42 | 42 | ||
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index bd6c9fcdf2dd..6e1b0f973a03 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
| @@ -796,6 +796,19 @@ enum mlx4_net_trans_rule_id { | |||
| 796 | MLX4_NET_TRANS_RULE_NUM, /* should be last */ | 796 | MLX4_NET_TRANS_RULE_NUM, /* should be last */ |
| 797 | }; | 797 | }; |
| 798 | 798 | ||
| 799 | extern const u16 __sw_id_hw[]; | ||
| 800 | |||
| 801 | static inline int map_hw_to_sw_id(u16 header_id) | ||
| 802 | { | ||
| 803 | |||
| 804 | int i; | ||
| 805 | for (i = 0; i < MLX4_NET_TRANS_RULE_NUM; i++) { | ||
| 806 | if (header_id == __sw_id_hw[i]) | ||
| 807 | return i; | ||
| 808 | } | ||
| 809 | return -EINVAL; | ||
| 810 | } | ||
| 811 | |||
| 799 | enum mlx4_net_trans_promisc_mode { | 812 | enum mlx4_net_trans_promisc_mode { |
| 800 | MLX4_FS_PROMISC_NONE = 0, | 813 | MLX4_FS_PROMISC_NONE = 0, |
| 801 | MLX4_FS_PROMISC_UPLINK, | 814 | MLX4_FS_PROMISC_UPLINK, |
diff --git a/include/linux/mm.h b/include/linux/mm.h index f9f279cf5b1b..311be906b57d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -805,6 +805,17 @@ static inline void *page_rmapping(struct page *page) | |||
| 805 | return (void *)((unsigned long)page->mapping & ~PAGE_MAPPING_FLAGS); | 805 | return (void *)((unsigned long)page->mapping & ~PAGE_MAPPING_FLAGS); |
| 806 | } | 806 | } |
| 807 | 807 | ||
| 808 | extern struct address_space *__page_file_mapping(struct page *); | ||
| 809 | |||
| 810 | static inline | ||
| 811 | struct address_space *page_file_mapping(struct page *page) | ||
| 812 | { | ||
| 813 | if (unlikely(PageSwapCache(page))) | ||
| 814 | return __page_file_mapping(page); | ||
| 815 | |||
| 816 | return page->mapping; | ||
| 817 | } | ||
| 818 | |||
| 808 | static inline int PageAnon(struct page *page) | 819 | static inline int PageAnon(struct page *page) |
| 809 | { | 820 | { |
| 810 | return ((unsigned long)page->mapping & PAGE_MAPPING_ANON) != 0; | 821 | return ((unsigned long)page->mapping & PAGE_MAPPING_ANON) != 0; |
| @@ -821,6 +832,20 @@ static inline pgoff_t page_index(struct page *page) | |||
| 821 | return page->index; | 832 | return page->index; |
| 822 | } | 833 | } |
| 823 | 834 | ||
| 835 | extern pgoff_t __page_file_index(struct page *page); | ||
| 836 | |||
| 837 | /* | ||
| 838 | * Return the file index of the page. Regular pagecache pages use ->index | ||
| 839 | * whereas swapcache pages use swp_offset(->private) | ||
| 840 | */ | ||
| 841 | static inline pgoff_t page_file_index(struct page *page) | ||
| 842 | { | ||
| 843 | if (unlikely(PageSwapCache(page))) | ||
| 844 | return __page_file_index(page); | ||
| 845 | |||
| 846 | return page->index; | ||
| 847 | } | ||
| 848 | |||
| 824 | /* | 849 | /* |
| 825 | * Return true if this page is mapped into pagetables. | 850 | * Return true if this page is mapped into pagetables. |
| 826 | */ | 851 | */ |
| @@ -994,6 +1019,10 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | |||
| 994 | struct page **pages, struct vm_area_struct **vmas); | 1019 | struct page **pages, struct vm_area_struct **vmas); |
| 995 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, | 1020 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, |
| 996 | struct page **pages); | 1021 | struct page **pages); |
| 1022 | struct kvec; | ||
| 1023 | int get_kernel_pages(const struct kvec *iov, int nr_pages, int write, | ||
| 1024 | struct page **pages); | ||
| 1025 | int get_kernel_page(unsigned long start, int write, struct page **pages); | ||
| 997 | struct page *get_dump_page(unsigned long addr); | 1026 | struct page *get_dump_page(unsigned long addr); |
| 998 | 1027 | ||
| 999 | extern int try_to_release_page(struct page * page, gfp_t gfp_mask); | 1028 | extern int try_to_release_page(struct page * page, gfp_t gfp_mask); |
| @@ -1331,6 +1360,7 @@ void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...); | |||
| 1331 | extern void setup_per_cpu_pageset(void); | 1360 | extern void setup_per_cpu_pageset(void); |
| 1332 | 1361 | ||
| 1333 | extern void zone_pcp_update(struct zone *zone); | 1362 | extern void zone_pcp_update(struct zone *zone); |
| 1363 | extern void zone_pcp_reset(struct zone *zone); | ||
| 1334 | 1364 | ||
| 1335 | /* nommu.c */ | 1365 | /* nommu.c */ |
| 1336 | extern atomic_long_t mmap_pages_allocated; | 1366 | extern atomic_long_t mmap_pages_allocated; |
| @@ -1411,6 +1441,7 @@ extern void truncate_inode_pages_range(struct address_space *, | |||
| 1411 | 1441 | ||
| 1412 | /* generic vm_area_ops exported for stackable file systems */ | 1442 | /* generic vm_area_ops exported for stackable file systems */ |
| 1413 | extern int filemap_fault(struct vm_area_struct *, struct vm_fault *); | 1443 | extern int filemap_fault(struct vm_area_struct *, struct vm_fault *); |
| 1444 | extern int filemap_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf); | ||
| 1414 | 1445 | ||
| 1415 | /* mm/page-writeback.c */ | 1446 | /* mm/page-writeback.c */ |
| 1416 | int write_one_page(struct page *page, int wait); | 1447 | int write_one_page(struct page *page, int wait); |
| @@ -1528,6 +1559,7 @@ void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long); | |||
| 1528 | static inline void vm_stat_account(struct mm_struct *mm, | 1559 | static inline void vm_stat_account(struct mm_struct *mm, |
| 1529 | unsigned long flags, struct file *file, long pages) | 1560 | unsigned long flags, struct file *file, long pages) |
| 1530 | { | 1561 | { |
| 1562 | mm->total_vm += pages; | ||
| 1531 | } | 1563 | } |
| 1532 | #endif /* CONFIG_PROC_FS */ | 1564 | #endif /* CONFIG_PROC_FS */ |
| 1533 | 1565 | ||
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 074eb98fe15d..bf7867200b95 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
| @@ -54,6 +54,15 @@ struct page { | |||
| 54 | union { | 54 | union { |
| 55 | pgoff_t index; /* Our offset within mapping. */ | 55 | pgoff_t index; /* Our offset within mapping. */ |
| 56 | void *freelist; /* slub/slob first free object */ | 56 | void *freelist; /* slub/slob first free object */ |
| 57 | bool pfmemalloc; /* If set by the page allocator, | ||
| 58 | * ALLOC_NO_WATERMARKS was set | ||
| 59 | * and the low watermark was not | ||
| 60 | * met implying that the system | ||
| 61 | * is under some pressure. The | ||
| 62 | * caller should try ensure | ||
| 63 | * this page is only used to | ||
| 64 | * free other pages. | ||
| 65 | */ | ||
| 57 | }; | 66 | }; |
| 58 | 67 | ||
| 59 | union { | 68 | union { |
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 111aca5e97f3..4b27f9f503e4 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
| @@ -239,6 +239,7 @@ struct mmc_card { | |||
| 239 | #define MMC_QUIRK_BLK_NO_CMD23 (1<<7) /* Avoid CMD23 for regular multiblock */ | 239 | #define MMC_QUIRK_BLK_NO_CMD23 (1<<7) /* Avoid CMD23 for regular multiblock */ |
| 240 | #define MMC_QUIRK_BROKEN_BYTE_MODE_512 (1<<8) /* Avoid sending 512 bytes in */ | 240 | #define MMC_QUIRK_BROKEN_BYTE_MODE_512 (1<<8) /* Avoid sending 512 bytes in */ |
| 241 | #define MMC_QUIRK_LONG_READ_TIME (1<<9) /* Data read time > CSD says */ | 241 | #define MMC_QUIRK_LONG_READ_TIME (1<<9) /* Data read time > CSD says */ |
| 242 | #define MMC_QUIRK_SEC_ERASE_TRIM_BROKEN (1<<10) /* Skip secure for erase/trim */ | ||
| 242 | /* byte mode */ | 243 | /* byte mode */ |
| 243 | unsigned int poweroff_notify_state; /* eMMC4.5 notify feature */ | 244 | unsigned int poweroff_notify_state; /* eMMC4.5 notify feature */ |
| 244 | #define MMC_NO_POWER_NOTIFICATION 0 | 245 | #define MMC_NO_POWER_NOTIFICATION 0 |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 458988bd55a1..2daa54f55db7 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
| @@ -201,7 +201,7 @@ struct zone_reclaim_stat { | |||
| 201 | struct lruvec { | 201 | struct lruvec { |
| 202 | struct list_head lists[NR_LRU_LISTS]; | 202 | struct list_head lists[NR_LRU_LISTS]; |
| 203 | struct zone_reclaim_stat reclaim_stat; | 203 | struct zone_reclaim_stat reclaim_stat; |
| 204 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 204 | #ifdef CONFIG_MEMCG |
| 205 | struct zone *zone; | 205 | struct zone *zone; |
| 206 | #endif | 206 | #endif |
| 207 | }; | 207 | }; |
| @@ -209,7 +209,6 @@ struct lruvec { | |||
| 209 | /* Mask used at gathering information at once (see memcontrol.c) */ | 209 | /* Mask used at gathering information at once (see memcontrol.c) */ |
| 210 | #define LRU_ALL_FILE (BIT(LRU_INACTIVE_FILE) | BIT(LRU_ACTIVE_FILE)) | 210 | #define LRU_ALL_FILE (BIT(LRU_INACTIVE_FILE) | BIT(LRU_ACTIVE_FILE)) |
| 211 | #define LRU_ALL_ANON (BIT(LRU_INACTIVE_ANON) | BIT(LRU_ACTIVE_ANON)) | 211 | #define LRU_ALL_ANON (BIT(LRU_INACTIVE_ANON) | BIT(LRU_ACTIVE_ANON)) |
| 212 | #define LRU_ALL_EVICTABLE (LRU_ALL_FILE | LRU_ALL_ANON) | ||
| 213 | #define LRU_ALL ((1 << NR_LRU_LISTS) - 1) | 212 | #define LRU_ALL ((1 << NR_LRU_LISTS) - 1) |
| 214 | 213 | ||
| 215 | /* Isolate clean file */ | 214 | /* Isolate clean file */ |
| @@ -369,6 +368,10 @@ struct zone { | |||
| 369 | */ | 368 | */ |
| 370 | spinlock_t lock; | 369 | spinlock_t lock; |
| 371 | int all_unreclaimable; /* All pages pinned */ | 370 | int all_unreclaimable; /* All pages pinned */ |
| 371 | #if defined CONFIG_COMPACTION || defined CONFIG_CMA | ||
| 372 | /* pfn where the last incremental compaction isolated free pages */ | ||
| 373 | unsigned long compact_cached_free_pfn; | ||
| 374 | #endif | ||
| 372 | #ifdef CONFIG_MEMORY_HOTPLUG | 375 | #ifdef CONFIG_MEMORY_HOTPLUG |
| 373 | /* see spanned/present_pages for more description */ | 376 | /* see spanned/present_pages for more description */ |
| 374 | seqlock_t span_seqlock; | 377 | seqlock_t span_seqlock; |
| @@ -475,6 +478,14 @@ struct zone { | |||
| 475 | * rarely used fields: | 478 | * rarely used fields: |
| 476 | */ | 479 | */ |
| 477 | const char *name; | 480 | const char *name; |
| 481 | #ifdef CONFIG_MEMORY_ISOLATION | ||
| 482 | /* | ||
| 483 | * the number of MIGRATE_ISOLATE *pageblock*. | ||
| 484 | * We need this for free page counting. Look at zone_watermark_ok_safe. | ||
| 485 | * It's protected by zone->lock | ||
| 486 | */ | ||
| 487 | int nr_pageblock_isolate; | ||
| 488 | #endif | ||
| 478 | } ____cacheline_internodealigned_in_smp; | 489 | } ____cacheline_internodealigned_in_smp; |
| 479 | 490 | ||
| 480 | typedef enum { | 491 | typedef enum { |
| @@ -671,7 +682,7 @@ typedef struct pglist_data { | |||
| 671 | int nr_zones; | 682 | int nr_zones; |
| 672 | #ifdef CONFIG_FLAT_NODE_MEM_MAP /* means !SPARSEMEM */ | 683 | #ifdef CONFIG_FLAT_NODE_MEM_MAP /* means !SPARSEMEM */ |
| 673 | struct page *node_mem_map; | 684 | struct page *node_mem_map; |
| 674 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 685 | #ifdef CONFIG_MEMCG |
| 675 | struct page_cgroup *node_page_cgroup; | 686 | struct page_cgroup *node_page_cgroup; |
| 676 | #endif | 687 | #endif |
| 677 | #endif | 688 | #endif |
| @@ -694,6 +705,7 @@ typedef struct pglist_data { | |||
| 694 | range, including holes */ | 705 | range, including holes */ |
| 695 | int node_id; | 706 | int node_id; |
| 696 | wait_queue_head_t kswapd_wait; | 707 | wait_queue_head_t kswapd_wait; |
| 708 | wait_queue_head_t pfmemalloc_wait; | ||
| 697 | struct task_struct *kswapd; /* Protected by lock_memory_hotplug() */ | 709 | struct task_struct *kswapd; /* Protected by lock_memory_hotplug() */ |
| 698 | int kswapd_max_order; | 710 | int kswapd_max_order; |
| 699 | enum zone_type classzone_idx; | 711 | enum zone_type classzone_idx; |
| @@ -718,7 +730,7 @@ typedef struct pglist_data { | |||
| 718 | #include <linux/memory_hotplug.h> | 730 | #include <linux/memory_hotplug.h> |
| 719 | 731 | ||
| 720 | extern struct mutex zonelists_mutex; | 732 | extern struct mutex zonelists_mutex; |
| 721 | void build_all_zonelists(void *data); | 733 | void build_all_zonelists(pg_data_t *pgdat, struct zone *zone); |
| 722 | void wakeup_kswapd(struct zone *zone, int order, enum zone_type classzone_idx); | 734 | void wakeup_kswapd(struct zone *zone, int order, enum zone_type classzone_idx); |
| 723 | bool zone_watermark_ok(struct zone *z, int order, unsigned long mark, | 735 | bool zone_watermark_ok(struct zone *z, int order, unsigned long mark, |
| 724 | int classzone_idx, int alloc_flags); | 736 | int classzone_idx, int alloc_flags); |
| @@ -736,7 +748,7 @@ extern void lruvec_init(struct lruvec *lruvec, struct zone *zone); | |||
| 736 | 748 | ||
| 737 | static inline struct zone *lruvec_zone(struct lruvec *lruvec) | 749 | static inline struct zone *lruvec_zone(struct lruvec *lruvec) |
| 738 | { | 750 | { |
| 739 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 751 | #ifdef CONFIG_MEMCG |
| 740 | return lruvec->zone; | 752 | return lruvec->zone; |
| 741 | #else | 753 | #else |
| 742 | return container_of(lruvec, struct zone, lruvec); | 754 | return container_of(lruvec, struct zone, lruvec); |
| @@ -773,7 +785,7 @@ extern int movable_zone; | |||
| 773 | 785 | ||
| 774 | static inline int zone_movable_is_highmem(void) | 786 | static inline int zone_movable_is_highmem(void) |
| 775 | { | 787 | { |
| 776 | #if defined(CONFIG_HIGHMEM) && defined(CONFIG_HAVE_MEMBLOCK_NODE) | 788 | #if defined(CONFIG_HIGHMEM) && defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) |
| 777 | return movable_zone == ZONE_HIGHMEM; | 789 | return movable_zone == ZONE_HIGHMEM; |
| 778 | #else | 790 | #else |
| 779 | return 0; | 791 | return 0; |
| @@ -1052,7 +1064,7 @@ struct mem_section { | |||
| 1052 | 1064 | ||
| 1053 | /* See declaration of similar field in struct zone */ | 1065 | /* See declaration of similar field in struct zone */ |
| 1054 | unsigned long *pageblock_flags; | 1066 | unsigned long *pageblock_flags; |
| 1055 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 1067 | #ifdef CONFIG_MEMCG |
| 1056 | /* | 1068 | /* |
| 1057 | * If !SPARSEMEM, pgdat doesn't have page_cgroup pointer. We use | 1069 | * If !SPARSEMEM, pgdat doesn't have page_cgroup pointer. We use |
| 1058 | * section. (see memcontrol.h/page_cgroup.h about this.) | 1070 | * section. (see memcontrol.h/page_cgroup.h about this.) |
diff --git a/include/linux/mv643xx_eth.h b/include/linux/mv643xx_eth.h index 51bf8ada6dc0..49258e0ed1c6 100644 --- a/include/linux/mv643xx_eth.h +++ b/include/linux/mv643xx_eth.h | |||
| @@ -15,6 +15,8 @@ | |||
| 15 | #define MV643XX_ETH_SIZE_REG_4 0x2224 | 15 | #define MV643XX_ETH_SIZE_REG_4 0x2224 |
| 16 | #define MV643XX_ETH_BASE_ADDR_ENABLE_REG 0x2290 | 16 | #define MV643XX_ETH_BASE_ADDR_ENABLE_REG 0x2290 |
| 17 | 17 | ||
| 18 | #define MV643XX_TX_CSUM_DEFAULT_LIMIT 0 | ||
| 19 | |||
| 18 | struct mv643xx_eth_shared_platform_data { | 20 | struct mv643xx_eth_shared_platform_data { |
| 19 | struct mbus_dram_target_info *dram; | 21 | struct mbus_dram_target_info *dram; |
| 20 | struct platform_device *shared_smi; | 22 | struct platform_device *shared_smi; |
diff --git a/include/linux/namei.h b/include/linux/namei.h index d2ef8b34b967..4bf19d8174ed 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
| @@ -67,6 +67,7 @@ extern int kern_path(const char *, unsigned, struct path *); | |||
| 67 | 67 | ||
| 68 | extern struct dentry *kern_path_create(int, const char *, struct path *, int); | 68 | extern struct dentry *kern_path_create(int, const char *, struct path *, int); |
| 69 | extern struct dentry *user_path_create(int, const char __user *, struct path *, int); | 69 | extern struct dentry *user_path_create(int, const char __user *, struct path *, int); |
| 70 | extern void done_path_create(struct path *, struct dentry *); | ||
| 70 | extern struct dentry *kern_path_locked(const char *, struct path *); | 71 | extern struct dentry *kern_path_locked(const char *, struct path *); |
| 71 | extern int vfs_path_lookup(struct dentry *, struct vfsmount *, | 72 | extern int vfs_path_lookup(struct dentry *, struct vfsmount *, |
| 72 | const char *, unsigned int, struct path *); | 73 | const char *, unsigned int, struct path *); |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index eb06e58bed0b..59dc05f38247 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -953,7 +953,8 @@ struct net_device_ops { | |||
| 953 | #ifdef CONFIG_NET_POLL_CONTROLLER | 953 | #ifdef CONFIG_NET_POLL_CONTROLLER |
| 954 | void (*ndo_poll_controller)(struct net_device *dev); | 954 | void (*ndo_poll_controller)(struct net_device *dev); |
| 955 | int (*ndo_netpoll_setup)(struct net_device *dev, | 955 | int (*ndo_netpoll_setup)(struct net_device *dev, |
| 956 | struct netpoll_info *info); | 956 | struct netpoll_info *info, |
| 957 | gfp_t gfp); | ||
| 957 | void (*ndo_netpoll_cleanup)(struct net_device *dev); | 958 | void (*ndo_netpoll_cleanup)(struct net_device *dev); |
| 958 | #endif | 959 | #endif |
| 959 | int (*ndo_set_vf_mac)(struct net_device *dev, | 960 | int (*ndo_set_vf_mac)(struct net_device *dev, |
| @@ -1300,6 +1301,8 @@ struct net_device { | |||
| 1300 | /* for setting kernel sock attribute on TCP connection setup */ | 1301 | /* for setting kernel sock attribute on TCP connection setup */ |
| 1301 | #define GSO_MAX_SIZE 65536 | 1302 | #define GSO_MAX_SIZE 65536 |
| 1302 | unsigned int gso_max_size; | 1303 | unsigned int gso_max_size; |
| 1304 | #define GSO_MAX_SEGS 65535 | ||
| 1305 | u16 gso_max_segs; | ||
| 1303 | 1306 | ||
| 1304 | #ifdef CONFIG_DCB | 1307 | #ifdef CONFIG_DCB |
| 1305 | /* Data Center Bridging netlink ops */ | 1308 | /* Data Center Bridging netlink ops */ |
| @@ -1519,6 +1522,8 @@ struct packet_type { | |||
| 1519 | struct sk_buff **(*gro_receive)(struct sk_buff **head, | 1522 | struct sk_buff **(*gro_receive)(struct sk_buff **head, |
| 1520 | struct sk_buff *skb); | 1523 | struct sk_buff *skb); |
| 1521 | int (*gro_complete)(struct sk_buff *skb); | 1524 | int (*gro_complete)(struct sk_buff *skb); |
| 1525 | bool (*id_match)(struct packet_type *ptype, | ||
| 1526 | struct sock *sk); | ||
| 1522 | void *af_packet_priv; | 1527 | void *af_packet_priv; |
| 1523 | struct list_head list; | 1528 | struct list_head list; |
| 1524 | }; | 1529 | }; |
diff --git a/include/linux/netfilter/nf_conntrack_sip.h b/include/linux/netfilter/nf_conntrack_sip.h index 0dfc8b7210a3..89f2a627f3f0 100644 --- a/include/linux/netfilter/nf_conntrack_sip.h +++ b/include/linux/netfilter/nf_conntrack_sip.h | |||
| @@ -164,7 +164,7 @@ extern int ct_sip_parse_address_param(const struct nf_conn *ct, const char *dptr | |||
| 164 | unsigned int dataoff, unsigned int datalen, | 164 | unsigned int dataoff, unsigned int datalen, |
| 165 | const char *name, | 165 | const char *name, |
| 166 | unsigned int *matchoff, unsigned int *matchlen, | 166 | unsigned int *matchoff, unsigned int *matchlen, |
| 167 | union nf_inet_addr *addr); | 167 | union nf_inet_addr *addr, bool delim); |
| 168 | extern int ct_sip_parse_numerical_param(const struct nf_conn *ct, const char *dptr, | 168 | extern int ct_sip_parse_numerical_param(const struct nf_conn *ct, const char *dptr, |
| 169 | unsigned int off, unsigned int datalen, | 169 | unsigned int off, unsigned int datalen, |
| 170 | const char *name, | 170 | const char *name, |
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index 28f5389c924b..66d5379c305e 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
| @@ -23,6 +23,7 @@ struct netpoll { | |||
| 23 | u8 remote_mac[ETH_ALEN]; | 23 | u8 remote_mac[ETH_ALEN]; |
| 24 | 24 | ||
| 25 | struct list_head rx; /* rx_np list element */ | 25 | struct list_head rx; /* rx_np list element */ |
| 26 | struct rcu_head rcu; | ||
| 26 | }; | 27 | }; |
| 27 | 28 | ||
| 28 | struct netpoll_info { | 29 | struct netpoll_info { |
| @@ -38,28 +39,40 @@ struct netpoll_info { | |||
| 38 | struct delayed_work tx_work; | 39 | struct delayed_work tx_work; |
| 39 | 40 | ||
| 40 | struct netpoll *netpoll; | 41 | struct netpoll *netpoll; |
| 42 | struct rcu_head rcu; | ||
| 41 | }; | 43 | }; |
| 42 | 44 | ||
| 43 | void netpoll_send_udp(struct netpoll *np, const char *msg, int len); | 45 | void netpoll_send_udp(struct netpoll *np, const char *msg, int len); |
| 44 | void netpoll_print_options(struct netpoll *np); | 46 | void netpoll_print_options(struct netpoll *np); |
| 45 | int netpoll_parse_options(struct netpoll *np, char *opt); | 47 | int netpoll_parse_options(struct netpoll *np, char *opt); |
| 46 | int __netpoll_setup(struct netpoll *np, struct net_device *ndev); | 48 | int __netpoll_setup(struct netpoll *np, struct net_device *ndev, gfp_t gfp); |
| 47 | int netpoll_setup(struct netpoll *np); | 49 | int netpoll_setup(struct netpoll *np); |
| 48 | int netpoll_trap(void); | 50 | int netpoll_trap(void); |
| 49 | void netpoll_set_trap(int trap); | 51 | void netpoll_set_trap(int trap); |
| 50 | void __netpoll_cleanup(struct netpoll *np); | 52 | void __netpoll_cleanup(struct netpoll *np); |
| 53 | void __netpoll_free_rcu(struct netpoll *np); | ||
| 51 | void netpoll_cleanup(struct netpoll *np); | 54 | void netpoll_cleanup(struct netpoll *np); |
| 52 | int __netpoll_rx(struct sk_buff *skb); | 55 | int __netpoll_rx(struct sk_buff *skb, struct netpoll_info *npinfo); |
| 53 | void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb, | 56 | void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb, |
| 54 | struct net_device *dev); | 57 | struct net_device *dev); |
| 55 | static inline void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) | 58 | static inline void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) |
| 56 | { | 59 | { |
| 60 | unsigned long flags; | ||
| 61 | local_irq_save(flags); | ||
| 57 | netpoll_send_skb_on_dev(np, skb, np->dev); | 62 | netpoll_send_skb_on_dev(np, skb, np->dev); |
| 63 | local_irq_restore(flags); | ||
| 58 | } | 64 | } |
| 59 | 65 | ||
| 60 | 66 | ||
| 61 | 67 | ||
| 62 | #ifdef CONFIG_NETPOLL | 68 | #ifdef CONFIG_NETPOLL |
| 69 | static inline bool netpoll_rx_on(struct sk_buff *skb) | ||
| 70 | { | ||
| 71 | struct netpoll_info *npinfo = rcu_dereference_bh(skb->dev->npinfo); | ||
| 72 | |||
| 73 | return npinfo && (!list_empty(&npinfo->rx_np) || npinfo->rx_flags); | ||
| 74 | } | ||
| 75 | |||
| 63 | static inline bool netpoll_rx(struct sk_buff *skb) | 76 | static inline bool netpoll_rx(struct sk_buff *skb) |
| 64 | { | 77 | { |
| 65 | struct netpoll_info *npinfo; | 78 | struct netpoll_info *npinfo; |
| @@ -67,14 +80,14 @@ static inline bool netpoll_rx(struct sk_buff *skb) | |||
| 67 | bool ret = false; | 80 | bool ret = false; |
| 68 | 81 | ||
| 69 | local_irq_save(flags); | 82 | local_irq_save(flags); |
| 70 | npinfo = rcu_dereference_bh(skb->dev->npinfo); | ||
| 71 | 83 | ||
| 72 | if (!npinfo || (list_empty(&npinfo->rx_np) && !npinfo->rx_flags)) | 84 | if (!netpoll_rx_on(skb)) |
| 73 | goto out; | 85 | goto out; |
| 74 | 86 | ||
| 87 | npinfo = rcu_dereference_bh(skb->dev->npinfo); | ||
| 75 | spin_lock(&npinfo->rx_lock); | 88 | spin_lock(&npinfo->rx_lock); |
| 76 | /* check rx_flags again with the lock held */ | 89 | /* check rx_flags again with the lock held */ |
| 77 | if (npinfo->rx_flags && __netpoll_rx(skb)) | 90 | if (npinfo->rx_flags && __netpoll_rx(skb, npinfo)) |
| 78 | ret = true; | 91 | ret = true; |
| 79 | spin_unlock(&npinfo->rx_lock); | 92 | spin_unlock(&npinfo->rx_lock); |
| 80 | 93 | ||
| @@ -83,13 +96,6 @@ out: | |||
| 83 | return ret; | 96 | return ret; |
| 84 | } | 97 | } |
| 85 | 98 | ||
| 86 | static inline int netpoll_rx_on(struct sk_buff *skb) | ||
| 87 | { | ||
| 88 | struct netpoll_info *npinfo = rcu_dereference_bh(skb->dev->npinfo); | ||
| 89 | |||
| 90 | return npinfo && (!list_empty(&npinfo->rx_np) || npinfo->rx_flags); | ||
| 91 | } | ||
| 92 | |||
| 93 | static inline int netpoll_receive_skb(struct sk_buff *skb) | 99 | static inline int netpoll_receive_skb(struct sk_buff *skb) |
| 94 | { | 100 | { |
| 95 | if (!list_empty(&skb->dev->napi_list)) | 101 | if (!list_empty(&skb->dev->napi_list)) |
| @@ -119,7 +125,7 @@ static inline void netpoll_poll_unlock(void *have) | |||
| 119 | } | 125 | } |
| 120 | } | 126 | } |
| 121 | 127 | ||
| 122 | static inline int netpoll_tx_running(struct net_device *dev) | 128 | static inline bool netpoll_tx_running(struct net_device *dev) |
| 123 | { | 129 | { |
| 124 | return irqs_disabled(); | 130 | return irqs_disabled(); |
| 125 | } | 131 | } |
| @@ -127,11 +133,11 @@ static inline int netpoll_tx_running(struct net_device *dev) | |||
| 127 | #else | 133 | #else |
| 128 | static inline bool netpoll_rx(struct sk_buff *skb) | 134 | static inline bool netpoll_rx(struct sk_buff *skb) |
| 129 | { | 135 | { |
| 130 | return 0; | 136 | return false; |
| 131 | } | 137 | } |
| 132 | static inline int netpoll_rx_on(struct sk_buff *skb) | 138 | static inline bool netpoll_rx_on(struct sk_buff *skb) |
| 133 | { | 139 | { |
| 134 | return 0; | 140 | return false; |
| 135 | } | 141 | } |
| 136 | static inline int netpoll_receive_skb(struct sk_buff *skb) | 142 | static inline int netpoll_receive_skb(struct sk_buff *skb) |
| 137 | { | 143 | { |
| @@ -147,9 +153,9 @@ static inline void netpoll_poll_unlock(void *have) | |||
| 147 | static inline void netpoll_netdev_init(struct net_device *dev) | 153 | static inline void netpoll_netdev_init(struct net_device *dev) |
| 148 | { | 154 | { |
| 149 | } | 155 | } |
| 150 | static inline int netpoll_tx_running(struct net_device *dev) | 156 | static inline bool netpoll_tx_running(struct net_device *dev) |
| 151 | { | 157 | { |
| 152 | return 0; | 158 | return false; |
| 153 | } | 159 | } |
| 154 | #endif | 160 | #endif |
| 155 | 161 | ||
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 2889877318bc..4b03f56e280e 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -265,11 +265,6 @@ static inline const struct nfs_rpc_ops *NFS_PROTO(const struct inode *inode) | |||
| 265 | return NFS_SERVER(inode)->nfs_client->rpc_ops; | 265 | return NFS_SERVER(inode)->nfs_client->rpc_ops; |
| 266 | } | 266 | } |
| 267 | 267 | ||
| 268 | static inline __be32 *NFS_COOKIEVERF(const struct inode *inode) | ||
| 269 | { | ||
| 270 | return NFS_I(inode)->cookieverf; | ||
| 271 | } | ||
| 272 | |||
| 273 | static inline unsigned NFS_MINATTRTIMEO(const struct inode *inode) | 268 | static inline unsigned NFS_MINATTRTIMEO(const struct inode *inode) |
| 274 | { | 269 | { |
| 275 | struct nfs_server *nfss = NFS_SERVER(inode); | 270 | struct nfs_server *nfss = NFS_SERVER(inode); |
| @@ -473,10 +468,10 @@ extern ssize_t nfs_direct_IO(int, struct kiocb *, const struct iovec *, loff_t, | |||
| 473 | unsigned long); | 468 | unsigned long); |
| 474 | extern ssize_t nfs_file_direct_read(struct kiocb *iocb, | 469 | extern ssize_t nfs_file_direct_read(struct kiocb *iocb, |
| 475 | const struct iovec *iov, unsigned long nr_segs, | 470 | const struct iovec *iov, unsigned long nr_segs, |
| 476 | loff_t pos); | 471 | loff_t pos, bool uio); |
| 477 | extern ssize_t nfs_file_direct_write(struct kiocb *iocb, | 472 | extern ssize_t nfs_file_direct_write(struct kiocb *iocb, |
| 478 | const struct iovec *iov, unsigned long nr_segs, | 473 | const struct iovec *iov, unsigned long nr_segs, |
| 479 | loff_t pos); | 474 | loff_t pos, bool uio); |
| 480 | 475 | ||
| 481 | /* | 476 | /* |
| 482 | * linux/fs/nfs/dir.c | 477 | * linux/fs/nfs/dir.c |
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 880805774f9f..92ce5783b707 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
| @@ -69,6 +69,7 @@ struct nfs_pageio_descriptor { | |||
| 69 | const struct nfs_pgio_completion_ops *pg_completion_ops; | 69 | const struct nfs_pgio_completion_ops *pg_completion_ops; |
| 70 | struct pnfs_layout_segment *pg_lseg; | 70 | struct pnfs_layout_segment *pg_lseg; |
| 71 | struct nfs_direct_req *pg_dreq; | 71 | struct nfs_direct_req *pg_dreq; |
| 72 | void *pg_layout_private; | ||
| 72 | }; | 73 | }; |
| 73 | 74 | ||
| 74 | #define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags)) | 75 | #define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags)) |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 00485e084394..be9cf3c7e79e 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -652,7 +652,7 @@ struct nfs_getaclargs { | |||
| 652 | }; | 652 | }; |
| 653 | 653 | ||
| 654 | /* getxattr ACL interface flags */ | 654 | /* getxattr ACL interface flags */ |
| 655 | #define NFS4_ACL_LEN_REQUEST 0x0001 /* zero length getxattr buffer */ | 655 | #define NFS4_ACL_TRUNC 0x0001 /* ACL was truncated */ |
| 656 | struct nfs_getaclres { | 656 | struct nfs_getaclres { |
| 657 | size_t acl_len; | 657 | size_t acl_len; |
| 658 | size_t acl_data_offset; | 658 | size_t acl_data_offset; |
| @@ -1248,6 +1248,7 @@ struct nfs_pgio_header { | |||
| 1248 | void (*release) (struct nfs_pgio_header *hdr); | 1248 | void (*release) (struct nfs_pgio_header *hdr); |
| 1249 | const struct nfs_pgio_completion_ops *completion_ops; | 1249 | const struct nfs_pgio_completion_ops *completion_ops; |
| 1250 | struct nfs_direct_req *dreq; | 1250 | struct nfs_direct_req *dreq; |
| 1251 | void *layout_private; | ||
| 1251 | spinlock_t lock; | 1252 | spinlock_t lock; |
| 1252 | /* fields protected by lock */ | 1253 | /* fields protected by lock */ |
| 1253 | int pnfs_error; | 1254 | int pnfs_error; |
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index ce4743a26015..fa63048fecff 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h | |||
| @@ -143,6 +143,7 @@ typedef struct svc_fh { | |||
| 143 | int fh_maxsize; /* max size for fh_handle */ | 143 | int fh_maxsize; /* max size for fh_handle */ |
| 144 | 144 | ||
| 145 | unsigned char fh_locked; /* inode locked by us */ | 145 | unsigned char fh_locked; /* inode locked by us */ |
| 146 | unsigned char fh_want_write; /* remount protection taken */ | ||
| 146 | 147 | ||
| 147 | #ifdef CONFIG_NFSD_V3 | 148 | #ifdef CONFIG_NFSD_V3 |
| 148 | unsigned char fh_post_saved; /* post-op attrs saved */ | 149 | unsigned char fh_post_saved; /* post-op attrs saved */ |
diff --git a/include/linux/nvme.h b/include/linux/nvme.h index 9490a00529f4..c25cccaa555a 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h | |||
| @@ -35,8 +35,10 @@ struct nvme_bar { | |||
| 35 | __u64 acq; /* Admin CQ Base Address */ | 35 | __u64 acq; /* Admin CQ Base Address */ |
| 36 | }; | 36 | }; |
| 37 | 37 | ||
| 38 | #define NVME_CAP_MQES(cap) ((cap) & 0xffff) | ||
| 38 | #define NVME_CAP_TIMEOUT(cap) (((cap) >> 24) & 0xff) | 39 | #define NVME_CAP_TIMEOUT(cap) (((cap) >> 24) & 0xff) |
| 39 | #define NVME_CAP_STRIDE(cap) (((cap) >> 32) & 0xf) | 40 | #define NVME_CAP_STRIDE(cap) (((cap) >> 32) & 0xf) |
| 41 | #define NVME_CAP_MPSMIN(cap) (((cap) >> 48) & 0xf) | ||
| 40 | 42 | ||
| 41 | enum { | 43 | enum { |
| 42 | NVME_CC_ENABLE = 1 << 0, | 44 | NVME_CC_ENABLE = 1 << 0, |
diff --git a/include/linux/of.h b/include/linux/of.h index 42c2a58328c1..1b1163225f3b 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <linux/kref.h> | 21 | #include <linux/kref.h> |
| 22 | #include <linux/mod_devicetable.h> | 22 | #include <linux/mod_devicetable.h> |
| 23 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
| 24 | #include <linux/topology.h> | ||
| 24 | 25 | ||
| 25 | #include <asm/byteorder.h> | 26 | #include <asm/byteorder.h> |
| 26 | #include <asm/errno.h> | 27 | #include <asm/errno.h> |
| @@ -158,11 +159,6 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size) | |||
| 158 | 159 | ||
| 159 | #define OF_BAD_ADDR ((u64)-1) | 160 | #define OF_BAD_ADDR ((u64)-1) |
| 160 | 161 | ||
| 161 | #ifndef of_node_to_nid | ||
| 162 | static inline int of_node_to_nid(struct device_node *np) { return -1; } | ||
| 163 | #define of_node_to_nid of_node_to_nid | ||
| 164 | #endif | ||
| 165 | |||
| 166 | static inline const char* of_node_full_name(struct device_node *np) | 162 | static inline const char* of_node_full_name(struct device_node *np) |
| 167 | { | 163 | { |
| 168 | return np ? np->full_name : "<no-node>"; | 164 | return np ? np->full_name : "<no-node>"; |
| @@ -194,10 +190,17 @@ extern struct device_node *of_get_parent(const struct device_node *node); | |||
| 194 | extern struct device_node *of_get_next_parent(struct device_node *node); | 190 | extern struct device_node *of_get_next_parent(struct device_node *node); |
| 195 | extern struct device_node *of_get_next_child(const struct device_node *node, | 191 | extern struct device_node *of_get_next_child(const struct device_node *node, |
| 196 | struct device_node *prev); | 192 | struct device_node *prev); |
| 193 | extern struct device_node *of_get_next_available_child( | ||
| 194 | const struct device_node *node, struct device_node *prev); | ||
| 195 | |||
| 197 | #define for_each_child_of_node(parent, child) \ | 196 | #define for_each_child_of_node(parent, child) \ |
| 198 | for (child = of_get_next_child(parent, NULL); child != NULL; \ | 197 | for (child = of_get_next_child(parent, NULL); child != NULL; \ |
| 199 | child = of_get_next_child(parent, child)) | 198 | child = of_get_next_child(parent, child)) |
| 200 | 199 | ||
| 200 | #define for_each_available_child_of_node(parent, child) \ | ||
| 201 | for (child = of_get_next_available_child(parent, NULL); child != NULL; \ | ||
| 202 | child = of_get_next_available_child(parent, child)) | ||
| 203 | |||
| 201 | static inline int of_get_child_count(const struct device_node *np) | 204 | static inline int of_get_child_count(const struct device_node *np) |
| 202 | { | 205 | { |
| 203 | struct device_node *child; | 206 | struct device_node *child; |
| @@ -427,6 +430,15 @@ static inline int of_machine_is_compatible(const char *compat) | |||
| 427 | while (0) | 430 | while (0) |
| 428 | #endif /* CONFIG_OF */ | 431 | #endif /* CONFIG_OF */ |
| 429 | 432 | ||
| 433 | #ifndef of_node_to_nid | ||
| 434 | static inline int of_node_to_nid(struct device_node *np) | ||
| 435 | { | ||
| 436 | return numa_node_id(); | ||
| 437 | } | ||
| 438 | |||
| 439 | #define of_node_to_nid of_node_to_nid | ||
| 440 | #endif | ||
| 441 | |||
| 430 | /** | 442 | /** |
| 431 | * of_property_read_bool - Findfrom a property | 443 | * of_property_read_bool - Findfrom a property |
| 432 | * @np: device node from which the property value is to be read. | 444 | * @np: device node from which the property value is to be read. |
diff --git a/include/linux/olpc-ec.h b/include/linux/olpc-ec.h new file mode 100644 index 000000000000..5bb6e760aa61 --- /dev/null +++ b/include/linux/olpc-ec.h | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | #ifndef _LINUX_OLPC_EC_H | ||
| 2 | #define _LINUX_OLPC_EC_H | ||
| 3 | |||
| 4 | /* XO-1 EC commands */ | ||
| 5 | #define EC_FIRMWARE_REV 0x08 | ||
| 6 | #define EC_WRITE_SCI_MASK 0x1b | ||
| 7 | #define EC_WAKE_UP_WLAN 0x24 | ||
| 8 | #define EC_WLAN_LEAVE_RESET 0x25 | ||
| 9 | #define EC_READ_EB_MODE 0x2a | ||
| 10 | #define EC_SET_SCI_INHIBIT 0x32 | ||
| 11 | #define EC_SET_SCI_INHIBIT_RELEASE 0x34 | ||
| 12 | #define EC_WLAN_ENTER_RESET 0x35 | ||
| 13 | #define EC_WRITE_EXT_SCI_MASK 0x38 | ||
| 14 | #define EC_SCI_QUERY 0x84 | ||
| 15 | #define EC_EXT_SCI_QUERY 0x85 | ||
| 16 | |||
| 17 | struct platform_device; | ||
| 18 | |||
| 19 | struct olpc_ec_driver { | ||
| 20 | int (*probe)(struct platform_device *); | ||
| 21 | int (*suspend)(struct platform_device *); | ||
| 22 | int (*resume)(struct platform_device *); | ||
| 23 | |||
| 24 | int (*ec_cmd)(u8, u8 *, size_t, u8 *, size_t, void *); | ||
| 25 | }; | ||
| 26 | |||
| 27 | #ifdef CONFIG_OLPC | ||
| 28 | |||
| 29 | extern void olpc_ec_driver_register(struct olpc_ec_driver *drv, void *arg); | ||
| 30 | |||
| 31 | extern int olpc_ec_cmd(u8 cmd, u8 *inbuf, size_t inlen, u8 *outbuf, | ||
| 32 | size_t outlen); | ||
| 33 | |||
| 34 | #else | ||
| 35 | |||
| 36 | static inline int olpc_ec_cmd(u8 cmd, u8 *inbuf, size_t inlen, u8 *outbuf, | ||
| 37 | size_t outlen) { return -ENODEV; } | ||
| 38 | |||
| 39 | #endif /* CONFIG_OLPC */ | ||
| 40 | |||
| 41 | #endif /* _LINUX_OLPC_EC_H */ | ||
diff --git a/include/linux/omap-dma.h b/include/linux/omap-dma.h new file mode 100644 index 000000000000..eb475a8ea25b --- /dev/null +++ b/include/linux/omap-dma.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* | ||
| 2 | * OMAP DMA Engine support | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License version 2 as | ||
| 6 | * published by the Free Software Foundation. | ||
| 7 | */ | ||
| 8 | #ifndef __LINUX_OMAP_DMA_H | ||
| 9 | #define __LINUX_OMAP_DMA_H | ||
| 10 | |||
| 11 | struct dma_chan; | ||
| 12 | |||
| 13 | #if defined(CONFIG_DMA_OMAP) || defined(CONFIG_DMA_OMAP_MODULE) | ||
| 14 | bool omap_dma_filter_fn(struct dma_chan *, void *); | ||
| 15 | #else | ||
| 16 | static inline bool omap_dma_filter_fn(struct dma_chan *c, void *d) | ||
| 17 | { | ||
| 18 | return false; | ||
| 19 | } | ||
| 20 | #endif | ||
| 21 | |||
| 22 | #endif | ||
diff --git a/include/linux/omap3isp.h b/include/linux/omap3isp.h index c73a34c3434d..c090cf9249bb 100644 --- a/include/linux/omap3isp.h +++ b/include/linux/omap3isp.h | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #define OMAP3_ISP_USER_H | 28 | #define OMAP3_ISP_USER_H |
| 29 | 29 | ||
| 30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
| 31 | #include <linux/videodev2.h> | ||
| 31 | 32 | ||
| 32 | /* | 33 | /* |
| 33 | * Private IOCTLs | 34 | * Private IOCTLs |
| @@ -427,7 +428,7 @@ struct omap3isp_ccdc_update_config { | |||
| 427 | #define OMAP3ISP_PREV_COLOR_CONV (1 << 8) | 428 | #define OMAP3ISP_PREV_COLOR_CONV (1 << 8) |
| 428 | #define OMAP3ISP_PREV_YC_LIMIT (1 << 9) | 429 | #define OMAP3ISP_PREV_YC_LIMIT (1 << 9) |
| 429 | #define OMAP3ISP_PREV_DEFECT_COR (1 << 10) | 430 | #define OMAP3ISP_PREV_DEFECT_COR (1 << 10) |
| 430 | #define OMAP3ISP_PREV_GAMMABYPASS (1 << 11) | 431 | /* Bit 11 was OMAP3ISP_PREV_GAMMABYPASS, now merged with OMAP3ISP_PREV_GAMMA */ |
| 431 | #define OMAP3ISP_PREV_DRK_FRM_CAPTURE (1 << 12) | 432 | #define OMAP3ISP_PREV_DRK_FRM_CAPTURE (1 << 12) |
| 432 | #define OMAP3ISP_PREV_DRK_FRM_SUBTRACT (1 << 13) | 433 | #define OMAP3ISP_PREV_DRK_FRM_SUBTRACT (1 << 13) |
| 433 | #define OMAP3ISP_PREV_LENS_SHADING (1 << 14) | 434 | #define OMAP3ISP_PREV_LENS_SHADING (1 << 14) |
| @@ -436,6 +437,7 @@ struct omap3isp_ccdc_update_config { | |||
| 436 | 437 | ||
| 437 | #define OMAP3ISP_PREV_NF_TBL_SIZE 64 | 438 | #define OMAP3ISP_PREV_NF_TBL_SIZE 64 |
| 438 | #define OMAP3ISP_PREV_CFA_TBL_SIZE 576 | 439 | #define OMAP3ISP_PREV_CFA_TBL_SIZE 576 |
| 440 | #define OMAP3ISP_PREV_CFA_BLK_SIZE (OMAP3ISP_PREV_CFA_TBL_SIZE / 4) | ||
| 439 | #define OMAP3ISP_PREV_GAMMA_TBL_SIZE 1024 | 441 | #define OMAP3ISP_PREV_GAMMA_TBL_SIZE 1024 |
| 440 | #define OMAP3ISP_PREV_YENH_TBL_SIZE 128 | 442 | #define OMAP3ISP_PREV_YENH_TBL_SIZE 128 |
| 441 | 443 | ||
| @@ -477,7 +479,7 @@ struct omap3isp_prev_cfa { | |||
| 477 | enum omap3isp_cfa_fmt format; | 479 | enum omap3isp_cfa_fmt format; |
| 478 | __u8 gradthrs_vert; | 480 | __u8 gradthrs_vert; |
| 479 | __u8 gradthrs_horz; | 481 | __u8 gradthrs_horz; |
| 480 | __u32 table[OMAP3ISP_PREV_CFA_TBL_SIZE]; | 482 | __u32 table[4][OMAP3ISP_PREV_CFA_BLK_SIZE]; |
| 481 | }; | 483 | }; |
| 482 | 484 | ||
| 483 | /** | 485 | /** |
diff --git a/include/linux/oom.h b/include/linux/oom.h index e4c29bc72e70..49a3031fda50 100644 --- a/include/linux/oom.h +++ b/include/linux/oom.h | |||
| @@ -40,15 +40,36 @@ enum oom_constraint { | |||
| 40 | CONSTRAINT_MEMCG, | 40 | CONSTRAINT_MEMCG, |
| 41 | }; | 41 | }; |
| 42 | 42 | ||
| 43 | enum oom_scan_t { | ||
| 44 | OOM_SCAN_OK, /* scan thread and find its badness */ | ||
| 45 | OOM_SCAN_CONTINUE, /* do not consider thread for oom kill */ | ||
| 46 | OOM_SCAN_ABORT, /* abort the iteration and return */ | ||
| 47 | OOM_SCAN_SELECT, /* always select this thread first */ | ||
| 48 | }; | ||
| 49 | |||
| 43 | extern void compare_swap_oom_score_adj(int old_val, int new_val); | 50 | extern void compare_swap_oom_score_adj(int old_val, int new_val); |
| 44 | extern int test_set_oom_score_adj(int new_val); | 51 | extern int test_set_oom_score_adj(int new_val); |
| 45 | 52 | ||
| 46 | extern unsigned long oom_badness(struct task_struct *p, | 53 | extern unsigned long oom_badness(struct task_struct *p, |
| 47 | struct mem_cgroup *memcg, const nodemask_t *nodemask, | 54 | struct mem_cgroup *memcg, const nodemask_t *nodemask, |
| 48 | unsigned long totalpages); | 55 | unsigned long totalpages); |
| 56 | extern void oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order, | ||
| 57 | unsigned int points, unsigned long totalpages, | ||
| 58 | struct mem_cgroup *memcg, nodemask_t *nodemask, | ||
| 59 | const char *message); | ||
| 60 | |||
| 49 | extern int try_set_zonelist_oom(struct zonelist *zonelist, gfp_t gfp_flags); | 61 | extern int try_set_zonelist_oom(struct zonelist *zonelist, gfp_t gfp_flags); |
| 50 | extern void clear_zonelist_oom(struct zonelist *zonelist, gfp_t gfp_flags); | 62 | extern void clear_zonelist_oom(struct zonelist *zonelist, gfp_t gfp_flags); |
| 51 | 63 | ||
| 64 | extern void check_panic_on_oom(enum oom_constraint constraint, gfp_t gfp_mask, | ||
| 65 | int order, const nodemask_t *nodemask); | ||
| 66 | |||
| 67 | extern enum oom_scan_t oom_scan_process_thread(struct task_struct *task, | ||
| 68 | unsigned long totalpages, const nodemask_t *nodemask, | ||
| 69 | bool force_kill); | ||
| 70 | extern void mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask, | ||
| 71 | int order); | ||
| 72 | |||
| 52 | extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, | 73 | extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, |
| 53 | int order, nodemask_t *mask, bool force_kill); | 74 | int order, nodemask_t *mask, bool force_kill); |
| 54 | extern int register_oom_notifier(struct notifier_block *nb); | 75 | extern int register_oom_notifier(struct notifier_block *nb); |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index c88d2a9451af..b5d13841604e 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | 7 | ||
| 8 | #include <linux/types.h> | 8 | #include <linux/types.h> |
| 9 | #include <linux/bug.h> | 9 | #include <linux/bug.h> |
| 10 | #include <linux/mmdebug.h> | ||
| 10 | #ifndef __GENERATING_BOUNDS_H | 11 | #ifndef __GENERATING_BOUNDS_H |
| 11 | #include <linux/mm_types.h> | 12 | #include <linux/mm_types.h> |
| 12 | #include <generated/bounds.h> | 13 | #include <generated/bounds.h> |
| @@ -453,6 +454,34 @@ static inline int PageTransTail(struct page *page) | |||
| 453 | } | 454 | } |
| 454 | #endif | 455 | #endif |
| 455 | 456 | ||
| 457 | /* | ||
| 458 | * If network-based swap is enabled, sl*b must keep track of whether pages | ||
| 459 | * were allocated from pfmemalloc reserves. | ||
| 460 | */ | ||
| 461 | static inline int PageSlabPfmemalloc(struct page *page) | ||
| 462 | { | ||
| 463 | VM_BUG_ON(!PageSlab(page)); | ||
| 464 | return PageActive(page); | ||
| 465 | } | ||
| 466 | |||
| 467 | static inline void SetPageSlabPfmemalloc(struct page *page) | ||
| 468 | { | ||
| 469 | VM_BUG_ON(!PageSlab(page)); | ||
| 470 | SetPageActive(page); | ||
| 471 | } | ||
| 472 | |||
| 473 | static inline void __ClearPageSlabPfmemalloc(struct page *page) | ||
| 474 | { | ||
| 475 | VM_BUG_ON(!PageSlab(page)); | ||
| 476 | __ClearPageActive(page); | ||
| 477 | } | ||
| 478 | |||
| 479 | static inline void ClearPageSlabPfmemalloc(struct page *page) | ||
| 480 | { | ||
| 481 | VM_BUG_ON(!PageSlab(page)); | ||
| 482 | ClearPageActive(page); | ||
| 483 | } | ||
| 484 | |||
| 456 | #ifdef CONFIG_MMU | 485 | #ifdef CONFIG_MMU |
| 457 | #define __PG_MLOCKED (1 << PG_mlocked) | 486 | #define __PG_MLOCKED (1 << PG_mlocked) |
| 458 | #else | 487 | #else |
diff --git a/include/linux/page-isolation.h b/include/linux/page-isolation.h index 3bdcab30ca41..105077aa7685 100644 --- a/include/linux/page-isolation.h +++ b/include/linux/page-isolation.h | |||
| @@ -1,6 +1,11 @@ | |||
| 1 | #ifndef __LINUX_PAGEISOLATION_H | 1 | #ifndef __LINUX_PAGEISOLATION_H |
| 2 | #define __LINUX_PAGEISOLATION_H | 2 | #define __LINUX_PAGEISOLATION_H |
| 3 | 3 | ||
| 4 | |||
| 5 | bool has_unmovable_pages(struct zone *zone, struct page *page, int count); | ||
| 6 | void set_pageblock_migratetype(struct page *page, int migratetype); | ||
| 7 | int move_freepages_block(struct zone *zone, struct page *page, | ||
| 8 | int migratetype); | ||
| 4 | /* | 9 | /* |
| 5 | * Changes migrate type in [start_pfn, end_pfn) to be MIGRATE_ISOLATE. | 10 | * Changes migrate type in [start_pfn, end_pfn) to be MIGRATE_ISOLATE. |
| 6 | * If specified range includes migrate types other than MOVABLE or CMA, | 11 | * If specified range includes migrate types other than MOVABLE or CMA, |
| @@ -10,7 +15,7 @@ | |||
| 10 | * free all pages in the range. test_page_isolated() can be used for | 15 | * free all pages in the range. test_page_isolated() can be used for |
| 11 | * test it. | 16 | * test it. |
| 12 | */ | 17 | */ |
| 13 | extern int | 18 | int |
| 14 | start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, | 19 | start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, |
| 15 | unsigned migratetype); | 20 | unsigned migratetype); |
| 16 | 21 | ||
| @@ -18,7 +23,7 @@ start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, | |||
| 18 | * Changes MIGRATE_ISOLATE to MIGRATE_MOVABLE. | 23 | * Changes MIGRATE_ISOLATE to MIGRATE_MOVABLE. |
| 19 | * target range is [start_pfn, end_pfn) | 24 | * target range is [start_pfn, end_pfn) |
| 20 | */ | 25 | */ |
| 21 | extern int | 26 | int |
| 22 | undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, | 27 | undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, |
| 23 | unsigned migratetype); | 28 | unsigned migratetype); |
| 24 | 29 | ||
| @@ -30,8 +35,8 @@ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn); | |||
| 30 | /* | 35 | /* |
| 31 | * Internal functions. Changes pageblock's migrate type. | 36 | * Internal functions. Changes pageblock's migrate type. |
| 32 | */ | 37 | */ |
| 33 | extern int set_migratetype_isolate(struct page *page); | 38 | int set_migratetype_isolate(struct page *page); |
| 34 | extern void unset_migratetype_isolate(struct page *page, unsigned migratetype); | 39 | void unset_migratetype_isolate(struct page *page, unsigned migratetype); |
| 35 | 40 | ||
| 36 | 41 | ||
| 37 | #endif | 42 | #endif |
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index a88cdba27809..777a524716db 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h | |||
| @@ -12,7 +12,7 @@ enum { | |||
| 12 | #ifndef __GENERATING_BOUNDS_H | 12 | #ifndef __GENERATING_BOUNDS_H |
| 13 | #include <generated/bounds.h> | 13 | #include <generated/bounds.h> |
| 14 | 14 | ||
| 15 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 15 | #ifdef CONFIG_MEMCG |
| 16 | #include <linux/bit_spinlock.h> | 16 | #include <linux/bit_spinlock.h> |
| 17 | 17 | ||
| 18 | /* | 18 | /* |
| @@ -82,7 +82,7 @@ static inline void unlock_page_cgroup(struct page_cgroup *pc) | |||
| 82 | bit_spin_unlock(PCG_LOCK, &pc->flags); | 82 | bit_spin_unlock(PCG_LOCK, &pc->flags); |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ | 85 | #else /* CONFIG_MEMCG */ |
| 86 | struct page_cgroup; | 86 | struct page_cgroup; |
| 87 | 87 | ||
| 88 | static inline void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat) | 88 | static inline void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat) |
| @@ -102,11 +102,11 @@ static inline void __init page_cgroup_init_flatmem(void) | |||
| 102 | { | 102 | { |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | #endif /* CONFIG_CGROUP_MEM_RES_CTLR */ | 105 | #endif /* CONFIG_MEMCG */ |
| 106 | 106 | ||
| 107 | #include <linux/swap.h> | 107 | #include <linux/swap.h> |
| 108 | 108 | ||
| 109 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | 109 | #ifdef CONFIG_MEMCG_SWAP |
| 110 | extern unsigned short swap_cgroup_cmpxchg(swp_entry_t ent, | 110 | extern unsigned short swap_cgroup_cmpxchg(swp_entry_t ent, |
| 111 | unsigned short old, unsigned short new); | 111 | unsigned short old, unsigned short new); |
| 112 | extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id); | 112 | extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id); |
| @@ -138,7 +138,7 @@ static inline void swap_cgroup_swapoff(int type) | |||
| 138 | return; | 138 | return; |
| 139 | } | 139 | } |
| 140 | 140 | ||
| 141 | #endif /* CONFIG_CGROUP_MEM_RES_CTLR_SWAP */ | 141 | #endif /* CONFIG_MEMCG_SWAP */ |
| 142 | 142 | ||
| 143 | #endif /* !__GENERATING_BOUNDS_H */ | 143 | #endif /* !__GENERATING_BOUNDS_H */ |
| 144 | 144 | ||
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 7cfad3bbb0cc..e42c762f0dc7 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
| @@ -286,6 +286,11 @@ static inline loff_t page_offset(struct page *page) | |||
| 286 | return ((loff_t)page->index) << PAGE_CACHE_SHIFT; | 286 | return ((loff_t)page->index) << PAGE_CACHE_SHIFT; |
| 287 | } | 287 | } |
| 288 | 288 | ||
| 289 | static inline loff_t page_file_offset(struct page *page) | ||
| 290 | { | ||
| 291 | return ((loff_t)page_file_index(page)) << PAGE_CACHE_SHIFT; | ||
| 292 | } | ||
| 293 | |||
| 289 | extern pgoff_t linear_hugepage_index(struct vm_area_struct *vma, | 294 | extern pgoff_t linear_hugepage_index(struct vm_area_struct *vma, |
| 290 | unsigned long address); | 295 | unsigned long address); |
| 291 | 296 | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index fc3526077348..6b4565c440c8 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -2149,7 +2149,7 @@ | |||
| 2149 | #define PCI_DEVICE_ID_TIGON3_5704S 0x16a8 | 2149 | #define PCI_DEVICE_ID_TIGON3_5704S 0x16a8 |
| 2150 | #define PCI_DEVICE_ID_NX2_57800_VF 0x16a9 | 2150 | #define PCI_DEVICE_ID_NX2_57800_VF 0x16a9 |
| 2151 | #define PCI_DEVICE_ID_NX2_5706S 0x16aa | 2151 | #define PCI_DEVICE_ID_NX2_5706S 0x16aa |
| 2152 | #define PCI_DEVICE_ID_NX2_57840_MF 0x16ab | 2152 | #define PCI_DEVICE_ID_NX2_57840_MF 0x16a4 |
| 2153 | #define PCI_DEVICE_ID_NX2_5708S 0x16ac | 2153 | #define PCI_DEVICE_ID_NX2_5708S 0x16ac |
| 2154 | #define PCI_DEVICE_ID_NX2_57840_VF 0x16ad | 2154 | #define PCI_DEVICE_ID_NX2_57840_VF 0x16ad |
| 2155 | #define PCI_DEVICE_ID_NX2_57810_MF 0x16ae | 2155 | #define PCI_DEVICE_ID_NX2_57810_MF 0x16ae |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 76c5c8b724a7..bdb41612bfec 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -274,6 +274,8 @@ struct perf_event_attr { | |||
| 274 | __u64 branch_sample_type; /* enum branch_sample_type */ | 274 | __u64 branch_sample_type; /* enum branch_sample_type */ |
| 275 | }; | 275 | }; |
| 276 | 276 | ||
| 277 | #define perf_flags(attr) (*(&(attr)->read_format + 1)) | ||
| 278 | |||
| 277 | /* | 279 | /* |
| 278 | * Ioctls that can be done on a perf event fd: | 280 | * Ioctls that can be done on a perf event fd: |
| 279 | */ | 281 | */ |
| @@ -926,7 +928,7 @@ struct perf_event { | |||
| 926 | struct hw_perf_event hw; | 928 | struct hw_perf_event hw; |
| 927 | 929 | ||
| 928 | struct perf_event_context *ctx; | 930 | struct perf_event_context *ctx; |
| 929 | struct file *filp; | 931 | atomic_long_t refcount; |
| 930 | 932 | ||
| 931 | /* | 933 | /* |
| 932 | * These accumulate total time (in nanoseconds) that children | 934 | * These accumulate total time (in nanoseconds) that children |
| @@ -1272,7 +1274,8 @@ static inline bool perf_paranoid_kernel(void) | |||
| 1272 | extern void perf_event_init(void); | 1274 | extern void perf_event_init(void); |
| 1273 | extern void perf_tp_event(u64 addr, u64 count, void *record, | 1275 | extern void perf_tp_event(u64 addr, u64 count, void *record, |
| 1274 | int entry_size, struct pt_regs *regs, | 1276 | int entry_size, struct pt_regs *regs, |
| 1275 | struct hlist_head *head, int rctx); | 1277 | struct hlist_head *head, int rctx, |
| 1278 | struct task_struct *task); | ||
| 1276 | extern void perf_bp_event(struct perf_event *event, void *data); | 1279 | extern void perf_bp_event(struct perf_event *event, void *data); |
| 1277 | 1280 | ||
| 1278 | #ifndef perf_misc_flags | 1281 | #ifndef perf_misc_flags |
| @@ -1295,6 +1298,7 @@ extern int perf_swevent_get_recursion_context(void); | |||
| 1295 | extern void perf_swevent_put_recursion_context(int rctx); | 1298 | extern void perf_swevent_put_recursion_context(int rctx); |
| 1296 | extern void perf_event_enable(struct perf_event *event); | 1299 | extern void perf_event_enable(struct perf_event *event); |
| 1297 | extern void perf_event_disable(struct perf_event *event); | 1300 | extern void perf_event_disable(struct perf_event *event); |
| 1301 | extern int __perf_event_disable(void *info); | ||
| 1298 | extern void perf_event_task_tick(void); | 1302 | extern void perf_event_task_tick(void); |
| 1299 | #else | 1303 | #else |
| 1300 | static inline void | 1304 | static inline void |
| @@ -1333,6 +1337,7 @@ static inline int perf_swevent_get_recursion_context(void) { return -1; } | |||
| 1333 | static inline void perf_swevent_put_recursion_context(int rctx) { } | 1337 | static inline void perf_swevent_put_recursion_context(int rctx) { } |
| 1334 | static inline void perf_event_enable(struct perf_event *event) { } | 1338 | static inline void perf_event_enable(struct perf_event *event) { } |
| 1335 | static inline void perf_event_disable(struct perf_event *event) { } | 1339 | static inline void perf_event_disable(struct perf_event *event) { } |
| 1340 | static inline int __perf_event_disable(void *info) { return -1; } | ||
| 1336 | static inline void perf_event_task_tick(void) { } | 1341 | static inline void perf_event_task_tick(void) { } |
| 1337 | #endif | 1342 | #endif |
| 1338 | 1343 | ||
diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.h index 6dd96fb45482..e9b7f4350844 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | /* This struct is private to the core and should be regarded as a cookie */ | 20 | /* This struct is private to the core and should be regarded as a cookie */ |
| 21 | struct pinctrl; | 21 | struct pinctrl; |
| 22 | struct pinctrl_state; | 22 | struct pinctrl_state; |
| 23 | struct device; | ||
| 23 | 24 | ||
| 24 | #ifdef CONFIG_PINCTRL | 25 | #ifdef CONFIG_PINCTRL |
| 25 | 26 | ||
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index e11d1c0fc60f..ad1a427b5267 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
| @@ -160,4 +160,6 @@ void generic_pipe_buf_release(struct pipe_inode_info *, struct pipe_buffer *); | |||
| 160 | long pipe_fcntl(struct file *, unsigned int, unsigned long arg); | 160 | long pipe_fcntl(struct file *, unsigned int, unsigned long arg); |
| 161 | struct pipe_inode_info *get_pipe_info(struct file *file); | 161 | struct pipe_inode_info *get_pipe_info(struct file *file); |
| 162 | 162 | ||
| 163 | int create_pipe_files(struct file **, int); | ||
| 164 | |||
| 163 | #endif | 165 | #endif |
diff --git a/include/linux/random.h b/include/linux/random.h index 8f74538c96db..ac621ce886ca 100644 --- a/include/linux/random.h +++ b/include/linux/random.h | |||
| @@ -48,13 +48,13 @@ struct rnd_state { | |||
| 48 | 48 | ||
| 49 | #ifdef __KERNEL__ | 49 | #ifdef __KERNEL__ |
| 50 | 50 | ||
| 51 | extern void rand_initialize_irq(int irq); | 51 | extern void add_device_randomness(const void *, unsigned int); |
| 52 | |||
| 53 | extern void add_input_randomness(unsigned int type, unsigned int code, | 52 | extern void add_input_randomness(unsigned int type, unsigned int code, |
| 54 | unsigned int value); | 53 | unsigned int value); |
| 55 | extern void add_interrupt_randomness(int irq); | 54 | extern void add_interrupt_randomness(int irq, int irq_flags); |
| 56 | 55 | ||
| 57 | extern void get_random_bytes(void *buf, int nbytes); | 56 | extern void get_random_bytes(void *buf, int nbytes); |
| 57 | extern void get_random_bytes_arch(void *buf, int nbytes); | ||
| 58 | void generate_random_uuid(unsigned char uuid_out[16]); | 58 | void generate_random_uuid(unsigned char uuid_out[16]); |
| 59 | 59 | ||
| 60 | #ifndef MODULE | 60 | #ifndef MODULE |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 68dcffaa62a0..23bddac4bad8 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -334,14 +334,6 @@ static inline void lockup_detector_init(void) | |||
| 334 | } | 334 | } |
| 335 | #endif | 335 | #endif |
| 336 | 336 | ||
| 337 | #if defined(CONFIG_LOCKUP_DETECTOR) && defined(CONFIG_SUSPEND) | ||
| 338 | void lockup_detector_bootcpu_resume(void); | ||
| 339 | #else | ||
| 340 | static inline void lockup_detector_bootcpu_resume(void) | ||
| 341 | { | ||
| 342 | } | ||
| 343 | #endif | ||
| 344 | |||
| 345 | #ifdef CONFIG_DETECT_HUNG_TASK | 337 | #ifdef CONFIG_DETECT_HUNG_TASK |
| 346 | extern unsigned int sysctl_hung_task_panic; | 338 | extern unsigned int sysctl_hung_task_panic; |
| 347 | extern unsigned long sysctl_hung_task_check_count; | 339 | extern unsigned long sysctl_hung_task_check_count; |
| @@ -962,7 +954,6 @@ struct sched_domain { | |||
| 962 | unsigned int smt_gain; | 954 | unsigned int smt_gain; |
| 963 | int flags; /* See SD_* */ | 955 | int flags; /* See SD_* */ |
| 964 | int level; | 956 | int level; |
| 965 | int idle_buddy; /* cpu assigned to select_idle_sibling() */ | ||
| 966 | 957 | ||
| 967 | /* Runtime fields. */ | 958 | /* Runtime fields. */ |
| 968 | unsigned long last_balance; /* init to jiffies. units in jiffies */ | 959 | unsigned long last_balance; /* init to jiffies. units in jiffies */ |
| @@ -1584,7 +1575,7 @@ struct task_struct { | |||
| 1584 | /* bitmask and counter of trace recursion */ | 1575 | /* bitmask and counter of trace recursion */ |
| 1585 | unsigned long trace_recursion; | 1576 | unsigned long trace_recursion; |
| 1586 | #endif /* CONFIG_TRACING */ | 1577 | #endif /* CONFIG_TRACING */ |
| 1587 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR /* memcg uses this to do batch job */ | 1578 | #ifdef CONFIG_MEMCG /* memcg uses this to do batch job */ |
| 1588 | struct memcg_batch_info { | 1579 | struct memcg_batch_info { |
| 1589 | int do_batch; /* incremented when batch uncharge started */ | 1580 | int do_batch; /* incremented when batch uncharge started */ |
| 1590 | struct mem_cgroup *memcg; /* target memcg of uncharge */ | 1581 | struct mem_cgroup *memcg; /* target memcg of uncharge */ |
| @@ -1894,6 +1885,13 @@ static inline void rcu_copy_process(struct task_struct *p) | |||
| 1894 | 1885 | ||
| 1895 | #endif | 1886 | #endif |
| 1896 | 1887 | ||
| 1888 | static inline void tsk_restore_flags(struct task_struct *task, | ||
| 1889 | unsigned long orig_flags, unsigned long flags) | ||
| 1890 | { | ||
| 1891 | task->flags &= ~flags; | ||
| 1892 | task->flags |= orig_flags & flags; | ||
| 1893 | } | ||
| 1894 | |||
| 1897 | #ifdef CONFIG_SMP | 1895 | #ifdef CONFIG_SMP |
| 1898 | extern void do_set_cpus_allowed(struct task_struct *p, | 1896 | extern void do_set_cpus_allowed(struct task_struct *p, |
| 1899 | const struct cpumask *new_mask); | 1897 | const struct cpumask *new_mask); |
diff --git a/include/linux/security.h b/include/linux/security.h index 4e5a73cdbbef..d143b8e01954 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -118,6 +118,7 @@ void reset_security_ops(void); | |||
| 118 | extern unsigned long mmap_min_addr; | 118 | extern unsigned long mmap_min_addr; |
| 119 | extern unsigned long dac_mmap_min_addr; | 119 | extern unsigned long dac_mmap_min_addr; |
| 120 | #else | 120 | #else |
| 121 | #define mmap_min_addr 0UL | ||
| 121 | #define dac_mmap_min_addr 0UL | 122 | #define dac_mmap_min_addr 0UL |
| 122 | #endif | 123 | #endif |
| 123 | 124 | ||
| @@ -1242,8 +1243,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 1242 | * Check that the @parent process has sufficient permission to trace the | 1243 | * Check that the @parent process has sufficient permission to trace the |
| 1243 | * current process before allowing the current process to present itself | 1244 | * current process before allowing the current process to present itself |
| 1244 | * to the @parent process for tracing. | 1245 | * to the @parent process for tracing. |
| 1245 | * The parent process will still have to undergo the ptrace_access_check | ||
| 1246 | * checks before it is allowed to trace this one. | ||
| 1247 | * @parent contains the task_struct structure for debugger process. | 1246 | * @parent contains the task_struct structure for debugger process. |
| 1248 | * Return 0 if permission is granted. | 1247 | * Return 0 if permission is granted. |
| 1249 | * @capget: | 1248 | * @capget: |
diff --git a/include/linux/shdma-base.h b/include/linux/shdma-base.h index 93f9821554b6..a3728bf66f0e 100644 --- a/include/linux/shdma-base.h +++ b/include/linux/shdma-base.h | |||
| @@ -50,6 +50,7 @@ struct shdma_desc { | |||
| 50 | struct list_head node; | 50 | struct list_head node; |
| 51 | struct dma_async_tx_descriptor async_tx; | 51 | struct dma_async_tx_descriptor async_tx; |
| 52 | enum dma_transfer_direction direction; | 52 | enum dma_transfer_direction direction; |
| 53 | size_t partial; | ||
| 53 | dma_cookie_t cookie; | 54 | dma_cookie_t cookie; |
| 54 | int chunks; | 55 | int chunks; |
| 55 | int mark; | 56 | int mark; |
| @@ -98,6 +99,7 @@ struct shdma_ops { | |||
| 98 | void (*start_xfer)(struct shdma_chan *, struct shdma_desc *); | 99 | void (*start_xfer)(struct shdma_chan *, struct shdma_desc *); |
| 99 | struct shdma_desc *(*embedded_desc)(void *, int); | 100 | struct shdma_desc *(*embedded_desc)(void *, int); |
| 100 | bool (*chan_irq)(struct shdma_chan *, int); | 101 | bool (*chan_irq)(struct shdma_chan *, int); |
| 102 | size_t (*get_partial)(struct shdma_chan *, struct shdma_desc *); | ||
| 101 | }; | 103 | }; |
| 102 | 104 | ||
| 103 | struct shdma_dev { | 105 | struct shdma_dev { |
diff --git a/include/linux/shrinker.h b/include/linux/shrinker.h index 07ceb97d53fa..ac6b8ee07825 100644 --- a/include/linux/shrinker.h +++ b/include/linux/shrinker.h | |||
| @@ -20,7 +20,6 @@ struct shrink_control { | |||
| 20 | * 'nr_to_scan' entries and attempt to free them up. It should return | 20 | * 'nr_to_scan' entries and attempt to free them up. It should return |
| 21 | * the number of objects which remain in the cache. If it returns -1, it means | 21 | * the number of objects which remain in the cache. If it returns -1, it means |
| 22 | * it cannot do any scanning at this time (eg. there is a risk of deadlock). | 22 | * it cannot do any scanning at this time (eg. there is a risk of deadlock). |
| 23 | * The callback must not return -1 if nr_to_scan is zero. | ||
| 24 | * | 23 | * |
| 25 | * The 'gfpmask' refers to the allocation we are currently trying to | 24 | * The 'gfpmask' refers to the allocation we are currently trying to |
| 26 | * fulfil. | 25 | * fulfil. |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index d205c4be7f5b..7632c87da2c9 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -462,6 +462,7 @@ struct sk_buff { | |||
| 462 | #ifdef CONFIG_IPV6_NDISC_NODETYPE | 462 | #ifdef CONFIG_IPV6_NDISC_NODETYPE |
| 463 | __u8 ndisc_nodetype:2; | 463 | __u8 ndisc_nodetype:2; |
| 464 | #endif | 464 | #endif |
| 465 | __u8 pfmemalloc:1; | ||
| 465 | __u8 ooo_okay:1; | 466 | __u8 ooo_okay:1; |
| 466 | __u8 l4_rxhash:1; | 467 | __u8 l4_rxhash:1; |
| 467 | __u8 wifi_acked_valid:1; | 468 | __u8 wifi_acked_valid:1; |
| @@ -502,6 +503,15 @@ struct sk_buff { | |||
| 502 | #include <linux/slab.h> | 503 | #include <linux/slab.h> |
| 503 | 504 | ||
| 504 | 505 | ||
| 506 | #define SKB_ALLOC_FCLONE 0x01 | ||
| 507 | #define SKB_ALLOC_RX 0x02 | ||
| 508 | |||
| 509 | /* Returns true if the skb was allocated from PFMEMALLOC reserves */ | ||
| 510 | static inline bool skb_pfmemalloc(const struct sk_buff *skb) | ||
| 511 | { | ||
| 512 | return unlikely(skb->pfmemalloc); | ||
| 513 | } | ||
| 514 | |||
| 505 | /* | 515 | /* |
| 506 | * skb might have a dst pointer attached, refcounted or not. | 516 | * skb might have a dst pointer attached, refcounted or not. |
| 507 | * _skb_refdst low order bit is set if refcount was _not_ taken | 517 | * _skb_refdst low order bit is set if refcount was _not_ taken |
| @@ -565,7 +575,7 @@ extern bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from, | |||
| 565 | bool *fragstolen, int *delta_truesize); | 575 | bool *fragstolen, int *delta_truesize); |
| 566 | 576 | ||
| 567 | extern struct sk_buff *__alloc_skb(unsigned int size, | 577 | extern struct sk_buff *__alloc_skb(unsigned int size, |
| 568 | gfp_t priority, int fclone, int node); | 578 | gfp_t priority, int flags, int node); |
| 569 | extern struct sk_buff *build_skb(void *data, unsigned int frag_size); | 579 | extern struct sk_buff *build_skb(void *data, unsigned int frag_size); |
| 570 | static inline struct sk_buff *alloc_skb(unsigned int size, | 580 | static inline struct sk_buff *alloc_skb(unsigned int size, |
| 571 | gfp_t priority) | 581 | gfp_t priority) |
| @@ -576,7 +586,7 @@ static inline struct sk_buff *alloc_skb(unsigned int size, | |||
| 576 | static inline struct sk_buff *alloc_skb_fclone(unsigned int size, | 586 | static inline struct sk_buff *alloc_skb_fclone(unsigned int size, |
| 577 | gfp_t priority) | 587 | gfp_t priority) |
| 578 | { | 588 | { |
| 579 | return __alloc_skb(size, priority, 1, NUMA_NO_NODE); | 589 | return __alloc_skb(size, priority, SKB_ALLOC_FCLONE, NUMA_NO_NODE); |
| 580 | } | 590 | } |
| 581 | 591 | ||
| 582 | extern void skb_recycle(struct sk_buff *skb); | 592 | extern void skb_recycle(struct sk_buff *skb); |
| @@ -1237,6 +1247,17 @@ static inline void __skb_fill_page_desc(struct sk_buff *skb, int i, | |||
| 1237 | { | 1247 | { |
| 1238 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; | 1248 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; |
| 1239 | 1249 | ||
| 1250 | /* | ||
| 1251 | * Propagate page->pfmemalloc to the skb if we can. The problem is | ||
| 1252 | * that not all callers have unique ownership of the page. If | ||
| 1253 | * pfmemalloc is set, we check the mapping as a mapping implies | ||
| 1254 | * page->index is set (index and pfmemalloc share space). | ||
| 1255 | * If it's a valid mapping, we cannot use page->pfmemalloc but we | ||
| 1256 | * do not lose pfmemalloc information as the pages would not be | ||
| 1257 | * allocated using __GFP_MEMALLOC. | ||
| 1258 | */ | ||
| 1259 | if (page->pfmemalloc && !page->mapping) | ||
| 1260 | skb->pfmemalloc = true; | ||
| 1240 | frag->page.p = page; | 1261 | frag->page.p = page; |
| 1241 | frag->page_offset = off; | 1262 | frag->page_offset = off; |
| 1242 | skb_frag_size_set(frag, size); | 1263 | skb_frag_size_set(frag, size); |
| @@ -1753,6 +1774,61 @@ static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev, | |||
| 1753 | return __netdev_alloc_skb_ip_align(dev, length, GFP_ATOMIC); | 1774 | return __netdev_alloc_skb_ip_align(dev, length, GFP_ATOMIC); |
| 1754 | } | 1775 | } |
| 1755 | 1776 | ||
| 1777 | /* | ||
| 1778 | * __skb_alloc_page - allocate pages for ps-rx on a skb and preserve pfmemalloc data | ||
| 1779 | * @gfp_mask: alloc_pages_node mask. Set __GFP_NOMEMALLOC if not for network packet RX | ||
| 1780 | * @skb: skb to set pfmemalloc on if __GFP_MEMALLOC is used | ||
| 1781 | * @order: size of the allocation | ||
| 1782 | * | ||
| 1783 | * Allocate a new page. | ||
| 1784 | * | ||
| 1785 | * %NULL is returned if there is no free memory. | ||
| 1786 | */ | ||
| 1787 | static inline struct page *__skb_alloc_pages(gfp_t gfp_mask, | ||
| 1788 | struct sk_buff *skb, | ||
| 1789 | unsigned int order) | ||
| 1790 | { | ||
| 1791 | struct page *page; | ||
| 1792 | |||
| 1793 | gfp_mask |= __GFP_COLD; | ||
| 1794 | |||
| 1795 | if (!(gfp_mask & __GFP_NOMEMALLOC)) | ||
| 1796 | gfp_mask |= __GFP_MEMALLOC; | ||
| 1797 | |||
| 1798 | page = alloc_pages_node(NUMA_NO_NODE, gfp_mask, order); | ||
| 1799 | if (skb && page && page->pfmemalloc) | ||
| 1800 | skb->pfmemalloc = true; | ||
| 1801 | |||
| 1802 | return page; | ||
| 1803 | } | ||
| 1804 | |||
| 1805 | /** | ||
| 1806 | * __skb_alloc_page - allocate a page for ps-rx for a given skb and preserve pfmemalloc data | ||
| 1807 | * @gfp_mask: alloc_pages_node mask. Set __GFP_NOMEMALLOC if not for network packet RX | ||
| 1808 | * @skb: skb to set pfmemalloc on if __GFP_MEMALLOC is used | ||
| 1809 | * | ||
| 1810 | * Allocate a new page. | ||
| 1811 | * | ||
| 1812 | * %NULL is returned if there is no free memory. | ||
| 1813 | */ | ||
| 1814 | static inline struct page *__skb_alloc_page(gfp_t gfp_mask, | ||
| 1815 | struct sk_buff *skb) | ||
| 1816 | { | ||
| 1817 | return __skb_alloc_pages(gfp_mask, skb, 0); | ||
| 1818 | } | ||
| 1819 | |||
| 1820 | /** | ||
| 1821 | * skb_propagate_pfmemalloc - Propagate pfmemalloc if skb is allocated after RX page | ||
| 1822 | * @page: The page that was allocated from skb_alloc_page | ||
| 1823 | * @skb: The skb that may need pfmemalloc set | ||
| 1824 | */ | ||
| 1825 | static inline void skb_propagate_pfmemalloc(struct page *page, | ||
| 1826 | struct sk_buff *skb) | ||
| 1827 | { | ||
| 1828 | if (page && page->pfmemalloc) | ||
| 1829 | skb->pfmemalloc = true; | ||
| 1830 | } | ||
| 1831 | |||
| 1756 | /** | 1832 | /** |
| 1757 | * skb_frag_page - retrieve the page refered to by a paged fragment | 1833 | * skb_frag_page - retrieve the page refered to by a paged fragment |
| 1758 | * @frag: the paged fragment | 1834 | * @frag: the paged fragment |
diff --git a/include/linux/string.h b/include/linux/string.h index ffe0442e18d2..b9178812d9df 100644 --- a/include/linux/string.h +++ b/include/linux/string.h | |||
| @@ -144,8 +144,8 @@ static inline bool strstarts(const char *str, const char *prefix) | |||
| 144 | { | 144 | { |
| 145 | return strncmp(str, prefix, strlen(prefix)) == 0; | 145 | return strncmp(str, prefix, strlen(prefix)) == 0; |
| 146 | } | 146 | } |
| 147 | #endif | ||
| 148 | 147 | ||
| 149 | extern size_t memweight(const void *ptr, size_t bytes); | 148 | extern size_t memweight(const void *ptr, size_t bytes); |
| 150 | 149 | ||
| 150 | #endif /* __KERNEL__ */ | ||
| 151 | #endif /* _LINUX_STRING_H_ */ | 151 | #endif /* _LINUX_STRING_H_ */ |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 77d278defa70..bf8c49ff7530 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
| @@ -114,6 +114,7 @@ struct rpc_xprt_ops { | |||
| 114 | void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize); | 114 | void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize); |
| 115 | int (*reserve_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); | 115 | int (*reserve_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); |
| 116 | void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); | 116 | void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); |
| 117 | void (*alloc_slot)(struct rpc_xprt *xprt, struct rpc_task *task); | ||
| 117 | void (*rpcbind)(struct rpc_task *task); | 118 | void (*rpcbind)(struct rpc_task *task); |
| 118 | void (*set_port)(struct rpc_xprt *xprt, unsigned short port); | 119 | void (*set_port)(struct rpc_xprt *xprt, unsigned short port); |
| 119 | void (*connect)(struct rpc_task *task); | 120 | void (*connect)(struct rpc_task *task); |
| @@ -174,6 +175,8 @@ struct rpc_xprt { | |||
| 174 | unsigned long state; /* transport state */ | 175 | unsigned long state; /* transport state */ |
| 175 | unsigned char shutdown : 1, /* being shut down */ | 176 | unsigned char shutdown : 1, /* being shut down */ |
| 176 | resvport : 1; /* use a reserved port */ | 177 | resvport : 1; /* use a reserved port */ |
| 178 | unsigned int swapper; /* we're swapping over this | ||
| 179 | transport */ | ||
| 177 | unsigned int bind_index; /* bind function index */ | 180 | unsigned int bind_index; /* bind function index */ |
| 178 | 181 | ||
| 179 | /* | 182 | /* |
| @@ -279,6 +282,8 @@ void xprt_connect(struct rpc_task *task); | |||
| 279 | void xprt_reserve(struct rpc_task *task); | 282 | void xprt_reserve(struct rpc_task *task); |
| 280 | int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task); | 283 | int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task); |
| 281 | int xprt_reserve_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); | 284 | int xprt_reserve_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); |
| 285 | void xprt_alloc_slot(struct rpc_xprt *xprt, struct rpc_task *task); | ||
| 286 | void xprt_lock_and_alloc_slot(struct rpc_xprt *xprt, struct rpc_task *task); | ||
| 282 | int xprt_prepare_transmit(struct rpc_task *task); | 287 | int xprt_prepare_transmit(struct rpc_task *task); |
| 283 | void xprt_transmit(struct rpc_task *task); | 288 | void xprt_transmit(struct rpc_task *task); |
| 284 | void xprt_end_transmit(struct rpc_task *task); | 289 | void xprt_end_transmit(struct rpc_task *task); |
| @@ -316,6 +321,7 @@ void xprt_release_rqst_cong(struct rpc_task *task); | |||
| 316 | void xprt_disconnect_done(struct rpc_xprt *xprt); | 321 | void xprt_disconnect_done(struct rpc_xprt *xprt); |
| 317 | void xprt_force_disconnect(struct rpc_xprt *xprt); | 322 | void xprt_force_disconnect(struct rpc_xprt *xprt); |
| 318 | void xprt_conditional_disconnect(struct rpc_xprt *xprt, unsigned int cookie); | 323 | void xprt_conditional_disconnect(struct rpc_xprt *xprt, unsigned int cookie); |
| 324 | int xs_swapper(struct rpc_xprt *xprt, int enable); | ||
| 319 | 325 | ||
| 320 | /* | 326 | /* |
| 321 | * Reserved bit positions in xprt->state | 327 | * Reserved bit positions in xprt->state |
diff --git a/include/linux/swap.h b/include/linux/swap.h index c84ec68eaec9..388e70601413 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
| @@ -151,6 +151,7 @@ enum { | |||
| 151 | SWP_SOLIDSTATE = (1 << 4), /* blkdev seeks are cheap */ | 151 | SWP_SOLIDSTATE = (1 << 4), /* blkdev seeks are cheap */ |
| 152 | SWP_CONTINUED = (1 << 5), /* swap_map has count continuation */ | 152 | SWP_CONTINUED = (1 << 5), /* swap_map has count continuation */ |
| 153 | SWP_BLKDEV = (1 << 6), /* its a block device */ | 153 | SWP_BLKDEV = (1 << 6), /* its a block device */ |
| 154 | SWP_FILE = (1 << 7), /* set after swap_activate success */ | ||
| 154 | /* add others here before... */ | 155 | /* add others here before... */ |
| 155 | SWP_SCANNING = (1 << 8), /* refcount in scan_swap_map */ | 156 | SWP_SCANNING = (1 << 8), /* refcount in scan_swap_map */ |
| 156 | }; | 157 | }; |
| @@ -301,7 +302,7 @@ static inline void scan_unevictable_unregister_node(struct node *node) | |||
| 301 | 302 | ||
| 302 | extern int kswapd_run(int nid); | 303 | extern int kswapd_run(int nid); |
| 303 | extern void kswapd_stop(int nid); | 304 | extern void kswapd_stop(int nid); |
| 304 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 305 | #ifdef CONFIG_MEMCG |
| 305 | extern int mem_cgroup_swappiness(struct mem_cgroup *mem); | 306 | extern int mem_cgroup_swappiness(struct mem_cgroup *mem); |
| 306 | #else | 307 | #else |
| 307 | static inline int mem_cgroup_swappiness(struct mem_cgroup *mem) | 308 | static inline int mem_cgroup_swappiness(struct mem_cgroup *mem) |
| @@ -309,7 +310,7 @@ static inline int mem_cgroup_swappiness(struct mem_cgroup *mem) | |||
| 309 | return vm_swappiness; | 310 | return vm_swappiness; |
| 310 | } | 311 | } |
| 311 | #endif | 312 | #endif |
| 312 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | 313 | #ifdef CONFIG_MEMCG_SWAP |
| 313 | extern void mem_cgroup_uncharge_swap(swp_entry_t ent); | 314 | extern void mem_cgroup_uncharge_swap(swp_entry_t ent); |
| 314 | #else | 315 | #else |
| 315 | static inline void mem_cgroup_uncharge_swap(swp_entry_t ent) | 316 | static inline void mem_cgroup_uncharge_swap(swp_entry_t ent) |
| @@ -320,8 +321,14 @@ static inline void mem_cgroup_uncharge_swap(swp_entry_t ent) | |||
| 320 | /* linux/mm/page_io.c */ | 321 | /* linux/mm/page_io.c */ |
| 321 | extern int swap_readpage(struct page *); | 322 | extern int swap_readpage(struct page *); |
| 322 | extern int swap_writepage(struct page *page, struct writeback_control *wbc); | 323 | extern int swap_writepage(struct page *page, struct writeback_control *wbc); |
| 324 | extern int swap_set_page_dirty(struct page *page); | ||
| 323 | extern void end_swap_bio_read(struct bio *bio, int err); | 325 | extern void end_swap_bio_read(struct bio *bio, int err); |
| 324 | 326 | ||
| 327 | int add_swap_extent(struct swap_info_struct *sis, unsigned long start_page, | ||
| 328 | unsigned long nr_pages, sector_t start_block); | ||
| 329 | int generic_swapfile_activate(struct swap_info_struct *, struct file *, | ||
| 330 | sector_t *); | ||
| 331 | |||
| 325 | /* linux/mm/swap_state.c */ | 332 | /* linux/mm/swap_state.c */ |
| 326 | extern struct address_space swapper_space; | 333 | extern struct address_space swapper_space; |
| 327 | #define total_swapcache_pages swapper_space.nrpages | 334 | #define total_swapcache_pages swapper_space.nrpages |
| @@ -356,11 +363,12 @@ extern unsigned int count_swap_pages(int, int); | |||
| 356 | extern sector_t map_swap_page(struct page *, struct block_device **); | 363 | extern sector_t map_swap_page(struct page *, struct block_device **); |
| 357 | extern sector_t swapdev_block(int, pgoff_t); | 364 | extern sector_t swapdev_block(int, pgoff_t); |
| 358 | extern int page_swapcount(struct page *); | 365 | extern int page_swapcount(struct page *); |
| 366 | extern struct swap_info_struct *page_swap_info(struct page *); | ||
| 359 | extern int reuse_swap_page(struct page *); | 367 | extern int reuse_swap_page(struct page *); |
| 360 | extern int try_to_free_swap(struct page *); | 368 | extern int try_to_free_swap(struct page *); |
| 361 | struct backing_dev_info; | 369 | struct backing_dev_info; |
| 362 | 370 | ||
| 363 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 371 | #ifdef CONFIG_MEMCG |
| 364 | extern void | 372 | extern void |
| 365 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout); | 373 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout); |
| 366 | #else | 374 | #else |
diff --git a/include/linux/time.h b/include/linux/time.h index c81c5e40fcb5..b51e664c83e7 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
| @@ -107,11 +107,36 @@ static inline struct timespec timespec_sub(struct timespec lhs, | |||
| 107 | return ts_delta; | 107 | return ts_delta; |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | #define KTIME_MAX ((s64)~((u64)1 << 63)) | ||
| 111 | #if (BITS_PER_LONG == 64) | ||
| 112 | # define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) | ||
| 113 | #else | ||
| 114 | # define KTIME_SEC_MAX LONG_MAX | ||
| 115 | #endif | ||
| 116 | |||
| 110 | /* | 117 | /* |
| 111 | * Returns true if the timespec is norm, false if denorm: | 118 | * Returns true if the timespec is norm, false if denorm: |
| 112 | */ | 119 | */ |
| 113 | #define timespec_valid(ts) \ | 120 | static inline bool timespec_valid(const struct timespec *ts) |
| 114 | (((ts)->tv_sec >= 0) && (((unsigned long) (ts)->tv_nsec) < NSEC_PER_SEC)) | 121 | { |
| 122 | /* Dates before 1970 are bogus */ | ||
| 123 | if (ts->tv_sec < 0) | ||
| 124 | return false; | ||
| 125 | /* Can't have more nanoseconds then a second */ | ||
| 126 | if ((unsigned long)ts->tv_nsec >= NSEC_PER_SEC) | ||
| 127 | return false; | ||
| 128 | return true; | ||
| 129 | } | ||
| 130 | |||
| 131 | static inline bool timespec_valid_strict(const struct timespec *ts) | ||
| 132 | { | ||
| 133 | if (!timespec_valid(ts)) | ||
| 134 | return false; | ||
| 135 | /* Disallow values that could overflow ktime_t */ | ||
| 136 | if ((unsigned long long)ts->tv_sec >= KTIME_SEC_MAX) | ||
| 137 | return false; | ||
| 138 | return true; | ||
| 139 | } | ||
| 115 | 140 | ||
| 116 | extern void read_persistent_clock(struct timespec *ts); | 141 | extern void read_persistent_clock(struct timespec *ts); |
| 117 | extern void read_boot_clock(struct timespec *ts); | 142 | extern void read_boot_clock(struct timespec *ts); |
diff --git a/include/linux/timex.h b/include/linux/timex.h index 99bc88b1fc02..7c5ceb20e03a 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
| @@ -232,7 +232,7 @@ struct timex { | |||
| 232 | * estimated error = NTP dispersion. | 232 | * estimated error = NTP dispersion. |
| 233 | */ | 233 | */ |
| 234 | extern unsigned long tick_usec; /* USER_HZ period (usec) */ | 234 | extern unsigned long tick_usec; /* USER_HZ period (usec) */ |
| 235 | extern unsigned long tick_nsec; /* ACTHZ period (nsec) */ | 235 | extern unsigned long tick_nsec; /* SHIFTED_HZ period (nsec) */ |
| 236 | 236 | ||
| 237 | extern void ntp_init(void); | 237 | extern void ntp_init(void); |
| 238 | extern void ntp_clear(void); | 238 | extern void ntp_clear(void); |
diff --git a/include/linux/topology.h b/include/linux/topology.h index e91cd43394df..fec12d667211 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
| @@ -164,6 +164,7 @@ int arch_update_cpu_topology(void); | |||
| 164 | | 0*SD_SHARE_CPUPOWER \ | 164 | | 0*SD_SHARE_CPUPOWER \ |
| 165 | | 0*SD_SHARE_PKG_RESOURCES \ | 165 | | 0*SD_SHARE_PKG_RESOURCES \ |
| 166 | | 0*SD_SERIALIZE \ | 166 | | 0*SD_SERIALIZE \ |
| 167 | | 1*SD_PREFER_SIBLING \ | ||
| 167 | , \ | 168 | , \ |
| 168 | .last_balance = jiffies, \ | 169 | .last_balance = jiffies, \ |
| 169 | .balance_interval = 1, \ | 170 | .balance_interval = 1, \ |
diff --git a/include/linux/v4l2-common.h b/include/linux/v4l2-common.h index 0fa8b64c3cdb..4f0667e010dd 100644 --- a/include/linux/v4l2-common.h +++ b/include/linux/v4l2-common.h | |||
| @@ -53,10 +53,10 @@ | |||
| 53 | /* Backward compatibility target definitions --- to be removed. */ | 53 | /* Backward compatibility target definitions --- to be removed. */ |
| 54 | #define V4L2_SEL_TGT_CROP_ACTIVE V4L2_SEL_TGT_CROP | 54 | #define V4L2_SEL_TGT_CROP_ACTIVE V4L2_SEL_TGT_CROP |
| 55 | #define V4L2_SEL_TGT_COMPOSE_ACTIVE V4L2_SEL_TGT_COMPOSE | 55 | #define V4L2_SEL_TGT_COMPOSE_ACTIVE V4L2_SEL_TGT_COMPOSE |
| 56 | #define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL \ | 56 | #define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL V4L2_SEL_TGT_CROP |
| 57 | V4L2_SEL_TGT_CROP | 57 | #define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL V4L2_SEL_TGT_COMPOSE |
| 58 | #define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL \ | 58 | #define V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS V4L2_SEL_TGT_CROP_BOUNDS |
| 59 | V4L2_SEL_TGT_COMPOSE | 59 | #define V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS V4L2_SEL_TGT_COMPOSE_BOUNDS |
| 60 | 60 | ||
| 61 | /* Selection flags */ | 61 | /* Selection flags */ |
| 62 | #define V4L2_SEL_FLAG_GE (1 << 0) | 62 | #define V4L2_SEL_FLAG_GE (1 << 0) |
diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h new file mode 100644 index 000000000000..421d24c7f686 --- /dev/null +++ b/include/linux/v4l2-controls.h | |||
| @@ -0,0 +1,761 @@ | |||
| 1 | /* | ||
| 2 | * Video for Linux Two controls header file | ||
| 3 | * | ||
| 4 | * Copyright (C) 1999-2012 the contributors | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * Alternatively you can redistribute this file under the terms of the | ||
| 17 | * BSD license as stated below: | ||
| 18 | * | ||
| 19 | * Redistribution and use in source and binary forms, with or without | ||
| 20 | * modification, are permitted provided that the following conditions | ||
| 21 | * are met: | ||
| 22 | * 1. Redistributions of source code must retain the above copyright | ||
| 23 | * notice, this list of conditions and the following disclaimer. | ||
| 24 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 25 | * notice, this list of conditions and the following disclaimer in | ||
| 26 | * the documentation and/or other materials provided with the | ||
| 27 | * distribution. | ||
| 28 | * 3. The names of its contributors may not be used to endorse or promote | ||
| 29 | * products derived from this software without specific prior written | ||
| 30 | * permission. | ||
| 31 | * | ||
| 32 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| 33 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| 34 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
| 35 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
| 36 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 37 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED | ||
| 38 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
| 39 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| 40 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| 41 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
| 42 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 43 | * | ||
| 44 | * The contents of this header was split off from videodev2.h. All control | ||
| 45 | * definitions should be added to this header, which is included by | ||
| 46 | * videodev2.h. | ||
| 47 | */ | ||
| 48 | |||
| 49 | #ifndef __LINUX_V4L2_CONTROLS_H | ||
| 50 | #define __LINUX_V4L2_CONTROLS_H | ||
| 51 | |||
| 52 | /* Control classes */ | ||
| 53 | #define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */ | ||
| 54 | #define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */ | ||
| 55 | #define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */ | ||
| 56 | #define V4L2_CTRL_CLASS_FM_TX 0x009b0000 /* FM Modulator control class */ | ||
| 57 | #define V4L2_CTRL_CLASS_FLASH 0x009c0000 /* Camera flash controls */ | ||
| 58 | #define V4L2_CTRL_CLASS_JPEG 0x009d0000 /* JPEG-compression controls */ | ||
| 59 | #define V4L2_CTRL_CLASS_IMAGE_SOURCE 0x009e0000 /* Image source controls */ | ||
| 60 | #define V4L2_CTRL_CLASS_IMAGE_PROC 0x009f0000 /* Image processing controls */ | ||
| 61 | #define V4L2_CTRL_CLASS_DV 0x00a00000 /* Digital Video controls */ | ||
| 62 | |||
| 63 | /* User-class control IDs */ | ||
| 64 | |||
| 65 | #define V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900) | ||
| 66 | #define V4L2_CID_USER_BASE V4L2_CID_BASE | ||
| 67 | #define V4L2_CID_USER_CLASS (V4L2_CTRL_CLASS_USER | 1) | ||
| 68 | #define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE+0) | ||
| 69 | #define V4L2_CID_CONTRAST (V4L2_CID_BASE+1) | ||
| 70 | #define V4L2_CID_SATURATION (V4L2_CID_BASE+2) | ||
| 71 | #define V4L2_CID_HUE (V4L2_CID_BASE+3) | ||
| 72 | #define V4L2_CID_AUDIO_VOLUME (V4L2_CID_BASE+5) | ||
| 73 | #define V4L2_CID_AUDIO_BALANCE (V4L2_CID_BASE+6) | ||
| 74 | #define V4L2_CID_AUDIO_BASS (V4L2_CID_BASE+7) | ||
| 75 | #define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE+8) | ||
| 76 | #define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE+9) | ||
| 77 | #define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE+10) | ||
| 78 | #define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11) /* Deprecated */ | ||
| 79 | #define V4L2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE+12) | ||
| 80 | #define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE+13) | ||
| 81 | #define V4L2_CID_RED_BALANCE (V4L2_CID_BASE+14) | ||
| 82 | #define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE+15) | ||
| 83 | #define V4L2_CID_GAMMA (V4L2_CID_BASE+16) | ||
| 84 | #define V4L2_CID_WHITENESS (V4L2_CID_GAMMA) /* Deprecated */ | ||
| 85 | #define V4L2_CID_EXPOSURE (V4L2_CID_BASE+17) | ||
| 86 | #define V4L2_CID_AUTOGAIN (V4L2_CID_BASE+18) | ||
| 87 | #define V4L2_CID_GAIN (V4L2_CID_BASE+19) | ||
| 88 | #define V4L2_CID_HFLIP (V4L2_CID_BASE+20) | ||
| 89 | #define V4L2_CID_VFLIP (V4L2_CID_BASE+21) | ||
| 90 | |||
| 91 | /* Deprecated; use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */ | ||
| 92 | #define V4L2_CID_HCENTER (V4L2_CID_BASE+22) | ||
| 93 | #define V4L2_CID_VCENTER (V4L2_CID_BASE+23) | ||
| 94 | |||
| 95 | #define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24) | ||
| 96 | enum v4l2_power_line_frequency { | ||
| 97 | V4L2_CID_POWER_LINE_FREQUENCY_DISABLED = 0, | ||
| 98 | V4L2_CID_POWER_LINE_FREQUENCY_50HZ = 1, | ||
| 99 | V4L2_CID_POWER_LINE_FREQUENCY_60HZ = 2, | ||
| 100 | V4L2_CID_POWER_LINE_FREQUENCY_AUTO = 3, | ||
| 101 | }; | ||
| 102 | #define V4L2_CID_HUE_AUTO (V4L2_CID_BASE+25) | ||
| 103 | #define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE+26) | ||
| 104 | #define V4L2_CID_SHARPNESS (V4L2_CID_BASE+27) | ||
| 105 | #define V4L2_CID_BACKLIGHT_COMPENSATION (V4L2_CID_BASE+28) | ||
| 106 | #define V4L2_CID_CHROMA_AGC (V4L2_CID_BASE+29) | ||
| 107 | #define V4L2_CID_COLOR_KILLER (V4L2_CID_BASE+30) | ||
| 108 | #define V4L2_CID_COLORFX (V4L2_CID_BASE+31) | ||
| 109 | enum v4l2_colorfx { | ||
| 110 | V4L2_COLORFX_NONE = 0, | ||
| 111 | V4L2_COLORFX_BW = 1, | ||
| 112 | V4L2_COLORFX_SEPIA = 2, | ||
| 113 | V4L2_COLORFX_NEGATIVE = 3, | ||
| 114 | V4L2_COLORFX_EMBOSS = 4, | ||
| 115 | V4L2_COLORFX_SKETCH = 5, | ||
| 116 | V4L2_COLORFX_SKY_BLUE = 6, | ||
| 117 | V4L2_COLORFX_GRASS_GREEN = 7, | ||
| 118 | V4L2_COLORFX_SKIN_WHITEN = 8, | ||
| 119 | V4L2_COLORFX_VIVID = 9, | ||
| 120 | V4L2_COLORFX_AQUA = 10, | ||
| 121 | V4L2_COLORFX_ART_FREEZE = 11, | ||
| 122 | V4L2_COLORFX_SILHOUETTE = 12, | ||
| 123 | V4L2_COLORFX_SOLARIZATION = 13, | ||
| 124 | V4L2_COLORFX_ANTIQUE = 14, | ||
| 125 | V4L2_COLORFX_SET_CBCR = 15, | ||
| 126 | }; | ||
| 127 | #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) | ||
| 128 | #define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) | ||
| 129 | |||
| 130 | #define V4L2_CID_ROTATE (V4L2_CID_BASE+34) | ||
| 131 | #define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35) | ||
| 132 | |||
| 133 | #define V4L2_CID_CHROMA_GAIN (V4L2_CID_BASE+36) | ||
| 134 | |||
| 135 | #define V4L2_CID_ILLUMINATORS_1 (V4L2_CID_BASE+37) | ||
| 136 | #define V4L2_CID_ILLUMINATORS_2 (V4L2_CID_BASE+38) | ||
| 137 | |||
| 138 | #define V4L2_CID_MIN_BUFFERS_FOR_CAPTURE (V4L2_CID_BASE+39) | ||
| 139 | #define V4L2_CID_MIN_BUFFERS_FOR_OUTPUT (V4L2_CID_BASE+40) | ||
| 140 | |||
| 141 | #define V4L2_CID_ALPHA_COMPONENT (V4L2_CID_BASE+41) | ||
| 142 | #define V4L2_CID_COLORFX_CBCR (V4L2_CID_BASE+42) | ||
| 143 | |||
| 144 | /* last CID + 1 */ | ||
| 145 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+43) | ||
| 146 | |||
| 147 | |||
| 148 | /* MPEG-class control IDs */ | ||
| 149 | |||
| 150 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) | ||
| 151 | #define V4L2_CID_MPEG_CLASS (V4L2_CTRL_CLASS_MPEG | 1) | ||
| 152 | |||
| 153 | /* MPEG streams, specific to multiplexed streams */ | ||
| 154 | #define V4L2_CID_MPEG_STREAM_TYPE (V4L2_CID_MPEG_BASE+0) | ||
| 155 | enum v4l2_mpeg_stream_type { | ||
| 156 | V4L2_MPEG_STREAM_TYPE_MPEG2_PS = 0, /* MPEG-2 program stream */ | ||
| 157 | V4L2_MPEG_STREAM_TYPE_MPEG2_TS = 1, /* MPEG-2 transport stream */ | ||
| 158 | V4L2_MPEG_STREAM_TYPE_MPEG1_SS = 2, /* MPEG-1 system stream */ | ||
| 159 | V4L2_MPEG_STREAM_TYPE_MPEG2_DVD = 3, /* MPEG-2 DVD-compatible stream */ | ||
| 160 | V4L2_MPEG_STREAM_TYPE_MPEG1_VCD = 4, /* MPEG-1 VCD-compatible stream */ | ||
| 161 | V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD = 5, /* MPEG-2 SVCD-compatible stream */ | ||
| 162 | }; | ||
| 163 | #define V4L2_CID_MPEG_STREAM_PID_PMT (V4L2_CID_MPEG_BASE+1) | ||
| 164 | #define V4L2_CID_MPEG_STREAM_PID_AUDIO (V4L2_CID_MPEG_BASE+2) | ||
| 165 | #define V4L2_CID_MPEG_STREAM_PID_VIDEO (V4L2_CID_MPEG_BASE+3) | ||
| 166 | #define V4L2_CID_MPEG_STREAM_PID_PCR (V4L2_CID_MPEG_BASE+4) | ||
| 167 | #define V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (V4L2_CID_MPEG_BASE+5) | ||
| 168 | #define V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (V4L2_CID_MPEG_BASE+6) | ||
| 169 | #define V4L2_CID_MPEG_STREAM_VBI_FMT (V4L2_CID_MPEG_BASE+7) | ||
| 170 | enum v4l2_mpeg_stream_vbi_fmt { | ||
| 171 | V4L2_MPEG_STREAM_VBI_FMT_NONE = 0, /* No VBI in the MPEG stream */ | ||
| 172 | V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1, /* VBI in private packets, IVTV format */ | ||
| 173 | }; | ||
| 174 | |||
| 175 | /* MPEG audio controls specific to multiplexed streams */ | ||
| 176 | #define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ (V4L2_CID_MPEG_BASE+100) | ||
| 177 | enum v4l2_mpeg_audio_sampling_freq { | ||
| 178 | V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100 = 0, | ||
| 179 | V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000 = 1, | ||
| 180 | V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000 = 2, | ||
| 181 | }; | ||
| 182 | #define V4L2_CID_MPEG_AUDIO_ENCODING (V4L2_CID_MPEG_BASE+101) | ||
| 183 | enum v4l2_mpeg_audio_encoding { | ||
| 184 | V4L2_MPEG_AUDIO_ENCODING_LAYER_1 = 0, | ||
| 185 | V4L2_MPEG_AUDIO_ENCODING_LAYER_2 = 1, | ||
| 186 | V4L2_MPEG_AUDIO_ENCODING_LAYER_3 = 2, | ||
| 187 | V4L2_MPEG_AUDIO_ENCODING_AAC = 3, | ||
| 188 | V4L2_MPEG_AUDIO_ENCODING_AC3 = 4, | ||
| 189 | }; | ||
| 190 | #define V4L2_CID_MPEG_AUDIO_L1_BITRATE (V4L2_CID_MPEG_BASE+102) | ||
| 191 | enum v4l2_mpeg_audio_l1_bitrate { | ||
| 192 | V4L2_MPEG_AUDIO_L1_BITRATE_32K = 0, | ||
| 193 | V4L2_MPEG_AUDIO_L1_BITRATE_64K = 1, | ||
| 194 | V4L2_MPEG_AUDIO_L1_BITRATE_96K = 2, | ||
| 195 | V4L2_MPEG_AUDIO_L1_BITRATE_128K = 3, | ||
| 196 | V4L2_MPEG_AUDIO_L1_BITRATE_160K = 4, | ||
| 197 | V4L2_MPEG_AUDIO_L1_BITRATE_192K = 5, | ||
| 198 | V4L2_MPEG_AUDIO_L1_BITRATE_224K = 6, | ||
| 199 | V4L2_MPEG_AUDIO_L1_BITRATE_256K = 7, | ||
| 200 | V4L2_MPEG_AUDIO_L1_BITRATE_288K = 8, | ||
| 201 | V4L2_MPEG_AUDIO_L1_BITRATE_320K = 9, | ||
| 202 | V4L2_MPEG_AUDIO_L1_BITRATE_352K = 10, | ||
| 203 | V4L2_MPEG_AUDIO_L1_BITRATE_384K = 11, | ||
| 204 | V4L2_MPEG_AUDIO_L1_BITRATE_416K = 12, | ||
| 205 | V4L2_MPEG_AUDIO_L1_BITRATE_448K = 13, | ||
| 206 | }; | ||
| 207 | #define V4L2_CID_MPEG_AUDIO_L2_BITRATE (V4L2_CID_MPEG_BASE+103) | ||
| 208 | enum v4l2_mpeg_audio_l2_bitrate { | ||
| 209 | V4L2_MPEG_AUDIO_L2_BITRATE_32K = 0, | ||
| 210 | V4L2_MPEG_AUDIO_L2_BITRATE_48K = 1, | ||
| 211 | V4L2_MPEG_AUDIO_L2_BITRATE_56K = 2, | ||
| 212 | V4L2_MPEG_AUDIO_L2_BITRATE_64K = 3, | ||
| 213 | V4L2_MPEG_AUDIO_L2_BITRATE_80K = 4, | ||
| 214 | V4L2_MPEG_AUDIO_L2_BITRATE_96K = 5, | ||
| 215 | V4L2_MPEG_AUDIO_L2_BITRATE_112K = 6, | ||
| 216 | V4L2_MPEG_AUDIO_L2_BITRATE_128K = 7, | ||
| 217 | V4L2_MPEG_AUDIO_L2_BITRATE_160K = 8, | ||
| 218 | V4L2_MPEG_AUDIO_L2_BITRATE_192K = 9, | ||
| 219 | V4L2_MPEG_AUDIO_L2_BITRATE_224K = 10, | ||
| 220 | V4L2_MPEG_AUDIO_L2_BITRATE_256K = 11, | ||
| 221 | V4L2_MPEG_AUDIO_L2_BITRATE_320K = 12, | ||
| 222 | V4L2_MPEG_AUDIO_L2_BITRATE_384K = 13, | ||
| 223 | }; | ||
| 224 | #define V4L2_CID_MPEG_AUDIO_L3_BITRATE (V4L2_CID_MPEG_BASE+104) | ||
| 225 | enum v4l2_mpeg_audio_l3_bitrate { | ||
| 226 | V4L2_MPEG_AUDIO_L3_BITRATE_32K = 0, | ||
| 227 | V4L2_MPEG_AUDIO_L3_BITRATE_40K = 1, | ||
| 228 | V4L2_MPEG_AUDIO_L3_BITRATE_48K = 2, | ||
| 229 | V4L2_MPEG_AUDIO_L3_BITRATE_56K = 3, | ||
| 230 | V4L2_MPEG_AUDIO_L3_BITRATE_64K = 4, | ||
| 231 | V4L2_MPEG_AUDIO_L3_BITRATE_80K = 5, | ||
| 232 | V4L2_MPEG_AUDIO_L3_BITRATE_96K = 6, | ||
| 233 | V4L2_MPEG_AUDIO_L3_BITRATE_112K = 7, | ||
| 234 | V4L2_MPEG_AUDIO_L3_BITRATE_128K = 8, | ||
| 235 | V4L2_MPEG_AUDIO_L3_BITRATE_160K = 9, | ||
| 236 | V4L2_MPEG_AUDIO_L3_BITRATE_192K = 10, | ||
| 237 | V4L2_MPEG_AUDIO_L3_BITRATE_224K = 11, | ||
| 238 | V4L2_MPEG_AUDIO_L3_BITRATE_256K = 12, | ||
| 239 | V4L2_MPEG_AUDIO_L3_BITRATE_320K = 13, | ||
| 240 | }; | ||
| 241 | #define V4L2_CID_MPEG_AUDIO_MODE (V4L2_CID_MPEG_BASE+105) | ||
| 242 | enum v4l2_mpeg_audio_mode { | ||
| 243 | V4L2_MPEG_AUDIO_MODE_STEREO = 0, | ||
| 244 | V4L2_MPEG_AUDIO_MODE_JOINT_STEREO = 1, | ||
| 245 | V4L2_MPEG_AUDIO_MODE_DUAL = 2, | ||
| 246 | V4L2_MPEG_AUDIO_MODE_MONO = 3, | ||
| 247 | }; | ||
| 248 | #define V4L2_CID_MPEG_AUDIO_MODE_EXTENSION (V4L2_CID_MPEG_BASE+106) | ||
| 249 | enum v4l2_mpeg_audio_mode_extension { | ||
| 250 | V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4 = 0, | ||
| 251 | V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8 = 1, | ||
| 252 | V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12 = 2, | ||
| 253 | V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16 = 3, | ||
| 254 | }; | ||
| 255 | #define V4L2_CID_MPEG_AUDIO_EMPHASIS (V4L2_CID_MPEG_BASE+107) | ||
| 256 | enum v4l2_mpeg_audio_emphasis { | ||
| 257 | V4L2_MPEG_AUDIO_EMPHASIS_NONE = 0, | ||
| 258 | V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS = 1, | ||
| 259 | V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17 = 2, | ||
| 260 | }; | ||
| 261 | #define V4L2_CID_MPEG_AUDIO_CRC (V4L2_CID_MPEG_BASE+108) | ||
| 262 | enum v4l2_mpeg_audio_crc { | ||
| 263 | V4L2_MPEG_AUDIO_CRC_NONE = 0, | ||
| 264 | V4L2_MPEG_AUDIO_CRC_CRC16 = 1, | ||
| 265 | }; | ||
| 266 | #define V4L2_CID_MPEG_AUDIO_MUTE (V4L2_CID_MPEG_BASE+109) | ||
| 267 | #define V4L2_CID_MPEG_AUDIO_AAC_BITRATE (V4L2_CID_MPEG_BASE+110) | ||
| 268 | #define V4L2_CID_MPEG_AUDIO_AC3_BITRATE (V4L2_CID_MPEG_BASE+111) | ||
| 269 | enum v4l2_mpeg_audio_ac3_bitrate { | ||
| 270 | V4L2_MPEG_AUDIO_AC3_BITRATE_32K = 0, | ||
| 271 | V4L2_MPEG_AUDIO_AC3_BITRATE_40K = 1, | ||
| 272 | V4L2_MPEG_AUDIO_AC3_BITRATE_48K = 2, | ||
| 273 | V4L2_MPEG_AUDIO_AC3_BITRATE_56K = 3, | ||
| 274 | V4L2_MPEG_AUDIO_AC3_BITRATE_64K = 4, | ||
| 275 | V4L2_MPEG_AUDIO_AC3_BITRATE_80K = 5, | ||
| 276 | V4L2_MPEG_AUDIO_AC3_BITRATE_96K = 6, | ||
| 277 | V4L2_MPEG_AUDIO_AC3_BITRATE_112K = 7, | ||
| 278 | V4L2_MPEG_AUDIO_AC3_BITRATE_128K = 8, | ||
| 279 | V4L2_MPEG_AUDIO_AC3_BITRATE_160K = 9, | ||
| 280 | V4L2_MPEG_AUDIO_AC3_BITRATE_192K = 10, | ||
| 281 | V4L2_MPEG_AUDIO_AC3_BITRATE_224K = 11, | ||
| 282 | V4L2_MPEG_AUDIO_AC3_BITRATE_256K = 12, | ||
| 283 | V4L2_MPEG_AUDIO_AC3_BITRATE_320K = 13, | ||
| 284 | V4L2_MPEG_AUDIO_AC3_BITRATE_384K = 14, | ||
| 285 | V4L2_MPEG_AUDIO_AC3_BITRATE_448K = 15, | ||
| 286 | V4L2_MPEG_AUDIO_AC3_BITRATE_512K = 16, | ||
| 287 | V4L2_MPEG_AUDIO_AC3_BITRATE_576K = 17, | ||
| 288 | V4L2_MPEG_AUDIO_AC3_BITRATE_640K = 18, | ||
| 289 | }; | ||
| 290 | #define V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK (V4L2_CID_MPEG_BASE+112) | ||
| 291 | enum v4l2_mpeg_audio_dec_playback { | ||
| 292 | V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO = 0, | ||
| 293 | V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO = 1, | ||
| 294 | V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT = 2, | ||
| 295 | V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT = 3, | ||
| 296 | V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO = 4, | ||
| 297 | V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO = 5, | ||
| 298 | }; | ||
| 299 | #define V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK (V4L2_CID_MPEG_BASE+113) | ||
| 300 | |||
| 301 | /* MPEG video controls specific to multiplexed streams */ | ||
| 302 | #define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200) | ||
| 303 | enum v4l2_mpeg_video_encoding { | ||
| 304 | V4L2_MPEG_VIDEO_ENCODING_MPEG_1 = 0, | ||
| 305 | V4L2_MPEG_VIDEO_ENCODING_MPEG_2 = 1, | ||
| 306 | V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC = 2, | ||
| 307 | }; | ||
| 308 | #define V4L2_CID_MPEG_VIDEO_ASPECT (V4L2_CID_MPEG_BASE+201) | ||
| 309 | enum v4l2_mpeg_video_aspect { | ||
| 310 | V4L2_MPEG_VIDEO_ASPECT_1x1 = 0, | ||
| 311 | V4L2_MPEG_VIDEO_ASPECT_4x3 = 1, | ||
| 312 | V4L2_MPEG_VIDEO_ASPECT_16x9 = 2, | ||
| 313 | V4L2_MPEG_VIDEO_ASPECT_221x100 = 3, | ||
| 314 | }; | ||
| 315 | #define V4L2_CID_MPEG_VIDEO_B_FRAMES (V4L2_CID_MPEG_BASE+202) | ||
| 316 | #define V4L2_CID_MPEG_VIDEO_GOP_SIZE (V4L2_CID_MPEG_BASE+203) | ||
| 317 | #define V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (V4L2_CID_MPEG_BASE+204) | ||
| 318 | #define V4L2_CID_MPEG_VIDEO_PULLDOWN (V4L2_CID_MPEG_BASE+205) | ||
| 319 | #define V4L2_CID_MPEG_VIDEO_BITRATE_MODE (V4L2_CID_MPEG_BASE+206) | ||
| 320 | enum v4l2_mpeg_video_bitrate_mode { | ||
| 321 | V4L2_MPEG_VIDEO_BITRATE_MODE_VBR = 0, | ||
| 322 | V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1, | ||
| 323 | }; | ||
| 324 | #define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_MPEG_BASE+207) | ||
| 325 | #define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_MPEG_BASE+208) | ||
| 326 | #define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_MPEG_BASE+209) | ||
| 327 | #define V4L2_CID_MPEG_VIDEO_MUTE (V4L2_CID_MPEG_BASE+210) | ||
| 328 | #define V4L2_CID_MPEG_VIDEO_MUTE_YUV (V4L2_CID_MPEG_BASE+211) | ||
| 329 | #define V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (V4L2_CID_MPEG_BASE+212) | ||
| 330 | #define V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (V4L2_CID_MPEG_BASE+213) | ||
| 331 | #define V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (V4L2_CID_MPEG_BASE+214) | ||
| 332 | #define V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (V4L2_CID_MPEG_BASE+215) | ||
| 333 | #define V4L2_CID_MPEG_VIDEO_HEADER_MODE (V4L2_CID_MPEG_BASE+216) | ||
| 334 | enum v4l2_mpeg_video_header_mode { | ||
| 335 | V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE = 0, | ||
| 336 | V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME = 1, | ||
| 337 | |||
| 338 | }; | ||
| 339 | #define V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (V4L2_CID_MPEG_BASE+217) | ||
| 340 | #define V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (V4L2_CID_MPEG_BASE+218) | ||
| 341 | #define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (V4L2_CID_MPEG_BASE+219) | ||
| 342 | #define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (V4L2_CID_MPEG_BASE+220) | ||
| 343 | #define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE (V4L2_CID_MPEG_BASE+221) | ||
| 344 | enum v4l2_mpeg_video_multi_slice_mode { | ||
| 345 | V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE = 0, | ||
| 346 | V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_MB = 1, | ||
| 347 | V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES = 2, | ||
| 348 | }; | ||
| 349 | #define V4L2_CID_MPEG_VIDEO_VBV_SIZE (V4L2_CID_MPEG_BASE+222) | ||
| 350 | #define V4L2_CID_MPEG_VIDEO_DEC_PTS (V4L2_CID_MPEG_BASE+223) | ||
| 351 | #define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_MPEG_BASE+224) | ||
| 352 | |||
| 353 | #define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300) | ||
| 354 | #define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301) | ||
| 355 | #define V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (V4L2_CID_MPEG_BASE+302) | ||
| 356 | #define V4L2_CID_MPEG_VIDEO_H263_MIN_QP (V4L2_CID_MPEG_BASE+303) | ||
| 357 | #define V4L2_CID_MPEG_VIDEO_H263_MAX_QP (V4L2_CID_MPEG_BASE+304) | ||
| 358 | #define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (V4L2_CID_MPEG_BASE+350) | ||
| 359 | #define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (V4L2_CID_MPEG_BASE+351) | ||
| 360 | #define V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (V4L2_CID_MPEG_BASE+352) | ||
| 361 | #define V4L2_CID_MPEG_VIDEO_H264_MIN_QP (V4L2_CID_MPEG_BASE+353) | ||
| 362 | #define V4L2_CID_MPEG_VIDEO_H264_MAX_QP (V4L2_CID_MPEG_BASE+354) | ||
| 363 | #define V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (V4L2_CID_MPEG_BASE+355) | ||
| 364 | #define V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (V4L2_CID_MPEG_BASE+356) | ||
| 365 | #define V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE (V4L2_CID_MPEG_BASE+357) | ||
| 366 | enum v4l2_mpeg_video_h264_entropy_mode { | ||
| 367 | V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC = 0, | ||
| 368 | V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC = 1, | ||
| 369 | }; | ||
| 370 | #define V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (V4L2_CID_MPEG_BASE+358) | ||
| 371 | #define V4L2_CID_MPEG_VIDEO_H264_LEVEL (V4L2_CID_MPEG_BASE+359) | ||
| 372 | enum v4l2_mpeg_video_h264_level { | ||
| 373 | V4L2_MPEG_VIDEO_H264_LEVEL_1_0 = 0, | ||
| 374 | V4L2_MPEG_VIDEO_H264_LEVEL_1B = 1, | ||
| 375 | V4L2_MPEG_VIDEO_H264_LEVEL_1_1 = 2, | ||
| 376 | V4L2_MPEG_VIDEO_H264_LEVEL_1_2 = 3, | ||
| 377 | V4L2_MPEG_VIDEO_H264_LEVEL_1_3 = 4, | ||
| 378 | V4L2_MPEG_VIDEO_H264_LEVEL_2_0 = 5, | ||
| 379 | V4L2_MPEG_VIDEO_H264_LEVEL_2_1 = 6, | ||
| 380 | V4L2_MPEG_VIDEO_H264_LEVEL_2_2 = 7, | ||
| 381 | V4L2_MPEG_VIDEO_H264_LEVEL_3_0 = 8, | ||
| 382 | V4L2_MPEG_VIDEO_H264_LEVEL_3_1 = 9, | ||
| 383 | V4L2_MPEG_VIDEO_H264_LEVEL_3_2 = 10, | ||
| 384 | V4L2_MPEG_VIDEO_H264_LEVEL_4_0 = 11, | ||
| 385 | V4L2_MPEG_VIDEO_H264_LEVEL_4_1 = 12, | ||
| 386 | V4L2_MPEG_VIDEO_H264_LEVEL_4_2 = 13, | ||
| 387 | V4L2_MPEG_VIDEO_H264_LEVEL_5_0 = 14, | ||
| 388 | V4L2_MPEG_VIDEO_H264_LEVEL_5_1 = 15, | ||
| 389 | }; | ||
| 390 | #define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA (V4L2_CID_MPEG_BASE+360) | ||
| 391 | #define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA (V4L2_CID_MPEG_BASE+361) | ||
| 392 | #define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE (V4L2_CID_MPEG_BASE+362) | ||
| 393 | enum v4l2_mpeg_video_h264_loop_filter_mode { | ||
| 394 | V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED = 0, | ||
| 395 | V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED = 1, | ||
| 396 | V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY = 2, | ||
| 397 | }; | ||
| 398 | #define V4L2_CID_MPEG_VIDEO_H264_PROFILE (V4L2_CID_MPEG_BASE+363) | ||
| 399 | enum v4l2_mpeg_video_h264_profile { | ||
| 400 | V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE = 0, | ||
| 401 | V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE = 1, | ||
| 402 | V4L2_MPEG_VIDEO_H264_PROFILE_MAIN = 2, | ||
| 403 | V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED = 3, | ||
| 404 | V4L2_MPEG_VIDEO_H264_PROFILE_HIGH = 4, | ||
| 405 | V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10 = 5, | ||
| 406 | V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422 = 6, | ||
| 407 | V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE = 7, | ||
| 408 | V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA = 8, | ||
| 409 | V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA = 9, | ||
| 410 | V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA = 10, | ||
| 411 | V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA = 11, | ||
| 412 | V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE = 12, | ||
| 413 | V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH = 13, | ||
| 414 | V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA = 14, | ||
| 415 | V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH = 15, | ||
| 416 | V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH = 16, | ||
| 417 | }; | ||
| 418 | #define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT (V4L2_CID_MPEG_BASE+364) | ||
| 419 | #define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH (V4L2_CID_MPEG_BASE+365) | ||
| 420 | #define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE (V4L2_CID_MPEG_BASE+366) | ||
| 421 | #define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC (V4L2_CID_MPEG_BASE+367) | ||
| 422 | enum v4l2_mpeg_video_h264_vui_sar_idc { | ||
| 423 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED = 0, | ||
| 424 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1 = 1, | ||
| 425 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11 = 2, | ||
| 426 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11 = 3, | ||
| 427 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11 = 4, | ||
| 428 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33 = 5, | ||
| 429 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11 = 6, | ||
| 430 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11 = 7, | ||
| 431 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11 = 8, | ||
| 432 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33 = 9, | ||
| 433 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11 = 10, | ||
| 434 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11 = 11, | ||
| 435 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33 = 12, | ||
| 436 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99 = 13, | ||
| 437 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3 = 14, | ||
| 438 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2 = 15, | ||
| 439 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1 = 16, | ||
| 440 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED = 17, | ||
| 441 | }; | ||
| 442 | #define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (V4L2_CID_MPEG_BASE+400) | ||
| 443 | #define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (V4L2_CID_MPEG_BASE+401) | ||
| 444 | #define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (V4L2_CID_MPEG_BASE+402) | ||
| 445 | #define V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (V4L2_CID_MPEG_BASE+403) | ||
| 446 | #define V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (V4L2_CID_MPEG_BASE+404) | ||
| 447 | #define V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL (V4L2_CID_MPEG_BASE+405) | ||
| 448 | enum v4l2_mpeg_video_mpeg4_level { | ||
| 449 | V4L2_MPEG_VIDEO_MPEG4_LEVEL_0 = 0, | ||
| 450 | V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B = 1, | ||
| 451 | V4L2_MPEG_VIDEO_MPEG4_LEVEL_1 = 2, | ||
| 452 | V4L2_MPEG_VIDEO_MPEG4_LEVEL_2 = 3, | ||
| 453 | V4L2_MPEG_VIDEO_MPEG4_LEVEL_3 = 4, | ||
| 454 | V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B = 5, | ||
| 455 | V4L2_MPEG_VIDEO_MPEG4_LEVEL_4 = 6, | ||
| 456 | V4L2_MPEG_VIDEO_MPEG4_LEVEL_5 = 7, | ||
| 457 | }; | ||
| 458 | #define V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE (V4L2_CID_MPEG_BASE+406) | ||
| 459 | enum v4l2_mpeg_video_mpeg4_profile { | ||
| 460 | V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE = 0, | ||
| 461 | V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE = 1, | ||
| 462 | V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE = 2, | ||
| 463 | V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE = 3, | ||
| 464 | V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY = 4, | ||
| 465 | }; | ||
| 466 | #define V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (V4L2_CID_MPEG_BASE+407) | ||
| 467 | |||
| 468 | /* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */ | ||
| 469 | #define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000) | ||
| 470 | #define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+0) | ||
| 471 | enum v4l2_mpeg_cx2341x_video_spatial_filter_mode { | ||
| 472 | V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL = 0, | ||
| 473 | V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO = 1, | ||
| 474 | }; | ||
| 475 | #define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (V4L2_CID_MPEG_CX2341X_BASE+1) | ||
| 476 | #define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+2) | ||
| 477 | enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type { | ||
| 478 | V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF = 0, | ||
| 479 | V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR = 1, | ||
| 480 | V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT = 2, | ||
| 481 | V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE = 3, | ||
| 482 | V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE = 4, | ||
| 483 | }; | ||
| 484 | #define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+3) | ||
| 485 | enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type { | ||
| 486 | V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF = 0, | ||
| 487 | V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR = 1, | ||
| 488 | }; | ||
| 489 | #define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+4) | ||
| 490 | enum v4l2_mpeg_cx2341x_video_temporal_filter_mode { | ||
| 491 | V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL = 0, | ||
| 492 | V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO = 1, | ||
| 493 | }; | ||
| 494 | #define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (V4L2_CID_MPEG_CX2341X_BASE+5) | ||
| 495 | #define V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+6) | ||
| 496 | enum v4l2_mpeg_cx2341x_video_median_filter_type { | ||
| 497 | V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF = 0, | ||
| 498 | V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR = 1, | ||
| 499 | V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT = 2, | ||
| 500 | V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT = 3, | ||
| 501 | V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG = 4, | ||
| 502 | }; | ||
| 503 | #define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+7) | ||
| 504 | #define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+8) | ||
| 505 | #define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+9) | ||
| 506 | #define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+10) | ||
| 507 | #define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (V4L2_CID_MPEG_CX2341X_BASE+11) | ||
| 508 | |||
| 509 | /* MPEG-class control IDs specific to the Samsung MFC 5.1 driver as defined by V4L2 */ | ||
| 510 | #define V4L2_CID_MPEG_MFC51_BASE (V4L2_CTRL_CLASS_MPEG | 0x1100) | ||
| 511 | |||
| 512 | #define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (V4L2_CID_MPEG_MFC51_BASE+0) | ||
| 513 | #define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (V4L2_CID_MPEG_MFC51_BASE+1) | ||
| 514 | #define V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE (V4L2_CID_MPEG_MFC51_BASE+2) | ||
| 515 | enum v4l2_mpeg_mfc51_video_frame_skip_mode { | ||
| 516 | V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED = 0, | ||
| 517 | V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT = 1, | ||
| 518 | V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT = 2, | ||
| 519 | }; | ||
| 520 | #define V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE (V4L2_CID_MPEG_MFC51_BASE+3) | ||
| 521 | enum v4l2_mpeg_mfc51_video_force_frame_type { | ||
| 522 | V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_DISABLED = 0, | ||
| 523 | V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_I_FRAME = 1, | ||
| 524 | V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_NOT_CODED = 2, | ||
| 525 | }; | ||
| 526 | #define V4L2_CID_MPEG_MFC51_VIDEO_PADDING (V4L2_CID_MPEG_MFC51_BASE+4) | ||
| 527 | #define V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (V4L2_CID_MPEG_MFC51_BASE+5) | ||
| 528 | #define V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (V4L2_CID_MPEG_MFC51_BASE+6) | ||
| 529 | #define V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (V4L2_CID_MPEG_MFC51_BASE+7) | ||
| 530 | #define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (V4L2_CID_MPEG_MFC51_BASE+50) | ||
| 531 | #define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (V4L2_CID_MPEG_MFC51_BASE+51) | ||
| 532 | #define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (V4L2_CID_MPEG_MFC51_BASE+52) | ||
| 533 | #define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (V4L2_CID_MPEG_MFC51_BASE+53) | ||
| 534 | #define V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (V4L2_CID_MPEG_MFC51_BASE+54) | ||
| 535 | |||
| 536 | |||
| 537 | /* Camera class control IDs */ | ||
| 538 | |||
| 539 | #define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900) | ||
| 540 | #define V4L2_CID_CAMERA_CLASS (V4L2_CTRL_CLASS_CAMERA | 1) | ||
| 541 | |||
| 542 | #define V4L2_CID_EXPOSURE_AUTO (V4L2_CID_CAMERA_CLASS_BASE+1) | ||
| 543 | enum v4l2_exposure_auto_type { | ||
| 544 | V4L2_EXPOSURE_AUTO = 0, | ||
| 545 | V4L2_EXPOSURE_MANUAL = 1, | ||
| 546 | V4L2_EXPOSURE_SHUTTER_PRIORITY = 2, | ||
| 547 | V4L2_EXPOSURE_APERTURE_PRIORITY = 3 | ||
| 548 | }; | ||
| 549 | #define V4L2_CID_EXPOSURE_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+2) | ||
| 550 | #define V4L2_CID_EXPOSURE_AUTO_PRIORITY (V4L2_CID_CAMERA_CLASS_BASE+3) | ||
| 551 | |||
| 552 | #define V4L2_CID_PAN_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+4) | ||
| 553 | #define V4L2_CID_TILT_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+5) | ||
| 554 | #define V4L2_CID_PAN_RESET (V4L2_CID_CAMERA_CLASS_BASE+6) | ||
| 555 | #define V4L2_CID_TILT_RESET (V4L2_CID_CAMERA_CLASS_BASE+7) | ||
| 556 | |||
| 557 | #define V4L2_CID_PAN_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+8) | ||
| 558 | #define V4L2_CID_TILT_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+9) | ||
| 559 | |||
| 560 | #define V4L2_CID_FOCUS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+10) | ||
| 561 | #define V4L2_CID_FOCUS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+11) | ||
| 562 | #define V4L2_CID_FOCUS_AUTO (V4L2_CID_CAMERA_CLASS_BASE+12) | ||
| 563 | |||
| 564 | #define V4L2_CID_ZOOM_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+13) | ||
| 565 | #define V4L2_CID_ZOOM_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+14) | ||
| 566 | #define V4L2_CID_ZOOM_CONTINUOUS (V4L2_CID_CAMERA_CLASS_BASE+15) | ||
| 567 | |||
| 568 | #define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) | ||
| 569 | |||
| 570 | #define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+17) | ||
| 571 | #define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+18) | ||
| 572 | |||
| 573 | #define V4L2_CID_AUTO_EXPOSURE_BIAS (V4L2_CID_CAMERA_CLASS_BASE+19) | ||
| 574 | |||
| 575 | #define V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE (V4L2_CID_CAMERA_CLASS_BASE+20) | ||
| 576 | enum v4l2_auto_n_preset_white_balance { | ||
| 577 | V4L2_WHITE_BALANCE_MANUAL = 0, | ||
| 578 | V4L2_WHITE_BALANCE_AUTO = 1, | ||
| 579 | V4L2_WHITE_BALANCE_INCANDESCENT = 2, | ||
| 580 | V4L2_WHITE_BALANCE_FLUORESCENT = 3, | ||
| 581 | V4L2_WHITE_BALANCE_FLUORESCENT_H = 4, | ||
| 582 | V4L2_WHITE_BALANCE_HORIZON = 5, | ||
| 583 | V4L2_WHITE_BALANCE_DAYLIGHT = 6, | ||
| 584 | V4L2_WHITE_BALANCE_FLASH = 7, | ||
| 585 | V4L2_WHITE_BALANCE_CLOUDY = 8, | ||
| 586 | V4L2_WHITE_BALANCE_SHADE = 9, | ||
| 587 | }; | ||
| 588 | |||
| 589 | #define V4L2_CID_WIDE_DYNAMIC_RANGE (V4L2_CID_CAMERA_CLASS_BASE+21) | ||
| 590 | #define V4L2_CID_IMAGE_STABILIZATION (V4L2_CID_CAMERA_CLASS_BASE+22) | ||
| 591 | |||
| 592 | #define V4L2_CID_ISO_SENSITIVITY (V4L2_CID_CAMERA_CLASS_BASE+23) | ||
| 593 | #define V4L2_CID_ISO_SENSITIVITY_AUTO (V4L2_CID_CAMERA_CLASS_BASE+24) | ||
| 594 | enum v4l2_iso_sensitivity_auto_type { | ||
| 595 | V4L2_ISO_SENSITIVITY_MANUAL = 0, | ||
| 596 | V4L2_ISO_SENSITIVITY_AUTO = 1, | ||
| 597 | }; | ||
| 598 | |||
| 599 | #define V4L2_CID_EXPOSURE_METERING (V4L2_CID_CAMERA_CLASS_BASE+25) | ||
| 600 | enum v4l2_exposure_metering { | ||
| 601 | V4L2_EXPOSURE_METERING_AVERAGE = 0, | ||
| 602 | V4L2_EXPOSURE_METERING_CENTER_WEIGHTED = 1, | ||
| 603 | V4L2_EXPOSURE_METERING_SPOT = 2, | ||
| 604 | }; | ||
| 605 | |||
| 606 | #define V4L2_CID_SCENE_MODE (V4L2_CID_CAMERA_CLASS_BASE+26) | ||
| 607 | enum v4l2_scene_mode { | ||
| 608 | V4L2_SCENE_MODE_NONE = 0, | ||
| 609 | V4L2_SCENE_MODE_BACKLIGHT = 1, | ||
| 610 | V4L2_SCENE_MODE_BEACH_SNOW = 2, | ||
| 611 | V4L2_SCENE_MODE_CANDLE_LIGHT = 3, | ||
| 612 | V4L2_SCENE_MODE_DAWN_DUSK = 4, | ||
| 613 | V4L2_SCENE_MODE_FALL_COLORS = 5, | ||
| 614 | V4L2_SCENE_MODE_FIREWORKS = 6, | ||
| 615 | V4L2_SCENE_MODE_LANDSCAPE = 7, | ||
| 616 | V4L2_SCENE_MODE_NIGHT = 8, | ||
| 617 | V4L2_SCENE_MODE_PARTY_INDOOR = 9, | ||
| 618 | V4L2_SCENE_MODE_PORTRAIT = 10, | ||
| 619 | V4L2_SCENE_MODE_SPORTS = 11, | ||
| 620 | V4L2_SCENE_MODE_SUNSET = 12, | ||
| 621 | V4L2_SCENE_MODE_TEXT = 13, | ||
| 622 | }; | ||
| 623 | |||
| 624 | #define V4L2_CID_3A_LOCK (V4L2_CID_CAMERA_CLASS_BASE+27) | ||
| 625 | #define V4L2_LOCK_EXPOSURE (1 << 0) | ||
| 626 | #define V4L2_LOCK_WHITE_BALANCE (1 << 1) | ||
| 627 | #define V4L2_LOCK_FOCUS (1 << 2) | ||
| 628 | |||
| 629 | #define V4L2_CID_AUTO_FOCUS_START (V4L2_CID_CAMERA_CLASS_BASE+28) | ||
| 630 | #define V4L2_CID_AUTO_FOCUS_STOP (V4L2_CID_CAMERA_CLASS_BASE+29) | ||
| 631 | #define V4L2_CID_AUTO_FOCUS_STATUS (V4L2_CID_CAMERA_CLASS_BASE+30) | ||
| 632 | #define V4L2_AUTO_FOCUS_STATUS_IDLE (0 << 0) | ||
| 633 | #define V4L2_AUTO_FOCUS_STATUS_BUSY (1 << 0) | ||
| 634 | #define V4L2_AUTO_FOCUS_STATUS_REACHED (1 << 1) | ||
| 635 | #define V4L2_AUTO_FOCUS_STATUS_FAILED (1 << 2) | ||
| 636 | |||
| 637 | #define V4L2_CID_AUTO_FOCUS_RANGE (V4L2_CID_CAMERA_CLASS_BASE+31) | ||
| 638 | enum v4l2_auto_focus_range { | ||
| 639 | V4L2_AUTO_FOCUS_RANGE_AUTO = 0, | ||
| 640 | V4L2_AUTO_FOCUS_RANGE_NORMAL = 1, | ||
| 641 | V4L2_AUTO_FOCUS_RANGE_MACRO = 2, | ||
| 642 | V4L2_AUTO_FOCUS_RANGE_INFINITY = 3, | ||
| 643 | }; | ||
| 644 | |||
| 645 | |||
| 646 | /* FM Modulator class control IDs */ | ||
| 647 | |||
| 648 | #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) | ||
| 649 | #define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1) | ||
| 650 | |||
| 651 | #define V4L2_CID_RDS_TX_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 1) | ||
| 652 | #define V4L2_CID_RDS_TX_PI (V4L2_CID_FM_TX_CLASS_BASE + 2) | ||
| 653 | #define V4L2_CID_RDS_TX_PTY (V4L2_CID_FM_TX_CLASS_BASE + 3) | ||
| 654 | #define V4L2_CID_RDS_TX_PS_NAME (V4L2_CID_FM_TX_CLASS_BASE + 5) | ||
| 655 | #define V4L2_CID_RDS_TX_RADIO_TEXT (V4L2_CID_FM_TX_CLASS_BASE + 6) | ||
| 656 | |||
| 657 | #define V4L2_CID_AUDIO_LIMITER_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 64) | ||
| 658 | #define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 65) | ||
| 659 | #define V4L2_CID_AUDIO_LIMITER_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 66) | ||
| 660 | |||
| 661 | #define V4L2_CID_AUDIO_COMPRESSION_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 80) | ||
| 662 | #define V4L2_CID_AUDIO_COMPRESSION_GAIN (V4L2_CID_FM_TX_CLASS_BASE + 81) | ||
| 663 | #define V4L2_CID_AUDIO_COMPRESSION_THRESHOLD (V4L2_CID_FM_TX_CLASS_BASE + 82) | ||
| 664 | #define V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME (V4L2_CID_FM_TX_CLASS_BASE + 83) | ||
| 665 | #define V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 84) | ||
| 666 | |||
| 667 | #define V4L2_CID_PILOT_TONE_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 96) | ||
| 668 | #define V4L2_CID_PILOT_TONE_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 97) | ||
| 669 | #define V4L2_CID_PILOT_TONE_FREQUENCY (V4L2_CID_FM_TX_CLASS_BASE + 98) | ||
| 670 | |||
| 671 | #define V4L2_CID_TUNE_PREEMPHASIS (V4L2_CID_FM_TX_CLASS_BASE + 112) | ||
| 672 | enum v4l2_preemphasis { | ||
| 673 | V4L2_PREEMPHASIS_DISABLED = 0, | ||
| 674 | V4L2_PREEMPHASIS_50_uS = 1, | ||
| 675 | V4L2_PREEMPHASIS_75_uS = 2, | ||
| 676 | }; | ||
| 677 | #define V4L2_CID_TUNE_POWER_LEVEL (V4L2_CID_FM_TX_CLASS_BASE + 113) | ||
| 678 | #define V4L2_CID_TUNE_ANTENNA_CAPACITOR (V4L2_CID_FM_TX_CLASS_BASE + 114) | ||
| 679 | |||
| 680 | |||
| 681 | /* Flash and privacy (indicator) light controls */ | ||
| 682 | |||
| 683 | #define V4L2_CID_FLASH_CLASS_BASE (V4L2_CTRL_CLASS_FLASH | 0x900) | ||
| 684 | #define V4L2_CID_FLASH_CLASS (V4L2_CTRL_CLASS_FLASH | 1) | ||
| 685 | |||
| 686 | #define V4L2_CID_FLASH_LED_MODE (V4L2_CID_FLASH_CLASS_BASE + 1) | ||
| 687 | enum v4l2_flash_led_mode { | ||
| 688 | V4L2_FLASH_LED_MODE_NONE, | ||
| 689 | V4L2_FLASH_LED_MODE_FLASH, | ||
| 690 | V4L2_FLASH_LED_MODE_TORCH, | ||
| 691 | }; | ||
| 692 | |||
| 693 | #define V4L2_CID_FLASH_STROBE_SOURCE (V4L2_CID_FLASH_CLASS_BASE + 2) | ||
| 694 | enum v4l2_flash_strobe_source { | ||
| 695 | V4L2_FLASH_STROBE_SOURCE_SOFTWARE, | ||
| 696 | V4L2_FLASH_STROBE_SOURCE_EXTERNAL, | ||
| 697 | }; | ||
| 698 | |||
| 699 | #define V4L2_CID_FLASH_STROBE (V4L2_CID_FLASH_CLASS_BASE + 3) | ||
| 700 | #define V4L2_CID_FLASH_STROBE_STOP (V4L2_CID_FLASH_CLASS_BASE + 4) | ||
| 701 | #define V4L2_CID_FLASH_STROBE_STATUS (V4L2_CID_FLASH_CLASS_BASE + 5) | ||
| 702 | |||
| 703 | #define V4L2_CID_FLASH_TIMEOUT (V4L2_CID_FLASH_CLASS_BASE + 6) | ||
| 704 | #define V4L2_CID_FLASH_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 7) | ||
| 705 | #define V4L2_CID_FLASH_TORCH_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 8) | ||
| 706 | #define V4L2_CID_FLASH_INDICATOR_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 9) | ||
| 707 | |||
| 708 | #define V4L2_CID_FLASH_FAULT (V4L2_CID_FLASH_CLASS_BASE + 10) | ||
| 709 | #define V4L2_FLASH_FAULT_OVER_VOLTAGE (1 << 0) | ||
| 710 | #define V4L2_FLASH_FAULT_TIMEOUT (1 << 1) | ||
| 711 | #define V4L2_FLASH_FAULT_OVER_TEMPERATURE (1 << 2) | ||
| 712 | #define V4L2_FLASH_FAULT_SHORT_CIRCUIT (1 << 3) | ||
| 713 | #define V4L2_FLASH_FAULT_OVER_CURRENT (1 << 4) | ||
| 714 | #define V4L2_FLASH_FAULT_INDICATOR (1 << 5) | ||
| 715 | |||
| 716 | #define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11) | ||
| 717 | #define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12) | ||
| 718 | |||
| 719 | |||
| 720 | /* JPEG-class control IDs */ | ||
| 721 | |||
| 722 | #define V4L2_CID_JPEG_CLASS_BASE (V4L2_CTRL_CLASS_JPEG | 0x900) | ||
| 723 | #define V4L2_CID_JPEG_CLASS (V4L2_CTRL_CLASS_JPEG | 1) | ||
| 724 | |||
| 725 | #define V4L2_CID_JPEG_CHROMA_SUBSAMPLING (V4L2_CID_JPEG_CLASS_BASE + 1) | ||
| 726 | enum v4l2_jpeg_chroma_subsampling { | ||
| 727 | V4L2_JPEG_CHROMA_SUBSAMPLING_444 = 0, | ||
| 728 | V4L2_JPEG_CHROMA_SUBSAMPLING_422 = 1, | ||
| 729 | V4L2_JPEG_CHROMA_SUBSAMPLING_420 = 2, | ||
| 730 | V4L2_JPEG_CHROMA_SUBSAMPLING_411 = 3, | ||
| 731 | V4L2_JPEG_CHROMA_SUBSAMPLING_410 = 4, | ||
| 732 | V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY = 5, | ||
| 733 | }; | ||
| 734 | #define V4L2_CID_JPEG_RESTART_INTERVAL (V4L2_CID_JPEG_CLASS_BASE + 2) | ||
| 735 | #define V4L2_CID_JPEG_COMPRESSION_QUALITY (V4L2_CID_JPEG_CLASS_BASE + 3) | ||
| 736 | |||
| 737 | #define V4L2_CID_JPEG_ACTIVE_MARKER (V4L2_CID_JPEG_CLASS_BASE + 4) | ||
| 738 | #define V4L2_JPEG_ACTIVE_MARKER_APP0 (1 << 0) | ||
| 739 | #define V4L2_JPEG_ACTIVE_MARKER_APP1 (1 << 1) | ||
| 740 | #define V4L2_JPEG_ACTIVE_MARKER_COM (1 << 16) | ||
| 741 | #define V4L2_JPEG_ACTIVE_MARKER_DQT (1 << 17) | ||
| 742 | #define V4L2_JPEG_ACTIVE_MARKER_DHT (1 << 18) | ||
| 743 | |||
| 744 | /* Image source controls */ | ||
| 745 | #define V4L2_CID_IMAGE_SOURCE_CLASS_BASE (V4L2_CTRL_CLASS_IMAGE_SOURCE | 0x900) | ||
| 746 | #define V4L2_CID_IMAGE_SOURCE_CLASS (V4L2_CTRL_CLASS_IMAGE_SOURCE | 1) | ||
| 747 | |||
| 748 | #define V4L2_CID_VBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 1) | ||
| 749 | #define V4L2_CID_HBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 2) | ||
| 750 | #define V4L2_CID_ANALOGUE_GAIN (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 3) | ||
| 751 | |||
| 752 | |||
| 753 | /* Image processing controls */ | ||
| 754 | |||
| 755 | #define V4L2_CID_IMAGE_PROC_CLASS_BASE (V4L2_CTRL_CLASS_IMAGE_PROC | 0x900) | ||
| 756 | #define V4L2_CID_IMAGE_PROC_CLASS (V4L2_CTRL_CLASS_IMAGE_PROC | 1) | ||
| 757 | |||
| 758 | #define V4L2_CID_LINK_FREQ (V4L2_CID_IMAGE_PROC_CLASS_BASE + 1) | ||
| 759 | #define V4L2_CID_PIXEL_RATE (V4L2_CID_IMAGE_PROC_CLASS_BASE + 2) | ||
| 760 | |||
| 761 | #endif | ||
diff --git a/include/linux/v4l2-subdev.h b/include/linux/v4l2-subdev.h index 8c57ee9872bb..a33c4daadce3 100644 --- a/include/linux/v4l2-subdev.h +++ b/include/linux/v4l2-subdev.h | |||
| @@ -148,6 +148,14 @@ struct v4l2_subdev_selection { | |||
| 148 | __u32 reserved[8]; | 148 | __u32 reserved[8]; |
| 149 | }; | 149 | }; |
| 150 | 150 | ||
| 151 | struct v4l2_subdev_edid { | ||
| 152 | __u32 pad; | ||
| 153 | __u32 start_block; | ||
| 154 | __u32 blocks; | ||
| 155 | __u32 reserved[5]; | ||
| 156 | __u8 __user *edid; | ||
| 157 | }; | ||
| 158 | |||
| 151 | #define VIDIOC_SUBDEV_G_FMT _IOWR('V', 4, struct v4l2_subdev_format) | 159 | #define VIDIOC_SUBDEV_G_FMT _IOWR('V', 4, struct v4l2_subdev_format) |
| 152 | #define VIDIOC_SUBDEV_S_FMT _IOWR('V', 5, struct v4l2_subdev_format) | 160 | #define VIDIOC_SUBDEV_S_FMT _IOWR('V', 5, struct v4l2_subdev_format) |
| 153 | #define VIDIOC_SUBDEV_G_FRAME_INTERVAL \ | 161 | #define VIDIOC_SUBDEV_G_FRAME_INTERVAL \ |
| @@ -166,5 +174,7 @@ struct v4l2_subdev_selection { | |||
| 166 | _IOWR('V', 61, struct v4l2_subdev_selection) | 174 | _IOWR('V', 61, struct v4l2_subdev_selection) |
| 167 | #define VIDIOC_SUBDEV_S_SELECTION \ | 175 | #define VIDIOC_SUBDEV_S_SELECTION \ |
| 168 | _IOWR('V', 62, struct v4l2_subdev_selection) | 176 | _IOWR('V', 62, struct v4l2_subdev_selection) |
| 177 | #define VIDIOC_SUBDEV_G_EDID _IOWR('V', 40, struct v4l2_subdev_edid) | ||
| 178 | #define VIDIOC_SUBDEV_S_EDID _IOWR('V', 41, struct v4l2_subdev_edid) | ||
| 169 | 179 | ||
| 170 | #endif | 180 | #endif |
diff --git a/include/linux/vfio.h b/include/linux/vfio.h new file mode 100644 index 000000000000..0a4f180a11d8 --- /dev/null +++ b/include/linux/vfio.h | |||
| @@ -0,0 +1,445 @@ | |||
| 1 | /* | ||
| 2 | * VFIO API definition | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Red Hat, Inc. All rights reserved. | ||
| 5 | * Author: Alex Williamson <alex.williamson@redhat.com> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | #ifndef VFIO_H | ||
| 12 | #define VFIO_H | ||
| 13 | |||
| 14 | #include <linux/types.h> | ||
| 15 | #include <linux/ioctl.h> | ||
| 16 | |||
| 17 | #define VFIO_API_VERSION 0 | ||
| 18 | |||
| 19 | #ifdef __KERNEL__ /* Internal VFIO-core/bus driver API */ | ||
| 20 | |||
| 21 | #include <linux/iommu.h> | ||
| 22 | #include <linux/mm.h> | ||
| 23 | |||
| 24 | /** | ||
| 25 | * struct vfio_device_ops - VFIO bus driver device callbacks | ||
| 26 | * | ||
| 27 | * @open: Called when userspace creates new file descriptor for device | ||
| 28 | * @release: Called when userspace releases file descriptor for device | ||
| 29 | * @read: Perform read(2) on device file descriptor | ||
| 30 | * @write: Perform write(2) on device file descriptor | ||
| 31 | * @ioctl: Perform ioctl(2) on device file descriptor, supporting VFIO_DEVICE_* | ||
| 32 | * operations documented below | ||
| 33 | * @mmap: Perform mmap(2) on a region of the device file descriptor | ||
| 34 | */ | ||
| 35 | struct vfio_device_ops { | ||
| 36 | char *name; | ||
| 37 | int (*open)(void *device_data); | ||
| 38 | void (*release)(void *device_data); | ||
| 39 | ssize_t (*read)(void *device_data, char __user *buf, | ||
| 40 | size_t count, loff_t *ppos); | ||
| 41 | ssize_t (*write)(void *device_data, const char __user *buf, | ||
| 42 | size_t count, loff_t *size); | ||
| 43 | long (*ioctl)(void *device_data, unsigned int cmd, | ||
| 44 | unsigned long arg); | ||
| 45 | int (*mmap)(void *device_data, struct vm_area_struct *vma); | ||
| 46 | }; | ||
| 47 | |||
| 48 | extern int vfio_add_group_dev(struct device *dev, | ||
| 49 | const struct vfio_device_ops *ops, | ||
| 50 | void *device_data); | ||
| 51 | |||
| 52 | extern void *vfio_del_group_dev(struct device *dev); | ||
| 53 | |||
| 54 | /** | ||
| 55 | * struct vfio_iommu_driver_ops - VFIO IOMMU driver callbacks | ||
| 56 | */ | ||
| 57 | struct vfio_iommu_driver_ops { | ||
| 58 | char *name; | ||
| 59 | struct module *owner; | ||
| 60 | void *(*open)(unsigned long arg); | ||
| 61 | void (*release)(void *iommu_data); | ||
| 62 | ssize_t (*read)(void *iommu_data, char __user *buf, | ||
| 63 | size_t count, loff_t *ppos); | ||
| 64 | ssize_t (*write)(void *iommu_data, const char __user *buf, | ||
| 65 | size_t count, loff_t *size); | ||
| 66 | long (*ioctl)(void *iommu_data, unsigned int cmd, | ||
| 67 | unsigned long arg); | ||
| 68 | int (*mmap)(void *iommu_data, struct vm_area_struct *vma); | ||
| 69 | int (*attach_group)(void *iommu_data, | ||
| 70 | struct iommu_group *group); | ||
| 71 | void (*detach_group)(void *iommu_data, | ||
| 72 | struct iommu_group *group); | ||
| 73 | |||
| 74 | }; | ||
| 75 | |||
| 76 | extern int vfio_register_iommu_driver(const struct vfio_iommu_driver_ops *ops); | ||
| 77 | |||
| 78 | extern void vfio_unregister_iommu_driver( | ||
| 79 | const struct vfio_iommu_driver_ops *ops); | ||
| 80 | |||
| 81 | /** | ||
| 82 | * offsetofend(TYPE, MEMBER) | ||
| 83 | * | ||
| 84 | * @TYPE: The type of the structure | ||
| 85 | * @MEMBER: The member within the structure to get the end offset of | ||
| 86 | * | ||
| 87 | * Simple helper macro for dealing with variable sized structures passed | ||
| 88 | * from user space. This allows us to easily determine if the provided | ||
| 89 | * structure is sized to include various fields. | ||
| 90 | */ | ||
| 91 | #define offsetofend(TYPE, MEMBER) ({ \ | ||
| 92 | TYPE tmp; \ | ||
| 93 | offsetof(TYPE, MEMBER) + sizeof(tmp.MEMBER); }) \ | ||
| 94 | |||
| 95 | #endif /* __KERNEL__ */ | ||
| 96 | |||
| 97 | /* Kernel & User level defines for VFIO IOCTLs. */ | ||
| 98 | |||
| 99 | /* Extensions */ | ||
| 100 | |||
| 101 | #define VFIO_TYPE1_IOMMU 1 | ||
| 102 | |||
| 103 | /* | ||
| 104 | * The IOCTL interface is designed for extensibility by embedding the | ||
| 105 | * structure length (argsz) and flags into structures passed between | ||
| 106 | * kernel and userspace. We therefore use the _IO() macro for these | ||
| 107 | * defines to avoid implicitly embedding a size into the ioctl request. | ||
| 108 | * As structure fields are added, argsz will increase to match and flag | ||
| 109 | * bits will be defined to indicate additional fields with valid data. | ||
| 110 | * It's *always* the caller's responsibility to indicate the size of | ||
| 111 | * the structure passed by setting argsz appropriately. | ||
| 112 | */ | ||
| 113 | |||
| 114 | #define VFIO_TYPE (';') | ||
| 115 | #define VFIO_BASE 100 | ||
| 116 | |||
| 117 | /* -------- IOCTLs for VFIO file descriptor (/dev/vfio/vfio) -------- */ | ||
| 118 | |||
| 119 | /** | ||
| 120 | * VFIO_GET_API_VERSION - _IO(VFIO_TYPE, VFIO_BASE + 0) | ||
| 121 | * | ||
| 122 | * Report the version of the VFIO API. This allows us to bump the entire | ||
| 123 | * API version should we later need to add or change features in incompatible | ||
| 124 | * ways. | ||
| 125 | * Return: VFIO_API_VERSION | ||
| 126 | * Availability: Always | ||
| 127 | */ | ||
| 128 | #define VFIO_GET_API_VERSION _IO(VFIO_TYPE, VFIO_BASE + 0) | ||
| 129 | |||
| 130 | /** | ||
| 131 | * VFIO_CHECK_EXTENSION - _IOW(VFIO_TYPE, VFIO_BASE + 1, __u32) | ||
| 132 | * | ||
| 133 | * Check whether an extension is supported. | ||
| 134 | * Return: 0 if not supported, 1 (or some other positive integer) if supported. | ||
| 135 | * Availability: Always | ||
| 136 | */ | ||
| 137 | #define VFIO_CHECK_EXTENSION _IO(VFIO_TYPE, VFIO_BASE + 1) | ||
| 138 | |||
| 139 | /** | ||
| 140 | * VFIO_SET_IOMMU - _IOW(VFIO_TYPE, VFIO_BASE + 2, __s32) | ||
| 141 | * | ||
| 142 | * Set the iommu to the given type. The type must be supported by an | ||
| 143 | * iommu driver as verified by calling CHECK_EXTENSION using the same | ||
| 144 | * type. A group must be set to this file descriptor before this | ||
| 145 | * ioctl is available. The IOMMU interfaces enabled by this call are | ||
| 146 | * specific to the value set. | ||
| 147 | * Return: 0 on success, -errno on failure | ||
| 148 | * Availability: When VFIO group attached | ||
| 149 | */ | ||
| 150 | #define VFIO_SET_IOMMU _IO(VFIO_TYPE, VFIO_BASE + 2) | ||
| 151 | |||
| 152 | /* -------- IOCTLs for GROUP file descriptors (/dev/vfio/$GROUP) -------- */ | ||
| 153 | |||
| 154 | /** | ||
| 155 | * VFIO_GROUP_GET_STATUS - _IOR(VFIO_TYPE, VFIO_BASE + 3, | ||
| 156 | * struct vfio_group_status) | ||
| 157 | * | ||
| 158 | * Retrieve information about the group. Fills in provided | ||
| 159 | * struct vfio_group_info. Caller sets argsz. | ||
| 160 | * Return: 0 on succes, -errno on failure. | ||
| 161 | * Availability: Always | ||
| 162 | */ | ||
| 163 | struct vfio_group_status { | ||
| 164 | __u32 argsz; | ||
| 165 | __u32 flags; | ||
| 166 | #define VFIO_GROUP_FLAGS_VIABLE (1 << 0) | ||
| 167 | #define VFIO_GROUP_FLAGS_CONTAINER_SET (1 << 1) | ||
| 168 | }; | ||
| 169 | #define VFIO_GROUP_GET_STATUS _IO(VFIO_TYPE, VFIO_BASE + 3) | ||
| 170 | |||
| 171 | /** | ||
| 172 | * VFIO_GROUP_SET_CONTAINER - _IOW(VFIO_TYPE, VFIO_BASE + 4, __s32) | ||
| 173 | * | ||
| 174 | * Set the container for the VFIO group to the open VFIO file | ||
| 175 | * descriptor provided. Groups may only belong to a single | ||
| 176 | * container. Containers may, at their discretion, support multiple | ||
| 177 | * groups. Only when a container is set are all of the interfaces | ||
| 178 | * of the VFIO file descriptor and the VFIO group file descriptor | ||
| 179 | * available to the user. | ||
| 180 | * Return: 0 on success, -errno on failure. | ||
| 181 | * Availability: Always | ||
| 182 | */ | ||
| 183 | #define VFIO_GROUP_SET_CONTAINER _IO(VFIO_TYPE, VFIO_BASE + 4) | ||
| 184 | |||
| 185 | /** | ||
| 186 | * VFIO_GROUP_UNSET_CONTAINER - _IO(VFIO_TYPE, VFIO_BASE + 5) | ||
| 187 | * | ||
| 188 | * Remove the group from the attached container. This is the | ||
| 189 | * opposite of the SET_CONTAINER call and returns the group to | ||
| 190 | * an initial state. All device file descriptors must be released | ||
| 191 | * prior to calling this interface. When removing the last group | ||
| 192 | * from a container, the IOMMU will be disabled and all state lost, | ||
| 193 | * effectively also returning the VFIO file descriptor to an initial | ||
| 194 | * state. | ||
| 195 | * Return: 0 on success, -errno on failure. | ||
| 196 | * Availability: When attached to container | ||
| 197 | */ | ||
| 198 | #define VFIO_GROUP_UNSET_CONTAINER _IO(VFIO_TYPE, VFIO_BASE + 5) | ||
| 199 | |||
| 200 | /** | ||
| 201 | * VFIO_GROUP_GET_DEVICE_FD - _IOW(VFIO_TYPE, VFIO_BASE + 6, char) | ||
| 202 | * | ||
| 203 | * Return a new file descriptor for the device object described by | ||
| 204 | * the provided string. The string should match a device listed in | ||
| 205 | * the devices subdirectory of the IOMMU group sysfs entry. The | ||
| 206 | * group containing the device must already be added to this context. | ||
| 207 | * Return: new file descriptor on success, -errno on failure. | ||
| 208 | * Availability: When attached to container | ||
| 209 | */ | ||
| 210 | #define VFIO_GROUP_GET_DEVICE_FD _IO(VFIO_TYPE, VFIO_BASE + 6) | ||
| 211 | |||
| 212 | /* --------------- IOCTLs for DEVICE file descriptors --------------- */ | ||
| 213 | |||
| 214 | /** | ||
| 215 | * VFIO_DEVICE_GET_INFO - _IOR(VFIO_TYPE, VFIO_BASE + 7, | ||
| 216 | * struct vfio_device_info) | ||
| 217 | * | ||
| 218 | * Retrieve information about the device. Fills in provided | ||
| 219 | * struct vfio_device_info. Caller sets argsz. | ||
| 220 | * Return: 0 on success, -errno on failure. | ||
| 221 | */ | ||
| 222 | struct vfio_device_info { | ||
| 223 | __u32 argsz; | ||
| 224 | __u32 flags; | ||
| 225 | #define VFIO_DEVICE_FLAGS_RESET (1 << 0) /* Device supports reset */ | ||
| 226 | #define VFIO_DEVICE_FLAGS_PCI (1 << 1) /* vfio-pci device */ | ||
| 227 | __u32 num_regions; /* Max region index + 1 */ | ||
| 228 | __u32 num_irqs; /* Max IRQ index + 1 */ | ||
| 229 | }; | ||
| 230 | #define VFIO_DEVICE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 7) | ||
| 231 | |||
| 232 | /** | ||
| 233 | * VFIO_DEVICE_GET_REGION_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 8, | ||
| 234 | * struct vfio_region_info) | ||
| 235 | * | ||
| 236 | * Retrieve information about a device region. Caller provides | ||
| 237 | * struct vfio_region_info with index value set. Caller sets argsz. | ||
| 238 | * Implementation of region mapping is bus driver specific. This is | ||
| 239 | * intended to describe MMIO, I/O port, as well as bus specific | ||
| 240 | * regions (ex. PCI config space). Zero sized regions may be used | ||
| 241 | * to describe unimplemented regions (ex. unimplemented PCI BARs). | ||
| 242 | * Return: 0 on success, -errno on failure. | ||
| 243 | */ | ||
| 244 | struct vfio_region_info { | ||
| 245 | __u32 argsz; | ||
| 246 | __u32 flags; | ||
| 247 | #define VFIO_REGION_INFO_FLAG_READ (1 << 0) /* Region supports read */ | ||
| 248 | #define VFIO_REGION_INFO_FLAG_WRITE (1 << 1) /* Region supports write */ | ||
| 249 | #define VFIO_REGION_INFO_FLAG_MMAP (1 << 2) /* Region supports mmap */ | ||
| 250 | __u32 index; /* Region index */ | ||
| 251 | __u32 resv; /* Reserved for alignment */ | ||
| 252 | __u64 size; /* Region size (bytes) */ | ||
| 253 | __u64 offset; /* Region offset from start of device fd */ | ||
| 254 | }; | ||
| 255 | #define VFIO_DEVICE_GET_REGION_INFO _IO(VFIO_TYPE, VFIO_BASE + 8) | ||
| 256 | |||
| 257 | /** | ||
| 258 | * VFIO_DEVICE_GET_IRQ_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 9, | ||
| 259 | * struct vfio_irq_info) | ||
| 260 | * | ||
| 261 | * Retrieve information about a device IRQ. Caller provides | ||
| 262 | * struct vfio_irq_info with index value set. Caller sets argsz. | ||
| 263 | * Implementation of IRQ mapping is bus driver specific. Indexes | ||
| 264 | * using multiple IRQs are primarily intended to support MSI-like | ||
| 265 | * interrupt blocks. Zero count irq blocks may be used to describe | ||
| 266 | * unimplemented interrupt types. | ||
| 267 | * | ||
| 268 | * The EVENTFD flag indicates the interrupt index supports eventfd based | ||
| 269 | * signaling. | ||
| 270 | * | ||
| 271 | * The MASKABLE flags indicates the index supports MASK and UNMASK | ||
| 272 | * actions described below. | ||
| 273 | * | ||
| 274 | * AUTOMASKED indicates that after signaling, the interrupt line is | ||
| 275 | * automatically masked by VFIO and the user needs to unmask the line | ||
| 276 | * to receive new interrupts. This is primarily intended to distinguish | ||
| 277 | * level triggered interrupts. | ||
| 278 | * | ||
| 279 | * The NORESIZE flag indicates that the interrupt lines within the index | ||
| 280 | * are setup as a set and new subindexes cannot be enabled without first | ||
| 281 | * disabling the entire index. This is used for interrupts like PCI MSI | ||
| 282 | * and MSI-X where the driver may only use a subset of the available | ||
| 283 | * indexes, but VFIO needs to enable a specific number of vectors | ||
| 284 | * upfront. In the case of MSI-X, where the user can enable MSI-X and | ||
| 285 | * then add and unmask vectors, it's up to userspace to make the decision | ||
| 286 | * whether to allocate the maximum supported number of vectors or tear | ||
| 287 | * down setup and incrementally increase the vectors as each is enabled. | ||
| 288 | */ | ||
| 289 | struct vfio_irq_info { | ||
| 290 | __u32 argsz; | ||
| 291 | __u32 flags; | ||
| 292 | #define VFIO_IRQ_INFO_EVENTFD (1 << 0) | ||
| 293 | #define VFIO_IRQ_INFO_MASKABLE (1 << 1) | ||
| 294 | #define VFIO_IRQ_INFO_AUTOMASKED (1 << 2) | ||
| 295 | #define VFIO_IRQ_INFO_NORESIZE (1 << 3) | ||
| 296 | __u32 index; /* IRQ index */ | ||
| 297 | __u32 count; /* Number of IRQs within this index */ | ||
| 298 | }; | ||
| 299 | #define VFIO_DEVICE_GET_IRQ_INFO _IO(VFIO_TYPE, VFIO_BASE + 9) | ||
| 300 | |||
| 301 | /** | ||
| 302 | * VFIO_DEVICE_SET_IRQS - _IOW(VFIO_TYPE, VFIO_BASE + 10, struct vfio_irq_set) | ||
| 303 | * | ||
| 304 | * Set signaling, masking, and unmasking of interrupts. Caller provides | ||
| 305 | * struct vfio_irq_set with all fields set. 'start' and 'count' indicate | ||
| 306 | * the range of subindexes being specified. | ||
| 307 | * | ||
| 308 | * The DATA flags specify the type of data provided. If DATA_NONE, the | ||
| 309 | * operation performs the specified action immediately on the specified | ||
| 310 | * interrupt(s). For example, to unmask AUTOMASKED interrupt [0,0]: | ||
| 311 | * flags = (DATA_NONE|ACTION_UNMASK), index = 0, start = 0, count = 1. | ||
| 312 | * | ||
| 313 | * DATA_BOOL allows sparse support for the same on arrays of interrupts. | ||
| 314 | * For example, to mask interrupts [0,1] and [0,3] (but not [0,2]): | ||
| 315 | * flags = (DATA_BOOL|ACTION_MASK), index = 0, start = 1, count = 3, | ||
| 316 | * data = {1,0,1} | ||
| 317 | * | ||
| 318 | * DATA_EVENTFD binds the specified ACTION to the provided __s32 eventfd. | ||
| 319 | * A value of -1 can be used to either de-assign interrupts if already | ||
| 320 | * assigned or skip un-assigned interrupts. For example, to set an eventfd | ||
| 321 | * to be trigger for interrupts [0,0] and [0,2]: | ||
| 322 | * flags = (DATA_EVENTFD|ACTION_TRIGGER), index = 0, start = 0, count = 3, | ||
| 323 | * data = {fd1, -1, fd2} | ||
| 324 | * If index [0,1] is previously set, two count = 1 ioctls calls would be | ||
| 325 | * required to set [0,0] and [0,2] without changing [0,1]. | ||
| 326 | * | ||
| 327 | * Once a signaling mechanism is set, DATA_BOOL or DATA_NONE can be used | ||
| 328 | * with ACTION_TRIGGER to perform kernel level interrupt loopback testing | ||
| 329 | * from userspace (ie. simulate hardware triggering). | ||
| 330 | * | ||
| 331 | * Setting of an event triggering mechanism to userspace for ACTION_TRIGGER | ||
| 332 | * enables the interrupt index for the device. Individual subindex interrupts | ||
| 333 | * can be disabled using the -1 value for DATA_EVENTFD or the index can be | ||
| 334 | * disabled as a whole with: flags = (DATA_NONE|ACTION_TRIGGER), count = 0. | ||
| 335 | * | ||
| 336 | * Note that ACTION_[UN]MASK specify user->kernel signaling (irqfds) while | ||
| 337 | * ACTION_TRIGGER specifies kernel->user signaling. | ||
| 338 | */ | ||
| 339 | struct vfio_irq_set { | ||
| 340 | __u32 argsz; | ||
| 341 | __u32 flags; | ||
| 342 | #define VFIO_IRQ_SET_DATA_NONE (1 << 0) /* Data not present */ | ||
| 343 | #define VFIO_IRQ_SET_DATA_BOOL (1 << 1) /* Data is bool (u8) */ | ||
| 344 | #define VFIO_IRQ_SET_DATA_EVENTFD (1 << 2) /* Data is eventfd (s32) */ | ||
| 345 | #define VFIO_IRQ_SET_ACTION_MASK (1 << 3) /* Mask interrupt */ | ||
| 346 | #define VFIO_IRQ_SET_ACTION_UNMASK (1 << 4) /* Unmask interrupt */ | ||
| 347 | #define VFIO_IRQ_SET_ACTION_TRIGGER (1 << 5) /* Trigger interrupt */ | ||
| 348 | __u32 index; | ||
| 349 | __u32 start; | ||
| 350 | __u32 count; | ||
| 351 | __u8 data[]; | ||
| 352 | }; | ||
| 353 | #define VFIO_DEVICE_SET_IRQS _IO(VFIO_TYPE, VFIO_BASE + 10) | ||
| 354 | |||
| 355 | #define VFIO_IRQ_SET_DATA_TYPE_MASK (VFIO_IRQ_SET_DATA_NONE | \ | ||
| 356 | VFIO_IRQ_SET_DATA_BOOL | \ | ||
| 357 | VFIO_IRQ_SET_DATA_EVENTFD) | ||
| 358 | #define VFIO_IRQ_SET_ACTION_TYPE_MASK (VFIO_IRQ_SET_ACTION_MASK | \ | ||
| 359 | VFIO_IRQ_SET_ACTION_UNMASK | \ | ||
| 360 | VFIO_IRQ_SET_ACTION_TRIGGER) | ||
| 361 | /** | ||
| 362 | * VFIO_DEVICE_RESET - _IO(VFIO_TYPE, VFIO_BASE + 11) | ||
| 363 | * | ||
| 364 | * Reset a device. | ||
| 365 | */ | ||
| 366 | #define VFIO_DEVICE_RESET _IO(VFIO_TYPE, VFIO_BASE + 11) | ||
| 367 | |||
| 368 | /* | ||
| 369 | * The VFIO-PCI bus driver makes use of the following fixed region and | ||
| 370 | * IRQ index mapping. Unimplemented regions return a size of zero. | ||
| 371 | * Unimplemented IRQ types return a count of zero. | ||
| 372 | */ | ||
| 373 | |||
| 374 | enum { | ||
| 375 | VFIO_PCI_BAR0_REGION_INDEX, | ||
| 376 | VFIO_PCI_BAR1_REGION_INDEX, | ||
| 377 | VFIO_PCI_BAR2_REGION_INDEX, | ||
| 378 | VFIO_PCI_BAR3_REGION_INDEX, | ||
| 379 | VFIO_PCI_BAR4_REGION_INDEX, | ||
| 380 | VFIO_PCI_BAR5_REGION_INDEX, | ||
| 381 | VFIO_PCI_ROM_REGION_INDEX, | ||
| 382 | VFIO_PCI_CONFIG_REGION_INDEX, | ||
| 383 | VFIO_PCI_NUM_REGIONS | ||
| 384 | }; | ||
| 385 | |||
| 386 | enum { | ||
| 387 | VFIO_PCI_INTX_IRQ_INDEX, | ||
| 388 | VFIO_PCI_MSI_IRQ_INDEX, | ||
| 389 | VFIO_PCI_MSIX_IRQ_INDEX, | ||
| 390 | VFIO_PCI_NUM_IRQS | ||
| 391 | }; | ||
| 392 | |||
| 393 | /* -------- API for Type1 VFIO IOMMU -------- */ | ||
| 394 | |||
| 395 | /** | ||
| 396 | * VFIO_IOMMU_GET_INFO - _IOR(VFIO_TYPE, VFIO_BASE + 12, struct vfio_iommu_info) | ||
| 397 | * | ||
| 398 | * Retrieve information about the IOMMU object. Fills in provided | ||
| 399 | * struct vfio_iommu_info. Caller sets argsz. | ||
| 400 | * | ||
| 401 | * XXX Should we do these by CHECK_EXTENSION too? | ||
| 402 | */ | ||
| 403 | struct vfio_iommu_type1_info { | ||
| 404 | __u32 argsz; | ||
| 405 | __u32 flags; | ||
| 406 | #define VFIO_IOMMU_INFO_PGSIZES (1 << 0) /* supported page sizes info */ | ||
| 407 | __u64 iova_pgsizes; /* Bitmap of supported page sizes */ | ||
| 408 | }; | ||
| 409 | |||
| 410 | #define VFIO_IOMMU_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12) | ||
| 411 | |||
| 412 | /** | ||
| 413 | * VFIO_IOMMU_MAP_DMA - _IOW(VFIO_TYPE, VFIO_BASE + 13, struct vfio_dma_map) | ||
| 414 | * | ||
| 415 | * Map process virtual addresses to IO virtual addresses using the | ||
| 416 | * provided struct vfio_dma_map. Caller sets argsz. READ &/ WRITE required. | ||
| 417 | */ | ||
| 418 | struct vfio_iommu_type1_dma_map { | ||
| 419 | __u32 argsz; | ||
| 420 | __u32 flags; | ||
| 421 | #define VFIO_DMA_MAP_FLAG_READ (1 << 0) /* readable from device */ | ||
| 422 | #define VFIO_DMA_MAP_FLAG_WRITE (1 << 1) /* writable from device */ | ||
| 423 | __u64 vaddr; /* Process virtual address */ | ||
| 424 | __u64 iova; /* IO virtual address */ | ||
| 425 | __u64 size; /* Size of mapping (bytes) */ | ||
| 426 | }; | ||
| 427 | |||
| 428 | #define VFIO_IOMMU_MAP_DMA _IO(VFIO_TYPE, VFIO_BASE + 13) | ||
| 429 | |||
| 430 | /** | ||
| 431 | * VFIO_IOMMU_UNMAP_DMA - _IOW(VFIO_TYPE, VFIO_BASE + 14, struct vfio_dma_unmap) | ||
| 432 | * | ||
| 433 | * Unmap IO virtual addresses using the provided struct vfio_dma_unmap. | ||
| 434 | * Caller sets argsz. | ||
| 435 | */ | ||
| 436 | struct vfio_iommu_type1_dma_unmap { | ||
| 437 | __u32 argsz; | ||
| 438 | __u32 flags; | ||
| 439 | __u64 iova; /* IO virtual address */ | ||
| 440 | __u64 size; /* Size of mapping (bytes) */ | ||
| 441 | }; | ||
| 442 | |||
| 443 | #define VFIO_IOMMU_UNMAP_DMA _IO(VFIO_TYPE, VFIO_BASE + 14) | ||
| 444 | |||
| 445 | #endif /* VFIO_H */ | ||
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 7a147c8299ab..61395ef85a00 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Video for Linux Two header file | 2 | * Video for Linux Two header file |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 1999-2007 the contributors | 4 | * Copyright (C) 1999-2012 the contributors |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
| @@ -65,6 +65,7 @@ | |||
| 65 | #include <linux/ioctl.h> | 65 | #include <linux/ioctl.h> |
| 66 | #include <linux/types.h> | 66 | #include <linux/types.h> |
| 67 | #include <linux/v4l2-common.h> | 67 | #include <linux/v4l2-common.h> |
| 68 | #include <linux/v4l2-controls.h> | ||
| 68 | 69 | ||
| 69 | /* | 70 | /* |
| 70 | * Common stuff for both V4L1 and V4L2 | 71 | * Common stuff for both V4L1 and V4L2 |
| @@ -161,6 +162,7 @@ enum v4l2_buf_type { | |||
| 161 | #endif | 162 | #endif |
| 162 | V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9, | 163 | V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9, |
| 163 | V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10, | 164 | V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10, |
| 165 | /* Deprecated, do not use */ | ||
| 164 | V4L2_BUF_TYPE_PRIVATE = 0x80, | 166 | V4L2_BUF_TYPE_PRIVATE = 0x80, |
| 165 | }; | 167 | }; |
| 166 | 168 | ||
| @@ -368,6 +370,7 @@ struct v4l2_pix_format { | |||
| 368 | 370 | ||
| 369 | /* three non contiguous planes - Y, Cb, Cr */ | 371 | /* three non contiguous planes - Y, Cb, Cr */ |
| 370 | #define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */ | 372 | #define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */ |
| 373 | #define V4L2_PIX_FMT_YVU420M v4l2_fourcc('Y', 'M', '2', '1') /* 12 YVU420 planar */ | ||
| 371 | 374 | ||
| 372 | /* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */ | 375 | /* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */ |
| 373 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ | 376 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ |
| @@ -1188,7 +1191,8 @@ struct v4l2_input { | |||
| 1188 | 1191 | ||
| 1189 | /* capabilities flags */ | 1192 | /* capabilities flags */ |
| 1190 | #define V4L2_IN_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */ | 1193 | #define V4L2_IN_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */ |
| 1191 | #define V4L2_IN_CAP_CUSTOM_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ | 1194 | #define V4L2_IN_CAP_DV_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ |
| 1195 | #define V4L2_IN_CAP_CUSTOM_TIMINGS V4L2_IN_CAP_DV_TIMINGS /* For compatibility */ | ||
| 1192 | #define V4L2_IN_CAP_STD 0x00000004 /* Supports S_STD */ | 1196 | #define V4L2_IN_CAP_STD 0x00000004 /* Supports S_STD */ |
| 1193 | 1197 | ||
| 1194 | /* | 1198 | /* |
| @@ -1211,7 +1215,8 @@ struct v4l2_output { | |||
| 1211 | 1215 | ||
| 1212 | /* capabilities flags */ | 1216 | /* capabilities flags */ |
| 1213 | #define V4L2_OUT_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */ | 1217 | #define V4L2_OUT_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */ |
| 1214 | #define V4L2_OUT_CAP_CUSTOM_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ | 1218 | #define V4L2_OUT_CAP_DV_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ |
| 1219 | #define V4L2_OUT_CAP_CUSTOM_TIMINGS V4L2_OUT_CAP_DV_TIMINGS /* For compatibility */ | ||
| 1215 | #define V4L2_OUT_CAP_STD 0x00000004 /* Supports S_STD */ | 1220 | #define V4L2_OUT_CAP_STD 0x00000004 /* Supports S_STD */ |
| 1216 | 1221 | ||
| 1217 | /* | 1222 | /* |
| @@ -1241,16 +1246,6 @@ struct v4l2_ext_controls { | |||
| 1241 | struct v4l2_ext_control *controls; | 1246 | struct v4l2_ext_control *controls; |
| 1242 | }; | 1247 | }; |
| 1243 | 1248 | ||
| 1244 | /* Values for ctrl_class field */ | ||
| 1245 | #define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */ | ||
| 1246 | #define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */ | ||
| 1247 | #define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */ | ||
| 1248 | #define V4L2_CTRL_CLASS_FM_TX 0x009b0000 /* FM Modulator control class */ | ||
| 1249 | #define V4L2_CTRL_CLASS_FLASH 0x009c0000 /* Camera flash controls */ | ||
| 1250 | #define V4L2_CTRL_CLASS_JPEG 0x009d0000 /* JPEG-compression controls */ | ||
| 1251 | #define V4L2_CTRL_CLASS_IMAGE_SOURCE 0x009e0000 /* Image source controls */ | ||
| 1252 | #define V4L2_CTRL_CLASS_IMAGE_PROC 0x009f0000 /* Image processing controls */ | ||
| 1253 | |||
| 1254 | #define V4L2_CTRL_ID_MASK (0x0fffffff) | 1249 | #define V4L2_CTRL_ID_MASK (0x0fffffff) |
| 1255 | #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) | 1250 | #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) |
| 1256 | #define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) | 1251 | #define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) |
| @@ -1306,692 +1301,31 @@ struct v4l2_querymenu { | |||
| 1306 | 1301 | ||
| 1307 | /* User-class control IDs defined by V4L2 */ | 1302 | /* User-class control IDs defined by V4L2 */ |
| 1308 | #define V4L2_CID_MAX_CTRLS 1024 | 1303 | #define V4L2_CID_MAX_CTRLS 1024 |
| 1309 | #define V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900) | ||
| 1310 | #define V4L2_CID_USER_BASE V4L2_CID_BASE | ||
| 1311 | /* IDs reserved for driver specific controls */ | 1304 | /* IDs reserved for driver specific controls */ |
| 1312 | #define V4L2_CID_PRIVATE_BASE 0x08000000 | 1305 | #define V4L2_CID_PRIVATE_BASE 0x08000000 |
| 1313 | 1306 | ||
| 1314 | #define V4L2_CID_USER_CLASS (V4L2_CTRL_CLASS_USER | 1) | 1307 | |
| 1315 | #define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE+0) | 1308 | /* DV-class control IDs defined by V4L2 */ |
| 1316 | #define V4L2_CID_CONTRAST (V4L2_CID_BASE+1) | 1309 | #define V4L2_CID_DV_CLASS_BASE (V4L2_CTRL_CLASS_DV | 0x900) |
| 1317 | #define V4L2_CID_SATURATION (V4L2_CID_BASE+2) | 1310 | #define V4L2_CID_DV_CLASS (V4L2_CTRL_CLASS_DV | 1) |
| 1318 | #define V4L2_CID_HUE (V4L2_CID_BASE+3) | 1311 | |
| 1319 | #define V4L2_CID_AUDIO_VOLUME (V4L2_CID_BASE+5) | 1312 | #define V4L2_CID_DV_TX_HOTPLUG (V4L2_CID_DV_CLASS_BASE + 1) |
| 1320 | #define V4L2_CID_AUDIO_BALANCE (V4L2_CID_BASE+6) | 1313 | #define V4L2_CID_DV_TX_RXSENSE (V4L2_CID_DV_CLASS_BASE + 2) |
| 1321 | #define V4L2_CID_AUDIO_BASS (V4L2_CID_BASE+7) | 1314 | #define V4L2_CID_DV_TX_EDID_PRESENT (V4L2_CID_DV_CLASS_BASE + 3) |
| 1322 | #define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE+8) | 1315 | #define V4L2_CID_DV_TX_MODE (V4L2_CID_DV_CLASS_BASE + 4) |
| 1323 | #define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE+9) | 1316 | enum v4l2_dv_tx_mode { |
| 1324 | #define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE+10) | 1317 | V4L2_DV_TX_MODE_DVI_D = 0, |
| 1325 | #define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11) /* Deprecated */ | 1318 | V4L2_DV_TX_MODE_HDMI = 1, |
| 1326 | #define V4L2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE+12) | 1319 | }; |
| 1327 | #define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE+13) | 1320 | #define V4L2_CID_DV_TX_RGB_RANGE (V4L2_CID_DV_CLASS_BASE + 5) |
| 1328 | #define V4L2_CID_RED_BALANCE (V4L2_CID_BASE+14) | 1321 | enum v4l2_dv_rgb_range { |
| 1329 | #define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE+15) | 1322 | V4L2_DV_RGB_RANGE_AUTO = 0, |
| 1330 | #define V4L2_CID_GAMMA (V4L2_CID_BASE+16) | 1323 | V4L2_DV_RGB_RANGE_LIMITED = 1, |
| 1331 | #define V4L2_CID_WHITENESS (V4L2_CID_GAMMA) /* Deprecated */ | 1324 | V4L2_DV_RGB_RANGE_FULL = 2, |
| 1332 | #define V4L2_CID_EXPOSURE (V4L2_CID_BASE+17) | 1325 | }; |
| 1333 | #define V4L2_CID_AUTOGAIN (V4L2_CID_BASE+18) | 1326 | |
| 1334 | #define V4L2_CID_GAIN (V4L2_CID_BASE+19) | 1327 | #define V4L2_CID_DV_RX_POWER_PRESENT (V4L2_CID_DV_CLASS_BASE + 100) |
| 1335 | #define V4L2_CID_HFLIP (V4L2_CID_BASE+20) | 1328 | #define V4L2_CID_DV_RX_RGB_RANGE (V4L2_CID_DV_CLASS_BASE + 101) |
| 1336 | #define V4L2_CID_VFLIP (V4L2_CID_BASE+21) | ||
| 1337 | |||
| 1338 | /* Deprecated; use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */ | ||
| 1339 | #define V4L2_CID_HCENTER (V4L2_CID_BASE+22) | ||
| 1340 | #define V4L2_CID_VCENTER (V4L2_CID_BASE+23) | ||
| 1341 | |||
| 1342 | #define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24) | ||
| 1343 | enum v4l2_power_line_frequency { | ||
| 1344 | V4L2_CID_POWER_LINE_FREQUENCY_DISABLED = 0, | ||
| 1345 | V4L2_CID_POWER_LINE_FREQUENCY_50HZ = 1, | ||
| 1346 | V4L2_CID_POWER_LINE_FREQUENCY_60HZ = 2, | ||
| 1347 | V4L2_CID_POWER_LINE_FREQUENCY_AUTO = 3, | ||
| 1348 | }; | ||
| 1349 | #define V4L2_CID_HUE_AUTO (V4L2_CID_BASE+25) | ||
| 1350 | #define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE+26) | ||
| 1351 | #define V4L2_CID_SHARPNESS (V4L2_CID_BASE+27) | ||
| 1352 | #define V4L2_CID_BACKLIGHT_COMPENSATION (V4L2_CID_BASE+28) | ||
| 1353 | #define V4L2_CID_CHROMA_AGC (V4L2_CID_BASE+29) | ||
| 1354 | #define V4L2_CID_COLOR_KILLER (V4L2_CID_BASE+30) | ||
| 1355 | #define V4L2_CID_COLORFX (V4L2_CID_BASE+31) | ||
| 1356 | enum v4l2_colorfx { | ||
| 1357 | V4L2_COLORFX_NONE = 0, | ||
| 1358 | V4L2_COLORFX_BW = 1, | ||
| 1359 | V4L2_COLORFX_SEPIA = 2, | ||
| 1360 | V4L2_COLORFX_NEGATIVE = 3, | ||
| 1361 | V4L2_COLORFX_EMBOSS = 4, | ||
| 1362 | V4L2_COLORFX_SKETCH = 5, | ||
| 1363 | V4L2_COLORFX_SKY_BLUE = 6, | ||
| 1364 | V4L2_COLORFX_GRASS_GREEN = 7, | ||
| 1365 | V4L2_COLORFX_SKIN_WHITEN = 8, | ||
| 1366 | V4L2_COLORFX_VIVID = 9, | ||
| 1367 | V4L2_COLORFX_AQUA = 10, | ||
| 1368 | V4L2_COLORFX_ART_FREEZE = 11, | ||
| 1369 | V4L2_COLORFX_SILHOUETTE = 12, | ||
| 1370 | V4L2_COLORFX_SOLARIZATION = 13, | ||
| 1371 | V4L2_COLORFX_ANTIQUE = 14, | ||
| 1372 | V4L2_COLORFX_SET_CBCR = 15, | ||
| 1373 | }; | ||
| 1374 | #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) | ||
| 1375 | #define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) | ||
| 1376 | |||
| 1377 | #define V4L2_CID_ROTATE (V4L2_CID_BASE+34) | ||
| 1378 | #define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35) | ||
| 1379 | |||
| 1380 | #define V4L2_CID_CHROMA_GAIN (V4L2_CID_BASE+36) | ||
| 1381 | |||
| 1382 | #define V4L2_CID_ILLUMINATORS_1 (V4L2_CID_BASE+37) | ||
| 1383 | #define V4L2_CID_ILLUMINATORS_2 (V4L2_CID_BASE+38) | ||
| 1384 | |||
| 1385 | #define V4L2_CID_MIN_BUFFERS_FOR_CAPTURE (V4L2_CID_BASE+39) | ||
| 1386 | #define V4L2_CID_MIN_BUFFERS_FOR_OUTPUT (V4L2_CID_BASE+40) | ||
| 1387 | |||
| 1388 | #define V4L2_CID_ALPHA_COMPONENT (V4L2_CID_BASE+41) | ||
| 1389 | #define V4L2_CID_COLORFX_CBCR (V4L2_CID_BASE+42) | ||
| 1390 | |||
| 1391 | /* last CID + 1 */ | ||
| 1392 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+43) | ||
| 1393 | |||
| 1394 | /* MPEG-class control IDs defined by V4L2 */ | ||
| 1395 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) | ||
| 1396 | #define V4L2_CID_MPEG_CLASS (V4L2_CTRL_CLASS_MPEG | 1) | ||
| 1397 | |||
| 1398 | /* MPEG streams, specific to multiplexed streams */ | ||
| 1399 | #define V4L2_CID_MPEG_STREAM_TYPE (V4L2_CID_MPEG_BASE+0) | ||
| 1400 | enum v4l2_mpeg_stream_type { | ||
| 1401 | V4L2_MPEG_STREAM_TYPE_MPEG2_PS = 0, /* MPEG-2 program stream */ | ||
| 1402 | V4L2_MPEG_STREAM_TYPE_MPEG2_TS = 1, /* MPEG-2 transport stream */ | ||
| 1403 | V4L2_MPEG_STREAM_TYPE_MPEG1_SS = 2, /* MPEG-1 system stream */ | ||
| 1404 | V4L2_MPEG_STREAM_TYPE_MPEG2_DVD = 3, /* MPEG-2 DVD-compatible stream */ | ||
| 1405 | V4L2_MPEG_STREAM_TYPE_MPEG1_VCD = 4, /* MPEG-1 VCD-compatible stream */ | ||
| 1406 | V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD = 5, /* MPEG-2 SVCD-compatible stream */ | ||
| 1407 | }; | ||
| 1408 | #define V4L2_CID_MPEG_STREAM_PID_PMT (V4L2_CID_MPEG_BASE+1) | ||
| 1409 | #define V4L2_CID_MPEG_STREAM_PID_AUDIO (V4L2_CID_MPEG_BASE+2) | ||
| 1410 | #define V4L2_CID_MPEG_STREAM_PID_VIDEO (V4L2_CID_MPEG_BASE+3) | ||
| 1411 | #define V4L2_CID_MPEG_STREAM_PID_PCR (V4L2_CID_MPEG_BASE+4) | ||
| 1412 | #define V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (V4L2_CID_MPEG_BASE+5) | ||
| 1413 | #define V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (V4L2_CID_MPEG_BASE+6) | ||
| 1414 | #define V4L2_CID_MPEG_STREAM_VBI_FMT (V4L2_CID_MPEG_BASE+7) | ||
| 1415 | enum v4l2_mpeg_stream_vbi_fmt { | ||
| 1416 | V4L2_MPEG_STREAM_VBI_FMT_NONE = 0, /* No VBI in the MPEG stream */ | ||
| 1417 | V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1, /* VBI in private packets, IVTV format */ | ||
| 1418 | }; | ||
| 1419 | |||
| 1420 | /* MPEG audio controls specific to multiplexed streams */ | ||
| 1421 | #define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ (V4L2_CID_MPEG_BASE+100) | ||
| 1422 | enum v4l2_mpeg_audio_sampling_freq { | ||
| 1423 | V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100 = 0, | ||
| 1424 | V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000 = 1, | ||
| 1425 | V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000 = 2, | ||
| 1426 | }; | ||
| 1427 | #define V4L2_CID_MPEG_AUDIO_ENCODING (V4L2_CID_MPEG_BASE+101) | ||
| 1428 | enum v4l2_mpeg_audio_encoding { | ||
| 1429 | V4L2_MPEG_AUDIO_ENCODING_LAYER_1 = 0, | ||
| 1430 | V4L2_MPEG_AUDIO_ENCODING_LAYER_2 = 1, | ||
| 1431 | V4L2_MPEG_AUDIO_ENCODING_LAYER_3 = 2, | ||
| 1432 | V4L2_MPEG_AUDIO_ENCODING_AAC = 3, | ||
| 1433 | V4L2_MPEG_AUDIO_ENCODING_AC3 = 4, | ||
| 1434 | }; | ||
| 1435 | #define V4L2_CID_MPEG_AUDIO_L1_BITRATE (V4L2_CID_MPEG_BASE+102) | ||
| 1436 | enum v4l2_mpeg_audio_l1_bitrate { | ||
| 1437 | V4L2_MPEG_AUDIO_L1_BITRATE_32K = 0, | ||
| 1438 | V4L2_MPEG_AUDIO_L1_BITRATE_64K = 1, | ||
| 1439 | V4L2_MPEG_AUDIO_L1_BITRATE_96K = 2, | ||
| 1440 | V4L2_MPEG_AUDIO_L1_BITRATE_128K = 3, | ||
| 1441 | V4L2_MPEG_AUDIO_L1_BITRATE_160K = 4, | ||
| 1442 | V4L2_MPEG_AUDIO_L1_BITRATE_192K = 5, | ||
| 1443 | V4L2_MPEG_AUDIO_L1_BITRATE_224K = 6, | ||
| 1444 | V4L2_MPEG_AUDIO_L1_BITRATE_256K = 7, | ||
| 1445 | V4L2_MPEG_AUDIO_L1_BITRATE_288K = 8, | ||
| 1446 | V4L2_MPEG_AUDIO_L1_BITRATE_320K = 9, | ||
| 1447 | V4L2_MPEG_AUDIO_L1_BITRATE_352K = 10, | ||
| 1448 | V4L2_MPEG_AUDIO_L1_BITRATE_384K = 11, | ||
| 1449 | V4L2_MPEG_AUDIO_L1_BITRATE_416K = 12, | ||
| 1450 | V4L2_MPEG_AUDIO_L1_BITRATE_448K = 13, | ||
| 1451 | }; | ||
| 1452 | #define V4L2_CID_MPEG_AUDIO_L2_BITRATE (V4L2_CID_MPEG_BASE+103) | ||
| 1453 | enum v4l2_mpeg_audio_l2_bitrate { | ||
| 1454 | V4L2_MPEG_AUDIO_L2_BITRATE_32K = 0, | ||
| 1455 | V4L2_MPEG_AUDIO_L2_BITRATE_48K = 1, | ||
| 1456 | V4L2_MPEG_AUDIO_L2_BITRATE_56K = 2, | ||
| 1457 | V4L2_MPEG_AUDIO_L2_BITRATE_64K = 3, | ||
| 1458 | V4L2_MPEG_AUDIO_L2_BITRATE_80K = 4, | ||
| 1459 | V4L2_MPEG_AUDIO_L2_BITRATE_96K = 5, | ||
| 1460 | V4L2_MPEG_AUDIO_L2_BITRATE_112K = 6, | ||
| 1461 | V4L2_MPEG_AUDIO_L2_BITRATE_128K = 7, | ||
| 1462 | V4L2_MPEG_AUDIO_L2_BITRATE_160K = 8, | ||
| 1463 | V4L2_MPEG_AUDIO_L2_BITRATE_192K = 9, | ||
| 1464 | V4L2_MPEG_AUDIO_L2_BITRATE_224K = 10, | ||
| 1465 | V4L2_MPEG_AUDIO_L2_BITRATE_256K = 11, | ||
| 1466 | V4L2_MPEG_AUDIO_L2_BITRATE_320K = 12, | ||
| 1467 | V4L2_MPEG_AUDIO_L2_BITRATE_384K = 13, | ||
| 1468 | }; | ||
| 1469 | #define V4L2_CID_MPEG_AUDIO_L3_BITRATE (V4L2_CID_MPEG_BASE+104) | ||
| 1470 | enum v4l2_mpeg_audio_l3_bitrate { | ||
| 1471 | V4L2_MPEG_AUDIO_L3_BITRATE_32K = 0, | ||
| 1472 | V4L2_MPEG_AUDIO_L3_BITRATE_40K = 1, | ||
| 1473 | V4L2_MPEG_AUDIO_L3_BITRATE_48K = 2, | ||
| 1474 | V4L2_MPEG_AUDIO_L3_BITRATE_56K = 3, | ||
| 1475 | V4L2_MPEG_AUDIO_L3_BITRATE_64K = 4, | ||
| 1476 | V4L2_MPEG_AUDIO_L3_BITRATE_80K = 5, | ||
| 1477 | V4L2_MPEG_AUDIO_L3_BITRATE_96K = 6, | ||
| 1478 | V4L2_MPEG_AUDIO_L3_BITRATE_112K = 7, | ||
| 1479 | V4L2_MPEG_AUDIO_L3_BITRATE_128K = 8, | ||
| 1480 | V4L2_MPEG_AUDIO_L3_BITRATE_160K = 9, | ||
| 1481 | V4L2_MPEG_AUDIO_L3_BITRATE_192K = 10, | ||
| 1482 | V4L2_MPEG_AUDIO_L3_BITRATE_224K = 11, | ||
| 1483 | V4L2_MPEG_AUDIO_L3_BITRATE_256K = 12, | ||
| 1484 | V4L2_MPEG_AUDIO_L3_BITRATE_320K = 13, | ||
| 1485 | }; | ||
| 1486 | #define V4L2_CID_MPEG_AUDIO_MODE (V4L2_CID_MPEG_BASE+105) | ||
| 1487 | enum v4l2_mpeg_audio_mode { | ||
| 1488 | V4L2_MPEG_AUDIO_MODE_STEREO = 0, | ||
| 1489 | V4L2_MPEG_AUDIO_MODE_JOINT_STEREO = 1, | ||
| 1490 | V4L2_MPEG_AUDIO_MODE_DUAL = 2, | ||
| 1491 | V4L2_MPEG_AUDIO_MODE_MONO = 3, | ||
| 1492 | }; | ||
| 1493 | #define V4L2_CID_MPEG_AUDIO_MODE_EXTENSION (V4L2_CID_MPEG_BASE+106) | ||
| 1494 | enum v4l2_mpeg_audio_mode_extension { | ||
| 1495 | V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4 = 0, | ||
| 1496 | V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8 = 1, | ||
| 1497 | V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12 = 2, | ||
| 1498 | V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16 = 3, | ||
| 1499 | }; | ||
| 1500 | #define V4L2_CID_MPEG_AUDIO_EMPHASIS (V4L2_CID_MPEG_BASE+107) | ||
| 1501 | enum v4l2_mpeg_audio_emphasis { | ||
| 1502 | V4L2_MPEG_AUDIO_EMPHASIS_NONE = 0, | ||
| 1503 | V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS = 1, | ||
| 1504 | V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17 = 2, | ||
| 1505 | }; | ||
| 1506 | #define V4L2_CID_MPEG_AUDIO_CRC (V4L2_CID_MPEG_BASE+108) | ||
| 1507 | enum v4l2_mpeg_audio_crc { | ||
| 1508 | V4L2_MPEG_AUDIO_CRC_NONE = 0, | ||
| 1509 | V4L2_MPEG_AUDIO_CRC_CRC16 = 1, | ||
| 1510 | }; | ||
| 1511 | #define V4L2_CID_MPEG_AUDIO_MUTE (V4L2_CID_MPEG_BASE+109) | ||
| 1512 | #define V4L2_CID_MPEG_AUDIO_AAC_BITRATE (V4L2_CID_MPEG_BASE+110) | ||
| 1513 | #define V4L2_CID_MPEG_AUDIO_AC3_BITRATE (V4L2_CID_MPEG_BASE+111) | ||
| 1514 | enum v4l2_mpeg_audio_ac3_bitrate { | ||
| 1515 | V4L2_MPEG_AUDIO_AC3_BITRATE_32K = 0, | ||
| 1516 | V4L2_MPEG_AUDIO_AC3_BITRATE_40K = 1, | ||
| 1517 | V4L2_MPEG_AUDIO_AC3_BITRATE_48K = 2, | ||
| 1518 | V4L2_MPEG_AUDIO_AC3_BITRATE_56K = 3, | ||
| 1519 | V4L2_MPEG_AUDIO_AC3_BITRATE_64K = 4, | ||
| 1520 | V4L2_MPEG_AUDIO_AC3_BITRATE_80K = 5, | ||
| 1521 | V4L2_MPEG_AUDIO_AC3_BITRATE_96K = 6, | ||
| 1522 | V4L2_MPEG_AUDIO_AC3_BITRATE_112K = 7, | ||
| 1523 | V4L2_MPEG_AUDIO_AC3_BITRATE_128K = 8, | ||
| 1524 | V4L2_MPEG_AUDIO_AC3_BITRATE_160K = 9, | ||
| 1525 | V4L2_MPEG_AUDIO_AC3_BITRATE_192K = 10, | ||
| 1526 | V4L2_MPEG_AUDIO_AC3_BITRATE_224K = 11, | ||
| 1527 | V4L2_MPEG_AUDIO_AC3_BITRATE_256K = 12, | ||
| 1528 | V4L2_MPEG_AUDIO_AC3_BITRATE_320K = 13, | ||
| 1529 | V4L2_MPEG_AUDIO_AC3_BITRATE_384K = 14, | ||
| 1530 | V4L2_MPEG_AUDIO_AC3_BITRATE_448K = 15, | ||
| 1531 | V4L2_MPEG_AUDIO_AC3_BITRATE_512K = 16, | ||
| 1532 | V4L2_MPEG_AUDIO_AC3_BITRATE_576K = 17, | ||
| 1533 | V4L2_MPEG_AUDIO_AC3_BITRATE_640K = 18, | ||
| 1534 | }; | ||
| 1535 | #define V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK (V4L2_CID_MPEG_BASE+112) | ||
| 1536 | enum v4l2_mpeg_audio_dec_playback { | ||
| 1537 | V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO = 0, | ||
| 1538 | V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO = 1, | ||
| 1539 | V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT = 2, | ||
| 1540 | V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT = 3, | ||
| 1541 | V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO = 4, | ||
| 1542 | V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO = 5, | ||
| 1543 | }; | ||
| 1544 | #define V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK (V4L2_CID_MPEG_BASE+113) | ||
| 1545 | |||
| 1546 | /* MPEG video controls specific to multiplexed streams */ | ||
| 1547 | #define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200) | ||
| 1548 | enum v4l2_mpeg_video_encoding { | ||
| 1549 | V4L2_MPEG_VIDEO_ENCODING_MPEG_1 = 0, | ||
| 1550 | V4L2_MPEG_VIDEO_ENCODING_MPEG_2 = 1, | ||
| 1551 | V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC = 2, | ||
| 1552 | }; | ||
| 1553 | #define V4L2_CID_MPEG_VIDEO_ASPECT (V4L2_CID_MPEG_BASE+201) | ||
| 1554 | enum v4l2_mpeg_video_aspect { | ||
| 1555 | V4L2_MPEG_VIDEO_ASPECT_1x1 = 0, | ||
| 1556 | V4L2_MPEG_VIDEO_ASPECT_4x3 = 1, | ||
| 1557 | V4L2_MPEG_VIDEO_ASPECT_16x9 = 2, | ||
| 1558 | V4L2_MPEG_VIDEO_ASPECT_221x100 = 3, | ||
| 1559 | }; | ||
| 1560 | #define V4L2_CID_MPEG_VIDEO_B_FRAMES (V4L2_CID_MPEG_BASE+202) | ||
| 1561 | #define V4L2_CID_MPEG_VIDEO_GOP_SIZE (V4L2_CID_MPEG_BASE+203) | ||
| 1562 | #define V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (V4L2_CID_MPEG_BASE+204) | ||
| 1563 | #define V4L2_CID_MPEG_VIDEO_PULLDOWN (V4L2_CID_MPEG_BASE+205) | ||
| 1564 | #define V4L2_CID_MPEG_VIDEO_BITRATE_MODE (V4L2_CID_MPEG_BASE+206) | ||
| 1565 | enum v4l2_mpeg_video_bitrate_mode { | ||
| 1566 | V4L2_MPEG_VIDEO_BITRATE_MODE_VBR = 0, | ||
| 1567 | V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1, | ||
| 1568 | }; | ||
| 1569 | #define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_MPEG_BASE+207) | ||
| 1570 | #define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_MPEG_BASE+208) | ||
| 1571 | #define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_MPEG_BASE+209) | ||
| 1572 | #define V4L2_CID_MPEG_VIDEO_MUTE (V4L2_CID_MPEG_BASE+210) | ||
| 1573 | #define V4L2_CID_MPEG_VIDEO_MUTE_YUV (V4L2_CID_MPEG_BASE+211) | ||
| 1574 | #define V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (V4L2_CID_MPEG_BASE+212) | ||
| 1575 | #define V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (V4L2_CID_MPEG_BASE+213) | ||
| 1576 | #define V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (V4L2_CID_MPEG_BASE+214) | ||
| 1577 | #define V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (V4L2_CID_MPEG_BASE+215) | ||
| 1578 | #define V4L2_CID_MPEG_VIDEO_HEADER_MODE (V4L2_CID_MPEG_BASE+216) | ||
| 1579 | enum v4l2_mpeg_video_header_mode { | ||
| 1580 | V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE = 0, | ||
| 1581 | V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME = 1, | ||
| 1582 | |||
| 1583 | }; | ||
| 1584 | #define V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (V4L2_CID_MPEG_BASE+217) | ||
| 1585 | #define V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (V4L2_CID_MPEG_BASE+218) | ||
| 1586 | #define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (V4L2_CID_MPEG_BASE+219) | ||
| 1587 | #define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (V4L2_CID_MPEG_BASE+220) | ||
| 1588 | #define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE (V4L2_CID_MPEG_BASE+221) | ||
| 1589 | enum v4l2_mpeg_video_multi_slice_mode { | ||
| 1590 | V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE = 0, | ||
| 1591 | V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_MB = 1, | ||
| 1592 | V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES = 2, | ||
| 1593 | }; | ||
| 1594 | #define V4L2_CID_MPEG_VIDEO_VBV_SIZE (V4L2_CID_MPEG_BASE+222) | ||
| 1595 | #define V4L2_CID_MPEG_VIDEO_DEC_PTS (V4L2_CID_MPEG_BASE+223) | ||
| 1596 | #define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_MPEG_BASE+224) | ||
| 1597 | |||
| 1598 | #define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300) | ||
| 1599 | #define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301) | ||
| 1600 | #define V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (V4L2_CID_MPEG_BASE+302) | ||
| 1601 | #define V4L2_CID_MPEG_VIDEO_H263_MIN_QP (V4L2_CID_MPEG_BASE+303) | ||
| 1602 | #define V4L2_CID_MPEG_VIDEO_H263_MAX_QP (V4L2_CID_MPEG_BASE+304) | ||
| 1603 | #define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (V4L2_CID_MPEG_BASE+350) | ||
| 1604 | #define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (V4L2_CID_MPEG_BASE+351) | ||
| 1605 | #define V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (V4L2_CID_MPEG_BASE+352) | ||
| 1606 | #define V4L2_CID_MPEG_VIDEO_H264_MIN_QP (V4L2_CID_MPEG_BASE+353) | ||
| 1607 | #define V4L2_CID_MPEG_VIDEO_H264_MAX_QP (V4L2_CID_MPEG_BASE+354) | ||
| 1608 | #define V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (V4L2_CID_MPEG_BASE+355) | ||
| 1609 | #define V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (V4L2_CID_MPEG_BASE+356) | ||
| 1610 | #define V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE (V4L2_CID_MPEG_BASE+357) | ||
| 1611 | enum v4l2_mpeg_video_h264_entropy_mode { | ||
| 1612 | V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC = 0, | ||
| 1613 | V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC = 1, | ||
| 1614 | }; | ||
| 1615 | #define V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (V4L2_CID_MPEG_BASE+358) | ||
| 1616 | #define V4L2_CID_MPEG_VIDEO_H264_LEVEL (V4L2_CID_MPEG_BASE+359) | ||
| 1617 | enum v4l2_mpeg_video_h264_level { | ||
| 1618 | V4L2_MPEG_VIDEO_H264_LEVEL_1_0 = 0, | ||
| 1619 | V4L2_MPEG_VIDEO_H264_LEVEL_1B = 1, | ||
| 1620 | V4L2_MPEG_VIDEO_H264_LEVEL_1_1 = 2, | ||
| 1621 | V4L2_MPEG_VIDEO_H264_LEVEL_1_2 = 3, | ||
| 1622 | V4L2_MPEG_VIDEO_H264_LEVEL_1_3 = 4, | ||
| 1623 | V4L2_MPEG_VIDEO_H264_LEVEL_2_0 = 5, | ||
| 1624 | V4L2_MPEG_VIDEO_H264_LEVEL_2_1 = 6, | ||
| 1625 | V4L2_MPEG_VIDEO_H264_LEVEL_2_2 = 7, | ||
| 1626 | V4L2_MPEG_VIDEO_H264_LEVEL_3_0 = 8, | ||
| 1627 | V4L2_MPEG_VIDEO_H264_LEVEL_3_1 = 9, | ||
| 1628 | V4L2_MPEG_VIDEO_H264_LEVEL_3_2 = 10, | ||
| 1629 | V4L2_MPEG_VIDEO_H264_LEVEL_4_0 = 11, | ||
| 1630 | V4L2_MPEG_VIDEO_H264_LEVEL_4_1 = 12, | ||
| 1631 | V4L2_MPEG_VIDEO_H264_LEVEL_4_2 = 13, | ||
| 1632 | V4L2_MPEG_VIDEO_H264_LEVEL_5_0 = 14, | ||
| 1633 | V4L2_MPEG_VIDEO_H264_LEVEL_5_1 = 15, | ||
| 1634 | }; | ||
| 1635 | #define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA (V4L2_CID_MPEG_BASE+360) | ||
| 1636 | #define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA (V4L2_CID_MPEG_BASE+361) | ||
| 1637 | #define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE (V4L2_CID_MPEG_BASE+362) | ||
| 1638 | enum v4l2_mpeg_video_h264_loop_filter_mode { | ||
| 1639 | V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED = 0, | ||
| 1640 | V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED = 1, | ||
| 1641 | V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY = 2, | ||
| 1642 | }; | ||
| 1643 | #define V4L2_CID_MPEG_VIDEO_H264_PROFILE (V4L2_CID_MPEG_BASE+363) | ||
| 1644 | enum v4l2_mpeg_video_h264_profile { | ||
| 1645 | V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE = 0, | ||
| 1646 | V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE = 1, | ||
| 1647 | V4L2_MPEG_VIDEO_H264_PROFILE_MAIN = 2, | ||
| 1648 | V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED = 3, | ||
| 1649 | V4L2_MPEG_VIDEO_H264_PROFILE_HIGH = 4, | ||
| 1650 | V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10 = 5, | ||
| 1651 | V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422 = 6, | ||
| 1652 | V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE = 7, | ||
| 1653 | V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA = 8, | ||
| 1654 | V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA = 9, | ||
| 1655 | V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA = 10, | ||
| 1656 | V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA = 11, | ||
| 1657 | V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE = 12, | ||
| 1658 | V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH = 13, | ||
| 1659 | V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA = 14, | ||
| 1660 | V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH = 15, | ||
| 1661 | V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH = 16, | ||
| 1662 | }; | ||
| 1663 | #define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT (V4L2_CID_MPEG_BASE+364) | ||
| 1664 | #define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH (V4L2_CID_MPEG_BASE+365) | ||
| 1665 | #define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE (V4L2_CID_MPEG_BASE+366) | ||
| 1666 | #define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC (V4L2_CID_MPEG_BASE+367) | ||
| 1667 | enum v4l2_mpeg_video_h264_vui_sar_idc { | ||
| 1668 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED = 0, | ||
| 1669 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1 = 1, | ||
| 1670 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11 = 2, | ||
| 1671 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11 = 3, | ||
| 1672 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11 = 4, | ||
| 1673 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33 = 5, | ||
| 1674 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11 = 6, | ||
| 1675 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11 = 7, | ||
| 1676 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11 = 8, | ||
| 1677 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33 = 9, | ||
| 1678 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11 = 10, | ||
| 1679 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11 = 11, | ||
| 1680 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33 = 12, | ||
| 1681 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99 = 13, | ||
| 1682 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3 = 14, | ||
| 1683 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2 = 15, | ||
| 1684 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1 = 16, | ||
| 1685 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED = 17, | ||
| 1686 | }; | ||
| 1687 | #define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (V4L2_CID_MPEG_BASE+400) | ||
| 1688 | #define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (V4L2_CID_MPEG_BASE+401) | ||
| 1689 | #define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (V4L2_CID_MPEG_BASE+402) | ||
| 1690 | #define V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (V4L2_CID_MPEG_BASE+403) | ||
| 1691 | #define V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (V4L2_CID_MPEG_BASE+404) | ||
| 1692 | #define V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL (V4L2_CID_MPEG_BASE+405) | ||
| 1693 | enum v4l2_mpeg_video_mpeg4_level { | ||
| 1694 | V4L2_MPEG_VIDEO_MPEG4_LEVEL_0 = 0, | ||
| 1695 | V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B = 1, | ||
| 1696 | V4L2_MPEG_VIDEO_MPEG4_LEVEL_1 = 2, | ||
| 1697 | V4L2_MPEG_VIDEO_MPEG4_LEVEL_2 = 3, | ||
| 1698 | V4L2_MPEG_VIDEO_MPEG4_LEVEL_3 = 4, | ||
| 1699 | V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B = 5, | ||
| 1700 | V4L2_MPEG_VIDEO_MPEG4_LEVEL_4 = 6, | ||
| 1701 | V4L2_MPEG_VIDEO_MPEG4_LEVEL_5 = 7, | ||
| 1702 | }; | ||
| 1703 | #define V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE (V4L2_CID_MPEG_BASE+406) | ||
| 1704 | enum v4l2_mpeg_video_mpeg4_profile { | ||
| 1705 | V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE = 0, | ||
| 1706 | V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE = 1, | ||
| 1707 | V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE = 2, | ||
| 1708 | V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE = 3, | ||
| 1709 | V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY = 4, | ||
| 1710 | }; | ||
| 1711 | #define V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (V4L2_CID_MPEG_BASE+407) | ||
| 1712 | |||
| 1713 | /* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */ | ||
| 1714 | #define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000) | ||
| 1715 | #define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+0) | ||
| 1716 | enum v4l2_mpeg_cx2341x_video_spatial_filter_mode { | ||
| 1717 | V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL = 0, | ||
| 1718 | V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO = 1, | ||
| 1719 | }; | ||
| 1720 | #define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (V4L2_CID_MPEG_CX2341X_BASE+1) | ||
| 1721 | #define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+2) | ||
| 1722 | enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type { | ||
| 1723 | V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF = 0, | ||
| 1724 | V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR = 1, | ||
| 1725 | V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT = 2, | ||
| 1726 | V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE = 3, | ||
| 1727 | V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE = 4, | ||
| 1728 | }; | ||
| 1729 | #define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+3) | ||
| 1730 | enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type { | ||
| 1731 | V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF = 0, | ||
| 1732 | V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR = 1, | ||
| 1733 | }; | ||
| 1734 | #define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+4) | ||
| 1735 | enum v4l2_mpeg_cx2341x_video_temporal_filter_mode { | ||
| 1736 | V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL = 0, | ||
| 1737 | V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO = 1, | ||
| 1738 | }; | ||
| 1739 | #define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (V4L2_CID_MPEG_CX2341X_BASE+5) | ||
| 1740 | #define V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+6) | ||
| 1741 | enum v4l2_mpeg_cx2341x_video_median_filter_type { | ||
| 1742 | V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF = 0, | ||
| 1743 | V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR = 1, | ||
| 1744 | V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT = 2, | ||
| 1745 | V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT = 3, | ||
| 1746 | V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG = 4, | ||
| 1747 | }; | ||
| 1748 | #define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+7) | ||
| 1749 | #define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+8) | ||
| 1750 | #define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+9) | ||
| 1751 | #define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+10) | ||
| 1752 | #define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (V4L2_CID_MPEG_CX2341X_BASE+11) | ||
| 1753 | |||
| 1754 | /* MPEG-class control IDs specific to the Samsung MFC 5.1 driver as defined by V4L2 */ | ||
| 1755 | #define V4L2_CID_MPEG_MFC51_BASE (V4L2_CTRL_CLASS_MPEG | 0x1100) | ||
| 1756 | |||
| 1757 | #define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (V4L2_CID_MPEG_MFC51_BASE+0) | ||
| 1758 | #define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (V4L2_CID_MPEG_MFC51_BASE+1) | ||
| 1759 | #define V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE (V4L2_CID_MPEG_MFC51_BASE+2) | ||
| 1760 | enum v4l2_mpeg_mfc51_video_frame_skip_mode { | ||
| 1761 | V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED = 0, | ||
| 1762 | V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT = 1, | ||
| 1763 | V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT = 2, | ||
| 1764 | }; | ||
| 1765 | #define V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE (V4L2_CID_MPEG_MFC51_BASE+3) | ||
| 1766 | enum v4l2_mpeg_mfc51_video_force_frame_type { | ||
| 1767 | V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_DISABLED = 0, | ||
| 1768 | V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_I_FRAME = 1, | ||
| 1769 | V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_NOT_CODED = 2, | ||
| 1770 | }; | ||
| 1771 | #define V4L2_CID_MPEG_MFC51_VIDEO_PADDING (V4L2_CID_MPEG_MFC51_BASE+4) | ||
| 1772 | #define V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (V4L2_CID_MPEG_MFC51_BASE+5) | ||
| 1773 | #define V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (V4L2_CID_MPEG_MFC51_BASE+6) | ||
| 1774 | #define V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (V4L2_CID_MPEG_MFC51_BASE+7) | ||
| 1775 | #define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (V4L2_CID_MPEG_MFC51_BASE+50) | ||
| 1776 | #define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (V4L2_CID_MPEG_MFC51_BASE+51) | ||
| 1777 | #define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (V4L2_CID_MPEG_MFC51_BASE+52) | ||
| 1778 | #define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (V4L2_CID_MPEG_MFC51_BASE+53) | ||
| 1779 | #define V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (V4L2_CID_MPEG_MFC51_BASE+54) | ||
| 1780 | |||
| 1781 | /* Camera class control IDs */ | ||
| 1782 | #define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900) | ||
| 1783 | #define V4L2_CID_CAMERA_CLASS (V4L2_CTRL_CLASS_CAMERA | 1) | ||
| 1784 | |||
| 1785 | #define V4L2_CID_EXPOSURE_AUTO (V4L2_CID_CAMERA_CLASS_BASE+1) | ||
| 1786 | enum v4l2_exposure_auto_type { | ||
| 1787 | V4L2_EXPOSURE_AUTO = 0, | ||
| 1788 | V4L2_EXPOSURE_MANUAL = 1, | ||
| 1789 | V4L2_EXPOSURE_SHUTTER_PRIORITY = 2, | ||
| 1790 | V4L2_EXPOSURE_APERTURE_PRIORITY = 3 | ||
| 1791 | }; | ||
| 1792 | #define V4L2_CID_EXPOSURE_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+2) | ||
| 1793 | #define V4L2_CID_EXPOSURE_AUTO_PRIORITY (V4L2_CID_CAMERA_CLASS_BASE+3) | ||
| 1794 | |||
| 1795 | #define V4L2_CID_PAN_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+4) | ||
| 1796 | #define V4L2_CID_TILT_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+5) | ||
| 1797 | #define V4L2_CID_PAN_RESET (V4L2_CID_CAMERA_CLASS_BASE+6) | ||
| 1798 | #define V4L2_CID_TILT_RESET (V4L2_CID_CAMERA_CLASS_BASE+7) | ||
| 1799 | |||
| 1800 | #define V4L2_CID_PAN_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+8) | ||
| 1801 | #define V4L2_CID_TILT_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+9) | ||
| 1802 | |||
| 1803 | #define V4L2_CID_FOCUS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+10) | ||
| 1804 | #define V4L2_CID_FOCUS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+11) | ||
| 1805 | #define V4L2_CID_FOCUS_AUTO (V4L2_CID_CAMERA_CLASS_BASE+12) | ||
| 1806 | |||
| 1807 | #define V4L2_CID_ZOOM_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+13) | ||
| 1808 | #define V4L2_CID_ZOOM_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+14) | ||
| 1809 | #define V4L2_CID_ZOOM_CONTINUOUS (V4L2_CID_CAMERA_CLASS_BASE+15) | ||
| 1810 | |||
| 1811 | #define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) | ||
| 1812 | |||
| 1813 | #define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+17) | ||
| 1814 | #define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+18) | ||
| 1815 | |||
| 1816 | #define V4L2_CID_AUTO_EXPOSURE_BIAS (V4L2_CID_CAMERA_CLASS_BASE+19) | ||
| 1817 | |||
| 1818 | #define V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE (V4L2_CID_CAMERA_CLASS_BASE+20) | ||
| 1819 | enum v4l2_auto_n_preset_white_balance { | ||
| 1820 | V4L2_WHITE_BALANCE_MANUAL = 0, | ||
| 1821 | V4L2_WHITE_BALANCE_AUTO = 1, | ||
| 1822 | V4L2_WHITE_BALANCE_INCANDESCENT = 2, | ||
| 1823 | V4L2_WHITE_BALANCE_FLUORESCENT = 3, | ||
| 1824 | V4L2_WHITE_BALANCE_FLUORESCENT_H = 4, | ||
| 1825 | V4L2_WHITE_BALANCE_HORIZON = 5, | ||
| 1826 | V4L2_WHITE_BALANCE_DAYLIGHT = 6, | ||
| 1827 | V4L2_WHITE_BALANCE_FLASH = 7, | ||
| 1828 | V4L2_WHITE_BALANCE_CLOUDY = 8, | ||
| 1829 | V4L2_WHITE_BALANCE_SHADE = 9, | ||
| 1830 | }; | ||
| 1831 | |||
| 1832 | #define V4L2_CID_WIDE_DYNAMIC_RANGE (V4L2_CID_CAMERA_CLASS_BASE+21) | ||
| 1833 | #define V4L2_CID_IMAGE_STABILIZATION (V4L2_CID_CAMERA_CLASS_BASE+22) | ||
| 1834 | |||
| 1835 | #define V4L2_CID_ISO_SENSITIVITY (V4L2_CID_CAMERA_CLASS_BASE+23) | ||
| 1836 | #define V4L2_CID_ISO_SENSITIVITY_AUTO (V4L2_CID_CAMERA_CLASS_BASE+24) | ||
| 1837 | enum v4l2_iso_sensitivity_auto_type { | ||
| 1838 | V4L2_ISO_SENSITIVITY_MANUAL = 0, | ||
| 1839 | V4L2_ISO_SENSITIVITY_AUTO = 1, | ||
| 1840 | }; | ||
| 1841 | |||
| 1842 | #define V4L2_CID_EXPOSURE_METERING (V4L2_CID_CAMERA_CLASS_BASE+25) | ||
| 1843 | enum v4l2_exposure_metering { | ||
| 1844 | V4L2_EXPOSURE_METERING_AVERAGE = 0, | ||
| 1845 | V4L2_EXPOSURE_METERING_CENTER_WEIGHTED = 1, | ||
| 1846 | V4L2_EXPOSURE_METERING_SPOT = 2, | ||
| 1847 | }; | ||
| 1848 | |||
| 1849 | #define V4L2_CID_SCENE_MODE (V4L2_CID_CAMERA_CLASS_BASE+26) | ||
| 1850 | enum v4l2_scene_mode { | ||
| 1851 | V4L2_SCENE_MODE_NONE = 0, | ||
| 1852 | V4L2_SCENE_MODE_BACKLIGHT = 1, | ||
| 1853 | V4L2_SCENE_MODE_BEACH_SNOW = 2, | ||
| 1854 | V4L2_SCENE_MODE_CANDLE_LIGHT = 3, | ||
| 1855 | V4L2_SCENE_MODE_DAWN_DUSK = 4, | ||
| 1856 | V4L2_SCENE_MODE_FALL_COLORS = 5, | ||
| 1857 | V4L2_SCENE_MODE_FIREWORKS = 6, | ||
| 1858 | V4L2_SCENE_MODE_LANDSCAPE = 7, | ||
| 1859 | V4L2_SCENE_MODE_NIGHT = 8, | ||
| 1860 | V4L2_SCENE_MODE_PARTY_INDOOR = 9, | ||
| 1861 | V4L2_SCENE_MODE_PORTRAIT = 10, | ||
| 1862 | V4L2_SCENE_MODE_SPORTS = 11, | ||
| 1863 | V4L2_SCENE_MODE_SUNSET = 12, | ||
| 1864 | V4L2_SCENE_MODE_TEXT = 13, | ||
| 1865 | }; | ||
| 1866 | |||
| 1867 | #define V4L2_CID_3A_LOCK (V4L2_CID_CAMERA_CLASS_BASE+27) | ||
| 1868 | #define V4L2_LOCK_EXPOSURE (1 << 0) | ||
| 1869 | #define V4L2_LOCK_WHITE_BALANCE (1 << 1) | ||
| 1870 | #define V4L2_LOCK_FOCUS (1 << 2) | ||
| 1871 | |||
| 1872 | #define V4L2_CID_AUTO_FOCUS_START (V4L2_CID_CAMERA_CLASS_BASE+28) | ||
| 1873 | #define V4L2_CID_AUTO_FOCUS_STOP (V4L2_CID_CAMERA_CLASS_BASE+29) | ||
| 1874 | #define V4L2_CID_AUTO_FOCUS_STATUS (V4L2_CID_CAMERA_CLASS_BASE+30) | ||
| 1875 | #define V4L2_AUTO_FOCUS_STATUS_IDLE (0 << 0) | ||
| 1876 | #define V4L2_AUTO_FOCUS_STATUS_BUSY (1 << 0) | ||
| 1877 | #define V4L2_AUTO_FOCUS_STATUS_REACHED (1 << 1) | ||
| 1878 | #define V4L2_AUTO_FOCUS_STATUS_FAILED (1 << 2) | ||
| 1879 | |||
| 1880 | #define V4L2_CID_AUTO_FOCUS_RANGE (V4L2_CID_CAMERA_CLASS_BASE+31) | ||
| 1881 | enum v4l2_auto_focus_range { | ||
| 1882 | V4L2_AUTO_FOCUS_RANGE_AUTO = 0, | ||
| 1883 | V4L2_AUTO_FOCUS_RANGE_NORMAL = 1, | ||
| 1884 | V4L2_AUTO_FOCUS_RANGE_MACRO = 2, | ||
| 1885 | V4L2_AUTO_FOCUS_RANGE_INFINITY = 3, | ||
| 1886 | }; | ||
| 1887 | |||
| 1888 | /* FM Modulator class control IDs */ | ||
| 1889 | #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) | ||
| 1890 | #define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1) | ||
| 1891 | |||
| 1892 | #define V4L2_CID_RDS_TX_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 1) | ||
| 1893 | #define V4L2_CID_RDS_TX_PI (V4L2_CID_FM_TX_CLASS_BASE + 2) | ||
| 1894 | #define V4L2_CID_RDS_TX_PTY (V4L2_CID_FM_TX_CLASS_BASE + 3) | ||
| 1895 | #define V4L2_CID_RDS_TX_PS_NAME (V4L2_CID_FM_TX_CLASS_BASE + 5) | ||
| 1896 | #define V4L2_CID_RDS_TX_RADIO_TEXT (V4L2_CID_FM_TX_CLASS_BASE + 6) | ||
| 1897 | |||
| 1898 | #define V4L2_CID_AUDIO_LIMITER_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 64) | ||
| 1899 | #define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 65) | ||
| 1900 | #define V4L2_CID_AUDIO_LIMITER_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 66) | ||
| 1901 | |||
| 1902 | #define V4L2_CID_AUDIO_COMPRESSION_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 80) | ||
| 1903 | #define V4L2_CID_AUDIO_COMPRESSION_GAIN (V4L2_CID_FM_TX_CLASS_BASE + 81) | ||
| 1904 | #define V4L2_CID_AUDIO_COMPRESSION_THRESHOLD (V4L2_CID_FM_TX_CLASS_BASE + 82) | ||
| 1905 | #define V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME (V4L2_CID_FM_TX_CLASS_BASE + 83) | ||
| 1906 | #define V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 84) | ||
| 1907 | |||
| 1908 | #define V4L2_CID_PILOT_TONE_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 96) | ||
| 1909 | #define V4L2_CID_PILOT_TONE_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 97) | ||
| 1910 | #define V4L2_CID_PILOT_TONE_FREQUENCY (V4L2_CID_FM_TX_CLASS_BASE + 98) | ||
| 1911 | |||
| 1912 | #define V4L2_CID_TUNE_PREEMPHASIS (V4L2_CID_FM_TX_CLASS_BASE + 112) | ||
| 1913 | enum v4l2_preemphasis { | ||
| 1914 | V4L2_PREEMPHASIS_DISABLED = 0, | ||
| 1915 | V4L2_PREEMPHASIS_50_uS = 1, | ||
| 1916 | V4L2_PREEMPHASIS_75_uS = 2, | ||
| 1917 | }; | ||
| 1918 | #define V4L2_CID_TUNE_POWER_LEVEL (V4L2_CID_FM_TX_CLASS_BASE + 113) | ||
| 1919 | #define V4L2_CID_TUNE_ANTENNA_CAPACITOR (V4L2_CID_FM_TX_CLASS_BASE + 114) | ||
| 1920 | |||
| 1921 | /* Flash and privacy (indicator) light controls */ | ||
| 1922 | #define V4L2_CID_FLASH_CLASS_BASE (V4L2_CTRL_CLASS_FLASH | 0x900) | ||
| 1923 | #define V4L2_CID_FLASH_CLASS (V4L2_CTRL_CLASS_FLASH | 1) | ||
| 1924 | |||
| 1925 | #define V4L2_CID_FLASH_LED_MODE (V4L2_CID_FLASH_CLASS_BASE + 1) | ||
| 1926 | enum v4l2_flash_led_mode { | ||
| 1927 | V4L2_FLASH_LED_MODE_NONE, | ||
| 1928 | V4L2_FLASH_LED_MODE_FLASH, | ||
| 1929 | V4L2_FLASH_LED_MODE_TORCH, | ||
| 1930 | }; | ||
| 1931 | |||
| 1932 | #define V4L2_CID_FLASH_STROBE_SOURCE (V4L2_CID_FLASH_CLASS_BASE + 2) | ||
| 1933 | enum v4l2_flash_strobe_source { | ||
| 1934 | V4L2_FLASH_STROBE_SOURCE_SOFTWARE, | ||
| 1935 | V4L2_FLASH_STROBE_SOURCE_EXTERNAL, | ||
| 1936 | }; | ||
| 1937 | |||
| 1938 | #define V4L2_CID_FLASH_STROBE (V4L2_CID_FLASH_CLASS_BASE + 3) | ||
| 1939 | #define V4L2_CID_FLASH_STROBE_STOP (V4L2_CID_FLASH_CLASS_BASE + 4) | ||
| 1940 | #define V4L2_CID_FLASH_STROBE_STATUS (V4L2_CID_FLASH_CLASS_BASE + 5) | ||
| 1941 | |||
| 1942 | #define V4L2_CID_FLASH_TIMEOUT (V4L2_CID_FLASH_CLASS_BASE + 6) | ||
| 1943 | #define V4L2_CID_FLASH_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 7) | ||
| 1944 | #define V4L2_CID_FLASH_TORCH_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 8) | ||
| 1945 | #define V4L2_CID_FLASH_INDICATOR_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 9) | ||
| 1946 | |||
| 1947 | #define V4L2_CID_FLASH_FAULT (V4L2_CID_FLASH_CLASS_BASE + 10) | ||
| 1948 | #define V4L2_FLASH_FAULT_OVER_VOLTAGE (1 << 0) | ||
| 1949 | #define V4L2_FLASH_FAULT_TIMEOUT (1 << 1) | ||
| 1950 | #define V4L2_FLASH_FAULT_OVER_TEMPERATURE (1 << 2) | ||
| 1951 | #define V4L2_FLASH_FAULT_SHORT_CIRCUIT (1 << 3) | ||
| 1952 | #define V4L2_FLASH_FAULT_OVER_CURRENT (1 << 4) | ||
| 1953 | #define V4L2_FLASH_FAULT_INDICATOR (1 << 5) | ||
| 1954 | |||
| 1955 | #define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11) | ||
| 1956 | #define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12) | ||
| 1957 | |||
| 1958 | /* JPEG-class control IDs defined by V4L2 */ | ||
| 1959 | #define V4L2_CID_JPEG_CLASS_BASE (V4L2_CTRL_CLASS_JPEG | 0x900) | ||
| 1960 | #define V4L2_CID_JPEG_CLASS (V4L2_CTRL_CLASS_JPEG | 1) | ||
| 1961 | |||
| 1962 | #define V4L2_CID_JPEG_CHROMA_SUBSAMPLING (V4L2_CID_JPEG_CLASS_BASE + 1) | ||
| 1963 | enum v4l2_jpeg_chroma_subsampling { | ||
| 1964 | V4L2_JPEG_CHROMA_SUBSAMPLING_444 = 0, | ||
| 1965 | V4L2_JPEG_CHROMA_SUBSAMPLING_422 = 1, | ||
| 1966 | V4L2_JPEG_CHROMA_SUBSAMPLING_420 = 2, | ||
| 1967 | V4L2_JPEG_CHROMA_SUBSAMPLING_411 = 3, | ||
| 1968 | V4L2_JPEG_CHROMA_SUBSAMPLING_410 = 4, | ||
| 1969 | V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY = 5, | ||
| 1970 | }; | ||
| 1971 | #define V4L2_CID_JPEG_RESTART_INTERVAL (V4L2_CID_JPEG_CLASS_BASE + 2) | ||
| 1972 | #define V4L2_CID_JPEG_COMPRESSION_QUALITY (V4L2_CID_JPEG_CLASS_BASE + 3) | ||
| 1973 | |||
| 1974 | #define V4L2_CID_JPEG_ACTIVE_MARKER (V4L2_CID_JPEG_CLASS_BASE + 4) | ||
| 1975 | #define V4L2_JPEG_ACTIVE_MARKER_APP0 (1 << 0) | ||
| 1976 | #define V4L2_JPEG_ACTIVE_MARKER_APP1 (1 << 1) | ||
| 1977 | #define V4L2_JPEG_ACTIVE_MARKER_COM (1 << 16) | ||
| 1978 | #define V4L2_JPEG_ACTIVE_MARKER_DQT (1 << 17) | ||
| 1979 | #define V4L2_JPEG_ACTIVE_MARKER_DHT (1 << 18) | ||
| 1980 | |||
| 1981 | /* Image source controls */ | ||
| 1982 | #define V4L2_CID_IMAGE_SOURCE_CLASS_BASE (V4L2_CTRL_CLASS_IMAGE_SOURCE | 0x900) | ||
| 1983 | #define V4L2_CID_IMAGE_SOURCE_CLASS (V4L2_CTRL_CLASS_IMAGE_SOURCE | 1) | ||
| 1984 | |||
| 1985 | #define V4L2_CID_VBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 1) | ||
| 1986 | #define V4L2_CID_HBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 2) | ||
| 1987 | #define V4L2_CID_ANALOGUE_GAIN (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 3) | ||
| 1988 | |||
| 1989 | /* Image processing controls */ | ||
| 1990 | #define V4L2_CID_IMAGE_PROC_CLASS_BASE (V4L2_CTRL_CLASS_IMAGE_PROC | 0x900) | ||
| 1991 | #define V4L2_CID_IMAGE_PROC_CLASS (V4L2_CTRL_CLASS_IMAGE_PROC | 1) | ||
| 1992 | |||
| 1993 | #define V4L2_CID_LINK_FREQ (V4L2_CID_IMAGE_PROC_CLASS_BASE + 1) | ||
| 1994 | #define V4L2_CID_PIXEL_RATE (V4L2_CID_IMAGE_PROC_CLASS_BASE + 2) | ||
| 1995 | 1329 | ||
| 1996 | /* | 1330 | /* |
| 1997 | * T U N I N G | 1331 | * T U N I N G |
diff --git a/include/linux/vm_event_item.h b/include/linux/vm_event_item.h index 06f8e3858251..57f7b1091511 100644 --- a/include/linux/vm_event_item.h +++ b/include/linux/vm_event_item.h | |||
| @@ -30,6 +30,7 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | |||
| 30 | FOR_ALL_ZONES(PGSTEAL_DIRECT), | 30 | FOR_ALL_ZONES(PGSTEAL_DIRECT), |
| 31 | FOR_ALL_ZONES(PGSCAN_KSWAPD), | 31 | FOR_ALL_ZONES(PGSCAN_KSWAPD), |
| 32 | FOR_ALL_ZONES(PGSCAN_DIRECT), | 32 | FOR_ALL_ZONES(PGSCAN_DIRECT), |
| 33 | PGSCAN_DIRECT_THROTTLE, | ||
| 33 | #ifdef CONFIG_NUMA | 34 | #ifdef CONFIG_NUMA |
| 34 | PGSCAN_ZONE_RECLAIM_FAILED, | 35 | PGSCAN_ZONE_RECLAIM_FAILED, |
| 35 | #endif | 36 | #endif |
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 65efb92da996..ad2cfd53dadc 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
| @@ -179,11 +179,6 @@ extern void zone_statistics(struct zone *, struct zone *, gfp_t gfp); | |||
| 179 | #define add_zone_page_state(__z, __i, __d) mod_zone_page_state(__z, __i, __d) | 179 | #define add_zone_page_state(__z, __i, __d) mod_zone_page_state(__z, __i, __d) |
| 180 | #define sub_zone_page_state(__z, __i, __d) mod_zone_page_state(__z, __i, -(__d)) | 180 | #define sub_zone_page_state(__z, __i, __d) mod_zone_page_state(__z, __i, -(__d)) |
| 181 | 181 | ||
| 182 | static inline void zap_zone_vm_stats(struct zone *zone) | ||
| 183 | { | ||
| 184 | memset(zone->vm_stat, 0, sizeof(zone->vm_stat)); | ||
| 185 | } | ||
| 186 | |||
| 187 | extern void inc_zone_state(struct zone *, enum zone_stat_item); | 182 | extern void inc_zone_state(struct zone *, enum zone_stat_item); |
| 188 | 183 | ||
| 189 | #ifdef CONFIG_SMP | 184 | #ifdef CONFIG_SMP |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 6d0a0fcd80e7..50c3e8fa06a8 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
| @@ -104,7 +104,6 @@ static inline void wait_on_inode(struct inode *inode) | |||
| 104 | wait_on_bit(&inode->i_state, __I_NEW, inode_wait, TASK_UNINTERRUPTIBLE); | 104 | wait_on_bit(&inode->i_state, __I_NEW, inode_wait, TASK_UNINTERRUPTIBLE); |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | |||
| 108 | /* | 107 | /* |
| 109 | * mm/page-writeback.c | 108 | * mm/page-writeback.c |
| 110 | */ | 109 | */ |
| @@ -189,9 +188,4 @@ void tag_pages_for_writeback(struct address_space *mapping, | |||
| 189 | 188 | ||
| 190 | void account_page_redirty(struct page *page); | 189 | void account_page_redirty(struct page *page); |
| 191 | 190 | ||
| 192 | /* pdflush.c */ | ||
| 193 | extern int nr_pdflush_threads; /* Global so it can be exported to sysctl | ||
| 194 | read-only. */ | ||
| 195 | |||
| 196 | |||
| 197 | #endif /* WRITEBACK_H */ | 191 | #endif /* WRITEBACK_H */ |
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index 22e61fdf75a2..28e493b5b94c 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h | |||
| @@ -84,6 +84,8 @@ struct xfrm_replay_state { | |||
| 84 | __u32 bitmap; | 84 | __u32 bitmap; |
| 85 | }; | 85 | }; |
| 86 | 86 | ||
| 87 | #define XFRMA_REPLAY_ESN_MAX 4096 | ||
| 88 | |||
| 87 | struct xfrm_replay_state_esn { | 89 | struct xfrm_replay_state_esn { |
| 88 | unsigned int bmp_len; | 90 | unsigned int bmp_len; |
| 89 | __u32 oseq; | 91 | __u32 oseq; |
