summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorSteve French <cifs.adm@bkbits.net>2005-03-11 17:37:39 -0800
committerSteve French <cifs.adm@bkbits.net>2005-03-11 17:37:39 -0800
commitd64be658cf2e0e47432436c214ae493ae607f02d (patch)
tree646cae37189f63c0cc6cdb29562ca0d8d4c961ce /include/linux
parenteed7bb1bb8a8e4f5bb24292b98f8535925701b03 (diff)
parent2bd1c1e2685671d995303ec053094398852d86e6 (diff)
Merge bk://linux.bkbits.net/linux-2.5
into bkbits.net:/repos/c/cifs/linux-2.5cifs
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/audit.h12
-rw-r--r--include/linux/capability.h2
-rw-r--r--include/linux/efi.h1
-rw-r--r--include/linux/jbd.h5
-rw-r--r--include/linux/kernel.h12
-rw-r--r--include/linux/kfifo.h12
-rw-r--r--include/linux/module.h1
-rw-r--r--include/linux/netfilter.h38
-rw-r--r--include/linux/netfilter_arp/arp_tables.h2
-rw-r--r--include/linux/netfilter_ipv4/ip_tables.h2
-rw-r--r--include/linux/netfilter_ipv6/ip6_tables.h2
-rw-r--r--include/linux/pci_ids.h2
-rw-r--r--include/linux/pm.h10
-rw-r--r--include/linux/qnx4_fs.h2
-rw-r--r--include/linux/sched.h13
-rw-r--r--include/linux/skbuff.h2
-rw-r--r--include/linux/slab.h1
-rw-r--r--include/linux/timex.h2
-rw-r--r--include/linux/videodev2.h146
-rw-r--r--include/linux/wait.h60
20 files changed, 212 insertions, 115 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h
index c27b028ec3c8..40450a738b21 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -173,16 +173,10 @@ extern void audit_log_format(struct audit_buffer *ab,
const char *fmt, ...)
__attribute__((format(printf,2,3)));
extern void audit_log_end(struct audit_buffer *ab);
-extern void audit_log_end_fast(struct audit_buffer *ab);
-extern void audit_log_end_irq(struct audit_buffer *ab);
extern void audit_log_d_path(struct audit_buffer *ab,
const char *prefix,
struct dentry *dentry,
struct vfsmount *vfsmnt);
-extern int audit_set_rate_limit(int limit);
-extern int audit_set_backlog_limit(int limit);
-extern int audit_set_enabled(int state);
-extern int audit_set_failure(int state);
/* Private API (for auditsc.c only) */
extern void audit_send_reply(int pid, int seq, int type,
@@ -195,13 +189,7 @@ extern void audit_log_lost(const char *message);
#define audit_log_vformat(b,f,a) do { ; } while (0)
#define audit_log_format(b,f,...) do { ; } while (0)
#define audit_log_end(b) do { ; } while (0)
-#define audit_log_end_fast(b) do { ; } while (0)
-#define audit_log_end_irq(b) do { ; } while (0)
#define audit_log_d_path(b,p,d,v) do { ; } while (0)
-#define audit_set_rate_limit(l) do { ; } while (0)
-#define audit_set_backlog_limit(l) do { ; } while (0)
-#define audit_set_enabled(s) do { ; } while (0)
-#define audit_set_failure(s) do { ; } while (0)
#endif
#endif
#endif
diff --git a/include/linux/capability.h b/include/linux/capability.h
index 5df11c20ed26..8d139f4acf23 100644
--- a/include/linux/capability.h
+++ b/include/linux/capability.h
@@ -44,8 +44,6 @@ typedef struct __user_cap_data_struct {
#include <linux/spinlock.h>
-extern spinlock_t task_capability_lock;
-
/* #define STRICT_CAP_T_TYPECHECKS */
#ifdef STRICT_CAP_T_TYPECHECKS
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 0f461df7686c..047e7222df7a 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -301,7 +301,6 @@ extern u64 efi_mem_attributes (unsigned long phys_addr);
extern int __init efi_uart_console_only (void);
extern void efi_initialize_iomem_resources(struct resource *code_resource,
struct resource *data_resource);
-extern efi_status_t phys_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc);
extern unsigned long __init efi_get_time(void);
extern int __init efi_set_rtc_mmss(unsigned long nowtime);
extern struct efi_memory_map memmap;
diff --git a/include/linux/jbd.h b/include/linux/jbd.h
index e28f8b23558f..72ff3e201b82 100644
--- a/include/linux/jbd.h
+++ b/include/linux/jbd.h
@@ -562,6 +562,7 @@ struct transaction_s
* @j_sb_buffer: First part of superblock buffer
* @j_superblock: Second part of superblock buffer
* @j_format_version: Version of the superblock format
+ * @j_state_lock: Protect the various scalars in the journal
* @j_barrier_count: Number of processes waiting to create a barrier lock
* @j_barrier: The barrier lock itself
* @j_running_transaction: The current running transaction..
@@ -589,6 +590,7 @@ struct transaction_s
* @j_fs_dev: Device which holds the client fs. For internal journal this will
* be equal to j_dev
* @j_maxlen: Total maximum capacity of the journal region on disk.
+ * @j_list_lock: Protects the buffer lists and internal buffer state.
* @j_inode: Optional inode where we store the journal. If present, all journal
* block numbers are mapped into this inode via bmap().
* @j_tail_sequence: Sequence number of the oldest transaction in the log
@@ -604,8 +606,11 @@ struct transaction_s
* @j_commit_interval: What is the maximum transaction lifetime before we begin
* a commit?
* @j_commit_timer: The timer used to wakeup the commit thread
+ * @j_revoke_lock: Protect the revoke table
* @j_revoke: The revoke table - maintains the list of revoked blocks in the
* current transaction.
+ * @j_revoke_table: alternate revoke tables for j_revoke
+ * @j_private: An opaque pointer to fs-private information.
*/
struct journal_s
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index de56b8b26cd5..7bde43a23799 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -48,10 +48,20 @@ extern int console_printk[];
struct completion;
+/**
+ * might_sleep - annotation for functions that can sleep
+ *
+ * this macro will print a stack trace if it is executed in an atomic
+ * context (spinlock, irq-handler, ...).
+ *
+ * This is a useful debugging help to be able to catch problems early and not
+ * be biten later when the calling function happens to sleep when it is not
+ * supposed to.
+ */
#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
-void __might_sleep(char *file, int line);
#define might_sleep() __might_sleep(__FILE__, __LINE__)
#define might_sleep_if(cond) do { if (unlikely(cond)) might_sleep(); } while (0)
+void __might_sleep(char *file, int line);
#else
#define might_sleep() do {} while(0)
#define might_sleep_if(cond) do {} while (0)
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h
index 0e6e972a9f70..552d5a58dadd 100644
--- a/include/linux/kfifo.h
+++ b/include/linux/kfifo.h
@@ -44,7 +44,7 @@ extern unsigned int __kfifo_put(struct kfifo *fifo,
extern unsigned int __kfifo_get(struct kfifo *fifo,
unsigned char *buffer, unsigned int len);
-/*
+/**
* __kfifo_reset - removes the entire FIFO contents, no locking version
* @fifo: the fifo to be emptied.
*/
@@ -53,7 +53,7 @@ static inline void __kfifo_reset(struct kfifo *fifo)
fifo->in = fifo->out = 0;
}
-/*
+/**
* kfifo_reset - removes the entire FIFO contents
* @fifo: the fifo to be emptied.
*/
@@ -68,7 +68,7 @@ static inline void kfifo_reset(struct kfifo *fifo)
spin_unlock_irqrestore(fifo->lock, flags);
}
-/*
+/**
* kfifo_put - puts some data into the FIFO
* @fifo: the fifo to be used.
* @buffer: the data to be added.
@@ -93,7 +93,7 @@ static inline unsigned int kfifo_put(struct kfifo *fifo,
return ret;
}
-/*
+/**
* kfifo_get - gets some data from the FIFO
* @fifo: the fifo to be used.
* @buffer: where the data must be copied.
@@ -124,7 +124,7 @@ static inline unsigned int kfifo_get(struct kfifo *fifo,
return ret;
}
-/*
+/**
* __kfifo_len - returns the number of bytes available in the FIFO, no locking version
* @fifo: the fifo to be used.
*/
@@ -133,7 +133,7 @@ static inline unsigned int __kfifo_len(struct kfifo *fifo)
return fifo->in - fifo->out;
}
-/*
+/**
* kfifo_len - returns the number of bytes available in the FIFO
* @fifo: the fifo to be used.
*/
diff --git a/include/linux/module.h b/include/linux/module.h
index 7c66600fc66b..c9a6fbd31221 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -572,7 +572,6 @@ struct obsolete_modparm __parm_##var __attribute__((section("__obsparm"))) = \
extern void __deprecated inter_module_register(const char *,
struct module *, const void *);
extern void __deprecated inter_module_unregister(const char *);
-extern const void * __deprecated inter_module_get(const char *);
extern const void * __deprecated inter_module_get_request(const char *,
const char *);
extern void __deprecated inter_module_put(const char *);
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index 0c267c89fa3e..2e2045482cb1 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -18,7 +18,8 @@
#define NF_STOLEN 2
#define NF_QUEUE 3
#define NF_REPEAT 4
-#define NF_MAX_VERDICT NF_REPEAT
+#define NF_STOP 5
+#define NF_MAX_VERDICT NF_STOP
/* Generic cache responses from hook functions.
<= 0x2000 is used for protocol-flags. */
@@ -138,21 +139,32 @@ void nf_log_packet(int pf,
/* This is gross, but inline doesn't cut it for avoiding the function
call in fast path: gcc doesn't inline (needs value tracking?). --RR */
#ifdef CONFIG_NETFILTER_DEBUG
-#define NF_HOOK(pf, hook, skb, indev, outdev, okfn) \
- nf_hook_slow((pf), (hook), (skb), (indev), (outdev), (okfn), INT_MIN)
-#define NF_HOOK_THRESH nf_hook_slow
+#define NF_HOOK(pf, hook, skb, indev, outdev, okfn) \
+({int __ret; \
+if ((__ret=nf_hook_slow(pf, hook, &(skb), indev, outdev, okfn, INT_MIN)) == 1) \
+ __ret = (okfn)(skb); \
+__ret;})
+#define NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, thresh) \
+({int __ret; \
+if ((__ret=nf_hook_slow(pf, hook, &(skb), indev, outdev, okfn, thresh)) == 1) \
+ __ret = (okfn)(skb); \
+__ret;})
#else
-#define NF_HOOK(pf, hook, skb, indev, outdev, okfn) \
-(list_empty(&nf_hooks[(pf)][(hook)]) \
- ? (okfn)(skb) \
- : nf_hook_slow((pf), (hook), (skb), (indev), (outdev), (okfn), INT_MIN))
-#define NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, thresh) \
-(list_empty(&nf_hooks[(pf)][(hook)]) \
- ? (okfn)(skb) \
- : nf_hook_slow((pf), (hook), (skb), (indev), (outdev), (okfn), (thresh)))
+#define NF_HOOK(pf, hook, skb, indev, outdev, okfn) \
+({int __ret; \
+if (list_empty(&nf_hooks[pf][hook]) || \
+ (__ret=nf_hook_slow(pf, hook, &(skb), indev, outdev, okfn, INT_MIN)) == 1) \
+ __ret = (okfn)(skb); \
+__ret;})
+#define NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, thresh) \
+({int __ret; \
+if (list_empty(&nf_hooks[pf][hook]) || \
+ (__ret=nf_hook_slow(pf, hook, &(skb), indev, outdev, okfn, thresh)) == 1) \
+ __ret = (okfn)(skb); \
+__ret;})
#endif
-int nf_hook_slow(int pf, unsigned int hook, struct sk_buff *skb,
+int nf_hook_slow(int pf, unsigned int hook, struct sk_buff **pskb,
struct net_device *indev, struct net_device *outdev,
int (*okfn)(struct sk_buff *), int thresh);
diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h
index b16b4799e27e..d759a637bded 100644
--- a/include/linux/netfilter_arp/arp_tables.h
+++ b/include/linux/netfilter_arp/arp_tables.h
@@ -154,7 +154,7 @@ struct arpt_entry
#define ARPT_CONTINUE 0xFFFFFFFF
/* For standard target */
-#define ARPT_RETURN (-NF_MAX_VERDICT - 1)
+#define ARPT_RETURN (-NF_REPEAT - 1)
/* The argument to ARPT_SO_GET_INFO */
struct arpt_getinfo
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
index 91f3594d3bfd..12ce47808e7d 100644
--- a/include/linux/netfilter_ipv4/ip_tables.h
+++ b/include/linux/netfilter_ipv4/ip_tables.h
@@ -166,7 +166,7 @@ struct ipt_entry
#define IPT_CONTINUE 0xFFFFFFFF
/* For standard target */
-#define IPT_RETURN (-NF_MAX_VERDICT - 1)
+#define IPT_RETURN (-NF_REPEAT - 1)
/* TCP matching stuff */
struct ipt_tcp
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h
index 8fa1bf0104ee..f1ce3b009853 100644
--- a/include/linux/netfilter_ipv6/ip6_tables.h
+++ b/include/linux/netfilter_ipv6/ip6_tables.h
@@ -166,7 +166,7 @@ struct ip6t_entry
#define IP6T_CONTINUE 0xFFFFFFFF
/* For standard target */
-#define IP6T_RETURN (-NF_MAX_VERDICT - 1)
+#define IP6T_RETURN (-NF_REPEAT - 1)
/* TCP matching stuff */
struct ip6t_tcp
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 1274cdac9cbb..c6c1e5f0ed97 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -711,6 +711,7 @@
#define PCI_DEVICE_ID_HP_DIVA_AUX 0x1290
#define PCI_DEVICE_ID_HP_CISSA 0x3220
#define PCI_DEVICE_ID_HP_CISSB 0x3230
+#define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031
#define PCI_VENDOR_ID_PCTECH 0x1042
#define PCI_DEVICE_ID_PCTECH_RZ1000 0x1000
@@ -768,6 +769,7 @@
#define PCI_DEVICE_ID_TI_1251B 0xac1f
#define PCI_DEVICE_ID_TI_4410 0xac41
#define PCI_DEVICE_ID_TI_4451 0xac42
+#define PCI_DEVICE_ID_TI_4510 0xac44
#define PCI_DEVICE_ID_TI_4520 0xac46
#define PCI_DEVICE_ID_TI_1410 0xac50
#define PCI_DEVICE_ID_TI_1420 0xac51
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 1d106a3edad5..ed2b76e75199 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -116,11 +116,6 @@ void __deprecated pm_unregister(struct pm_dev *dev);
void __deprecated pm_unregister_all(pm_callback callback);
/*
- * Send a request to a single device
- */
-int __deprecated pm_send(struct pm_dev *dev, pm_request_t rqst, void *data);
-
-/*
* Send a request to all devices
*/
int __deprecated pm_send_all(pm_request_t rqst, void *data);
@@ -140,11 +135,6 @@ static inline void pm_unregister(struct pm_dev *dev) {}
static inline void pm_unregister_all(pm_callback callback) {}
-static inline int pm_send(struct pm_dev *dev, pm_request_t rqst, void *data)
-{
- return 0;
-}
-
static inline int pm_send_all(pm_request_t rqst, void *data)
{
return 0;
diff --git a/include/linux/qnx4_fs.h b/include/linux/qnx4_fs.h
index 53233c8fb3ef..22ba580b0ae8 100644
--- a/include/linux/qnx4_fs.h
+++ b/include/linux/qnx4_fs.h
@@ -114,7 +114,6 @@ extern struct dentry *qnx4_lookup(struct inode *dir, struct dentry *dentry, stru
extern unsigned long qnx4_count_free_blocks(struct super_block *sb);
extern unsigned long qnx4_block_map(struct inode *inode, long iblock);
-extern struct buffer_head *qnx4_getblk(struct inode *, int, int);
extern struct buffer_head *qnx4_bread(struct inode *, int, int);
extern struct inode_operations qnx4_file_inode_operations;
@@ -130,7 +129,6 @@ extern int qnx4_unlink(struct inode *dir, struct dentry *dentry);
extern int qnx4_rmdir(struct inode *dir, struct dentry *dentry);
extern int qnx4_sync_file(struct file *file, struct dentry *dentry, int);
extern int qnx4_sync_inode(struct inode *inode);
-extern int qnx4_get_block(struct inode *inode, sector_t iblock, struct buffer_head *bh, int create);
static inline struct qnx4_sb_info *qnx4_sb(struct super_block *sb)
{
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 637c88e5f5b8..09a07f1873d0 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -489,17 +489,26 @@ struct sched_domain {
/* load_balance() stats */
unsigned long lb_cnt[MAX_IDLE_TYPES];
unsigned long lb_failed[MAX_IDLE_TYPES];
+ unsigned long lb_balanced[MAX_IDLE_TYPES];
unsigned long lb_imbalance[MAX_IDLE_TYPES];
+ unsigned long lb_gained[MAX_IDLE_TYPES];
+ unsigned long lb_hot_gained[MAX_IDLE_TYPES];
unsigned long lb_nobusyg[MAX_IDLE_TYPES];
unsigned long lb_nobusyq[MAX_IDLE_TYPES];
+ /* Active load balancing */
+ unsigned long alb_cnt;
+ unsigned long alb_failed;
+ unsigned long alb_pushed;
+
/* sched_balance_exec() stats */
unsigned long sbe_attempts;
unsigned long sbe_pushed;
/* try_to_wake_up() stats */
- unsigned long ttwu_wake_affine;
- unsigned long ttwu_wake_balance;
+ unsigned long ttwu_wake_remote;
+ unsigned long ttwu_move_affine;
+ unsigned long ttwu_move_balance;
#endif
};
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 37df2c87c27e..aa35797ebfbf 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -202,6 +202,8 @@ struct skb_shared_info {
* @nf_bridge: Saved data about a bridged frame - see br_netfilter.c
* @private: Data which is private to the HIPPI implementation
* @tc_index: Traffic control index
+ * @tc_verd: traffic control verdict
+ * @tc_classid: traffic control classid
*/
struct sk_buff {
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 0c7ae4f678a2..15d4afdd9ea0 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -114,7 +114,6 @@ extern int FASTCALL(kmem_ptr_validate(kmem_cache_t *cachep, void *ptr));
/* System wide caches */
extern kmem_cache_t *vm_area_cachep;
-extern kmem_cache_t *mm_cachep;
extern kmem_cache_t *names_cachep;
extern kmem_cache_t *files_cachep;
extern kmem_cache_t *filp_cachep;
diff --git a/include/linux/timex.h b/include/linux/timex.h
index b54c288dd6b8..74fdd07d3792 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -240,9 +240,7 @@ extern long time_precision; /* clock precision (us) */
extern long time_maxerror; /* maximum error */
extern long time_esterror; /* estimated error */
-extern long time_phase; /* phase offset (scaled us) */
extern long time_freq; /* frequency offset (scaled ppm) */
-extern long time_adj; /* tick adjust (scaled 1 / HZ) */
extern long time_reftime; /* time at last adjustment (s) */
extern long time_adjust; /* The amount of adjtime left */
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 68a5ce4fcb4b..4e0edce53760 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -268,64 +268,92 @@ struct v4l2_timecode
/* The above is based on SMPTE timecodes */
+#if 1
/*
- * C O M P R E S S I O N P A R A M E T E R S
+ * M P E G C O M P R E S S I O N P A R A M E T E R S
+ *
+ * ### WARNING: this is still work-in-progress right now, most likely
+ * ### there will be some incompatible changes.
+ *
*/
-#if 0
-/* ### generic compression settings don't work, there is too much
- * ### codec-specific stuff. Maybe reuse that for MPEG codec settings
- * ### later ... */
-struct v4l2_compression
-{
- __u32 quality;
- __u32 keyframerate;
- __u32 pframerate;
- __u32 reserved[5];
-
-/* what we'll need for MPEG, extracted from some postings on
- the v4l list (Gert Vervoort, PlasmaJohn).
-
-system stream:
- - type: elementary stream(ES), packatised elementary stream(s) (PES)
- program stream(PS), transport stream(TS)
- - system bitrate
- - PS packet size (DVD: 2048 bytes, VCD: 2324 bytes)
- - TS video PID
- - TS audio PID
- - TS PCR PID
- - TS system information tables (PAT, PMT, CAT, NIT and SIT)
- - (MPEG-1 systems stream vs. MPEG-2 program stream (TS not supported
- by MPEG-1 systems)
-
-audio:
- - type: MPEG (+Layer I,II,III), AC-3, LPCM
- - bitrate
- - sampling frequency (DVD: 48 Khz, VCD: 44.1 KHz, 32 kHz)
- - Trick Modes? (ff, rew)
- - Copyright
- - Inverse Telecine
-
-video:
- - picturesize (SIF, 1/2 D1, 2/3 D1, D1) and PAL/NTSC norm can be set
- through excisting V4L2 controls
- - noise reduction, parameters encoder specific?
- - MPEG video version: MPEG-1, MPEG-2
- - GOP (Group Of Pictures) definition:
- - N: number of frames per GOP
- - M: distance between reference (I,P) frames
- - open/closed GOP
- - quantiser matrix: inter Q matrix (64 bytes) and intra Q matrix (64 bytes)
- - quantiser scale: linear or logarithmic
- - scanning: alternate or zigzag
- - bitrate mode: CBR (constant bitrate) or VBR (variable bitrate).
- - target video bitrate for CBR
- - target video bitrate for VBR
- - maximum video bitrate for VBR - min. quantiser value for VBR
- - max. quantiser value for VBR
- - adaptive quantisation value
- - return the number of bytes per GOP or bitrate for bitrate monitoring
-
-*/
+
+
+enum v4l2_bitrate_mode {
+ V4L2_BITRATE_NONE = 0, /* not specified */
+ V4L2_BITRATE_CBR, /* constant bitrate */
+ V4L2_BITRATE_VBR, /* variable bitrate */
+};
+struct v4l2_bitrate {
+ /* rates are specified in kbit/sec */
+ enum v4l2_bitrate_mode mode;
+ __u32 min;
+ __u32 target; /* use this one for CBR */
+ __u32 max;
+};
+
+enum v4l2_mpeg_streamtype {
+ V4L2_MPEG_SS_1, /* MPEG-1 system stream */
+ V4L2_MPEG_PS_2, /* MPEG-2 program stream */
+ V4L2_MPEG_TS_2, /* MPEG-2 transport stream */
+ V4L2_MPEG_PS_DVD, /* MPEG-2 program stream with DVD header fixups */
+};
+enum v4l2_mpeg_audiotype {
+ V4L2_MPEG_AU_2_I, /* MPEG-2 layer 1 */
+ V4L2_MPEG_AU_2_II, /* MPEG-2 layer 2 */
+ V4L2_MPEG_AU_2_III, /* MPEG-2 layer 3 */
+ V4L2_MPEG_AC3, /* AC3 */
+ V4L2_MPEG_LPCM, /* LPCM */
+};
+enum v4l2_mpeg_videotype {
+ V4L2_MPEG_VI_1, /* MPEG-1 */
+ V4L2_MPEG_VI_2, /* MPEG-2 */
+};
+enum v4l2_mpeg_aspectratio {
+ V4L2_MPEG_ASPECT_SQUARE = 1, /* square pixel */
+ V4L2_MPEG_ASPECT_4_3 = 2, /* 4 : 3 */
+ V4L2_MPEG_ASPECT_16_9 = 3, /* 16 : 9 */
+ V4L2_MPEG_ASPECT_1_221 = 4, /* 1 : 2,21 */
+};
+
+struct v4l2_mpeg_compression {
+ /* general */
+ enum v4l2_mpeg_streamtype st_type;
+ struct v4l2_bitrate st_bitrate;
+
+ /* transport streams */
+ __u16 ts_pid_pmt;
+ __u16 ts_pid_audio;
+ __u16 ts_pid_video;
+ __u16 ts_pid_pcr;
+
+ /* program stream */
+ __u16 ps_size;
+ __u16 reserved_1; /* align */
+
+ /* audio */
+ enum v4l2_mpeg_audiotype au_type;
+ struct v4l2_bitrate au_bitrate;
+ __u32 au_sample_rate;
+ __u8 au_pesid;
+ __u8 reserved_2[3]; /* align */
+
+ /* video */
+ enum v4l2_mpeg_videotype vi_type;
+ enum v4l2_mpeg_aspectratio vi_aspect_ratio;
+ struct v4l2_bitrate vi_bitrate;
+ __u32 vi_frame_rate;
+ __u16 vi_frames_per_gop;
+ __u16 vi_bframes_count;
+ __u8 vi_pesid;
+ __u8 reserved_3[3]; /* align */
+
+ /* misc flags */
+ __u32 closed_gops:1;
+ __u32 pulldown:1;
+ __u32 reserved_4:30; /* align */
+
+ /* I don't expect the above being perfect yet ;) */
+ __u32 reserved_5[8];
};
#endif
@@ -841,9 +869,9 @@ struct v4l2_streamparm
#define VIDIOC_ENUM_FMT _IOWR ('V', 2, struct v4l2_fmtdesc)
#define VIDIOC_G_FMT _IOWR ('V', 4, struct v4l2_format)
#define VIDIOC_S_FMT _IOWR ('V', 5, struct v4l2_format)
-#if 0
-#define VIDIOC_G_COMP _IOR ('V', 6, struct v4l2_compression)
-#define VIDIOC_S_COMP _IOW ('V', 7, struct v4l2_compression)
+#if 1 /* experimental */
+#define VIDIOC_G_MPEGCOMP _IOR ('V', 6, struct v4l2_mpeg_compression)
+#define VIDIOC_S_MPEGCOMP _IOW ('V', 7, struct v4l2_mpeg_compression)
#endif
#define VIDIOC_REQBUFS _IOWR ('V', 8, struct v4l2_requestbuffers)
#define VIDIOC_QUERYBUF _IOWR ('V', 9, struct v4l2_buffer)
diff --git a/include/linux/wait.h b/include/linux/wait.h
index ddb0a16f31c9..8401e623d791 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -169,6 +169,18 @@ do { \
finish_wait(&wq, &__wait); \
} while (0)
+/**
+ * wait_event - sleep until a condition gets true
+ * @wq: the waitqueue to wait on
+ * @condition: a C expression for the event to wait for
+ *
+ * The process is put to sleep (TASK_UNINTERRUPTIBLE) until the
+ * @condition evaluates to true. The @condition is checked each time
+ * the waitqueue @wq is woken up.
+ *
+ * wake_up() has to be called after changing any variable that could
+ * change the result of the wait condition.
+ */
#define wait_event(wq, condition) \
do { \
if (condition) \
@@ -191,6 +203,22 @@ do { \
finish_wait(&wq, &__wait); \
} while (0)
+/**
+ * wait_event_timeout - sleep until a condition gets true or a timeout elapses
+ * @wq: the waitqueue to wait on
+ * @condition: a C expression for the event to wait for
+ * @timeout: timeout, in jiffies
+ *
+ * The process is put to sleep (TASK_UNINTERRUPTIBLE) until the
+ * @condition evaluates to true. The @condition is checked each time
+ * the waitqueue @wq is woken up.
+ *
+ * wake_up() has to be called after changing any variable that could
+ * change the result of the wait condition.
+ *
+ * The function returns 0 if the @timeout elapsed, and the remaining
+ * jiffies if the condition evaluated to true before the timeout elapsed.
+ */
#define wait_event_timeout(wq, condition, timeout) \
({ \
long __ret = timeout; \
@@ -217,6 +245,21 @@ do { \
finish_wait(&wq, &__wait); \
} while (0)
+/**
+ * wait_event_interruptible - sleep until a condition gets true
+ * @wq: the waitqueue to wait on
+ * @condition: a C expression for the event to wait for
+ *
+ * The process is put to sleep (TASK_INTERRUPTIBLE) until the
+ * @condition evaluates to true or a signal is received.
+ * The @condition is checked each time the waitqueue @wq is woken up.
+ *
+ * wake_up() has to be called after changing any variable that could
+ * change the result of the wait condition.
+ *
+ * The function will return -ERESTARTSYS if it was interrupted by a
+ * signal and 0 if @condition evaluated to true.
+ */
#define wait_event_interruptible(wq, condition) \
({ \
int __ret = 0; \
@@ -245,6 +288,23 @@ do { \
finish_wait(&wq, &__wait); \
} while (0)
+/**
+ * wait_event_interruptible_timeout - sleep until a condition gets true or a timeout elapses
+ * @wq: the waitqueue to wait on
+ * @condition: a C expression for the event to wait for
+ * @timeout: timeout, in jiffies
+ *
+ * The process is put to sleep (TASK_INTERRUPTIBLE) until the
+ * @condition evaluates to true or a signal is received.
+ * The @condition is checked each time the waitqueue @wq is woken up.
+ *
+ * wake_up() has to be called after changing any variable that could
+ * change the result of the wait condition.
+ *
+ * The function returns 0 if the @timeout elapsed, -ERESTARTSYS if it
+ * was interrupted by a signal, and the remaining jiffies otherwise
+ * if the condition evaluated to true before the timeout elapsed.
+ */
#define wait_event_interruptible_timeout(wq, condition, timeout) \
({ \
long __ret = timeout; \