aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/bitops.h2
-rw-r--r--include/linux/configfs.h2
-rw-r--r--include/linux/dcache.h2
-rw-r--r--include/linux/elfcore.h1
-rw-r--r--include/linux/i2o.h6
-rw-r--r--include/linux/ide.h2
-rw-r--r--include/linux/kbd_kern.h5
-rw-r--r--include/linux/list.h14
-rw-r--r--include/linux/lockd/lockd.h2
-rw-r--r--include/linux/mmc/mmc.h35
-rw-r--r--include/linux/mmc/protocol.h2
-rw-r--r--include/linux/parport.h6
-rw-r--r--include/linux/quotaops.h1
-rw-r--r--include/linux/rcupdate.h5
-rw-r--r--include/linux/sunrpc/auth.h10
-rw-r--r--include/linux/suspend.h4
-rw-r--r--include/linux/tty.h2
-rw-r--r--include/linux/tty_flip.h7
-rw-r--r--include/linux/ufs_fs.h14
-rw-r--r--include/linux/ufs_fs_sb.h2
20 files changed, 81 insertions, 43 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index 6a2a19f14bb..208650b1ad3 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -81,7 +81,7 @@ static inline int generic_fls64(__u64 x)
{
__u32 h = x >> 32;
if (h)
- return fls(x) + 32;
+ return fls(h) + 32;
return fls(x);
}
diff --git a/include/linux/configfs.h b/include/linux/configfs.h
index acffb8c9073..a7f01502753 100644
--- a/include/linux/configfs.h
+++ b/include/linux/configfs.h
@@ -126,7 +126,7 @@ extern struct config_item *config_group_find_obj(struct config_group *, const ch
struct configfs_attribute {
- char *ca_name;
+ const char *ca_name;
struct module *ca_owner;
mode_t ca_mode;
};
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index a3ed5e059d4..a3f09947940 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -108,7 +108,9 @@ struct dentry {
struct dentry_operations *d_op;
struct super_block *d_sb; /* The root of the dentry tree */
void *d_fsdata; /* fs-specific data */
+#ifdef CONFIG_PROFILING
struct dcookie_struct *d_cookie; /* cookie, if any */
+#endif
int d_mounted;
unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */
};
diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h
index dbd7bb4a33b..0cf0bea010f 100644
--- a/include/linux/elfcore.h
+++ b/include/linux/elfcore.h
@@ -5,6 +5,7 @@
#include <linux/signal.h>
#include <linux/time.h>
#include <linux/user.h>
+#include <linux/ptrace.h>
struct elf_siginfo
{
diff --git a/include/linux/i2o.h b/include/linux/i2o.h
index 9ba80679666..5a9d8c59917 100644
--- a/include/linux/i2o.h
+++ b/include/linux/i2o.h
@@ -1115,9 +1115,11 @@ static inline struct i2o_message *i2o_msg_get(struct i2o_controller *c)
return ERR_PTR(-ENOMEM);
mmsg->mfa = readl(c->in_port);
- if (mmsg->mfa == I2O_QUEUE_EMPTY) {
+ if (unlikely(mmsg->mfa >= c->in_queue.len)) {
mempool_free(mmsg, c->in_msg.mempool);
- return ERR_PTR(-EBUSY);
+ if(mmsg->mfa == I2O_QUEUE_EMPTY)
+ return ERR_PTR(-EBUSY);
+ return ERR_PTR(-EFAULT);
}
return &mmsg->msg;
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 110b3cfac02..a7fc4cc79b2 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -582,7 +582,6 @@ typedef struct ide_drive_s {
unsigned noprobe : 1; /* from: hdx=noprobe */
unsigned removable : 1; /* 1 if need to do check_media_change */
unsigned attach : 1; /* needed for removable devices */
- unsigned is_flash : 1; /* 1 if probed as flash */
unsigned forced_geom : 1; /* 1 if hdx=c,h,s was given at boot */
unsigned no_unmask : 1; /* disallow setting unmask bit */
unsigned no_io_32bit : 1; /* disallow enabling 32bit I/O */
@@ -1006,7 +1005,6 @@ extern ide_hwif_t ide_hwifs[]; /* master data repository */
extern int noautodma;
extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs);
-extern int __ide_end_request (ide_drive_t *drive, struct request *rq, int uptodate, int nrsecs);
/*
* This is used on exit from the driver to designate the next irq handler
diff --git a/include/linux/kbd_kern.h b/include/linux/kbd_kern.h
index 45f625d7d0b..3aed37314ab 100644
--- a/include/linux/kbd_kern.h
+++ b/include/linux/kbd_kern.h
@@ -151,6 +151,11 @@ extern unsigned int keymap_count;
static inline void con_schedule_flip(struct tty_struct *t)
{
+ unsigned long flags;
+ spin_lock_irqsave(&t->buf.lock, flags);
+ if (t->buf.tail != NULL)
+ t->buf.tail->active = 0;
+ spin_unlock_irqrestore(&t->buf.lock, flags);
schedule_work(&t->buf.work);
}
diff --git a/include/linux/list.h b/include/linux/list.h
index 945daa1f13d..47208bd99f9 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -34,9 +34,11 @@ struct list_head {
#define LIST_HEAD(name) \
struct list_head name = LIST_HEAD_INIT(name)
-#define INIT_LIST_HEAD(ptr) do { \
- (ptr)->next = (ptr); (ptr)->prev = (ptr); \
-} while (0)
+static inline void INIT_LIST_HEAD(struct list_head *list)
+{
+ list->next = list;
+ list->prev = list;
+}
/*
* Insert a new entry between two known consecutive entries.
@@ -534,7 +536,11 @@ struct hlist_node {
#define HLIST_HEAD_INIT { .first = NULL }
#define HLIST_HEAD(name) struct hlist_head name = { .first = NULL }
#define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL)
-#define INIT_HLIST_NODE(ptr) ((ptr)->next = NULL, (ptr)->pprev = NULL)
+static inline void INIT_HLIST_NODE(struct hlist_node *h)
+{
+ h->next = NULL;
+ h->pprev = NULL;
+}
static inline int hlist_unhashed(const struct hlist_node *h)
{
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index 95c8fea293b..920766cea79 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -84,6 +84,7 @@ struct nlm_rqst {
struct nlm_args a_args; /* arguments */
struct nlm_res a_res; /* result */
struct nlm_wait * a_block;
+ unsigned int a_retries; /* Retry count */
char a_owner[NLMCLNT_OHSIZE];
};
@@ -148,7 +149,6 @@ struct nlm_rqst * nlmclnt_alloc_call(void);
int nlmclnt_prepare_block(struct nlm_rqst *req, struct nlm_host *host, struct file_lock *fl);
void nlmclnt_finish_block(struct nlm_rqst *req);
long nlmclnt_block(struct nlm_rqst *req, long timeout);
-int nlmclnt_cancel(struct nlm_host *, struct file_lock *);
u32 nlmclnt_grant(struct nlm_lock *);
void nlmclnt_recovery(struct nlm_host *, u32);
int nlmclnt_reclaim(struct nlm_host *, struct file_lock *);
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
index ccd3e13de1e..f38872abc12 100644
--- a/include/linux/mmc/mmc.h
+++ b/include/linux/mmc/mmc.h
@@ -21,24 +21,35 @@ struct mmc_command {
u32 arg;
u32 resp[4];
unsigned int flags; /* expected response type */
-#define MMC_RSP_NONE (0 << 0)
-#define MMC_RSP_SHORT (1 << 0)
-#define MMC_RSP_LONG (2 << 0)
-#define MMC_RSP_MASK (3 << 0)
-#define MMC_RSP_CRC (1 << 3) /* expect valid crc */
-#define MMC_RSP_BUSY (1 << 4) /* card may send busy */
-#define MMC_RSP_OPCODE (1 << 5) /* response contains opcode */
+#define MMC_RSP_PRESENT (1 << 0)
+#define MMC_RSP_136 (1 << 1) /* 136 bit response */
+#define MMC_RSP_CRC (1 << 2) /* expect valid crc */
+#define MMC_RSP_BUSY (1 << 3) /* card may send busy */
+#define MMC_RSP_OPCODE (1 << 4) /* response contains opcode */
+#define MMC_CMD_MASK (3 << 5) /* command type */
+#define MMC_CMD_AC (0 << 5)
+#define MMC_CMD_ADTC (1 << 5)
+#define MMC_CMD_BC (2 << 5)
+#define MMC_CMD_BCR (3 << 5)
/*
* These are the response types, and correspond to valid bit
* patterns of the above flags. One additional valid pattern
* is all zeros, which means we don't expect a response.
*/
-#define MMC_RSP_R1 (MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_OPCODE)
-#define MMC_RSP_R1B (MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY)
-#define MMC_RSP_R2 (MMC_RSP_LONG|MMC_RSP_CRC)
-#define MMC_RSP_R3 (MMC_RSP_SHORT)
-#define MMC_RSP_R6 (MMC_RSP_SHORT|MMC_RSP_CRC)
+#define MMC_RSP_NONE (0)
+#define MMC_RSP_R1 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
+#define MMC_RSP_R1B (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY)
+#define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC)
+#define MMC_RSP_R3 (MMC_RSP_PRESENT)
+#define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC)
+
+#define mmc_resp_type(cmd) ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE))
+
+/*
+ * These are the command types.
+ */
+#define mmc_cmd_type(cmd) ((cmd)->flags & MMC_CMD_TYPE)
unsigned int retries; /* max number of retries */
unsigned int error; /* command error */
diff --git a/include/linux/mmc/protocol.h b/include/linux/mmc/protocol.h
index a14dc306545..81c3f77f652 100644
--- a/include/linux/mmc/protocol.h
+++ b/include/linux/mmc/protocol.h
@@ -79,7 +79,7 @@
/* SD commands type argument response */
/* class 8 */
/* This is basically the same command as for MMC with some quirks. */
-#define SD_SEND_RELATIVE_ADDR 3 /* ac R6 */
+#define SD_SEND_RELATIVE_ADDR 3 /* bcr R6 */
/* Application commands */
#define SD_APP_SET_BUS_WIDTH 6 /* ac [1:0] bus width R1 */
diff --git a/include/linux/parport.h b/include/linux/parport.h
index f67f838a3a1..008d736a6c9 100644
--- a/include/linux/parport.h
+++ b/include/linux/parport.h
@@ -128,6 +128,11 @@ struct amiga_parport_state {
unsigned char statusdir;/* ciab.ddrb & 7 */
};
+struct ip32_parport_state {
+ unsigned int dcr;
+ unsigned int ecr;
+};
+
struct parport_state {
union {
struct pc_parport_state pc;
@@ -135,6 +140,7 @@ struct parport_state {
struct ax_parport_state ax;
struct amiga_parport_state amiga;
/* Atari has not state. */
+ struct ip32_parport_state ip32;
void *misc;
} u;
};
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h
index 4f34d3d60f2..21e5a912485 100644
--- a/include/linux/quotaops.h
+++ b/include/linux/quotaops.h
@@ -190,7 +190,6 @@ static __inline__ int DQUOT_OFF(struct super_block *sb)
*/
#define sb_dquot_ops (NULL)
#define sb_quotactl_ops (NULL)
-#define sync_dquots_dev(dev,type) (NULL)
#define DQUOT_INIT(inode) do { } while(0)
#define DQUOT_DROP(inode) do { } while(0)
#define DQUOT_ALLOC_INODE(inode) (0)
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 981f9aa4335..b87aefa082e 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -240,11 +240,14 @@ extern int rcu_pending(int cpu);
* This means that all preempt_disable code sequences, including NMI and
* hardware-interrupt handlers, in progress on entry will have completed
* before this primitive returns. However, this does not guarantee that
- * softirq handlers will have completed, since in some kernels
+ * softirq handlers will have completed, since in some kernels, these
+ * handlers can run in process context, and can block.
*
* This primitive provides the guarantees made by the (deprecated)
* synchronize_kernel() API. In contrast, synchronize_rcu() only
* guarantees that rcu_read_lock() sections will have completed.
+ * In "classic RCU", these two guarantees happen to be one and
+ * the same, but can differ in realtime RCU implementations.
*/
#define synchronize_sched() synchronize_rcu()
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h
index b68c11a2d6d..be4772ed43c 100644
--- a/include/linux/sunrpc/auth.h
+++ b/include/linux/sunrpc/auth.h
@@ -48,7 +48,7 @@ struct rpc_cred {
/* per-flavor data */
};
-#define RPCAUTH_CRED_LOCKED 0x0001
+#define RPCAUTH_CRED_NEW 0x0001
#define RPCAUTH_CRED_UPTODATE 0x0002
#define RPCAUTH_CRED_MAGIC 0x0f4aa4f0
@@ -83,9 +83,10 @@ struct rpc_auth {
struct rpc_cred_cache * au_credcache;
/* per-flavor data */
};
-#define RPC_AUTH_PROC_CREDS 0x0010 /* process creds (including
- * uid/gid, fs[ug]id, gids)
- */
+
+/* Flags for rpcauth_lookupcred() */
+#define RPCAUTH_LOOKUP_NEW 0x01 /* Accept an uninitialised cred */
+#define RPCAUTH_LOOKUP_ROOTCREDS 0x02 /* This really ought to go! */
/*
* Client authentication ops
@@ -105,6 +106,7 @@ struct rpc_authops {
struct rpc_credops {
const char * cr_name; /* Name of the auth flavour */
+ int (*cr_init)(struct rpc_auth *, struct rpc_cred *);
void (*crdestroy)(struct rpc_cred *);
int (*crmatch)(struct auth_cred *, struct rpc_cred *, int);
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index 5dc94e777fa..43bcd13eb1e 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -42,10 +42,6 @@ extern void mark_free_pages(struct zone *zone);
#ifdef CONFIG_PM
/* kernel/power/swsusp.c */
extern int software_suspend(void);
-
-extern int pm_prepare_console(void);
-extern void pm_restore_console(void);
-
#else
static inline int software_suspend(void)
{
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 3787102e4b1..a7bd3b4558d 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -57,6 +57,7 @@ struct tty_buffer {
unsigned char *flag_buf_ptr;
int used;
int size;
+ int active;
/* Data points here */
unsigned long data[0];
};
@@ -64,6 +65,7 @@ struct tty_buffer {
struct tty_bufhead {
struct work_struct work;
struct semaphore pty_sem;
+ spinlock_t lock;
struct tty_buffer *head; /* Queue head */
struct tty_buffer *tail; /* Active buffer */
struct tty_buffer *free; /* Free queue head */
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h
index be1400e8248..82961eb1988 100644
--- a/include/linux/tty_flip.h
+++ b/include/linux/tty_flip.h
@@ -17,7 +17,7 @@ _INLINE_ int tty_insert_flip_char(struct tty_struct *tty,
unsigned char ch, char flag)
{
struct tty_buffer *tb = tty->buf.tail;
- if (tb && tb->used < tb->size) {
+ if (tb && tb->active && tb->used < tb->size) {
tb->flag_buf_ptr[tb->used] = flag;
tb->char_buf_ptr[tb->used++] = ch;
return 1;
@@ -27,6 +27,11 @@ _INLINE_ int tty_insert_flip_char(struct tty_struct *tty,
_INLINE_ void tty_schedule_flip(struct tty_struct *tty)
{
+ unsigned long flags;
+ spin_lock_irqsave(&tty->buf.lock, flags);
+ if (tty->buf.tail != NULL)
+ tty->buf.tail->active = 0;
+ spin_unlock_irqrestore(&tty->buf.lock, flags);
schedule_delayed_work(&tty->buf.work, 1);
}
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h
index 7a6babeca25..b0ffe4356e5 100644
--- a/include/linux/ufs_fs.h
+++ b/include/linux/ufs_fs.h
@@ -148,11 +148,11 @@ typedef __u16 __bitwise __fs16;
#define UFS_USEEFT ((__u16)65535)
#define UFS_FSOK 0x7c269d38
-#define UFS_FSACTIVE ((char)0x00)
-#define UFS_FSCLEAN ((char)0x01)
-#define UFS_FSSTABLE ((char)0x02)
-#define UFS_FSOSF1 ((char)0x03) /* is this correct for DEC OSF/1? */
-#define UFS_FSBAD ((char)0xff)
+#define UFS_FSACTIVE ((__s8)0x00)
+#define UFS_FSCLEAN ((__s8)0x01)
+#define UFS_FSSTABLE ((__s8)0x02)
+#define UFS_FSOSF1 ((__s8)0x03) /* is this correct for DEC OSF/1? */
+#define UFS_FSBAD ((__s8)0xff)
/* From here to next blank line, s_flags for ufs_sb_info */
/* directory entry encoding */
@@ -502,8 +502,7 @@ struct ufs_super_block {
/*
* Convert cylinder group to base address of its global summary info.
*/
-#define fs_cs(indx) \
- s_csp[(indx) >> uspi->s_csshift][(indx) & ~uspi->s_csmask]
+#define fs_cs(indx) s_csp[(indx)]
/*
* Cylinder group block for a file system.
@@ -913,6 +912,7 @@ extern int ufs_sync_inode (struct inode *);
extern void ufs_delete_inode (struct inode *);
extern struct buffer_head * ufs_getfrag (struct inode *, unsigned, int, int *);
extern struct buffer_head * ufs_bread (struct inode *, unsigned, int, int *);
+extern int ufs_getfrag_block (struct inode *inode, sector_t fragment, struct buffer_head *bh_result, int create);
/* namei.c */
extern struct file_operations ufs_dir_operations;
diff --git a/include/linux/ufs_fs_sb.h b/include/linux/ufs_fs_sb.h
index c1be4c22648..8ff13c160f3 100644
--- a/include/linux/ufs_fs_sb.h
+++ b/include/linux/ufs_fs_sb.h
@@ -25,7 +25,7 @@ struct ufs_csum;
struct ufs_sb_info {
struct ufs_sb_private_info * s_uspi;
- struct ufs_csum * s_csp[UFS_MAXCSBUFS];
+ struct ufs_csum * s_csp;
unsigned s_bytesex;
unsigned s_flags;
struct buffer_head ** s_ucg;