Manual merge with Linus.
Conflicts: arch/powerpc/kernel/setup-common.c drivers/input/keyboard/hil_kbd.c drivers/input/mouse/hil_ptr.c
This commit is contained in:
commit
95d465fd75
5033 changed files with 258164 additions and 166979 deletions
|
@ -85,7 +85,7 @@ enum adb_message {
|
|||
ADB_MSG_POST_RESET /* Called after resetting the bus (re-do init & register) */
|
||||
};
|
||||
extern struct adb_driver *adb_controller;
|
||||
extern struct notifier_block *adb_client_list;
|
||||
extern struct blocking_notifier_head adb_client_list;
|
||||
|
||||
int adb_request(struct adb_request *req, void (*done)(struct adb_request *),
|
||||
int flags, int nbytes, ...);
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
#define CNTL_LCDBPP4 (2 << 1)
|
||||
#define CNTL_LCDBPP8 (3 << 1)
|
||||
#define CNTL_LCDBPP16 (4 << 1)
|
||||
#define CNTL_LCDBPP16_565 (6 << 1)
|
||||
#define CNTL_LCDBPP24 (5 << 1)
|
||||
#define CNTL_LCDBW (1 << 4)
|
||||
#define CNTL_LCDTFT (1 << 5)
|
||||
|
@ -209,7 +210,16 @@ static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs *regs)
|
|||
val |= CNTL_LCDBPP8;
|
||||
break;
|
||||
case 16:
|
||||
val |= CNTL_LCDBPP16;
|
||||
/*
|
||||
* PL110 cannot choose between 5551 and 565 modes in
|
||||
* its control register
|
||||
*/
|
||||
if ((fb->dev->periphid & 0x000fffff) == 0x00041110)
|
||||
val |= CNTL_LCDBPP16;
|
||||
else if (fb->fb.var.green.length == 5)
|
||||
val |= CNTL_LCDBPP16;
|
||||
else
|
||||
val |= CNTL_LCDBPP16_565;
|
||||
break;
|
||||
case 32:
|
||||
val |= CNTL_LCDBPP24;
|
||||
|
|
|
@ -158,4 +158,10 @@
|
|||
#define UART01x_RSR_ANY (UART01x_RSR_OE|UART01x_RSR_BE|UART01x_RSR_PE|UART01x_RSR_FE)
|
||||
#define UART01x_FR_MODEM_ANY (UART01x_FR_DCD|UART01x_FR_DSR|UART01x_FR_CTS)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
struct amba_pl010_data {
|
||||
void (*set_mctrl)(struct amba_device *dev, void __iomem *base, unsigned int mctrl);
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -206,7 +206,6 @@ struct ArcProto {
|
|||
|
||||
extern struct ArcProto *arc_proto_map[256], *arc_proto_default,
|
||||
*arc_bcast_proto, *arc_raw_proto;
|
||||
extern struct ArcProto arc_proto_null;
|
||||
|
||||
|
||||
/*
|
||||
|
@ -334,17 +333,9 @@ void arcnet_dump_skb(struct net_device *dev, struct sk_buff *skb, char *desc);
|
|||
#define arcnet_dump_skb(dev,skb,desc) ;
|
||||
#endif
|
||||
|
||||
#if (ARCNET_DEBUG_MAX & D_RX) || (ARCNET_DEBUG_MAX & D_TX)
|
||||
void arcnet_dump_packet(struct net_device *dev, int bufnum, char *desc,
|
||||
int take_arcnet_lock);
|
||||
#else
|
||||
#define arcnet_dump_packet(dev, bufnum, desc,take_arcnet_lock) ;
|
||||
#endif
|
||||
|
||||
void arcnet_unregister_proto(struct ArcProto *proto);
|
||||
irqreturn_t arcnet_interrupt(int irq, void *dev_id, struct pt_regs *regs);
|
||||
struct net_device *alloc_arcdev(char *name);
|
||||
void arcnet_rx(struct net_device *dev, int bufnum);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _LINUX_ARCDEVICE_H */
|
||||
|
|
|
@ -146,6 +146,8 @@ enum {
|
|||
ATA_CMD_STANDBYNOW1 = 0xE0,
|
||||
ATA_CMD_IDLEIMMEDIATE = 0xE1,
|
||||
ATA_CMD_INIT_DEV_PARAMS = 0x91,
|
||||
ATA_CMD_READ_NATIVE_MAX = 0xF8,
|
||||
ATA_CMD_READ_NATIVE_MAX_EXT = 0x27,
|
||||
|
||||
/* SETFEATURES stuff */
|
||||
SETFEATURES_XFER = 0x03,
|
||||
|
@ -204,7 +206,6 @@ enum ata_tf_protocols {
|
|||
ATA_PROT_UNKNOWN, /* unknown/invalid */
|
||||
ATA_PROT_NODATA, /* no data */
|
||||
ATA_PROT_PIO, /* PIO single sector */
|
||||
ATA_PROT_PIO_MULT, /* PIO multiple sector */
|
||||
ATA_PROT_DMA, /* DMA */
|
||||
ATA_PROT_ATAPI, /* packet command, PIO data xfer*/
|
||||
ATA_PROT_ATAPI_NODATA, /* packet command, no data */
|
||||
|
@ -247,18 +248,22 @@ struct ata_taskfile {
|
|||
};
|
||||
|
||||
#define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0)
|
||||
#define ata_id_is_cfa(id) ((id)[0] == 0x848A)
|
||||
#define ata_id_is_sata(id) ((id)[93] == 0)
|
||||
#define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6))
|
||||
#define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5))
|
||||
#define ata_id_hpa_enabled(id) ((id)[85] & (1 << 10))
|
||||
#define ata_id_has_fua(id) ((id)[84] & (1 << 6))
|
||||
#define ata_id_has_flush(id) ((id)[83] & (1 << 12))
|
||||
#define ata_id_has_flush_ext(id) ((id)[83] & (1 << 13))
|
||||
#define ata_id_has_lba48(id) ((id)[83] & (1 << 10))
|
||||
#define ata_id_has_hpa(id) ((id)[82] & (1 << 10))
|
||||
#define ata_id_has_wcache(id) ((id)[82] & (1 << 5))
|
||||
#define ata_id_has_pm(id) ((id)[82] & (1 << 3))
|
||||
#define ata_id_has_lba(id) ((id)[49] & (1 << 9))
|
||||
#define ata_id_has_dma(id) ((id)[49] & (1 << 8))
|
||||
#define ata_id_removeable(id) ((id)[0] & (1 << 7))
|
||||
#define ata_id_has_dword_io(id) ((id)[50] & (1 << 0))
|
||||
#define ata_id_u32(id,n) \
|
||||
(((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)]))
|
||||
#define ata_id_u64(id,n) \
|
||||
|
@ -267,6 +272,16 @@ struct ata_taskfile {
|
|||
((u64) (id)[(n) + 1] << 16) | \
|
||||
((u64) (id)[(n) + 0]) )
|
||||
|
||||
static inline unsigned int ata_id_major_version(const u16 *id)
|
||||
{
|
||||
unsigned int mver;
|
||||
|
||||
for (mver = 14; mver >= 1; mver--)
|
||||
if (id[ATA_ID_MAJOR_VER] & (1 << mver))
|
||||
break;
|
||||
return mver;
|
||||
}
|
||||
|
||||
static inline int ata_id_current_chs_valid(const u16 *id)
|
||||
{
|
||||
/* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command
|
||||
|
@ -302,4 +317,16 @@ static inline int ata_ok(u8 status)
|
|||
== ATA_DRDY);
|
||||
}
|
||||
|
||||
static inline int lba_28_ok(u64 block, u32 n_block)
|
||||
{
|
||||
/* check the ending block number */
|
||||
return ((block + n_block - 1) < ((u64)1 << 28)) && (n_block <= 256);
|
||||
}
|
||||
|
||||
static inline int lba_48_ok(u64 block, u32 n_block)
|
||||
{
|
||||
/* check the ending block number */
|
||||
return ((block + n_block - 1) < ((u64)1 << 48)) && (n_block <= 65536);
|
||||
}
|
||||
|
||||
#endif /* __LINUX_ATA_H__ */
|
||||
|
|
|
@ -33,27 +33,42 @@
|
|||
* 1200 - 1299 messages internal to the audit daemon
|
||||
* 1300 - 1399 audit event messages
|
||||
* 1400 - 1499 SE Linux use
|
||||
* 1500 - 1999 future use
|
||||
* 2000 is for otherwise unclassified kernel audit messages
|
||||
* 1500 - 1599 kernel LSPP events
|
||||
* 1600 - 1699 kernel crypto events
|
||||
* 1700 - 1799 kernel anomaly records
|
||||
* 1800 - 1999 future kernel use (maybe integrity labels and related events)
|
||||
* 2000 is for otherwise unclassified kernel audit messages (legacy)
|
||||
* 2001 - 2099 unused (kernel)
|
||||
* 2100 - 2199 user space anomaly records
|
||||
* 2200 - 2299 user space actions taken in response to anomalies
|
||||
* 2300 - 2399 user space generated LSPP events
|
||||
* 2400 - 2499 user space crypto events
|
||||
* 2500 - 2999 future user space (maybe integrity labels and related events)
|
||||
*
|
||||
* Messages from 1000-1199 are bi-directional. 1200-1299 are exclusively user
|
||||
* space. Anything over that is kernel --> user space communication.
|
||||
* Messages from 1000-1199 are bi-directional. 1200-1299 & 2100 - 2999 are
|
||||
* exclusively user space. 1300-2099 is kernel --> user space
|
||||
* communication.
|
||||
*/
|
||||
#define AUDIT_GET 1000 /* Get status */
|
||||
#define AUDIT_SET 1001 /* Set status (enable/disable/auditd) */
|
||||
#define AUDIT_LIST 1002 /* List syscall filtering rules */
|
||||
#define AUDIT_ADD 1003 /* Add syscall filtering rule */
|
||||
#define AUDIT_DEL 1004 /* Delete syscall filtering rule */
|
||||
#define AUDIT_LIST 1002 /* List syscall rules -- deprecated */
|
||||
#define AUDIT_ADD 1003 /* Add syscall rule -- deprecated */
|
||||
#define AUDIT_DEL 1004 /* Delete syscall rule -- deprecated */
|
||||
#define AUDIT_USER 1005 /* Message from userspace -- deprecated */
|
||||
#define AUDIT_LOGIN 1006 /* Define the login id and information */
|
||||
#define AUDIT_WATCH_INS 1007 /* Insert file/dir watch entry */
|
||||
#define AUDIT_WATCH_REM 1008 /* Remove file/dir watch entry */
|
||||
#define AUDIT_WATCH_LIST 1009 /* List all file/dir watches */
|
||||
#define AUDIT_SIGNAL_INFO 1010 /* Get info about sender of signal to auditd */
|
||||
#define AUDIT_ADD_RULE 1011 /* Add syscall filtering rule */
|
||||
#define AUDIT_DEL_RULE 1012 /* Delete syscall filtering rule */
|
||||
#define AUDIT_LIST_RULES 1013 /* List syscall filtering rules */
|
||||
|
||||
#define AUDIT_FIRST_USER_MSG 1100 /* Userspace messages mostly uninteresting to kernel */
|
||||
#define AUDIT_USER_AVC 1107 /* We filter this differently */
|
||||
#define AUDIT_LAST_USER_MSG 1199
|
||||
#define AUDIT_FIRST_USER_MSG2 2100 /* More user space messages */
|
||||
#define AUDIT_LAST_USER_MSG2 2999
|
||||
|
||||
#define AUDIT_DAEMON_START 1200 /* Daemon startup record */
|
||||
#define AUDIT_DAEMON_END 1201 /* Daemon normal stop record */
|
||||
|
@ -72,6 +87,13 @@
|
|||
#define AUDIT_AVC 1400 /* SE Linux avc denial or grant */
|
||||
#define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */
|
||||
#define AUDIT_AVC_PATH 1402 /* dentry, vfsmount pair from avc */
|
||||
#define AUDIT_MAC_POLICY_LOAD 1403 /* Policy file load */
|
||||
#define AUDIT_MAC_STATUS 1404 /* Changed enforcing,permissive,off */
|
||||
#define AUDIT_MAC_CONFIG_CHANGE 1405 /* Changes to booleans */
|
||||
|
||||
#define AUDIT_FIRST_KERN_ANOM_MSG 1700
|
||||
#define AUDIT_LAST_KERN_ANOM_MSG 1799
|
||||
#define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */
|
||||
|
||||
#define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */
|
||||
|
||||
|
@ -81,8 +103,9 @@
|
|||
#define AUDIT_FILTER_ENTRY 0x02 /* Apply rule at syscall entry */
|
||||
#define AUDIT_FILTER_WATCH 0x03 /* Apply rule to file system watches */
|
||||
#define AUDIT_FILTER_EXIT 0x04 /* Apply rule at syscall exit */
|
||||
#define AUDIT_FILTER_TYPE 0x05 /* Apply rule at audit_log_start */
|
||||
|
||||
#define AUDIT_NR_FILTERS 5
|
||||
#define AUDIT_NR_FILTERS 6
|
||||
|
||||
#define AUDIT_FILTER_PREPEND 0x10 /* Prepend to front of list */
|
||||
|
||||
|
@ -98,6 +121,13 @@
|
|||
#define AUDIT_WORD(nr) ((__u32)((nr)/32))
|
||||
#define AUDIT_BIT(nr) (1 << ((nr) - AUDIT_WORD(nr)*32))
|
||||
|
||||
/* This bitmask is used to validate user input. It represents all bits that
|
||||
* are currently used in an audit field constant understood by the kernel.
|
||||
* If you are adding a new #define AUDIT_<whatever>, please ensure that
|
||||
* AUDIT_UNUSED_BITS is updated if need be. */
|
||||
#define AUDIT_UNUSED_BITS 0x0FFFFC00
|
||||
|
||||
|
||||
/* Rule fields */
|
||||
/* These are useful when checking the
|
||||
* task structure at task creation time
|
||||
|
@ -114,6 +144,7 @@
|
|||
#define AUDIT_LOGINUID 9
|
||||
#define AUDIT_PERS 10
|
||||
#define AUDIT_ARCH 11
|
||||
#define AUDIT_MSGTYPE 12
|
||||
|
||||
/* These are ONLY useful when checking
|
||||
* at syscall exit time (AUDIT_AT_EXIT). */
|
||||
|
@ -128,8 +159,28 @@
|
|||
#define AUDIT_ARG2 (AUDIT_ARG0+2)
|
||||
#define AUDIT_ARG3 (AUDIT_ARG0+3)
|
||||
|
||||
#define AUDIT_NEGATE 0x80000000
|
||||
#define AUDIT_NEGATE 0x80000000
|
||||
|
||||
/* These are the supported operators.
|
||||
* 4 2 1
|
||||
* = > <
|
||||
* -------
|
||||
* 0 0 0 0 nonsense
|
||||
* 0 0 1 1 <
|
||||
* 0 1 0 2 >
|
||||
* 0 1 1 3 !=
|
||||
* 1 0 0 4 =
|
||||
* 1 0 1 5 <=
|
||||
* 1 1 0 6 >=
|
||||
* 1 1 1 7 all operators
|
||||
*/
|
||||
#define AUDIT_LESS_THAN 0x10000000
|
||||
#define AUDIT_GREATER_THAN 0x20000000
|
||||
#define AUDIT_NOT_EQUAL 0x30000000
|
||||
#define AUDIT_EQUAL 0x40000000
|
||||
#define AUDIT_LESS_THAN_OR_EQUAL (AUDIT_LESS_THAN|AUDIT_EQUAL)
|
||||
#define AUDIT_GREATER_THAN_OR_EQUAL (AUDIT_GREATER_THAN|AUDIT_EQUAL)
|
||||
#define AUDIT_OPERATORS (AUDIT_EQUAL|AUDIT_NOT_EQUAL)
|
||||
|
||||
/* Status symbols */
|
||||
/* Mask values */
|
||||
|
@ -186,6 +237,26 @@ struct audit_status {
|
|||
__u32 backlog; /* messages waiting in queue */
|
||||
};
|
||||
|
||||
/* audit_rule_data supports filter rules with both integer and string
|
||||
* fields. It corresponds with AUDIT_ADD_RULE, AUDIT_DEL_RULE and
|
||||
* AUDIT_LIST_RULES requests.
|
||||
*/
|
||||
struct audit_rule_data {
|
||||
__u32 flags; /* AUDIT_PER_{TASK,CALL}, AUDIT_PREPEND */
|
||||
__u32 action; /* AUDIT_NEVER, AUDIT_POSSIBLE, AUDIT_ALWAYS */
|
||||
__u32 field_count;
|
||||
__u32 mask[AUDIT_BITMASK_SIZE]; /* syscall(s) affected */
|
||||
__u32 fields[AUDIT_MAX_FIELDS];
|
||||
__u32 values[AUDIT_MAX_FIELDS];
|
||||
__u32 fieldflags[AUDIT_MAX_FIELDS];
|
||||
__u32 buflen; /* total length of string fields */
|
||||
char buf[0]; /* string fields buffer */
|
||||
};
|
||||
|
||||
/* audit_rule is supported to maintain backward compatibility with
|
||||
* userspace. It supports integer fields only and corresponds to
|
||||
* AUDIT_ADD, AUDIT_DEL and AUDIT_LIST requests.
|
||||
*/
|
||||
struct audit_rule { /* for AUDIT_LIST, AUDIT_ADD, and AUDIT_DEL */
|
||||
__u32 flags; /* AUDIT_PER_{TASK,CALL}, AUDIT_PREPEND */
|
||||
__u32 action; /* AUDIT_NEVER, AUDIT_POSSIBLE, AUDIT_ALWAYS */
|
||||
|
@ -222,22 +293,33 @@ extern void audit_syscall_entry(struct task_struct *task, int arch,
|
|||
extern void audit_syscall_exit(struct task_struct *task, int failed, long return_code);
|
||||
extern void audit_getname(const char *name);
|
||||
extern void audit_putname(const char *name);
|
||||
extern void audit_inode(const char *name, const struct inode *inode, unsigned flags);
|
||||
extern void __audit_inode(const char *name, const struct inode *inode, unsigned flags);
|
||||
extern void __audit_inode_child(const char *dname, const struct inode *inode,
|
||||
unsigned long pino);
|
||||
static inline void audit_inode(const char *name, const struct inode *inode,
|
||||
unsigned flags) {
|
||||
if (unlikely(current->audit_context))
|
||||
__audit_inode(name, inode, flags);
|
||||
}
|
||||
static inline void audit_inode_child(const char *dname,
|
||||
const struct inode *inode,
|
||||
unsigned long pino) {
|
||||
if (unlikely(current->audit_context))
|
||||
__audit_inode_child(dname, inode, pino);
|
||||
}
|
||||
|
||||
/* Private API (for audit.c only) */
|
||||
extern int audit_receive_filter(int type, int pid, int uid, int seq,
|
||||
void *data, uid_t loginuid);
|
||||
extern unsigned int audit_serial(void);
|
||||
extern void auditsc_get_stamp(struct audit_context *ctx,
|
||||
struct timespec *t, unsigned int *serial);
|
||||
extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid);
|
||||
extern uid_t audit_get_loginuid(struct audit_context *ctx);
|
||||
extern int audit_ipc_perms(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode);
|
||||
extern int audit_ipc_perms(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode, struct kern_ipc_perm *ipcp);
|
||||
extern int audit_socketcall(int nargs, unsigned long *args);
|
||||
extern int audit_sockaddr(int len, void *addr);
|
||||
extern int audit_avc_path(struct dentry *dentry, struct vfsmount *mnt);
|
||||
extern void audit_signal_info(int sig, struct task_struct *t);
|
||||
extern int audit_filter_user(struct netlink_skb_parms *cb, int type);
|
||||
extern int audit_set_macxattr(const char *name);
|
||||
#else
|
||||
#define audit_alloc(t) ({ 0; })
|
||||
#define audit_free(t) do { ; } while (0)
|
||||
|
@ -245,16 +327,18 @@ extern int audit_filter_user(struct netlink_skb_parms *cb, int type);
|
|||
#define audit_syscall_exit(t,f,r) do { ; } while (0)
|
||||
#define audit_getname(n) do { ; } while (0)
|
||||
#define audit_putname(n) do { ; } while (0)
|
||||
#define __audit_inode(n,i,f) do { ; } while (0)
|
||||
#define __audit_inode_child(d,i,p) do { ; } while (0)
|
||||
#define audit_inode(n,i,f) do { ; } while (0)
|
||||
#define audit_receive_filter(t,p,u,s,d,l) ({ -EOPNOTSUPP; })
|
||||
#define audit_inode_child(d,i,p) do { ; } while (0)
|
||||
#define auditsc_get_stamp(c,t,s) do { BUG(); } while (0)
|
||||
#define audit_get_loginuid(c) ({ -1; })
|
||||
#define audit_ipc_perms(q,u,g,m) ({ 0; })
|
||||
#define audit_ipc_perms(q,u,g,m,i) ({ 0; })
|
||||
#define audit_socketcall(n,a) ({ 0; })
|
||||
#define audit_sockaddr(len, addr) ({ 0; })
|
||||
#define audit_avc_path(dentry, mnt) ({ 0; })
|
||||
#define audit_signal_info(s,t) do { ; } while (0)
|
||||
#define audit_filter_user(cb,t) ({ 1; })
|
||||
#define audit_set_macxattr(n) do { ; } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_AUDIT
|
||||
|
@ -278,12 +362,11 @@ extern void audit_log_d_path(struct audit_buffer *ab,
|
|||
const char *prefix,
|
||||
struct dentry *dentry,
|
||||
struct vfsmount *vfsmnt);
|
||||
/* Private API (for auditsc.c only) */
|
||||
extern void audit_send_reply(int pid, int seq, int type,
|
||||
int done, int multi,
|
||||
void *payload, int size);
|
||||
extern void audit_log_lost(const char *message);
|
||||
extern struct semaphore audit_netlink_sem;
|
||||
/* Private API (for audit.c only) */
|
||||
extern int audit_filter_user(struct netlink_skb_parms *cb, int type);
|
||||
extern int audit_filter_type(int type);
|
||||
extern int audit_receive_filter(int type, int pid, int uid, int seq,
|
||||
void *data, size_t datasz, uid_t loginuid);
|
||||
#else
|
||||
#define audit_log(c,g,t,f,...) do { ; } while (0)
|
||||
#define audit_log_start(c,g,t) ({ NULL; })
|
||||
|
@ -293,6 +376,7 @@ extern struct semaphore audit_netlink_sem;
|
|||
#define audit_log_hex(a,b,l) do { ; } while (0)
|
||||
#define audit_log_untrustedstring(a,s) do { ; } while (0)
|
||||
#define audit_log_d_path(b,p,d,v) do { ; } while (0)
|
||||
#define audit_panic(m) do { ; } while (0)
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -19,18 +19,37 @@
|
|||
#undef AUTOFS_MIN_PROTO_VERSION
|
||||
#undef AUTOFS_MAX_PROTO_VERSION
|
||||
|
||||
#define AUTOFS_PROTO_VERSION 4
|
||||
#define AUTOFS_PROTO_VERSION 5
|
||||
#define AUTOFS_MIN_PROTO_VERSION 3
|
||||
#define AUTOFS_MAX_PROTO_VERSION 4
|
||||
#define AUTOFS_MAX_PROTO_VERSION 5
|
||||
|
||||
#define AUTOFS_PROTO_SUBVERSION 7
|
||||
#define AUTOFS_PROTO_SUBVERSION 0
|
||||
|
||||
/* Mask for expire behaviour */
|
||||
#define AUTOFS_EXP_IMMEDIATE 1
|
||||
#define AUTOFS_EXP_LEAVES 2
|
||||
|
||||
/* New message type */
|
||||
#define autofs_ptype_expire_multi 2 /* Expire entry (umount request) */
|
||||
/* Daemon notification packet types */
|
||||
enum autofs_notify {
|
||||
NFY_NONE,
|
||||
NFY_MOUNT,
|
||||
NFY_EXPIRE
|
||||
};
|
||||
|
||||
/* Kernel protocol version 4 packet types */
|
||||
|
||||
/* Expire entry (umount request) */
|
||||
#define autofs_ptype_expire_multi 2
|
||||
|
||||
/* Kernel protocol version 5 packet types */
|
||||
|
||||
/* Indirect mount missing and expire requests. */
|
||||
#define autofs_ptype_missing_indirect 3
|
||||
#define autofs_ptype_expire_indirect 4
|
||||
|
||||
/* Direct mount missing and expire requests */
|
||||
#define autofs_ptype_missing_direct 5
|
||||
#define autofs_ptype_expire_direct 6
|
||||
|
||||
/* v4 multi expire (via pipe) */
|
||||
struct autofs_packet_expire_multi {
|
||||
|
@ -40,14 +59,36 @@ struct autofs_packet_expire_multi {
|
|||
char name[NAME_MAX+1];
|
||||
};
|
||||
|
||||
/* autofs v5 common packet struct */
|
||||
struct autofs_v5_packet {
|
||||
struct autofs_packet_hdr hdr;
|
||||
autofs_wqt_t wait_queue_token;
|
||||
__u32 dev;
|
||||
__u64 ino;
|
||||
__u32 uid;
|
||||
__u32 gid;
|
||||
__u32 pid;
|
||||
__u32 tgid;
|
||||
__u32 len;
|
||||
char name[NAME_MAX+1];
|
||||
};
|
||||
|
||||
typedef struct autofs_v5_packet autofs_packet_missing_indirect_t;
|
||||
typedef struct autofs_v5_packet autofs_packet_expire_indirect_t;
|
||||
typedef struct autofs_v5_packet autofs_packet_missing_direct_t;
|
||||
typedef struct autofs_v5_packet autofs_packet_expire_direct_t;
|
||||
|
||||
union autofs_packet_union {
|
||||
struct autofs_packet_hdr hdr;
|
||||
struct autofs_packet_missing missing;
|
||||
struct autofs_packet_expire expire;
|
||||
struct autofs_packet_expire_multi expire_multi;
|
||||
struct autofs_v5_packet v5_packet;
|
||||
};
|
||||
|
||||
#define AUTOFS_IOC_EXPIRE_MULTI _IOW(0x93,0x66,int)
|
||||
#define AUTOFS_IOC_EXPIRE_INDIRECT AUTOFS_IOC_EXPIRE_MULTI
|
||||
#define AUTOFS_IOC_EXPIRE_DIRECT AUTOFS_IOC_EXPIRE_MULTI
|
||||
#define AUTOFS_IOC_PROTOSUBVER _IOR(0x93,0x67,int)
|
||||
#define AUTOFS_IOC_ASKREGHOST _IOR(0x93,0x68,int)
|
||||
#define AUTOFS_IOC_TOGGLEREGHOST _IOR(0x93,0x69,int)
|
||||
|
|
|
@ -19,20 +19,25 @@ struct fb_info;
|
|||
struct backlight_properties {
|
||||
/* Owner module */
|
||||
struct module *owner;
|
||||
/* Get the backlight power status (0: full on, 1..3: power saving
|
||||
modes; 4: full off), see FB_BLANK_XXX */
|
||||
int (*get_power)(struct backlight_device *);
|
||||
/* Enable or disable power to the LCD (0: on; 4: off, see FB_BLANK_XXX) */
|
||||
int (*set_power)(struct backlight_device *, int power);
|
||||
/* Maximal value for brightness (read-only) */
|
||||
int max_brightness;
|
||||
/* Get current backlight brightness */
|
||||
|
||||
/* Notify the backlight driver some property has changed */
|
||||
int (*update_status)(struct backlight_device *);
|
||||
/* Return the current backlight brightness (accounting for power,
|
||||
fb_blank etc.) */
|
||||
int (*get_brightness)(struct backlight_device *);
|
||||
/* Set backlight brightness (0..max_brightness) */
|
||||
int (*set_brightness)(struct backlight_device *, int brightness);
|
||||
/* Check if given framebuffer device is the one bound to this backlight;
|
||||
return 0 if not, !=0 if it is. If NULL, backlight always matches the fb. */
|
||||
int (*check_fb)(struct fb_info *);
|
||||
|
||||
/* Current User requested brightness (0 - max_brightness) */
|
||||
int brightness;
|
||||
/* Maximal value for brightness (read-only) */
|
||||
int max_brightness;
|
||||
/* Current FB Power mode (0: full on, 1..3: power saving
|
||||
modes; 4: full off), see FB_BLANK_XXX */
|
||||
int power;
|
||||
/* FB Blanking active? (values as for power) */
|
||||
int fb_blank;
|
||||
};
|
||||
|
||||
struct backlight_device {
|
||||
|
|
|
@ -46,6 +46,9 @@
|
|||
* bitmap_parse(ubuf, ulen, dst, nbits) Parse bitmap dst from user buf
|
||||
* bitmap_scnlistprintf(buf, len, src, nbits) Print bitmap src as list to buf
|
||||
* bitmap_parselist(buf, dst, nbits) Parse bitmap dst from list
|
||||
* bitmap_find_free_region(bitmap, bits, order) Find and allocate bit region
|
||||
* bitmap_release_region(bitmap, pos, order) Free specified bit region
|
||||
* bitmap_allocate_region(bitmap, pos, order) Allocate specified bit region
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -2,89 +2,12 @@
|
|||
#define _LINUX_BITOPS_H
|
||||
#include <asm/types.h>
|
||||
|
||||
/*
|
||||
* ffs: find first bit set. This is defined the same way as
|
||||
* the libc and compiler builtin ffs routines, therefore
|
||||
* differs in spirit from the above ffz (man ffs).
|
||||
*/
|
||||
|
||||
static inline int generic_ffs(int x)
|
||||
{
|
||||
int r = 1;
|
||||
|
||||
if (!x)
|
||||
return 0;
|
||||
if (!(x & 0xffff)) {
|
||||
x >>= 16;
|
||||
r += 16;
|
||||
}
|
||||
if (!(x & 0xff)) {
|
||||
x >>= 8;
|
||||
r += 8;
|
||||
}
|
||||
if (!(x & 0xf)) {
|
||||
x >>= 4;
|
||||
r += 4;
|
||||
}
|
||||
if (!(x & 3)) {
|
||||
x >>= 2;
|
||||
r += 2;
|
||||
}
|
||||
if (!(x & 1)) {
|
||||
x >>= 1;
|
||||
r += 1;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
/*
|
||||
* fls: find last bit set.
|
||||
*/
|
||||
|
||||
static __inline__ int generic_fls(int x)
|
||||
{
|
||||
int r = 32;
|
||||
|
||||
if (!x)
|
||||
return 0;
|
||||
if (!(x & 0xffff0000u)) {
|
||||
x <<= 16;
|
||||
r -= 16;
|
||||
}
|
||||
if (!(x & 0xff000000u)) {
|
||||
x <<= 8;
|
||||
r -= 8;
|
||||
}
|
||||
if (!(x & 0xf0000000u)) {
|
||||
x <<= 4;
|
||||
r -= 4;
|
||||
}
|
||||
if (!(x & 0xc0000000u)) {
|
||||
x <<= 2;
|
||||
r -= 2;
|
||||
}
|
||||
if (!(x & 0x80000000u)) {
|
||||
x <<= 1;
|
||||
r -= 1;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
/*
|
||||
* Include this here because some architectures need generic_ffs/fls in
|
||||
* scope
|
||||
*/
|
||||
#include <asm/bitops.h>
|
||||
|
||||
|
||||
static inline int generic_fls64(__u64 x)
|
||||
{
|
||||
__u32 h = x >> 32;
|
||||
if (h)
|
||||
return fls(h) + 32;
|
||||
return fls(x);
|
||||
}
|
||||
|
||||
static __inline__ int get_bitmask_order(unsigned int count)
|
||||
{
|
||||
int order;
|
||||
|
@ -103,54 +26,9 @@ static __inline__ int get_count_order(unsigned int count)
|
|||
return order;
|
||||
}
|
||||
|
||||
/*
|
||||
* hweightN: returns the hamming weight (i.e. the number
|
||||
* of bits set) of a N-bit word
|
||||
*/
|
||||
|
||||
static inline unsigned int generic_hweight32(unsigned int w)
|
||||
{
|
||||
unsigned int res = (w & 0x55555555) + ((w >> 1) & 0x55555555);
|
||||
res = (res & 0x33333333) + ((res >> 2) & 0x33333333);
|
||||
res = (res & 0x0F0F0F0F) + ((res >> 4) & 0x0F0F0F0F);
|
||||
res = (res & 0x00FF00FF) + ((res >> 8) & 0x00FF00FF);
|
||||
return (res & 0x0000FFFF) + ((res >> 16) & 0x0000FFFF);
|
||||
}
|
||||
|
||||
static inline unsigned int generic_hweight16(unsigned int w)
|
||||
{
|
||||
unsigned int res = (w & 0x5555) + ((w >> 1) & 0x5555);
|
||||
res = (res & 0x3333) + ((res >> 2) & 0x3333);
|
||||
res = (res & 0x0F0F) + ((res >> 4) & 0x0F0F);
|
||||
return (res & 0x00FF) + ((res >> 8) & 0x00FF);
|
||||
}
|
||||
|
||||
static inline unsigned int generic_hweight8(unsigned int w)
|
||||
{
|
||||
unsigned int res = (w & 0x55) + ((w >> 1) & 0x55);
|
||||
res = (res & 0x33) + ((res >> 2) & 0x33);
|
||||
return (res & 0x0F) + ((res >> 4) & 0x0F);
|
||||
}
|
||||
|
||||
static inline unsigned long generic_hweight64(__u64 w)
|
||||
{
|
||||
#if BITS_PER_LONG < 64
|
||||
return generic_hweight32((unsigned int)(w >> 32)) +
|
||||
generic_hweight32((unsigned int)w);
|
||||
#else
|
||||
u64 res;
|
||||
res = (w & 0x5555555555555555ul) + ((w >> 1) & 0x5555555555555555ul);
|
||||
res = (res & 0x3333333333333333ul) + ((res >> 2) & 0x3333333333333333ul);
|
||||
res = (res & 0x0F0F0F0F0F0F0F0Ful) + ((res >> 4) & 0x0F0F0F0F0F0F0F0Ful);
|
||||
res = (res & 0x00FF00FF00FF00FFul) + ((res >> 8) & 0x00FF00FF00FF00FFul);
|
||||
res = (res & 0x0000FFFF0000FFFFul) + ((res >> 16) & 0x0000FFFF0000FFFFul);
|
||||
return (res & 0x00000000FFFFFFFFul) + ((res >> 32) & 0x00000000FFFFFFFFul);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline unsigned long hweight_long(unsigned long w)
|
||||
{
|
||||
return sizeof(w) == 4 ? generic_hweight32(w) : generic_hweight64(w);
|
||||
return sizeof(w) == 4 ? hweight32(w) : hweight64(w);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -175,4 +53,11 @@ static inline __u32 ror32(__u32 word, unsigned int shift)
|
|||
return (word >> shift) | (word << (32 - shift));
|
||||
}
|
||||
|
||||
static inline unsigned fls_long(unsigned long l)
|
||||
{
|
||||
if (sizeof(l) == 4)
|
||||
return fls(l);
|
||||
return fls64(l);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -22,6 +22,7 @@ typedef struct request_queue request_queue_t;
|
|||
struct elevator_queue;
|
||||
typedef struct elevator_queue elevator_t;
|
||||
struct request_pm_state;
|
||||
struct blk_trace;
|
||||
|
||||
#define BLKDEV_MIN_RQ 4
|
||||
#define BLKDEV_MAX_RQ 128 /* Default maximum */
|
||||
|
@ -54,23 +55,29 @@ struct as_io_context {
|
|||
|
||||
struct cfq_queue;
|
||||
struct cfq_io_context {
|
||||
/*
|
||||
* circular list of cfq_io_contexts belonging to a process io context
|
||||
*/
|
||||
struct list_head list;
|
||||
struct cfq_queue *cfqq;
|
||||
struct rb_node rb_node;
|
||||
void *key;
|
||||
|
||||
struct cfq_queue *cfqq[2];
|
||||
|
||||
struct io_context *ioc;
|
||||
|
||||
unsigned long last_end_request;
|
||||
unsigned long last_queue;
|
||||
sector_t last_request_pos;
|
||||
unsigned long last_queue;
|
||||
|
||||
unsigned long ttime_total;
|
||||
unsigned long ttime_samples;
|
||||
unsigned long ttime_mean;
|
||||
|
||||
void (*dtor)(struct cfq_io_context *);
|
||||
void (*exit)(struct cfq_io_context *);
|
||||
unsigned int seek_samples;
|
||||
u64 seek_total;
|
||||
sector_t seek_mean;
|
||||
|
||||
struct list_head queue_list;
|
||||
|
||||
void (*dtor)(struct io_context *); /* destructor */
|
||||
void (*exit)(struct io_context *); /* called on task exit */
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -91,7 +98,7 @@ struct io_context {
|
|||
int nr_batch_requests; /* Number of requests left in the batch */
|
||||
|
||||
struct as_io_context *aic;
|
||||
struct cfq_io_context *cic;
|
||||
struct rb_root cic_root;
|
||||
};
|
||||
|
||||
void put_io_context(struct io_context *ioc);
|
||||
|
@ -404,8 +411,6 @@ struct request_queue
|
|||
|
||||
struct blk_queue_tag *queue_tags;
|
||||
|
||||
atomic_t refcnt;
|
||||
|
||||
unsigned int nr_sorted;
|
||||
unsigned int in_flight;
|
||||
|
||||
|
@ -416,6 +421,8 @@ struct request_queue
|
|||
unsigned int sg_reserved_size;
|
||||
int node;
|
||||
|
||||
struct blk_trace *blk_trace;
|
||||
|
||||
/*
|
||||
* reserved for flush operations
|
||||
*/
|
||||
|
@ -424,6 +431,8 @@ struct request_queue
|
|||
struct request pre_flush_rq, bar_rq, post_flush_rq;
|
||||
struct request *orig_bar_rq;
|
||||
unsigned int bi_size;
|
||||
|
||||
struct mutex sysfs_lock;
|
||||
};
|
||||
|
||||
#define RQ_INACTIVE (-1)
|
||||
|
@ -725,7 +734,7 @@ extern long nr_blockdev_pages(void);
|
|||
int blk_get_queue(request_queue_t *);
|
||||
request_queue_t *blk_alloc_queue(gfp_t);
|
||||
request_queue_t *blk_alloc_queue_node(gfp_t, int);
|
||||
#define blk_put_queue(q) blk_cleanup_queue((q))
|
||||
extern void blk_put_queue(request_queue_t *);
|
||||
|
||||
/*
|
||||
* tag stuff
|
||||
|
|
277
include/linux/blktrace_api.h
Normal file
277
include/linux/blktrace_api.h
Normal file
|
@ -0,0 +1,277 @@
|
|||
#ifndef BLKTRACE_H
|
||||
#define BLKTRACE_H
|
||||
|
||||
#include <linux/config.h>
|
||||
#include <linux/blkdev.h>
|
||||
#include <linux/relay.h>
|
||||
|
||||
/*
|
||||
* Trace categories
|
||||
*/
|
||||
enum blktrace_cat {
|
||||
BLK_TC_READ = 1 << 0, /* reads */
|
||||
BLK_TC_WRITE = 1 << 1, /* writes */
|
||||
BLK_TC_BARRIER = 1 << 2, /* barrier */
|
||||
BLK_TC_SYNC = 1 << 3, /* barrier */
|
||||
BLK_TC_QUEUE = 1 << 4, /* queueing/merging */
|
||||
BLK_TC_REQUEUE = 1 << 5, /* requeueing */
|
||||
BLK_TC_ISSUE = 1 << 6, /* issue */
|
||||
BLK_TC_COMPLETE = 1 << 7, /* completions */
|
||||
BLK_TC_FS = 1 << 8, /* fs requests */
|
||||
BLK_TC_PC = 1 << 9, /* pc requests */
|
||||
BLK_TC_NOTIFY = 1 << 10, /* special message */
|
||||
|
||||
BLK_TC_END = 1 << 15, /* only 16-bits, reminder */
|
||||
};
|
||||
|
||||
#define BLK_TC_SHIFT (16)
|
||||
#define BLK_TC_ACT(act) ((act) << BLK_TC_SHIFT)
|
||||
|
||||
/*
|
||||
* Basic trace actions
|
||||
*/
|
||||
enum blktrace_act {
|
||||
__BLK_TA_QUEUE = 1, /* queued */
|
||||
__BLK_TA_BACKMERGE, /* back merged to existing rq */
|
||||
__BLK_TA_FRONTMERGE, /* front merge to existing rq */
|
||||
__BLK_TA_GETRQ, /* allocated new request */
|
||||
__BLK_TA_SLEEPRQ, /* sleeping on rq allocation */
|
||||
__BLK_TA_REQUEUE, /* request requeued */
|
||||
__BLK_TA_ISSUE, /* sent to driver */
|
||||
__BLK_TA_COMPLETE, /* completed by driver */
|
||||
__BLK_TA_PLUG, /* queue was plugged */
|
||||
__BLK_TA_UNPLUG_IO, /* queue was unplugged by io */
|
||||
__BLK_TA_UNPLUG_TIMER, /* queue was unplugged by timer */
|
||||
__BLK_TA_INSERT, /* insert request */
|
||||
__BLK_TA_SPLIT, /* bio was split */
|
||||
__BLK_TA_BOUNCE, /* bio was bounced */
|
||||
__BLK_TA_REMAP, /* bio was remapped */
|
||||
};
|
||||
|
||||
/*
|
||||
* Trace actions in full. Additionally, read or write is masked
|
||||
*/
|
||||
#define BLK_TA_QUEUE (__BLK_TA_QUEUE | BLK_TC_ACT(BLK_TC_QUEUE))
|
||||
#define BLK_TA_BACKMERGE (__BLK_TA_BACKMERGE | BLK_TC_ACT(BLK_TC_QUEUE))
|
||||
#define BLK_TA_FRONTMERGE (__BLK_TA_FRONTMERGE | BLK_TC_ACT(BLK_TC_QUEUE))
|
||||
#define BLK_TA_GETRQ (__BLK_TA_GETRQ | BLK_TC_ACT(BLK_TC_QUEUE))
|
||||
#define BLK_TA_SLEEPRQ (__BLK_TA_SLEEPRQ | BLK_TC_ACT(BLK_TC_QUEUE))
|
||||
#define BLK_TA_REQUEUE (__BLK_TA_REQUEUE | BLK_TC_ACT(BLK_TC_REQUEUE))
|
||||
#define BLK_TA_ISSUE (__BLK_TA_ISSUE | BLK_TC_ACT(BLK_TC_ISSUE))
|
||||
#define BLK_TA_COMPLETE (__BLK_TA_COMPLETE| BLK_TC_ACT(BLK_TC_COMPLETE))
|
||||
#define BLK_TA_PLUG (__BLK_TA_PLUG | BLK_TC_ACT(BLK_TC_QUEUE))
|
||||
#define BLK_TA_UNPLUG_IO (__BLK_TA_UNPLUG_IO | BLK_TC_ACT(BLK_TC_QUEUE))
|
||||
#define BLK_TA_UNPLUG_TIMER (__BLK_TA_UNPLUG_TIMER | BLK_TC_ACT(BLK_TC_QUEUE))
|
||||
#define BLK_TA_INSERT (__BLK_TA_INSERT | BLK_TC_ACT(BLK_TC_QUEUE))
|
||||
#define BLK_TA_SPLIT (__BLK_TA_SPLIT)
|
||||
#define BLK_TA_BOUNCE (__BLK_TA_BOUNCE)
|
||||
#define BLK_TA_REMAP (__BLK_TA_REMAP | BLK_TC_ACT(BLK_TC_QUEUE))
|
||||
|
||||
#define BLK_IO_TRACE_MAGIC 0x65617400
|
||||
#define BLK_IO_TRACE_VERSION 0x07
|
||||
|
||||
/*
|
||||
* The trace itself
|
||||
*/
|
||||
struct blk_io_trace {
|
||||
u32 magic; /* MAGIC << 8 | version */
|
||||
u32 sequence; /* event number */
|
||||
u64 time; /* in microseconds */
|
||||
u64 sector; /* disk offset */
|
||||
u32 bytes; /* transfer length */
|
||||
u32 action; /* what happened */
|
||||
u32 pid; /* who did it */
|
||||
u32 device; /* device number */
|
||||
u32 cpu; /* on what cpu did it happen */
|
||||
u16 error; /* completion error */
|
||||
u16 pdu_len; /* length of data after this trace */
|
||||
};
|
||||
|
||||
/*
|
||||
* The remap event
|
||||
*/
|
||||
struct blk_io_trace_remap {
|
||||
u32 device;
|
||||
u32 __pad;
|
||||
u64 sector;
|
||||
};
|
||||
|
||||
enum {
|
||||
Blktrace_setup = 1,
|
||||
Blktrace_running,
|
||||
Blktrace_stopped,
|
||||
};
|
||||
|
||||
struct blk_trace {
|
||||
int trace_state;
|
||||
struct rchan *rchan;
|
||||
unsigned long *sequence;
|
||||
u16 act_mask;
|
||||
u64 start_lba;
|
||||
u64 end_lba;
|
||||
u32 pid;
|
||||
u32 dev;
|
||||
struct dentry *dir;
|
||||
struct dentry *dropped_file;
|
||||
atomic_t dropped;
|
||||
};
|
||||
|
||||
/*
|
||||
* User setup structure passed with BLKTRACESTART
|
||||
*/
|
||||
struct blk_user_trace_setup {
|
||||
char name[BDEVNAME_SIZE]; /* output */
|
||||
u16 act_mask; /* input */
|
||||
u32 buf_size; /* input */
|
||||
u32 buf_nr; /* input */
|
||||
u64 start_lba;
|
||||
u64 end_lba;
|
||||
u32 pid;
|
||||
};
|
||||
|
||||
#if defined(CONFIG_BLK_DEV_IO_TRACE)
|
||||
extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *);
|
||||
extern void blk_trace_shutdown(request_queue_t *);
|
||||
extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *);
|
||||
|
||||
/**
|
||||
* blk_add_trace_rq - Add a trace for a request oriented action
|
||||
* @q: queue the io is for
|
||||
* @rq: the source request
|
||||
* @what: the action
|
||||
*
|
||||
* Description:
|
||||
* Records an action against a request. Will log the bio offset + size.
|
||||
*
|
||||
**/
|
||||
static inline void blk_add_trace_rq(struct request_queue *q, struct request *rq,
|
||||
u32 what)
|
||||
{
|
||||
struct blk_trace *bt = q->blk_trace;
|
||||
int rw = rq->flags & 0x07;
|
||||
|
||||
if (likely(!bt))
|
||||
return;
|
||||
|
||||
if (blk_pc_request(rq)) {
|
||||
what |= BLK_TC_ACT(BLK_TC_PC);
|
||||
__blk_add_trace(bt, 0, rq->data_len, rw, what, rq->errors, sizeof(rq->cmd), rq->cmd);
|
||||
} else {
|
||||
what |= BLK_TC_ACT(BLK_TC_FS);
|
||||
__blk_add_trace(bt, rq->hard_sector, rq->hard_nr_sectors << 9, rw, what, rq->errors, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* blk_add_trace_bio - Add a trace for a bio oriented action
|
||||
* @q: queue the io is for
|
||||
* @bio: the source bio
|
||||
* @what: the action
|
||||
*
|
||||
* Description:
|
||||
* Records an action against a bio. Will log the bio offset + size.
|
||||
*
|
||||
**/
|
||||
static inline void blk_add_trace_bio(struct request_queue *q, struct bio *bio,
|
||||
u32 what)
|
||||
{
|
||||
struct blk_trace *bt = q->blk_trace;
|
||||
|
||||
if (likely(!bt))
|
||||
return;
|
||||
|
||||
__blk_add_trace(bt, bio->bi_sector, bio->bi_size, bio->bi_rw, what, !bio_flagged(bio, BIO_UPTODATE), 0, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* blk_add_trace_generic - Add a trace for a generic action
|
||||
* @q: queue the io is for
|
||||
* @bio: the source bio
|
||||
* @rw: the data direction
|
||||
* @what: the action
|
||||
*
|
||||
* Description:
|
||||
* Records a simple trace
|
||||
*
|
||||
**/
|
||||
static inline void blk_add_trace_generic(struct request_queue *q,
|
||||
struct bio *bio, int rw, u32 what)
|
||||
{
|
||||
struct blk_trace *bt = q->blk_trace;
|
||||
|
||||
if (likely(!bt))
|
||||
return;
|
||||
|
||||
if (bio)
|
||||
blk_add_trace_bio(q, bio, what);
|
||||
else
|
||||
__blk_add_trace(bt, 0, 0, rw, what, 0, 0, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* blk_add_trace_pdu_int - Add a trace for a bio with an integer payload
|
||||
* @q: queue the io is for
|
||||
* @what: the action
|
||||
* @bio: the source bio
|
||||
* @pdu: the integer payload
|
||||
*
|
||||
* Description:
|
||||
* Adds a trace with some integer payload. This might be an unplug
|
||||
* option given as the action, with the depth at unplug time given
|
||||
* as the payload
|
||||
*
|
||||
**/
|
||||
static inline void blk_add_trace_pdu_int(struct request_queue *q, u32 what,
|
||||
struct bio *bio, unsigned int pdu)
|
||||
{
|
||||
struct blk_trace *bt = q->blk_trace;
|
||||
u64 rpdu = cpu_to_be64(pdu);
|
||||
|
||||
if (likely(!bt))
|
||||
return;
|
||||
|
||||
if (bio)
|
||||
__blk_add_trace(bt, bio->bi_sector, bio->bi_size, bio->bi_rw, what, !bio_flagged(bio, BIO_UPTODATE), sizeof(rpdu), &rpdu);
|
||||
else
|
||||
__blk_add_trace(bt, 0, 0, 0, what, 0, sizeof(rpdu), &rpdu);
|
||||
}
|
||||
|
||||
/**
|
||||
* blk_add_trace_remap - Add a trace for a remap operation
|
||||
* @q: queue the io is for
|
||||
* @bio: the source bio
|
||||
* @dev: target device
|
||||
* @from: source sector
|
||||
* @to: target sector
|
||||
*
|
||||
* Description:
|
||||
* Device mapper or raid target sometimes need to split a bio because
|
||||
* it spans a stripe (or similar). Add a trace for that action.
|
||||
*
|
||||
**/
|
||||
static inline void blk_add_trace_remap(struct request_queue *q, struct bio *bio,
|
||||
dev_t dev, sector_t from, sector_t to)
|
||||
{
|
||||
struct blk_trace *bt = q->blk_trace;
|
||||
struct blk_io_trace_remap r;
|
||||
|
||||
if (likely(!bt))
|
||||
return;
|
||||
|
||||
r.device = cpu_to_be32(dev);
|
||||
r.sector = cpu_to_be64(to);
|
||||
|
||||
__blk_add_trace(bt, from, bio->bi_size, bio->bi_rw, BLK_TA_REMAP, !bio_flagged(bio, BIO_UPTODATE), sizeof(r), &r);
|
||||
}
|
||||
|
||||
#else /* !CONFIG_BLK_DEV_IO_TRACE */
|
||||
#define blk_trace_ioctl(bdev, cmd, arg) (-ENOTTY)
|
||||
#define blk_trace_shutdown(q) do { } while (0)
|
||||
#define blk_add_trace_rq(q, rq, what) do { } while (0)
|
||||
#define blk_add_trace_bio(q, rq, what) do { } while (0)
|
||||
#define blk_add_trace_generic(q, rq, rw, what) do { } while (0)
|
||||
#define blk_add_trace_pdu_int(q, what, bio, pdu) do { } while (0)
|
||||
#define blk_add_trace_remap(q, bio, dev, f, t) do {} while (0)
|
||||
#endif /* CONFIG_BLK_DEV_IO_TRACE */
|
||||
|
||||
#endif
|
|
@ -38,6 +38,7 @@ typedef struct bootmem_data {
|
|||
unsigned long last_pos;
|
||||
unsigned long last_success; /* Previous allocation point. To speed
|
||||
* up searching */
|
||||
struct list_head list;
|
||||
} bootmem_data_t;
|
||||
|
||||
extern unsigned long __init bootmem_bootmap_pages (unsigned long);
|
||||
|
@ -51,6 +52,9 @@ extern void * __init __alloc_bootmem_low_node(pg_data_t *pgdat,
|
|||
unsigned long size,
|
||||
unsigned long align,
|
||||
unsigned long goal);
|
||||
extern void * __init __alloc_bootmem_core(struct bootmem_data *bdata,
|
||||
unsigned long size, unsigned long align, unsigned long goal,
|
||||
unsigned long limit);
|
||||
#ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE
|
||||
extern void __init reserve_bootmem (unsigned long addr, unsigned long size);
|
||||
#define alloc_bootmem(x) \
|
||||
|
|
|
@ -46,25 +46,28 @@ struct address_space;
|
|||
typedef void (bh_end_io_t)(struct buffer_head *bh, int uptodate);
|
||||
|
||||
/*
|
||||
* Keep related fields in common cachelines. The most commonly accessed
|
||||
* field (b_state) goes at the start so the compiler does not generate
|
||||
* indexed addressing for it.
|
||||
* Historically, a buffer_head was used to map a single block
|
||||
* within a page, and of course as the unit of I/O through the
|
||||
* filesystem and block layers. Nowadays the basic I/O unit
|
||||
* is the bio, and buffer_heads are used for extracting block
|
||||
* mappings (via a get_block_t call), for tracking state within
|
||||
* a page (via a page_mapping) and for wrapping bio submission
|
||||
* for backward compatibility reasons (e.g. submit_bh).
|
||||
*/
|
||||
struct buffer_head {
|
||||
/* First cache line: */
|
||||
unsigned long b_state; /* buffer state bitmap (see above) */
|
||||
struct buffer_head *b_this_page;/* circular list of page's buffers */
|
||||
struct page *b_page; /* the page this bh is mapped to */
|
||||
atomic_t b_count; /* users using this block */
|
||||
u32 b_size; /* block size */
|
||||
|
||||
sector_t b_blocknr; /* block number */
|
||||
char *b_data; /* pointer to data block */
|
||||
sector_t b_blocknr; /* start block number */
|
||||
size_t b_size; /* size of mapping */
|
||||
char *b_data; /* pointer to data within the page */
|
||||
|
||||
struct block_device *b_bdev;
|
||||
bh_end_io_t *b_end_io; /* I/O completion */
|
||||
void *b_private; /* reserved for b_end_io */
|
||||
struct list_head b_assoc_buffers; /* associated with another mapping */
|
||||
atomic_t b_count; /* users using this buffer_head */
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -189,8 +192,8 @@ extern int buffer_heads_over_limit;
|
|||
* address_spaces.
|
||||
*/
|
||||
int try_to_release_page(struct page * page, gfp_t gfp_mask);
|
||||
int block_invalidatepage(struct page *page, unsigned long offset);
|
||||
int do_invalidatepage(struct page *page, unsigned long offset);
|
||||
void block_invalidatepage(struct page *page, unsigned long offset);
|
||||
void do_invalidatepage(struct page *page, unsigned long offset);
|
||||
int block_write_full_page(struct page *page, get_block_t *get_block,
|
||||
struct writeback_control *wbc);
|
||||
int block_read_full_page(struct page*, get_block_t*);
|
||||
|
@ -200,7 +203,7 @@ int cont_prepare_write(struct page*, unsigned, unsigned, get_block_t*,
|
|||
int generic_cont_expand(struct inode *inode, loff_t size);
|
||||
int generic_cont_expand_simple(struct inode *inode, loff_t size);
|
||||
int block_commit_write(struct page *page, unsigned from, unsigned to);
|
||||
int block_sync_page(struct page *);
|
||||
void block_sync_page(struct page *);
|
||||
sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *);
|
||||
int generic_commit_write(struct file *, struct page *, unsigned, unsigned);
|
||||
int block_truncate_page(struct address_space *, loff_t, get_block_t *);
|
||||
|
@ -277,6 +280,7 @@ map_bh(struct buffer_head *bh, struct super_block *sb, sector_t block)
|
|||
set_buffer_mapped(bh);
|
||||
bh->b_bdev = sb->s_bdev;
|
||||
bh->b_blocknr = block;
|
||||
bh->b_size = sb->s_blocksize;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -13,9 +13,7 @@
|
|||
#define SMP_CACHE_BYTES L1_CACHE_BYTES
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_X86) || defined(CONFIG_SPARC64) || defined(CONFIG_IA64) || defined(CONFIG_PARISC)
|
||||
#define __read_mostly __attribute__((__section__(".data.read_mostly")))
|
||||
#else
|
||||
#ifndef __read_mostly
|
||||
#define __read_mostly
|
||||
#endif
|
||||
|
||||
|
|
|
@ -357,7 +357,8 @@ static inline kernel_cap_t cap_invert(kernel_cap_t c)
|
|||
|
||||
#define cap_is_fs_cap(c) (CAP_TO_MASK(c) & CAP_FS_MASK)
|
||||
|
||||
extern int capable(int cap);
|
||||
int capable(int cap);
|
||||
int __capable(struct task_struct *t, int cap);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
struct cdev {
|
||||
struct kobject kobj;
|
||||
struct module *owner;
|
||||
struct file_operations *ops;
|
||||
const struct file_operations *ops;
|
||||
struct list_head list;
|
||||
dev_t dev;
|
||||
unsigned int count;
|
||||
};
|
||||
|
||||
void cdev_init(struct cdev *, struct file_operations *);
|
||||
void cdev_init(struct cdev *, const struct file_operations *);
|
||||
|
||||
struct cdev *cdev_alloc(void);
|
||||
|
||||
|
|
|
@ -378,7 +378,6 @@ struct cdrom_generic_command
|
|||
#define CDC_MEDIA_CHANGED 0x80 /* media changed */
|
||||
#define CDC_PLAY_AUDIO 0x100 /* audio functions */
|
||||
#define CDC_RESET 0x200 /* hard reset device */
|
||||
#define CDC_IOCTLS 0x400 /* driver has non-standard ioctls */
|
||||
#define CDC_DRIVE_STATUS 0x800 /* driver implements drive status */
|
||||
#define CDC_GENERIC_PACKET 0x1000 /* driver implements generic packets */
|
||||
#define CDC_CD_R 0x2000 /* drive is a CD-R */
|
||||
|
@ -974,9 +973,7 @@ struct cdrom_device_ops {
|
|||
int (*reset) (struct cdrom_device_info *);
|
||||
/* play stuff */
|
||||
int (*audio_ioctl) (struct cdrom_device_info *,unsigned int, void *);
|
||||
/* dev-specific */
|
||||
int (*dev_ioctl) (struct cdrom_device_info *,
|
||||
unsigned int, unsigned long);
|
||||
|
||||
/* driver specifications */
|
||||
const int capability; /* capability flags */
|
||||
int n_minors; /* number of active minor devices */
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#ifndef ASMARM_CLOCK_H
|
||||
#define ASMARM_CLOCK_H
|
||||
#ifndef __LINUX_CLK_H
|
||||
#define __LINUX_CLK_H
|
||||
|
||||
struct device;
|
||||
|
||||
|
|
|
@ -30,9 +30,9 @@ extern struct inode_operations coda_ioctl_inode_operations;
|
|||
extern struct address_space_operations coda_file_aops;
|
||||
extern struct address_space_operations coda_symlink_aops;
|
||||
|
||||
extern struct file_operations coda_dir_operations;
|
||||
extern struct file_operations coda_file_operations;
|
||||
extern struct file_operations coda_ioctl_operations;
|
||||
extern const struct file_operations coda_dir_operations;
|
||||
extern const struct file_operations coda_file_operations;
|
||||
extern const struct file_operations coda_ioctl_operations;
|
||||
|
||||
/* operations shared over more than one file */
|
||||
int coda_open(struct inode *i, struct file *f);
|
||||
|
|
|
@ -45,6 +45,32 @@ struct compat_tms {
|
|||
compat_clock_t tms_cstime;
|
||||
};
|
||||
|
||||
struct compat_timex {
|
||||
compat_uint_t modes;
|
||||
compat_long_t offset;
|
||||
compat_long_t freq;
|
||||
compat_long_t maxerror;
|
||||
compat_long_t esterror;
|
||||
compat_int_t status;
|
||||
compat_long_t constant;
|
||||
compat_long_t precision;
|
||||
compat_long_t tolerance;
|
||||
struct compat_timeval time;
|
||||
compat_long_t tick;
|
||||
compat_long_t ppsfreq;
|
||||
compat_long_t jitter;
|
||||
compat_int_t shift;
|
||||
compat_long_t stabil;
|
||||
compat_long_t jitcnt;
|
||||
compat_long_t calcnt;
|
||||
compat_long_t errcnt;
|
||||
compat_long_t stbcnt;
|
||||
|
||||
compat_int_t :32; compat_int_t :32; compat_int_t :32; compat_int_t :32;
|
||||
compat_int_t :32; compat_int_t :32; compat_int_t :32; compat_int_t :32;
|
||||
compat_int_t :32; compat_int_t :32; compat_int_t :32; compat_int_t :32;
|
||||
};
|
||||
|
||||
#define _COMPAT_NSIG_WORDS (_COMPAT_NSIG / _COMPAT_NSIG_BPW)
|
||||
|
||||
typedef struct {
|
||||
|
@ -121,6 +147,24 @@ typedef struct compat_sigevent {
|
|||
} _sigev_un;
|
||||
} compat_sigevent_t;
|
||||
|
||||
struct compat_robust_list {
|
||||
compat_uptr_t next;
|
||||
};
|
||||
|
||||
struct compat_robust_list_head {
|
||||
struct compat_robust_list list;
|
||||
compat_long_t futex_offset;
|
||||
compat_uptr_t list_op_pending;
|
||||
};
|
||||
|
||||
extern void compat_exit_robust_list(struct task_struct *curr);
|
||||
|
||||
asmlinkage long
|
||||
compat_sys_set_robust_list(struct compat_robust_list_head __user *head,
|
||||
compat_size_t len);
|
||||
asmlinkage long
|
||||
compat_sys_get_robust_list(int pid, compat_uptr_t *head_ptr,
|
||||
compat_size_t __user *len_ptr);
|
||||
|
||||
long compat_sys_semctl(int first, int second, int third, void __user *uptr);
|
||||
long compat_sys_msgsnd(int first, int second, int third, void __user *uptr);
|
||||
|
@ -181,5 +225,7 @@ static inline int compat_timespec_compare(struct compat_timespec *lhs,
|
|||
return lhs->tv_nsec - rhs->tv_nsec;
|
||||
}
|
||||
|
||||
asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp);
|
||||
|
||||
#endif /* CONFIG_COMPAT */
|
||||
#endif /* _LINUX_COMPAT_H */
|
||||
|
|
|
@ -97,6 +97,10 @@ COMPATIBLE_IOCTL(BLKRRPART)
|
|||
COMPATIBLE_IOCTL(BLKFLSBUF)
|
||||
COMPATIBLE_IOCTL(BLKSECTSET)
|
||||
COMPATIBLE_IOCTL(BLKSSZGET)
|
||||
COMPATIBLE_IOCTL(BLKTRACESTART)
|
||||
COMPATIBLE_IOCTL(BLKTRACESTOP)
|
||||
COMPATIBLE_IOCTL(BLKTRACESETUP)
|
||||
COMPATIBLE_IOCTL(BLKTRACETEARDOWN)
|
||||
ULONG_IOCTL(BLKRASET)
|
||||
ULONG_IOCTL(BLKFRASET)
|
||||
/* RAID */
|
||||
|
@ -136,6 +140,7 @@ COMPATIBLE_IOCTL(DM_TABLE_DEPS_32)
|
|||
COMPATIBLE_IOCTL(DM_TABLE_STATUS_32)
|
||||
COMPATIBLE_IOCTL(DM_LIST_VERSIONS_32)
|
||||
COMPATIBLE_IOCTL(DM_TARGET_MSG_32)
|
||||
COMPATIBLE_IOCTL(DM_DEV_SET_GEOMETRY_32)
|
||||
COMPATIBLE_IOCTL(DM_VERSION)
|
||||
COMPATIBLE_IOCTL(DM_REMOVE_ALL)
|
||||
COMPATIBLE_IOCTL(DM_LIST_DEVICES)
|
||||
|
@ -151,6 +156,7 @@ COMPATIBLE_IOCTL(DM_TABLE_DEPS)
|
|||
COMPATIBLE_IOCTL(DM_TABLE_STATUS)
|
||||
COMPATIBLE_IOCTL(DM_LIST_VERSIONS)
|
||||
COMPATIBLE_IOCTL(DM_TARGET_MSG)
|
||||
COMPATIBLE_IOCTL(DM_DEV_SET_GEOMETRY)
|
||||
/* Big K */
|
||||
COMPATIBLE_IOCTL(PIO_FONT)
|
||||
COMPATIBLE_IOCTL(GIO_FONT)
|
||||
|
|
|
@ -32,7 +32,7 @@ struct cpu {
|
|||
};
|
||||
|
||||
extern int register_cpu(struct cpu *, int, struct node *);
|
||||
extern struct sys_device *get_cpu_sysdev(int cpu);
|
||||
extern struct sys_device *get_cpu_sysdev(unsigned cpu);
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
extern void unregister_cpu(struct cpu *, struct node *);
|
||||
#endif
|
||||
|
@ -74,7 +74,6 @@ extern int lock_cpu_hotplug_interruptible(void);
|
|||
register_cpu_notifier(&fn##_nb); \
|
||||
}
|
||||
int cpu_down(unsigned int cpu);
|
||||
extern int __attribute__((weak)) smp_prepare_cpu(int cpu);
|
||||
#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu))
|
||||
#else
|
||||
#define lock_cpu_hotplug() do { } while (0)
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
*
|
||||
* int any_online_cpu(mask) First online cpu in mask
|
||||
*
|
||||
* for_each_cpu(cpu) for-loop cpu over cpu_possible_map
|
||||
* for_each_possible_cpu(cpu) for-loop cpu over cpu_possible_map
|
||||
* for_each_online_cpu(cpu) for-loop cpu over cpu_online_map
|
||||
* for_each_present_cpu(cpu) for-loop cpu over cpu_present_map
|
||||
*
|
||||
|
@ -212,17 +212,15 @@ static inline void __cpus_shift_left(cpumask_t *dstp,
|
|||
bitmap_shift_left(dstp->bits, srcp->bits, n, nbits);
|
||||
}
|
||||
|
||||
#define first_cpu(src) __first_cpu(&(src), NR_CPUS)
|
||||
static inline int __first_cpu(const cpumask_t *srcp, int nbits)
|
||||
{
|
||||
return min_t(int, nbits, find_first_bit(srcp->bits, nbits));
|
||||
}
|
||||
|
||||
#define next_cpu(n, src) __next_cpu((n), &(src), NR_CPUS)
|
||||
static inline int __next_cpu(int n, const cpumask_t *srcp, int nbits)
|
||||
{
|
||||
return min_t(int, nbits, find_next_bit(srcp->bits, nbits, n+1));
|
||||
}
|
||||
#ifdef CONFIG_SMP
|
||||
int __first_cpu(const cpumask_t *srcp);
|
||||
#define first_cpu(src) __first_cpu(&(src))
|
||||
int __next_cpu(int n, const cpumask_t *srcp);
|
||||
#define next_cpu(n, src) __next_cpu((n), &(src))
|
||||
#else
|
||||
#define first_cpu(src) 0
|
||||
#define next_cpu(n, src) 1
|
||||
#endif
|
||||
|
||||
#define cpumask_of_cpu(cpu) \
|
||||
({ \
|
||||
|
@ -398,27 +396,18 @@ extern cpumask_t cpu_present_map;
|
|||
#define cpu_present(cpu) ((cpu) == 0)
|
||||
#endif
|
||||
|
||||
#define any_online_cpu(mask) \
|
||||
({ \
|
||||
int cpu; \
|
||||
for_each_cpu_mask(cpu, (mask)) \
|
||||
if (cpu_online(cpu)) \
|
||||
break; \
|
||||
cpu; \
|
||||
})
|
||||
#ifdef CONFIG_SMP
|
||||
int highest_possible_processor_id(void);
|
||||
#define any_online_cpu(mask) __any_online_cpu(&(mask))
|
||||
int __any_online_cpu(const cpumask_t *mask);
|
||||
#else
|
||||
#define highest_possible_processor_id() 0
|
||||
#define any_online_cpu(mask) 0
|
||||
#endif
|
||||
|
||||
#define for_each_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map)
|
||||
#define for_each_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map)
|
||||
#define for_each_possible_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map)
|
||||
#define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map)
|
||||
#define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map)
|
||||
|
||||
/* Find the highest possible smp_processor_id() */
|
||||
#define highest_possible_processor_id() \
|
||||
({ \
|
||||
unsigned int cpu, highest = 0; \
|
||||
for_each_cpu_mask(cpu, cpu_possible_map) \
|
||||
highest = cpu; \
|
||||
highest; \
|
||||
})
|
||||
|
||||
|
||||
#endif /* __LINUX_CPUMASK_H */
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* cpuset interface
|
||||
*
|
||||
* Copyright (C) 2003 BULL SA
|
||||
* Copyright (C) 2004 Silicon Graphics, Inc.
|
||||
* Copyright (C) 2004-2006 Silicon Graphics, Inc.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -51,6 +51,18 @@ extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer);
|
|||
extern void cpuset_lock(void);
|
||||
extern void cpuset_unlock(void);
|
||||
|
||||
extern int cpuset_mem_spread_node(void);
|
||||
|
||||
static inline int cpuset_do_page_mem_spread(void)
|
||||
{
|
||||
return current->flags & PF_SPREAD_PAGE;
|
||||
}
|
||||
|
||||
static inline int cpuset_do_slab_mem_spread(void)
|
||||
{
|
||||
return current->flags & PF_SPREAD_SLAB;
|
||||
}
|
||||
|
||||
#else /* !CONFIG_CPUSETS */
|
||||
|
||||
static inline int cpuset_init_early(void) { return 0; }
|
||||
|
@ -99,6 +111,21 @@ static inline char *cpuset_task_status_allowed(struct task_struct *task,
|
|||
static inline void cpuset_lock(void) {}
|
||||
static inline void cpuset_unlock(void) {}
|
||||
|
||||
static inline int cpuset_mem_spread_node(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int cpuset_do_page_mem_spread(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int cpuset_do_slab_mem_spread(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* !CONFIG_CPUSETS */
|
||||
|
||||
#endif /* _LINUX_CPUSET_H */
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
extern unsigned long long elfcorehdr_addr;
|
||||
extern ssize_t copy_oldmem_page(unsigned long, char *, size_t,
|
||||
unsigned long, int);
|
||||
extern struct file_operations proc_vmcore_operations;
|
||||
extern const struct file_operations proc_vmcore_operations;
|
||||
extern struct proc_dir_entry *proc_vmcore;
|
||||
|
||||
#endif /* CONFIG_CRASH_DUMP */
|
||||
|
|
|
@ -229,6 +229,8 @@ struct crypto_tfm {
|
|||
} crt_u;
|
||||
|
||||
struct crypto_alg *__crt_alg;
|
||||
|
||||
char __crt_ctx[] __attribute__ ((__aligned__));
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -301,7 +303,13 @@ static inline unsigned int crypto_tfm_alg_alignmask(struct crypto_tfm *tfm)
|
|||
|
||||
static inline void *crypto_tfm_ctx(struct crypto_tfm *tfm)
|
||||
{
|
||||
return (void *)&tfm[1];
|
||||
return tfm->__crt_ctx;
|
||||
}
|
||||
|
||||
static inline unsigned int crypto_tfm_ctx_alignment(void)
|
||||
{
|
||||
struct crypto_tfm *tfm;
|
||||
return __alignof__(tfm->__crt_ctx);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -162,6 +162,8 @@ d_iput: no no no yes
|
|||
#define DCACHE_REFERENCED 0x0008 /* Recently used, don't discard. */
|
||||
#define DCACHE_UNHASHED 0x0010
|
||||
|
||||
#define DCACHE_INOTIFY_PARENT_WATCHED 0x0020 /* Parent inode is watched */
|
||||
|
||||
extern spinlock_t dcache_lock;
|
||||
|
||||
/**
|
||||
|
@ -273,6 +275,7 @@ extern void d_move(struct dentry *, struct dentry *);
|
|||
/* appendix may either be NULL or be used for transname suffixes */
|
||||
extern struct dentry * d_lookup(struct dentry *, struct qstr *);
|
||||
extern struct dentry * __d_lookup(struct dentry *, struct qstr *);
|
||||
extern struct dentry * d_hash_and_lookup(struct dentry *, struct qstr *);
|
||||
|
||||
/* validate "insecure" dentry pointer */
|
||||
extern int d_validate(struct dentry *, struct dentry *);
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* @dccph_seq - sequence number high or low order 24 bits, depends on dccph_x
|
||||
*/
|
||||
struct dccp_hdr {
|
||||
__u16 dccph_sport,
|
||||
__be16 dccph_sport,
|
||||
dccph_dport;
|
||||
__u8 dccph_doff;
|
||||
#if defined(__LITTLE_ENDIAN_BITFIELD)
|
||||
|
@ -32,18 +32,18 @@ struct dccp_hdr {
|
|||
#endif
|
||||
__u16 dccph_checksum;
|
||||
#if defined(__LITTLE_ENDIAN_BITFIELD)
|
||||
__u32 dccph_x:1,
|
||||
__u8 dccph_x:1,
|
||||
dccph_type:4,
|
||||
dccph_reserved:3,
|
||||
dccph_seq:24;
|
||||
dccph_reserved:3;
|
||||
#elif defined(__BIG_ENDIAN_BITFIELD)
|
||||
__u32 dccph_reserved:3,
|
||||
__u8 dccph_reserved:3,
|
||||
dccph_type:4,
|
||||
dccph_x:1,
|
||||
dccph_seq:24;
|
||||
dccph_x:1;
|
||||
#else
|
||||
#error "Adjust your <asm/byteorder.h> defines"
|
||||
#endif
|
||||
__u8 dccph_seq2;
|
||||
__be16 dccph_seq;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -52,7 +52,7 @@ struct dccp_hdr {
|
|||
* @dccph_seq_low - low 24 bits of a 48 bit seq packet
|
||||
*/
|
||||
struct dccp_hdr_ext {
|
||||
__u32 dccph_seq_low;
|
||||
__be32 dccph_seq_low;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -62,7 +62,7 @@ struct dccp_hdr_ext {
|
|||
* @dccph_req_options - list of options (must be a multiple of 32 bits
|
||||
*/
|
||||
struct dccp_hdr_request {
|
||||
__u32 dccph_req_service;
|
||||
__be32 dccph_req_service;
|
||||
};
|
||||
/**
|
||||
* struct dccp_hdr_ack_bits - acknowledgment bits common to most packets
|
||||
|
@ -71,9 +71,9 @@ struct dccp_hdr_request {
|
|||
* @dccph_resp_ack_nr_low - 48 bit ack number low order bits, contains GSR
|
||||
*/
|
||||
struct dccp_hdr_ack_bits {
|
||||
__u32 dccph_reserved1:8,
|
||||
dccph_ack_nr_high:24;
|
||||
__u32 dccph_ack_nr_low;
|
||||
__be16 dccph_reserved1;
|
||||
__be16 dccph_ack_nr_high;
|
||||
__be32 dccph_ack_nr_low;
|
||||
};
|
||||
/**
|
||||
* struct dccp_hdr_response - Conection initiation response header
|
||||
|
@ -85,7 +85,7 @@ struct dccp_hdr_ack_bits {
|
|||
*/
|
||||
struct dccp_hdr_response {
|
||||
struct dccp_hdr_ack_bits dccph_resp_ack;
|
||||
__u32 dccph_resp_service;
|
||||
__be32 dccph_resp_service;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -154,6 +154,10 @@ enum {
|
|||
DCCPO_MANDATORY = 1,
|
||||
DCCPO_MIN_RESERVED = 3,
|
||||
DCCPO_MAX_RESERVED = 31,
|
||||
DCCPO_CHANGE_L = 32,
|
||||
DCCPO_CONFIRM_L = 33,
|
||||
DCCPO_CHANGE_R = 34,
|
||||
DCCPO_CONFIRM_R = 35,
|
||||
DCCPO_NDP_COUNT = 37,
|
||||
DCCPO_ACK_VECTOR_0 = 38,
|
||||
DCCPO_ACK_VECTOR_1 = 39,
|
||||
|
@ -168,7 +172,9 @@ enum {
|
|||
/* DCCP features */
|
||||
enum {
|
||||
DCCPF_RESERVED = 0,
|
||||
DCCPF_CCID = 1,
|
||||
DCCPF_SEQUENCE_WINDOW = 3,
|
||||
DCCPF_ACK_RATIO = 5,
|
||||
DCCPF_SEND_ACK_VECTOR = 6,
|
||||
DCCPF_SEND_NDP_COUNT = 7,
|
||||
/* 10-127 reserved */
|
||||
|
@ -176,9 +182,18 @@ enum {
|
|||
DCCPF_MAX_CCID_SPECIFIC = 255,
|
||||
};
|
||||
|
||||
/* this structure is argument to DCCP_SOCKOPT_CHANGE_X */
|
||||
struct dccp_so_feat {
|
||||
__u8 dccpsf_feat;
|
||||
__u8 *dccpsf_val;
|
||||
__u8 dccpsf_len;
|
||||
};
|
||||
|
||||
/* DCCP socket options */
|
||||
#define DCCP_SOCKOPT_PACKET_SIZE 1
|
||||
#define DCCP_SOCKOPT_SERVICE 2
|
||||
#define DCCP_SOCKOPT_CHANGE_L 3
|
||||
#define DCCP_SOCKOPT_CHANGE_R 4
|
||||
#define DCCP_SOCKOPT_CCID_RX_INFO 128
|
||||
#define DCCP_SOCKOPT_CCID_TX_INFO 192
|
||||
|
||||
|
@ -254,16 +269,12 @@ static inline unsigned int dccp_basic_hdr_len(const struct sk_buff *skb)
|
|||
static inline __u64 dccp_hdr_seq(const struct sk_buff *skb)
|
||||
{
|
||||
const struct dccp_hdr *dh = dccp_hdr(skb);
|
||||
#if defined(__LITTLE_ENDIAN_BITFIELD)
|
||||
__u64 seq_nr = ntohl(dh->dccph_seq << 8);
|
||||
#elif defined(__BIG_ENDIAN_BITFIELD)
|
||||
__u64 seq_nr = ntohl(dh->dccph_seq);
|
||||
#else
|
||||
#error "Adjust your <asm/byteorder.h> defines"
|
||||
#endif
|
||||
__u64 seq_nr = ntohs(dh->dccph_seq);
|
||||
|
||||
if (dh->dccph_x != 0)
|
||||
seq_nr = (seq_nr << 32) + ntohl(dccp_hdrx(skb)->dccph_seq_low);
|
||||
else
|
||||
seq_nr += (u32)dh->dccph_seq2 << 16;
|
||||
|
||||
return seq_nr;
|
||||
}
|
||||
|
@ -281,13 +292,7 @@ static inline struct dccp_hdr_ack_bits *dccp_hdr_ack_bits(const struct sk_buff *
|
|||
static inline u64 dccp_hdr_ack_seq(const struct sk_buff *skb)
|
||||
{
|
||||
const struct dccp_hdr_ack_bits *dhack = dccp_hdr_ack_bits(skb);
|
||||
#if defined(__LITTLE_ENDIAN_BITFIELD)
|
||||
return (((u64)ntohl(dhack->dccph_ack_nr_high << 8)) << 32) + ntohl(dhack->dccph_ack_nr_low);
|
||||
#elif defined(__BIG_ENDIAN_BITFIELD)
|
||||
return (((u64)ntohl(dhack->dccph_ack_nr_high)) << 32) + ntohl(dhack->dccph_ack_nr_low);
|
||||
#else
|
||||
#error "Adjust your <asm/byteorder.h> defines"
|
||||
#endif
|
||||
return ((u64)ntohs(dhack->dccph_ack_nr_high) << 32) + ntohl(dhack->dccph_ack_nr_low);
|
||||
}
|
||||
|
||||
static inline struct dccp_hdr_response *dccp_hdr_response(struct sk_buff *skb)
|
||||
|
@ -314,38 +319,60 @@ static inline unsigned int dccp_hdr_len(const struct sk_buff *skb)
|
|||
|
||||
/* initial values for each feature */
|
||||
#define DCCPF_INITIAL_SEQUENCE_WINDOW 100
|
||||
/* FIXME: for now we're using CCID 3 (TFRC) */
|
||||
#define DCCPF_INITIAL_CCID 3
|
||||
#define DCCPF_INITIAL_SEND_ACK_VECTOR 0
|
||||
#define DCCPF_INITIAL_ACK_RATIO 2
|
||||
#define DCCPF_INITIAL_CCID 2
|
||||
#define DCCPF_INITIAL_SEND_ACK_VECTOR 1
|
||||
/* FIXME: for now we're default to 1 but it should really be 0 */
|
||||
#define DCCPF_INITIAL_SEND_NDP_COUNT 1
|
||||
|
||||
#define DCCP_NDP_LIMIT 0xFFFFFF
|
||||
|
||||
/**
|
||||
* struct dccp_options - option values for a DCCP connection
|
||||
* @dccpo_sequence_window - Sequence Window Feature (section 7.5.2)
|
||||
* @dccpo_ccid - Congestion Control Id (CCID) (section 10)
|
||||
* @dccpo_send_ack_vector - Send Ack Vector Feature (section 11.5)
|
||||
* @dccpo_send_ndp_count - Send NDP Count Feature (7.7.2)
|
||||
* struct dccp_minisock - Minimal DCCP connection representation
|
||||
*
|
||||
* Will be used to pass the state from dccp_request_sock to dccp_sock.
|
||||
*
|
||||
* @dccpms_sequence_window - Sequence Window Feature (section 7.5.2)
|
||||
* @dccpms_ccid - Congestion Control Id (CCID) (section 10)
|
||||
* @dccpms_send_ack_vector - Send Ack Vector Feature (section 11.5)
|
||||
* @dccpms_send_ndp_count - Send NDP Count Feature (7.7.2)
|
||||
*/
|
||||
struct dccp_options {
|
||||
__u64 dccpo_sequence_window;
|
||||
__u8 dccpo_rx_ccid;
|
||||
__u8 dccpo_tx_ccid;
|
||||
__u8 dccpo_send_ack_vector;
|
||||
__u8 dccpo_send_ndp_count;
|
||||
struct dccp_minisock {
|
||||
__u64 dccpms_sequence_window;
|
||||
__u8 dccpms_rx_ccid;
|
||||
__u8 dccpms_tx_ccid;
|
||||
__u8 dccpms_send_ack_vector;
|
||||
__u8 dccpms_send_ndp_count;
|
||||
__u8 dccpms_ack_ratio;
|
||||
struct list_head dccpms_pending;
|
||||
struct list_head dccpms_conf;
|
||||
};
|
||||
|
||||
extern void __dccp_options_init(struct dccp_options *dccpo);
|
||||
extern void dccp_options_init(struct dccp_options *dccpo);
|
||||
struct dccp_opt_conf {
|
||||
__u8 *dccpoc_val;
|
||||
__u8 dccpoc_len;
|
||||
};
|
||||
|
||||
struct dccp_opt_pend {
|
||||
struct list_head dccpop_node;
|
||||
__u8 dccpop_type;
|
||||
__u8 dccpop_feat;
|
||||
__u8 *dccpop_val;
|
||||
__u8 dccpop_len;
|
||||
int dccpop_conf;
|
||||
struct dccp_opt_conf *dccpop_sc;
|
||||
};
|
||||
|
||||
extern void __dccp_minisock_init(struct dccp_minisock *dmsk);
|
||||
extern void dccp_minisock_init(struct dccp_minisock *dmsk);
|
||||
|
||||
extern int dccp_parse_options(struct sock *sk, struct sk_buff *skb);
|
||||
|
||||
struct dccp_request_sock {
|
||||
struct inet_request_sock dreq_inet_rsk;
|
||||
__u64 dreq_iss;
|
||||
__u64 dreq_isr;
|
||||
__u32 dreq_service;
|
||||
__be32 dreq_service;
|
||||
};
|
||||
|
||||
static inline struct dccp_request_sock *dccp_rsk(const struct request_sock *req)
|
||||
|
@ -373,13 +400,13 @@ enum dccp_role {
|
|||
|
||||
struct dccp_service_list {
|
||||
__u32 dccpsl_nr;
|
||||
__u32 dccpsl_list[0];
|
||||
__be32 dccpsl_list[0];
|
||||
};
|
||||
|
||||
#define DCCP_SERVICE_INVALID_VALUE htonl((__u32)-1)
|
||||
|
||||
static inline int dccp_list_has_service(const struct dccp_service_list *sl,
|
||||
const u32 service)
|
||||
const __be32 service)
|
||||
{
|
||||
if (likely(sl != NULL)) {
|
||||
u32 i = sl->dccpsl_nr;
|
||||
|
@ -425,17 +452,17 @@ struct dccp_sock {
|
|||
__u64 dccps_gss;
|
||||
__u64 dccps_gsr;
|
||||
__u64 dccps_gar;
|
||||
__u32 dccps_service;
|
||||
__be32 dccps_service;
|
||||
struct dccp_service_list *dccps_service_list;
|
||||
struct timeval dccps_timestamp_time;
|
||||
__u32 dccps_timestamp_echo;
|
||||
__u32 dccps_packet_size;
|
||||
__u16 dccps_l_ack_ratio;
|
||||
__u16 dccps_r_ack_ratio;
|
||||
unsigned long dccps_ndp_count;
|
||||
__u32 dccps_mss_cache;
|
||||
struct dccp_options dccps_options;
|
||||
struct dccp_minisock dccps_minisock;
|
||||
struct dccp_ackvec *dccps_hc_rx_ackvec;
|
||||
void *dccps_hc_rx_ccid_private;
|
||||
void *dccps_hc_tx_ccid_private;
|
||||
struct ccid *dccps_hc_rx_ccid;
|
||||
struct ccid *dccps_hc_tx_ccid;
|
||||
struct dccp_options_received dccps_options_received;
|
||||
|
@ -450,6 +477,11 @@ static inline struct dccp_sock *dccp_sk(const struct sock *sk)
|
|||
return (struct dccp_sock *)sk;
|
||||
}
|
||||
|
||||
static inline struct dccp_minisock *dccp_msk(const struct sock *sk)
|
||||
{
|
||||
return (struct dccp_minisock *)&dccp_sk(sk)->dccps_minisock;
|
||||
}
|
||||
|
||||
static inline int dccp_service_not_initialized(const struct sock *sk)
|
||||
{
|
||||
return dccp_sk(sk)->dccps_service == DCCP_SERVICE_INVALID_VALUE;
|
||||
|
|
|
@ -21,10 +21,15 @@
|
|||
|
||||
struct file_operations;
|
||||
|
||||
struct debugfs_blob_wrapper {
|
||||
void *data;
|
||||
unsigned long size;
|
||||
};
|
||||
|
||||
#if defined(CONFIG_DEBUG_FS)
|
||||
struct dentry *debugfs_create_file(const char *name, mode_t mode,
|
||||
struct dentry *parent, void *data,
|
||||
struct file_operations *fops);
|
||||
const struct file_operations *fops);
|
||||
|
||||
struct dentry *debugfs_create_dir(const char *name, struct dentry *parent);
|
||||
|
||||
|
@ -39,6 +44,9 @@ struct dentry *debugfs_create_u32(const char *name, mode_t mode,
|
|||
struct dentry *debugfs_create_bool(const char *name, mode_t mode,
|
||||
struct dentry *parent, u32 *value);
|
||||
|
||||
struct dentry *debugfs_create_blob(const char *name, mode_t mode,
|
||||
struct dentry *parent,
|
||||
struct debugfs_blob_wrapper *blob);
|
||||
#else
|
||||
|
||||
#include <linux/err.h>
|
||||
|
@ -94,6 +102,13 @@ static inline struct dentry *debugfs_create_bool(const char *name, mode_t mode,
|
|||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
|
||||
static inline struct dentry *debugfs_create_blob(const char *name, mode_t mode,
|
||||
struct dentry *parent,
|
||||
struct debugfs_blob_wrapper *blob)
|
||||
{
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -97,6 +97,7 @@ struct io_restrictions {
|
|||
unsigned short hardsect_size;
|
||||
unsigned int max_segment_size;
|
||||
unsigned long seg_boundary_mask;
|
||||
unsigned char no_cluster; /* inverted so that 0 is default */
|
||||
};
|
||||
|
||||
struct dm_target {
|
||||
|
|
|
@ -378,6 +378,7 @@ extern void device_bind_driver(struct device * dev);
|
|||
extern void device_release_driver(struct device * dev);
|
||||
extern int device_attach(struct device * dev);
|
||||
extern void driver_attach(struct device_driver * drv);
|
||||
extern void device_reprobe(struct device *dev);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -399,7 +400,7 @@ extern struct device * get_device(struct device * dev);
|
|||
extern void put_device(struct device * dev);
|
||||
|
||||
|
||||
/* drivers/base/power.c */
|
||||
/* drivers/base/power/shutdown.c */
|
||||
extern void device_shutdown(void);
|
||||
|
||||
|
||||
|
@ -424,6 +425,8 @@ extern void firmware_unregister(struct subsystem *);
|
|||
dev_printk(KERN_INFO , dev , format , ## arg)
|
||||
#define dev_warn(dev, format, arg...) \
|
||||
dev_printk(KERN_WARNING , dev , format , ## arg)
|
||||
#define dev_notice(dev, format, arg...) \
|
||||
dev_printk(KERN_NOTICE , dev , format , ## arg)
|
||||
|
||||
/* Create alias, so I can be autoloaded. */
|
||||
#define MODULE_ALIAS_CHARDEV(major,minor) \
|
||||
|
|
|
@ -276,37 +276,5 @@ static inline void dio_set_drvdata (struct dio_dev *d, void *data)
|
|||
dev_set_drvdata(&d->dev, data);
|
||||
}
|
||||
|
||||
/*
|
||||
* A helper function which helps ensure correct dio_driver
|
||||
* setup and cleanup for commonly-encountered hotplug/modular cases
|
||||
*
|
||||
* This MUST stay in a header, as it checks for -DMODULE
|
||||
*/
|
||||
static inline int dio_module_init(struct dio_driver *drv)
|
||||
{
|
||||
int rc = dio_register_driver(drv);
|
||||
|
||||
if (rc > 0)
|
||||
return 0;
|
||||
|
||||
/* iff CONFIG_HOTPLUG and built into kernel, we should
|
||||
* leave the driver around for future hotplug events.
|
||||
* For the module case, a hotplug daemon of some sort
|
||||
* should load a module in response to an insert event. */
|
||||
#if defined(CONFIG_HOTPLUG) && !defined(MODULE)
|
||||
if (rc == 0)
|
||||
return 0;
|
||||
#else
|
||||
if (rc == 0)
|
||||
rc = -ENODEV;
|
||||
#endif
|
||||
|
||||
/* if we get here, we need to clean up DIO driver instance
|
||||
* and return some sort of error */
|
||||
dio_unregister_driver(drv);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* ndef _LINUX_DIO_H */
|
||||
|
|
|
@ -80,6 +80,16 @@
|
|||
*
|
||||
* DM_TARGET_MSG:
|
||||
* Pass a message string to the target at a specific offset of a device.
|
||||
*
|
||||
* DM_DEV_SET_GEOMETRY:
|
||||
* Set the geometry of a device by passing in a string in this format:
|
||||
*
|
||||
* "cylinders heads sectors_per_track start_sector"
|
||||
*
|
||||
* Beware that CHS geometry is nearly obsolete and only provided
|
||||
* for compatibility with dm devices that can be booted by a PC
|
||||
* BIOS. See struct hd_geometry for range limits. Also note that
|
||||
* the geometry is erased if the device size changes.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -218,6 +228,7 @@ enum {
|
|||
/* Added later */
|
||||
DM_LIST_VERSIONS_CMD,
|
||||
DM_TARGET_MSG_CMD,
|
||||
DM_DEV_SET_GEOMETRY_CMD
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -247,6 +258,7 @@ typedef char ioctl_struct[308];
|
|||
#define DM_TABLE_STATUS_32 _IOWR(DM_IOCTL, DM_TABLE_STATUS_CMD, ioctl_struct)
|
||||
#define DM_LIST_VERSIONS_32 _IOWR(DM_IOCTL, DM_LIST_VERSIONS_CMD, ioctl_struct)
|
||||
#define DM_TARGET_MSG_32 _IOWR(DM_IOCTL, DM_TARGET_MSG_CMD, ioctl_struct)
|
||||
#define DM_DEV_SET_GEOMETRY_32 _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, ioctl_struct)
|
||||
#endif
|
||||
|
||||
#define DM_IOCTL 0xfd
|
||||
|
@ -270,11 +282,12 @@ typedef char ioctl_struct[308];
|
|||
#define DM_LIST_VERSIONS _IOWR(DM_IOCTL, DM_LIST_VERSIONS_CMD, struct dm_ioctl)
|
||||
|
||||
#define DM_TARGET_MSG _IOWR(DM_IOCTL, DM_TARGET_MSG_CMD, struct dm_ioctl)
|
||||
#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
|
||||
|
||||
#define DM_VERSION_MAJOR 4
|
||||
#define DM_VERSION_MINOR 5
|
||||
#define DM_VERSION_MINOR 6
|
||||
#define DM_VERSION_PATCHLEVEL 0
|
||||
#define DM_VERSION_EXTRA "-ioctl (2005-10-04)"
|
||||
#define DM_VERSION_EXTRA "-ioctl (2006-02-17)"
|
||||
|
||||
/* Status bits */
|
||||
#define DM_READONLY_FLAG (1 << 0) /* In/Out */
|
||||
|
|
|
@ -20,6 +20,8 @@ enum dma_data_direction {
|
|||
#define DMA_31BIT_MASK 0x000000007fffffffULL
|
||||
#define DMA_30BIT_MASK 0x000000003fffffffULL
|
||||
#define DMA_29BIT_MASK 0x000000001fffffffULL
|
||||
#define DMA_28BIT_MASK 0x000000000fffffffULL
|
||||
#define DMA_24BIT_MASK 0x0000000000ffffffULL
|
||||
|
||||
#include <asm/dma-mapping.h>
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ extern char * dmi_get_system_info(int field);
|
|||
extern struct dmi_device * dmi_find_device(int type, const char *name,
|
||||
struct dmi_device *from);
|
||||
extern void dmi_scan_machine(void);
|
||||
extern int dmi_get_year(int field);
|
||||
|
||||
#else
|
||||
|
||||
|
@ -75,6 +76,7 @@ static inline int dmi_check_system(struct dmi_system_id *list) { return 0; }
|
|||
static inline char * dmi_get_system_info(int field) { return NULL; }
|
||||
static inline struct dmi_device * dmi_find_device(int type, const char *name,
|
||||
struct dmi_device *from) { return NULL; }
|
||||
static inline int dmi_get_year(int year) { return 0; }
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -71,17 +71,17 @@
|
|||
|
||||
struct dn_naddr
|
||||
{
|
||||
unsigned short a_len;
|
||||
unsigned char a_addr[DN_MAXADDL];
|
||||
__le16 a_len;
|
||||
__u8 a_addr[DN_MAXADDL]; /* Two bytes little endian */
|
||||
};
|
||||
|
||||
struct sockaddr_dn
|
||||
{
|
||||
unsigned short sdn_family;
|
||||
unsigned char sdn_flags;
|
||||
unsigned char sdn_objnum;
|
||||
unsigned short sdn_objnamel;
|
||||
unsigned char sdn_objname[DN_MAXOBJL];
|
||||
__u16 sdn_family;
|
||||
__u8 sdn_flags;
|
||||
__u8 sdn_objnum;
|
||||
__le16 sdn_objnamel;
|
||||
__u8 sdn_objname[DN_MAXOBJL];
|
||||
struct dn_naddr sdn_add;
|
||||
};
|
||||
#define sdn_nodeaddrl sdn_add.a_len /* Node address length */
|
||||
|
@ -93,38 +93,38 @@ struct sockaddr_dn
|
|||
* DECnet set/get DSO_CONDATA, DSO_DISDATA (optional data) structure
|
||||
*/
|
||||
struct optdata_dn {
|
||||
unsigned short opt_status; /* Extended status return */
|
||||
__le16 opt_status; /* Extended status return */
|
||||
#define opt_sts opt_status
|
||||
unsigned short opt_optl; /* Length of user data */
|
||||
unsigned char opt_data[16]; /* User data */
|
||||
__le16 opt_optl; /* Length of user data */
|
||||
__u8 opt_data[16]; /* User data */
|
||||
};
|
||||
|
||||
struct accessdata_dn
|
||||
{
|
||||
unsigned char acc_accl;
|
||||
unsigned char acc_acc[DN_MAXACCL];
|
||||
unsigned char acc_passl;
|
||||
unsigned char acc_pass[DN_MAXACCL];
|
||||
unsigned char acc_userl;
|
||||
unsigned char acc_user[DN_MAXACCL];
|
||||
__u8 acc_accl;
|
||||
__u8 acc_acc[DN_MAXACCL];
|
||||
__u8 acc_passl;
|
||||
__u8 acc_pass[DN_MAXACCL];
|
||||
__u8 acc_userl;
|
||||
__u8 acc_user[DN_MAXACCL];
|
||||
};
|
||||
|
||||
/*
|
||||
* DECnet logical link information structure
|
||||
*/
|
||||
struct linkinfo_dn {
|
||||
unsigned short idn_segsize; /* Segment size for link */
|
||||
unsigned char idn_linkstate; /* Logical link state */
|
||||
__le16 idn_segsize; /* Segment size for link */
|
||||
__u8 idn_linkstate; /* Logical link state */
|
||||
};
|
||||
|
||||
/*
|
||||
* Ethernet address format (for DECnet)
|
||||
*/
|
||||
union etheraddress {
|
||||
unsigned char dne_addr[6]; /* Full ethernet address */
|
||||
__u8 dne_addr[6]; /* Full ethernet address */
|
||||
struct {
|
||||
unsigned char dne_hiord[4]; /* DECnet HIORD prefix */
|
||||
unsigned char dne_nodeaddr[2]; /* DECnet node address */
|
||||
__u8 dne_hiord[4]; /* DECnet HIORD prefix */
|
||||
__u8 dne_nodeaddr[2]; /* DECnet node address */
|
||||
} dne_remote;
|
||||
};
|
||||
|
||||
|
@ -133,7 +133,7 @@ union etheraddress {
|
|||
* DECnet physical socket address format
|
||||
*/
|
||||
struct dn_addr {
|
||||
unsigned short dna_family; /* AF_DECnet */
|
||||
__le16 dna_family; /* AF_DECnet */
|
||||
union etheraddress dna_netaddr; /* DECnet ethernet address */
|
||||
};
|
||||
|
||||
|
|
|
@ -121,4 +121,17 @@ typedef uint16_t audio_attributes_t;
|
|||
#define AUDIO_SET_ATTRIBUTES _IOW('o', 17, audio_attributes_t)
|
||||
#define AUDIO_SET_KARAOKE _IOW('o', 18, audio_karaoke_t)
|
||||
|
||||
/**
|
||||
* AUDIO_GET_PTS
|
||||
*
|
||||
* Read the 33 bit presentation time stamp as defined
|
||||
* in ITU T-REC-H.222.0 / ISO/IEC 13818-1.
|
||||
*
|
||||
* The PTS should belong to the currently played
|
||||
* frame if possible, but may also be a value close to it
|
||||
* like the PTS of the last decoded frame or the last PTS
|
||||
* extracted by the PES parser.
|
||||
*/
|
||||
#define AUDIO_GET_PTS _IOR('o', 19, __u64)
|
||||
|
||||
#endif /* _DVBAUDIO_H_ */
|
||||
|
|
|
@ -200,4 +200,17 @@ typedef uint16_t video_attributes_t;
|
|||
#define VIDEO_GET_SIZE _IOR('o', 55, video_size_t)
|
||||
#define VIDEO_GET_FRAME_RATE _IOR('o', 56, unsigned int)
|
||||
|
||||
/**
|
||||
* VIDEO_GET_PTS
|
||||
*
|
||||
* Read the 33 bit presentation time stamp as defined
|
||||
* in ITU T-REC-H.222.0 / ISO/IEC 13818-1.
|
||||
*
|
||||
* The PTS should belong to the currently played
|
||||
* frame if possible, but may also be a value close to it
|
||||
* like the PTS of the last decoded frame or the last PTS
|
||||
* extracted by the PES parser.
|
||||
*/
|
||||
#define VIDEO_GET_PTS _IOR('o', 57, __u64)
|
||||
|
||||
#endif /*_DVBVIDEO_H_*/
|
||||
|
|
|
@ -240,19 +240,21 @@ struct efi_memory_map {
|
|||
unsigned long desc_size;
|
||||
};
|
||||
|
||||
#define EFI_INVALID_TABLE_ADDR (~0UL)
|
||||
|
||||
/*
|
||||
* All runtime access to EFI goes through this structure:
|
||||
*/
|
||||
extern struct efi {
|
||||
efi_system_table_t *systab; /* EFI system table */
|
||||
void *mps; /* MPS table */
|
||||
void *acpi; /* ACPI table (IA64 ext 0.71) */
|
||||
void *acpi20; /* ACPI table (ACPI 2.0) */
|
||||
void *smbios; /* SM BIOS table */
|
||||
void *sal_systab; /* SAL system table */
|
||||
void *boot_info; /* boot info table */
|
||||
void *hcdp; /* HCDP table */
|
||||
void *uga; /* UGA table */
|
||||
unsigned long mps; /* MPS table */
|
||||
unsigned long acpi; /* ACPI table (IA64 ext 0.71) */
|
||||
unsigned long acpi20; /* ACPI table (ACPI 2.0) */
|
||||
unsigned long smbios; /* SM BIOS table */
|
||||
unsigned long sal_systab; /* SAL system table */
|
||||
unsigned long boot_info; /* boot info table */
|
||||
unsigned long hcdp; /* HCDP table */
|
||||
unsigned long uga; /* UGA table */
|
||||
efi_get_time_t *get_time;
|
||||
efi_set_time_t *set_time;
|
||||
efi_get_wakeup_time_t *get_wakeup_time;
|
||||
|
@ -292,6 +294,8 @@ extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if pos
|
|||
extern u64 efi_get_iobase (void);
|
||||
extern u32 efi_mem_type (unsigned long phys_addr);
|
||||
extern u64 efi_mem_attributes (unsigned long phys_addr);
|
||||
extern int efi_mem_attribute_range (unsigned long phys_addr, unsigned long size,
|
||||
u64 attr);
|
||||
extern int __init efi_uart_console_only (void);
|
||||
extern void efi_initialize_iomem_resources(struct resource *code_resource,
|
||||
struct resource *data_resource);
|
||||
|
|
|
@ -37,7 +37,7 @@ static inline struct efs_sb_info *SUPER_INFO(struct super_block *sb)
|
|||
struct statfs;
|
||||
|
||||
extern struct inode_operations efs_dir_inode_operations;
|
||||
extern struct file_operations efs_dir_operations;
|
||||
extern const struct file_operations efs_dir_operations;
|
||||
extern struct address_space_operations efs_symlink_aops;
|
||||
|
||||
extern void efs_read_inode(struct inode *);
|
||||
|
|
|
@ -48,10 +48,17 @@ struct elevator_ops
|
|||
|
||||
elevator_init_fn *elevator_init_fn;
|
||||
elevator_exit_fn *elevator_exit_fn;
|
||||
void (*trim)(struct io_context *);
|
||||
};
|
||||
|
||||
#define ELV_NAME_MAX (16)
|
||||
|
||||
struct elv_fs_entry {
|
||||
struct attribute attr;
|
||||
ssize_t (*show)(elevator_t *, char *);
|
||||
ssize_t (*store)(elevator_t *, const char *, size_t);
|
||||
};
|
||||
|
||||
/*
|
||||
* identifies an elevator type, such as AS or deadline
|
||||
*/
|
||||
|
@ -60,7 +67,7 @@ struct elevator_type
|
|||
struct list_head list;
|
||||
struct elevator_ops ops;
|
||||
struct elevator_type *elevator_type;
|
||||
struct kobj_type *elevator_ktype;
|
||||
struct elv_fs_entry *elevator_attrs;
|
||||
char elevator_name[ELV_NAME_MAX];
|
||||
struct module *elevator_owner;
|
||||
};
|
||||
|
@ -74,6 +81,7 @@ struct elevator_queue
|
|||
void *elevator_data;
|
||||
struct kobject kobj;
|
||||
struct elevator_type *elevator_type;
|
||||
struct mutex sysfs_lock;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -52,7 +52,12 @@ struct file;
|
|||
#ifdef CONFIG_EPOLL
|
||||
|
||||
/* Used to initialize the epoll bits inside the "struct file" */
|
||||
void eventpoll_init_file(struct file *file);
|
||||
static inline void eventpoll_init_file(struct file *file)
|
||||
{
|
||||
INIT_LIST_HEAD(&file->f_ep_links);
|
||||
spin_lock_init(&file->f_ep_lock);
|
||||
}
|
||||
|
||||
|
||||
/* Used to release the epoll bits inside the "struct file" */
|
||||
void eventpoll_release_file(struct file *file);
|
||||
|
@ -85,7 +90,6 @@ static inline void eventpoll_release(struct file *file)
|
|||
eventpoll_release_file(file);
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
|
||||
static inline void eventpoll_init_file(struct file *file) {}
|
||||
|
|
|
@ -36,7 +36,8 @@ struct statfs;
|
|||
* Define EXT3_RESERVATION to reserve data blocks for expanding files
|
||||
*/
|
||||
#define EXT3_DEFAULT_RESERVE_BLOCKS 8
|
||||
#define EXT3_MAX_RESERVE_BLOCKS 1024
|
||||
/*max window size: 1024(direct blocks) + 3([t,d]indirect blocks) */
|
||||
#define EXT3_MAX_RESERVE_BLOCKS 1027
|
||||
#define EXT3_RESERVE_WINDOW_NOT_ALLOCATED 0
|
||||
/*
|
||||
* Always enable hashed directories
|
||||
|
@ -732,6 +733,8 @@ struct dir_private_info {
|
|||
extern int ext3_bg_has_super(struct super_block *sb, int group);
|
||||
extern unsigned long ext3_bg_num_gdb(struct super_block *sb, int group);
|
||||
extern int ext3_new_block (handle_t *, struct inode *, unsigned long, int *);
|
||||
extern int ext3_new_blocks (handle_t *, struct inode *, unsigned long,
|
||||
unsigned long *, int *);
|
||||
extern void ext3_free_blocks (handle_t *, struct inode *, unsigned long,
|
||||
unsigned long);
|
||||
extern void ext3_free_blocks_sb (handle_t *, struct super_block *,
|
||||
|
@ -772,9 +775,12 @@ extern unsigned long ext3_count_free (struct buffer_head *, unsigned);
|
|||
|
||||
|
||||
/* inode.c */
|
||||
extern int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int);
|
||||
extern struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *);
|
||||
extern struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *);
|
||||
int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int);
|
||||
struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *);
|
||||
struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *);
|
||||
int ext3_get_blocks_handle(handle_t *handle, struct inode *inode,
|
||||
sector_t iblock, unsigned long maxblocks, struct buffer_head *bh_result,
|
||||
int create, int extend_disksize);
|
||||
|
||||
extern void ext3_read_inode (struct inode *);
|
||||
extern int ext3_write_inode (struct inode *, int);
|
||||
|
@ -827,11 +833,11 @@ do { \
|
|||
*/
|
||||
|
||||
/* dir.c */
|
||||
extern struct file_operations ext3_dir_operations;
|
||||
extern const struct file_operations ext3_dir_operations;
|
||||
|
||||
/* file.c */
|
||||
extern struct inode_operations ext3_file_inode_operations;
|
||||
extern struct file_operations ext3_file_operations;
|
||||
extern const struct file_operations ext3_file_operations;
|
||||
|
||||
/* namei.c */
|
||||
extern struct inode_operations ext3_dir_inode_operations;
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <linux/rwsem.h>
|
||||
#include <linux/rbtree.h>
|
||||
#include <linux/seqlock.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
struct ext3_reserve_window {
|
||||
__u32 _rsv_start; /* First byte reserved */
|
||||
|
@ -122,16 +123,16 @@ struct ext3_inode_info {
|
|||
__u16 i_extra_isize;
|
||||
|
||||
/*
|
||||
* truncate_sem is for serialising ext3_truncate() against
|
||||
* truncate_mutex is for serialising ext3_truncate() against
|
||||
* ext3_getblock(). In the 2.4 ext2 design, great chunks of inode's
|
||||
* data tree are chopped off during truncate. We can't do that in
|
||||
* ext3 because whenever we perform intermediate commits during
|
||||
* truncate, the inode and all the metadata blocks *must* be in a
|
||||
* consistent state which allows truncation of the orphans to restart
|
||||
* during recovery. Hence we must fix the get_block-vs-truncate race
|
||||
* by other means, so we have truncate_sem.
|
||||
* by other means, so we have truncate_mutex.
|
||||
*/
|
||||
struct semaphore truncate_sem;
|
||||
struct mutex truncate_mutex;
|
||||
struct inode vfs_inode;
|
||||
};
|
||||
|
||||
|
|
|
@ -734,7 +734,7 @@ struct fb_tile_ops {
|
|||
|
||||
/* A driver may set this flag to indicate that it does want a set_par to be
|
||||
* called every time when fbcon_switch is executed. The advantage is that with
|
||||
* this flag set you can really be shure that set_par is always called before
|
||||
* this flag set you can really be sure that set_par is always called before
|
||||
* any of the functions dependant on the correct hardware state or altering
|
||||
* that state, even if you are using some broken X releases. The disadvantage
|
||||
* is that it introduces unwanted delays to every console switch if set_par
|
||||
|
@ -839,12 +839,10 @@ struct fb_info {
|
|||
#define FB_LEFT_POS(bpp) (32 - bpp)
|
||||
#define FB_SHIFT_HIGH(val, bits) ((val) >> (bits))
|
||||
#define FB_SHIFT_LOW(val, bits) ((val) << (bits))
|
||||
#define FB_BIT_NR(b) (7 - (b))
|
||||
#else
|
||||
#define FB_LEFT_POS(bpp) (0)
|
||||
#define FB_SHIFT_HIGH(val, bits) ((val) << (bits))
|
||||
#define FB_SHIFT_LOW(val, bits) ((val) >> (bits))
|
||||
#define FB_BIT_NR(b) (b)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <linux/compiler.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/rcupdate.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
/*
|
||||
* The default fd array needs to be at least BITS_PER_LONG,
|
||||
|
@ -17,10 +18,22 @@
|
|||
*/
|
||||
#define NR_OPEN_DEFAULT BITS_PER_LONG
|
||||
|
||||
/*
|
||||
* The embedded_fd_set is a small fd_set,
|
||||
* suitable for most tasks (which open <= BITS_PER_LONG files)
|
||||
*/
|
||||
struct embedded_fd_set {
|
||||
unsigned long fds_bits[1];
|
||||
};
|
||||
|
||||
/*
|
||||
* More than this number of fds: we use a separately allocated fd_set
|
||||
*/
|
||||
#define EMBEDDED_FD_SET_SIZE (BITS_PER_BYTE * sizeof(struct embedded_fd_set))
|
||||
|
||||
struct fdtable {
|
||||
unsigned int max_fds;
|
||||
int max_fdset;
|
||||
int next_fd;
|
||||
struct file ** fd; /* current fd array */
|
||||
fd_set *close_on_exec;
|
||||
fd_set *open_fds;
|
||||
|
@ -33,13 +46,20 @@ struct fdtable {
|
|||
* Open file table structure
|
||||
*/
|
||||
struct files_struct {
|
||||
/*
|
||||
* read mostly part
|
||||
*/
|
||||
atomic_t count;
|
||||
struct fdtable *fdt;
|
||||
struct fdtable fdtab;
|
||||
fd_set close_on_exec_init;
|
||||
fd_set open_fds_init;
|
||||
/*
|
||||
* written part on a separate cache line in SMP
|
||||
*/
|
||||
spinlock_t file_lock ____cacheline_aligned_in_smp;
|
||||
int next_fd;
|
||||
struct embedded_fd_set close_on_exec_init;
|
||||
struct embedded_fd_set open_fds_init;
|
||||
struct file * fd_array[NR_OPEN_DEFAULT];
|
||||
spinlock_t file_lock; /* Protects concurrent writers. Nests inside tsk->alloc_lock */
|
||||
};
|
||||
|
||||
#define files_fdtable(files) (rcu_dereference((files)->fdt))
|
||||
|
|
|
@ -65,6 +65,11 @@ extern int dir_notify_enable;
|
|||
#define FMODE_PREAD 8
|
||||
#define FMODE_PWRITE FMODE_PREAD /* These go hand in hand */
|
||||
|
||||
/* File is being opened for execution. Primary users of this flag are
|
||||
distributed filesystems that can use it to achieve correct ETXTBUSY
|
||||
behavior for cross-node execution/opening_for_writing of files */
|
||||
#define FMODE_EXEC 16
|
||||
|
||||
#define RW_MASK 1
|
||||
#define RWA_MASK 2
|
||||
#define READ 0
|
||||
|
@ -103,7 +108,9 @@ extern int dir_notify_enable;
|
|||
#define MS_BIND 4096
|
||||
#define MS_MOVE 8192
|
||||
#define MS_REC 16384
|
||||
#define MS_VERBOSE 32768
|
||||
#define MS_VERBOSE 32768 /* War is peace. Verbosity is silence.
|
||||
MS_VERBOSE is deprecated. */
|
||||
#define MS_SILENT 32768
|
||||
#define MS_POSIXACL (1<<16) /* VFS does not apply the umask */
|
||||
#define MS_UNBINDABLE (1<<17) /* change to unbindable */
|
||||
#define MS_PRIVATE (1<<18) /* change to private */
|
||||
|
@ -197,6 +204,10 @@ extern int dir_notify_enable;
|
|||
#define BLKBSZGET _IOR(0x12,112,size_t)
|
||||
#define BLKBSZSET _IOW(0x12,113,size_t)
|
||||
#define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size in bytes (u64 *arg) */
|
||||
#define BLKTRACESETUP _IOWR(0x12,115,struct blk_user_trace_setup)
|
||||
#define BLKTRACESTART _IO(0x12,116)
|
||||
#define BLKTRACESTOP _IO(0x12,117)
|
||||
#define BLKTRACETEARDOWN _IO(0x12,118)
|
||||
|
||||
#define BMAP_IOCTL 1 /* obsolete - kept for compatibility */
|
||||
#define FIBMAP _IO(0x00,1) /* bmap access */
|
||||
|
@ -241,9 +252,6 @@ extern void __init files_init(unsigned long);
|
|||
struct buffer_head;
|
||||
typedef int (get_block_t)(struct inode *inode, sector_t iblock,
|
||||
struct buffer_head *bh_result, int create);
|
||||
typedef int (get_blocks_t)(struct inode *inode, sector_t iblock,
|
||||
unsigned long max_blocks,
|
||||
struct buffer_head *bh_result, int create);
|
||||
typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
|
||||
ssize_t bytes, void *private);
|
||||
|
||||
|
@ -339,12 +347,12 @@ struct writeback_control;
|
|||
struct address_space_operations {
|
||||
int (*writepage)(struct page *page, struct writeback_control *wbc);
|
||||
int (*readpage)(struct file *, struct page *);
|
||||
int (*sync_page)(struct page *);
|
||||
void (*sync_page)(struct page *);
|
||||
|
||||
/* Write back some dirty pages from this mapping. */
|
||||
int (*writepages)(struct address_space *, struct writeback_control *);
|
||||
|
||||
/* Set a page dirty */
|
||||
/* Set a page dirty. Return true if this dirtied it */
|
||||
int (*set_page_dirty)(struct page *page);
|
||||
|
||||
int (*readpages)(struct file *filp, struct address_space *mapping,
|
||||
|
@ -358,7 +366,7 @@ struct address_space_operations {
|
|||
int (*commit_write)(struct file *, struct page *, unsigned, unsigned);
|
||||
/* Unfortunately this kludge is needed for FIBMAP. Don't use it */
|
||||
sector_t (*bmap)(struct address_space *, sector_t);
|
||||
int (*invalidatepage) (struct page *, unsigned long);
|
||||
void (*invalidatepage) (struct page *, unsigned long);
|
||||
int (*releasepage) (struct page *, gfp_t);
|
||||
ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
|
||||
loff_t offset, unsigned long nr_segs);
|
||||
|
@ -397,11 +405,14 @@ struct block_device {
|
|||
dev_t bd_dev; /* not a kdev_t - it's a search key */
|
||||
struct inode * bd_inode; /* will die */
|
||||
int bd_openers;
|
||||
struct semaphore bd_sem; /* open/close mutex */
|
||||
struct semaphore bd_mount_sem; /* mount mutex */
|
||||
struct mutex bd_mutex; /* open/close mutex */
|
||||
struct mutex bd_mount_mutex; /* mount mutex */
|
||||
struct list_head bd_inodes;
|
||||
void * bd_holder;
|
||||
int bd_holders;
|
||||
#ifdef CONFIG_SYSFS
|
||||
struct list_head bd_holder_list;
|
||||
#endif
|
||||
struct block_device * bd_contains;
|
||||
unsigned bd_block_size;
|
||||
struct hd_struct * bd_part;
|
||||
|
@ -479,13 +490,13 @@ struct inode {
|
|||
unsigned int i_blkbits;
|
||||
unsigned long i_blksize;
|
||||
unsigned long i_version;
|
||||
unsigned long i_blocks;
|
||||
blkcnt_t i_blocks;
|
||||
unsigned short i_bytes;
|
||||
spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */
|
||||
struct mutex i_mutex;
|
||||
struct rw_semaphore i_alloc_sem;
|
||||
struct inode_operations *i_op;
|
||||
struct file_operations *i_fop; /* former ->i_op->default_file_ops */
|
||||
const struct file_operations *i_fop; /* former ->i_op->default_file_ops */
|
||||
struct super_block *i_sb;
|
||||
struct file_lock *i_flock;
|
||||
struct address_space *i_mapping;
|
||||
|
@ -509,7 +520,7 @@ struct inode {
|
|||
|
||||
#ifdef CONFIG_INOTIFY
|
||||
struct list_head inotify_watches; /* watches on this inode */
|
||||
struct semaphore inotify_sem; /* protects the watches list */
|
||||
struct mutex inotify_mutex; /* protects the watches list */
|
||||
#endif
|
||||
|
||||
unsigned long i_state;
|
||||
|
@ -625,7 +636,7 @@ struct file {
|
|||
} f_u;
|
||||
struct dentry *f_dentry;
|
||||
struct vfsmount *f_vfsmnt;
|
||||
struct file_operations *f_op;
|
||||
const struct file_operations *f_op;
|
||||
atomic_t f_count;
|
||||
unsigned int f_flags;
|
||||
mode_t f_mode;
|
||||
|
@ -667,7 +678,6 @@ extern spinlock_t files_lock;
|
|||
#define FL_POSIX 1
|
||||
#define FL_FLOCK 2
|
||||
#define FL_ACCESS 8 /* not trying to lock, just looking */
|
||||
#define FL_LOCKD 16 /* lock held by rpc.lockd */
|
||||
#define FL_LEASE 32 /* lease held on this file */
|
||||
#define FL_SLEEP 128 /* A blocking lock */
|
||||
|
||||
|
@ -731,8 +741,6 @@ struct file_lock {
|
|||
#define OFFT_OFFSET_MAX INT_LIMIT(off_t)
|
||||
#endif
|
||||
|
||||
extern struct list_head file_lock_list;
|
||||
|
||||
#include <linux/fcntl.h>
|
||||
|
||||
extern int fcntl_getlk(struct file *, struct flock __user *);
|
||||
|
@ -749,15 +757,22 @@ extern void send_sigio(struct fown_struct *fown, int fd, int band);
|
|||
extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg);
|
||||
extern int fcntl_getlease(struct file *filp);
|
||||
|
||||
/* fs/sync.c */
|
||||
#define SYNC_FILE_RANGE_WAIT_BEFORE 1
|
||||
#define SYNC_FILE_RANGE_WRITE 2
|
||||
#define SYNC_FILE_RANGE_WAIT_AFTER 4
|
||||
extern int do_sync_file_range(struct file *file, loff_t offset, loff_t endbyte,
|
||||
int flags);
|
||||
|
||||
/* fs/locks.c */
|
||||
extern void locks_init_lock(struct file_lock *);
|
||||
extern void locks_copy_lock(struct file_lock *, struct file_lock *);
|
||||
extern void locks_remove_posix(struct file *, fl_owner_t);
|
||||
extern void locks_remove_flock(struct file *);
|
||||
extern struct file_lock *posix_test_lock(struct file *, struct file_lock *);
|
||||
extern int posix_test_lock(struct file *, struct file_lock *, struct file_lock *);
|
||||
extern int posix_lock_file_conf(struct file *, struct file_lock *, struct file_lock *);
|
||||
extern int posix_lock_file(struct file *, struct file_lock *);
|
||||
extern int posix_lock_file_wait(struct file *, struct file_lock *);
|
||||
extern void posix_block_lock(struct file_lock *, struct file_lock *);
|
||||
extern int posix_unblock_lock(struct file *, struct file_lock *);
|
||||
extern int posix_locks_deadlock(struct file_lock *, struct file_lock *);
|
||||
extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl);
|
||||
|
@ -847,7 +862,7 @@ struct super_block {
|
|||
* The next field is for VFS *only*. No filesystems have any business
|
||||
* even looking at it. You had been warned.
|
||||
*/
|
||||
struct semaphore s_vfs_rename_sem; /* Kludge */
|
||||
struct mutex s_vfs_rename_mutex; /* Kludge */
|
||||
|
||||
/* Granuality of c/m/atime in ns.
|
||||
Cannot be worse than a second */
|
||||
|
@ -1024,6 +1039,8 @@ struct file_operations {
|
|||
int (*check_flags)(int);
|
||||
int (*dir_notify)(struct file *filp, unsigned long arg);
|
||||
int (*flock) (struct file *, int, struct file_lock *);
|
||||
ssize_t (*splice_write)(struct inode *, struct file *, size_t, unsigned int);
|
||||
ssize_t (*splice_read)(struct file *, struct inode *, size_t, unsigned int);
|
||||
};
|
||||
|
||||
struct inode_operations {
|
||||
|
@ -1086,6 +1103,7 @@ struct super_operations {
|
|||
void (*umount_begin) (struct super_block *);
|
||||
|
||||
int (*show_options)(struct seq_file *, struct vfsmount *);
|
||||
int (*show_stats)(struct seq_file *, struct vfsmount *);
|
||||
|
||||
ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
|
||||
ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
|
||||
|
@ -1115,6 +1133,18 @@ static inline void mark_inode_dirty_sync(struct inode *inode)
|
|||
__mark_inode_dirty(inode, I_DIRTY_SYNC);
|
||||
}
|
||||
|
||||
static inline void inode_inc_link_count(struct inode *inode)
|
||||
{
|
||||
inode->i_nlink++;
|
||||
mark_inode_dirty(inode);
|
||||
}
|
||||
|
||||
static inline void inode_dec_link_count(struct inode *inode)
|
||||
{
|
||||
inode->i_nlink--;
|
||||
mark_inode_dirty(inode);
|
||||
}
|
||||
|
||||
extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry);
|
||||
static inline void file_accessed(struct file *file)
|
||||
{
|
||||
|
@ -1369,11 +1399,11 @@ extern void bd_set_size(struct block_device *, loff_t size);
|
|||
extern void bd_forget(struct inode *inode);
|
||||
extern void bdput(struct block_device *);
|
||||
extern struct block_device *open_by_devnum(dev_t, unsigned);
|
||||
extern struct file_operations def_blk_fops;
|
||||
extern const struct file_operations def_blk_fops;
|
||||
extern struct address_space_operations def_blk_aops;
|
||||
extern struct file_operations def_chr_fops;
|
||||
extern struct file_operations bad_sock_fops;
|
||||
extern struct file_operations def_fifo_fops;
|
||||
extern const struct file_operations def_chr_fops;
|
||||
extern const struct file_operations bad_sock_fops;
|
||||
extern const struct file_operations def_fifo_fops;
|
||||
extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long);
|
||||
extern int blkdev_ioctl(struct inode *, struct file *, unsigned, unsigned long);
|
||||
extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long);
|
||||
|
@ -1381,34 +1411,34 @@ extern int blkdev_get(struct block_device *, mode_t, unsigned);
|
|||
extern int blkdev_put(struct block_device *);
|
||||
extern int bd_claim(struct block_device *, void *);
|
||||
extern void bd_release(struct block_device *);
|
||||
#ifdef CONFIG_SYSFS
|
||||
extern int bd_claim_by_disk(struct block_device *, void *, struct gendisk *);
|
||||
extern void bd_release_from_disk(struct block_device *, struct gendisk *);
|
||||
#else
|
||||
#define bd_claim_by_disk(bdev, holder, disk) bd_claim(bdev, holder)
|
||||
#define bd_release_from_disk(bdev, disk) bd_release(bdev)
|
||||
#endif
|
||||
|
||||
/* fs/char_dev.c */
|
||||
#define CHRDEV_MAJOR_HASH_SIZE 255
|
||||
extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *);
|
||||
extern int register_chrdev_region(dev_t, unsigned, const char *);
|
||||
extern int register_chrdev(unsigned int, const char *,
|
||||
struct file_operations *);
|
||||
const struct file_operations *);
|
||||
extern int unregister_chrdev(unsigned int, const char *);
|
||||
extern void unregister_chrdev_region(dev_t, unsigned);
|
||||
extern int chrdev_open(struct inode *, struct file *);
|
||||
extern int get_chrdev_list(char *);
|
||||
extern void *acquire_chrdev_list(void);
|
||||
extern int count_chrdev_list(void);
|
||||
extern void *get_next_chrdev(void *);
|
||||
extern int get_chrdev_info(void *, int *, char **);
|
||||
extern void release_chrdev_list(void *);
|
||||
extern void chrdev_show(struct seq_file *,off_t);
|
||||
|
||||
/* fs/block_dev.c */
|
||||
#define BLKDEV_MAJOR_HASH_SIZE 255
|
||||
#define BDEVNAME_SIZE 32 /* Largest string for a blockdev identifier */
|
||||
extern const char *__bdevname(dev_t, char *buffer);
|
||||
extern const char *bdevname(struct block_device *bdev, char *buffer);
|
||||
extern struct block_device *lookup_bdev(const char *);
|
||||
extern struct block_device *open_bdev_excl(const char *, int, void *);
|
||||
extern void close_bdev_excl(struct block_device *);
|
||||
extern void *acquire_blkdev_list(void);
|
||||
extern int count_blkdev_list(void);
|
||||
extern void *get_next_blkdev(void *);
|
||||
extern int get_blkdev_info(void *, int *, char **);
|
||||
extern void release_blkdev_list(void *);
|
||||
extern void blkdev_show(struct seq_file *,off_t);
|
||||
|
||||
extern void init_special_inode(struct inode *, umode_t, dev_t);
|
||||
|
||||
|
@ -1416,9 +1446,9 @@ extern void init_special_inode(struct inode *, umode_t, dev_t);
|
|||
extern void make_bad_inode(struct inode *);
|
||||
extern int is_bad_inode(struct inode *);
|
||||
|
||||
extern struct file_operations read_fifo_fops;
|
||||
extern struct file_operations write_fifo_fops;
|
||||
extern struct file_operations rdwr_fifo_fops;
|
||||
extern const struct file_operations read_fifo_fops;
|
||||
extern const struct file_operations write_fifo_fops;
|
||||
extern const struct file_operations rdwr_fifo_fops;
|
||||
|
||||
extern int fs_may_remount_ro(struct super_block *);
|
||||
|
||||
|
@ -1455,6 +1485,12 @@ extern int filemap_fdatawait(struct address_space *);
|
|||
extern int filemap_write_and_wait(struct address_space *mapping);
|
||||
extern int filemap_write_and_wait_range(struct address_space *mapping,
|
||||
loff_t lstart, loff_t lend);
|
||||
extern int wait_on_page_writeback_range(struct address_space *mapping,
|
||||
pgoff_t start, pgoff_t end);
|
||||
extern int __filemap_fdatawrite_range(struct address_space *mapping,
|
||||
loff_t start, loff_t end, int sync_mode);
|
||||
|
||||
extern long do_fsync(struct file *file, int datasync);
|
||||
extern void sync_supers(void);
|
||||
extern void sync_filesystems(int wait);
|
||||
extern void emergency_sync(void);
|
||||
|
@ -1534,7 +1570,6 @@ extern void destroy_inode(struct inode *);
|
|||
extern struct inode *new_inode(struct super_block *);
|
||||
extern int remove_suid(struct dentry *);
|
||||
extern void remove_dquot_ref(struct super_block *, int, struct list_head *);
|
||||
extern struct semaphore iprune_sem;
|
||||
|
||||
extern void __insert_inode_hash(struct inode *, unsigned long hashval);
|
||||
extern void remove_inode_hash(struct inode *);
|
||||
|
@ -1576,6 +1611,8 @@ extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor
|
|||
extern void do_generic_mapping_read(struct address_space *mapping,
|
||||
struct file_ra_state *, struct file *,
|
||||
loff_t *, read_descriptor_t *, read_actor_t);
|
||||
extern ssize_t generic_file_splice_read(struct file *, struct inode *, size_t, unsigned int);
|
||||
extern ssize_t generic_file_splice_write(struct inode *, struct file *, size_t, unsigned int);
|
||||
extern void
|
||||
file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
|
||||
extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov,
|
||||
|
@ -1619,7 +1656,7 @@ static inline void do_generic_file_read(struct file * filp, loff_t *ppos,
|
|||
|
||||
ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
|
||||
struct block_device *bdev, const struct iovec *iov, loff_t offset,
|
||||
unsigned long nr_segs, get_blocks_t get_blocks, dio_iodone_t end_io,
|
||||
unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io,
|
||||
int lock_type);
|
||||
|
||||
enum {
|
||||
|
@ -1630,32 +1667,32 @@ enum {
|
|||
|
||||
static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb,
|
||||
struct inode *inode, struct block_device *bdev, const struct iovec *iov,
|
||||
loff_t offset, unsigned long nr_segs, get_blocks_t get_blocks,
|
||||
loff_t offset, unsigned long nr_segs, get_block_t get_block,
|
||||
dio_iodone_t end_io)
|
||||
{
|
||||
return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
|
||||
nr_segs, get_blocks, end_io, DIO_LOCKING);
|
||||
nr_segs, get_block, end_io, DIO_LOCKING);
|
||||
}
|
||||
|
||||
static inline ssize_t blockdev_direct_IO_no_locking(int rw, struct kiocb *iocb,
|
||||
struct inode *inode, struct block_device *bdev, const struct iovec *iov,
|
||||
loff_t offset, unsigned long nr_segs, get_blocks_t get_blocks,
|
||||
loff_t offset, unsigned long nr_segs, get_block_t get_block,
|
||||
dio_iodone_t end_io)
|
||||
{
|
||||
return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
|
||||
nr_segs, get_blocks, end_io, DIO_NO_LOCKING);
|
||||
nr_segs, get_block, end_io, DIO_NO_LOCKING);
|
||||
}
|
||||
|
||||
static inline ssize_t blockdev_direct_IO_own_locking(int rw, struct kiocb *iocb,
|
||||
struct inode *inode, struct block_device *bdev, const struct iovec *iov,
|
||||
loff_t offset, unsigned long nr_segs, get_blocks_t get_blocks,
|
||||
loff_t offset, unsigned long nr_segs, get_block_t get_block,
|
||||
dio_iodone_t end_io)
|
||||
{
|
||||
return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
|
||||
nr_segs, get_blocks, end_io, DIO_OWN_LOCKING);
|
||||
nr_segs, get_block, end_io, DIO_OWN_LOCKING);
|
||||
}
|
||||
|
||||
extern struct file_operations generic_ro_fops;
|
||||
extern const struct file_operations generic_ro_fops;
|
||||
|
||||
#define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m))
|
||||
|
||||
|
@ -1711,9 +1748,9 @@ extern int simple_commit_write(struct file *file, struct page *page,
|
|||
|
||||
extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *);
|
||||
extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *);
|
||||
extern struct file_operations simple_dir_operations;
|
||||
extern const struct file_operations simple_dir_operations;
|
||||
extern struct inode_operations simple_dir_inode_operations;
|
||||
struct tree_descr { char *name; struct file_operations *ops; int mode; };
|
||||
struct tree_descr { char *name; const struct file_operations *ops; int mode; };
|
||||
struct dentry *d_alloc_name(struct dentry *, const char *);
|
||||
extern int simple_fill_super(struct super_block *, int, struct tree_descr *);
|
||||
extern int simple_pin_fs(char *name, struct vfsmount **mount, int *count);
|
||||
|
|
|
@ -83,5 +83,32 @@ struct fsl_i2c_platform_data {
|
|||
#define FSL_I2C_DEV_SEPARATE_DFSRR 0x00000001
|
||||
#define FSL_I2C_DEV_CLOCK_5200 0x00000002
|
||||
|
||||
|
||||
enum fsl_usb2_operating_modes {
|
||||
FSL_USB2_MPH_HOST,
|
||||
FSL_USB2_DR_HOST,
|
||||
FSL_USB2_DR_DEVICE,
|
||||
FSL_USB2_DR_OTG,
|
||||
};
|
||||
|
||||
enum fsl_usb2_phy_modes {
|
||||
FSL_USB2_PHY_NONE,
|
||||
FSL_USB2_PHY_ULPI,
|
||||
FSL_USB2_PHY_UTMI,
|
||||
FSL_USB2_PHY_UTMI_WIDE,
|
||||
FSL_USB2_PHY_SERIAL,
|
||||
};
|
||||
|
||||
struct fsl_usb2_platform_data {
|
||||
/* board specific information */
|
||||
enum fsl_usb2_operating_modes operating_mode;
|
||||
enum fsl_usb2_phy_modes phy_mode;
|
||||
unsigned int port_enables;
|
||||
};
|
||||
|
||||
/* Flags in fsl_usb2_mph_platform_data */
|
||||
#define FSL_USB2_PORT0_ENABLED 0x00000001
|
||||
#define FSL_USB2_PORT1_ENABLED 0x00000002
|
||||
|
||||
#endif /* _FSL_DEVICE_H_ */
|
||||
#endif /* __KERNEL__ */
|
||||
|
|
|
@ -15,6 +15,26 @@
|
|||
|
||||
#include <linux/dnotify.h>
|
||||
#include <linux/inotify.h>
|
||||
#include <linux/audit.h>
|
||||
|
||||
/*
|
||||
* fsnotify_d_instantiate - instantiate a dentry for inode
|
||||
* Called with dcache_lock held.
|
||||
*/
|
||||
static inline void fsnotify_d_instantiate(struct dentry *entry,
|
||||
struct inode *inode)
|
||||
{
|
||||
inotify_d_instantiate(entry, inode);
|
||||
}
|
||||
|
||||
/*
|
||||
* fsnotify_d_move - entry has been moved
|
||||
* Called with dcache_lock and entry->d_lock held.
|
||||
*/
|
||||
static inline void fsnotify_d_move(struct dentry *entry)
|
||||
{
|
||||
inotify_d_move(entry);
|
||||
}
|
||||
|
||||
/*
|
||||
* fsnotify_move - file old_name at old_dir was moved to new_name at new_dir
|
||||
|
@ -45,6 +65,8 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
|
|||
if (source) {
|
||||
inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL);
|
||||
}
|
||||
audit_inode_child(old_name, source, old_dir->i_ino);
|
||||
audit_inode_child(new_name, target, new_dir->i_ino);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -70,19 +92,22 @@ static inline void fsnotify_inoderemove(struct inode *inode)
|
|||
/*
|
||||
* fsnotify_create - 'name' was linked in
|
||||
*/
|
||||
static inline void fsnotify_create(struct inode *inode, const char *name)
|
||||
static inline void fsnotify_create(struct inode *inode, struct dentry *dentry)
|
||||
{
|
||||
inode_dir_notify(inode, DN_CREATE);
|
||||
inotify_inode_queue_event(inode, IN_CREATE, 0, name);
|
||||
inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name);
|
||||
audit_inode_child(dentry->d_name.name, dentry->d_inode, inode->i_ino);
|
||||
}
|
||||
|
||||
/*
|
||||
* fsnotify_mkdir - directory 'name' was created
|
||||
*/
|
||||
static inline void fsnotify_mkdir(struct inode *inode, const char *name)
|
||||
static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry)
|
||||
{
|
||||
inode_dir_notify(inode, DN_CREATE);
|
||||
inotify_inode_queue_event(inode, IN_CREATE | IN_ISDIR, 0, name);
|
||||
inotify_inode_queue_event(inode, IN_CREATE | IN_ISDIR, 0,
|
||||
dentry->d_name.name);
|
||||
audit_inode_child(dentry->d_name.name, dentry->d_inode, inode->i_ino);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef _LINUX_FUTEX_H
|
||||
#define _LINUX_FUTEX_H
|
||||
|
||||
#include <linux/sched.h>
|
||||
|
||||
/* Second argument to futex syscall */
|
||||
|
||||
|
||||
|
@ -11,10 +13,97 @@
|
|||
#define FUTEX_CMP_REQUEUE 4
|
||||
#define FUTEX_WAKE_OP 5
|
||||
|
||||
/*
|
||||
* Support for robust futexes: the kernel cleans up held futexes at
|
||||
* thread exit time.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Per-lock list entry - embedded in user-space locks, somewhere close
|
||||
* to the futex field. (Note: user-space uses a double-linked list to
|
||||
* achieve O(1) list add and remove, but the kernel only needs to know
|
||||
* about the forward link)
|
||||
*
|
||||
* NOTE: this structure is part of the syscall ABI, and must not be
|
||||
* changed.
|
||||
*/
|
||||
struct robust_list {
|
||||
struct robust_list __user *next;
|
||||
};
|
||||
|
||||
/*
|
||||
* Per-thread list head:
|
||||
*
|
||||
* NOTE: this structure is part of the syscall ABI, and must only be
|
||||
* changed if the change is first communicated with the glibc folks.
|
||||
* (When an incompatible change is done, we'll increase the structure
|
||||
* size, which glibc will detect)
|
||||
*/
|
||||
struct robust_list_head {
|
||||
/*
|
||||
* The head of the list. Points back to itself if empty:
|
||||
*/
|
||||
struct robust_list list;
|
||||
|
||||
/*
|
||||
* This relative offset is set by user-space, it gives the kernel
|
||||
* the relative position of the futex field to examine. This way
|
||||
* we keep userspace flexible, to freely shape its data-structure,
|
||||
* without hardcoding any particular offset into the kernel:
|
||||
*/
|
||||
long futex_offset;
|
||||
|
||||
/*
|
||||
* The death of the thread may race with userspace setting
|
||||
* up a lock's links. So to handle this race, userspace first
|
||||
* sets this field to the address of the to-be-taken lock,
|
||||
* then does the lock acquire, and then adds itself to the
|
||||
* list, and then clears this field. Hence the kernel will
|
||||
* always have full knowledge of all locks that the thread
|
||||
* _might_ have taken. We check the owner TID in any case,
|
||||
* so only truly owned locks will be handled.
|
||||
*/
|
||||
struct robust_list __user *list_op_pending;
|
||||
};
|
||||
|
||||
/*
|
||||
* Are there any waiters for this robust futex:
|
||||
*/
|
||||
#define FUTEX_WAITERS 0x80000000
|
||||
|
||||
/*
|
||||
* The kernel signals via this bit that a thread holding a futex
|
||||
* has exited without unlocking the futex. The kernel also does
|
||||
* a FUTEX_WAKE on such futexes, after setting the bit, to wake
|
||||
* up any possible waiters:
|
||||
*/
|
||||
#define FUTEX_OWNER_DIED 0x40000000
|
||||
|
||||
/*
|
||||
* The rest of the robust-futex field is for the TID:
|
||||
*/
|
||||
#define FUTEX_TID_MASK 0x3fffffff
|
||||
|
||||
/*
|
||||
* This limit protects against a deliberately circular list.
|
||||
* (Not worth introducing an rlimit for it)
|
||||
*/
|
||||
#define ROBUST_LIST_LIMIT 2048
|
||||
|
||||
long do_futex(unsigned long uaddr, int op, int val,
|
||||
unsigned long timeout, unsigned long uaddr2, int val2,
|
||||
int val3);
|
||||
|
||||
extern int handle_futex_death(u32 __user *uaddr, struct task_struct *curr);
|
||||
|
||||
#ifdef CONFIG_FUTEX
|
||||
extern void exit_robust_list(struct task_struct *curr);
|
||||
#else
|
||||
static inline void exit_robust_list(struct task_struct *curr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#define FUTEX_OP_SET 0 /* *(int *)UADDR2 = OPARG; */
|
||||
#define FUTEX_OP_ADD 1 /* *(int *)UADDR2 += OPARG; */
|
||||
#define FUTEX_OP_OR 2 /* *(int *)UADDR2 |= OPARG; */
|
||||
|
|
|
@ -120,7 +120,7 @@ static inline void gameport_set_name(struct gameport *gameport, const char *name
|
|||
}
|
||||
|
||||
/*
|
||||
* Use the following fucntions to manipulate gameport's per-port
|
||||
* Use the following functions to manipulate gameport's per-port
|
||||
* driver-specific data.
|
||||
*/
|
||||
static inline void *gameport_get_drvdata(struct gameport *gameport)
|
||||
|
@ -134,7 +134,7 @@ static inline void gameport_set_drvdata(struct gameport *gameport, void *data)
|
|||
}
|
||||
|
||||
/*
|
||||
* Use the following fucntions to pin gameport's driver in process context
|
||||
* Use the following functions to pin gameport's driver in process context
|
||||
*/
|
||||
static inline int gameport_pin_driver(struct gameport *gameport)
|
||||
{
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
#ifndef GENERIC_SERIAL_H
|
||||
#define GENERIC_SERIAL_H
|
||||
|
||||
#include <linux/mutex.h>
|
||||
|
||||
struct real_driver {
|
||||
void (*disable_tx_interrupts) (void *);
|
||||
void (*enable_tx_interrupts) (void *);
|
||||
|
@ -34,7 +36,7 @@ struct gs_port {
|
|||
int xmit_head;
|
||||
int xmit_tail;
|
||||
int xmit_cnt;
|
||||
struct semaphore port_write_sem;
|
||||
struct mutex port_write_mutex;
|
||||
int flags;
|
||||
wait_queue_head_t open_wait;
|
||||
wait_queue_head_t close_wait;
|
||||
|
|
|
@ -78,6 +78,7 @@ struct hd_struct {
|
|||
sector_t start_sect;
|
||||
sector_t nr_sects;
|
||||
struct kobject kobj;
|
||||
struct kobject *holder_dir;
|
||||
unsigned ios[2], sectors[2]; /* READs and WRITEs */
|
||||
int policy, partno;
|
||||
};
|
||||
|
@ -89,12 +90,12 @@ struct hd_struct {
|
|||
#define GENHD_FL_SUPPRESS_PARTITION_INFO 32
|
||||
|
||||
struct disk_stats {
|
||||
unsigned sectors[2]; /* READs and WRITEs */
|
||||
unsigned ios[2];
|
||||
unsigned merges[2];
|
||||
unsigned ticks[2];
|
||||
unsigned io_ticks;
|
||||
unsigned time_in_queue;
|
||||
unsigned long sectors[2]; /* READs and WRITEs */
|
||||
unsigned long ios[2];
|
||||
unsigned long merges[2];
|
||||
unsigned long ticks[2];
|
||||
unsigned long io_ticks;
|
||||
unsigned long time_in_queue;
|
||||
};
|
||||
|
||||
struct gendisk {
|
||||
|
@ -114,6 +115,8 @@ struct gendisk {
|
|||
int number; /* more of the same */
|
||||
struct device *driverfs_dev;
|
||||
struct kobject kobj;
|
||||
struct kobject *holder_dir;
|
||||
struct kobject *slave_dir;
|
||||
|
||||
struct timer_rand_state *random;
|
||||
int policy;
|
||||
|
@ -149,22 +152,16 @@ struct disk_attribute {
|
|||
({ \
|
||||
typeof(gendiskp->dkstats->field) res = 0; \
|
||||
int i; \
|
||||
for (i=0; i < NR_CPUS; i++) { \
|
||||
if (!cpu_possible(i)) \
|
||||
continue; \
|
||||
for_each_possible_cpu(i) \
|
||||
res += per_cpu_ptr(gendiskp->dkstats, i)->field; \
|
||||
} \
|
||||
res; \
|
||||
})
|
||||
|
||||
static inline void disk_stat_set_all(struct gendisk *gendiskp, int value) {
|
||||
int i;
|
||||
for (i=0; i < NR_CPUS; i++) {
|
||||
if (cpu_possible(i)) {
|
||||
memset(per_cpu_ptr(gendiskp->dkstats, i), value,
|
||||
sizeof (struct disk_stats));
|
||||
}
|
||||
}
|
||||
for_each_possible_cpu(i)
|
||||
memset(per_cpu_ptr(gendiskp->dkstats, i), value,
|
||||
sizeof (struct disk_stats));
|
||||
}
|
||||
|
||||
#else
|
||||
|
|
32
include/linux/gigaset_dev.h
Normal file
32
include/linux/gigaset_dev.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* interface to user space for the gigaset driver
|
||||
*
|
||||
* Copyright (c) 2004 by Hansjoerg Lipp <hjlipp@web.de>
|
||||
*
|
||||
* =====================================================================
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* =====================================================================
|
||||
* Version: $Id: gigaset_dev.h,v 1.4.4.4 2005/11/21 22:28:09 hjlipp Exp $
|
||||
* =====================================================================
|
||||
*/
|
||||
|
||||
#ifndef GIGASET_INTERFACE_H
|
||||
#define GIGASET_INTERFACE_H
|
||||
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
#define GIGASET_IOCTL 0x47
|
||||
|
||||
#define GIGVER_DRIVER 0
|
||||
#define GIGVER_COMPAT 1
|
||||
#define GIGVER_FWBASE 2
|
||||
|
||||
#define GIGASET_REDIR _IOWR (GIGASET_IOCTL, 0, int)
|
||||
#define GIGASET_CONFIG _IOWR (GIGASET_IOCTL, 1, int)
|
||||
#define GIGASET_BRKCHARS _IOW (GIGASET_IOCTL, 2, unsigned char[6]) //FIXME [6] okay?
|
||||
#define GIGASET_VERSION _IOWR (GIGASET_IOCTL, 3, unsigned[4])
|
||||
|
||||
#endif
|
|
@ -7,6 +7,18 @@
|
|||
|
||||
#include <asm/cacheflush.h>
|
||||
|
||||
#ifndef ARCH_HAS_FLUSH_ANON_PAGE
|
||||
static inline void flush_anon_page(struct page *page, unsigned long vmaddr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE
|
||||
static inline void flush_kernel_dcache_page(struct page *page)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HIGHMEM
|
||||
|
||||
#include <asm/highmem.h>
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include <linux/compiler.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/*
|
||||
* Offsets into HPET Registers
|
||||
*/
|
||||
|
@ -85,22 +87,6 @@ struct hpet {
|
|||
#define Tn_FSB_INT_ADDR_SHIFT (32UL)
|
||||
#define Tn_FSB_INT_VAL_MASK (0x00000000ffffffffULL)
|
||||
|
||||
struct hpet_info {
|
||||
unsigned long hi_ireqfreq; /* Hz */
|
||||
unsigned long hi_flags; /* information */
|
||||
unsigned short hi_hpet;
|
||||
unsigned short hi_timer;
|
||||
};
|
||||
|
||||
#define HPET_INFO_PERIODIC 0x0001 /* timer is periodic */
|
||||
|
||||
#define HPET_IE_ON _IO('h', 0x01) /* interrupt on */
|
||||
#define HPET_IE_OFF _IO('h', 0x02) /* interrupt off */
|
||||
#define HPET_INFO _IOR('h', 0x03, struct hpet_info)
|
||||
#define HPET_EPI _IO('h', 0x04) /* enable periodic */
|
||||
#define HPET_DPI _IO('h', 0x05) /* disable periodic */
|
||||
#define HPET_IRQFREQ _IOW('h', 0x6, unsigned long) /* IRQFREQ usec */
|
||||
|
||||
/*
|
||||
* exported interfaces
|
||||
*/
|
||||
|
@ -133,4 +119,22 @@ int hpet_register(struct hpet_task *, int);
|
|||
int hpet_unregister(struct hpet_task *);
|
||||
int hpet_control(struct hpet_task *, unsigned int, unsigned long);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
struct hpet_info {
|
||||
unsigned long hi_ireqfreq; /* Hz */
|
||||
unsigned long hi_flags; /* information */
|
||||
unsigned short hi_hpet;
|
||||
unsigned short hi_timer;
|
||||
};
|
||||
|
||||
#define HPET_INFO_PERIODIC 0x0001 /* timer is periodic */
|
||||
|
||||
#define HPET_IE_ON _IO('h', 0x01) /* interrupt on */
|
||||
#define HPET_IE_OFF _IO('h', 0x02) /* interrupt off */
|
||||
#define HPET_INFO _IOR('h', 0x03, struct hpet_info)
|
||||
#define HPET_EPI _IO('h', 0x04) /* enable periodic */
|
||||
#define HPET_DPI _IO('h', 0x05) /* disable periodic */
|
||||
#define HPET_IRQFREQ _IOW('h', 0x6, unsigned long) /* IRQFREQ usec */
|
||||
|
||||
#endif /* !__HPET__ */
|
||||
|
|
|
@ -34,15 +34,7 @@ enum hrtimer_restart {
|
|||
HRTIMER_RESTART,
|
||||
};
|
||||
|
||||
/*
|
||||
* Timer states:
|
||||
*/
|
||||
enum hrtimer_state {
|
||||
HRTIMER_INACTIVE, /* Timer is inactive */
|
||||
HRTIMER_EXPIRED, /* Timer is expired */
|
||||
HRTIMER_RUNNING, /* Timer is running the callback function */
|
||||
HRTIMER_PENDING, /* Timer is pending */
|
||||
};
|
||||
#define HRTIMER_INACTIVE ((void *)1UL)
|
||||
|
||||
struct hrtimer_base;
|
||||
|
||||
|
@ -53,9 +45,7 @@ struct hrtimer_base;
|
|||
* @expires: the absolute expiry time in the hrtimers internal
|
||||
* representation. The time is related to the clock on
|
||||
* which the timer is based.
|
||||
* @state: state of the timer
|
||||
* @function: timer expiry callback function
|
||||
* @data: argument for the callback function
|
||||
* @base: pointer to the timer base (per cpu and per clock)
|
||||
*
|
||||
* The hrtimer structure must be initialized by init_hrtimer_#CLOCKTYPE()
|
||||
|
@ -63,23 +53,36 @@ struct hrtimer_base;
|
|||
struct hrtimer {
|
||||
struct rb_node node;
|
||||
ktime_t expires;
|
||||
enum hrtimer_state state;
|
||||
int (*function)(void *);
|
||||
void *data;
|
||||
int (*function)(struct hrtimer *);
|
||||
struct hrtimer_base *base;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct hrtimer_sleeper - simple sleeper structure
|
||||
*
|
||||
* @timer: embedded timer structure
|
||||
* @task: task to wake up
|
||||
*
|
||||
* task is set to NULL, when the timer expires.
|
||||
*/
|
||||
struct hrtimer_sleeper {
|
||||
struct hrtimer timer;
|
||||
struct task_struct *task;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct hrtimer_base - the timer base for a specific clock
|
||||
*
|
||||
* @index: clock type index for per_cpu support when moving a timer
|
||||
* to a base on another cpu.
|
||||
* @lock: lock protecting the base and associated timers
|
||||
* @active: red black tree root node for the active timers
|
||||
* @first: pointer to the timer node which expires first
|
||||
* @resolution: the resolution of the clock, in nanoseconds
|
||||
* @get_time: function to retrieve the current time of the clock
|
||||
* @curr_timer: the timer which is executing a callback right now
|
||||
* @index: clock type index for per_cpu support when moving a timer
|
||||
* to a base on another cpu.
|
||||
* @lock: lock protecting the base and associated timers
|
||||
* @active: red black tree root node for the active timers
|
||||
* @first: pointer to the timer node which expires first
|
||||
* @resolution: the resolution of the clock, in nanoseconds
|
||||
* @get_time: function to retrieve the current time of the clock
|
||||
* @get_sofirq_time: function to retrieve the current time from the softirq
|
||||
* @curr_timer: the timer which is executing a callback right now
|
||||
* @softirq_time: the time when running the hrtimer queue in the softirq
|
||||
*/
|
||||
struct hrtimer_base {
|
||||
clockid_t index;
|
||||
|
@ -88,7 +91,9 @@ struct hrtimer_base {
|
|||
struct rb_node *first;
|
||||
ktime_t resolution;
|
||||
ktime_t (*get_time)(void);
|
||||
ktime_t (*get_softirq_time)(void);
|
||||
struct hrtimer *curr_timer;
|
||||
ktime_t softirq_time;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -122,11 +127,12 @@ extern ktime_t hrtimer_get_next_event(void);
|
|||
|
||||
static inline int hrtimer_active(const struct hrtimer *timer)
|
||||
{
|
||||
return timer->state == HRTIMER_PENDING;
|
||||
return timer->node.rb_parent != HRTIMER_INACTIVE;
|
||||
}
|
||||
|
||||
/* Forward a hrtimer so it expires after now: */
|
||||
extern unsigned long hrtimer_forward(struct hrtimer *timer, ktime_t interval);
|
||||
extern unsigned long
|
||||
hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval);
|
||||
|
||||
/* Precise sleep: */
|
||||
extern long hrtimer_nanosleep(struct timespec *rqtp,
|
||||
|
@ -134,6 +140,9 @@ extern long hrtimer_nanosleep(struct timespec *rqtp,
|
|||
const enum hrtimer_mode mode,
|
||||
const clockid_t clockid);
|
||||
|
||||
extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl,
|
||||
struct task_struct *tsk);
|
||||
|
||||
/* Soft interrupt function to run the hrtimer queues: */
|
||||
extern void hrtimer_run_queues(void);
|
||||
|
||||
|
|
|
@ -20,10 +20,7 @@ void unmap_hugepage_range(struct vm_area_struct *, unsigned long, unsigned long)
|
|||
int hugetlb_prefault(struct address_space *, struct vm_area_struct *);
|
||||
int hugetlb_report_meminfo(char *);
|
||||
int hugetlb_report_node_meminfo(int, char *);
|
||||
int is_hugepage_mem_enough(size_t);
|
||||
unsigned long hugetlb_total_pages(void);
|
||||
struct page *alloc_huge_page(struct vm_area_struct *, unsigned long);
|
||||
void free_huge_page(struct page *);
|
||||
int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
|
||||
unsigned long address, int write_access);
|
||||
|
||||
|
@ -39,18 +36,35 @@ struct page *follow_huge_addr(struct mm_struct *mm, unsigned long address,
|
|||
int write);
|
||||
struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address,
|
||||
pmd_t *pmd, int write);
|
||||
int is_aligned_hugepage_range(unsigned long addr, unsigned long len);
|
||||
int pmd_huge(pmd_t pmd);
|
||||
void hugetlb_change_protection(struct vm_area_struct *vma,
|
||||
unsigned long address, unsigned long end, pgprot_t newprot);
|
||||
|
||||
#ifndef ARCH_HAS_HUGEPAGE_ONLY_RANGE
|
||||
#define is_hugepage_only_range(mm, addr, len) 0
|
||||
#define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) \
|
||||
do { } while (0)
|
||||
#endif
|
||||
|
||||
#ifndef ARCH_HAS_HUGETLB_FREE_PGD_RANGE
|
||||
#define hugetlb_free_pgd_range free_pgd_range
|
||||
#else
|
||||
void hugetlb_free_pgd_range(struct mmu_gather **tlb, unsigned long addr,
|
||||
unsigned long end, unsigned long floor,
|
||||
unsigned long ceiling);
|
||||
#endif
|
||||
|
||||
#ifndef ARCH_HAS_PREPARE_HUGEPAGE_RANGE
|
||||
#define prepare_hugepage_range(addr, len) \
|
||||
is_aligned_hugepage_range(addr, len)
|
||||
/*
|
||||
* If the arch doesn't supply something else, assume that hugepage
|
||||
* size aligned regions are ok without further preparation.
|
||||
*/
|
||||
static inline int prepare_hugepage_range(unsigned long addr, unsigned long len)
|
||||
{
|
||||
if (len & ~HPAGE_MASK)
|
||||
return -EINVAL;
|
||||
if (addr & ~HPAGE_MASK)
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
int prepare_hugepage_range(unsigned long addr, unsigned long len);
|
||||
#endif
|
||||
|
@ -87,20 +101,17 @@ static inline unsigned long hugetlb_total_pages(void)
|
|||
#define copy_hugetlb_page_range(src, dst, vma) ({ BUG(); 0; })
|
||||
#define hugetlb_prefault(mapping, vma) ({ BUG(); 0; })
|
||||
#define unmap_hugepage_range(vma, start, end) BUG()
|
||||
#define is_hugepage_mem_enough(size) 0
|
||||
#define hugetlb_report_meminfo(buf) 0
|
||||
#define hugetlb_report_node_meminfo(n, buf) 0
|
||||
#define follow_huge_pmd(mm, addr, pmd, write) NULL
|
||||
#define is_aligned_hugepage_range(addr, len) 0
|
||||
#define prepare_hugepage_range(addr, len) (-EINVAL)
|
||||
#define pmd_huge(x) 0
|
||||
#define is_hugepage_only_range(mm, addr, len) 0
|
||||
#define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) \
|
||||
do { } while (0)
|
||||
#define alloc_huge_page(vma, addr) ({ NULL; })
|
||||
#define free_huge_page(p) ({ (void)(p); BUG(); })
|
||||
#define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; })
|
||||
#define hugetlb_fault(mm, vma, addr, write) ({ BUG(); 0; })
|
||||
|
||||
#define hugetlb_change_protection(vma, address, end, newprot)
|
||||
|
||||
#ifndef HPAGE_MASK
|
||||
#define HPAGE_MASK PAGE_MASK /* Keep the compiler happy */
|
||||
#define HPAGE_SIZE PAGE_SIZE
|
||||
|
@ -128,6 +139,8 @@ struct hugetlbfs_sb_info {
|
|||
|
||||
struct hugetlbfs_inode_info {
|
||||
struct shared_policy policy;
|
||||
/* Protected by the (global) hugetlb_lock */
|
||||
unsigned long prereserved_hpages;
|
||||
struct inode vfs_inode;
|
||||
};
|
||||
|
||||
|
@ -141,9 +154,13 @@ static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb)
|
|||
return sb->s_fs_info;
|
||||
}
|
||||
|
||||
extern struct file_operations hugetlbfs_file_operations;
|
||||
extern const struct file_operations hugetlbfs_file_operations;
|
||||
extern struct vm_operations_struct hugetlb_vm_ops;
|
||||
struct file *hugetlb_zero_setup(size_t);
|
||||
int hugetlb_extend_reservation(struct hugetlbfs_inode_info *info,
|
||||
unsigned long atleast_hpages);
|
||||
void hugetlb_truncate_reservation(struct hugetlbfs_inode_info *info,
|
||||
unsigned long atmost_hpages);
|
||||
int hugetlb_get_quota(struct address_space *mapping);
|
||||
void hugetlb_put_quota(struct address_space *mapping);
|
||||
|
||||
|
|
|
@ -27,11 +27,13 @@ struct sensor_device_attribute{
|
|||
#define to_sensor_dev_attr(_dev_attr) \
|
||||
container_of(_dev_attr, struct sensor_device_attribute, dev_attr)
|
||||
|
||||
#define SENSOR_DEVICE_ATTR(_name,_mode,_show,_store,_index) \
|
||||
struct sensor_device_attribute sensor_dev_attr_##_name = { \
|
||||
.dev_attr = __ATTR(_name,_mode,_show,_store), \
|
||||
.index = _index, \
|
||||
}
|
||||
#define SENSOR_ATTR(_name, _mode, _show, _store, _index) \
|
||||
{ .dev_attr = __ATTR(_name, _mode, _show, _store), \
|
||||
.index = _index }
|
||||
|
||||
#define SENSOR_DEVICE_ATTR(_name, _mode, _show, _store, _index) \
|
||||
struct sensor_device_attribute sensor_dev_attr_##_name \
|
||||
= SENSOR_ATTR(_name, _mode, _show, _store, _index)
|
||||
|
||||
struct sensor_device_attribute_2 {
|
||||
struct device_attribute dev_attr;
|
||||
|
@ -41,11 +43,13 @@ struct sensor_device_attribute_2 {
|
|||
#define to_sensor_dev_attr_2(_dev_attr) \
|
||||
container_of(_dev_attr, struct sensor_device_attribute_2, dev_attr)
|
||||
|
||||
#define SENSOR_ATTR_2(_name, _mode, _show, _store, _nr, _index) \
|
||||
{ .dev_attr = __ATTR(_name, _mode, _show, _store), \
|
||||
.index = _index, \
|
||||
.nr = _nr }
|
||||
|
||||
#define SENSOR_DEVICE_ATTR_2(_name,_mode,_show,_store,_nr,_index) \
|
||||
struct sensor_device_attribute_2 sensor_dev_attr_##_name = { \
|
||||
.dev_attr = __ATTR(_name,_mode,_show,_store), \
|
||||
.index = _index, \
|
||||
.nr = _nr, \
|
||||
}
|
||||
struct sensor_device_attribute_2 sensor_dev_attr_##_name \
|
||||
= SENSOR_ATTR_2(_name, _mode, _show, _store, _nr, _index)
|
||||
|
||||
#endif /* _LINUX_HWMON_SYSFS_H */
|
||||
|
|
|
@ -108,6 +108,10 @@
|
|||
#define I2C_DRIVERID_UPD64083 78 /* upd64083 video processor */
|
||||
#define I2C_DRIVERID_UPD64031A 79 /* upd64031a video processor */
|
||||
#define I2C_DRIVERID_SAA717X 80 /* saa717x video encoder */
|
||||
#define I2C_DRIVERID_DS1672 81 /* Dallas/Maxim DS1672 RTC */
|
||||
#define I2C_DRIVERID_X1205 82 /* Xicor/Intersil X1205 RTC */
|
||||
#define I2C_DRIVERID_PCF8563 83 /* Philips PCF8563 RTC */
|
||||
#define I2C_DRIVERID_RS5C372 84 /* Ricoh RS5C372 RTC */
|
||||
|
||||
#define I2C_DRIVERID_I2CDEV 900
|
||||
#define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */
|
||||
|
@ -172,7 +176,6 @@
|
|||
#define I2C_HW_B_RIVA 0x010010 /* Riva based graphics cards */
|
||||
#define I2C_HW_B_IOC 0x010011 /* IOC bit-wiggling */
|
||||
#define I2C_HW_B_TSUNA 0x010012 /* DEC Tsunami chipset */
|
||||
#define I2C_HW_B_FRODO 0x010013 /* 2d3D SA-1110 Development Board */
|
||||
#define I2C_HW_B_OMAHA 0x010014 /* Omaha I2C interface (ARM) */
|
||||
#define I2C_HW_B_GUIDE 0x010015 /* Guide bit-basher */
|
||||
#define I2C_HW_B_IXP2000 0x010016 /* GPIO on IXP2000 systems */
|
||||
|
@ -185,6 +188,7 @@
|
|||
#define I2C_HW_B_SAVAGE 0x01001d /* savage framebuffer driver */
|
||||
#define I2C_HW_B_RADEON 0x01001e /* radeon framebuffer driver */
|
||||
#define I2C_HW_B_EM28XX 0x01001f /* em28xx video capture cards */
|
||||
#define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */
|
||||
|
||||
/* --- PCF 8584 based algorithms */
|
||||
#define I2C_HW_P_LP 0x020000 /* Parallel port interface */
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/device.h> /* for struct device */
|
||||
#include <linux/sched.h> /* for completion */
|
||||
#include <asm/semaphore.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
/* --- For i2c-isa ---------------------------------------------------- */
|
||||
|
||||
|
@ -225,8 +225,8 @@ struct i2c_adapter {
|
|||
int (*client_unregister)(struct i2c_client *);
|
||||
|
||||
/* data fields that are valid for all devices */
|
||||
struct semaphore bus_lock;
|
||||
struct semaphore clist_lock;
|
||||
struct mutex bus_lock;
|
||||
struct mutex clist_lock;
|
||||
|
||||
int timeout;
|
||||
int retries;
|
||||
|
|
|
@ -950,9 +950,7 @@ static inline int i2o_pool_alloc(struct i2o_pool *pool, const char *name,
|
|||
if (!pool->slab)
|
||||
goto free_name;
|
||||
|
||||
pool->mempool =
|
||||
mempool_create(min_nr, mempool_alloc_slab, mempool_free_slab,
|
||||
pool->slab);
|
||||
pool->mempool = mempool_create_slab_pool(min_nr, pool->slab);
|
||||
if (!pool->mempool)
|
||||
goto free_slab;
|
||||
|
||||
|
|
|
@ -40,14 +40,16 @@ struct icmp6hdr {
|
|||
struct icmpv6_nd_ra {
|
||||
__u8 hop_limit;
|
||||
#if defined(__LITTLE_ENDIAN_BITFIELD)
|
||||
__u8 reserved:6,
|
||||
__u8 reserved:4,
|
||||
router_pref:2,
|
||||
other:1,
|
||||
managed:1;
|
||||
|
||||
#elif defined(__BIG_ENDIAN_BITFIELD)
|
||||
__u8 managed:1,
|
||||
other:1,
|
||||
reserved:6;
|
||||
router_pref:2,
|
||||
reserved:4;
|
||||
#else
|
||||
#error "Please fix <asm/byteorder.h>"
|
||||
#endif
|
||||
|
@ -70,8 +72,13 @@ struct icmp6hdr {
|
|||
#define icmp6_addrconf_managed icmp6_dataun.u_nd_ra.managed
|
||||
#define icmp6_addrconf_other icmp6_dataun.u_nd_ra.other
|
||||
#define icmp6_rt_lifetime icmp6_dataun.u_nd_ra.rt_lifetime
|
||||
#define icmp6_router_pref icmp6_dataun.u_nd_ra.router_pref
|
||||
};
|
||||
|
||||
#define ICMPV6_ROUTER_PREF_LOW 0x3
|
||||
#define ICMPV6_ROUTER_PREF_MEDIUM 0x0
|
||||
#define ICMPV6_ROUTER_PREF_HIGH 0x1
|
||||
#define ICMPV6_ROUTER_PREF_INVALID 0x2
|
||||
|
||||
#define ICMPV6_DEST_UNREACH 1
|
||||
#define ICMPV6_PKT_TOOBIG 2
|
||||
|
|
|
@ -792,6 +792,7 @@ typedef struct hwif_s {
|
|||
unsigned no_dsc : 1; /* 0 default, 1 dsc_overlap disabled */
|
||||
unsigned auto_poll : 1; /* supports nop auto-poll */
|
||||
unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */
|
||||
unsigned no_io_32bit : 1; /* 1 = can not do 32-bit IO ops */
|
||||
|
||||
struct device gendev;
|
||||
struct completion gendev_rel_comp; /* To deal with device release() */
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#define IFF_LOOPBACK 0x8 /* is a loopback net */
|
||||
#define IFF_POINTOPOINT 0x10 /* interface is has p-p link */
|
||||
#define IFF_NOTRAILERS 0x20 /* avoid use of trailers */
|
||||
#define IFF_RUNNING 0x40 /* interface running and carrier ok */
|
||||
#define IFF_RUNNING 0x40 /* interface RFC2863 OPER_UP */
|
||||
#define IFF_NOARP 0x80 /* no ARP protocol */
|
||||
#define IFF_PROMISC 0x100 /* receive all packets */
|
||||
#define IFF_ALLMULTI 0x200 /* receive all multicast packets*/
|
||||
|
@ -43,15 +43,22 @@
|
|||
|
||||
#define IFF_MULTICAST 0x1000 /* Supports multicast */
|
||||
|
||||
#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_MASTER|IFF_SLAVE|IFF_RUNNING)
|
||||
|
||||
#define IFF_PORTSEL 0x2000 /* can set media type */
|
||||
#define IFF_AUTOMEDIA 0x4000 /* auto media select active */
|
||||
#define IFF_DYNAMIC 0x8000 /* dialup device with changing addresses*/
|
||||
|
||||
#define IFF_LOWER_UP 0x10000 /* driver signals L1 up */
|
||||
#define IFF_DORMANT 0x20000 /* driver signals dormant */
|
||||
|
||||
#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|\
|
||||
IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT)
|
||||
|
||||
/* Private (from user) interface flags (netdevice->priv_flags). */
|
||||
#define IFF_802_1Q_VLAN 0x1 /* 802.1Q VLAN device. */
|
||||
#define IFF_EBRIDGE 0x2 /* Ethernet bridging device. */
|
||||
#define IFF_SLAVE_INACTIVE 0x4 /* bonding slave not the curr. active */
|
||||
#define IFF_MASTER_8023AD 0x8 /* bonding master, 802.3ad. */
|
||||
#define IFF_MASTER_ALB 0x10 /* bonding master, balance-alb. */
|
||||
|
||||
#define IF_GET_IFACE 0x0001 /* for querying only */
|
||||
#define IF_GET_PROTO 0x0002
|
||||
|
@ -80,6 +87,22 @@
|
|||
#define IF_PROTO_FR_ETH_PVC 0x200B
|
||||
#define IF_PROTO_RAW 0x200C /* RAW Socket */
|
||||
|
||||
/* RFC 2863 operational status */
|
||||
enum {
|
||||
IF_OPER_UNKNOWN,
|
||||
IF_OPER_NOTPRESENT,
|
||||
IF_OPER_DOWN,
|
||||
IF_OPER_LOWERLAYERDOWN,
|
||||
IF_OPER_TESTING,
|
||||
IF_OPER_DORMANT,
|
||||
IF_OPER_UP,
|
||||
};
|
||||
|
||||
/* link modes */
|
||||
enum {
|
||||
IF_LINK_MODE_DEFAULT,
|
||||
IF_LINK_MODE_DORMANT, /* limit upward transition to dormant */
|
||||
};
|
||||
|
||||
/*
|
||||
* Device mapping structure. I'd just gone off and designed a
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
#define ETH_P_8021Q 0x8100 /* 802.1Q VLAN Extended Header */
|
||||
#define ETH_P_IPX 0x8137 /* IPX over DIX */
|
||||
#define ETH_P_IPV6 0x86DD /* IPv6 over bluebook */
|
||||
#define ETH_P_SLOW 0x8809 /* Slow Protocol. See 802.3ad 43B */
|
||||
#define ETH_P_WCCP 0x883E /* Web-cache coordination protocol
|
||||
* defined in draft-wilson-wrec-wccp-v2-00.txt */
|
||||
#define ETH_P_PPP_DISC 0x8863 /* PPPoE discovery messages */
|
||||
|
|
|
@ -72,6 +72,7 @@ struct in_addr {
|
|||
#define IP_FREEBIND 15
|
||||
#define IP_IPSEC_POLICY 16
|
||||
#define IP_XFRM_POLICY 17
|
||||
#define IP_PASSSEC 18
|
||||
|
||||
/* BSD compatibility */
|
||||
#define IP_RECVRETOPTS IP_RETOPTS
|
||||
|
|
|
@ -25,6 +25,7 @@ struct ipv4_devconf
|
|||
int arp_filter;
|
||||
int arp_announce;
|
||||
int arp_ignore;
|
||||
int arp_accept;
|
||||
int medium_id;
|
||||
int no_xfrm;
|
||||
int no_policy;
|
||||
|
|
|
@ -69,6 +69,10 @@ extern initcall_t __security_initcall_start[], __security_initcall_end[];
|
|||
|
||||
/* Defined in init/main.c */
|
||||
extern char saved_command_line[];
|
||||
|
||||
/* used by init/main.c */
|
||||
extern void setup_arch(char **);
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef MODULE
|
||||
|
|
|
@ -7,11 +7,10 @@
|
|||
#define INIT_FDTABLE \
|
||||
{ \
|
||||
.max_fds = NR_OPEN_DEFAULT, \
|
||||
.max_fdset = __FD_SETSIZE, \
|
||||
.next_fd = 0, \
|
||||
.max_fdset = EMBEDDED_FD_SET_SIZE, \
|
||||
.fd = &init_files.fd_array[0], \
|
||||
.close_on_exec = &init_files.close_on_exec_init, \
|
||||
.open_fds = &init_files.open_fds_init, \
|
||||
.close_on_exec = (fd_set *)&init_files.close_on_exec_init, \
|
||||
.open_fds = (fd_set *)&init_files.open_fds_init, \
|
||||
.rcu = RCU_HEAD_INIT, \
|
||||
.free_files = NULL, \
|
||||
.next = NULL, \
|
||||
|
@ -20,9 +19,10 @@
|
|||
#define INIT_FILES \
|
||||
{ \
|
||||
.count = ATOMIC_INIT(1), \
|
||||
.file_lock = SPIN_LOCK_UNLOCKED, \
|
||||
.fdt = &init_files.fdtab, \
|
||||
.fdtab = INIT_FDTABLE, \
|
||||
.file_lock = SPIN_LOCK_UNLOCKED, \
|
||||
.next_fd = 0, \
|
||||
.close_on_exec_init = { { 0, } }, \
|
||||
.open_fds_init = { { 0, } }, \
|
||||
.fd_array = { NULL, } \
|
||||
|
@ -62,6 +62,8 @@
|
|||
.posix_timers = LIST_HEAD_INIT(sig.posix_timers), \
|
||||
.cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \
|
||||
.rlim = INIT_RLIMITS, \
|
||||
.pgrp = 1, \
|
||||
.session = 1, \
|
||||
}
|
||||
|
||||
#define INIT_SIGHAND(sighand) { \
|
||||
|
|
|
@ -71,6 +71,8 @@ struct inotify_event {
|
|||
|
||||
#ifdef CONFIG_INOTIFY
|
||||
|
||||
extern void inotify_d_instantiate(struct dentry *, struct inode *);
|
||||
extern void inotify_d_move(struct dentry *);
|
||||
extern void inotify_inode_queue_event(struct inode *, __u32, __u32,
|
||||
const char *);
|
||||
extern void inotify_dentry_parent_queue_event(struct dentry *, __u32, __u32,
|
||||
|
@ -81,6 +83,15 @@ extern u32 inotify_get_cookie(void);
|
|||
|
||||
#else
|
||||
|
||||
static inline void inotify_d_instantiate(struct dentry *dentry,
|
||||
struct inode *inode)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void inotify_d_move(struct dentry *dentry)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void inotify_inode_queue_event(struct inode *inode,
|
||||
__u32 mask, __u32 cookie,
|
||||
const char *filename)
|
||||
|
|
|
@ -957,7 +957,7 @@ struct input_handler {
|
|||
struct input_handle* (*connect)(struct input_handler *handler, struct input_dev *dev, struct input_device_id *id);
|
||||
void (*disconnect)(struct input_handle *handle);
|
||||
|
||||
struct file_operations *fops;
|
||||
const struct file_operations *fops;
|
||||
int minor;
|
||||
char *name;
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
#include <linux/ipmi_msgdefs.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/device.h>
|
||||
|
||||
/*
|
||||
* This file describes an interface to an IPMI driver. You have to
|
||||
|
@ -397,7 +398,7 @@ struct ipmi_smi_watcher
|
|||
the watcher list. So you can add and remove users from the
|
||||
IPMI interface, send messages, etc., but you cannot add
|
||||
or remove SMI watchers or SMI interfaces. */
|
||||
void (*new_smi)(int if_num);
|
||||
void (*new_smi)(int if_num, struct device *dev);
|
||||
void (*smi_gone)(int if_num);
|
||||
};
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
#define IPMI_NETFN_APP_RESPONSE 0x07
|
||||
#define IPMI_GET_DEVICE_ID_CMD 0x01
|
||||
#define IPMI_CLEAR_MSG_FLAGS_CMD 0x30
|
||||
#define IPMI_GET_DEVICE_GUID_CMD 0x08
|
||||
#define IPMI_GET_MSG_FLAGS_CMD 0x31
|
||||
#define IPMI_SEND_MSG_CMD 0x34
|
||||
#define IPMI_GET_MSG_CMD 0x33
|
||||
|
|
|
@ -37,6 +37,9 @@
|
|||
#include <linux/ipmi_msgdefs.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/ipmi_smi.h>
|
||||
|
||||
/* This files describes the interface for IPMI system management interface
|
||||
drivers to bind into the IPMI message handler. */
|
||||
|
@ -79,6 +82,13 @@ struct ipmi_smi_handlers
|
|||
{
|
||||
struct module *owner;
|
||||
|
||||
/* The low-level interface cannot start sending messages to
|
||||
the upper layer until this function is called. This may
|
||||
not be NULL, the lower layer must take the interface from
|
||||
this call. */
|
||||
int (*start_processing)(void *send_info,
|
||||
ipmi_smi_t new_intf);
|
||||
|
||||
/* Called to enqueue an SMI message to be sent. This
|
||||
operation is not allowed to fail. If an error occurs, it
|
||||
should report back the error in a received message. It may
|
||||
|
@ -113,14 +123,57 @@ struct ipmi_smi_handlers
|
|||
void (*dec_usecount)(void *send_info);
|
||||
};
|
||||
|
||||
struct ipmi_device_id {
|
||||
unsigned char device_id;
|
||||
unsigned char device_revision;
|
||||
unsigned char firmware_revision_1;
|
||||
unsigned char firmware_revision_2;
|
||||
unsigned char ipmi_version;
|
||||
unsigned char additional_device_support;
|
||||
unsigned int manufacturer_id;
|
||||
unsigned int product_id;
|
||||
unsigned char aux_firmware_revision[4];
|
||||
unsigned int aux_firmware_revision_set : 1;
|
||||
};
|
||||
|
||||
#define ipmi_version_major(v) ((v)->ipmi_version & 0xf)
|
||||
#define ipmi_version_minor(v) ((v)->ipmi_version >> 4)
|
||||
|
||||
/* Take a pointer to a raw data buffer and a length and extract device
|
||||
id information from it. The first byte of data must point to the
|
||||
byte from the get device id response after the completion code.
|
||||
The caller is responsible for making sure the length is at least
|
||||
11 and the command completed without error. */
|
||||
static inline void ipmi_demangle_device_id(unsigned char *data,
|
||||
unsigned int data_len,
|
||||
struct ipmi_device_id *id)
|
||||
{
|
||||
id->device_id = data[0];
|
||||
id->device_revision = data[1];
|
||||
id->firmware_revision_1 = data[2];
|
||||
id->firmware_revision_2 = data[3];
|
||||
id->ipmi_version = data[4];
|
||||
id->additional_device_support = data[5];
|
||||
id->manufacturer_id = data[6] | (data[7] << 8) | (data[8] << 16);
|
||||
id->product_id = data[9] | (data[10] << 8);
|
||||
if (data_len >= 15) {
|
||||
memcpy(id->aux_firmware_revision, data+11, 4);
|
||||
id->aux_firmware_revision_set = 1;
|
||||
} else
|
||||
id->aux_firmware_revision_set = 0;
|
||||
}
|
||||
|
||||
/* Add a low-level interface to the IPMI driver. Note that if the
|
||||
interface doesn't know its slave address, it should pass in zero. */
|
||||
interface doesn't know its slave address, it should pass in zero.
|
||||
The low-level interface should not deliver any messages to the
|
||||
upper layer until the start_processing() function in the handlers
|
||||
is called, and the lower layer must get the interface from that
|
||||
call. */
|
||||
int ipmi_register_smi(struct ipmi_smi_handlers *handlers,
|
||||
void *send_info,
|
||||
unsigned char version_major,
|
||||
unsigned char version_minor,
|
||||
unsigned char slave_addr,
|
||||
ipmi_smi_t *intf);
|
||||
struct ipmi_device_id *device_id,
|
||||
struct device *dev,
|
||||
unsigned char slave_addr);
|
||||
|
||||
/*
|
||||
* Remove a low-level interface from the IPMI driver. This will
|
||||
|
|
|
@ -145,6 +145,15 @@ struct ipv6_devconf {
|
|||
__s32 max_desync_factor;
|
||||
#endif
|
||||
__s32 max_addresses;
|
||||
__s32 accept_ra_defrtr;
|
||||
__s32 accept_ra_pinfo;
|
||||
#ifdef CONFIG_IPV6_ROUTER_PREF
|
||||
__s32 accept_ra_rtr_pref;
|
||||
__s32 rtr_probe_interval;
|
||||
#ifdef CONFIG_IPV6_ROUTE_INFO
|
||||
__s32 accept_ra_rt_info_max_plen;
|
||||
#endif
|
||||
#endif
|
||||
void *sysctl;
|
||||
};
|
||||
|
||||
|
@ -167,6 +176,11 @@ enum {
|
|||
DEVCONF_MAX_DESYNC_FACTOR,
|
||||
DEVCONF_MAX_ADDRESSES,
|
||||
DEVCONF_FORCE_MLD_VERSION,
|
||||
DEVCONF_ACCEPT_RA_DEFRTR,
|
||||
DEVCONF_ACCEPT_RA_PINFO,
|
||||
DEVCONF_ACCEPT_RA_RTR_PREF,
|
||||
DEVCONF_RTR_PROBE_INTERVAL,
|
||||
DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN,
|
||||
DEVCONF_MAX
|
||||
};
|
||||
|
||||
|
|
|
@ -23,12 +23,22 @@
|
|||
#define RTF_NONEXTHOP 0x00200000 /* route with no nexthop */
|
||||
#define RTF_EXPIRES 0x00400000
|
||||
|
||||
#define RTF_ROUTEINFO 0x00800000 /* route information - RA */
|
||||
|
||||
#define RTF_CACHE 0x01000000 /* cache entry */
|
||||
#define RTF_FLOW 0x02000000 /* flow significant route */
|
||||
#define RTF_POLICY 0x04000000 /* policy route */
|
||||
|
||||
#define RTF_PREF(pref) ((pref) << 27)
|
||||
#define RTF_PREF_MASK 0x18000000
|
||||
|
||||
#define RTF_LOCAL 0x80000000
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#define IPV6_EXTRACT_PREF(flag) (((flag) & RTF_PREF_MASK) >> 27)
|
||||
#define IPV6_DECODE_PREF(pref) ((pref) ^ 2) /* 1:low,2:med,3:high */
|
||||
#endif
|
||||
|
||||
struct in6_rtmsg {
|
||||
struct in6_addr rtmsg_dst;
|
||||
struct in6_addr rtmsg_src;
|
||||
|
|
|
@ -76,6 +76,7 @@ typedef enum {
|
|||
IRDA_MCP2120_DONGLE = 9,
|
||||
IRDA_ACT200L_DONGLE = 10,
|
||||
IRDA_MA600_DONGLE = 11,
|
||||
IRDA_TOIM3232_DONGLE = 12,
|
||||
} IRDA_DONGLE;
|
||||
|
||||
/* Protocol types to be used for SOCK_DGRAM */
|
||||
|
|
|
@ -114,53 +114,8 @@ static inline void set_native_irq_info(int irq, cpumask_t mask)
|
|||
#if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE)
|
||||
extern cpumask_t pending_irq_cpumask[NR_IRQS];
|
||||
|
||||
static inline void set_pending_irq(unsigned int irq, cpumask_t mask)
|
||||
{
|
||||
irq_desc_t *desc = irq_desc + irq;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&desc->lock, flags);
|
||||
desc->move_irq = 1;
|
||||
pending_irq_cpumask[irq] = mask;
|
||||
spin_unlock_irqrestore(&desc->lock, flags);
|
||||
}
|
||||
|
||||
static inline void
|
||||
move_native_irq(int irq)
|
||||
{
|
||||
cpumask_t tmp;
|
||||
irq_desc_t *desc = irq_descp(irq);
|
||||
|
||||
if (likely (!desc->move_irq))
|
||||
return;
|
||||
|
||||
desc->move_irq = 0;
|
||||
|
||||
if (likely(cpus_empty(pending_irq_cpumask[irq])))
|
||||
return;
|
||||
|
||||
if (!desc->handler->set_affinity)
|
||||
return;
|
||||
|
||||
/* note - we hold the desc->lock */
|
||||
cpus_and(tmp, pending_irq_cpumask[irq], cpu_online_map);
|
||||
|
||||
/*
|
||||
* If there was a valid mask to work with, please
|
||||
* do the disable, re-program, enable sequence.
|
||||
* This is *not* particularly important for level triggered
|
||||
* but in a edge trigger case, we might be setting rte
|
||||
* when an active trigger is comming in. This could
|
||||
* cause some ioapics to mal-function.
|
||||
* Being paranoid i guess!
|
||||
*/
|
||||
if (unlikely(!cpus_empty(tmp))) {
|
||||
desc->handler->disable(irq);
|
||||
desc->handler->set_affinity(irq,tmp);
|
||||
desc->handler->enable(irq);
|
||||
}
|
||||
cpus_clear(pending_irq_cpumask[irq]);
|
||||
}
|
||||
void set_pending_irq(unsigned int irq, cpumask_t mask);
|
||||
void move_native_irq(int irq);
|
||||
|
||||
#ifdef CONFIG_PCI_MSI
|
||||
/*
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
#include <linux/journal-head.h>
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/bit_spinlock.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/timer.h>
|
||||
|
||||
#include <asm/semaphore.h>
|
||||
#endif
|
||||
|
||||
|
@ -575,7 +578,7 @@ struct transaction_s
|
|||
* @j_wait_checkpoint: Wait queue to trigger checkpointing
|
||||
* @j_wait_commit: Wait queue to trigger commit
|
||||
* @j_wait_updates: Wait queue to wait for updates to complete
|
||||
* @j_checkpoint_sem: Semaphore for locking against concurrent checkpoints
|
||||
* @j_checkpoint_mutex: Mutex for locking against concurrent checkpoints
|
||||
* @j_head: Journal head - identifies the first unused block in the journal
|
||||
* @j_tail: Journal tail - identifies the oldest still-used block in the
|
||||
* journal.
|
||||
|
@ -645,7 +648,7 @@ struct journal_s
|
|||
int j_barrier_count;
|
||||
|
||||
/* The barrier lock itself */
|
||||
struct semaphore j_barrier;
|
||||
struct mutex j_barrier;
|
||||
|
||||
/*
|
||||
* Transactions: The current running transaction...
|
||||
|
@ -687,7 +690,7 @@ struct journal_s
|
|||
wait_queue_head_t j_wait_updates;
|
||||
|
||||
/* Semaphore for locking against concurrent checkpoints */
|
||||
struct semaphore j_checkpoint_sem;
|
||||
struct mutex j_checkpoint_mutex;
|
||||
|
||||
/*
|
||||
* Journal head: identifies the first unused block in the journal.
|
||||
|
@ -786,7 +789,7 @@ struct journal_s
|
|||
unsigned long j_commit_interval;
|
||||
|
||||
/* The timer used to wakeup the commit thread: */
|
||||
struct timer_list *j_commit_timer;
|
||||
struct timer_list j_commit_timer;
|
||||
|
||||
/*
|
||||
* The revoke table: maintains the list of revoked blocks in the
|
||||
|
@ -892,7 +895,7 @@ extern int journal_dirty_metadata (handle_t *, struct buffer_head *);
|
|||
extern void journal_release_buffer (handle_t *, struct buffer_head *);
|
||||
extern int journal_forget (handle_t *, struct buffer_head *);
|
||||
extern void journal_sync_buffer (struct buffer_head *);
|
||||
extern int journal_invalidatepage(journal_t *,
|
||||
extern void journal_invalidatepage(journal_t *,
|
||||
struct page *, unsigned long);
|
||||
extern int journal_try_to_free_buffers(journal_t *, struct page *, gfp_t);
|
||||
extern int journal_stop(handle_t *);
|
||||
|
|
|
@ -87,10 +87,13 @@ extern int cond_resched(void);
|
|||
(__x < 0) ? -__x : __x; \
|
||||
})
|
||||
|
||||
extern struct notifier_block *panic_notifier_list;
|
||||
extern struct atomic_notifier_head panic_notifier_list;
|
||||
extern long (*panic_blink)(long time);
|
||||
NORET_TYPE void panic(const char * fmt, ...)
|
||||
__attribute__ ((NORET_AND format (printf, 1, 2)));
|
||||
extern void oops_enter(void);
|
||||
extern void oops_exit(void);
|
||||
extern int oops_may_print(void);
|
||||
fastcall NORET_TYPE void do_exit(long error_code)
|
||||
ATTRIB_NORET;
|
||||
NORET_TYPE void complete_and_exit(struct completion *, long)
|
||||
|
@ -151,9 +154,10 @@ static inline int __attribute_pure__ long_log2(unsigned long x)
|
|||
return r;
|
||||
}
|
||||
|
||||
static inline unsigned long __attribute_const__ roundup_pow_of_two(unsigned long x)
|
||||
static inline unsigned long
|
||||
__attribute_const__ roundup_pow_of_two(unsigned long x)
|
||||
{
|
||||
return (1UL << fls(x - 1));
|
||||
return 1UL << fls_long(x - 1);
|
||||
}
|
||||
|
||||
extern int printk_ratelimit(void);
|
||||
|
|
|
@ -46,7 +46,7 @@ static inline int kstat_irqs(int irq)
|
|||
{
|
||||
int cpu, sum = 0;
|
||||
|
||||
for_each_cpu(cpu)
|
||||
for_each_possible_cpu(cpu)
|
||||
sum += kstat_cpu(cpu).irqs[irq];
|
||||
|
||||
return sum;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#ifdef __KERNEL__
|
||||
|
||||
#include <asm/semaphore.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
typedef struct kobject *kobj_probe_t(dev_t, int *, void *);
|
||||
struct kobj_map;
|
||||
|
@ -9,6 +9,6 @@ int kobj_map(struct kobj_map *, dev_t, unsigned long, struct module *,
|
|||
kobj_probe_t *, int (*)(dev_t, void *), void *);
|
||||
void kobj_unmap(struct kobj_map *, dev_t, unsigned long);
|
||||
struct kobject *kobj_lookup(struct kobj_map *, dev_t, int *);
|
||||
struct kobj_map *kobj_map_init(kobj_probe_t *, struct semaphore *);
|
||||
struct kobj_map *kobj_map_init(kobj_probe_t *, struct mutex *);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -80,6 +80,8 @@ extern void kobject_unregister(struct kobject *);
|
|||
extern struct kobject * kobject_get(struct kobject *);
|
||||
extern void kobject_put(struct kobject *);
|
||||
|
||||
extern struct kobject *kobject_add_dir(struct kobject *, const char *);
|
||||
|
||||
extern char * kobject_get_path(struct kobject *, gfp_t);
|
||||
|
||||
struct kobj_type {
|
||||
|
@ -255,7 +257,7 @@ struct subsys_attribute {
|
|||
extern int subsys_create_file(struct subsystem * , struct subsys_attribute *);
|
||||
extern void subsys_remove_file(struct subsystem * , struct subsys_attribute *);
|
||||
|
||||
#if defined(CONFIG_HOTPLUG) & defined(CONFIG_NET)
|
||||
#if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET)
|
||||
void kobject_uevent(struct kobject *kobj, enum kobject_action action);
|
||||
|
||||
int add_uevent_var(char **envp, int num_envp, int *cur_index,
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <linux/percpu.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/rcupdate.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
#ifdef CONFIG_KPROBES
|
||||
#include <asm/kprobes.h>
|
||||
|
@ -152,7 +153,7 @@ struct kretprobe_instance {
|
|||
};
|
||||
|
||||
extern spinlock_t kretprobe_lock;
|
||||
extern struct semaphore kprobe_mutex;
|
||||
extern struct mutex kprobe_mutex;
|
||||
extern int arch_prepare_kprobe(struct kprobe *p);
|
||||
extern void arch_arm_kprobe(struct kprobe *p);
|
||||
extern void arch_disarm_kprobe(struct kprobe *p);
|
||||
|
|
|
@ -64,9 +64,6 @@ typedef union {
|
|||
|
||||
#if (BITS_PER_LONG == 64) || defined(CONFIG_KTIME_SCALAR)
|
||||
|
||||
/* Define a ktime_t variable and initialize it to zero: */
|
||||
#define DEFINE_KTIME(kt) ktime_t kt = { .tv64 = 0 }
|
||||
|
||||
/**
|
||||
* ktime_set - Set a ktime_t variable from a seconds/nanoseconds value
|
||||
*
|
||||
|
@ -113,9 +110,6 @@ static inline ktime_t timeval_to_ktime(struct timeval tv)
|
|||
/* Map the ktime_t to timeval conversion to ns_to_timeval function */
|
||||
#define ktime_to_timeval(kt) ns_to_timeval((kt).tv64)
|
||||
|
||||
/* Map the ktime_t to clock_t conversion to the inline in jiffies.h: */
|
||||
#define ktime_to_clock_t(kt) nsec_to_clock_t((kt).tv64)
|
||||
|
||||
/* Convert ktime_t to nanoseconds - NOP in the scalar storage format: */
|
||||
#define ktime_to_ns(kt) ((kt).tv64)
|
||||
|
||||
|
@ -136,9 +130,6 @@ static inline ktime_t timeval_to_ktime(struct timeval tv)
|
|||
* tv.sec < 0 and 0 >= tv.nsec < NSEC_PER_SEC
|
||||
*/
|
||||
|
||||
/* Define a ktime_t variable and initialize it to zero: */
|
||||
#define DEFINE_KTIME(kt) ktime_t kt = { .tv64 = 0 }
|
||||
|
||||
/* Set a ktime_t variable to a value in sec/nsec representation: */
|
||||
static inline ktime_t ktime_set(const long secs, const unsigned long nsecs)
|
||||
{
|
||||
|
@ -254,17 +245,6 @@ static inline struct timeval ktime_to_timeval(const ktime_t kt)
|
|||
.tv_usec = (suseconds_t) (kt.tv.nsec / NSEC_PER_USEC) };
|
||||
}
|
||||
|
||||
/**
|
||||
* ktime_to_clock_t - convert a ktime_t variable to clock_t format
|
||||
* @kt: the ktime_t variable to convert
|
||||
*
|
||||
* Returns a clock_t variable with the converted value
|
||||
*/
|
||||
static inline clock_t ktime_to_clock_t(const ktime_t kt)
|
||||
{
|
||||
return nsec_to_clock_t( (u64) kt.tv.sec * NSEC_PER_SEC + kt.tv.nsec);
|
||||
}
|
||||
|
||||
/**
|
||||
* ktime_to_ns - convert a ktime_t variable to scalar nanoseconds
|
||||
* @kt: the ktime_t variable to convert
|
||||
|
|
111
include/linux/leds.h
Normal file
111
include/linux/leds.h
Normal file
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
* Driver model for leds and led triggers
|
||||
*
|
||||
* Copyright (C) 2005 John Lenz <lenz@cs.wisc.edu>
|
||||
* Copyright (C) 2005 Richard Purdie <rpurdie@openedhand.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
*/
|
||||
#ifndef __LINUX_LEDS_H_INCLUDED
|
||||
#define __LINUX_LEDS_H_INCLUDED
|
||||
|
||||
struct device;
|
||||
struct class_device;
|
||||
/*
|
||||
* LED Core
|
||||
*/
|
||||
|
||||
enum led_brightness {
|
||||
LED_OFF = 0,
|
||||
LED_HALF = 127,
|
||||
LED_FULL = 255,
|
||||
};
|
||||
|
||||
struct led_classdev {
|
||||
const char *name;
|
||||
int brightness;
|
||||
int flags;
|
||||
#define LED_SUSPENDED (1 << 0)
|
||||
|
||||
/* A function to set the brightness of the led */
|
||||
void (*brightness_set)(struct led_classdev *led_cdev,
|
||||
enum led_brightness brightness);
|
||||
|
||||
struct class_device *class_dev;
|
||||
/* LED Device linked list */
|
||||
struct list_head node;
|
||||
|
||||
/* Trigger data */
|
||||
char *default_trigger;
|
||||
#ifdef CONFIG_LEDS_TRIGGERS
|
||||
rwlock_t trigger_lock;
|
||||
/* Protects the trigger data below */
|
||||
|
||||
struct led_trigger *trigger;
|
||||
struct list_head trig_list;
|
||||
void *trigger_data;
|
||||
#endif
|
||||
};
|
||||
|
||||
extern int led_classdev_register(struct device *parent,
|
||||
struct led_classdev *led_cdev);
|
||||
extern void led_classdev_unregister(struct led_classdev *led_cdev);
|
||||
extern void led_classdev_suspend(struct led_classdev *led_cdev);
|
||||
extern void led_classdev_resume(struct led_classdev *led_cdev);
|
||||
|
||||
/*
|
||||
* LED Triggers
|
||||
*/
|
||||
#ifdef CONFIG_LEDS_TRIGGERS
|
||||
|
||||
#define TRIG_NAME_MAX 50
|
||||
|
||||
struct led_trigger {
|
||||
/* Trigger Properties */
|
||||
const char *name;
|
||||
void (*activate)(struct led_classdev *led_cdev);
|
||||
void (*deactivate)(struct led_classdev *led_cdev);
|
||||
|
||||
/* LEDs under control by this trigger (for simple triggers) */
|
||||
rwlock_t leddev_list_lock;
|
||||
struct list_head led_cdevs;
|
||||
|
||||
/* Link to next registered trigger */
|
||||
struct list_head next_trig;
|
||||
};
|
||||
|
||||
/* Registration functions for complex triggers */
|
||||
extern int led_trigger_register(struct led_trigger *trigger);
|
||||
extern void led_trigger_unregister(struct led_trigger *trigger);
|
||||
|
||||
/* Registration functions for simple triggers */
|
||||
#define DEFINE_LED_TRIGGER(x) static struct led_trigger *x;
|
||||
#define DEFINE_LED_TRIGGER_GLOBAL(x) struct led_trigger *x;
|
||||
extern void led_trigger_register_simple(const char *name,
|
||||
struct led_trigger **trigger);
|
||||
extern void led_trigger_unregister_simple(struct led_trigger *trigger);
|
||||
extern void led_trigger_event(struct led_trigger *trigger,
|
||||
enum led_brightness event);
|
||||
|
||||
#else
|
||||
|
||||
/* Triggers aren't active - null macros */
|
||||
#define DEFINE_LED_TRIGGER(x)
|
||||
#define DEFINE_LED_TRIGGER_GLOBAL(x)
|
||||
#define led_trigger_register_simple(x, y) do {} while(0)
|
||||
#define led_trigger_unregister_simple(x) do {} while(0)
|
||||
#define led_trigger_event(x, y) do {} while(0)
|
||||
|
||||
#endif
|
||||
|
||||
/* Trigger specific functions */
|
||||
#ifdef CONFIG_LEDS_TRIGGER_IDE_DISK
|
||||
extern void ledtrig_ide_activity(void);
|
||||
#else
|
||||
#define ledtrig_ide_activity() do {} while(0)
|
||||
#endif
|
||||
|
||||
#endif /* __LINUX_LEDS_H_INCLUDED */
|
|
@ -35,7 +35,8 @@
|
|||
#include <linux/workqueue.h>
|
||||
|
||||
/*
|
||||
* compile-time options
|
||||
* compile-time options: to be removed as soon as all the drivers are
|
||||
* converted to the new debugging mechanism
|
||||
*/
|
||||
#undef ATA_DEBUG /* debugging output */
|
||||
#undef ATA_VERBOSE_DEBUG /* yet more debugging output */
|
||||
|
@ -61,15 +62,37 @@
|
|||
|
||||
#define BPRINTK(fmt, args...) if (ap->flags & ATA_FLAG_DEBUGMSG) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args)
|
||||
|
||||
#ifdef ATA_NDEBUG
|
||||
#define assert(expr)
|
||||
#else
|
||||
#define assert(expr) \
|
||||
if(unlikely(!(expr))) { \
|
||||
printk(KERN_ERR "Assertion failed! %s,%s,%s,line=%d\n", \
|
||||
#expr,__FILE__,__FUNCTION__,__LINE__); \
|
||||
}
|
||||
#endif
|
||||
/* NEW: debug levels */
|
||||
#define HAVE_LIBATA_MSG 1
|
||||
|
||||
enum {
|
||||
ATA_MSG_DRV = 0x0001,
|
||||
ATA_MSG_INFO = 0x0002,
|
||||
ATA_MSG_PROBE = 0x0004,
|
||||
ATA_MSG_WARN = 0x0008,
|
||||
ATA_MSG_MALLOC = 0x0010,
|
||||
ATA_MSG_CTL = 0x0020,
|
||||
ATA_MSG_INTR = 0x0040,
|
||||
ATA_MSG_ERR = 0x0080,
|
||||
};
|
||||
|
||||
#define ata_msg_drv(p) ((p)->msg_enable & ATA_MSG_DRV)
|
||||
#define ata_msg_info(p) ((p)->msg_enable & ATA_MSG_INFO)
|
||||
#define ata_msg_probe(p) ((p)->msg_enable & ATA_MSG_PROBE)
|
||||
#define ata_msg_warn(p) ((p)->msg_enable & ATA_MSG_WARN)
|
||||
#define ata_msg_malloc(p) ((p)->msg_enable & ATA_MSG_MALLOC)
|
||||
#define ata_msg_ctl(p) ((p)->msg_enable & ATA_MSG_CTL)
|
||||
#define ata_msg_intr(p) ((p)->msg_enable & ATA_MSG_INTR)
|
||||
#define ata_msg_err(p) ((p)->msg_enable & ATA_MSG_ERR)
|
||||
|
||||
static inline u32 ata_msg_init(int dval, int default_msg_enable_bits)
|
||||
{
|
||||
if (dval < 0 || dval >= (sizeof(u32) * 8))
|
||||
return default_msg_enable_bits; /* should be 0x1 - only driver info msgs */
|
||||
if (!dval)
|
||||
return 0;
|
||||
return (1 << dval) - 1;
|
||||
}
|
||||
|
||||
/* defines only for the constants which don't work well as enums */
|
||||
#define ATA_TAG_POISON 0xfafbfcfdU
|
||||
|
@ -99,8 +122,7 @@ enum {
|
|||
/* struct ata_device stuff */
|
||||
ATA_DFLAG_LBA48 = (1 << 0), /* device supports LBA48 */
|
||||
ATA_DFLAG_PIO = (1 << 1), /* device currently in PIO mode */
|
||||
ATA_DFLAG_LOCK_SECTORS = (1 << 2), /* don't adjust max_sectors */
|
||||
ATA_DFLAG_LBA = (1 << 3), /* device supports LBA */
|
||||
ATA_DFLAG_LBA = (1 << 2), /* device supports LBA */
|
||||
|
||||
ATA_DEV_UNKNOWN = 0, /* unknown device */
|
||||
ATA_DEV_ATA = 1, /* ATA device */
|
||||
|
@ -115,9 +137,9 @@ enum {
|
|||
ATA_FLAG_PORT_DISABLED = (1 << 2), /* port is disabled, ignore it */
|
||||
ATA_FLAG_SATA = (1 << 3),
|
||||
ATA_FLAG_NO_LEGACY = (1 << 4), /* no legacy mode check */
|
||||
ATA_FLAG_SRST = (1 << 5), /* use ATA SRST, not E.D.D. */
|
||||
ATA_FLAG_SRST = (1 << 5), /* (obsolete) use ATA SRST, not E.D.D. */
|
||||
ATA_FLAG_MMIO = (1 << 6), /* use MMIO, not PIO */
|
||||
ATA_FLAG_SATA_RESET = (1 << 7), /* use COMRESET */
|
||||
ATA_FLAG_SATA_RESET = (1 << 7), /* (obsolete) use COMRESET */
|
||||
ATA_FLAG_PIO_DMA = (1 << 8), /* PIO cmds via DMA */
|
||||
ATA_FLAG_NOINTR = (1 << 9), /* FIXME: Remove this once
|
||||
* proper HSM is in place. */
|
||||
|
@ -129,13 +151,19 @@ enum {
|
|||
ATA_FLAG_PIO_LBA48 = (1 << 13), /* Host DMA engine is LBA28 only */
|
||||
ATA_FLAG_IRQ_MASK = (1 << 14), /* Mask IRQ in PIO xfers */
|
||||
|
||||
ATA_FLAG_FLUSH_PORT_TASK = (1 << 15), /* Flush port task */
|
||||
ATA_FLAG_IN_EH = (1 << 16), /* EH in progress */
|
||||
|
||||
ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */
|
||||
ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */
|
||||
ATA_QCFLAG_SINGLE = (1 << 4), /* no s/g, just a single buffer */
|
||||
ATA_QCFLAG_DMAMAP = ATA_QCFLAG_SG | ATA_QCFLAG_SINGLE,
|
||||
ATA_QCFLAG_EH_SCHEDULED = (1 << 5), /* EH scheduled */
|
||||
|
||||
/* host set flags */
|
||||
ATA_HOST_SIMPLEX = (1 << 0), /* Host is simplex, one DMA channel per host_set only */
|
||||
|
||||
/* various lengths of time */
|
||||
ATA_TMOUT_EDD = 5 * HZ, /* heuristic */
|
||||
ATA_TMOUT_PIO = 30 * HZ,
|
||||
ATA_TMOUT_BOOT = 30 * HZ, /* heuristic */
|
||||
ATA_TMOUT_BOOT_QUICK = 7 * HZ, /* heuristic */
|
||||
|
@ -162,11 +190,19 @@ enum {
|
|||
PORT_DISABLED = 2,
|
||||
|
||||
/* encoding various smaller bitmaps into a single
|
||||
* unsigned long bitmap
|
||||
* unsigned int bitmap
|
||||
*/
|
||||
ATA_SHIFT_UDMA = 0,
|
||||
ATA_SHIFT_MWDMA = 8,
|
||||
ATA_SHIFT_PIO = 11,
|
||||
ATA_BITS_PIO = 5,
|
||||
ATA_BITS_MWDMA = 3,
|
||||
ATA_BITS_UDMA = 8,
|
||||
|
||||
ATA_SHIFT_PIO = 0,
|
||||
ATA_SHIFT_MWDMA = ATA_SHIFT_PIO + ATA_BITS_PIO,
|
||||
ATA_SHIFT_UDMA = ATA_SHIFT_MWDMA + ATA_BITS_MWDMA,
|
||||
|
||||
ATA_MASK_PIO = ((1 << ATA_BITS_PIO) - 1) << ATA_SHIFT_PIO,
|
||||
ATA_MASK_MWDMA = ((1 << ATA_BITS_MWDMA) - 1) << ATA_SHIFT_MWDMA,
|
||||
ATA_MASK_UDMA = ((1 << ATA_BITS_UDMA) - 1) << ATA_SHIFT_UDMA,
|
||||
|
||||
/* size of buffer to pad xfers ending on unaligned boundaries */
|
||||
ATA_DMA_PAD_SZ = 4,
|
||||
|
@ -189,10 +225,15 @@ enum hsm_task_states {
|
|||
};
|
||||
|
||||
enum ata_completion_errors {
|
||||
AC_ERR_OTHER = (1 << 0),
|
||||
AC_ERR_DEV = (1 << 1),
|
||||
AC_ERR_ATA_BUS = (1 << 2),
|
||||
AC_ERR_HOST_BUS = (1 << 3),
|
||||
AC_ERR_DEV = (1 << 0), /* device reported error */
|
||||
AC_ERR_HSM = (1 << 1), /* host state machine violation */
|
||||
AC_ERR_TIMEOUT = (1 << 2), /* timeout */
|
||||
AC_ERR_MEDIA = (1 << 3), /* media error */
|
||||
AC_ERR_ATA_BUS = (1 << 4), /* ATA bus error */
|
||||
AC_ERR_HOST_BUS = (1 << 5), /* host bus error */
|
||||
AC_ERR_SYSTEM = (1 << 6), /* system error */
|
||||
AC_ERR_INVALID = (1 << 7), /* invalid argument */
|
||||
AC_ERR_OTHER = (1 << 8), /* unknown */
|
||||
};
|
||||
|
||||
/* forward declarations */
|
||||
|
@ -202,7 +243,10 @@ struct ata_port;
|
|||
struct ata_queued_cmd;
|
||||
|
||||
/* typedefs */
|
||||
typedef int (*ata_qc_cb_t) (struct ata_queued_cmd *qc);
|
||||
typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc);
|
||||
typedef void (*ata_probeinit_fn_t)(struct ata_port *);
|
||||
typedef int (*ata_reset_fn_t)(struct ata_port *, int, unsigned int *);
|
||||
typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *);
|
||||
|
||||
struct ata_ioports {
|
||||
unsigned long cmd_addr;
|
||||
|
@ -237,6 +281,7 @@ struct ata_probe_ent {
|
|||
unsigned long irq;
|
||||
unsigned int irq_flags;
|
||||
unsigned long host_flags;
|
||||
unsigned long host_set_flags;
|
||||
void __iomem *mmio_base;
|
||||
void *private_data;
|
||||
};
|
||||
|
@ -249,6 +294,9 @@ struct ata_host_set {
|
|||
unsigned int n_ports;
|
||||
void *private_data;
|
||||
const struct ata_port_operations *ops;
|
||||
unsigned long flags;
|
||||
int simplex_claimed; /* Keep seperate in case we
|
||||
ever need to do this locked */
|
||||
struct ata_port * ports[0];
|
||||
};
|
||||
|
||||
|
@ -305,7 +353,7 @@ struct ata_device {
|
|||
unsigned long flags; /* ATA_DFLAG_xxx */
|
||||
unsigned int class; /* ATA_DEV_xxx */
|
||||
unsigned int devno; /* 0 or 1 */
|
||||
u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */
|
||||
u16 *id; /* IDENTIFY xxx DEVICE data */
|
||||
u8 pio_mode;
|
||||
u8 dma_mode;
|
||||
u8 xfer_mode;
|
||||
|
@ -313,6 +361,13 @@ struct ata_device {
|
|||
|
||||
unsigned int multi_count; /* sectors count for
|
||||
READ/WRITE MULTIPLE */
|
||||
unsigned int max_sectors; /* per-device max sectors */
|
||||
unsigned int cdb_len;
|
||||
|
||||
/* per-dev xfer mask */
|
||||
unsigned int pio_mask;
|
||||
unsigned int mwdma_mask;
|
||||
unsigned int udma_mask;
|
||||
|
||||
/* for CHS addressing */
|
||||
u16 cylinders; /* Number of cylinders */
|
||||
|
@ -342,7 +397,6 @@ struct ata_port {
|
|||
unsigned int mwdma_mask;
|
||||
unsigned int udma_mask;
|
||||
unsigned int cbl; /* cable type; ATA_CBL_xxx */
|
||||
unsigned int cdb_len;
|
||||
|
||||
struct ata_device device[ATA_MAX_DEVICES];
|
||||
|
||||
|
@ -352,13 +406,16 @@ struct ata_port {
|
|||
|
||||
struct ata_host_stats stats;
|
||||
struct ata_host_set *host_set;
|
||||
struct device *dev;
|
||||
|
||||
struct work_struct packet_task;
|
||||
struct work_struct port_task;
|
||||
|
||||
struct work_struct pio_task;
|
||||
unsigned int hsm_task_state;
|
||||
unsigned long pio_task_timeout;
|
||||
|
||||
u32 msg_enable;
|
||||
struct list_head eh_done_q;
|
||||
|
||||
void *private_data;
|
||||
};
|
||||
|
||||
|
@ -369,6 +426,7 @@ struct ata_port_operations {
|
|||
|
||||
void (*set_piomode) (struct ata_port *, struct ata_device *);
|
||||
void (*set_dmamode) (struct ata_port *, struct ata_device *);
|
||||
unsigned long (*mode_filter) (const struct ata_port *, struct ata_device *, unsigned long);
|
||||
|
||||
void (*tf_load) (struct ata_port *ap, const struct ata_taskfile *tf);
|
||||
void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf);
|
||||
|
@ -378,7 +436,10 @@ struct ata_port_operations {
|
|||
u8 (*check_altstatus)(struct ata_port *ap);
|
||||
void (*dev_select)(struct ata_port *ap, unsigned int device);
|
||||
|
||||
void (*phy_reset) (struct ata_port *ap);
|
||||
void (*phy_reset) (struct ata_port *ap); /* obsolete */
|
||||
void (*set_mode) (struct ata_port *ap);
|
||||
int (*probe_reset) (struct ata_port *ap, unsigned int *classes);
|
||||
|
||||
void (*post_set_mode) (struct ata_port *ap);
|
||||
|
||||
int (*check_atapi_dma) (struct ata_queued_cmd *qc);
|
||||
|
@ -387,7 +448,7 @@ struct ata_port_operations {
|
|||
void (*bmdma_start) (struct ata_queued_cmd *qc);
|
||||
|
||||
void (*qc_prep) (struct ata_queued_cmd *qc);
|
||||
int (*qc_issue) (struct ata_queued_cmd *qc);
|
||||
unsigned int (*qc_issue) (struct ata_queued_cmd *qc);
|
||||
|
||||
void (*eng_timeout) (struct ata_port *ap);
|
||||
|
||||
|
@ -435,6 +496,18 @@ extern void ata_port_probe(struct ata_port *);
|
|||
extern void __sata_phy_reset(struct ata_port *ap);
|
||||
extern void sata_phy_reset(struct ata_port *ap);
|
||||
extern void ata_bus_reset(struct ata_port *ap);
|
||||
extern int ata_drive_probe_reset(struct ata_port *ap,
|
||||
ata_probeinit_fn_t probeinit,
|
||||
ata_reset_fn_t softreset, ata_reset_fn_t hardreset,
|
||||
ata_postreset_fn_t postreset, unsigned int *classes);
|
||||
extern void ata_std_probeinit(struct ata_port *ap);
|
||||
extern int ata_std_softreset(struct ata_port *ap, int verbose,
|
||||
unsigned int *classes);
|
||||
extern int sata_std_hardreset(struct ata_port *ap, int verbose,
|
||||
unsigned int *class);
|
||||
extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes);
|
||||
extern int ata_dev_revalidate(struct ata_port *ap, struct ata_device *dev,
|
||||
int post_reset);
|
||||
extern void ata_port_disable(struct ata_port *);
|
||||
extern void ata_std_ports(struct ata_ioports *ioaddr);
|
||||
#ifdef CONFIG_PCI
|
||||
|
@ -443,6 +516,7 @@ extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_i
|
|||
extern void ata_pci_remove_one (struct pci_dev *pdev);
|
||||
extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t state);
|
||||
extern int ata_pci_device_resume(struct pci_dev *pdev);
|
||||
extern int ata_pci_clear_simplex(struct pci_dev *pdev);
|
||||
#endif /* CONFIG_PCI */
|
||||
extern int ata_device_add(const struct ata_probe_ent *ent);
|
||||
extern void ata_host_set_remove(struct ata_host_set *host_set);
|
||||
|
@ -450,13 +524,20 @@ extern int ata_scsi_detect(struct scsi_host_template *sht);
|
|||
extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
|
||||
extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *));
|
||||
extern int ata_scsi_error(struct Scsi_Host *host);
|
||||
extern void ata_eh_qc_complete(struct ata_queued_cmd *qc);
|
||||
extern void ata_eh_qc_retry(struct ata_queued_cmd *qc);
|
||||
extern int ata_scsi_release(struct Scsi_Host *host);
|
||||
extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc);
|
||||
extern int ata_scsi_device_resume(struct scsi_device *);
|
||||
extern int ata_scsi_device_suspend(struct scsi_device *);
|
||||
extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t state);
|
||||
extern int ata_device_resume(struct ata_port *, struct ata_device *);
|
||||
extern int ata_device_suspend(struct ata_port *, struct ata_device *);
|
||||
extern int ata_device_suspend(struct ata_port *, struct ata_device *, pm_message_t state);
|
||||
extern int ata_ratelimit(void);
|
||||
extern unsigned int ata_busy_sleep(struct ata_port *ap,
|
||||
unsigned long timeout_pat,
|
||||
unsigned long timeout);
|
||||
extern void ata_port_queue_task(struct ata_port *ap, void (*fn)(void *),
|
||||
void *data, unsigned long delay);
|
||||
|
||||
/*
|
||||
* Default driver ops implementations
|
||||
|
@ -470,26 +551,29 @@ extern void ata_std_dev_select (struct ata_port *ap, unsigned int device);
|
|||
extern u8 ata_check_status(struct ata_port *ap);
|
||||
extern u8 ata_altstatus(struct ata_port *ap);
|
||||
extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf);
|
||||
extern int ata_std_probe_reset(struct ata_port *ap, unsigned int *classes);
|
||||
extern int ata_port_start (struct ata_port *ap);
|
||||
extern void ata_port_stop (struct ata_port *ap);
|
||||
extern void ata_host_stop (struct ata_host_set *host_set);
|
||||
extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs);
|
||||
extern void ata_qc_prep(struct ata_queued_cmd *qc);
|
||||
extern int ata_qc_issue_prot(struct ata_queued_cmd *qc);
|
||||
extern void ata_noop_qc_prep(struct ata_queued_cmd *qc);
|
||||
extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc);
|
||||
extern void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf,
|
||||
unsigned int buflen);
|
||||
extern void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg,
|
||||
unsigned int n_elem);
|
||||
extern unsigned int ata_dev_classify(const struct ata_taskfile *tf);
|
||||
extern void ata_dev_id_string(const u16 *id, unsigned char *s,
|
||||
unsigned int ofs, unsigned int len);
|
||||
extern void ata_dev_config(struct ata_port *ap, unsigned int i);
|
||||
extern void ata_id_string(const u16 *id, unsigned char *s,
|
||||
unsigned int ofs, unsigned int len);
|
||||
extern void ata_id_c_string(const u16 *id, unsigned char *s,
|
||||
unsigned int ofs, unsigned int len);
|
||||
extern void ata_bmdma_setup (struct ata_queued_cmd *qc);
|
||||
extern void ata_bmdma_start (struct ata_queued_cmd *qc);
|
||||
extern void ata_bmdma_stop(struct ata_queued_cmd *qc);
|
||||
extern u8 ata_bmdma_status(struct ata_port *ap);
|
||||
extern void ata_bmdma_irq_clear(struct ata_port *ap);
|
||||
extern void ata_qc_complete(struct ata_queued_cmd *qc);
|
||||
extern void __ata_qc_complete(struct ata_queued_cmd *qc);
|
||||
extern void ata_eng_timeout(struct ata_port *ap);
|
||||
extern void ata_scsi_simulate(struct ata_port *ap, struct ata_device *dev,
|
||||
struct scsi_cmnd *cmd,
|
||||
|
@ -498,6 +582,8 @@ extern int ata_std_bios_param(struct scsi_device *sdev,
|
|||
struct block_device *bdev,
|
||||
sector_t capacity, int geom[]);
|
||||
extern int ata_scsi_slave_config(struct scsi_device *sdev);
|
||||
extern struct ata_device *ata_dev_pair(struct ata_port *ap,
|
||||
struct ata_device *adev);
|
||||
|
||||
/*
|
||||
* Timing helpers
|
||||
|
@ -540,7 +626,7 @@ extern void ata_pci_host_stop (struct ata_host_set *host_set);
|
|||
extern struct ata_probe_ent *
|
||||
ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask);
|
||||
extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits);
|
||||
|
||||
extern unsigned long ata_pci_default_filter(const struct ata_port *, struct ata_device *, unsigned long);
|
||||
#endif /* CONFIG_PCI */
|
||||
|
||||
|
||||
|
@ -586,10 +672,14 @@ static inline unsigned int ata_tag_valid(unsigned int tag)
|
|||
return (tag < ATA_MAX_QUEUE) ? 1 : 0;
|
||||
}
|
||||
|
||||
static inline unsigned int ata_class_present(unsigned int class)
|
||||
{
|
||||
return class == ATA_DEV_ATA || class == ATA_DEV_ATAPI;
|
||||
}
|
||||
|
||||
static inline unsigned int ata_dev_present(const struct ata_device *dev)
|
||||
{
|
||||
return ((dev->class == ATA_DEV_ATA) ||
|
||||
(dev->class == ATA_DEV_ATAPI));
|
||||
return ata_class_present(dev->class);
|
||||
}
|
||||
|
||||
static inline u8 ata_chk_status(struct ata_port *ap)
|
||||
|
@ -657,9 +747,9 @@ static inline u8 ata_wait_idle(struct ata_port *ap)
|
|||
|
||||
if (status & (ATA_BUSY | ATA_DRQ)) {
|
||||
unsigned long l = ap->ioaddr.status_addr;
|
||||
printk(KERN_WARNING
|
||||
"ATA: abnormal status 0x%X on port 0x%lX\n",
|
||||
status, l);
|
||||
if (ata_msg_warn(ap))
|
||||
printk(KERN_WARNING "ATA: abnormal status 0x%X on port 0x%lX\n",
|
||||
status, l);
|
||||
}
|
||||
|
||||
return status;
|
||||
|
@ -701,6 +791,24 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc)
|
|||
ata_tf_init(qc->ap, &qc->tf, qc->dev->devno);
|
||||
}
|
||||
|
||||
/**
|
||||
* ata_qc_complete - Complete an active ATA command
|
||||
* @qc: Command to complete
|
||||
* @err_mask: ATA Status register contents
|
||||
*
|
||||
* Indicate to the mid and upper layers that an ATA
|
||||
* command has completed, with either an ok or not-ok status.
|
||||
*
|
||||
* LOCKING:
|
||||
* spin_lock_irqsave(host_set lock)
|
||||
*/
|
||||
static inline void ata_qc_complete(struct ata_queued_cmd *qc)
|
||||
{
|
||||
if (unlikely(qc->flags & ATA_QCFLAG_EH_SCHEDULED))
|
||||
return;
|
||||
|
||||
__ata_qc_complete(qc);
|
||||
}
|
||||
|
||||
/**
|
||||
* ata_irq_on - Enable interrupts on a port.
|
||||
|
@ -751,7 +859,8 @@ static inline u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq)
|
|||
|
||||
status = ata_busy_wait(ap, bits, 1000);
|
||||
if (status & bits)
|
||||
DPRINTK("abnormal status 0x%X\n", status);
|
||||
if (ata_msg_err(ap))
|
||||
printk(KERN_ERR "abnormal status 0x%X\n", status);
|
||||
|
||||
/* get controller status; clear intr, err bits */
|
||||
if (ap->flags & ATA_FLAG_MMIO) {
|
||||
|
@ -769,8 +878,10 @@ static inline u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq)
|
|||
post_stat = inb(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
|
||||
}
|
||||
|
||||
VPRINTK("irq ack: host_stat 0x%X, new host_stat 0x%X, drv_stat 0x%X\n",
|
||||
host_stat, post_stat, status);
|
||||
if (ata_msg_intr(ap))
|
||||
printk(KERN_INFO "%s: irq ack: host_stat 0x%X, new host_stat 0x%X, drv_stat 0x%X\n",
|
||||
__FUNCTION__,
|
||||
host_stat, post_stat, status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
@ -807,7 +918,7 @@ static inline int ata_try_flush_cache(const struct ata_device *dev)
|
|||
static inline unsigned int ac_err_mask(u8 status)
|
||||
{
|
||||
if (status & ATA_BUSY)
|
||||
return AC_ERR_ATA_BUS;
|
||||
return AC_ERR_HSM;
|
||||
if (status & (ATA_ERR | ATA_DF))
|
||||
return AC_ERR_DEV;
|
||||
return 0;
|
||||
|
|
|
@ -28,17 +28,27 @@
|
|||
#define ALIGN __ALIGN
|
||||
#define ALIGN_STR __ALIGN_STR
|
||||
|
||||
#ifndef ENTRY
|
||||
#define ENTRY(name) \
|
||||
.globl name; \
|
||||
ALIGN; \
|
||||
name:
|
||||
#endif
|
||||
|
||||
#define KPROBE_ENTRY(name) \
|
||||
.section .kprobes.text, "ax"; \
|
||||
.globl name; \
|
||||
ALIGN; \
|
||||
name:
|
||||
ENTRY(name)
|
||||
|
||||
#ifndef END
|
||||
#define END(name) \
|
||||
.size name, .-name
|
||||
#endif
|
||||
|
||||
#ifndef ENDPROC
|
||||
#define ENDPROC(name) \
|
||||
.type name, @function; \
|
||||
END(name)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -410,6 +410,17 @@ static inline void list_splice_init(struct list_head *list,
|
|||
prefetch(pos->member.next), &pos->member != (head); \
|
||||
pos = list_entry(pos->member.next, typeof(*pos), member))
|
||||
|
||||
/**
|
||||
* list_for_each_entry_from - iterate over list of given type
|
||||
* continuing from existing point
|
||||
* @pos: the type * to use as a loop counter.
|
||||
* @head: the head for your list.
|
||||
* @member: the name of the list_struct within the struct.
|
||||
*/
|
||||
#define list_for_each_entry_from(pos, head, member) \
|
||||
for (; prefetch(pos->member.next), &pos->member != (head); \
|
||||
pos = list_entry(pos->member.next, typeof(*pos), member))
|
||||
|
||||
/**
|
||||
* list_for_each_entry_safe - iterate over list of given type safe against removal of list entry
|
||||
* @pos: the type * to use as a loop counter.
|
||||
|
@ -437,6 +448,19 @@ static inline void list_splice_init(struct list_head *list,
|
|||
&pos->member != (head); \
|
||||
pos = n, n = list_entry(n->member.next, typeof(*n), member))
|
||||
|
||||
/**
|
||||
* list_for_each_entry_safe_from - iterate over list of given type
|
||||
* from existing point safe against removal of list entry
|
||||
* @pos: the type * to use as a loop counter.
|
||||
* @n: another type * to use as temporary storage
|
||||
* @head: the head for your list.
|
||||
* @member: the name of the list_struct within the struct.
|
||||
*/
|
||||
#define list_for_each_entry_safe_from(pos, n, head, member) \
|
||||
for (n = list_entry(pos->member.next, typeof(*pos), member); \
|
||||
&pos->member != (head); \
|
||||
pos = n, n = list_entry(n->member.next, typeof(*n), member))
|
||||
|
||||
/**
|
||||
* list_for_each_entry_safe_reverse - iterate backwards over list of given type safe against
|
||||
* removal of list entry
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <linux/config.h>
|
||||
#include <linux/in.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/kref.h>
|
||||
#include <linux/utsname.h>
|
||||
#include <linux/nfsd/nfsfh.h>
|
||||
#include <linux/lockd/bind.h>
|
||||
|
@ -58,6 +59,8 @@ struct nlm_host {
|
|||
unsigned long h_expires; /* eligible for GC */
|
||||
struct list_head h_lockowners; /* Lockowners for the client */
|
||||
spinlock_t h_lock;
|
||||
struct list_head h_granted; /* Locks in GRANTED state */
|
||||
struct list_head h_reclaim; /* Locks in RECLAIM state */
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -83,9 +86,9 @@ struct nlm_rqst {
|
|||
struct nlm_host * a_host; /* host handle */
|
||||
struct nlm_args a_args; /* arguments */
|
||||
struct nlm_res a_res; /* result */
|
||||
struct nlm_wait * a_block;
|
||||
struct nlm_block * a_block;
|
||||
unsigned int a_retries; /* Retry count */
|
||||
char a_owner[NLMCLNT_OHSIZE];
|
||||
u8 a_owner[NLMCLNT_OHSIZE];
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -110,16 +113,16 @@ struct nlm_file {
|
|||
*/
|
||||
#define NLM_NEVER (~(unsigned long) 0)
|
||||
struct nlm_block {
|
||||
struct kref b_count; /* Reference count */
|
||||
struct nlm_block * b_next; /* linked list (all blocks) */
|
||||
struct nlm_block * b_fnext; /* linked list (per file) */
|
||||
struct nlm_rqst b_call; /* RPC args & callback info */
|
||||
struct nlm_rqst * b_call; /* RPC args & callback info */
|
||||
struct svc_serv * b_daemon; /* NLM service */
|
||||
struct nlm_host * b_host; /* host handle for RPC clnt */
|
||||
unsigned long b_when; /* next re-xmit */
|
||||
unsigned int b_id; /* block id */
|
||||
unsigned char b_queued; /* re-queued */
|
||||
unsigned char b_granted; /* VFS granted lock */
|
||||
unsigned char b_incall; /* doing callback */
|
||||
unsigned char b_done; /* callback complete */
|
||||
struct nlm_file * b_file; /* file in question */
|
||||
};
|
||||
|
@ -145,15 +148,16 @@ extern unsigned long nlmsvc_timeout;
|
|||
/*
|
||||
* Lockd client functions
|
||||
*/
|
||||
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);
|
||||
struct nlm_rqst * nlm_alloc_call(struct nlm_host *host);
|
||||
void nlm_release_call(struct nlm_rqst *);
|
||||
int nlm_async_call(struct nlm_rqst *, u32, const struct rpc_call_ops *);
|
||||
int nlm_async_reply(struct nlm_rqst *, u32, const struct rpc_call_ops *);
|
||||
struct nlm_wait * nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl);
|
||||
void nlmclnt_finish_block(struct nlm_wait *block);
|
||||
int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout);
|
||||
u32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *);
|
||||
void nlmclnt_recovery(struct nlm_host *, u32);
|
||||
int nlmclnt_reclaim(struct nlm_host *, struct file_lock *);
|
||||
int nlmclnt_setgrantargs(struct nlm_rqst *, struct nlm_lock *);
|
||||
void nlmclnt_freegrantargs(struct nlm_rqst *);
|
||||
|
||||
/*
|
||||
* Host cache
|
||||
|
@ -172,7 +176,6 @@ extern struct nlm_host *nlm_find_client(void);
|
|||
/*
|
||||
* Server-side lock handling
|
||||
*/
|
||||
int nlmsvc_async_call(struct nlm_rqst *, u32, const struct rpc_call_ops *);
|
||||
u32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *,
|
||||
struct nlm_lock *, int, struct nlm_cookie *);
|
||||
u32 nlmsvc_unlock(struct nlm_file *, struct nlm_lock *);
|
||||
|
@ -180,7 +183,7 @@ u32 nlmsvc_testlock(struct nlm_file *, struct nlm_lock *,
|
|||
struct nlm_lock *);
|
||||
u32 nlmsvc_cancel_blocked(struct nlm_file *, struct nlm_lock *);
|
||||
unsigned long nlmsvc_retry_blocked(void);
|
||||
int nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *,
|
||||
void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *,
|
||||
int action);
|
||||
void nlmsvc_grant_reply(struct svc_rqst *, struct nlm_cookie *, u32);
|
||||
|
||||
|
|
|
@ -25,6 +25,6 @@ u32 nlmsvc_share_file(struct nlm_host *, struct nlm_file *,
|
|||
struct nlm_args *);
|
||||
u32 nlmsvc_unshare_file(struct nlm_host *, struct nlm_file *,
|
||||
struct nlm_args *);
|
||||
int nlmsvc_traverse_shares(struct nlm_host *, struct nlm_file *, int);
|
||||
void nlmsvc_traverse_shares(struct nlm_host *, struct nlm_file *, int);
|
||||
|
||||
#endif /* LINUX_LOCKD_SHARE_H */
|
||||
|
|
|
@ -28,6 +28,7 @@ struct nlm_lock {
|
|||
int len; /* length of "caller" */
|
||||
struct nfs_fh fh;
|
||||
struct xdr_netobj oh;
|
||||
u32 svid;
|
||||
struct file_lock fl;
|
||||
};
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <linux/bio.h>
|
||||
#include <linux/blkdev.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
/* Possible states of device */
|
||||
enum {
|
||||
|
@ -60,7 +61,7 @@ struct loop_device {
|
|||
int lo_state;
|
||||
struct completion lo_done;
|
||||
struct completion lo_bh_done;
|
||||
struct semaphore lo_ctl_mutex;
|
||||
struct mutex lo_ctl_mutex;
|
||||
int lo_pending;
|
||||
|
||||
request_queue_t *lo_queue;
|
||||
|
|
16
include/linux/m48t86.h
Normal file
16
include/linux/m48t86.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* ST M48T86 / Dallas DS12887 RTC driver
|
||||
* Copyright (c) 2006 Tower Technologies
|
||||
*
|
||||
* Author: Alessandro Zummo <a.zummo@towertech.it>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
struct m48t86_ops
|
||||
{
|
||||
void (*writeb)(unsigned char value, unsigned long addr);
|
||||
unsigned char (*readb)(unsigned long addr);
|
||||
};
|
|
@ -113,6 +113,7 @@
|
|||
|
||||
#define UBD_MAJOR 98
|
||||
|
||||
#define PP_MAJOR 99
|
||||
#define JSFD_MAJOR 99
|
||||
|
||||
#define PHONE_MAJOR 100
|
||||
|
|
|
@ -77,7 +77,6 @@ extern int remove_memory_block(unsigned long, struct mem_section *, int);
|
|||
|
||||
#define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT)
|
||||
|
||||
struct notifier_block;
|
||||
|
||||
#endif /* CONFIG_MEMORY_HOTPLUG */
|
||||
|
||||
|
|
|
@ -147,6 +147,7 @@ extern void mpol_rebind_policy(struct mempolicy *pol, const nodemask_t *new);
|
|||
extern void mpol_rebind_task(struct task_struct *tsk,
|
||||
const nodemask_t *new);
|
||||
extern void mpol_rebind_mm(struct mm_struct *mm, nodemask_t *new);
|
||||
extern void mpol_fix_fork_child_flag(struct task_struct *p);
|
||||
#define set_cpuset_being_rebound(x) (cpuset_being_rebound = (x))
|
||||
|
||||
#ifdef CONFIG_CPUSET
|
||||
|
@ -248,6 +249,10 @@ static inline void mpol_rebind_mm(struct mm_struct *mm, nodemask_t *new)
|
|||
{
|
||||
}
|
||||
|
||||
static inline void mpol_fix_fork_child_flag(struct task_struct *p)
|
||||
{
|
||||
}
|
||||
|
||||
#define set_cpuset_being_rebound(x) do {} while (0)
|
||||
|
||||
static inline struct zonelist *huge_zonelist(struct vm_area_struct *vma,
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
#include <linux/wait.h>
|
||||
|
||||
struct kmem_cache;
|
||||
|
||||
typedef void * (mempool_alloc_t)(gfp_t gfp_mask, void *pool_data);
|
||||
typedef void (mempool_free_t)(void *element, void *pool_data);
|
||||
|
||||
|
@ -37,5 +39,41 @@ extern void mempool_free(void *element, mempool_t *pool);
|
|||
*/
|
||||
void *mempool_alloc_slab(gfp_t gfp_mask, void *pool_data);
|
||||
void mempool_free_slab(void *element, void *pool_data);
|
||||
static inline mempool_t *
|
||||
mempool_create_slab_pool(int min_nr, struct kmem_cache *kc)
|
||||
{
|
||||
return mempool_create(min_nr, mempool_alloc_slab, mempool_free_slab,
|
||||
(void *) kc);
|
||||
}
|
||||
|
||||
/*
|
||||
* 2 mempool_alloc_t's and a mempool_free_t to kmalloc/kzalloc and kfree
|
||||
* the amount of memory specified by pool_data
|
||||
*/
|
||||
void *mempool_kmalloc(gfp_t gfp_mask, void *pool_data);
|
||||
void *mempool_kzalloc(gfp_t gfp_mask, void *pool_data);
|
||||
void mempool_kfree(void *element, void *pool_data);
|
||||
static inline mempool_t *mempool_create_kmalloc_pool(int min_nr, size_t size)
|
||||
{
|
||||
return mempool_create(min_nr, mempool_kmalloc, mempool_kfree,
|
||||
(void *) size);
|
||||
}
|
||||
static inline mempool_t *mempool_create_kzalloc_pool(int min_nr, size_t size)
|
||||
{
|
||||
return mempool_create(min_nr, mempool_kzalloc, mempool_kfree,
|
||||
(void *) size);
|
||||
}
|
||||
|
||||
/*
|
||||
* A mempool_alloc_t and mempool_free_t for a simple page allocator that
|
||||
* allocates pages of the order specified by pool_data
|
||||
*/
|
||||
void *mempool_alloc_pages(gfp_t gfp_mask, void *pool_data);
|
||||
void mempool_free_pages(void *element, void *pool_data);
|
||||
static inline mempool_t *mempool_create_page_pool(int min_nr, int order)
|
||||
{
|
||||
return mempool_create(min_nr, mempool_alloc_pages, mempool_free_pages,
|
||||
(void *)(long)order);
|
||||
}
|
||||
|
||||
#endif /* _LINUX_MEMPOOL_H */
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue