Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-upstream
Conflicts: drivers/uwb/wlp/eda.c
This commit is contained in:
@@ -313,6 +313,7 @@ unifdef-y += ptrace.h
|
||||
unifdef-y += qnx4_fs.h
|
||||
unifdef-y += quota.h
|
||||
unifdef-y += random.h
|
||||
unifdef-y += irqnr.h
|
||||
unifdef-y += reboot.h
|
||||
unifdef-y += reiserfs_fs.h
|
||||
unifdef-y += reiserfs_xattr.h
|
||||
|
@@ -5,6 +5,7 @@
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/aio_abi.h>
|
||||
#include <linux/uio.h>
|
||||
#include <linux/rcupdate.h>
|
||||
|
||||
#include <asm/atomic.h>
|
||||
|
||||
@@ -183,7 +184,7 @@ struct kioctx {
|
||||
|
||||
/* This needs improving */
|
||||
unsigned long user_id;
|
||||
struct kioctx *next;
|
||||
struct hlist_node list;
|
||||
|
||||
wait_queue_head_t wait;
|
||||
|
||||
@@ -199,6 +200,8 @@ struct kioctx {
|
||||
struct aio_ring_info ring_info;
|
||||
|
||||
struct delayed_work wq;
|
||||
|
||||
struct rcu_head rcu_head;
|
||||
};
|
||||
|
||||
/* prototypes */
|
||||
|
@@ -231,10 +231,21 @@ static __inline__ int atmpvc_addr_in_use(struct sockaddr_atmpvc addr)
|
||||
*/
|
||||
|
||||
struct atmif_sioc {
|
||||
int number;
|
||||
int length;
|
||||
void __user *arg;
|
||||
int number;
|
||||
int length;
|
||||
void __user *arg;
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#ifdef CONFIG_COMPAT
|
||||
#include <linux/compat.h>
|
||||
struct compat_atmif_sioc {
|
||||
int number;
|
||||
int length;
|
||||
compat_uptr_t arg;
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef unsigned short atm_backend_t;
|
||||
#endif
|
||||
|
@@ -100,6 +100,10 @@ struct atm_dev_stats {
|
||||
/* use backend to make new if */
|
||||
#define ATM_ADDPARTY _IOW('a', ATMIOC_SPECIAL+4,struct atm_iobuf)
|
||||
/* add party to p2mp call */
|
||||
#ifdef CONFIG_COMPAT
|
||||
/* It actually takes struct sockaddr_atmsvc, not struct atm_iobuf */
|
||||
#define COMPAT_ATM_ADDPARTY _IOW('a', ATMIOC_SPECIAL+4,struct compat_atm_iobuf)
|
||||
#endif
|
||||
#define ATM_DROPPARTY _IOW('a', ATMIOC_SPECIAL+5,int)
|
||||
/* drop party from p2mp call */
|
||||
|
||||
@@ -224,6 +228,13 @@ struct atm_cirange {
|
||||
extern struct proc_dir_entry *atm_proc_root;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
#include <linux/compat.h>
|
||||
struct compat_atm_iobuf {
|
||||
int length;
|
||||
compat_uptr_t buffer;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct k_atm_aal_stats {
|
||||
#define __HANDLE_ITEM(i) atomic_t i
|
||||
@@ -379,6 +390,10 @@ struct atmdev_ops { /* only send is required */
|
||||
int (*open)(struct atm_vcc *vcc);
|
||||
void (*close)(struct atm_vcc *vcc);
|
||||
int (*ioctl)(struct atm_dev *dev,unsigned int cmd,void __user *arg);
|
||||
#ifdef CONFIG_COMPAT
|
||||
int (*compat_ioctl)(struct atm_dev *dev,unsigned int cmd,
|
||||
void __user *arg);
|
||||
#endif
|
||||
int (*getsockopt)(struct atm_vcc *vcc,int level,int optname,
|
||||
void __user *optval,int optlen);
|
||||
int (*setsockopt)(struct atm_vcc *vcc,int level,int optname,
|
||||
|
@@ -99,6 +99,8 @@
|
||||
#define AUDIT_OBJ_PID 1318 /* ptrace target */
|
||||
#define AUDIT_TTY 1319 /* Input on an administrative TTY */
|
||||
#define AUDIT_EOE 1320 /* End of multi-record event */
|
||||
#define AUDIT_BPRM_FCAPS 1321 /* Information about fcaps increasing perms */
|
||||
#define AUDIT_CAPSET 1322 /* Record showing argument to sys_capset */
|
||||
|
||||
#define AUDIT_AVC 1400 /* SE Linux avc denial or grant */
|
||||
#define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */
|
||||
@@ -391,6 +393,7 @@ extern int audit_classify_arch(int arch);
|
||||
#ifdef CONFIG_AUDITSYSCALL
|
||||
/* These are defined in auditsc.c */
|
||||
/* Public API */
|
||||
extern void audit_finish_fork(struct task_struct *child);
|
||||
extern int audit_alloc(struct task_struct *task);
|
||||
extern void audit_free(struct task_struct *task);
|
||||
extern void audit_syscall_entry(int arch,
|
||||
@@ -434,7 +437,7 @@ static inline void audit_ptrace(struct task_struct *t)
|
||||
|
||||
/* Private API (for audit.c only) */
|
||||
extern unsigned int audit_serial(void);
|
||||
extern void auditsc_get_stamp(struct audit_context *ctx,
|
||||
extern int 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);
|
||||
#define audit_get_loginuid(t) ((t)->loginuid)
|
||||
@@ -452,6 +455,10 @@ extern int __audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_pr
|
||||
extern int __audit_mq_timedreceive(mqd_t mqdes, size_t msg_len, unsigned int __user *u_msg_prio, const struct timespec __user *u_abs_timeout);
|
||||
extern int __audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification);
|
||||
extern int __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat);
|
||||
extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm,
|
||||
const struct cred *new,
|
||||
const struct cred *old);
|
||||
extern int __audit_log_capset(pid_t pid, const struct cred *new, const struct cred *old);
|
||||
|
||||
static inline int audit_ipc_obj(struct kern_ipc_perm *ipcp)
|
||||
{
|
||||
@@ -501,9 +508,28 @@ static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat)
|
||||
return __audit_mq_getsetattr(mqdes, mqstat);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm,
|
||||
const struct cred *new,
|
||||
const struct cred *old)
|
||||
{
|
||||
if (unlikely(!audit_dummy_context()))
|
||||
return __audit_log_bprm_fcaps(bprm, new, old);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int audit_log_capset(pid_t pid, const struct cred *new,
|
||||
const struct cred *old)
|
||||
{
|
||||
if (unlikely(!audit_dummy_context()))
|
||||
return __audit_log_capset(pid, new, old);
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern int audit_n_rules;
|
||||
extern int audit_signals;
|
||||
#else
|
||||
#define audit_finish_fork(t)
|
||||
#define audit_alloc(t) ({ 0; })
|
||||
#define audit_free(t) do { ; } while (0)
|
||||
#define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0)
|
||||
@@ -516,7 +542,7 @@ extern int audit_signals;
|
||||
#define audit_inode(n,d) do { ; } while (0)
|
||||
#define audit_inode_child(d,i,p) do { ; } while (0)
|
||||
#define audit_core_dumps(i) do { ; } while (0)
|
||||
#define auditsc_get_stamp(c,t,s) do { BUG(); } while (0)
|
||||
#define auditsc_get_stamp(c,t,s) (0)
|
||||
#define audit_get_loginuid(t) (-1)
|
||||
#define audit_get_sessionid(t) (-1)
|
||||
#define audit_log_task_context(b) do { ; } while (0)
|
||||
@@ -532,6 +558,8 @@ extern int audit_signals;
|
||||
#define audit_mq_timedreceive(d,l,p,t) ({ 0; })
|
||||
#define audit_mq_notify(d,n) ({ 0; })
|
||||
#define audit_mq_getsetattr(d,s) ({ 0; })
|
||||
#define audit_log_bprm_fcaps(b, ncr, ocr) ({ 0; })
|
||||
#define audit_log_capset(pid, ncr, ocr) ({ 0; })
|
||||
#define audit_ptrace(t) ((void)0)
|
||||
#define audit_n_rules 0
|
||||
#define audit_signals 0
|
||||
|
@@ -35,16 +35,20 @@ struct linux_binprm{
|
||||
struct mm_struct *mm;
|
||||
unsigned long p; /* current top of mem */
|
||||
unsigned int sh_bang:1,
|
||||
misc_bang:1;
|
||||
misc_bang:1,
|
||||
cred_prepared:1,/* true if creds already prepared (multiple
|
||||
* preps happen for interpreters) */
|
||||
cap_effective:1;/* true if has elevated effective capabilities,
|
||||
* false if not; except for init which inherits
|
||||
* its parent's caps anyway */
|
||||
#ifdef __alpha__
|
||||
unsigned int taso:1;
|
||||
#endif
|
||||
unsigned int recursion_depth;
|
||||
struct file * file;
|
||||
int e_uid, e_gid;
|
||||
kernel_cap_t cap_post_exec_permitted;
|
||||
bool cap_effective;
|
||||
void *security;
|
||||
struct cred *cred; /* new credentials */
|
||||
int unsafe; /* how unsafe this exec is (mask of LSM_UNSAFE_*) */
|
||||
unsigned int per_clear; /* bits to clear in current->personality */
|
||||
int argc, envc;
|
||||
char * filename; /* Name of binary as seen by procps */
|
||||
char * interp; /* Name of the binary really executed. Most
|
||||
@@ -101,7 +105,7 @@ extern int setup_arg_pages(struct linux_binprm * bprm,
|
||||
int executable_stack);
|
||||
extern int bprm_mm_init(struct linux_binprm *bprm);
|
||||
extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm);
|
||||
extern void compute_creds(struct linux_binprm *binprm);
|
||||
extern void install_exec_creds(struct linux_binprm *bprm);
|
||||
extern int do_coredump(long signr, int exit_code, struct pt_regs * regs);
|
||||
extern int set_binfmt(struct linux_binfmt *new);
|
||||
extern void free_bprm(struct linux_binprm *);
|
||||
|
@@ -90,10 +90,11 @@ struct bio {
|
||||
|
||||
unsigned int bi_comp_cpu; /* completion CPU */
|
||||
|
||||
atomic_t bi_cnt; /* pin count */
|
||||
|
||||
struct bio_vec *bi_io_vec; /* the actual vec list */
|
||||
|
||||
bio_end_io_t *bi_end_io;
|
||||
atomic_t bi_cnt; /* pin count */
|
||||
|
||||
void *bi_private;
|
||||
#if defined(CONFIG_BLK_DEV_INTEGRITY)
|
||||
@@ -101,6 +102,13 @@ struct bio {
|
||||
#endif
|
||||
|
||||
bio_destructor_t *bi_destructor; /* destructor */
|
||||
|
||||
/*
|
||||
* We can inline a number of vecs at the end of the bio, to avoid
|
||||
* double allocations for a small number of bio_vecs. This member
|
||||
* MUST obviously be kept at the very end of the bio.
|
||||
*/
|
||||
struct bio_vec bi_inline_vecs[0];
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -117,6 +125,7 @@ struct bio {
|
||||
#define BIO_CPU_AFFINE 8 /* complete bio on same CPU as submitted */
|
||||
#define BIO_NULL_MAPPED 9 /* contains invalid user pages */
|
||||
#define BIO_FS_INTEGRITY 10 /* fs owns integrity data, not block layer */
|
||||
#define BIO_QUIET 11 /* Make BIO Quiet */
|
||||
#define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag)))
|
||||
|
||||
/*
|
||||
@@ -211,6 +220,11 @@ static inline void *bio_data(struct bio *bio)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline int bio_has_allocated_vec(struct bio *bio)
|
||||
{
|
||||
return bio->bi_io_vec && bio->bi_io_vec != bio->bi_inline_vecs;
|
||||
}
|
||||
|
||||
/*
|
||||
* will die
|
||||
*/
|
||||
@@ -332,7 +346,7 @@ struct bio_pair {
|
||||
extern struct bio_pair *bio_split(struct bio *bi, int first_sectors);
|
||||
extern void bio_pair_release(struct bio_pair *dbio);
|
||||
|
||||
extern struct bio_set *bioset_create(int, int);
|
||||
extern struct bio_set *bioset_create(unsigned int, unsigned int);
|
||||
extern void bioset_free(struct bio_set *);
|
||||
|
||||
extern struct bio *bio_alloc(gfp_t, int);
|
||||
@@ -377,6 +391,7 @@ extern struct bio *bio_copy_user_iov(struct request_queue *,
|
||||
extern int bio_uncopy_user(struct bio *);
|
||||
void zero_fill_bio(struct bio *bio);
|
||||
extern struct bio_vec *bvec_alloc_bs(gfp_t, int, unsigned long *, struct bio_set *);
|
||||
extern void bvec_free_bs(struct bio_set *, struct bio_vec *, unsigned int);
|
||||
extern unsigned int bvec_nr_vecs(unsigned short idx);
|
||||
|
||||
/*
|
||||
@@ -395,13 +410,17 @@ static inline void bio_set_completion_cpu(struct bio *bio, unsigned int cpu)
|
||||
*/
|
||||
#define BIO_POOL_SIZE 2
|
||||
#define BIOVEC_NR_POOLS 6
|
||||
#define BIOVEC_MAX_IDX (BIOVEC_NR_POOLS - 1)
|
||||
|
||||
struct bio_set {
|
||||
struct kmem_cache *bio_slab;
|
||||
unsigned int front_pad;
|
||||
|
||||
mempool_t *bio_pool;
|
||||
#if defined(CONFIG_BLK_DEV_INTEGRITY)
|
||||
mempool_t *bio_integrity_pool;
|
||||
#endif
|
||||
mempool_t *bvec_pools[BIOVEC_NR_POOLS];
|
||||
mempool_t *bvec_pool;
|
||||
};
|
||||
|
||||
struct biovec_slab {
|
||||
@@ -411,6 +430,7 @@ struct biovec_slab {
|
||||
};
|
||||
|
||||
extern struct bio_set *fs_bio_set;
|
||||
extern struct biovec_slab bvec_slabs[BIOVEC_NR_POOLS] __read_mostly;
|
||||
|
||||
/*
|
||||
* a small number of entries is fine, not going to be performance critical.
|
||||
|
@@ -26,7 +26,6 @@ struct scsi_ioctl_command;
|
||||
|
||||
struct request_queue;
|
||||
struct elevator_queue;
|
||||
typedef struct elevator_queue elevator_t;
|
||||
struct request_pm_state;
|
||||
struct blk_trace;
|
||||
struct request;
|
||||
@@ -313,7 +312,7 @@ struct request_queue
|
||||
*/
|
||||
struct list_head queue_head;
|
||||
struct request *last_merge;
|
||||
elevator_t *elevator;
|
||||
struct elevator_queue *elevator;
|
||||
|
||||
/*
|
||||
* the queue request freelist, one for reads and one for writes
|
||||
@@ -449,6 +448,7 @@ struct request_queue
|
||||
#define QUEUE_FLAG_FAIL_IO 12 /* fake timeout */
|
||||
#define QUEUE_FLAG_STACKABLE 13 /* supports request stacking */
|
||||
#define QUEUE_FLAG_NONROT 14 /* non-rotational device (SSD) */
|
||||
#define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */
|
||||
|
||||
static inline int queue_is_locked(struct request_queue *q)
|
||||
{
|
||||
@@ -522,22 +522,32 @@ enum {
|
||||
* TAG_FLUSH : ordering by tag w/ pre and post flushes
|
||||
* TAG_FUA : ordering by tag w/ pre flush and FUA write
|
||||
*/
|
||||
QUEUE_ORDERED_NONE = 0x00,
|
||||
QUEUE_ORDERED_DRAIN = 0x01,
|
||||
QUEUE_ORDERED_TAG = 0x02,
|
||||
QUEUE_ORDERED_BY_DRAIN = 0x01,
|
||||
QUEUE_ORDERED_BY_TAG = 0x02,
|
||||
QUEUE_ORDERED_DO_PREFLUSH = 0x10,
|
||||
QUEUE_ORDERED_DO_BAR = 0x20,
|
||||
QUEUE_ORDERED_DO_POSTFLUSH = 0x40,
|
||||
QUEUE_ORDERED_DO_FUA = 0x80,
|
||||
|
||||
QUEUE_ORDERED_PREFLUSH = 0x10,
|
||||
QUEUE_ORDERED_POSTFLUSH = 0x20,
|
||||
QUEUE_ORDERED_FUA = 0x40,
|
||||
QUEUE_ORDERED_NONE = 0x00,
|
||||
|
||||
QUEUE_ORDERED_DRAIN_FLUSH = QUEUE_ORDERED_DRAIN |
|
||||
QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_POSTFLUSH,
|
||||
QUEUE_ORDERED_DRAIN_FUA = QUEUE_ORDERED_DRAIN |
|
||||
QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_FUA,
|
||||
QUEUE_ORDERED_TAG_FLUSH = QUEUE_ORDERED_TAG |
|
||||
QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_POSTFLUSH,
|
||||
QUEUE_ORDERED_TAG_FUA = QUEUE_ORDERED_TAG |
|
||||
QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_FUA,
|
||||
QUEUE_ORDERED_DRAIN = QUEUE_ORDERED_BY_DRAIN |
|
||||
QUEUE_ORDERED_DO_BAR,
|
||||
QUEUE_ORDERED_DRAIN_FLUSH = QUEUE_ORDERED_DRAIN |
|
||||
QUEUE_ORDERED_DO_PREFLUSH |
|
||||
QUEUE_ORDERED_DO_POSTFLUSH,
|
||||
QUEUE_ORDERED_DRAIN_FUA = QUEUE_ORDERED_DRAIN |
|
||||
QUEUE_ORDERED_DO_PREFLUSH |
|
||||
QUEUE_ORDERED_DO_FUA,
|
||||
|
||||
QUEUE_ORDERED_TAG = QUEUE_ORDERED_BY_TAG |
|
||||
QUEUE_ORDERED_DO_BAR,
|
||||
QUEUE_ORDERED_TAG_FLUSH = QUEUE_ORDERED_TAG |
|
||||
QUEUE_ORDERED_DO_PREFLUSH |
|
||||
QUEUE_ORDERED_DO_POSTFLUSH,
|
||||
QUEUE_ORDERED_TAG_FUA = QUEUE_ORDERED_TAG |
|
||||
QUEUE_ORDERED_DO_PREFLUSH |
|
||||
QUEUE_ORDERED_DO_FUA,
|
||||
|
||||
/*
|
||||
* Ordered operation sequence
|
||||
@@ -585,7 +595,6 @@ enum {
|
||||
#define blk_fua_rq(rq) ((rq)->cmd_flags & REQ_FUA)
|
||||
#define blk_discard_rq(rq) ((rq)->cmd_flags & REQ_DISCARD)
|
||||
#define blk_bidi_rq(rq) ((rq)->next_rq != NULL)
|
||||
#define blk_empty_barrier(rq) (blk_barrier_rq(rq) && blk_fs_request(rq) && !(rq)->hard_nr_sectors)
|
||||
/* rq->queuelist of dequeued request must be list_empty() */
|
||||
#define blk_queued_rq(rq) (!list_empty(&(rq)->queuelist))
|
||||
|
||||
@@ -855,10 +864,10 @@ extern void blk_queue_rq_timed_out(struct request_queue *, rq_timed_out_fn *);
|
||||
extern void blk_queue_rq_timeout(struct request_queue *, unsigned int);
|
||||
extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev);
|
||||
extern int blk_queue_ordered(struct request_queue *, unsigned, prepare_flush_fn *);
|
||||
extern int blk_do_ordered(struct request_queue *, struct request **);
|
||||
extern bool blk_do_ordered(struct request_queue *, struct request **);
|
||||
extern unsigned blk_ordered_cur_seq(struct request_queue *);
|
||||
extern unsigned blk_ordered_req_seq(struct request *);
|
||||
extern void blk_ordered_complete_seq(struct request_queue *, unsigned, int);
|
||||
extern bool blk_ordered_complete_seq(struct request_queue *, unsigned, int);
|
||||
|
||||
extern int blk_rq_map_sg(struct request_queue *, struct request *, struct scatterlist *);
|
||||
extern void blk_dump_rq_flags(struct request *, char *);
|
||||
@@ -977,7 +986,6 @@ static inline void put_dev_sector(Sector p)
|
||||
|
||||
struct work_struct;
|
||||
int kblockd_schedule_work(struct request_queue *q, struct work_struct *work);
|
||||
void kblockd_flush_work(struct work_struct *work);
|
||||
|
||||
#define MODULE_ALIAS_BLOCKDEV(major,minor) \
|
||||
MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor))
|
||||
|
@@ -160,7 +160,6 @@ struct blk_trace {
|
||||
|
||||
extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *);
|
||||
extern void blk_trace_shutdown(struct request_queue *);
|
||||
extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *);
|
||||
extern int do_blk_trace_setup(struct request_queue *q,
|
||||
char *name, dev_t dev, struct blk_user_trace_setup *buts);
|
||||
extern void __trace_note_message(struct blk_trace *, const char *fmt, ...);
|
||||
@@ -186,168 +185,8 @@ extern void __trace_note_message(struct blk_trace *, const char *fmt, ...);
|
||||
} while (0)
|
||||
#define BLK_TN_MAX_MSG 128
|
||||
|
||||
/**
|
||||
* 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->cmd_flags & 0x03;
|
||||
|
||||
if (likely(!bt))
|
||||
return;
|
||||
|
||||
if (blk_discard_rq(rq))
|
||||
rw |= (1 << BIO_RW_DISCARD);
|
||||
|
||||
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;
|
||||
__be64 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.device_from = cpu_to_be32(bio->bi_bdev->bd_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);
|
||||
}
|
||||
|
||||
/**
|
||||
* blk_add_driver_data - Add binary message with driver-specific data
|
||||
* @q: queue the io is for
|
||||
* @rq: io request
|
||||
* @data: driver-specific data
|
||||
* @len: length of driver-specific data
|
||||
*
|
||||
* Description:
|
||||
* Some drivers might want to write driver-specific data per request.
|
||||
*
|
||||
**/
|
||||
static inline void blk_add_driver_data(struct request_queue *q,
|
||||
struct request *rq,
|
||||
void *data, size_t len)
|
||||
{
|
||||
struct blk_trace *bt = q->blk_trace;
|
||||
|
||||
if (likely(!bt))
|
||||
return;
|
||||
|
||||
if (blk_pc_request(rq))
|
||||
__blk_add_trace(bt, 0, rq->data_len, 0, BLK_TA_DRV_DATA,
|
||||
rq->errors, len, data);
|
||||
else
|
||||
__blk_add_trace(bt, rq->hard_sector, rq->hard_nr_sectors << 9,
|
||||
0, BLK_TA_DRV_DATA, rq->errors, len, data);
|
||||
}
|
||||
|
||||
extern void blk_add_driver_data(struct request_queue *q, struct request *rq,
|
||||
void *data, size_t len);
|
||||
extern int blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
|
||||
char __user *arg);
|
||||
extern int blk_trace_startstop(struct request_queue *q, int start);
|
||||
@@ -356,13 +195,8 @@ extern int blk_trace_remove(struct request_queue *q);
|
||||
#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)
|
||||
#define blk_add_driver_data(q, rq, data, len) do {} while (0)
|
||||
#define do_blk_trace_setup(q, name, dev, buts) (-ENOTTY)
|
||||
#define blk_add_driver_data(q, rq, data, len) do {} while (0)
|
||||
#define blk_trace_setup(q, name, dev, arg) (-ENOTTY)
|
||||
#define blk_trace_startstop(q, start) (-ENOTTY)
|
||||
#define blk_trace_remove(q) (-ENOTTY)
|
||||
|
@@ -2,7 +2,6 @@
|
||||
#define _LINUX_BH_H
|
||||
|
||||
extern void local_bh_disable(void);
|
||||
extern void __local_bh_enable(void);
|
||||
extern void _local_bh_enable(void);
|
||||
extern void local_bh_enable(void);
|
||||
extern void local_bh_enable_ip(unsigned long ip);
|
||||
|
@@ -35,6 +35,7 @@ enum bh_state_bits {
|
||||
BH_Ordered, /* ordered write */
|
||||
BH_Eopnotsupp, /* operation not supported (barrier) */
|
||||
BH_Unwritten, /* Buffer is allocated on disk but not written */
|
||||
BH_Quiet, /* Buffer Error Prinks to be quiet */
|
||||
|
||||
BH_PrivateStart,/* not a state bit, but the first bit available
|
||||
* for private allocation by other entities
|
||||
|
@@ -19,7 +19,7 @@
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/netdevice.h>
|
||||
|
||||
#define CAN_VERSION "20071116"
|
||||
#define CAN_VERSION "20081130"
|
||||
|
||||
/* increment this number each time you change some user-space interface */
|
||||
#define CAN_ABI_VERSION "8"
|
||||
|
@@ -53,6 +53,7 @@ typedef struct __user_cap_data_struct {
|
||||
#define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX
|
||||
|
||||
#define VFS_CAP_REVISION_MASK 0xFF000000
|
||||
#define VFS_CAP_REVISION_SHIFT 24
|
||||
#define VFS_CAP_FLAGS_MASK ~VFS_CAP_REVISION_MASK
|
||||
#define VFS_CAP_FLAGS_EFFECTIVE 0x000001
|
||||
|
||||
@@ -68,6 +69,9 @@ typedef struct __user_cap_data_struct {
|
||||
#define VFS_CAP_U32 VFS_CAP_U32_2
|
||||
#define VFS_CAP_REVISION VFS_CAP_REVISION_2
|
||||
|
||||
#ifdef CONFIG_SECURITY_FILE_CAPABILITIES
|
||||
extern int file_caps_enabled;
|
||||
#endif
|
||||
|
||||
struct vfs_cap_data {
|
||||
__le32 magic_etc; /* Little endian */
|
||||
@@ -96,6 +100,13 @@ typedef struct kernel_cap_struct {
|
||||
__u32 cap[_KERNEL_CAPABILITY_U32S];
|
||||
} kernel_cap_t;
|
||||
|
||||
/* exact same as vfs_cap_data but in cpu endian and always filled completely */
|
||||
struct cpu_vfs_cap_data {
|
||||
__u32 magic_etc;
|
||||
kernel_cap_t permitted;
|
||||
kernel_cap_t inheritable;
|
||||
};
|
||||
|
||||
#define _USER_CAP_HEADER_SIZE (sizeof(struct __user_cap_header_struct))
|
||||
#define _KERNEL_CAP_T_SIZE (sizeof(kernel_cap_t))
|
||||
|
||||
@@ -454,6 +465,13 @@ static inline int cap_isclear(const kernel_cap_t a)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if "a" is a subset of "set".
|
||||
* return 1 if ALL of the capabilities in "a" are also in "set"
|
||||
* cap_issubset(0101, 1111) will return 1
|
||||
* return 0 if ANY of the capabilities in "a" are not in "set"
|
||||
* cap_issubset(1111, 0101) will return 0
|
||||
*/
|
||||
static inline int cap_issubset(const kernel_cap_t a, const kernel_cap_t set)
|
||||
{
|
||||
kernel_cap_t dest;
|
||||
@@ -501,8 +519,6 @@ extern const kernel_cap_t __cap_empty_set;
|
||||
extern const kernel_cap_t __cap_full_set;
|
||||
extern const kernel_cap_t __cap_init_eff_set;
|
||||
|
||||
kernel_cap_t cap_set_effective(const kernel_cap_t pE_new);
|
||||
|
||||
/**
|
||||
* has_capability - Determine if a task has a superior capability available
|
||||
* @t: The task in question
|
||||
@@ -514,9 +530,14 @@ kernel_cap_t cap_set_effective(const kernel_cap_t pE_new);
|
||||
* Note that this does not set PF_SUPERPRIV on the task.
|
||||
*/
|
||||
#define has_capability(t, cap) (security_capable((t), (cap)) == 0)
|
||||
#define has_capability_noaudit(t, cap) (security_capable_noaudit((t), (cap)) == 0)
|
||||
|
||||
extern int capable(int cap);
|
||||
|
||||
/* audit system wants to get cap info from files as well */
|
||||
struct dentry;
|
||||
extern int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* !_LINUX_CAPABILITY_H */
|
||||
|
@@ -54,3 +54,9 @@ SUBSYS(freezer)
|
||||
#endif
|
||||
|
||||
/* */
|
||||
|
||||
#ifdef CONFIG_NET_CLS_CGROUP
|
||||
SUBSYS(net_cls)
|
||||
#endif
|
||||
|
||||
/* */
|
||||
|
@@ -59,8 +59,88 @@ extern void __chk_io_ptr(const volatile void __iomem *);
|
||||
* specific implementations come from the above header files
|
||||
*/
|
||||
|
||||
#define likely(x) __builtin_expect(!!(x), 1)
|
||||
#define unlikely(x) __builtin_expect(!!(x), 0)
|
||||
struct ftrace_branch_data {
|
||||
const char *func;
|
||||
const char *file;
|
||||
unsigned line;
|
||||
union {
|
||||
struct {
|
||||
unsigned long correct;
|
||||
unsigned long incorrect;
|
||||
};
|
||||
struct {
|
||||
unsigned long miss;
|
||||
unsigned long hit;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
* Note: DISABLE_BRANCH_PROFILING can be used by special lowlevel code
|
||||
* to disable branch tracing on a per file basis.
|
||||
*/
|
||||
#if defined(CONFIG_TRACE_BRANCH_PROFILING) && !defined(DISABLE_BRANCH_PROFILING)
|
||||
void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
|
||||
|
||||
#define likely_notrace(x) __builtin_expect(!!(x), 1)
|
||||
#define unlikely_notrace(x) __builtin_expect(!!(x), 0)
|
||||
|
||||
#define __branch_check__(x, expect) ({ \
|
||||
int ______r; \
|
||||
static struct ftrace_branch_data \
|
||||
__attribute__((__aligned__(4))) \
|
||||
__attribute__((section("_ftrace_annotated_branch"))) \
|
||||
______f = { \
|
||||
.func = __func__, \
|
||||
.file = __FILE__, \
|
||||
.line = __LINE__, \
|
||||
}; \
|
||||
______r = likely_notrace(x); \
|
||||
ftrace_likely_update(&______f, ______r, expect); \
|
||||
______r; \
|
||||
})
|
||||
|
||||
/*
|
||||
* Using __builtin_constant_p(x) to ignore cases where the return
|
||||
* value is always the same. This idea is taken from a similar patch
|
||||
* written by Daniel Walker.
|
||||
*/
|
||||
# ifndef likely
|
||||
# define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
|
||||
# endif
|
||||
# ifndef unlikely
|
||||
# define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0))
|
||||
# endif
|
||||
|
||||
#ifdef CONFIG_PROFILE_ALL_BRANCHES
|
||||
/*
|
||||
* "Define 'is'", Bill Clinton
|
||||
* "Define 'if'", Steven Rostedt
|
||||
*/
|
||||
#define if(cond) if (__builtin_constant_p((cond)) ? !!(cond) : \
|
||||
({ \
|
||||
int ______r; \
|
||||
static struct ftrace_branch_data \
|
||||
__attribute__((__aligned__(4))) \
|
||||
__attribute__((section("_ftrace_branch"))) \
|
||||
______f = { \
|
||||
.func = __func__, \
|
||||
.file = __FILE__, \
|
||||
.line = __LINE__, \
|
||||
}; \
|
||||
______r = !!(cond); \
|
||||
if (______r) \
|
||||
______f.hit++; \
|
||||
else \
|
||||
______f.miss++; \
|
||||
______r; \
|
||||
}))
|
||||
#endif /* CONFIG_PROFILE_ALL_BRANCHES */
|
||||
|
||||
#else
|
||||
# define likely(x) __builtin_expect(!!(x), 1)
|
||||
# define unlikely(x) __builtin_expect(!!(x), 0)
|
||||
#endif
|
||||
|
||||
/* Optimization barrier */
|
||||
#ifndef barrier
|
||||
|
@@ -153,4 +153,8 @@ void vcs_remove_sysfs(struct tty_struct *tty);
|
||||
#define VESA_HSYNC_SUSPEND 2
|
||||
#define VESA_POWERDOWN 3
|
||||
|
||||
#ifdef CONFIG_VGA_CONSOLE
|
||||
extern bool vgacon_text_force(void);
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_CONSOLE_H */
|
||||
|
@@ -3,9 +3,9 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
extern u32 crc32c_le(u32 crc, unsigned char const *address, size_t length);
|
||||
extern u32 crc32c_be(u32 crc, unsigned char const *address, size_t length);
|
||||
extern u32 crc32c(u32 crc, const void *address, unsigned int length);
|
||||
|
||||
#define crc32c(seed, data, length) crc32c_le(seed, (unsigned char const *)data, length)
|
||||
/* This macro exists for backwards-compatibility. */
|
||||
#define crc32c_le crc32c
|
||||
|
||||
#endif /* _LINUX_CRC32C_H */
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* Credentials management
|
||||
/* Credentials management - see Documentation/credentials.txt
|
||||
*
|
||||
* Copyright (C) 2008 Red Hat, Inc. All Rights Reserved.
|
||||
* Written by David Howells (dhowells@redhat.com)
|
||||
@@ -12,39 +12,335 @@
|
||||
#ifndef _LINUX_CRED_H
|
||||
#define _LINUX_CRED_H
|
||||
|
||||
#define get_current_user() (get_uid(current->user))
|
||||
#include <linux/capability.h>
|
||||
#include <linux/key.h>
|
||||
#include <asm/atomic.h>
|
||||
|
||||
#define task_uid(task) ((task)->uid)
|
||||
#define task_gid(task) ((task)->gid)
|
||||
#define task_euid(task) ((task)->euid)
|
||||
#define task_egid(task) ((task)->egid)
|
||||
struct user_struct;
|
||||
struct cred;
|
||||
struct inode;
|
||||
|
||||
#define current_uid() (current->uid)
|
||||
#define current_gid() (current->gid)
|
||||
#define current_euid() (current->euid)
|
||||
#define current_egid() (current->egid)
|
||||
#define current_suid() (current->suid)
|
||||
#define current_sgid() (current->sgid)
|
||||
#define current_fsuid() (current->fsuid)
|
||||
#define current_fsgid() (current->fsgid)
|
||||
#define current_cap() (current->cap_effective)
|
||||
/*
|
||||
* COW Supplementary groups list
|
||||
*/
|
||||
#define NGROUPS_SMALL 32
|
||||
#define NGROUPS_PER_BLOCK ((unsigned int)(PAGE_SIZE / sizeof(gid_t)))
|
||||
|
||||
struct group_info {
|
||||
atomic_t usage;
|
||||
int ngroups;
|
||||
int nblocks;
|
||||
gid_t small_block[NGROUPS_SMALL];
|
||||
gid_t *blocks[0];
|
||||
};
|
||||
|
||||
/**
|
||||
* get_group_info - Get a reference to a group info structure
|
||||
* @group_info: The group info to reference
|
||||
*
|
||||
* This gets a reference to a set of supplementary groups.
|
||||
*
|
||||
* If the caller is accessing a task's credentials, they must hold the RCU read
|
||||
* lock when reading.
|
||||
*/
|
||||
static inline struct group_info *get_group_info(struct group_info *gi)
|
||||
{
|
||||
atomic_inc(&gi->usage);
|
||||
return gi;
|
||||
}
|
||||
|
||||
/**
|
||||
* put_group_info - Release a reference to a group info structure
|
||||
* @group_info: The group info to release
|
||||
*/
|
||||
#define put_group_info(group_info) \
|
||||
do { \
|
||||
if (atomic_dec_and_test(&(group_info)->usage)) \
|
||||
groups_free(group_info); \
|
||||
} while (0)
|
||||
|
||||
extern struct group_info *groups_alloc(int);
|
||||
extern struct group_info init_groups;
|
||||
extern void groups_free(struct group_info *);
|
||||
extern int set_current_groups(struct group_info *);
|
||||
extern int set_groups(struct cred *, struct group_info *);
|
||||
extern int groups_search(const struct group_info *, gid_t);
|
||||
|
||||
/* access the groups "array" with this macro */
|
||||
#define GROUP_AT(gi, i) \
|
||||
((gi)->blocks[(i) / NGROUPS_PER_BLOCK][(i) % NGROUPS_PER_BLOCK])
|
||||
|
||||
extern int in_group_p(gid_t);
|
||||
extern int in_egroup_p(gid_t);
|
||||
|
||||
/*
|
||||
* The common credentials for a thread group
|
||||
* - shared by CLONE_THREAD
|
||||
*/
|
||||
#ifdef CONFIG_KEYS
|
||||
struct thread_group_cred {
|
||||
atomic_t usage;
|
||||
pid_t tgid; /* thread group process ID */
|
||||
spinlock_t lock;
|
||||
struct key *session_keyring; /* keyring inherited over fork */
|
||||
struct key *process_keyring; /* keyring private to this process */
|
||||
struct rcu_head rcu; /* RCU deletion hook */
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The security context of a task
|
||||
*
|
||||
* The parts of the context break down into two categories:
|
||||
*
|
||||
* (1) The objective context of a task. These parts are used when some other
|
||||
* task is attempting to affect this one.
|
||||
*
|
||||
* (2) The subjective context. These details are used when the task is acting
|
||||
* upon another object, be that a file, a task, a key or whatever.
|
||||
*
|
||||
* Note that some members of this structure belong to both categories - the
|
||||
* LSM security pointer for instance.
|
||||
*
|
||||
* A task has two security pointers. task->real_cred points to the objective
|
||||
* context that defines that task's actual details. The objective part of this
|
||||
* context is used whenever that task is acted upon.
|
||||
*
|
||||
* task->cred points to the subjective context that defines the details of how
|
||||
* that task is going to act upon another object. This may be overridden
|
||||
* temporarily to point to another security context, but normally points to the
|
||||
* same context as task->real_cred.
|
||||
*/
|
||||
struct cred {
|
||||
atomic_t usage;
|
||||
uid_t uid; /* real UID of the task */
|
||||
gid_t gid; /* real GID of the task */
|
||||
uid_t suid; /* saved UID of the task */
|
||||
gid_t sgid; /* saved GID of the task */
|
||||
uid_t euid; /* effective UID of the task */
|
||||
gid_t egid; /* effective GID of the task */
|
||||
uid_t fsuid; /* UID for VFS ops */
|
||||
gid_t fsgid; /* GID for VFS ops */
|
||||
unsigned securebits; /* SUID-less security management */
|
||||
kernel_cap_t cap_inheritable; /* caps our children can inherit */
|
||||
kernel_cap_t cap_permitted; /* caps we're permitted */
|
||||
kernel_cap_t cap_effective; /* caps we can actually use */
|
||||
kernel_cap_t cap_bset; /* capability bounding set */
|
||||
#ifdef CONFIG_KEYS
|
||||
unsigned char jit_keyring; /* default keyring to attach requested
|
||||
* keys to */
|
||||
struct key *thread_keyring; /* keyring private to this thread */
|
||||
struct key *request_key_auth; /* assumed request_key authority */
|
||||
struct thread_group_cred *tgcred; /* thread-group shared credentials */
|
||||
#endif
|
||||
#ifdef CONFIG_SECURITY
|
||||
void *security; /* subjective LSM security */
|
||||
#endif
|
||||
struct user_struct *user; /* real user ID subscription */
|
||||
struct group_info *group_info; /* supplementary groups for euid/fsgid */
|
||||
struct rcu_head rcu; /* RCU deletion hook */
|
||||
};
|
||||
|
||||
extern void __put_cred(struct cred *);
|
||||
extern int copy_creds(struct task_struct *, unsigned long);
|
||||
extern struct cred *prepare_creds(void);
|
||||
extern struct cred *prepare_exec_creds(void);
|
||||
extern struct cred *prepare_usermodehelper_creds(void);
|
||||
extern int commit_creds(struct cred *);
|
||||
extern void abort_creds(struct cred *);
|
||||
extern const struct cred *override_creds(const struct cred *);
|
||||
extern void revert_creds(const struct cred *);
|
||||
extern struct cred *prepare_kernel_cred(struct task_struct *);
|
||||
extern int change_create_files_as(struct cred *, struct inode *);
|
||||
extern int set_security_override(struct cred *, u32);
|
||||
extern int set_security_override_from_ctx(struct cred *, const char *);
|
||||
extern int set_create_files_as(struct cred *, struct inode *);
|
||||
extern void __init cred_init(void);
|
||||
|
||||
/**
|
||||
* get_new_cred - Get a reference on a new set of credentials
|
||||
* @cred: The new credentials to reference
|
||||
*
|
||||
* Get a reference on the specified set of new credentials. The caller must
|
||||
* release the reference.
|
||||
*/
|
||||
static inline struct cred *get_new_cred(struct cred *cred)
|
||||
{
|
||||
atomic_inc(&cred->usage);
|
||||
return cred;
|
||||
}
|
||||
|
||||
/**
|
||||
* get_cred - Get a reference on a set of credentials
|
||||
* @cred: The credentials to reference
|
||||
*
|
||||
* Get a reference on the specified set of credentials. The caller must
|
||||
* release the reference.
|
||||
*
|
||||
* This is used to deal with a committed set of credentials. Although the
|
||||
* pointer is const, this will temporarily discard the const and increment the
|
||||
* usage count. The purpose of this is to attempt to catch at compile time the
|
||||
* accidental alteration of a set of credentials that should be considered
|
||||
* immutable.
|
||||
*/
|
||||
static inline const struct cred *get_cred(const struct cred *cred)
|
||||
{
|
||||
return get_new_cred((struct cred *) cred);
|
||||
}
|
||||
|
||||
/**
|
||||
* put_cred - Release a reference to a set of credentials
|
||||
* @cred: The credentials to release
|
||||
*
|
||||
* Release a reference to a set of credentials, deleting them when the last ref
|
||||
* is released.
|
||||
*
|
||||
* This takes a const pointer to a set of credentials because the credentials
|
||||
* on task_struct are attached by const pointers to prevent accidental
|
||||
* alteration of otherwise immutable credential sets.
|
||||
*/
|
||||
static inline void put_cred(const struct cred *_cred)
|
||||
{
|
||||
struct cred *cred = (struct cred *) _cred;
|
||||
|
||||
BUG_ON(atomic_read(&(cred)->usage) <= 0);
|
||||
if (atomic_dec_and_test(&(cred)->usage))
|
||||
__put_cred(cred);
|
||||
}
|
||||
|
||||
/**
|
||||
* current_cred - Access the current task's subjective credentials
|
||||
*
|
||||
* Access the subjective credentials of the current task.
|
||||
*/
|
||||
#define current_cred() \
|
||||
(current->cred)
|
||||
|
||||
/**
|
||||
* __task_cred - Access a task's objective credentials
|
||||
* @task: The task to query
|
||||
*
|
||||
* Access the objective credentials of a task. The caller must hold the RCU
|
||||
* readlock.
|
||||
*
|
||||
* The caller must make sure task doesn't go away, either by holding a ref on
|
||||
* task or by holding tasklist_lock to prevent it from being unlinked.
|
||||
*/
|
||||
#define __task_cred(task) \
|
||||
((const struct cred *)(rcu_dereference((task)->real_cred)))
|
||||
|
||||
/**
|
||||
* get_task_cred - Get another task's objective credentials
|
||||
* @task: The task to query
|
||||
*
|
||||
* Get the objective credentials of a task, pinning them so that they can't go
|
||||
* away. Accessing a task's credentials directly is not permitted.
|
||||
*
|
||||
* The caller must make sure task doesn't go away, either by holding a ref on
|
||||
* task or by holding tasklist_lock to prevent it from being unlinked.
|
||||
*/
|
||||
#define get_task_cred(task) \
|
||||
({ \
|
||||
struct cred *__cred; \
|
||||
rcu_read_lock(); \
|
||||
__cred = (struct cred *) __task_cred((task)); \
|
||||
get_cred(__cred); \
|
||||
rcu_read_unlock(); \
|
||||
__cred; \
|
||||
})
|
||||
|
||||
/**
|
||||
* get_current_cred - Get the current task's subjective credentials
|
||||
*
|
||||
* Get the subjective credentials of the current task, pinning them so that
|
||||
* they can't go away. Accessing the current task's credentials directly is
|
||||
* not permitted.
|
||||
*/
|
||||
#define get_current_cred() \
|
||||
(get_cred(current_cred()))
|
||||
|
||||
/**
|
||||
* get_current_user - Get the current task's user_struct
|
||||
*
|
||||
* Get the user record of the current task, pinning it so that it can't go
|
||||
* away.
|
||||
*/
|
||||
#define get_current_user() \
|
||||
({ \
|
||||
struct user_struct *__u; \
|
||||
struct cred *__cred; \
|
||||
__cred = (struct cred *) current_cred(); \
|
||||
__u = get_uid(__cred->user); \
|
||||
__u; \
|
||||
})
|
||||
|
||||
/**
|
||||
* get_current_groups - Get the current task's supplementary group list
|
||||
*
|
||||
* Get the supplementary group list of the current task, pinning it so that it
|
||||
* can't go away.
|
||||
*/
|
||||
#define get_current_groups() \
|
||||
({ \
|
||||
struct group_info *__groups; \
|
||||
struct cred *__cred; \
|
||||
__cred = (struct cred *) current_cred(); \
|
||||
__groups = get_group_info(__cred->group_info); \
|
||||
__groups; \
|
||||
})
|
||||
|
||||
#define task_cred_xxx(task, xxx) \
|
||||
({ \
|
||||
__typeof__(((struct cred *)NULL)->xxx) ___val; \
|
||||
rcu_read_lock(); \
|
||||
___val = __task_cred((task))->xxx; \
|
||||
rcu_read_unlock(); \
|
||||
___val; \
|
||||
})
|
||||
|
||||
#define task_uid(task) (task_cred_xxx((task), uid))
|
||||
#define task_euid(task) (task_cred_xxx((task), euid))
|
||||
|
||||
#define current_cred_xxx(xxx) \
|
||||
({ \
|
||||
current->cred->xxx; \
|
||||
})
|
||||
|
||||
#define current_uid() (current_cred_xxx(uid))
|
||||
#define current_gid() (current_cred_xxx(gid))
|
||||
#define current_euid() (current_cred_xxx(euid))
|
||||
#define current_egid() (current_cred_xxx(egid))
|
||||
#define current_suid() (current_cred_xxx(suid))
|
||||
#define current_sgid() (current_cred_xxx(sgid))
|
||||
#define current_fsuid() (current_cred_xxx(fsuid))
|
||||
#define current_fsgid() (current_cred_xxx(fsgid))
|
||||
#define current_cap() (current_cred_xxx(cap_effective))
|
||||
#define current_user() (current_cred_xxx(user))
|
||||
#define current_user_ns() (current_cred_xxx(user)->user_ns)
|
||||
#define current_security() (current_cred_xxx(security))
|
||||
|
||||
#define current_uid_gid(_uid, _gid) \
|
||||
do { \
|
||||
*(_uid) = current->uid; \
|
||||
*(_gid) = current->gid; \
|
||||
const struct cred *__cred; \
|
||||
__cred = current_cred(); \
|
||||
*(_uid) = __cred->uid; \
|
||||
*(_gid) = __cred->gid; \
|
||||
} while(0)
|
||||
|
||||
#define current_euid_egid(_uid, _gid) \
|
||||
#define current_euid_egid(_euid, _egid) \
|
||||
do { \
|
||||
*(_uid) = current->euid; \
|
||||
*(_gid) = current->egid; \
|
||||
const struct cred *__cred; \
|
||||
__cred = current_cred(); \
|
||||
*(_euid) = __cred->euid; \
|
||||
*(_egid) = __cred->egid; \
|
||||
} while(0)
|
||||
|
||||
#define current_fsuid_fsgid(_uid, _gid) \
|
||||
#define current_fsuid_fsgid(_fsuid, _fsgid) \
|
||||
do { \
|
||||
*(_uid) = current->fsuid; \
|
||||
*(_gid) = current->fsgid; \
|
||||
const struct cred *__cred; \
|
||||
__cred = current_cred(); \
|
||||
*(_fsuid) = __cred->fsuid; \
|
||||
*(_fsgid) = __cred->fsgid; \
|
||||
} while(0)
|
||||
|
||||
#endif /* _LINUX_CRED_H */
|
||||
|
@@ -36,7 +36,8 @@
|
||||
#define CRYPTO_ALG_TYPE_ABLKCIPHER 0x00000005
|
||||
#define CRYPTO_ALG_TYPE_GIVCIPHER 0x00000006
|
||||
#define CRYPTO_ALG_TYPE_DIGEST 0x00000008
|
||||
#define CRYPTO_ALG_TYPE_HASH 0x00000009
|
||||
#define CRYPTO_ALG_TYPE_HASH 0x00000008
|
||||
#define CRYPTO_ALG_TYPE_SHASH 0x00000009
|
||||
#define CRYPTO_ALG_TYPE_AHASH 0x0000000a
|
||||
#define CRYPTO_ALG_TYPE_RNG 0x0000000c
|
||||
|
||||
@@ -220,6 +221,7 @@ struct ablkcipher_alg {
|
||||
|
||||
struct ahash_alg {
|
||||
int (*init)(struct ahash_request *req);
|
||||
int (*reinit)(struct ahash_request *req);
|
||||
int (*update)(struct ahash_request *req);
|
||||
int (*final)(struct ahash_request *req);
|
||||
int (*digest)(struct ahash_request *req);
|
||||
@@ -480,6 +482,8 @@ struct crypto_tfm {
|
||||
struct compress_tfm compress;
|
||||
struct rng_tfm rng;
|
||||
} crt_u;
|
||||
|
||||
void (*exit)(struct crypto_tfm *tfm);
|
||||
|
||||
struct crypto_alg *__crt_alg;
|
||||
|
||||
@@ -544,7 +548,9 @@ struct crypto_attr_u32 {
|
||||
* Transform user interface.
|
||||
*/
|
||||
|
||||
struct crypto_tfm *crypto_alloc_tfm(const char *alg_name, u32 tfm_flags);
|
||||
struct crypto_tfm *crypto_alloc_tfm(const char *alg_name,
|
||||
const struct crypto_type *frontend,
|
||||
u32 type, u32 mask);
|
||||
struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask);
|
||||
void crypto_free_tfm(struct crypto_tfm *tfm);
|
||||
|
||||
|
@@ -75,14 +75,22 @@ full_name_hash(const unsigned char *name, unsigned int len)
|
||||
return end_name_hash(hash);
|
||||
}
|
||||
|
||||
struct dcookie_struct;
|
||||
|
||||
#define DNAME_INLINE_LEN_MIN 36
|
||||
/*
|
||||
* Try to keep struct dentry aligned on 64 byte cachelines (this will
|
||||
* give reasonable cacheline footprint with larger lines without the
|
||||
* large memory footprint increase).
|
||||
*/
|
||||
#ifdef CONFIG_64BIT
|
||||
#define DNAME_INLINE_LEN_MIN 32 /* 192 bytes */
|
||||
#else
|
||||
#define DNAME_INLINE_LEN_MIN 40 /* 128 bytes */
|
||||
#endif
|
||||
|
||||
struct dentry {
|
||||
atomic_t d_count;
|
||||
unsigned int d_flags; /* protected by d_lock */
|
||||
spinlock_t d_lock; /* per dentry lock */
|
||||
int d_mounted;
|
||||
struct inode *d_inode; /* Where the name belongs to - NULL is
|
||||
* negative */
|
||||
/*
|
||||
@@ -107,10 +115,7 @@ struct dentry {
|
||||
struct dentry_operations *d_op;
|
||||
struct super_block *d_sb; /* The root of the dentry tree */
|
||||
void *d_fsdata; /* fs-specific data */
|
||||
#ifdef CONFIG_PROFILING
|
||||
struct dcookie_struct *d_cookie; /* cookie, if any */
|
||||
#endif
|
||||
int d_mounted;
|
||||
|
||||
unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */
|
||||
};
|
||||
|
||||
@@ -177,6 +182,8 @@ d_iput: no no no yes
|
||||
|
||||
#define DCACHE_INOTIFY_PARENT_WATCHED 0x0020 /* Parent inode is watched */
|
||||
|
||||
#define DCACHE_COOKIE 0x0040 /* For use by dcookie subsystem */
|
||||
|
||||
extern spinlock_t dcache_lock;
|
||||
extern seqlock_t rename_lock;
|
||||
|
||||
|
340
include/linux/dcbnl.h
Normal file
340
include/linux/dcbnl.h
Normal file
@@ -0,0 +1,340 @@
|
||||
/*
|
||||
* Copyright (c) 2008, Intel Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
* Place - Suite 330, Boston, MA 02111-1307 USA.
|
||||
*
|
||||
* Author: Lucy Liu <lucy.liu@intel.com>
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_DCBNL_H__
|
||||
#define __LINUX_DCBNL_H__
|
||||
|
||||
#define DCB_PROTO_VERSION 1
|
||||
|
||||
struct dcbmsg {
|
||||
unsigned char dcb_family;
|
||||
__u8 cmd;
|
||||
__u16 dcb_pad;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum dcbnl_commands - supported DCB commands
|
||||
*
|
||||
* @DCB_CMD_UNDEFINED: unspecified command to catch errors
|
||||
* @DCB_CMD_GSTATE: request the state of DCB in the device
|
||||
* @DCB_CMD_SSTATE: set the state of DCB in the device
|
||||
* @DCB_CMD_PGTX_GCFG: request the priority group configuration for Tx
|
||||
* @DCB_CMD_PGTX_SCFG: set the priority group configuration for Tx
|
||||
* @DCB_CMD_PGRX_GCFG: request the priority group configuration for Rx
|
||||
* @DCB_CMD_PGRX_SCFG: set the priority group configuration for Rx
|
||||
* @DCB_CMD_PFC_GCFG: request the priority flow control configuration
|
||||
* @DCB_CMD_PFC_SCFG: set the priority flow control configuration
|
||||
* @DCB_CMD_SET_ALL: apply all changes to the underlying device
|
||||
* @DCB_CMD_GPERM_HWADDR: get the permanent MAC address of the underlying
|
||||
* device. Only useful when using bonding.
|
||||
* @DCB_CMD_GCAP: request the DCB capabilities of the device
|
||||
* @DCB_CMD_GNUMTCS: get the number of traffic classes currently supported
|
||||
* @DCB_CMD_SNUMTCS: set the number of traffic classes
|
||||
* @DCB_CMD_GBCN: set backward congestion notification configuration
|
||||
* @DCB_CMD_SBCN: get backward congestion notification configration.
|
||||
*/
|
||||
enum dcbnl_commands {
|
||||
DCB_CMD_UNDEFINED,
|
||||
|
||||
DCB_CMD_GSTATE,
|
||||
DCB_CMD_SSTATE,
|
||||
|
||||
DCB_CMD_PGTX_GCFG,
|
||||
DCB_CMD_PGTX_SCFG,
|
||||
DCB_CMD_PGRX_GCFG,
|
||||
DCB_CMD_PGRX_SCFG,
|
||||
|
||||
DCB_CMD_PFC_GCFG,
|
||||
DCB_CMD_PFC_SCFG,
|
||||
|
||||
DCB_CMD_SET_ALL,
|
||||
|
||||
DCB_CMD_GPERM_HWADDR,
|
||||
|
||||
DCB_CMD_GCAP,
|
||||
|
||||
DCB_CMD_GNUMTCS,
|
||||
DCB_CMD_SNUMTCS,
|
||||
|
||||
DCB_CMD_PFC_GSTATE,
|
||||
DCB_CMD_PFC_SSTATE,
|
||||
|
||||
DCB_CMD_BCN_GCFG,
|
||||
DCB_CMD_BCN_SCFG,
|
||||
|
||||
__DCB_CMD_ENUM_MAX,
|
||||
DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum dcbnl_attrs - DCB top-level netlink attributes
|
||||
*
|
||||
* @DCB_ATTR_UNDEFINED: unspecified attribute to catch errors
|
||||
* @DCB_ATTR_IFNAME: interface name of the underlying device (NLA_STRING)
|
||||
* @DCB_ATTR_STATE: enable state of DCB in the device (NLA_U8)
|
||||
* @DCB_ATTR_PFC_STATE: enable state of PFC in the device (NLA_U8)
|
||||
* @DCB_ATTR_PFC_CFG: priority flow control configuration (NLA_NESTED)
|
||||
* @DCB_ATTR_NUM_TC: number of traffic classes supported in the device (NLA_U8)
|
||||
* @DCB_ATTR_PG_CFG: priority group configuration (NLA_NESTED)
|
||||
* @DCB_ATTR_SET_ALL: bool to commit changes to hardware or not (NLA_U8)
|
||||
* @DCB_ATTR_PERM_HWADDR: MAC address of the physical device (NLA_NESTED)
|
||||
* @DCB_ATTR_CAP: DCB capabilities of the device (NLA_NESTED)
|
||||
* @DCB_ATTR_NUMTCS: number of traffic classes supported (NLA_NESTED)
|
||||
* @DCB_ATTR_BCN: backward congestion notification configuration (NLA_NESTED)
|
||||
*/
|
||||
enum dcbnl_attrs {
|
||||
DCB_ATTR_UNDEFINED,
|
||||
|
||||
DCB_ATTR_IFNAME,
|
||||
DCB_ATTR_STATE,
|
||||
DCB_ATTR_PFC_STATE,
|
||||
DCB_ATTR_PFC_CFG,
|
||||
DCB_ATTR_NUM_TC,
|
||||
DCB_ATTR_PG_CFG,
|
||||
DCB_ATTR_SET_ALL,
|
||||
DCB_ATTR_PERM_HWADDR,
|
||||
DCB_ATTR_CAP,
|
||||
DCB_ATTR_NUMTCS,
|
||||
DCB_ATTR_BCN,
|
||||
|
||||
__DCB_ATTR_ENUM_MAX,
|
||||
DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum dcbnl_pfc_attrs - DCB Priority Flow Control user priority nested attrs
|
||||
*
|
||||
* @DCB_PFC_UP_ATTR_UNDEFINED: unspecified attribute to catch errors
|
||||
* @DCB_PFC_UP_ATTR_0: Priority Flow Control value for User Priority 0 (NLA_U8)
|
||||
* @DCB_PFC_UP_ATTR_1: Priority Flow Control value for User Priority 1 (NLA_U8)
|
||||
* @DCB_PFC_UP_ATTR_2: Priority Flow Control value for User Priority 2 (NLA_U8)
|
||||
* @DCB_PFC_UP_ATTR_3: Priority Flow Control value for User Priority 3 (NLA_U8)
|
||||
* @DCB_PFC_UP_ATTR_4: Priority Flow Control value for User Priority 4 (NLA_U8)
|
||||
* @DCB_PFC_UP_ATTR_5: Priority Flow Control value for User Priority 5 (NLA_U8)
|
||||
* @DCB_PFC_UP_ATTR_6: Priority Flow Control value for User Priority 6 (NLA_U8)
|
||||
* @DCB_PFC_UP_ATTR_7: Priority Flow Control value for User Priority 7 (NLA_U8)
|
||||
* @DCB_PFC_UP_ATTR_MAX: highest attribute number currently defined
|
||||
* @DCB_PFC_UP_ATTR_ALL: apply to all priority flow control attrs (NLA_FLAG)
|
||||
*
|
||||
*/
|
||||
enum dcbnl_pfc_up_attrs {
|
||||
DCB_PFC_UP_ATTR_UNDEFINED,
|
||||
|
||||
DCB_PFC_UP_ATTR_0,
|
||||
DCB_PFC_UP_ATTR_1,
|
||||
DCB_PFC_UP_ATTR_2,
|
||||
DCB_PFC_UP_ATTR_3,
|
||||
DCB_PFC_UP_ATTR_4,
|
||||
DCB_PFC_UP_ATTR_5,
|
||||
DCB_PFC_UP_ATTR_6,
|
||||
DCB_PFC_UP_ATTR_7,
|
||||
DCB_PFC_UP_ATTR_ALL,
|
||||
|
||||
__DCB_PFC_UP_ATTR_ENUM_MAX,
|
||||
DCB_PFC_UP_ATTR_MAX = __DCB_PFC_UP_ATTR_ENUM_MAX - 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum dcbnl_pg_attrs - DCB Priority Group attributes
|
||||
*
|
||||
* @DCB_PG_ATTR_UNDEFINED: unspecified attribute to catch errors
|
||||
* @DCB_PG_ATTR_TC_0: Priority Group Traffic Class 0 configuration (NLA_NESTED)
|
||||
* @DCB_PG_ATTR_TC_1: Priority Group Traffic Class 1 configuration (NLA_NESTED)
|
||||
* @DCB_PG_ATTR_TC_2: Priority Group Traffic Class 2 configuration (NLA_NESTED)
|
||||
* @DCB_PG_ATTR_TC_3: Priority Group Traffic Class 3 configuration (NLA_NESTED)
|
||||
* @DCB_PG_ATTR_TC_4: Priority Group Traffic Class 4 configuration (NLA_NESTED)
|
||||
* @DCB_PG_ATTR_TC_5: Priority Group Traffic Class 5 configuration (NLA_NESTED)
|
||||
* @DCB_PG_ATTR_TC_6: Priority Group Traffic Class 6 configuration (NLA_NESTED)
|
||||
* @DCB_PG_ATTR_TC_7: Priority Group Traffic Class 7 configuration (NLA_NESTED)
|
||||
* @DCB_PG_ATTR_TC_MAX: highest attribute number currently defined
|
||||
* @DCB_PG_ATTR_TC_ALL: apply to all traffic classes (NLA_NESTED)
|
||||
* @DCB_PG_ATTR_BW_ID_0: Percent of link bandwidth for Priority Group 0 (NLA_U8)
|
||||
* @DCB_PG_ATTR_BW_ID_1: Percent of link bandwidth for Priority Group 1 (NLA_U8)
|
||||
* @DCB_PG_ATTR_BW_ID_2: Percent of link bandwidth for Priority Group 2 (NLA_U8)
|
||||
* @DCB_PG_ATTR_BW_ID_3: Percent of link bandwidth for Priority Group 3 (NLA_U8)
|
||||
* @DCB_PG_ATTR_BW_ID_4: Percent of link bandwidth for Priority Group 4 (NLA_U8)
|
||||
* @DCB_PG_ATTR_BW_ID_5: Percent of link bandwidth for Priority Group 5 (NLA_U8)
|
||||
* @DCB_PG_ATTR_BW_ID_6: Percent of link bandwidth for Priority Group 6 (NLA_U8)
|
||||
* @DCB_PG_ATTR_BW_ID_7: Percent of link bandwidth for Priority Group 7 (NLA_U8)
|
||||
* @DCB_PG_ATTR_BW_ID_MAX: highest attribute number currently defined
|
||||
* @DCB_PG_ATTR_BW_ID_ALL: apply to all priority groups (NLA_FLAG)
|
||||
*
|
||||
*/
|
||||
enum dcbnl_pg_attrs {
|
||||
DCB_PG_ATTR_UNDEFINED,
|
||||
|
||||
DCB_PG_ATTR_TC_0,
|
||||
DCB_PG_ATTR_TC_1,
|
||||
DCB_PG_ATTR_TC_2,
|
||||
DCB_PG_ATTR_TC_3,
|
||||
DCB_PG_ATTR_TC_4,
|
||||
DCB_PG_ATTR_TC_5,
|
||||
DCB_PG_ATTR_TC_6,
|
||||
DCB_PG_ATTR_TC_7,
|
||||
DCB_PG_ATTR_TC_MAX,
|
||||
DCB_PG_ATTR_TC_ALL,
|
||||
|
||||
DCB_PG_ATTR_BW_ID_0,
|
||||
DCB_PG_ATTR_BW_ID_1,
|
||||
DCB_PG_ATTR_BW_ID_2,
|
||||
DCB_PG_ATTR_BW_ID_3,
|
||||
DCB_PG_ATTR_BW_ID_4,
|
||||
DCB_PG_ATTR_BW_ID_5,
|
||||
DCB_PG_ATTR_BW_ID_6,
|
||||
DCB_PG_ATTR_BW_ID_7,
|
||||
DCB_PG_ATTR_BW_ID_MAX,
|
||||
DCB_PG_ATTR_BW_ID_ALL,
|
||||
|
||||
__DCB_PG_ATTR_ENUM_MAX,
|
||||
DCB_PG_ATTR_MAX = __DCB_PG_ATTR_ENUM_MAX - 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum dcbnl_tc_attrs - DCB Traffic Class attributes
|
||||
*
|
||||
* @DCB_TC_ATTR_PARAM_UNDEFINED: unspecified attribute to catch errors
|
||||
* @DCB_TC_ATTR_PARAM_PGID: (NLA_U8) Priority group the traffic class belongs to
|
||||
* Valid values are: 0-7
|
||||
* @DCB_TC_ATTR_PARAM_UP_MAPPING: (NLA_U8) Traffic class to user priority map
|
||||
* Some devices may not support changing the
|
||||
* user priority map of a TC.
|
||||
* @DCB_TC_ATTR_PARAM_STRICT_PRIO: (NLA_U8) Strict priority setting
|
||||
* 0 - none
|
||||
* 1 - group strict
|
||||
* 2 - link strict
|
||||
* @DCB_TC_ATTR_PARAM_BW_PCT: optional - (NLA_U8) If supported by the device and
|
||||
* not configured to use link strict priority,
|
||||
* this is the percentage of bandwidth of the
|
||||
* priority group this traffic class belongs to
|
||||
* @DCB_TC_ATTR_PARAM_ALL: (NLA_FLAG) all traffic class parameters
|
||||
*
|
||||
*/
|
||||
enum dcbnl_tc_attrs {
|
||||
DCB_TC_ATTR_PARAM_UNDEFINED,
|
||||
|
||||
DCB_TC_ATTR_PARAM_PGID,
|
||||
DCB_TC_ATTR_PARAM_UP_MAPPING,
|
||||
DCB_TC_ATTR_PARAM_STRICT_PRIO,
|
||||
DCB_TC_ATTR_PARAM_BW_PCT,
|
||||
DCB_TC_ATTR_PARAM_ALL,
|
||||
|
||||
__DCB_TC_ATTR_PARAM_ENUM_MAX,
|
||||
DCB_TC_ATTR_PARAM_MAX = __DCB_TC_ATTR_PARAM_ENUM_MAX - 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum dcbnl_cap_attrs - DCB Capability attributes
|
||||
*
|
||||
* @DCB_CAP_ATTR_UNDEFINED: unspecified attribute to catch errors
|
||||
* @DCB_CAP_ATTR_ALL: (NLA_FLAG) all capability parameters
|
||||
* @DCB_CAP_ATTR_PG: (NLA_U8) device supports Priority Groups
|
||||
* @DCB_CAP_ATTR_PFC: (NLA_U8) device supports Priority Flow Control
|
||||
* @DCB_CAP_ATTR_UP2TC: (NLA_U8) device supports user priority to
|
||||
* traffic class mapping
|
||||
* @DCB_CAP_ATTR_PG_TCS: (NLA_U8) bitmap where each bit represents a
|
||||
* number of traffic classes the device
|
||||
* can be configured to use for Priority Groups
|
||||
* @DCB_CAP_ATTR_PFC_TCS: (NLA_U8) bitmap where each bit represents a
|
||||
* number of traffic classes the device can be
|
||||
* configured to use for Priority Flow Control
|
||||
* @DCB_CAP_ATTR_GSP: (NLA_U8) device supports group strict priority
|
||||
* @DCB_CAP_ATTR_BCN: (NLA_U8) device supports Backwards Congestion
|
||||
* Notification
|
||||
*/
|
||||
enum dcbnl_cap_attrs {
|
||||
DCB_CAP_ATTR_UNDEFINED,
|
||||
DCB_CAP_ATTR_ALL,
|
||||
DCB_CAP_ATTR_PG,
|
||||
DCB_CAP_ATTR_PFC,
|
||||
DCB_CAP_ATTR_UP2TC,
|
||||
DCB_CAP_ATTR_PG_TCS,
|
||||
DCB_CAP_ATTR_PFC_TCS,
|
||||
DCB_CAP_ATTR_GSP,
|
||||
DCB_CAP_ATTR_BCN,
|
||||
|
||||
__DCB_CAP_ATTR_ENUM_MAX,
|
||||
DCB_CAP_ATTR_MAX = __DCB_CAP_ATTR_ENUM_MAX - 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum dcbnl_numtcs_attrs - number of traffic classes
|
||||
*
|
||||
* @DCB_NUMTCS_ATTR_UNDEFINED: unspecified attribute to catch errors
|
||||
* @DCB_NUMTCS_ATTR_ALL: (NLA_FLAG) all traffic class attributes
|
||||
* @DCB_NUMTCS_ATTR_PG: (NLA_U8) number of traffic classes used for
|
||||
* priority groups
|
||||
* @DCB_NUMTCS_ATTR_PFC: (NLA_U8) number of traffic classes which can
|
||||
* support priority flow control
|
||||
*/
|
||||
enum dcbnl_numtcs_attrs {
|
||||
DCB_NUMTCS_ATTR_UNDEFINED,
|
||||
DCB_NUMTCS_ATTR_ALL,
|
||||
DCB_NUMTCS_ATTR_PG,
|
||||
DCB_NUMTCS_ATTR_PFC,
|
||||
|
||||
__DCB_NUMTCS_ATTR_ENUM_MAX,
|
||||
DCB_NUMTCS_ATTR_MAX = __DCB_NUMTCS_ATTR_ENUM_MAX - 1,
|
||||
};
|
||||
|
||||
enum dcbnl_bcn_attrs{
|
||||
DCB_BCN_ATTR_UNDEFINED = 0,
|
||||
|
||||
DCB_BCN_ATTR_RP_0,
|
||||
DCB_BCN_ATTR_RP_1,
|
||||
DCB_BCN_ATTR_RP_2,
|
||||
DCB_BCN_ATTR_RP_3,
|
||||
DCB_BCN_ATTR_RP_4,
|
||||
DCB_BCN_ATTR_RP_5,
|
||||
DCB_BCN_ATTR_RP_6,
|
||||
DCB_BCN_ATTR_RP_7,
|
||||
DCB_BCN_ATTR_RP_ALL,
|
||||
|
||||
DCB_BCN_ATTR_BCNA_0,
|
||||
DCB_BCN_ATTR_BCNA_1,
|
||||
DCB_BCN_ATTR_ALPHA,
|
||||
DCB_BCN_ATTR_BETA,
|
||||
DCB_BCN_ATTR_GD,
|
||||
DCB_BCN_ATTR_GI,
|
||||
DCB_BCN_ATTR_TMAX,
|
||||
DCB_BCN_ATTR_TD,
|
||||
DCB_BCN_ATTR_RMIN,
|
||||
DCB_BCN_ATTR_W,
|
||||
DCB_BCN_ATTR_RD,
|
||||
DCB_BCN_ATTR_RU,
|
||||
DCB_BCN_ATTR_WRTT,
|
||||
DCB_BCN_ATTR_RI,
|
||||
DCB_BCN_ATTR_C,
|
||||
DCB_BCN_ATTR_ALL,
|
||||
|
||||
__DCB_BCN_ATTR_ENUM_MAX,
|
||||
DCB_BCN_ATTR_MAX = __DCB_BCN_ATTR_ENUM_MAX - 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum dcb_general_attr_values - general DCB attribute values
|
||||
*
|
||||
* @DCB_ATTR_UNDEFINED: value used to indicate an attribute is not supported
|
||||
*
|
||||
*/
|
||||
enum dcb_general_attr_values {
|
||||
DCB_ATTR_VALUE_UNDEFINED = 0xff
|
||||
};
|
||||
|
||||
|
||||
#endif /* __LINUX_DCBNL_H__ */
|
@@ -168,6 +168,8 @@ enum {
|
||||
DCCPO_MIN_CCID_SPECIFIC = 128,
|
||||
DCCPO_MAX_CCID_SPECIFIC = 255,
|
||||
};
|
||||
/* maximum size of a single TLV-encoded DCCP option (sans type/len bytes) */
|
||||
#define DCCP_SINGLE_OPT_MAXLEN 253
|
||||
|
||||
/* DCCP CCIDS */
|
||||
enum {
|
||||
@@ -176,29 +178,23 @@ enum {
|
||||
};
|
||||
|
||||
/* DCCP features (RFC 4340 section 6.4) */
|
||||
enum {
|
||||
enum dccp_feature_numbers {
|
||||
DCCPF_RESERVED = 0,
|
||||
DCCPF_CCID = 1,
|
||||
DCCPF_SHORT_SEQNOS = 2, /* XXX: not yet implemented */
|
||||
DCCPF_SHORT_SEQNOS = 2,
|
||||
DCCPF_SEQUENCE_WINDOW = 3,
|
||||
DCCPF_ECN_INCAPABLE = 4, /* XXX: not yet implemented */
|
||||
DCCPF_ECN_INCAPABLE = 4,
|
||||
DCCPF_ACK_RATIO = 5,
|
||||
DCCPF_SEND_ACK_VECTOR = 6,
|
||||
DCCPF_SEND_NDP_COUNT = 7,
|
||||
DCCPF_MIN_CSUM_COVER = 8,
|
||||
DCCPF_DATA_CHECKSUM = 9, /* XXX: not yet implemented */
|
||||
DCCPF_DATA_CHECKSUM = 9,
|
||||
/* 10-127 reserved */
|
||||
DCCPF_MIN_CCID_SPECIFIC = 128,
|
||||
DCCPF_SEND_LEV_RATE = 192, /* RFC 4342, sec. 8.4 */
|
||||
DCCPF_MAX_CCID_SPECIFIC = 255,
|
||||
};
|
||||
|
||||
/* this structure is argument to DCCP_SOCKOPT_CHANGE_X */
|
||||
struct dccp_so_feat {
|
||||
__u8 dccpsf_feat;
|
||||
__u8 __user *dccpsf_val;
|
||||
__u8 dccpsf_len;
|
||||
};
|
||||
|
||||
/* DCCP socket options */
|
||||
#define DCCP_SOCKOPT_PACKET_SIZE 1 /* XXX deprecated, without effect */
|
||||
#define DCCP_SOCKOPT_SERVICE 2
|
||||
@@ -208,6 +204,10 @@ struct dccp_so_feat {
|
||||
#define DCCP_SOCKOPT_SERVER_TIMEWAIT 6
|
||||
#define DCCP_SOCKOPT_SEND_CSCOV 10
|
||||
#define DCCP_SOCKOPT_RECV_CSCOV 11
|
||||
#define DCCP_SOCKOPT_AVAILABLE_CCIDS 12
|
||||
#define DCCP_SOCKOPT_CCID 13
|
||||
#define DCCP_SOCKOPT_TX_CCID 14
|
||||
#define DCCP_SOCKOPT_RX_CCID 15
|
||||
#define DCCP_SOCKOPT_CCID_RX_INFO 128
|
||||
#define DCCP_SOCKOPT_CCID_TX_INFO 192
|
||||
|
||||
@@ -360,7 +360,6 @@ static inline unsigned int dccp_hdr_len(const struct sk_buff *skb)
|
||||
#define DCCPF_INITIAL_SEQUENCE_WINDOW 100
|
||||
#define DCCPF_INITIAL_ACK_RATIO 2
|
||||
#define DCCPF_INITIAL_CCID DCCPC_CCID2
|
||||
#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
|
||||
|
||||
@@ -370,20 +369,11 @@ static inline unsigned int dccp_hdr_len(const struct sk_buff *skb)
|
||||
* 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)
|
||||
* @dccpms_ack_ratio - Ack Ratio Feature (section 11.3)
|
||||
* @dccpms_pending - List of features being negotiated
|
||||
* @dccpms_conf -
|
||||
*/
|
||||
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;
|
||||
};
|
||||
@@ -411,6 +401,7 @@ extern void dccp_minisock_init(struct dccp_minisock *dmsk);
|
||||
* @dreq_iss: initial sequence number sent on the Response (RFC 4340, 7.1)
|
||||
* @dreq_isr: initial sequence number received on the Request
|
||||
* @dreq_service: service code present on the Request (there is just one)
|
||||
* @dreq_featneg: feature negotiation options for this connection
|
||||
* The following two fields are analogous to the ones in dccp_sock:
|
||||
* @dreq_timestamp_echo: last received timestamp to echo (13.1)
|
||||
* @dreq_timestamp_echo: the time of receiving the last @dreq_timestamp_echo
|
||||
@@ -420,6 +411,7 @@ struct dccp_request_sock {
|
||||
__u64 dreq_iss;
|
||||
__u64 dreq_isr;
|
||||
__be32 dreq_service;
|
||||
struct list_head dreq_featneg;
|
||||
__u32 dreq_timestamp_echo;
|
||||
__u32 dreq_timestamp_time;
|
||||
};
|
||||
@@ -493,10 +485,12 @@ struct dccp_ackvec;
|
||||
* @dccps_r_ack_ratio - feature-remote Ack Ratio
|
||||
* @dccps_pcslen - sender partial checksum coverage (via sockopt)
|
||||
* @dccps_pcrlen - receiver partial checksum coverage (via sockopt)
|
||||
* @dccps_send_ndp_count - local Send NDP Count feature (7.7.2)
|
||||
* @dccps_ndp_count - number of Non Data Packets since last data packet
|
||||
* @dccps_mss_cache - current value of MSS (path MTU minus header sizes)
|
||||
* @dccps_rate_last - timestamp for rate-limiting DCCP-Sync (RFC 4340, 7.5.4)
|
||||
* @dccps_minisock - associated minisock (accessed via dccp_msk)
|
||||
* @dccps_featneg - tracks feature-negotiation state (mostly during handshake)
|
||||
* @dccps_hc_rx_ackvec - rx half connection ack vector
|
||||
* @dccps_hc_rx_ccid - CCID used for the receiver (or receiving half-connection)
|
||||
* @dccps_hc_tx_ccid - CCID used for the sender (or sending half-connection)
|
||||
@@ -529,11 +523,13 @@ struct dccp_sock {
|
||||
__u32 dccps_timestamp_time;
|
||||
__u16 dccps_l_ack_ratio;
|
||||
__u16 dccps_r_ack_ratio;
|
||||
__u16 dccps_pcslen;
|
||||
__u16 dccps_pcrlen;
|
||||
__u8 dccps_pcslen:4;
|
||||
__u8 dccps_pcrlen:4;
|
||||
__u8 dccps_send_ndp_count:1;
|
||||
__u64 dccps_ndp_count:48;
|
||||
unsigned long dccps_rate_last;
|
||||
struct dccp_minisock dccps_minisock;
|
||||
struct list_head dccps_featneg;
|
||||
struct dccp_ackvec *dccps_hc_rx_ackvec;
|
||||
struct ccid *dccps_hc_rx_ccid;
|
||||
struct ccid *dccps_hc_tx_ccid;
|
||||
|
@@ -17,7 +17,7 @@ extern int debug_locks_off(void);
|
||||
({ \
|
||||
int __ret = 0; \
|
||||
\
|
||||
if (unlikely(c)) { \
|
||||
if (!oops_in_progress && unlikely(c)) { \
|
||||
if (debug_locks_off() && !debug_locks_silent) \
|
||||
WARN_ON(1); \
|
||||
__ret = 1; \
|
||||
|
@@ -44,8 +44,10 @@ extern const struct dmi_device * dmi_find_device(int type, const char *name,
|
||||
extern void dmi_scan_machine(void);
|
||||
extern int dmi_get_year(int field);
|
||||
extern int dmi_name_in_vendors(const char *str);
|
||||
extern int dmi_name_in_serial(const char *str);
|
||||
extern int dmi_available;
|
||||
extern int dmi_walk(void (*decode)(const struct dmi_header *));
|
||||
extern bool dmi_match(enum dmi_field f, const char *str);
|
||||
|
||||
#else
|
||||
|
||||
@@ -56,9 +58,12 @@ static inline const struct dmi_device * dmi_find_device(int type, const char *na
|
||||
static inline void dmi_scan_machine(void) { return; }
|
||||
static inline int dmi_get_year(int year) { return 0; }
|
||||
static inline int dmi_name_in_vendors(const char *s) { return 0; }
|
||||
static inline int dmi_name_in_serial(const char *s) { return 0; }
|
||||
#define dmi_available 0
|
||||
static inline int dmi_walk(void (*decode)(const struct dmi_header *))
|
||||
{ return -1; }
|
||||
static inline bool dmi_match(enum dmi_field f, const char *str)
|
||||
{ return false; }
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -28,7 +28,7 @@ typedef void (elevator_activate_req_fn) (struct request_queue *, struct request
|
||||
typedef void (elevator_deactivate_req_fn) (struct request_queue *, struct request *);
|
||||
|
||||
typedef void *(elevator_init_fn) (struct request_queue *);
|
||||
typedef void (elevator_exit_fn) (elevator_t *);
|
||||
typedef void (elevator_exit_fn) (struct elevator_queue *);
|
||||
|
||||
struct elevator_ops
|
||||
{
|
||||
@@ -62,8 +62,8 @@ struct elevator_ops
|
||||
|
||||
struct elv_fs_entry {
|
||||
struct attribute attr;
|
||||
ssize_t (*show)(elevator_t *, char *);
|
||||
ssize_t (*store)(elevator_t *, const char *, size_t);
|
||||
ssize_t (*show)(struct elevator_queue *, char *);
|
||||
ssize_t (*store)(struct elevator_queue *, const char *, size_t);
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -130,7 +130,7 @@ extern ssize_t elv_iosched_show(struct request_queue *, char *);
|
||||
extern ssize_t elv_iosched_store(struct request_queue *, const char *, size_t);
|
||||
|
||||
extern int elevator_init(struct request_queue *, char *);
|
||||
extern void elevator_exit(elevator_t *);
|
||||
extern void elevator_exit(struct elevator_queue *);
|
||||
extern int elv_rq_merge_ok(struct request *, struct bio *);
|
||||
|
||||
/*
|
||||
|
@@ -27,6 +27,7 @@
|
||||
#include <linux/if_ether.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/random.h>
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
extern __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev);
|
||||
@@ -41,6 +42,10 @@ extern int eth_header_cache(const struct neighbour *neigh, struct hh_cache *hh);
|
||||
extern void eth_header_cache_update(struct hh_cache *hh,
|
||||
const struct net_device *dev,
|
||||
const unsigned char *haddr);
|
||||
extern int eth_mac_addr(struct net_device *dev, void *p);
|
||||
extern int eth_change_mtu(struct net_device *dev, int new_mtu);
|
||||
extern int eth_validate_addr(struct net_device *dev);
|
||||
|
||||
|
||||
|
||||
extern struct net_device *alloc_etherdev_mq(int sizeof_priv, unsigned int queue_count);
|
||||
@@ -136,6 +141,47 @@ static inline unsigned compare_ether_addr(const u8 *addr1, const u8 *addr2)
|
||||
BUILD_BUG_ON(ETH_ALEN != 6);
|
||||
return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) != 0;
|
||||
}
|
||||
|
||||
static inline unsigned long zap_last_2bytes(unsigned long value)
|
||||
{
|
||||
#ifdef __BIG_ENDIAN
|
||||
return value >> 16;
|
||||
#else
|
||||
return value << 16;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* compare_ether_addr_64bits - Compare two Ethernet addresses
|
||||
* @addr1: Pointer to an array of 8 bytes
|
||||
* @addr2: Pointer to an other array of 8 bytes
|
||||
*
|
||||
* Compare two ethernet addresses, returns 0 if equal.
|
||||
* Same result than "memcmp(addr1, addr2, ETH_ALEN)" but without conditional
|
||||
* branches, and possibly long word memory accesses on CPU allowing cheap
|
||||
* unaligned memory reads.
|
||||
* arrays = { byte1, byte2, byte3, byte4, byte6, byte7, pad1, pad2}
|
||||
*
|
||||
* Please note that alignment of addr1 & addr2 is only guaranted to be 16 bits.
|
||||
*/
|
||||
|
||||
static inline unsigned compare_ether_addr_64bits(const u8 addr1[6+2],
|
||||
const u8 addr2[6+2])
|
||||
{
|
||||
#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||
unsigned long fold = ((*(unsigned long *)addr1) ^
|
||||
(*(unsigned long *)addr2));
|
||||
|
||||
if (sizeof(fold) == 8)
|
||||
return zap_last_2bytes(fold) != 0;
|
||||
|
||||
fold |= zap_last_2bytes((*(unsigned long *)(addr1 + 4)) ^
|
||||
(*(unsigned long *)(addr2 + 4)));
|
||||
return fold != 0;
|
||||
#else
|
||||
return compare_ether_addr(addr1, addr2);
|
||||
#endif
|
||||
}
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _LINUX_ETHERDEVICE_H */
|
||||
|
@@ -467,6 +467,8 @@ struct ethtool_ops {
|
||||
|
||||
#define ETHTOOL_GRXFH 0x00000029 /* Get RX flow hash configuration */
|
||||
#define ETHTOOL_SRXFH 0x0000002a /* Set RX flow hash configuration */
|
||||
#define ETHTOOL_GGRO 0x0000002b /* Get GRO enable (ethtool_value) */
|
||||
#define ETHTOOL_SGRO 0x0000002c /* Set GRO enable (ethtool_value) */
|
||||
|
||||
/* compatibility with older code */
|
||||
#define SPARC_ETH_GSET ETHTOOL_GSET
|
||||
|
@@ -81,4 +81,13 @@ static inline void cleanup_fault_attr_dentries(struct fault_attr *attr)
|
||||
|
||||
#endif /* CONFIG_FAULT_INJECTION */
|
||||
|
||||
#ifdef CONFIG_FAILSLAB
|
||||
extern bool should_failslab(size_t size, gfp_t gfpflags);
|
||||
#else
|
||||
static inline bool should_failslab(size_t size, gfp_t gfpflags)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif /* CONFIG_FAILSLAB */
|
||||
|
||||
#endif /* _LINUX_FAULT_INJECT_H */
|
||||
|
@@ -888,7 +888,7 @@ struct fb_info {
|
||||
#define fb_writeq sbus_writeq
|
||||
#define fb_memset sbus_memset_io
|
||||
|
||||
#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || (defined(__sh__) && !defined(__SH5__)) || defined(__powerpc__) || defined(__avr32__)
|
||||
#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || defined(__sh__) || defined(__powerpc__) || defined(__avr32__)
|
||||
|
||||
#define fb_readb __raw_readb
|
||||
#define fb_readw __raw_readw
|
||||
|
@@ -27,6 +27,7 @@
|
||||
#ifdef __KERNEL__
|
||||
extern __be16 fddi_type_trans(struct sk_buff *skb,
|
||||
struct net_device *dev);
|
||||
extern int fddi_change_mtu(struct net_device *dev, int new_mtu);
|
||||
extern struct net_device *alloc_fddidev(int sizeof_priv);
|
||||
#endif
|
||||
|
||||
|
@@ -57,8 +57,6 @@ struct files_struct {
|
||||
|
||||
#define files_fdtable(files) (rcu_dereference((files)->fdt))
|
||||
|
||||
extern struct kmem_cache *filp_cachep;
|
||||
|
||||
struct file_operations;
|
||||
struct vfsmount;
|
||||
struct dentry;
|
||||
|
@@ -122,7 +122,8 @@ struct sock_fprog /* Required for SO_ATTACH_FILTER. */
|
||||
#define SKF_AD_PKTTYPE 4
|
||||
#define SKF_AD_IFINDEX 8
|
||||
#define SKF_AD_NLATTR 12
|
||||
#define SKF_AD_MAX 16
|
||||
#define SKF_AD_NLATTR_NEST 16
|
||||
#define SKF_AD_MAX 20
|
||||
#define SKF_NET_OFF (-0x100000)
|
||||
#define SKF_LL_OFF (-0x200000)
|
||||
|
||||
|
@@ -21,7 +21,6 @@
|
||||
|
||||
/* Fixed constants first: */
|
||||
#undef NR_OPEN
|
||||
extern int sysctl_nr_open;
|
||||
#define INR_OPEN 1024 /* Initial setting for nfile rlimits */
|
||||
|
||||
#define BLOCK_SIZE_BITS 10
|
||||
@@ -38,21 +37,13 @@ struct files_stat_struct {
|
||||
int nr_free_files; /* read only */
|
||||
int max_files; /* tunable */
|
||||
};
|
||||
extern struct files_stat_struct files_stat;
|
||||
extern int get_max_files(void);
|
||||
|
||||
struct inodes_stat_t {
|
||||
int nr_inodes;
|
||||
int nr_unused;
|
||||
int dummy[5]; /* padding for sysctl ABI compatibility */
|
||||
};
|
||||
extern struct inodes_stat_t inodes_stat;
|
||||
|
||||
extern int leases_enable, lease_break_time;
|
||||
|
||||
#ifdef CONFIG_DNOTIFY
|
||||
extern int dir_notify_enable;
|
||||
#endif
|
||||
|
||||
#define NR_FILE 8192 /* this can well be larger on a larger system */
|
||||
|
||||
@@ -82,6 +73,14 @@ extern int dir_notify_enable;
|
||||
(specialy hack for floppy.c) */
|
||||
#define FMODE_WRITE_IOCTL ((__force fmode_t)128)
|
||||
|
||||
/*
|
||||
* Don't update ctime and mtime.
|
||||
*
|
||||
* Currently a special hack for the XFS open_by_handle ioctl, but we'll
|
||||
* hopefully graduate it to a proper O_CMTIME flag supported by open(2) soon.
|
||||
*/
|
||||
#define FMODE_NOCMTIME ((__force fmode_t)2048)
|
||||
|
||||
#define RW_MASK 1
|
||||
#define RWA_MASK 2
|
||||
#define READ 0
|
||||
@@ -316,11 +315,21 @@ struct poll_table_struct;
|
||||
struct kstatfs;
|
||||
struct vm_area_struct;
|
||||
struct vfsmount;
|
||||
struct cred;
|
||||
|
||||
extern void __init inode_init(void);
|
||||
extern void __init inode_init_early(void);
|
||||
extern void __init files_init(unsigned long);
|
||||
|
||||
extern struct files_stat_struct files_stat;
|
||||
extern int get_max_files(void);
|
||||
extern int sysctl_nr_open;
|
||||
extern struct inodes_stat_t inodes_stat;
|
||||
extern int leases_enable, lease_break_time;
|
||||
#ifdef CONFIG_DNOTIFY
|
||||
extern int dir_notify_enable;
|
||||
#endif
|
||||
|
||||
struct buffer_head;
|
||||
typedef int (get_block_t)(struct inode *inode, sector_t iblock,
|
||||
struct buffer_head *bh_result, int create);
|
||||
@@ -827,7 +836,7 @@ struct file {
|
||||
fmode_t f_mode;
|
||||
loff_t f_pos;
|
||||
struct fown_struct f_owner;
|
||||
unsigned int f_uid, f_gid;
|
||||
const struct cred *f_cred;
|
||||
struct file_ra_state f_ra;
|
||||
|
||||
u64 f_version;
|
||||
@@ -1194,7 +1203,7 @@ enum {
|
||||
#define has_fs_excl() atomic_read(¤t->fs_excl)
|
||||
|
||||
#define is_owner_or_cap(inode) \
|
||||
((current->fsuid == (inode)->i_uid) || capable(CAP_FOWNER))
|
||||
((current_fsuid() == (inode)->i_uid) || capable(CAP_FOWNER))
|
||||
|
||||
/* not quite ready to be deprecated, but... */
|
||||
extern void lock_super(struct super_block *);
|
||||
@@ -1203,7 +1212,6 @@ extern void unlock_super(struct super_block *);
|
||||
/*
|
||||
* VFS helper functions..
|
||||
*/
|
||||
extern int vfs_permission(struct nameidata *, int);
|
||||
extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *);
|
||||
extern int vfs_mkdir(struct inode *, struct dentry *, int);
|
||||
extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t);
|
||||
@@ -1301,7 +1309,6 @@ struct file_operations {
|
||||
ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);
|
||||
unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
|
||||
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 pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
|
||||
ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
|
||||
@@ -1674,7 +1681,8 @@ extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs,
|
||||
extern long do_sys_open(int dfd, const char __user *filename, int flags,
|
||||
int mode);
|
||||
extern struct file *filp_open(const char *, int, int);
|
||||
extern struct file * dentry_open(struct dentry *, struct vfsmount *, int);
|
||||
extern struct file * dentry_open(struct dentry *, struct vfsmount *, int,
|
||||
const struct cred *);
|
||||
extern int filp_close(struct file *, fl_owner_t id);
|
||||
extern char * getname(const char __user *);
|
||||
|
||||
@@ -1859,7 +1867,7 @@ extern void free_write_pipe(struct file *);
|
||||
|
||||
extern struct file *do_filp_open(int dfd, const char *pathname,
|
||||
int open_flag, int mode);
|
||||
extern int may_open(struct nameidata *, int, int);
|
||||
extern int may_open(struct path *, int, int);
|
||||
|
||||
extern int kernel_read(struct file *, unsigned long, char *, unsigned long);
|
||||
extern struct file * open_exec(const char *);
|
||||
@@ -1875,7 +1883,9 @@ extern loff_t default_llseek(struct file *file, loff_t offset, int origin);
|
||||
|
||||
extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin);
|
||||
|
||||
extern struct inode * inode_init_always(struct super_block *, struct inode *);
|
||||
extern void inode_init_once(struct inode *);
|
||||
extern void inode_add_to_lists(struct super_block *, struct inode *);
|
||||
extern void iput(struct inode *);
|
||||
extern struct inode * igrab(struct inode *);
|
||||
extern ino_t iunique(struct super_block *, ino_t);
|
||||
@@ -1892,6 +1902,8 @@ extern struct inode *ilookup(struct super_block *sb, unsigned long ino);
|
||||
|
||||
extern struct inode * iget5_locked(struct super_block *, unsigned long, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *);
|
||||
extern struct inode * iget_locked(struct super_block *, unsigned long);
|
||||
extern int insert_inode_locked4(struct inode *, unsigned long, int (*test)(struct inode *, void *), void *);
|
||||
extern int insert_inode_locked(struct inode *);
|
||||
extern void unlock_new_inode(struct inode *);
|
||||
|
||||
extern void __iget(struct inode * inode);
|
||||
|
@@ -10,12 +10,6 @@ struct fs_struct {
|
||||
struct path root, pwd;
|
||||
};
|
||||
|
||||
#define INIT_FS { \
|
||||
.count = ATOMIC_INIT(1), \
|
||||
.lock = RW_LOCK_UNLOCKED, \
|
||||
.umask = 0022, \
|
||||
}
|
||||
|
||||
extern struct kmem_cache *fs_cachep;
|
||||
|
||||
extern void exit_fs(struct task_struct *);
|
||||
|
@@ -47,12 +47,7 @@
|
||||
struct gianfar_platform_data {
|
||||
/* device specific information */
|
||||
u32 device_flags;
|
||||
/* board specific information */
|
||||
u32 board_flags;
|
||||
int mdio_bus; /* Bus controlled by us */
|
||||
char bus_id[MII_BUS_ID_SIZE]; /* Bus PHY is on */
|
||||
u32 phy_id;
|
||||
u8 mac_addr[6];
|
||||
char bus_id[BUS_ID_SIZE];
|
||||
phy_interface_t interface;
|
||||
};
|
||||
|
||||
@@ -61,17 +56,6 @@ struct gianfar_mdio_data {
|
||||
int irq[32];
|
||||
};
|
||||
|
||||
/* Flags related to gianfar device features */
|
||||
#define FSL_GIANFAR_DEV_HAS_GIGABIT 0x00000001
|
||||
#define FSL_GIANFAR_DEV_HAS_COALESCE 0x00000002
|
||||
#define FSL_GIANFAR_DEV_HAS_RMON 0x00000004
|
||||
#define FSL_GIANFAR_DEV_HAS_MULTI_INTR 0x00000008
|
||||
#define FSL_GIANFAR_DEV_HAS_CSUM 0x00000010
|
||||
#define FSL_GIANFAR_DEV_HAS_VLAN 0x00000020
|
||||
#define FSL_GIANFAR_DEV_HAS_EXTENDED_HASH 0x00000040
|
||||
#define FSL_GIANFAR_DEV_HAS_PADDING 0x00000080
|
||||
#define FSL_GIANFAR_DEV_HAS_MAGIC_PACKET 0x00000100
|
||||
|
||||
/* Flags in gianfar_platform_data */
|
||||
#define FSL_GIANFAR_BRD_HAS_PHY_INTR 0x00000001 /* set or use a timer */
|
||||
#define FSL_GIANFAR_BRD_IS_REDUCED 0x00000002 /* Set if RGMII, RMII */
|
||||
|
@@ -6,7 +6,10 @@
|
||||
#include <linux/ktime.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kallsyms.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
#ifdef CONFIG_FUNCTION_TRACER
|
||||
|
||||
@@ -23,6 +26,45 @@ struct ftrace_ops {
|
||||
struct ftrace_ops *next;
|
||||
};
|
||||
|
||||
extern int function_trace_stop;
|
||||
|
||||
/*
|
||||
* Type of the current tracing.
|
||||
*/
|
||||
enum ftrace_tracing_type_t {
|
||||
FTRACE_TYPE_ENTER = 0, /* Hook the call of the function */
|
||||
FTRACE_TYPE_RETURN, /* Hook the return of the function */
|
||||
};
|
||||
|
||||
/* Current tracing type, default is FTRACE_TYPE_ENTER */
|
||||
extern enum ftrace_tracing_type_t ftrace_tracing_type;
|
||||
|
||||
/**
|
||||
* ftrace_stop - stop function tracer.
|
||||
*
|
||||
* A quick way to stop the function tracer. Note this an on off switch,
|
||||
* it is not something that is recursive like preempt_disable.
|
||||
* This does not disable the calling of mcount, it only stops the
|
||||
* calling of functions from mcount.
|
||||
*/
|
||||
static inline void ftrace_stop(void)
|
||||
{
|
||||
function_trace_stop = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* ftrace_start - start the function tracer.
|
||||
*
|
||||
* This function is the inverse of ftrace_stop. This does not enable
|
||||
* the function tracing if the function tracer is disabled. This only
|
||||
* sets the function tracer flag to continue calling the functions
|
||||
* from mcount.
|
||||
*/
|
||||
static inline void ftrace_start(void)
|
||||
{
|
||||
function_trace_stop = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* The ftrace_ops must be a static and should also
|
||||
* be read_mostly. These functions do modify read_mostly variables
|
||||
@@ -41,9 +83,21 @@ extern void ftrace_stub(unsigned long a0, unsigned long a1);
|
||||
# define unregister_ftrace_function(ops) do { } while (0)
|
||||
# define clear_ftrace_function(ops) do { } while (0)
|
||||
static inline void ftrace_kill(void) { }
|
||||
static inline void ftrace_stop(void) { }
|
||||
static inline void ftrace_start(void) { }
|
||||
#endif /* CONFIG_FUNCTION_TRACER */
|
||||
|
||||
#ifdef CONFIG_STACK_TRACER
|
||||
extern int stack_tracer_enabled;
|
||||
int
|
||||
stack_trace_sysctl(struct ctl_table *table, int write,
|
||||
struct file *file, void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DYNAMIC_FTRACE
|
||||
/* asm/ftrace.h must be defined for archs supporting dynamic ftrace */
|
||||
#include <asm/ftrace.h>
|
||||
|
||||
enum {
|
||||
FTRACE_FL_FREE = (1 << 0),
|
||||
@@ -59,6 +113,7 @@ struct dyn_ftrace {
|
||||
struct list_head list;
|
||||
unsigned long ip; /* address of mcount call-site */
|
||||
unsigned long flags;
|
||||
struct dyn_arch_ftrace arch;
|
||||
};
|
||||
|
||||
int ftrace_force_update(void);
|
||||
@@ -66,19 +121,25 @@ void ftrace_set_filter(unsigned char *buf, int len, int reset);
|
||||
|
||||
/* defined in arch */
|
||||
extern int ftrace_ip_converted(unsigned long ip);
|
||||
extern unsigned char *ftrace_nop_replace(void);
|
||||
extern unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr);
|
||||
extern int ftrace_dyn_arch_init(void *data);
|
||||
extern int ftrace_update_ftrace_func(ftrace_func_t func);
|
||||
extern void ftrace_caller(void);
|
||||
extern void ftrace_call(void);
|
||||
extern void mcount_call(void);
|
||||
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
||||
extern void ftrace_graph_caller(void);
|
||||
extern int ftrace_enable_ftrace_graph_caller(void);
|
||||
extern int ftrace_disable_ftrace_graph_caller(void);
|
||||
#else
|
||||
static inline int ftrace_enable_ftrace_graph_caller(void) { return 0; }
|
||||
static inline int ftrace_disable_ftrace_graph_caller(void) { return 0; }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ftrace_modify_code - modify code segment
|
||||
* @ip: the address of the code segment
|
||||
* @old_code: the contents of what is expected to be there
|
||||
* @new_code: the code to patch in
|
||||
* ftrace_make_nop - convert code into top
|
||||
* @mod: module structure if called by module load initialization
|
||||
* @rec: the mcount call site record
|
||||
* @addr: the address that the call site should be calling
|
||||
*
|
||||
* This is a very sensitive operation and great care needs
|
||||
* to be taken by the arch. The operation should carefully
|
||||
@@ -86,6 +147,8 @@ extern void mcount_call(void);
|
||||
* what we expect it to be, and then on success of the compare,
|
||||
* it should write to the location.
|
||||
*
|
||||
* The code segment at @rec->ip should be a caller to @addr
|
||||
*
|
||||
* Return must be:
|
||||
* 0 on success
|
||||
* -EFAULT on error reading the location
|
||||
@@ -93,8 +156,34 @@ extern void mcount_call(void);
|
||||
* -EPERM on error writing to the location
|
||||
* Any other value will be considered a failure.
|
||||
*/
|
||||
extern int ftrace_modify_code(unsigned long ip, unsigned char *old_code,
|
||||
unsigned char *new_code);
|
||||
extern int ftrace_make_nop(struct module *mod,
|
||||
struct dyn_ftrace *rec, unsigned long addr);
|
||||
|
||||
/**
|
||||
* ftrace_make_call - convert a nop call site into a call to addr
|
||||
* @rec: the mcount call site record
|
||||
* @addr: the address that the call site should call
|
||||
*
|
||||
* This is a very sensitive operation and great care needs
|
||||
* to be taken by the arch. The operation should carefully
|
||||
* read the location, check to see if what is read is indeed
|
||||
* what we expect it to be, and then on success of the compare,
|
||||
* it should write to the location.
|
||||
*
|
||||
* The code segment at @rec->ip should be a nop
|
||||
*
|
||||
* Return must be:
|
||||
* 0 on success
|
||||
* -EFAULT on error reading the location
|
||||
* -EINVAL on a failed compare of the contents
|
||||
* -EPERM on error writing to the location
|
||||
* Any other value will be considered a failure.
|
||||
*/
|
||||
extern int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr);
|
||||
|
||||
|
||||
/* May be defined in arch */
|
||||
extern int ftrace_arch_read_dyn_info(char *buf, int size);
|
||||
|
||||
extern int skip_trace(unsigned long ip);
|
||||
|
||||
@@ -102,7 +191,6 @@ extern void ftrace_release(void *start, unsigned long size);
|
||||
|
||||
extern void ftrace_disable_daemon(void);
|
||||
extern void ftrace_enable_daemon(void);
|
||||
|
||||
#else
|
||||
# define skip_trace(ip) ({ 0; })
|
||||
# define ftrace_force_update() ({ 0; })
|
||||
@@ -181,6 +269,12 @@ static inline void __ftrace_enabled_restore(int enabled)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TRACING
|
||||
extern int ftrace_dump_on_oops;
|
||||
|
||||
extern void tracing_start(void);
|
||||
extern void tracing_stop(void);
|
||||
extern void ftrace_off_permanent(void);
|
||||
|
||||
extern void
|
||||
ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3);
|
||||
|
||||
@@ -209,8 +303,11 @@ extern void ftrace_dump(void);
|
||||
static inline void
|
||||
ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { }
|
||||
static inline int
|
||||
ftrace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 0)));
|
||||
ftrace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
static inline void tracing_start(void) { }
|
||||
static inline void tracing_stop(void) { }
|
||||
static inline void ftrace_off_permanent(void) { }
|
||||
static inline int
|
||||
ftrace_printk(const char *fmt, ...)
|
||||
{
|
||||
@@ -221,33 +318,178 @@ static inline void ftrace_dump(void) { }
|
||||
|
||||
#ifdef CONFIG_FTRACE_MCOUNT_RECORD
|
||||
extern void ftrace_init(void);
|
||||
extern void ftrace_init_module(unsigned long *start, unsigned long *end);
|
||||
extern void ftrace_init_module(struct module *mod,
|
||||
unsigned long *start, unsigned long *end);
|
||||
#else
|
||||
static inline void ftrace_init(void) { }
|
||||
static inline void
|
||||
ftrace_init_module(unsigned long *start, unsigned long *end) { }
|
||||
ftrace_init_module(struct module *mod,
|
||||
unsigned long *start, unsigned long *end) { }
|
||||
#endif
|
||||
|
||||
|
||||
struct boot_trace {
|
||||
pid_t caller;
|
||||
char func[KSYM_NAME_LEN];
|
||||
int result;
|
||||
unsigned long long duration; /* usecs */
|
||||
ktime_t calltime;
|
||||
ktime_t rettime;
|
||||
enum {
|
||||
POWER_NONE = 0,
|
||||
POWER_CSTATE = 1,
|
||||
POWER_PSTATE = 2,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_BOOT_TRACER
|
||||
extern void trace_boot(struct boot_trace *it, initcall_t fn);
|
||||
extern void start_boot_trace(void);
|
||||
extern void stop_boot_trace(void);
|
||||
struct power_trace {
|
||||
#ifdef CONFIG_POWER_TRACER
|
||||
ktime_t stamp;
|
||||
ktime_t end;
|
||||
int type;
|
||||
int state;
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef CONFIG_POWER_TRACER
|
||||
extern void trace_power_start(struct power_trace *it, unsigned int type,
|
||||
unsigned int state);
|
||||
extern void trace_power_mark(struct power_trace *it, unsigned int type,
|
||||
unsigned int state);
|
||||
extern void trace_power_end(struct power_trace *it);
|
||||
#else
|
||||
static inline void trace_boot(struct boot_trace *it, initcall_t fn) { }
|
||||
static inline void start_boot_trace(void) { }
|
||||
static inline void stop_boot_trace(void) { }
|
||||
static inline void trace_power_start(struct power_trace *it, unsigned int type,
|
||||
unsigned int state) { }
|
||||
static inline void trace_power_mark(struct power_trace *it, unsigned int type,
|
||||
unsigned int state) { }
|
||||
static inline void trace_power_end(struct power_trace *it) { }
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Structure that defines an entry function trace.
|
||||
*/
|
||||
struct ftrace_graph_ent {
|
||||
unsigned long func; /* Current function */
|
||||
int depth;
|
||||
};
|
||||
|
||||
/*
|
||||
* Structure that defines a return function trace.
|
||||
*/
|
||||
struct ftrace_graph_ret {
|
||||
unsigned long func; /* Current function */
|
||||
unsigned long long calltime;
|
||||
unsigned long long rettime;
|
||||
/* Number of functions that overran the depth limit for current task */
|
||||
unsigned long overrun;
|
||||
int depth;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
||||
|
||||
/*
|
||||
* Sometimes we don't want to trace a function with the function
|
||||
* graph tracer but we want them to keep traced by the usual function
|
||||
* tracer if the function graph tracer is not configured.
|
||||
*/
|
||||
#define __notrace_funcgraph notrace
|
||||
|
||||
/*
|
||||
* We want to which function is an entrypoint of a hardirq.
|
||||
* That will help us to put a signal on output.
|
||||
*/
|
||||
#define __irq_entry __attribute__((__section__(".irqentry.text")))
|
||||
|
||||
/* Limits of hardirq entrypoints */
|
||||
extern char __irqentry_text_start[];
|
||||
extern char __irqentry_text_end[];
|
||||
|
||||
#define FTRACE_RETFUNC_DEPTH 50
|
||||
#define FTRACE_RETSTACK_ALLOC_SIZE 32
|
||||
/* Type of the callback handlers for tracing function graph*/
|
||||
typedef void (*trace_func_graph_ret_t)(struct ftrace_graph_ret *); /* return */
|
||||
typedef int (*trace_func_graph_ent_t)(struct ftrace_graph_ent *); /* entry */
|
||||
|
||||
extern int register_ftrace_graph(trace_func_graph_ret_t retfunc,
|
||||
trace_func_graph_ent_t entryfunc);
|
||||
|
||||
extern void ftrace_graph_stop(void);
|
||||
|
||||
/* The current handlers in use */
|
||||
extern trace_func_graph_ret_t ftrace_graph_return;
|
||||
extern trace_func_graph_ent_t ftrace_graph_entry;
|
||||
|
||||
extern void unregister_ftrace_graph(void);
|
||||
|
||||
extern void ftrace_graph_init_task(struct task_struct *t);
|
||||
extern void ftrace_graph_exit_task(struct task_struct *t);
|
||||
|
||||
static inline int task_curr_ret_stack(struct task_struct *t)
|
||||
{
|
||||
return t->curr_ret_stack;
|
||||
}
|
||||
|
||||
static inline void pause_graph_tracing(void)
|
||||
{
|
||||
atomic_inc(¤t->tracing_graph_pause);
|
||||
}
|
||||
|
||||
static inline void unpause_graph_tracing(void)
|
||||
{
|
||||
atomic_dec(¤t->tracing_graph_pause);
|
||||
}
|
||||
#else
|
||||
|
||||
#define __notrace_funcgraph
|
||||
#define __irq_entry
|
||||
|
||||
static inline void ftrace_graph_init_task(struct task_struct *t) { }
|
||||
static inline void ftrace_graph_exit_task(struct task_struct *t) { }
|
||||
|
||||
static inline int task_curr_ret_stack(struct task_struct *tsk)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline void pause_graph_tracing(void) { }
|
||||
static inline void unpause_graph_tracing(void) { }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TRACING
|
||||
#include <linux/sched.h>
|
||||
|
||||
/* flags for current->trace */
|
||||
enum {
|
||||
TSK_TRACE_FL_TRACE_BIT = 0,
|
||||
TSK_TRACE_FL_GRAPH_BIT = 1,
|
||||
};
|
||||
enum {
|
||||
TSK_TRACE_FL_TRACE = 1 << TSK_TRACE_FL_TRACE_BIT,
|
||||
TSK_TRACE_FL_GRAPH = 1 << TSK_TRACE_FL_GRAPH_BIT,
|
||||
};
|
||||
|
||||
static inline void set_tsk_trace_trace(struct task_struct *tsk)
|
||||
{
|
||||
set_bit(TSK_TRACE_FL_TRACE_BIT, &tsk->trace);
|
||||
}
|
||||
|
||||
static inline void clear_tsk_trace_trace(struct task_struct *tsk)
|
||||
{
|
||||
clear_bit(TSK_TRACE_FL_TRACE_BIT, &tsk->trace);
|
||||
}
|
||||
|
||||
static inline int test_tsk_trace_trace(struct task_struct *tsk)
|
||||
{
|
||||
return tsk->trace & TSK_TRACE_FL_TRACE;
|
||||
}
|
||||
|
||||
static inline void set_tsk_trace_graph(struct task_struct *tsk)
|
||||
{
|
||||
set_bit(TSK_TRACE_FL_GRAPH_BIT, &tsk->trace);
|
||||
}
|
||||
|
||||
static inline void clear_tsk_trace_graph(struct task_struct *tsk)
|
||||
{
|
||||
clear_bit(TSK_TRACE_FL_GRAPH_BIT, &tsk->trace);
|
||||
}
|
||||
|
||||
static inline int test_tsk_trace_graph(struct task_struct *tsk)
|
||||
{
|
||||
return tsk->trace & TSK_TRACE_FL_GRAPH;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_TRACING */
|
||||
|
||||
#endif /* _LINUX_FTRACE_H */
|
||||
|
13
include/linux/ftrace_irq.h
Normal file
13
include/linux/ftrace_irq.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef _LINUX_FTRACE_IRQ_H
|
||||
#define _LINUX_FTRACE_IRQ_H
|
||||
|
||||
|
||||
#if defined(CONFIG_DYNAMIC_FTRACE) || defined(CONFIG_FUNCTION_GRAPH_TRACER)
|
||||
extern void ftrace_nmi_enter(void);
|
||||
extern void ftrace_nmi_exit(void);
|
||||
#else
|
||||
static inline void ftrace_nmi_enter(void) { }
|
||||
static inline void ftrace_nmi_exit(void) { }
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_FTRACE_IRQ_H */
|
@@ -25,7 +25,8 @@ union ktime;
|
||||
#define FUTEX_WAKE_BITSET 10
|
||||
|
||||
#define FUTEX_PRIVATE_FLAG 128
|
||||
#define FUTEX_CMD_MASK ~FUTEX_PRIVATE_FLAG
|
||||
#define FUTEX_CLOCK_REALTIME 256
|
||||
#define FUTEX_CMD_MASK ~(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME)
|
||||
|
||||
#define FUTEX_WAIT_PRIVATE (FUTEX_WAIT | FUTEX_PRIVATE_FLAG)
|
||||
#define FUTEX_WAKE_PRIVATE (FUTEX_WAKE | FUTEX_PRIVATE_FLAG)
|
||||
@@ -164,6 +165,8 @@ union futex_key {
|
||||
} both;
|
||||
};
|
||||
|
||||
#define FUTEX_KEY_INIT (union futex_key) { .both = { .ptr = NULL } }
|
||||
|
||||
#ifdef CONFIG_FUTEX
|
||||
extern void exit_robust_list(struct task_struct *curr);
|
||||
extern void exit_pi_state_list(struct task_struct *curr);
|
||||
|
@@ -126,6 +126,7 @@ struct blk_scsi_cmd_filter {
|
||||
struct disk_part_tbl {
|
||||
struct rcu_head rcu_head;
|
||||
int len;
|
||||
struct hd_struct *last_lookup;
|
||||
struct hd_struct *part[];
|
||||
};
|
||||
|
||||
|
@@ -4,6 +4,7 @@
|
||||
#include <linux/preempt.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/lockdep.h>
|
||||
#include <linux/ftrace_irq.h>
|
||||
#include <asm/hardirq.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
@@ -118,13 +119,17 @@ static inline void account_system_vtime(struct task_struct *tsk)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_PREEMPT_RCU) && defined(CONFIG_NO_HZ)
|
||||
#if defined(CONFIG_NO_HZ) && !defined(CONFIG_CLASSIC_RCU)
|
||||
extern void rcu_irq_enter(void);
|
||||
extern void rcu_irq_exit(void);
|
||||
extern void rcu_nmi_enter(void);
|
||||
extern void rcu_nmi_exit(void);
|
||||
#else
|
||||
# define rcu_irq_enter() do { } while (0)
|
||||
# define rcu_irq_exit() do { } while (0)
|
||||
#endif /* CONFIG_PREEMPT_RCU */
|
||||
# define rcu_nmi_enter() do { } while (0)
|
||||
# define rcu_nmi_exit() do { } while (0)
|
||||
#endif /* #if defined(CONFIG_NO_HZ) && !defined(CONFIG_CLASSIC_RCU) */
|
||||
|
||||
/*
|
||||
* It is safe to do non-atomic ops on ->hardirq_context,
|
||||
@@ -134,7 +139,6 @@ extern void rcu_irq_exit(void);
|
||||
*/
|
||||
#define __irq_enter() \
|
||||
do { \
|
||||
rcu_irq_enter(); \
|
||||
account_system_vtime(current); \
|
||||
add_preempt_count(HARDIRQ_OFFSET); \
|
||||
trace_hardirq_enter(); \
|
||||
@@ -153,7 +157,6 @@ extern void irq_enter(void);
|
||||
trace_hardirq_exit(); \
|
||||
account_system_vtime(current); \
|
||||
sub_preempt_count(HARDIRQ_OFFSET); \
|
||||
rcu_irq_exit(); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
@@ -161,7 +164,20 @@ extern void irq_enter(void);
|
||||
*/
|
||||
extern void irq_exit(void);
|
||||
|
||||
#define nmi_enter() do { lockdep_off(); __irq_enter(); } while (0)
|
||||
#define nmi_exit() do { __irq_exit(); lockdep_on(); } while (0)
|
||||
#define nmi_enter() \
|
||||
do { \
|
||||
ftrace_nmi_enter(); \
|
||||
lockdep_off(); \
|
||||
rcu_nmi_enter(); \
|
||||
__irq_enter(); \
|
||||
} while (0)
|
||||
|
||||
#define nmi_exit() \
|
||||
do { \
|
||||
__irq_exit(); \
|
||||
rcu_nmi_exit(); \
|
||||
lockdep_on(); \
|
||||
ftrace_nmi_exit(); \
|
||||
} while (0)
|
||||
|
||||
#endif /* LINUX_HARDIRQ_H */
|
||||
|
@@ -43,7 +43,7 @@ struct hdlc_proto {
|
||||
};
|
||||
|
||||
|
||||
/* Pointed to by dev->priv */
|
||||
/* Pointed to by netdev_priv(dev) */
|
||||
typedef struct hdlc_device {
|
||||
/* used by HDLC layer to take control over HDLC device from hw driver*/
|
||||
int (*attach)(struct net_device *dev,
|
||||
@@ -80,7 +80,7 @@ struct net_device *alloc_hdlcdev(void *priv);
|
||||
|
||||
static inline struct hdlc_device* dev_to_hdlc(struct net_device *dev)
|
||||
{
|
||||
return dev->priv;
|
||||
return netdev_priv(dev);
|
||||
}
|
||||
|
||||
static __inline__ void debug_frame(const struct sk_buff *skb)
|
||||
|
@@ -32,7 +32,9 @@ struct hippi_cb {
|
||||
};
|
||||
|
||||
extern __be16 hippi_type_trans(struct sk_buff *skb, struct net_device *dev);
|
||||
|
||||
extern int hippi_change_mtu(struct net_device *dev, int new_mtu);
|
||||
extern int hippi_mac_addr(struct net_device *dev, void *p);
|
||||
extern int hippi_neigh_setup_dev(struct net_device *dev, struct neigh_parms *p);
|
||||
extern struct net_device *alloc_hippi_dev(int sizeof_priv);
|
||||
#endif
|
||||
|
||||
|
@@ -42,26 +42,6 @@ enum hrtimer_restart {
|
||||
HRTIMER_RESTART, /* Timer must be restarted */
|
||||
};
|
||||
|
||||
/*
|
||||
* hrtimer callback modes:
|
||||
*
|
||||
* HRTIMER_CB_SOFTIRQ: Callback must run in softirq context
|
||||
* HRTIMER_CB_IRQSAFE_PERCPU: Callback must run in hardirq context
|
||||
* Special mode for tick emulation and
|
||||
* scheduler timer. Such timers are per
|
||||
* cpu and not allowed to be migrated on
|
||||
* cpu unplug.
|
||||
* HRTIMER_CB_IRQSAFE_UNLOCKED: Callback should run in hardirq context
|
||||
* with timer->base lock unlocked
|
||||
* used for timers which call wakeup to
|
||||
* avoid lock order problems with rq->lock
|
||||
*/
|
||||
enum hrtimer_cb_mode {
|
||||
HRTIMER_CB_SOFTIRQ,
|
||||
HRTIMER_CB_IRQSAFE_PERCPU,
|
||||
HRTIMER_CB_IRQSAFE_UNLOCKED,
|
||||
};
|
||||
|
||||
/*
|
||||
* Values to track state of the timer
|
||||
*
|
||||
@@ -70,7 +50,6 @@ enum hrtimer_cb_mode {
|
||||
* 0x00 inactive
|
||||
* 0x01 enqueued into rbtree
|
||||
* 0x02 callback function running
|
||||
* 0x04 callback pending (high resolution mode)
|
||||
*
|
||||
* Special cases:
|
||||
* 0x03 callback function running and enqueued
|
||||
@@ -92,8 +71,7 @@ enum hrtimer_cb_mode {
|
||||
#define HRTIMER_STATE_INACTIVE 0x00
|
||||
#define HRTIMER_STATE_ENQUEUED 0x01
|
||||
#define HRTIMER_STATE_CALLBACK 0x02
|
||||
#define HRTIMER_STATE_PENDING 0x04
|
||||
#define HRTIMER_STATE_MIGRATE 0x08
|
||||
#define HRTIMER_STATE_MIGRATE 0x04
|
||||
|
||||
/**
|
||||
* struct hrtimer - the basic hrtimer structure
|
||||
@@ -109,8 +87,6 @@ enum hrtimer_cb_mode {
|
||||
* @function: timer expiry callback function
|
||||
* @base: pointer to the timer base (per cpu and per clock)
|
||||
* @state: state information (See bit values above)
|
||||
* @cb_mode: high resolution timer feature to select the callback execution
|
||||
* mode
|
||||
* @cb_entry: list head to enqueue an expired timer into the callback list
|
||||
* @start_site: timer statistics field to store the site where the timer
|
||||
* was started
|
||||
@@ -129,7 +105,6 @@ struct hrtimer {
|
||||
struct hrtimer_clock_base *base;
|
||||
unsigned long state;
|
||||
struct list_head cb_entry;
|
||||
enum hrtimer_cb_mode cb_mode;
|
||||
#ifdef CONFIG_TIMER_STATS
|
||||
int start_pid;
|
||||
void *start_site;
|
||||
@@ -188,15 +163,11 @@ struct hrtimer_clock_base {
|
||||
* @check_clocks: Indictator, when set evaluate time source and clock
|
||||
* event devices whether high resolution mode can be
|
||||
* activated.
|
||||
* @cb_pending: Expired timers are moved from the rbtree to this
|
||||
* list in the timer interrupt. The list is processed
|
||||
* in the softirq.
|
||||
* @nr_events: Total number of timer interrupt events
|
||||
*/
|
||||
struct hrtimer_cpu_base {
|
||||
spinlock_t lock;
|
||||
struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES];
|
||||
struct list_head cb_pending;
|
||||
#ifdef CONFIG_HIGH_RES_TIMERS
|
||||
ktime_t expires_next;
|
||||
int hres_active;
|
||||
@@ -404,8 +375,7 @@ static inline int hrtimer_active(const struct hrtimer *timer)
|
||||
*/
|
||||
static inline int hrtimer_is_queued(struct hrtimer *timer)
|
||||
{
|
||||
return timer->state &
|
||||
(HRTIMER_STATE_ENQUEUED | HRTIMER_STATE_PENDING);
|
||||
return timer->state & HRTIMER_STATE_ENQUEUED;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -122,8 +122,6 @@ struct ide_io_ports {
|
||||
#define MAX_DRIVES 2 /* per interface; 2 assumed by lots of code */
|
||||
#define SECTOR_SIZE 512
|
||||
|
||||
#define IDE_LARGE_SEEK(b1,b2,t) (((b1) > (b2) + (t)) || ((b2) > (b1) + (t)))
|
||||
|
||||
/*
|
||||
* Timeouts for various operations:
|
||||
*/
|
||||
@@ -172,9 +170,7 @@ typedef int (ide_ack_intr_t)(struct hwif_s *);
|
||||
enum { ide_unknown, ide_generic, ide_pci,
|
||||
ide_cmd640, ide_dtc2278, ide_ali14xx,
|
||||
ide_qd65xx, ide_umc8672, ide_ht6560b,
|
||||
ide_rz1000, ide_trm290,
|
||||
ide_cmd646, ide_cy82c693, ide_4drives,
|
||||
ide_pmac, ide_acorn,
|
||||
ide_4drives, ide_pmac, ide_acorn,
|
||||
ide_au1xxx, ide_palm3710
|
||||
};
|
||||
|
||||
@@ -496,8 +492,6 @@ enum {
|
||||
* when more than one interrupt is needed.
|
||||
*/
|
||||
IDE_AFLAG_LIMIT_NFRAMES = (1 << 7),
|
||||
/* Seeking in progress. */
|
||||
IDE_AFLAG_SEEKING = (1 << 8),
|
||||
/* Saved TOC information is current. */
|
||||
IDE_AFLAG_TOC_VALID = (1 << 9),
|
||||
/* We think that the drive door is locked. */
|
||||
@@ -845,8 +839,6 @@ typedef struct hwif_s {
|
||||
unsigned extra_ports; /* number of extra dma ports */
|
||||
|
||||
unsigned present : 1; /* this interface exists */
|
||||
unsigned serialized : 1; /* serialized all channel operation */
|
||||
unsigned sharing_irq: 1; /* 1 = sharing irq with another hwif */
|
||||
unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */
|
||||
|
||||
struct device gendev;
|
||||
@@ -909,6 +901,8 @@ typedef struct hwgroup_s {
|
||||
|
||||
int req_gen;
|
||||
int req_gen_timer;
|
||||
|
||||
spinlock_t lock;
|
||||
} ide_hwgroup_t;
|
||||
|
||||
typedef struct ide_driver_s ide_driver_t;
|
||||
@@ -1122,6 +1116,14 @@ enum {
|
||||
IDE_PM_COMPLETED,
|
||||
};
|
||||
|
||||
int generic_ide_suspend(struct device *, pm_message_t);
|
||||
int generic_ide_resume(struct device *);
|
||||
|
||||
void ide_complete_power_step(ide_drive_t *, struct request *);
|
||||
ide_startstop_t ide_start_power_step(ide_drive_t *, struct request *);
|
||||
void ide_complete_pm_request(ide_drive_t *, struct request *);
|
||||
void ide_check_pm_state(ide_drive_t *, struct request *);
|
||||
|
||||
/*
|
||||
* Subdrivers support.
|
||||
*
|
||||
@@ -1376,8 +1378,8 @@ enum {
|
||||
IDE_HFLAG_LEGACY_IRQS = (1 << 21),
|
||||
/* force use of legacy IRQs */
|
||||
IDE_HFLAG_FORCE_LEGACY_IRQS = (1 << 22),
|
||||
/* limit LBA48 requests to 256 sectors */
|
||||
IDE_HFLAG_RQSIZE_256 = (1 << 23),
|
||||
/* host is TRM290 */
|
||||
IDE_HFLAG_TRM290 = (1 << 23),
|
||||
/* use 32-bit I/O ops */
|
||||
IDE_HFLAG_IO_32BIT = (1 << 24),
|
||||
/* unmask IRQs */
|
||||
@@ -1415,6 +1417,9 @@ struct ide_port_info {
|
||||
|
||||
ide_pci_enablebit_t enablebits[2];
|
||||
hwif_chipset_t chipset;
|
||||
|
||||
u16 max_sectors; /* if < than the default one */
|
||||
|
||||
u32 host_flags;
|
||||
u8 pio_mask;
|
||||
u8 swdma_mask;
|
||||
@@ -1610,13 +1615,13 @@ extern struct mutex ide_cfg_mtx;
|
||||
/*
|
||||
* Structure locking:
|
||||
*
|
||||
* ide_cfg_mtx and ide_lock together protect changes to
|
||||
* ide_hwif_t->{next,hwgroup}
|
||||
* ide_cfg_mtx and hwgroup->lock together protect changes to
|
||||
* ide_hwif_t->next
|
||||
* ide_drive_t->next
|
||||
*
|
||||
* ide_hwgroup_t->busy: ide_lock
|
||||
* ide_hwgroup_t->hwif: ide_lock
|
||||
* ide_hwif_t->mate: constant, no locking
|
||||
* ide_hwgroup_t->busy: hwgroup->lock
|
||||
* ide_hwgroup_t->hwif: hwgroup->lock
|
||||
* ide_hwif_t->{hwgroup,mate}: constant, no locking
|
||||
* ide_drive_t->hwif: constant, no locking
|
||||
*/
|
||||
|
||||
|
@@ -12,8 +12,8 @@
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef IEEE80211_H
|
||||
#define IEEE80211_H
|
||||
#ifndef LINUX_IEEE80211_H
|
||||
#define LINUX_IEEE80211_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <asm/byteorder.h>
|
||||
@@ -97,7 +97,10 @@
|
||||
#define IEEE80211_MAX_FRAME_LEN 2352
|
||||
|
||||
#define IEEE80211_MAX_SSID_LEN 32
|
||||
|
||||
#define IEEE80211_MAX_MESH_ID_LEN 32
|
||||
#define IEEE80211_MESH_CONFIG_LEN 19
|
||||
|
||||
#define IEEE80211_QOS_CTL_LEN 2
|
||||
#define IEEE80211_QOS_CTL_TID_MASK 0x000F
|
||||
#define IEEE80211_QOS_CTL_TAG1D_MASK 0x0007
|
||||
@@ -666,6 +669,13 @@ struct ieee80211_cts {
|
||||
u8 ra[6];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct ieee80211_pspoll {
|
||||
__le16 frame_control;
|
||||
__le16 aid;
|
||||
u8 bssid[6];
|
||||
u8 ta[6];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/**
|
||||
* struct ieee80211_bar - HT Block Ack Request
|
||||
*
|
||||
@@ -685,28 +695,88 @@ struct ieee80211_bar {
|
||||
#define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000
|
||||
#define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA 0x0004
|
||||
|
||||
|
||||
#define IEEE80211_HT_MCS_MASK_LEN 10
|
||||
|
||||
/**
|
||||
* struct ieee80211_mcs_info - MCS information
|
||||
* @rx_mask: RX mask
|
||||
* @rx_highest: highest supported RX rate
|
||||
* @tx_params: TX parameters
|
||||
*/
|
||||
struct ieee80211_mcs_info {
|
||||
u8 rx_mask[IEEE80211_HT_MCS_MASK_LEN];
|
||||
__le16 rx_highest;
|
||||
u8 tx_params;
|
||||
u8 reserved[3];
|
||||
} __attribute__((packed));
|
||||
|
||||
/* 802.11n HT capability MSC set */
|
||||
#define IEEE80211_HT_MCS_RX_HIGHEST_MASK 0x3ff
|
||||
#define IEEE80211_HT_MCS_TX_DEFINED 0x01
|
||||
#define IEEE80211_HT_MCS_TX_RX_DIFF 0x02
|
||||
/* value 0 == 1 stream etc */
|
||||
#define IEEE80211_HT_MCS_TX_MAX_STREAMS_MASK 0x0C
|
||||
#define IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT 2
|
||||
#define IEEE80211_HT_MCS_TX_MAX_STREAMS 4
|
||||
#define IEEE80211_HT_MCS_TX_UNEQUAL_MODULATION 0x10
|
||||
|
||||
/*
|
||||
* 802.11n D5.0 20.3.5 / 20.6 says:
|
||||
* - indices 0 to 7 and 32 are single spatial stream
|
||||
* - 8 to 31 are multiple spatial streams using equal modulation
|
||||
* [8..15 for two streams, 16..23 for three and 24..31 for four]
|
||||
* - remainder are multiple spatial streams using unequal modulation
|
||||
*/
|
||||
#define IEEE80211_HT_MCS_UNEQUAL_MODULATION_START 33
|
||||
#define IEEE80211_HT_MCS_UNEQUAL_MODULATION_START_BYTE \
|
||||
(IEEE80211_HT_MCS_UNEQUAL_MODULATION_START / 8)
|
||||
|
||||
/**
|
||||
* struct ieee80211_ht_cap - HT capabilities
|
||||
*
|
||||
* This structure refers to "HT capabilities element" as
|
||||
* described in 802.11n draft section 7.3.2.52
|
||||
* This structure is the "HT capabilities element" as
|
||||
* described in 802.11n D5.0 7.3.2.57
|
||||
*/
|
||||
struct ieee80211_ht_cap {
|
||||
__le16 cap_info;
|
||||
u8 ampdu_params_info;
|
||||
u8 supp_mcs_set[16];
|
||||
|
||||
/* 16 bytes MCS information */
|
||||
struct ieee80211_mcs_info mcs;
|
||||
|
||||
__le16 extended_ht_cap_info;
|
||||
__le32 tx_BF_cap_info;
|
||||
u8 antenna_selection_info;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* 802.11n HT capabilities masks (for cap_info) */
|
||||
#define IEEE80211_HT_CAP_LDPC_CODING 0x0001
|
||||
#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002
|
||||
#define IEEE80211_HT_CAP_SM_PS 0x000C
|
||||
#define IEEE80211_HT_CAP_GRN_FLD 0x0010
|
||||
#define IEEE80211_HT_CAP_SGI_20 0x0020
|
||||
#define IEEE80211_HT_CAP_SGI_40 0x0040
|
||||
#define IEEE80211_HT_CAP_TX_STBC 0x0080
|
||||
#define IEEE80211_HT_CAP_RX_STBC 0x0300
|
||||
#define IEEE80211_HT_CAP_DELAY_BA 0x0400
|
||||
#define IEEE80211_HT_CAP_MAX_AMSDU 0x0800
|
||||
#define IEEE80211_HT_CAP_DSSSCCK40 0x1000
|
||||
#define IEEE80211_HT_CAP_PSMP_SUPPORT 0x2000
|
||||
#define IEEE80211_HT_CAP_40MHZ_INTOLERANT 0x4000
|
||||
#define IEEE80211_HT_CAP_LSIG_TXOP_PROT 0x8000
|
||||
|
||||
/* 802.11n HT capability AMPDU settings (for ampdu_params_info) */
|
||||
#define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03
|
||||
#define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C
|
||||
|
||||
/**
|
||||
* struct ieee80211_ht_cap - HT additional information
|
||||
* struct ieee80211_ht_info - HT information
|
||||
*
|
||||
* This structure refers to "HT information element" as
|
||||
* described in 802.11n draft section 7.3.2.53
|
||||
* This structure is the "HT information element" as
|
||||
* described in 802.11n D5.0 7.3.2.58
|
||||
*/
|
||||
struct ieee80211_ht_addt_info {
|
||||
struct ieee80211_ht_info {
|
||||
u8 control_chan;
|
||||
u8 ht_param;
|
||||
__le16 operation_mode;
|
||||
@@ -714,36 +784,33 @@ struct ieee80211_ht_addt_info {
|
||||
u8 basic_set[16];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* 802.11n HT capabilities masks */
|
||||
#define IEEE80211_HT_CAP_SUP_WIDTH 0x0002
|
||||
#define IEEE80211_HT_CAP_SM_PS 0x000C
|
||||
#define IEEE80211_HT_CAP_GRN_FLD 0x0010
|
||||
#define IEEE80211_HT_CAP_SGI_20 0x0020
|
||||
#define IEEE80211_HT_CAP_SGI_40 0x0040
|
||||
#define IEEE80211_HT_CAP_DELAY_BA 0x0400
|
||||
#define IEEE80211_HT_CAP_MAX_AMSDU 0x0800
|
||||
#define IEEE80211_HT_CAP_DSSSCCK40 0x1000
|
||||
/* 802.11n HT capability AMPDU settings */
|
||||
#define IEEE80211_HT_CAP_AMPDU_FACTOR 0x03
|
||||
#define IEEE80211_HT_CAP_AMPDU_DENSITY 0x1C
|
||||
/* 802.11n HT capability MSC set */
|
||||
#define IEEE80211_SUPP_MCS_SET_UEQM 4
|
||||
#define IEEE80211_HT_CAP_MAX_STREAMS 4
|
||||
#define IEEE80211_SUPP_MCS_SET_LEN 10
|
||||
/* maximum streams the spec allows */
|
||||
#define IEEE80211_HT_CAP_MCS_TX_DEFINED 0x01
|
||||
#define IEEE80211_HT_CAP_MCS_TX_RX_DIFF 0x02
|
||||
#define IEEE80211_HT_CAP_MCS_TX_STREAMS 0x0C
|
||||
#define IEEE80211_HT_CAP_MCS_TX_UEQM 0x10
|
||||
/* 802.11n HT IE masks */
|
||||
#define IEEE80211_HT_IE_CHA_SEC_OFFSET 0x03
|
||||
#define IEEE80211_HT_IE_CHA_SEC_NONE 0x00
|
||||
#define IEEE80211_HT_IE_CHA_SEC_ABOVE 0x01
|
||||
#define IEEE80211_HT_IE_CHA_SEC_BELOW 0x03
|
||||
#define IEEE80211_HT_IE_CHA_WIDTH 0x04
|
||||
#define IEEE80211_HT_IE_HT_PROTECTION 0x0003
|
||||
#define IEEE80211_HT_IE_NON_GF_STA_PRSNT 0x0004
|
||||
#define IEEE80211_HT_IE_NON_HT_STA_PRSNT 0x0010
|
||||
/* for ht_param */
|
||||
#define IEEE80211_HT_PARAM_CHA_SEC_OFFSET 0x03
|
||||
#define IEEE80211_HT_PARAM_CHA_SEC_NONE 0x00
|
||||
#define IEEE80211_HT_PARAM_CHA_SEC_ABOVE 0x01
|
||||
#define IEEE80211_HT_PARAM_CHA_SEC_BELOW 0x03
|
||||
#define IEEE80211_HT_PARAM_CHAN_WIDTH_ANY 0x04
|
||||
#define IEEE80211_HT_PARAM_RIFS_MODE 0x08
|
||||
#define IEEE80211_HT_PARAM_SPSMP_SUPPORT 0x10
|
||||
#define IEEE80211_HT_PARAM_SERV_INTERVAL_GRAN 0xE0
|
||||
|
||||
/* for operation_mode */
|
||||
#define IEEE80211_HT_OP_MODE_PROTECTION 0x0003
|
||||
#define IEEE80211_HT_OP_MODE_PROTECTION_NONE 0
|
||||
#define IEEE80211_HT_OP_MODE_PROTECTION_NONMEMBER 1
|
||||
#define IEEE80211_HT_OP_MODE_PROTECTION_20MHZ 2
|
||||
#define IEEE80211_HT_OP_MODE_PROTECTION_NONHT_MIXED 3
|
||||
#define IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT 0x0004
|
||||
#define IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT 0x0010
|
||||
|
||||
/* for stbc_param */
|
||||
#define IEEE80211_HT_STBC_PARAM_DUAL_BEACON 0x0040
|
||||
#define IEEE80211_HT_STBC_PARAM_DUAL_CTS_PROT 0x0080
|
||||
#define IEEE80211_HT_STBC_PARAM_STBC_BEACON 0x0100
|
||||
#define IEEE80211_HT_STBC_PARAM_LSIG_TXOP_FULLPROT 0x0200
|
||||
#define IEEE80211_HT_STBC_PARAM_PCO_ACTIVE 0x0400
|
||||
#define IEEE80211_HT_STBC_PARAM_PCO_PHASE 0x0800
|
||||
|
||||
|
||||
/* block-ack parameters */
|
||||
#define IEEE80211_ADDBA_PARAM_POLICY_MASK 0x0002
|
||||
@@ -769,7 +836,6 @@ struct ieee80211_ht_addt_info {
|
||||
/* Authentication algorithms */
|
||||
#define WLAN_AUTH_OPEN 0
|
||||
#define WLAN_AUTH_SHARED_KEY 1
|
||||
#define WLAN_AUTH_FAST_BSS_TRANSITION 2
|
||||
#define WLAN_AUTH_LEAP 128
|
||||
|
||||
#define WLAN_AUTH_CHALLENGE_LEN 128
|
||||
@@ -949,7 +1015,7 @@ enum ieee80211_eid {
|
||||
WLAN_EID_EXT_SUPP_RATES = 50,
|
||||
/* 802.11n */
|
||||
WLAN_EID_HT_CAPABILITY = 45,
|
||||
WLAN_EID_HT_EXTRA_INFO = 61,
|
||||
WLAN_EID_HT_INFORMATION = 61,
|
||||
/* 802.11i */
|
||||
WLAN_EID_RSN = 48,
|
||||
WLAN_EID_WPA = 221,
|
||||
@@ -976,6 +1042,68 @@ enum ieee80211_spectrum_mgmt_actioncode {
|
||||
WLAN_ACTION_SPCT_CHL_SWITCH = 4,
|
||||
};
|
||||
|
||||
/*
|
||||
* IEEE 802.11-2007 7.3.2.9 Country information element
|
||||
*
|
||||
* Minimum length is 8 octets, ie len must be evenly
|
||||
* divisible by 2
|
||||
*/
|
||||
|
||||
/* Although the spec says 8 I'm seeing 6 in practice */
|
||||
#define IEEE80211_COUNTRY_IE_MIN_LEN 6
|
||||
|
||||
/*
|
||||
* For regulatory extension stuff see IEEE 802.11-2007
|
||||
* Annex I (page 1141) and Annex J (page 1147). Also
|
||||
* review 7.3.2.9.
|
||||
*
|
||||
* When dot11RegulatoryClassesRequired is true and the
|
||||
* first_channel/reg_extension_id is >= 201 then the IE
|
||||
* compromises of the 'ext' struct represented below:
|
||||
*
|
||||
* - Regulatory extension ID - when generating IE this just needs
|
||||
* to be monotonically increasing for each triplet passed in
|
||||
* the IE
|
||||
* - Regulatory class - index into set of rules
|
||||
* - Coverage class - index into air propagation time (Table 7-27),
|
||||
* in microseconds, you can compute the air propagation time from
|
||||
* the index by multiplying by 3, so index 10 yields a propagation
|
||||
* of 10 us. Valid values are 0-31, values 32-255 are not defined
|
||||
* yet. A value of 0 inicates air propagation of <= 1 us.
|
||||
*
|
||||
* See also Table I.2 for Emission limit sets and table
|
||||
* I.3 for Behavior limit sets. Table J.1 indicates how to map
|
||||
* a reg_class to an emission limit set and behavior limit set.
|
||||
*/
|
||||
#define IEEE80211_COUNTRY_EXTENSION_ID 201
|
||||
|
||||
/*
|
||||
* Channels numbers in the IE must be monotonically increasing
|
||||
* if dot11RegulatoryClassesRequired is not true.
|
||||
*
|
||||
* If dot11RegulatoryClassesRequired is true consecutive
|
||||
* subband triplets following a regulatory triplet shall
|
||||
* have monotonically increasing first_channel number fields.
|
||||
*
|
||||
* Channel numbers shall not overlap.
|
||||
*
|
||||
* Note that max_power is signed.
|
||||
*/
|
||||
struct ieee80211_country_ie_triplet {
|
||||
union {
|
||||
struct {
|
||||
u8 first_channel;
|
||||
u8 num_channels;
|
||||
s8 max_power;
|
||||
} __attribute__ ((packed)) chans;
|
||||
struct {
|
||||
u8 reg_extension_id;
|
||||
u8 reg_class;
|
||||
u8 coverage_class;
|
||||
} __attribute__ ((packed)) ext;
|
||||
};
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* BACK action code */
|
||||
enum ieee80211_back_actioncode {
|
||||
WLAN_ACTION_ADDBA_REQ = 0,
|
||||
@@ -1057,4 +1185,4 @@ static inline u8 *ieee80211_get_DA(struct ieee80211_hdr *hdr)
|
||||
return hdr->addr1;
|
||||
}
|
||||
|
||||
#endif /* IEEE80211_H */
|
||||
#endif /* LINUX_IEEE80211_H */
|
||||
|
@@ -65,6 +65,7 @@
|
||||
#define IFF_BONDING 0x20 /* bonding master or slave */
|
||||
#define IFF_SLAVE_NEEDARP 0x40 /* need ARPs for validation */
|
||||
#define IFF_ISATAP 0x80 /* ISATAP interface (RFC4214) */
|
||||
#define IFF_MASTER_ARPMON 0x100 /* bonding master, ARP mon in use */
|
||||
|
||||
#define IF_GET_IFACE 0x0001 /* for querying only */
|
||||
#define IF_GET_PROTO 0x0002
|
||||
|
@@ -87,6 +87,9 @@
|
||||
#define ARPHRD_IEEE80211_PRISM 802 /* IEEE 802.11 + Prism2 header */
|
||||
#define ARPHRD_IEEE80211_RADIOTAP 803 /* IEEE 802.11 + radiotap header */
|
||||
|
||||
#define ARPHRD_PHONET 820 /* PhoNet media type */
|
||||
#define ARPHRD_PHONET_PIPE 821 /* PhoNet pipe header */
|
||||
|
||||
#define ARPHRD_VOID 0xFFFF /* Void type, nothing is known */
|
||||
#define ARPHRD_NONE 0xFFFE /* zero header length */
|
||||
|
||||
|
@@ -80,6 +80,10 @@ struct in_addr {
|
||||
/* BSD compatibility */
|
||||
#define IP_RECVRETOPTS IP_RETOPTS
|
||||
|
||||
/* TProxy original addresses */
|
||||
#define IP_ORIGDSTADDR 20
|
||||
#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR
|
||||
|
||||
/* IP_MTU_DISCOVER values */
|
||||
#define IP_PMTUDISC_DONT 0 /* Never send DF frames */
|
||||
#define IP_PMTUDISC_WANT 1 /* Use per route hints */
|
||||
|
@@ -12,6 +12,7 @@
|
||||
#include <net/net_namespace.h>
|
||||
|
||||
extern struct files_struct init_files;
|
||||
extern struct fs_struct init_fs;
|
||||
|
||||
#define INIT_KIOCTX(name, which_mm) \
|
||||
{ \
|
||||
@@ -57,7 +58,6 @@ extern struct nsproxy init_nsproxy;
|
||||
.mnt_ns = NULL, \
|
||||
INIT_NET_NS(net_ns) \
|
||||
INIT_IPC_NS(ipc_ns) \
|
||||
.user_ns = &init_user_ns, \
|
||||
}
|
||||
|
||||
#define INIT_SIGHAND(sighand) { \
|
||||
@@ -113,6 +113,8 @@ extern struct group_info init_groups;
|
||||
# define CAP_INIT_BSET CAP_INIT_EFF_SET
|
||||
#endif
|
||||
|
||||
extern struct cred init_cred;
|
||||
|
||||
/*
|
||||
* INIT_TASK is used to set up the first task table, touch at
|
||||
* your own risk!. Base=0, limit=0x1fffff (=2MB)
|
||||
@@ -147,13 +149,10 @@ extern struct group_info init_groups;
|
||||
.children = LIST_HEAD_INIT(tsk.children), \
|
||||
.sibling = LIST_HEAD_INIT(tsk.sibling), \
|
||||
.group_leader = &tsk, \
|
||||
.group_info = &init_groups, \
|
||||
.cap_effective = CAP_INIT_EFF_SET, \
|
||||
.cap_inheritable = CAP_INIT_INH_SET, \
|
||||
.cap_permitted = CAP_FULL_SET, \
|
||||
.cap_bset = CAP_INIT_BSET, \
|
||||
.securebits = SECUREBITS_DEFAULT, \
|
||||
.user = INIT_USER, \
|
||||
.real_cred = &init_cred, \
|
||||
.cred = &init_cred, \
|
||||
.cred_exec_mutex = \
|
||||
__MUTEX_INITIALIZER(tsk.cred_exec_mutex), \
|
||||
.comm = "swapper", \
|
||||
.thread = INIT_THREAD, \
|
||||
.fs = &init_fs, \
|
||||
|
@@ -659,6 +659,8 @@ struct input_absinfo {
|
||||
#define SW_RADIO SW_RFKILL_ALL /* deprecated */
|
||||
#define SW_MICROPHONE_INSERT 0x04 /* set = inserted */
|
||||
#define SW_DOCK 0x05 /* set = plugged into dock */
|
||||
#define SW_LINEOUT_INSERT 0x06 /* set = inserted */
|
||||
#define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */
|
||||
#define SW_MAX 0x0f
|
||||
#define SW_CNT (SW_MAX+1)
|
||||
|
||||
|
@@ -14,6 +14,8 @@
|
||||
#include <linux/irqflags.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/percpu.h>
|
||||
#include <linux/irqnr.h>
|
||||
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/system.h>
|
||||
@@ -251,9 +253,6 @@ enum
|
||||
BLOCK_SOFTIRQ,
|
||||
TASKLET_SOFTIRQ,
|
||||
SCHED_SOFTIRQ,
|
||||
#ifdef CONFIG_HIGH_RES_TIMERS
|
||||
HRTIMER_SOFTIRQ,
|
||||
#endif
|
||||
RCU_SOFTIRQ, /* Preferable RCU should always be the last softirq */
|
||||
|
||||
NR_SOFTIRQS
|
||||
@@ -465,4 +464,10 @@ static inline void init_irq_proc(void)
|
||||
|
||||
int show_interrupts(struct seq_file *p, void *v);
|
||||
|
||||
struct irq_desc;
|
||||
|
||||
extern int early_irq_init(void);
|
||||
extern int arch_early_irq_init(void);
|
||||
extern int arch_init_chip_data(struct irq_desc *desc, int cpu);
|
||||
|
||||
#endif
|
||||
|
@@ -278,6 +278,7 @@ struct ipv6_pinfo {
|
||||
struct in6_addr saddr;
|
||||
struct in6_addr rcv_saddr;
|
||||
struct in6_addr daddr;
|
||||
struct in6_pktinfo sticky_pktinfo;
|
||||
struct in6_addr *daddr_cache;
|
||||
#ifdef CONFIG_IPV6_SUBTREES
|
||||
struct in6_addr *saddr_cache;
|
||||
|
@@ -129,9 +129,14 @@ struct irq_chip {
|
||||
const char *typename;
|
||||
};
|
||||
|
||||
struct timer_rand_state;
|
||||
struct irq_2_iommu;
|
||||
/**
|
||||
* struct irq_desc - interrupt descriptor
|
||||
* @irq: interrupt number for this descriptor
|
||||
* @timer_rand_state: pointer to timer rand state struct
|
||||
* @kstat_irqs: irq stats per cpu
|
||||
* @irq_2_iommu: iommu with this irq
|
||||
* @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()]
|
||||
* @chip: low level interrupt hardware access
|
||||
* @msi_desc: MSI descriptor
|
||||
@@ -143,8 +148,8 @@ struct irq_chip {
|
||||
* @depth: disable-depth, for nested irq_disable() calls
|
||||
* @wake_depth: enable depth, for multiple set_irq_wake() callers
|
||||
* @irq_count: stats field to detect stalled irqs
|
||||
* @irqs_unhandled: stats field for spurious unhandled interrupts
|
||||
* @last_unhandled: aging timer for unhandled count
|
||||
* @irqs_unhandled: stats field for spurious unhandled interrupts
|
||||
* @lock: locking for SMP
|
||||
* @affinity: IRQ affinity on SMP
|
||||
* @cpu: cpu index useful for balancing
|
||||
@@ -154,6 +159,13 @@ struct irq_chip {
|
||||
*/
|
||||
struct irq_desc {
|
||||
unsigned int irq;
|
||||
#ifdef CONFIG_SPARSE_IRQ
|
||||
struct timer_rand_state *timer_rand_state;
|
||||
unsigned int *kstat_irqs;
|
||||
# ifdef CONFIG_INTR_REMAP
|
||||
struct irq_2_iommu *irq_2_iommu;
|
||||
# endif
|
||||
#endif
|
||||
irq_flow_handler_t handle_irq;
|
||||
struct irq_chip *chip;
|
||||
struct msi_desc *msi_desc;
|
||||
@@ -165,8 +177,8 @@ struct irq_desc {
|
||||
unsigned int depth; /* nested irq disables */
|
||||
unsigned int wake_depth; /* nested wake enables */
|
||||
unsigned int irq_count; /* For detecting broken IRQs */
|
||||
unsigned int irqs_unhandled;
|
||||
unsigned long last_unhandled; /* Aging timer for unhandled count */
|
||||
unsigned int irqs_unhandled;
|
||||
spinlock_t lock;
|
||||
#ifdef CONFIG_SMP
|
||||
cpumask_t affinity;
|
||||
@@ -181,12 +193,32 @@ struct irq_desc {
|
||||
const char *name;
|
||||
} ____cacheline_internodealigned_in_smp;
|
||||
|
||||
extern void arch_init_copy_chip_data(struct irq_desc *old_desc,
|
||||
struct irq_desc *desc, int cpu);
|
||||
extern void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc);
|
||||
|
||||
#ifndef CONFIG_SPARSE_IRQ
|
||||
extern struct irq_desc irq_desc[NR_IRQS];
|
||||
#else /* CONFIG_SPARSE_IRQ */
|
||||
extern struct irq_desc *move_irq_desc(struct irq_desc *old_desc, int cpu);
|
||||
|
||||
static inline struct irq_desc *irq_to_desc(unsigned int irq)
|
||||
#define kstat_irqs_this_cpu(DESC) \
|
||||
((DESC)->kstat_irqs[smp_processor_id()])
|
||||
#define kstat_incr_irqs_this_cpu(irqno, DESC) \
|
||||
((DESC)->kstat_irqs[smp_processor_id()]++)
|
||||
|
||||
#endif /* CONFIG_SPARSE_IRQ */
|
||||
|
||||
extern struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu);
|
||||
|
||||
static inline struct irq_desc *
|
||||
irq_remap_to_desc(unsigned int irq, struct irq_desc *desc)
|
||||
{
|
||||
return (irq < nr_irqs) ? irq_desc + irq : NULL;
|
||||
#ifdef CONFIG_NUMA_MIGRATE_IRQ_DESC
|
||||
return irq_to_desc(irq);
|
||||
#else
|
||||
return desc;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -380,6 +412,11 @@ extern int set_irq_msi(unsigned int irq, struct msi_desc *entry);
|
||||
#define get_irq_data(irq) (irq_to_desc(irq)->handler_data)
|
||||
#define get_irq_msi(irq) (irq_to_desc(irq)->msi_desc)
|
||||
|
||||
#define get_irq_desc_chip(desc) ((desc)->chip)
|
||||
#define get_irq_desc_chip_data(desc) ((desc)->chip_data)
|
||||
#define get_irq_desc_data(desc) ((desc)->handler_data)
|
||||
#define get_irq_desc_msi(desc) ((desc)->msi_desc)
|
||||
|
||||
#endif /* CONFIG_GENERIC_HARDIRQS */
|
||||
|
||||
#endif /* !CONFIG_S390 */
|
||||
|
@@ -1,24 +1,41 @@
|
||||
#ifndef _LINUX_IRQNR_H
|
||||
#define _LINUX_IRQNR_H
|
||||
|
||||
/*
|
||||
* Generic irq_desc iterators:
|
||||
*/
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#ifndef CONFIG_GENERIC_HARDIRQS
|
||||
#include <asm/irq.h>
|
||||
# define nr_irqs NR_IRQS
|
||||
|
||||
# define for_each_irq_desc(irq, desc) \
|
||||
for (irq = 0; irq < nr_irqs; irq++)
|
||||
#else
|
||||
extern int nr_irqs;
|
||||
|
||||
# define for_each_irq_desc(irq, desc) \
|
||||
for (irq = 0, desc = irq_desc; irq < nr_irqs; irq++, desc++)
|
||||
# define for_each_irq_desc_reverse(irq, desc) \
|
||||
for (irq = nr_irqs - 1; irq >= 0; irq--)
|
||||
#else /* CONFIG_GENERIC_HARDIRQS */
|
||||
|
||||
extern int nr_irqs;
|
||||
extern struct irq_desc *irq_to_desc(unsigned int irq);
|
||||
|
||||
# define for_each_irq_desc(irq, desc) \
|
||||
for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; \
|
||||
irq++, desc = irq_to_desc(irq)) \
|
||||
if (desc)
|
||||
|
||||
|
||||
# define for_each_irq_desc_reverse(irq, desc) \
|
||||
for (irq = nr_irqs - 1, desc = irq_desc + (nr_irqs - 1); \
|
||||
irq >= 0; irq--, desc--)
|
||||
#endif
|
||||
for (irq = nr_irqs - 1, desc = irq_to_desc(irq); irq >= 0; \
|
||||
irq--, desc = irq_to_desc(irq)) \
|
||||
if (desc)
|
||||
|
||||
#define for_each_irq_nr(irq) \
|
||||
for (irq = 0; irq < nr_irqs; irq++)
|
||||
#endif /* CONFIG_GENERIC_HARDIRQS */
|
||||
|
||||
#define for_each_irq_nr(irq) \
|
||||
for (irq = 0; irq < nr_irqs; irq++)
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif
|
||||
|
@@ -115,10 +115,20 @@ static inline u64 get_jiffies_64(void)
|
||||
((long)(a) - (long)(b) >= 0))
|
||||
#define time_before_eq(a,b) time_after_eq(b,a)
|
||||
|
||||
/*
|
||||
* Calculate whether a is in the range of [b, c].
|
||||
*/
|
||||
#define time_in_range(a,b,c) \
|
||||
(time_after_eq(a,b) && \
|
||||
time_before_eq(a,c))
|
||||
|
||||
/*
|
||||
* Calculate whether a is in the range of [b, c).
|
||||
*/
|
||||
#define time_in_range_open(a,b,c) \
|
||||
(time_after_eq(a,b) && \
|
||||
time_before(a,c))
|
||||
|
||||
/* Same as above, but does so with platform independent 64bit types.
|
||||
* These must be used when utilizing jiffies_64 (i.e. return value of
|
||||
* get_jiffies_64() */
|
||||
|
@@ -141,6 +141,15 @@ extern int _cond_resched(void);
|
||||
(__x < 0) ? -__x : __x; \
|
||||
})
|
||||
|
||||
#ifdef CONFIG_PROVE_LOCKING
|
||||
void might_fault(void);
|
||||
#else
|
||||
static inline void might_fault(void)
|
||||
{
|
||||
might_sleep();
|
||||
}
|
||||
#endif
|
||||
|
||||
extern struct atomic_notifier_head panic_notifier_list;
|
||||
extern long (*panic_blink)(long time);
|
||||
NORET_TYPE void panic(const char * fmt, ...)
|
||||
@@ -188,6 +197,8 @@ extern unsigned long long memparse(const char *ptr, char **retptr);
|
||||
extern int core_kernel_text(unsigned long addr);
|
||||
extern int __kernel_text_address(unsigned long addr);
|
||||
extern int kernel_text_address(unsigned long addr);
|
||||
extern int func_ptr_is_kernel_text(void *ptr);
|
||||
|
||||
struct pid;
|
||||
extern struct pid *session_of_pgrp(struct pid *pgrp);
|
||||
|
||||
@@ -361,18 +372,6 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
|
||||
((unsigned char *)&addr)[3]
|
||||
#define NIPQUAD_FMT "%u.%u.%u.%u"
|
||||
|
||||
#define NIP6(addr) \
|
||||
ntohs((addr).s6_addr16[0]), \
|
||||
ntohs((addr).s6_addr16[1]), \
|
||||
ntohs((addr).s6_addr16[2]), \
|
||||
ntohs((addr).s6_addr16[3]), \
|
||||
ntohs((addr).s6_addr16[4]), \
|
||||
ntohs((addr).s6_addr16[5]), \
|
||||
ntohs((addr).s6_addr16[6]), \
|
||||
ntohs((addr).s6_addr16[7])
|
||||
#define NIP6_FMT "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x"
|
||||
#define NIP6_SEQFMT "%04x%04x%04x%04x%04x%04x%04x%04x"
|
||||
|
||||
#if defined(__LITTLE_ENDIAN)
|
||||
#define HIPQUAD(addr) \
|
||||
((unsigned char *)&addr)[3], \
|
||||
|
@@ -28,7 +28,9 @@ struct cpu_usage_stat {
|
||||
|
||||
struct kernel_stat {
|
||||
struct cpu_usage_stat cpustat;
|
||||
unsigned int irqs[NR_IRQS];
|
||||
#ifndef CONFIG_SPARSE_IRQ
|
||||
unsigned int irqs[NR_IRQS];
|
||||
#endif
|
||||
};
|
||||
|
||||
DECLARE_PER_CPU(struct kernel_stat, kstat);
|
||||
@@ -39,6 +41,10 @@ DECLARE_PER_CPU(struct kernel_stat, kstat);
|
||||
|
||||
extern unsigned long long nr_context_switches(void);
|
||||
|
||||
#ifndef CONFIG_SPARSE_IRQ
|
||||
#define kstat_irqs_this_cpu(irq) \
|
||||
(kstat_this_cpu.irqs[irq])
|
||||
|
||||
struct irq_desc;
|
||||
|
||||
static inline void kstat_incr_irqs_this_cpu(unsigned int irq,
|
||||
@@ -46,11 +52,17 @@ static inline void kstat_incr_irqs_this_cpu(unsigned int irq,
|
||||
{
|
||||
kstat_this_cpu.irqs[irq]++;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef CONFIG_SPARSE_IRQ
|
||||
static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu)
|
||||
{
|
||||
return kstat_cpu(cpu).irqs[irq];
|
||||
}
|
||||
#else
|
||||
extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Number of interrupts per specific IRQ source, since bootup
|
||||
|
@@ -100,6 +100,10 @@ struct kimage {
|
||||
#define KEXEC_TYPE_DEFAULT 0
|
||||
#define KEXEC_TYPE_CRASH 1
|
||||
unsigned int preserve_context : 1;
|
||||
|
||||
#ifdef ARCH_HAS_KIMAGE_ARCH
|
||||
struct kimage_arch arch;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
@@ -1,66 +0,0 @@
|
||||
/* key-ui.h: key userspace interface stuff
|
||||
*
|
||||
* Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
|
||||
* Written by David Howells (dhowells@redhat.com)
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_KEY_UI_H
|
||||
#define _LINUX_KEY_UI_H
|
||||
|
||||
#include <linux/key.h>
|
||||
|
||||
/* the key tree */
|
||||
extern struct rb_root key_serial_tree;
|
||||
extern spinlock_t key_serial_lock;
|
||||
|
||||
/* required permissions */
|
||||
#define KEY_VIEW 0x01 /* require permission to view attributes */
|
||||
#define KEY_READ 0x02 /* require permission to read content */
|
||||
#define KEY_WRITE 0x04 /* require permission to update / modify */
|
||||
#define KEY_SEARCH 0x08 /* require permission to search (keyring) or find (key) */
|
||||
#define KEY_LINK 0x10 /* require permission to link */
|
||||
#define KEY_SETATTR 0x20 /* require permission to change attributes */
|
||||
#define KEY_ALL 0x3f /* all the above permissions */
|
||||
|
||||
/*
|
||||
* the keyring payload contains a list of the keys to which the keyring is
|
||||
* subscribed
|
||||
*/
|
||||
struct keyring_list {
|
||||
struct rcu_head rcu; /* RCU deletion hook */
|
||||
unsigned short maxkeys; /* max keys this list can hold */
|
||||
unsigned short nkeys; /* number of keys currently held */
|
||||
unsigned short delkey; /* key to be unlinked by RCU */
|
||||
struct key *keys[0];
|
||||
};
|
||||
|
||||
/*
|
||||
* check to see whether permission is granted to use a key in the desired way
|
||||
*/
|
||||
extern int key_task_permission(const key_ref_t key_ref,
|
||||
struct task_struct *context,
|
||||
key_perm_t perm);
|
||||
|
||||
static inline int key_permission(const key_ref_t key_ref, key_perm_t perm)
|
||||
{
|
||||
return key_task_permission(key_ref, current, perm);
|
||||
}
|
||||
|
||||
extern key_ref_t lookup_user_key(struct task_struct *context,
|
||||
key_serial_t id, int create, int partial,
|
||||
key_perm_t perm);
|
||||
|
||||
extern long join_session_keyring(const char *name);
|
||||
|
||||
extern struct key_type *key_type_lookup(const char *type);
|
||||
extern void key_type_put(struct key_type *ktype);
|
||||
|
||||
#define key_negative_timeout 60 /* default timeout on a negative key's existence */
|
||||
|
||||
|
||||
#endif /* _LINUX_KEY_UI_H */
|
@@ -73,6 +73,7 @@ struct key;
|
||||
struct seq_file;
|
||||
struct user_struct;
|
||||
struct signal_struct;
|
||||
struct cred;
|
||||
|
||||
struct key_type;
|
||||
struct key_owner;
|
||||
@@ -181,7 +182,7 @@ struct key {
|
||||
extern struct key *key_alloc(struct key_type *type,
|
||||
const char *desc,
|
||||
uid_t uid, gid_t gid,
|
||||
struct task_struct *ctx,
|
||||
const struct cred *cred,
|
||||
key_perm_t perm,
|
||||
unsigned long flags);
|
||||
|
||||
@@ -249,7 +250,7 @@ extern int key_unlink(struct key *keyring,
|
||||
struct key *key);
|
||||
|
||||
extern struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid,
|
||||
struct task_struct *ctx,
|
||||
const struct cred *cred,
|
||||
unsigned long flags,
|
||||
struct key *dest);
|
||||
|
||||
@@ -276,24 +277,11 @@ extern ctl_table key_sysctls[];
|
||||
/*
|
||||
* the userspace interface
|
||||
*/
|
||||
extern void switch_uid_keyring(struct user_struct *new_user);
|
||||
extern int copy_keys(unsigned long clone_flags, struct task_struct *tsk);
|
||||
extern int copy_thread_group_keys(struct task_struct *tsk);
|
||||
extern void exit_keys(struct task_struct *tsk);
|
||||
extern void exit_thread_group_keys(struct signal_struct *tg);
|
||||
extern int suid_keys(struct task_struct *tsk);
|
||||
extern int exec_keys(struct task_struct *tsk);
|
||||
extern int install_thread_keyring_to_cred(struct cred *cred);
|
||||
extern void key_fsuid_changed(struct task_struct *tsk);
|
||||
extern void key_fsgid_changed(struct task_struct *tsk);
|
||||
extern void key_init(void);
|
||||
|
||||
#define __install_session_keyring(tsk, keyring) \
|
||||
({ \
|
||||
struct key *old_session = tsk->signal->session_keyring; \
|
||||
tsk->signal->session_keyring = keyring; \
|
||||
old_session; \
|
||||
})
|
||||
|
||||
#else /* CONFIG_KEYS */
|
||||
|
||||
#define key_validate(k) 0
|
||||
@@ -302,17 +290,9 @@ extern void key_init(void);
|
||||
#define key_revoke(k) do { } while(0)
|
||||
#define key_put(k) do { } while(0)
|
||||
#define key_ref_put(k) do { } while(0)
|
||||
#define make_key_ref(k, p) ({ NULL; })
|
||||
#define key_ref_to_ptr(k) ({ NULL; })
|
||||
#define make_key_ref(k, p) NULL
|
||||
#define key_ref_to_ptr(k) NULL
|
||||
#define is_key_possessed(k) 0
|
||||
#define switch_uid_keyring(u) do { } while(0)
|
||||
#define __install_session_keyring(t, k) ({ NULL; })
|
||||
#define copy_keys(f,t) 0
|
||||
#define copy_thread_group_keys(t) 0
|
||||
#define exit_keys(t) do { } while(0)
|
||||
#define exit_thread_group_keys(tg) do { } while(0)
|
||||
#define suid_keys(t) do { } while(0)
|
||||
#define exec_keys(t) do { } while(0)
|
||||
#define key_fsuid_changed(t) do { } while(0)
|
||||
#define key_fsgid_changed(t) do { } while(0)
|
||||
#define key_init() do { } while(0)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/* keyctl.h: keyctl command IDs
|
||||
*
|
||||
* Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
|
||||
* Copyright (C) 2004, 2008 Red Hat, Inc. All Rights Reserved.
|
||||
* Written by David Howells (dhowells@redhat.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -20,6 +20,7 @@
|
||||
#define KEY_SPEC_USER_SESSION_KEYRING -5 /* - key ID for UID-session keyring */
|
||||
#define KEY_SPEC_GROUP_KEYRING -6 /* - key ID for GID-specific keyring */
|
||||
#define KEY_SPEC_REQKEY_AUTH_KEY -7 /* - key ID for assumed request_key auth key */
|
||||
#define KEY_SPEC_REQUESTOR_KEYRING -8 /* - key ID for request_key() dest keyring */
|
||||
|
||||
/* request-key default keyrings */
|
||||
#define KEY_REQKEY_DEFL_NO_CHANGE -1
|
||||
@@ -30,6 +31,7 @@
|
||||
#define KEY_REQKEY_DEFL_USER_KEYRING 4
|
||||
#define KEY_REQKEY_DEFL_USER_SESSION_KEYRING 5
|
||||
#define KEY_REQKEY_DEFL_GROUP_KEYRING 6
|
||||
#define KEY_REQKEY_DEFL_REQUESTOR_KEYRING 7
|
||||
|
||||
/* keyctl commands */
|
||||
#define KEYCTL_GET_KEYRING_ID 0 /* ask for a keyring's ID */
|
||||
|
@@ -54,9 +54,13 @@ struct lguest_vqconfig {
|
||||
/* Write command first word is a request. */
|
||||
enum lguest_req
|
||||
{
|
||||
LHREQ_INITIALIZE, /* + base, pfnlimit, pgdir, start */
|
||||
LHREQ_INITIALIZE, /* + base, pfnlimit, start */
|
||||
LHREQ_GETDMA, /* No longer used */
|
||||
LHREQ_IRQ, /* + irq */
|
||||
LHREQ_BREAK, /* + on/off flag (on blocks until someone does off) */
|
||||
};
|
||||
|
||||
/* The alignment to use between consumer and producer parts of vring.
|
||||
* x86 pagesize for historical reasons. */
|
||||
#define LGUEST_VRING_ALIGN 4096
|
||||
#endif /* _LINUX_LGUEST_LAUNCHER */
|
||||
|
@@ -213,10 +213,11 @@ enum {
|
||||
ATA_PFLAG_FROZEN = (1 << 2), /* port is frozen */
|
||||
ATA_PFLAG_RECOVERED = (1 << 3), /* recovery action performed */
|
||||
ATA_PFLAG_LOADING = (1 << 4), /* boot/loading probe */
|
||||
ATA_PFLAG_UNLOADING = (1 << 5), /* module is unloading */
|
||||
ATA_PFLAG_SCSI_HOTPLUG = (1 << 6), /* SCSI hotplug scheduled */
|
||||
ATA_PFLAG_INITIALIZING = (1 << 7), /* being initialized, don't touch */
|
||||
ATA_PFLAG_RESETTING = (1 << 8), /* reset in progress */
|
||||
ATA_PFLAG_UNLOADING = (1 << 9), /* driver is being unloaded */
|
||||
ATA_PFLAG_UNLOADED = (1 << 10), /* driver is unloaded */
|
||||
|
||||
ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */
|
||||
ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */
|
||||
@@ -1285,26 +1286,62 @@ static inline int ata_link_active(struct ata_link *link)
|
||||
return ata_tag_valid(link->active_tag) || link->sactive;
|
||||
}
|
||||
|
||||
extern struct ata_link *__ata_port_next_link(struct ata_port *ap,
|
||||
struct ata_link *link,
|
||||
bool dev_only);
|
||||
/*
|
||||
* Iterators
|
||||
*
|
||||
* ATA_LITER_* constants are used to select link iteration mode and
|
||||
* ATA_DITER_* device iteration mode.
|
||||
*
|
||||
* For a custom iteration directly using ata_{link|dev}_next(), if
|
||||
* @link or @dev, respectively, is NULL, the first element is
|
||||
* returned. @dev and @link can be any valid device or link and the
|
||||
* next element according to the iteration mode will be returned.
|
||||
* After the last element, NULL is returned.
|
||||
*/
|
||||
enum ata_link_iter_mode {
|
||||
ATA_LITER_EDGE, /* if present, PMP links only; otherwise,
|
||||
* host link. no slave link */
|
||||
ATA_LITER_HOST_FIRST, /* host link followed by PMP or slave links */
|
||||
ATA_LITER_PMP_FIRST, /* PMP links followed by host link,
|
||||
* slave link still comes after host link */
|
||||
};
|
||||
|
||||
#define __ata_port_for_each_link(link, ap) \
|
||||
for ((link) = __ata_port_next_link((ap), NULL, false); (link); \
|
||||
(link) = __ata_port_next_link((ap), (link), false))
|
||||
enum ata_dev_iter_mode {
|
||||
ATA_DITER_ENABLED,
|
||||
ATA_DITER_ENABLED_REVERSE,
|
||||
ATA_DITER_ALL,
|
||||
ATA_DITER_ALL_REVERSE,
|
||||
};
|
||||
|
||||
#define ata_port_for_each_link(link, ap) \
|
||||
for ((link) = __ata_port_next_link((ap), NULL, true); (link); \
|
||||
(link) = __ata_port_next_link((ap), (link), true))
|
||||
extern struct ata_link *ata_link_next(struct ata_link *link,
|
||||
struct ata_port *ap,
|
||||
enum ata_link_iter_mode mode);
|
||||
|
||||
#define ata_link_for_each_dev(dev, link) \
|
||||
for ((dev) = (link)->device; \
|
||||
(dev) < (link)->device + ata_link_max_devices(link) || ((dev) = NULL); \
|
||||
(dev)++)
|
||||
extern struct ata_device *ata_dev_next(struct ata_device *dev,
|
||||
struct ata_link *link,
|
||||
enum ata_dev_iter_mode mode);
|
||||
|
||||
#define ata_link_for_each_dev_reverse(dev, link) \
|
||||
for ((dev) = (link)->device + ata_link_max_devices(link) - 1; \
|
||||
(dev) >= (link)->device || ((dev) = NULL); (dev)--)
|
||||
/*
|
||||
* Shortcut notation for iterations
|
||||
*
|
||||
* ata_for_each_link() iterates over each link of @ap according to
|
||||
* @mode. @link points to the current link in the loop. @link is
|
||||
* NULL after loop termination. ata_for_each_dev() works the same way
|
||||
* except that it iterates over each device of @link.
|
||||
*
|
||||
* Note that the mode prefixes ATA_{L|D}ITER_ shouldn't need to be
|
||||
* specified when using the following shorthand notations. Only the
|
||||
* mode itself (EDGE, HOST_FIRST, ENABLED, etc...) should be
|
||||
* specified. This not only increases brevity but also makes it
|
||||
* impossible to use ATA_LITER_* for device iteration or vice-versa.
|
||||
*/
|
||||
#define ata_for_each_link(link, ap, mode) \
|
||||
for ((link) = ata_link_next(NULL, (ap), ATA_LITER_##mode); (link); \
|
||||
(link) = ata_link_next((link), (ap), ATA_LITER_##mode))
|
||||
|
||||
#define ata_for_each_dev(dev, link, mode) \
|
||||
for ((dev) = ata_dev_next(NULL, (link), ATA_DITER_##mode); (dev); \
|
||||
(dev) = ata_dev_next((dev), (link), ATA_DITER_##mode))
|
||||
|
||||
/**
|
||||
* ata_ncq_enabled - Test whether NCQ is enabled
|
||||
|
@@ -64,14 +64,6 @@
|
||||
name:
|
||||
#endif
|
||||
|
||||
#define KPROBE_ENTRY(name) \
|
||||
.pushsection .kprobes.text, "ax"; \
|
||||
ENTRY(name)
|
||||
|
||||
#define KPROBE_END(name) \
|
||||
END(name); \
|
||||
.popsection
|
||||
|
||||
#ifndef END
|
||||
#define END(name) \
|
||||
.size name, .-name
|
||||
|
94
include/linux/list_nulls.h
Normal file
94
include/linux/list_nulls.h
Normal file
@@ -0,0 +1,94 @@
|
||||
#ifndef _LINUX_LIST_NULLS_H
|
||||
#define _LINUX_LIST_NULLS_H
|
||||
|
||||
/*
|
||||
* Special version of lists, where end of list is not a NULL pointer,
|
||||
* but a 'nulls' marker, which can have many different values.
|
||||
* (up to 2^31 different values guaranteed on all platforms)
|
||||
*
|
||||
* In the standard hlist, termination of a list is the NULL pointer.
|
||||
* In this special 'nulls' variant, we use the fact that objects stored in
|
||||
* a list are aligned on a word (4 or 8 bytes alignment).
|
||||
* We therefore use the last significant bit of 'ptr' :
|
||||
* Set to 1 : This is a 'nulls' end-of-list marker (ptr >> 1)
|
||||
* Set to 0 : This is a pointer to some object (ptr)
|
||||
*/
|
||||
|
||||
struct hlist_nulls_head {
|
||||
struct hlist_nulls_node *first;
|
||||
};
|
||||
|
||||
struct hlist_nulls_node {
|
||||
struct hlist_nulls_node *next, **pprev;
|
||||
};
|
||||
#define INIT_HLIST_NULLS_HEAD(ptr, nulls) \
|
||||
((ptr)->first = (struct hlist_nulls_node *) (1UL | (((long)nulls) << 1)))
|
||||
|
||||
#define hlist_nulls_entry(ptr, type, member) container_of(ptr,type,member)
|
||||
/**
|
||||
* ptr_is_a_nulls - Test if a ptr is a nulls
|
||||
* @ptr: ptr to be tested
|
||||
*
|
||||
*/
|
||||
static inline int is_a_nulls(const struct hlist_nulls_node *ptr)
|
||||
{
|
||||
return ((unsigned long)ptr & 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* get_nulls_value - Get the 'nulls' value of the end of chain
|
||||
* @ptr: end of chain
|
||||
*
|
||||
* Should be called only if is_a_nulls(ptr);
|
||||
*/
|
||||
static inline unsigned long get_nulls_value(const struct hlist_nulls_node *ptr)
|
||||
{
|
||||
return ((unsigned long)ptr) >> 1;
|
||||
}
|
||||
|
||||
static inline int hlist_nulls_unhashed(const struct hlist_nulls_node *h)
|
||||
{
|
||||
return !h->pprev;
|
||||
}
|
||||
|
||||
static inline int hlist_nulls_empty(const struct hlist_nulls_head *h)
|
||||
{
|
||||
return is_a_nulls(h->first);
|
||||
}
|
||||
|
||||
static inline void __hlist_nulls_del(struct hlist_nulls_node *n)
|
||||
{
|
||||
struct hlist_nulls_node *next = n->next;
|
||||
struct hlist_nulls_node **pprev = n->pprev;
|
||||
*pprev = next;
|
||||
if (!is_a_nulls(next))
|
||||
next->pprev = pprev;
|
||||
}
|
||||
|
||||
/**
|
||||
* hlist_nulls_for_each_entry - iterate over list of given type
|
||||
* @tpos: the type * to use as a loop cursor.
|
||||
* @pos: the &struct hlist_node to use as a loop cursor.
|
||||
* @head: the head for your list.
|
||||
* @member: the name of the hlist_node within the struct.
|
||||
*
|
||||
*/
|
||||
#define hlist_nulls_for_each_entry(tpos, pos, head, member) \
|
||||
for (pos = (head)->first; \
|
||||
(!is_a_nulls(pos)) && \
|
||||
({ tpos = hlist_nulls_entry(pos, typeof(*tpos), member); 1;}); \
|
||||
pos = pos->next)
|
||||
|
||||
/**
|
||||
* hlist_nulls_for_each_entry_from - iterate over a hlist continuing from current point
|
||||
* @tpos: the type * to use as a loop cursor.
|
||||
* @pos: the &struct hlist_node to use as a loop cursor.
|
||||
* @member: the name of the hlist_node within the struct.
|
||||
*
|
||||
*/
|
||||
#define hlist_nulls_for_each_entry_from(tpos, pos, member) \
|
||||
for (; (!is_a_nulls(pos)) && \
|
||||
({ tpos = hlist_nulls_entry(pos, typeof(*tpos), member); 1;}); \
|
||||
pos = pos->next)
|
||||
|
||||
#endif
|
@@ -41,6 +41,7 @@ struct nlmclnt_initdata {
|
||||
size_t addrlen;
|
||||
unsigned short protocol;
|
||||
u32 nfs_version;
|
||||
int noresvport;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@@ -49,6 +49,7 @@ struct nlm_host {
|
||||
unsigned short h_proto; /* transport proto */
|
||||
unsigned short h_reclaiming : 1,
|
||||
h_server : 1, /* server side, not client side */
|
||||
h_noresvport : 1,
|
||||
h_inuse : 1;
|
||||
wait_queue_head_t h_gracewait; /* wait while reclaiming */
|
||||
struct rw_semaphore h_rwsem; /* Reboot recovery lock */
|
||||
@@ -220,7 +221,8 @@ struct nlm_host *nlmclnt_lookup_host(const struct sockaddr *sap,
|
||||
const size_t salen,
|
||||
const unsigned short protocol,
|
||||
const u32 version,
|
||||
const char *hostname);
|
||||
const char *hostname,
|
||||
int noresvport);
|
||||
struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp,
|
||||
const char *hostname,
|
||||
const size_t hostname_len);
|
||||
|
@@ -73,6 +73,8 @@ struct lock_class_key {
|
||||
struct lockdep_subclass_key subkeys[MAX_LOCKDEP_SUBCLASSES];
|
||||
};
|
||||
|
||||
#define LOCKSTAT_POINTS 4
|
||||
|
||||
/*
|
||||
* The lock-class itself:
|
||||
*/
|
||||
@@ -119,7 +121,8 @@ struct lock_class {
|
||||
int name_version;
|
||||
|
||||
#ifdef CONFIG_LOCK_STAT
|
||||
unsigned long contention_point[4];
|
||||
unsigned long contention_point[LOCKSTAT_POINTS];
|
||||
unsigned long contending_point[LOCKSTAT_POINTS];
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -144,6 +147,7 @@ enum bounce_type {
|
||||
|
||||
struct lock_class_stats {
|
||||
unsigned long contention_point[4];
|
||||
unsigned long contending_point[4];
|
||||
struct lock_time read_waittime;
|
||||
struct lock_time write_waittime;
|
||||
struct lock_time read_holdtime;
|
||||
@@ -165,6 +169,7 @@ struct lockdep_map {
|
||||
const char *name;
|
||||
#ifdef CONFIG_LOCK_STAT
|
||||
int cpu;
|
||||
unsigned long ip;
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -309,8 +314,15 @@ extern void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
|
||||
extern void lock_release(struct lockdep_map *lock, int nested,
|
||||
unsigned long ip);
|
||||
|
||||
extern void lock_set_subclass(struct lockdep_map *lock, unsigned int subclass,
|
||||
unsigned long ip);
|
||||
extern void lock_set_class(struct lockdep_map *lock, const char *name,
|
||||
struct lock_class_key *key, unsigned int subclass,
|
||||
unsigned long ip);
|
||||
|
||||
static inline void lock_set_subclass(struct lockdep_map *lock,
|
||||
unsigned int subclass, unsigned long ip)
|
||||
{
|
||||
lock_set_class(lock, lock->name, lock->key, subclass, ip);
|
||||
}
|
||||
|
||||
# define INIT_LOCKDEP .lockdep_recursion = 0,
|
||||
|
||||
@@ -328,6 +340,7 @@ static inline void lockdep_on(void)
|
||||
|
||||
# define lock_acquire(l, s, t, r, c, n, i) do { } while (0)
|
||||
# define lock_release(l, n, i) do { } while (0)
|
||||
# define lock_set_class(l, n, k, s, i) do { } while (0)
|
||||
# define lock_set_subclass(l, s, i) do { } while (0)
|
||||
# define lockdep_init() do { } while (0)
|
||||
# define lockdep_info() do { } while (0)
|
||||
@@ -356,7 +369,7 @@ struct lock_class_key { };
|
||||
#ifdef CONFIG_LOCK_STAT
|
||||
|
||||
extern void lock_contended(struct lockdep_map *lock, unsigned long ip);
|
||||
extern void lock_acquired(struct lockdep_map *lock);
|
||||
extern void lock_acquired(struct lockdep_map *lock, unsigned long ip);
|
||||
|
||||
#define LOCK_CONTENDED(_lock, try, lock) \
|
||||
do { \
|
||||
@@ -364,20 +377,20 @@ do { \
|
||||
lock_contended(&(_lock)->dep_map, _RET_IP_); \
|
||||
lock(_lock); \
|
||||
} \
|
||||
lock_acquired(&(_lock)->dep_map); \
|
||||
lock_acquired(&(_lock)->dep_map, _RET_IP_); \
|
||||
} while (0)
|
||||
|
||||
#else /* CONFIG_LOCK_STAT */
|
||||
|
||||
#define lock_contended(lockdep_map, ip) do {} while (0)
|
||||
#define lock_acquired(lockdep_map) do {} while (0)
|
||||
#define lock_acquired(lockdep_map, ip) do {} while (0)
|
||||
|
||||
#define LOCK_CONTENDED(_lock, try, lock) \
|
||||
lock(_lock)
|
||||
|
||||
#endif /* CONFIG_LOCK_STAT */
|
||||
|
||||
#if defined(CONFIG_TRACE_IRQFLAGS) && defined(CONFIG_GENERIC_HARDIRQS)
|
||||
#ifdef CONFIG_GENERIC_HARDIRQS
|
||||
extern void early_init_irq_lock_class(void);
|
||||
#else
|
||||
static inline void early_init_irq_lock_class(void)
|
||||
@@ -481,4 +494,22 @@ static inline void print_irqtrace_events(struct task_struct *curr)
|
||||
# define lock_map_release(l) do { } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PROVE_LOCKING
|
||||
# define might_lock(lock) \
|
||||
do { \
|
||||
typecheck(struct lockdep_map *, &(lock)->dep_map); \
|
||||
lock_acquire(&(lock)->dep_map, 0, 0, 0, 2, NULL, _THIS_IP_); \
|
||||
lock_release(&(lock)->dep_map, 0, _THIS_IP_); \
|
||||
} while (0)
|
||||
# define might_lock_read(lock) \
|
||||
do { \
|
||||
typecheck(struct lockdep_map *, &(lock)->dep_map); \
|
||||
lock_acquire(&(lock)->dep_map, 0, 0, 1, 2, NULL, _THIS_IP_); \
|
||||
lock_release(&(lock)->dep_map, 0, _THIS_IP_); \
|
||||
} while (0)
|
||||
#else
|
||||
# define might_lock(lock) do { } while (0)
|
||||
# define might_lock_read(lock) do { } while (0)
|
||||
#endif
|
||||
|
||||
#endif /* __LINUX_LOCKDEP_H */
|
||||
|
@@ -12,6 +12,7 @@
|
||||
* See the file COPYING for more details.
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
struct module;
|
||||
@@ -48,10 +49,28 @@ struct marker {
|
||||
void (*call)(const struct marker *mdata, void *call_private, ...);
|
||||
struct marker_probe_closure single;
|
||||
struct marker_probe_closure *multi;
|
||||
const char *tp_name; /* Optional tracepoint name */
|
||||
void *tp_cb; /* Optional tracepoint callback */
|
||||
} __attribute__((aligned(8)));
|
||||
|
||||
#ifdef CONFIG_MARKERS
|
||||
|
||||
#define _DEFINE_MARKER(name, tp_name_str, tp_cb, format) \
|
||||
static const char __mstrtab_##name[] \
|
||||
__attribute__((section("__markers_strings"))) \
|
||||
= #name "\0" format; \
|
||||
static struct marker __mark_##name \
|
||||
__attribute__((section("__markers"), aligned(8))) = \
|
||||
{ __mstrtab_##name, &__mstrtab_##name[sizeof(#name)], \
|
||||
0, 0, marker_probe_cb, { __mark_empty_function, NULL},\
|
||||
NULL, tp_name_str, tp_cb }
|
||||
|
||||
#define DEFINE_MARKER(name, format) \
|
||||
_DEFINE_MARKER(name, NULL, NULL, format)
|
||||
|
||||
#define DEFINE_MARKER_TP(name, tp_name, tp_cb, format) \
|
||||
_DEFINE_MARKER(name, #tp_name, tp_cb, format)
|
||||
|
||||
/*
|
||||
* Note : the empty asm volatile with read constraint is used here instead of a
|
||||
* "used" attribute to fix a gcc 4.1.x bug.
|
||||
@@ -65,14 +84,7 @@ struct marker {
|
||||
*/
|
||||
#define __trace_mark(generic, name, call_private, format, args...) \
|
||||
do { \
|
||||
static const char __mstrtab_##name[] \
|
||||
__attribute__((section("__markers_strings"))) \
|
||||
= #name "\0" format; \
|
||||
static struct marker __mark_##name \
|
||||
__attribute__((section("__markers"), aligned(8))) = \
|
||||
{ __mstrtab_##name, &__mstrtab_##name[sizeof(#name)], \
|
||||
0, 0, marker_probe_cb, \
|
||||
{ __mark_empty_function, NULL}, NULL }; \
|
||||
DEFINE_MARKER(name, format); \
|
||||
__mark_check_format(format, ## args); \
|
||||
if (unlikely(__mark_##name.state)) { \
|
||||
(*__mark_##name.call) \
|
||||
@@ -80,14 +92,39 @@ struct marker {
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define __trace_mark_tp(name, call_private, tp_name, tp_cb, format, args...) \
|
||||
do { \
|
||||
void __check_tp_type(void) \
|
||||
{ \
|
||||
register_trace_##tp_name(tp_cb); \
|
||||
} \
|
||||
DEFINE_MARKER_TP(name, tp_name, tp_cb, format); \
|
||||
__mark_check_format(format, ## args); \
|
||||
(*__mark_##name.call)(&__mark_##name, call_private, \
|
||||
## args); \
|
||||
} while (0)
|
||||
|
||||
extern void marker_update_probe_range(struct marker *begin,
|
||||
struct marker *end);
|
||||
|
||||
#define GET_MARKER(name) (__mark_##name)
|
||||
|
||||
#else /* !CONFIG_MARKERS */
|
||||
#define DEFINE_MARKER(name, tp_name, tp_cb, format)
|
||||
#define __trace_mark(generic, name, call_private, format, args...) \
|
||||
__mark_check_format(format, ## args)
|
||||
#define __trace_mark_tp(name, call_private, tp_name, tp_cb, format, args...) \
|
||||
do { \
|
||||
void __check_tp_type(void) \
|
||||
{ \
|
||||
register_trace_##tp_name(tp_cb); \
|
||||
} \
|
||||
__mark_check_format(format, ## args); \
|
||||
} while (0)
|
||||
static inline void marker_update_probe_range(struct marker *begin,
|
||||
struct marker *end)
|
||||
{ }
|
||||
#define GET_MARKER(name)
|
||||
#endif /* CONFIG_MARKERS */
|
||||
|
||||
/**
|
||||
@@ -116,6 +153,20 @@ static inline void marker_update_probe_range(struct marker *begin,
|
||||
#define _trace_mark(name, format, args...) \
|
||||
__trace_mark(1, name, NULL, format, ## args)
|
||||
|
||||
/**
|
||||
* trace_mark_tp - Marker in a tracepoint callback
|
||||
* @name: marker name, not quoted.
|
||||
* @tp_name: tracepoint name, not quoted.
|
||||
* @tp_cb: tracepoint callback. Should have an associated global symbol so it
|
||||
* is not optimized away by the compiler (should not be static).
|
||||
* @format: format string
|
||||
* @args...: variable argument list
|
||||
*
|
||||
* Places a marker in a tracepoint callback.
|
||||
*/
|
||||
#define trace_mark_tp(name, tp_name, tp_cb, format, args...) \
|
||||
__trace_mark_tp(name, NULL, tp_name, tp_cb, format, ## args)
|
||||
|
||||
/**
|
||||
* MARK_NOARGS - Format string for a marker with no argument.
|
||||
*/
|
||||
@@ -136,8 +187,6 @@ extern marker_probe_func __mark_empty_function;
|
||||
|
||||
extern void marker_probe_cb(const struct marker *mdata,
|
||||
void *call_private, ...);
|
||||
extern void marker_probe_cb_noarg(const struct marker *mdata,
|
||||
void *call_private, ...);
|
||||
|
||||
/*
|
||||
* Connect a probe to a marker.
|
||||
@@ -162,8 +211,10 @@ extern void *marker_get_private_data(const char *name, marker_probe_func *probe,
|
||||
|
||||
/*
|
||||
* marker_synchronize_unregister must be called between the last marker probe
|
||||
* unregistration and the end of module exit to make sure there is no caller
|
||||
* executing a probe when it is freed.
|
||||
* unregistration and the first one of
|
||||
* - the end of module exit function
|
||||
* - the free of any resource used by the probes
|
||||
* to ensure the code and data are valid for any possibly running probes.
|
||||
*/
|
||||
#define marker_synchronize_unregister() synchronize_sched()
|
||||
|
||||
|
25
include/linux/mdio-gpio.h
Normal file
25
include/linux/mdio-gpio.h
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* MDIO-GPIO bus platform data structures
|
||||
*
|
||||
* Copyright (C) 2008, Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public License
|
||||
* version 2. This program is licensed "as is" without any warranty of any
|
||||
* kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_MDIO_GPIO_H
|
||||
#define __LINUX_MDIO_GPIO_H
|
||||
|
||||
#include <linux/mdio-bitbang.h>
|
||||
|
||||
struct mdio_gpio_platform_data {
|
||||
/* GPIO numbers for bus pins */
|
||||
unsigned int mdc;
|
||||
unsigned int mdio;
|
||||
|
||||
unsigned int phy_mask;
|
||||
int irqs[PHY_MAX_ADDR];
|
||||
};
|
||||
|
||||
#endif /* __LINUX_MDIO_GPIO_H */
|
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* audio.h -- Audio Driver for Wolfson WM8350 PMIC
|
||||
*
|
||||
* Copyright 2007 Wolfson Microelectronics PLC
|
||||
* Copyright 2007, 2008 Wolfson Microelectronics PLC
|
||||
*
|
||||
* 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
|
||||
@@ -70,9 +70,9 @@
|
||||
#define WM8350_CODEC_ISEL_0_5 3 /* x0.5 */
|
||||
|
||||
#define WM8350_VMID_OFF 0
|
||||
#define WM8350_VMID_500K 1
|
||||
#define WM8350_VMID_100K 2
|
||||
#define WM8350_VMID_10K 3
|
||||
#define WM8350_VMID_300K 1
|
||||
#define WM8350_VMID_50K 2
|
||||
#define WM8350_VMID_5K 3
|
||||
|
||||
/*
|
||||
* R40 (0x28) - Clock Control 1
|
||||
@@ -591,8 +591,38 @@
|
||||
#define WM8350_IRQ_CODEC_MICSCD 41
|
||||
#define WM8350_IRQ_CODEC_MICD 42
|
||||
|
||||
/*
|
||||
* WM8350 Platform data.
|
||||
*
|
||||
* This must be initialised per platform for best audio performance.
|
||||
* Please see WM8350 datasheet for information.
|
||||
*/
|
||||
struct wm8350_audio_platform_data {
|
||||
int vmid_discharge_msecs; /* VMID --> OFF discharge time */
|
||||
int drain_msecs; /* OFF drain time */
|
||||
int cap_discharge_msecs; /* Cap ON (from OFF) discharge time */
|
||||
int vmid_charge_msecs; /* vmid power up time */
|
||||
u32 vmid_s_curve:2; /* vmid enable s curve speed */
|
||||
u32 dis_out4:2; /* out4 discharge speed */
|
||||
u32 dis_out3:2; /* out3 discharge speed */
|
||||
u32 dis_out2:2; /* out2 discharge speed */
|
||||
u32 dis_out1:2; /* out1 discharge speed */
|
||||
u32 vroi_out4:1; /* out4 tie off */
|
||||
u32 vroi_out3:1; /* out3 tie off */
|
||||
u32 vroi_out2:1; /* out2 tie off */
|
||||
u32 vroi_out1:1; /* out1 tie off */
|
||||
u32 vroi_enable:1; /* enable tie off */
|
||||
u32 codec_current_on:2; /* current level ON */
|
||||
u32 codec_current_standby:2; /* current level STANDBY */
|
||||
u32 codec_current_charge:2; /* codec current @ vmid charge */
|
||||
};
|
||||
|
||||
struct snd_soc_codec;
|
||||
|
||||
struct wm8350_codec {
|
||||
struct platform_device *pdev;
|
||||
struct snd_soc_codec *codec;
|
||||
struct wm8350_audio_platform_data *platform_data;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -135,6 +135,10 @@
|
||||
#define LPA_1000FULL 0x0800 /* Link partner 1000BASE-T full duplex */
|
||||
#define LPA_1000HALF 0x0400 /* Link partner 1000BASE-T half duplex */
|
||||
|
||||
/* Flow control flags */
|
||||
#define FLOW_CTRL_TX 0x01
|
||||
#define FLOW_CTRL_RX 0x02
|
||||
|
||||
/* This structure is used in all SIOCxMIIxxx ioctl calls */
|
||||
struct mii_ioctl_data {
|
||||
__u16 phy_id;
|
||||
@@ -235,5 +239,34 @@ static inline unsigned int mii_duplex (unsigned int duplex_lock,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* mii_resolve_flowctrl_fdx
|
||||
* @lcladv: value of MII ADVERTISE register
|
||||
* @rmtadv: value of MII LPA register
|
||||
*
|
||||
* Resolve full duplex flow control as per IEEE 802.3-2005 table 28B-3
|
||||
*/
|
||||
static inline u8 mii_resolve_flowctrl_fdx(u16 lcladv, u16 rmtadv)
|
||||
{
|
||||
u8 cap = 0;
|
||||
|
||||
if (lcladv & ADVERTISE_PAUSE_CAP) {
|
||||
if (lcladv & ADVERTISE_PAUSE_ASYM) {
|
||||
if (rmtadv & LPA_PAUSE_CAP)
|
||||
cap = FLOW_CTRL_TX | FLOW_CTRL_RX;
|
||||
else if (rmtadv & LPA_PAUSE_ASYM)
|
||||
cap = FLOW_CTRL_RX;
|
||||
} else {
|
||||
if (rmtadv & LPA_PAUSE_CAP)
|
||||
cap = FLOW_CTRL_TX | FLOW_CTRL_RX;
|
||||
}
|
||||
} else if (lcladv & ADVERTISE_PAUSE_ASYM) {
|
||||
if ((rmtadv & LPA_PAUSE_CAP) && (rmtadv & LPA_PAUSE_ASYM))
|
||||
cap = FLOW_CTRL_TX;
|
||||
}
|
||||
|
||||
return cap;
|
||||
}
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* __LINUX_MII_H__ */
|
||||
|
@@ -206,6 +206,7 @@ struct mlx4_caps {
|
||||
int reserved_cqs;
|
||||
int num_eqs;
|
||||
int reserved_eqs;
|
||||
int num_comp_vectors;
|
||||
int num_mpts;
|
||||
int num_mtt_segs;
|
||||
int fmr_reserved_mtts;
|
||||
@@ -328,6 +329,7 @@ struct mlx4_cq {
|
||||
int arm_sn;
|
||||
|
||||
int cqn;
|
||||
unsigned vector;
|
||||
|
||||
atomic_t refcount;
|
||||
struct completion free;
|
||||
@@ -437,7 +439,7 @@ void mlx4_free_hwq_res(struct mlx4_dev *mdev, struct mlx4_hwq_resources *wqres,
|
||||
|
||||
int mlx4_cq_alloc(struct mlx4_dev *dev, int nent, struct mlx4_mtt *mtt,
|
||||
struct mlx4_uar *uar, u64 db_rec, struct mlx4_cq *cq,
|
||||
int collapsed);
|
||||
unsigned vector, int collapsed);
|
||||
void mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq *cq);
|
||||
|
||||
int mlx4_qp_reserve_range(struct mlx4_dev *dev, int cnt, int align, int *base);
|
||||
|
@@ -145,6 +145,23 @@ extern pgprot_t protection_map[16];
|
||||
#define FAULT_FLAG_WRITE 0x01 /* Fault was a write access */
|
||||
#define FAULT_FLAG_NONLINEAR 0x02 /* Fault was via a nonlinear mapping */
|
||||
|
||||
/*
|
||||
* This interface is used by x86 PAT code to identify a pfn mapping that is
|
||||
* linear over entire vma. This is to optimize PAT code that deals with
|
||||
* marking the physical region with a particular prot. This is not for generic
|
||||
* mm use. Note also that this check will not work if the pfn mapping is
|
||||
* linear for a vma starting at physical address 0. In which case PAT code
|
||||
* falls back to slow path of reserving physical range page by page.
|
||||
*/
|
||||
static inline int is_linear_pfn_mapping(struct vm_area_struct *vma)
|
||||
{
|
||||
return ((vma->vm_flags & VM_PFNMAP) && vma->vm_pgoff);
|
||||
}
|
||||
|
||||
static inline int is_pfn_mapping(struct vm_area_struct *vma)
|
||||
{
|
||||
return (vma->vm_flags & VM_PFNMAP);
|
||||
}
|
||||
|
||||
/*
|
||||
* vm_fault is filled by the the pagefault handler and passed to the vma's
|
||||
@@ -781,6 +798,8 @@ int copy_page_range(struct mm_struct *dst, struct mm_struct *src,
|
||||
struct vm_area_struct *vma);
|
||||
void unmap_mapping_range(struct address_space *mapping,
|
||||
loff_t const holebegin, loff_t const holelen, int even_cows);
|
||||
int follow_phys(struct vm_area_struct *vma, unsigned long address,
|
||||
unsigned int flags, unsigned long *prot, resource_size_t *phys);
|
||||
int generic_access_phys(struct vm_area_struct *vma, unsigned long addr,
|
||||
void *buf, int len, int write);
|
||||
|
||||
@@ -1286,5 +1305,7 @@ int vmemmap_populate_basepages(struct page *start_page,
|
||||
int vmemmap_populate(struct page *start_page, unsigned long pages, int node);
|
||||
void vmemmap_populate_print_last(void);
|
||||
|
||||
extern void *alloc_locked_buffer(size_t size);
|
||||
extern void free_locked_buffer(void *buffer, size_t size);
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _LINUX_MM_H */
|
||||
|
@@ -232,8 +232,9 @@ struct mm_struct {
|
||||
struct core_state *core_state; /* coredumping support */
|
||||
|
||||
/* aio bits */
|
||||
rwlock_t ioctx_list_lock; /* aio lock */
|
||||
struct kioctx *ioctx_list;
|
||||
spinlock_t ioctx_lock;
|
||||
struct hlist_head ioctx_list;
|
||||
|
||||
#ifdef CONFIG_MM_OWNER
|
||||
/*
|
||||
* "owner" points to a task that is regarded as the canonical
|
||||
|
@@ -117,6 +117,7 @@ struct sioc_mif_req6
|
||||
|
||||
#include <linux/pim.h>
|
||||
#include <linux/skbuff.h> /* for struct sk_buff_head */
|
||||
#include <net/net_namespace.h>
|
||||
|
||||
#ifdef CONFIG_IPV6_MROUTE
|
||||
static inline int ip6_mroute_opt(int opt)
|
||||
@@ -187,6 +188,9 @@ struct mif_device
|
||||
struct mfc6_cache
|
||||
{
|
||||
struct mfc6_cache *next; /* Next entry on cache line */
|
||||
#ifdef CONFIG_NET_NS
|
||||
struct net *mfc6_net;
|
||||
#endif
|
||||
struct in6_addr mf6c_mcastgrp; /* Group the entry belongs to */
|
||||
struct in6_addr mf6c_origin; /* Source of packet */
|
||||
mifi_t mf6c_parent; /* Source interface */
|
||||
@@ -209,6 +213,18 @@ struct mfc6_cache
|
||||
} mfc_un;
|
||||
};
|
||||
|
||||
static inline
|
||||
struct net *mfc6_net(const struct mfc6_cache *mfc)
|
||||
{
|
||||
return read_pnet(&mfc->mfc6_net);
|
||||
}
|
||||
|
||||
static inline
|
||||
void mfc6_net_set(struct mfc6_cache *mfc, struct net *net)
|
||||
{
|
||||
write_pnet(&mfc->mfc6_net, hold_net(net));
|
||||
}
|
||||
|
||||
#define MFC_STATIC 1
|
||||
#define MFC_NOTIFY 2
|
||||
|
||||
@@ -229,13 +245,17 @@ struct mfc6_cache
|
||||
|
||||
#ifdef __KERNEL__
|
||||
struct rtmsg;
|
||||
extern int ip6mr_get_route(struct sk_buff *skb, struct rtmsg *rtm, int nowait);
|
||||
extern int ip6mr_get_route(struct net *net, struct sk_buff *skb,
|
||||
struct rtmsg *rtm, int nowait);
|
||||
|
||||
#ifdef CONFIG_IPV6_MROUTE
|
||||
extern struct sock *mroute6_socket;
|
||||
static inline struct sock *mroute6_socket(struct net *net)
|
||||
{
|
||||
return net->ipv6.mroute6_sk;
|
||||
}
|
||||
extern int ip6mr_sk_done(struct sock *sk);
|
||||
#else
|
||||
#define mroute6_socket NULL
|
||||
static inline struct sock *mroute6_socket(struct net *net) { return NULL; }
|
||||
static inline int ip6mr_sk_done(struct sock *sk) { return 0; }
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -10,8 +10,11 @@ struct msi_msg {
|
||||
};
|
||||
|
||||
/* Helper functions */
|
||||
struct irq_desc;
|
||||
extern void mask_msi_irq(unsigned int irq);
|
||||
extern void unmask_msi_irq(unsigned int irq);
|
||||
extern void read_msi_msg_desc(struct irq_desc *desc, struct msi_msg *msg);
|
||||
extern void write_msi_msg_desc(struct irq_desc *desc, struct msi_msg *msg);
|
||||
extern void read_msi_msg(unsigned int irq, struct msi_msg *msg);
|
||||
extern void write_msi_msg(unsigned int irq, struct msi_msg *msg);
|
||||
|
||||
|
@@ -144,6 +144,8 @@ extern int __must_check mutex_lock_killable(struct mutex *lock);
|
||||
/*
|
||||
* NOTE: mutex_trylock() follows the spin_trylock() convention,
|
||||
* not the down_trylock() convention!
|
||||
*
|
||||
* Returns 1 if the mutex has been acquired successfully, and 0 on contention.
|
||||
*/
|
||||
extern int mutex_trylock(struct mutex *lock);
|
||||
extern void mutex_unlock(struct mutex *lock);
|
||||
|
@@ -94,4 +94,9 @@ static inline char *nd_get_link(struct nameidata *nd)
|
||||
return nd->saved_names[nd->depth];
|
||||
}
|
||||
|
||||
static inline void nd_terminate_link(void *name, size_t len, size_t maxlen)
|
||||
{
|
||||
((char *) name)[min(len, maxlen)] = '\0';
|
||||
}
|
||||
|
||||
#endif /* _LINUX_NAMEI_H */
|
||||
|
@@ -43,6 +43,9 @@
|
||||
|
||||
#include <net/net_namespace.h>
|
||||
#include <net/dsa.h>
|
||||
#ifdef CONFIG_DCB
|
||||
#include <net/dcbnl.h>
|
||||
#endif
|
||||
|
||||
struct vlan_group;
|
||||
struct ethtool_ops;
|
||||
@@ -311,14 +314,16 @@ struct napi_struct {
|
||||
spinlock_t poll_lock;
|
||||
int poll_owner;
|
||||
struct net_device *dev;
|
||||
struct list_head dev_list;
|
||||
#endif
|
||||
struct list_head dev_list;
|
||||
struct sk_buff *gro_list;
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
NAPI_STATE_SCHED, /* Poll is scheduled */
|
||||
NAPI_STATE_DISABLE, /* Disable pending */
|
||||
NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */
|
||||
};
|
||||
|
||||
extern void __napi_schedule(struct napi_struct *n);
|
||||
@@ -372,22 +377,8 @@ static inline int napi_reschedule(struct napi_struct *napi)
|
||||
*
|
||||
* Mark NAPI processing as complete.
|
||||
*/
|
||||
static inline void __napi_complete(struct napi_struct *n)
|
||||
{
|
||||
BUG_ON(!test_bit(NAPI_STATE_SCHED, &n->state));
|
||||
list_del(&n->poll_list);
|
||||
smp_mb__before_clear_bit();
|
||||
clear_bit(NAPI_STATE_SCHED, &n->state);
|
||||
}
|
||||
|
||||
static inline void napi_complete(struct napi_struct *n)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
local_irq_save(flags);
|
||||
__napi_complete(n);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
extern void __napi_complete(struct napi_struct *n);
|
||||
extern void napi_complete(struct napi_struct *n);
|
||||
|
||||
/**
|
||||
* napi_disable - prevent NAPI from scheduling
|
||||
@@ -451,6 +442,147 @@ struct netdev_queue {
|
||||
struct Qdisc *qdisc_sleeping;
|
||||
} ____cacheline_aligned_in_smp;
|
||||
|
||||
|
||||
/*
|
||||
* This structure defines the management hooks for network devices.
|
||||
* The following hooks can be defined; unless noted otherwise, they are
|
||||
* optional and can be filled with a null pointer.
|
||||
*
|
||||
* int (*ndo_init)(struct net_device *dev);
|
||||
* This function is called once when network device is registered.
|
||||
* The network device can use this to any late stage initializaton
|
||||
* or semantic validattion. It can fail with an error code which will
|
||||
* be propogated back to register_netdev
|
||||
*
|
||||
* void (*ndo_uninit)(struct net_device *dev);
|
||||
* This function is called when device is unregistered or when registration
|
||||
* fails. It is not called if init fails.
|
||||
*
|
||||
* int (*ndo_open)(struct net_device *dev);
|
||||
* This function is called when network device transistions to the up
|
||||
* state.
|
||||
*
|
||||
* int (*ndo_stop)(struct net_device *dev);
|
||||
* This function is called when network device transistions to the down
|
||||
* state.
|
||||
*
|
||||
* int (*ndo_hard_start_xmit)(struct sk_buff *skb, struct net_device *dev);
|
||||
* Called when a packet needs to be transmitted.
|
||||
* Must return NETDEV_TX_OK , NETDEV_TX_BUSY, or NETDEV_TX_LOCKED,
|
||||
* Required can not be NULL.
|
||||
*
|
||||
* u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb);
|
||||
* Called to decide which queue to when device supports multiple
|
||||
* transmit queues.
|
||||
*
|
||||
* void (*ndo_change_rx_flags)(struct net_device *dev, int flags);
|
||||
* This function is called to allow device receiver to make
|
||||
* changes to configuration when multicast or promiscious is enabled.
|
||||
*
|
||||
* void (*ndo_set_rx_mode)(struct net_device *dev);
|
||||
* This function is called device changes address list filtering.
|
||||
*
|
||||
* void (*ndo_set_multicast_list)(struct net_device *dev);
|
||||
* This function is called when the multicast address list changes.
|
||||
*
|
||||
* int (*ndo_set_mac_address)(struct net_device *dev, void *addr);
|
||||
* This function is called when the Media Access Control address
|
||||
* needs to be changed. If not this interface is not defined, the
|
||||
* mac address can not be changed.
|
||||
*
|
||||
* int (*ndo_validate_addr)(struct net_device *dev);
|
||||
* Test if Media Access Control address is valid for the device.
|
||||
*
|
||||
* int (*ndo_do_ioctl)(struct net_device *dev, struct ifreq *ifr, int cmd);
|
||||
* Called when a user request an ioctl which can't be handled by
|
||||
* the generic interface code. If not defined ioctl's return
|
||||
* not supported error code.
|
||||
*
|
||||
* int (*ndo_set_config)(struct net_device *dev, struct ifmap *map);
|
||||
* Used to set network devices bus interface parameters. This interface
|
||||
* is retained for legacy reason, new devices should use the bus
|
||||
* interface (PCI) for low level management.
|
||||
*
|
||||
* int (*ndo_change_mtu)(struct net_device *dev, int new_mtu);
|
||||
* Called when a user wants to change the Maximum Transfer Unit
|
||||
* of a device. If not defined, any request to change MTU will
|
||||
* will return an error.
|
||||
*
|
||||
* void (*ndo_tx_timeout)(struct net_device *dev);
|
||||
* Callback uses when the transmitter has not made any progress
|
||||
* for dev->watchdog ticks.
|
||||
*
|
||||
* struct net_device_stats* (*get_stats)(struct net_device *dev);
|
||||
* Called when a user wants to get the network device usage
|
||||
* statistics. If not defined, the counters in dev->stats will
|
||||
* be used.
|
||||
*
|
||||
* void (*ndo_vlan_rx_register)(struct net_device *dev, struct vlan_group *grp);
|
||||
* If device support VLAN receive accleration
|
||||
* (ie. dev->features & NETIF_F_HW_VLAN_RX), then this function is called
|
||||
* when vlan groups for the device changes. Note: grp is NULL
|
||||
* if no vlan's groups are being used.
|
||||
*
|
||||
* void (*ndo_vlan_rx_add_vid)(struct net_device *dev, unsigned short vid);
|
||||
* If device support VLAN filtering (dev->features & NETIF_F_HW_VLAN_FILTER)
|
||||
* this function is called when a VLAN id is registered.
|
||||
*
|
||||
* void (*ndo_vlan_rx_kill_vid)(struct net_device *dev, unsigned short vid);
|
||||
* If device support VLAN filtering (dev->features & NETIF_F_HW_VLAN_FILTER)
|
||||
* this function is called when a VLAN id is unregistered.
|
||||
*
|
||||
* void (*ndo_poll_controller)(struct net_device *dev);
|
||||
*/
|
||||
#define HAVE_NET_DEVICE_OPS
|
||||
struct net_device_ops {
|
||||
int (*ndo_init)(struct net_device *dev);
|
||||
void (*ndo_uninit)(struct net_device *dev);
|
||||
int (*ndo_open)(struct net_device *dev);
|
||||
int (*ndo_stop)(struct net_device *dev);
|
||||
int (*ndo_start_xmit) (struct sk_buff *skb,
|
||||
struct net_device *dev);
|
||||
u16 (*ndo_select_queue)(struct net_device *dev,
|
||||
struct sk_buff *skb);
|
||||
#define HAVE_CHANGE_RX_FLAGS
|
||||
void (*ndo_change_rx_flags)(struct net_device *dev,
|
||||
int flags);
|
||||
#define HAVE_SET_RX_MODE
|
||||
void (*ndo_set_rx_mode)(struct net_device *dev);
|
||||
#define HAVE_MULTICAST
|
||||
void (*ndo_set_multicast_list)(struct net_device *dev);
|
||||
#define HAVE_SET_MAC_ADDR
|
||||
int (*ndo_set_mac_address)(struct net_device *dev,
|
||||
void *addr);
|
||||
#define HAVE_VALIDATE_ADDR
|
||||
int (*ndo_validate_addr)(struct net_device *dev);
|
||||
#define HAVE_PRIVATE_IOCTL
|
||||
int (*ndo_do_ioctl)(struct net_device *dev,
|
||||
struct ifreq *ifr, int cmd);
|
||||
#define HAVE_SET_CONFIG
|
||||
int (*ndo_set_config)(struct net_device *dev,
|
||||
struct ifmap *map);
|
||||
#define HAVE_CHANGE_MTU
|
||||
int (*ndo_change_mtu)(struct net_device *dev,
|
||||
int new_mtu);
|
||||
int (*ndo_neigh_setup)(struct net_device *dev,
|
||||
struct neigh_parms *);
|
||||
#define HAVE_TX_TIMEOUT
|
||||
void (*ndo_tx_timeout) (struct net_device *dev);
|
||||
|
||||
struct net_device_stats* (*ndo_get_stats)(struct net_device *dev);
|
||||
|
||||
void (*ndo_vlan_rx_register)(struct net_device *dev,
|
||||
struct vlan_group *grp);
|
||||
void (*ndo_vlan_rx_add_vid)(struct net_device *dev,
|
||||
unsigned short vid);
|
||||
void (*ndo_vlan_rx_kill_vid)(struct net_device *dev,
|
||||
unsigned short vid);
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
#define HAVE_NETDEV_POLL
|
||||
void (*ndo_poll_controller)(struct net_device *dev);
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
* The DEVICE structure.
|
||||
* Actually, this whole structure is a big mistake. It mixes I/O
|
||||
@@ -495,14 +627,7 @@ struct net_device
|
||||
unsigned long state;
|
||||
|
||||
struct list_head dev_list;
|
||||
#ifdef CONFIG_NETPOLL
|
||||
struct list_head napi_list;
|
||||
#endif
|
||||
|
||||
/* The device initialization function. Called only once. */
|
||||
int (*init)(struct net_device *dev);
|
||||
|
||||
/* ------- Fields preinitialized in Space.c finish here ------- */
|
||||
|
||||
/* Net device features */
|
||||
unsigned long features;
|
||||
@@ -521,6 +646,7 @@ struct net_device
|
||||
#define NETIF_F_LLTX 4096 /* LockLess TX - deprecated. Please */
|
||||
/* do not use LLTX in new drivers */
|
||||
#define NETIF_F_NETNS_LOCAL 8192 /* Does not change network namespaces */
|
||||
#define NETIF_F_GRO 16384 /* Generic receive offload */
|
||||
#define NETIF_F_LRO 32768 /* large receive offload */
|
||||
|
||||
/* Segmentation offload features */
|
||||
@@ -546,15 +672,13 @@ struct net_device
|
||||
* for all in netdev_increment_features.
|
||||
*/
|
||||
#define NETIF_F_ONE_FOR_ALL (NETIF_F_GSO_SOFTWARE | NETIF_F_GSO_ROBUST | \
|
||||
NETIF_F_SG | NETIF_F_HIGHDMA | \
|
||||
NETIF_F_SG | NETIF_F_HIGHDMA | \
|
||||
NETIF_F_FRAGLIST)
|
||||
|
||||
/* Interface index. Unique device identifier */
|
||||
int ifindex;
|
||||
int iflink;
|
||||
|
||||
|
||||
struct net_device_stats* (*get_stats)(struct net_device *dev);
|
||||
struct net_device_stats stats;
|
||||
|
||||
#ifdef CONFIG_WIRELESS_EXT
|
||||
@@ -564,18 +688,13 @@ struct net_device
|
||||
/* Instance data managed by the core of Wireless Extensions. */
|
||||
struct iw_public_data * wireless_data;
|
||||
#endif
|
||||
/* Management operations */
|
||||
const struct net_device_ops *netdev_ops;
|
||||
const struct ethtool_ops *ethtool_ops;
|
||||
|
||||
/* Hardware header description */
|
||||
const struct header_ops *header_ops;
|
||||
|
||||
/*
|
||||
* This marks the end of the "visible" part of the structure. All
|
||||
* fields hereafter are internal to the system, and may change at
|
||||
* will (read: may be cleaned up at will).
|
||||
*/
|
||||
|
||||
|
||||
unsigned int flags; /* interface flags (a la BSD) */
|
||||
unsigned short gflags;
|
||||
unsigned short priv_flags; /* Like 'flags' but invisible to userspace. */
|
||||
@@ -634,7 +753,7 @@ struct net_device
|
||||
unsigned long last_rx; /* Time of last Rx */
|
||||
/* Interface address info used in eth_type_trans() */
|
||||
unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address, (before bcast
|
||||
because most packets are unicast) */
|
||||
because most packets are unicast) */
|
||||
|
||||
unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */
|
||||
|
||||
@@ -653,18 +772,12 @@ struct net_device
|
||||
/*
|
||||
* One part is mostly used on xmit path (device)
|
||||
*/
|
||||
void *priv; /* pointer to private data */
|
||||
int (*hard_start_xmit) (struct sk_buff *skb,
|
||||
struct net_device *dev);
|
||||
/* These may be needed for future network-power-down code. */
|
||||
unsigned long trans_start; /* Time (in jiffies) of last Tx */
|
||||
|
||||
int watchdog_timeo; /* used by dev_watchdog() */
|
||||
struct timer_list watchdog_timer;
|
||||
|
||||
/*
|
||||
* refcnt is a very hot point, so align it on SMP
|
||||
*/
|
||||
/* Number of references to this device */
|
||||
atomic_t refcnt ____cacheline_aligned_in_smp;
|
||||
|
||||
@@ -683,56 +796,12 @@ struct net_device
|
||||
NETREG_RELEASED, /* called free_netdev */
|
||||
} reg_state;
|
||||
|
||||
/* Called after device is detached from network. */
|
||||
void (*uninit)(struct net_device *dev);
|
||||
/* Called after last user reference disappears. */
|
||||
void (*destructor)(struct net_device *dev);
|
||||
/* Called from unregister, can be used to call free_netdev */
|
||||
void (*destructor)(struct net_device *dev);
|
||||
|
||||
/* Pointers to interface service routines. */
|
||||
int (*open)(struct net_device *dev);
|
||||
int (*stop)(struct net_device *dev);
|
||||
#define HAVE_NETDEV_POLL
|
||||
#define HAVE_CHANGE_RX_FLAGS
|
||||
void (*change_rx_flags)(struct net_device *dev,
|
||||
int flags);
|
||||
#define HAVE_SET_RX_MODE
|
||||
void (*set_rx_mode)(struct net_device *dev);
|
||||
#define HAVE_MULTICAST
|
||||
void (*set_multicast_list)(struct net_device *dev);
|
||||
#define HAVE_SET_MAC_ADDR
|
||||
int (*set_mac_address)(struct net_device *dev,
|
||||
void *addr);
|
||||
#define HAVE_VALIDATE_ADDR
|
||||
int (*validate_addr)(struct net_device *dev);
|
||||
#define HAVE_PRIVATE_IOCTL
|
||||
int (*do_ioctl)(struct net_device *dev,
|
||||
struct ifreq *ifr, int cmd);
|
||||
#define HAVE_SET_CONFIG
|
||||
int (*set_config)(struct net_device *dev,
|
||||
struct ifmap *map);
|
||||
#define HAVE_CHANGE_MTU
|
||||
int (*change_mtu)(struct net_device *dev, int new_mtu);
|
||||
|
||||
#define HAVE_TX_TIMEOUT
|
||||
void (*tx_timeout) (struct net_device *dev);
|
||||
|
||||
void (*vlan_rx_register)(struct net_device *dev,
|
||||
struct vlan_group *grp);
|
||||
void (*vlan_rx_add_vid)(struct net_device *dev,
|
||||
unsigned short vid);
|
||||
void (*vlan_rx_kill_vid)(struct net_device *dev,
|
||||
unsigned short vid);
|
||||
|
||||
int (*neigh_setup)(struct net_device *dev, struct neigh_parms *);
|
||||
#ifdef CONFIG_NETPOLL
|
||||
struct netpoll_info *npinfo;
|
||||
#endif
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
void (*poll_controller)(struct net_device *dev);
|
||||
#endif
|
||||
|
||||
u16 (*select_queue)(struct net_device *dev,
|
||||
struct sk_buff *skb);
|
||||
|
||||
#ifdef CONFIG_NET_NS
|
||||
/* Network namespace this network device is inside */
|
||||
@@ -763,6 +832,49 @@ struct net_device
|
||||
/* for setting kernel sock attribute on TCP connection setup */
|
||||
#define GSO_MAX_SIZE 65536
|
||||
unsigned int gso_max_size;
|
||||
|
||||
#ifdef CONFIG_DCB
|
||||
/* Data Center Bridging netlink ops */
|
||||
struct dcbnl_rtnl_ops *dcbnl_ops;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_COMPAT_NET_DEV_OPS
|
||||
struct {
|
||||
int (*init)(struct net_device *dev);
|
||||
void (*uninit)(struct net_device *dev);
|
||||
int (*open)(struct net_device *dev);
|
||||
int (*stop)(struct net_device *dev);
|
||||
int (*hard_start_xmit) (struct sk_buff *skb,
|
||||
struct net_device *dev);
|
||||
u16 (*select_queue)(struct net_device *dev,
|
||||
struct sk_buff *skb);
|
||||
void (*change_rx_flags)(struct net_device *dev,
|
||||
int flags);
|
||||
void (*set_rx_mode)(struct net_device *dev);
|
||||
void (*set_multicast_list)(struct net_device *dev);
|
||||
int (*set_mac_address)(struct net_device *dev,
|
||||
void *addr);
|
||||
int (*validate_addr)(struct net_device *dev);
|
||||
int (*do_ioctl)(struct net_device *dev,
|
||||
struct ifreq *ifr, int cmd);
|
||||
int (*set_config)(struct net_device *dev,
|
||||
struct ifmap *map);
|
||||
int (*change_mtu)(struct net_device *dev, int new_mtu);
|
||||
int (*neigh_setup)(struct net_device *dev,
|
||||
struct neigh_parms *);
|
||||
void (*tx_timeout) (struct net_device *dev);
|
||||
struct net_device_stats* (*get_stats)(struct net_device *dev);
|
||||
void (*vlan_rx_register)(struct net_device *dev,
|
||||
struct vlan_group *grp);
|
||||
void (*vlan_rx_add_vid)(struct net_device *dev,
|
||||
unsigned short vid);
|
||||
void (*vlan_rx_kill_vid)(struct net_device *dev,
|
||||
unsigned short vid);
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
void (*poll_controller)(struct net_device *dev);
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
};
|
||||
#define to_net_dev(d) container_of(d, struct net_device, dev)
|
||||
|
||||
@@ -858,22 +970,8 @@ static inline void *netdev_priv(const struct net_device *dev)
|
||||
* netif_napi_add() must be used to initialize a napi context prior to calling
|
||||
* *any* of the other napi related functions.
|
||||
*/
|
||||
static inline void netif_napi_add(struct net_device *dev,
|
||||
struct napi_struct *napi,
|
||||
int (*poll)(struct napi_struct *, int),
|
||||
int weight)
|
||||
{
|
||||
INIT_LIST_HEAD(&napi->poll_list);
|
||||
napi->poll = poll;
|
||||
napi->weight = weight;
|
||||
#ifdef CONFIG_NETPOLL
|
||||
napi->dev = dev;
|
||||
list_add(&napi->dev_list, &dev->napi_list);
|
||||
spin_lock_init(&napi->poll_lock);
|
||||
napi->poll_owner = -1;
|
||||
#endif
|
||||
set_bit(NAPI_STATE_SCHED, &napi->state);
|
||||
}
|
||||
void netif_napi_add(struct net_device *dev, struct napi_struct *napi,
|
||||
int (*poll)(struct napi_struct *, int), int weight);
|
||||
|
||||
/**
|
||||
* netif_napi_del - remove a napi context
|
||||
@@ -881,12 +979,20 @@ static inline void netif_napi_add(struct net_device *dev,
|
||||
*
|
||||
* netif_napi_del() removes a napi context from the network device napi list
|
||||
*/
|
||||
static inline void netif_napi_del(struct napi_struct *napi)
|
||||
{
|
||||
#ifdef CONFIG_NETPOLL
|
||||
list_del(&napi->dev_list);
|
||||
#endif
|
||||
}
|
||||
void netif_napi_del(struct napi_struct *napi);
|
||||
|
||||
struct napi_gro_cb {
|
||||
/* This is non-zero if the packet may be of the same flow. */
|
||||
int same_flow;
|
||||
|
||||
/* This is non-zero if the packet cannot be merged with the new skb. */
|
||||
int flush;
|
||||
|
||||
/* Number of segments aggregated. */
|
||||
int count;
|
||||
};
|
||||
|
||||
#define NAPI_GRO_CB(skb) ((struct napi_gro_cb *)(skb)->cb)
|
||||
|
||||
struct packet_type {
|
||||
__be16 type; /* This is really htons(ether_type). */
|
||||
@@ -898,6 +1004,9 @@ struct packet_type {
|
||||
struct sk_buff *(*gso_segment)(struct sk_buff *skb,
|
||||
int features);
|
||||
int (*gso_send_check)(struct sk_buff *skb);
|
||||
struct sk_buff **(*gro_receive)(struct sk_buff **head,
|
||||
struct sk_buff *skb);
|
||||
int (*gro_complete)(struct sk_buff *skb);
|
||||
void *af_packet_priv;
|
||||
struct list_head list;
|
||||
};
|
||||
@@ -1251,6 +1360,9 @@ extern int netif_rx(struct sk_buff *skb);
|
||||
extern int netif_rx_ni(struct sk_buff *skb);
|
||||
#define HAVE_NETIF_RECEIVE_SKB 1
|
||||
extern int netif_receive_skb(struct sk_buff *skb);
|
||||
extern void napi_gro_flush(struct napi_struct *napi);
|
||||
extern int napi_gro_receive(struct napi_struct *napi,
|
||||
struct sk_buff *skb);
|
||||
extern void netif_nit_deliver(struct sk_buff *skb);
|
||||
extern int dev_valid_name(const char *name);
|
||||
extern int dev_ioctl(struct net *net, unsigned int cmd, void __user *);
|
||||
@@ -1443,8 +1555,7 @@ static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits)
|
||||
}
|
||||
|
||||
/* Test if receive needs to be scheduled but only if up */
|
||||
static inline int netif_rx_schedule_prep(struct net_device *dev,
|
||||
struct napi_struct *napi)
|
||||
static inline int netif_rx_schedule_prep(struct napi_struct *napi)
|
||||
{
|
||||
return napi_schedule_prep(napi);
|
||||
}
|
||||
@@ -1452,27 +1563,24 @@ static inline int netif_rx_schedule_prep(struct net_device *dev,
|
||||
/* Add interface to tail of rx poll list. This assumes that _prep has
|
||||
* already been called and returned 1.
|
||||
*/
|
||||
static inline void __netif_rx_schedule(struct net_device *dev,
|
||||
struct napi_struct *napi)
|
||||
static inline void __netif_rx_schedule(struct napi_struct *napi)
|
||||
{
|
||||
__napi_schedule(napi);
|
||||
}
|
||||
|
||||
/* Try to reschedule poll. Called by irq handler. */
|
||||
|
||||
static inline void netif_rx_schedule(struct net_device *dev,
|
||||
struct napi_struct *napi)
|
||||
static inline void netif_rx_schedule(struct napi_struct *napi)
|
||||
{
|
||||
if (netif_rx_schedule_prep(dev, napi))
|
||||
__netif_rx_schedule(dev, napi);
|
||||
if (netif_rx_schedule_prep(napi))
|
||||
__netif_rx_schedule(napi);
|
||||
}
|
||||
|
||||
/* Try to reschedule poll. Called by dev->poll() after netif_rx_complete(). */
|
||||
static inline int netif_rx_reschedule(struct net_device *dev,
|
||||
struct napi_struct *napi)
|
||||
static inline int netif_rx_reschedule(struct napi_struct *napi)
|
||||
{
|
||||
if (napi_schedule_prep(napi)) {
|
||||
__netif_rx_schedule(dev, napi);
|
||||
__netif_rx_schedule(napi);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@@ -1481,8 +1589,7 @@ static inline int netif_rx_reschedule(struct net_device *dev,
|
||||
/* same as netif_rx_complete, except that local_irq_save(flags)
|
||||
* has already been issued
|
||||
*/
|
||||
static inline void __netif_rx_complete(struct net_device *dev,
|
||||
struct napi_struct *napi)
|
||||
static inline void __netif_rx_complete(struct napi_struct *napi)
|
||||
{
|
||||
__napi_complete(napi);
|
||||
}
|
||||
@@ -1492,14 +1599,9 @@ static inline void __netif_rx_complete(struct net_device *dev,
|
||||
* it completes the work. The device cannot be out of poll list at this
|
||||
* moment, it is BUG().
|
||||
*/
|
||||
static inline void netif_rx_complete(struct net_device *dev,
|
||||
struct napi_struct *napi)
|
||||
static inline void netif_rx_complete(struct napi_struct *napi)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
local_irq_save(flags);
|
||||
__netif_rx_complete(dev, napi);
|
||||
local_irq_restore(flags);
|
||||
napi_complete(napi);
|
||||
}
|
||||
|
||||
static inline void __netif_tx_lock(struct netdev_queue *txq, int cpu)
|
||||
@@ -1676,6 +1778,8 @@ extern void netdev_features_change(struct net_device *dev);
|
||||
/* Load a device via the kmod */
|
||||
extern void dev_load(struct net *net, const char *name);
|
||||
extern void dev_mcast_init(void);
|
||||
extern const struct net_device_stats *dev_get_stats(struct net_device *dev);
|
||||
|
||||
extern int netdev_max_backlog;
|
||||
extern int weight_p;
|
||||
extern int netdev_set_master(struct net_device *dev, struct net_device *master);
|
||||
@@ -1724,6 +1828,8 @@ static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb)
|
||||
{
|
||||
return skb_is_gso(skb) &&
|
||||
(!skb_gso_ok(skb, dev->features) ||
|
||||
(skb_shinfo(skb)->frag_list &&
|
||||
!(dev->features & NETIF_F_FRAGLIST)) ||
|
||||
unlikely(skb->ip_summed != CHECKSUM_PARTIAL));
|
||||
}
|
||||
|
||||
@@ -1742,26 +1848,31 @@ static inline int skb_bond_should_drop(struct sk_buff *skb)
|
||||
struct net_device *dev = skb->dev;
|
||||
struct net_device *master = dev->master;
|
||||
|
||||
if (master &&
|
||||
(dev->priv_flags & IFF_SLAVE_INACTIVE)) {
|
||||
if ((dev->priv_flags & IFF_SLAVE_NEEDARP) &&
|
||||
skb->protocol == __constant_htons(ETH_P_ARP))
|
||||
return 0;
|
||||
if (master) {
|
||||
if (master->priv_flags & IFF_MASTER_ARPMON)
|
||||
dev->last_rx = jiffies;
|
||||
|
||||
if (master->priv_flags & IFF_MASTER_ALB) {
|
||||
if (skb->pkt_type != PACKET_BROADCAST &&
|
||||
skb->pkt_type != PACKET_MULTICAST)
|
||||
if (dev->priv_flags & IFF_SLAVE_INACTIVE) {
|
||||
if ((dev->priv_flags & IFF_SLAVE_NEEDARP) &&
|
||||
skb->protocol == __constant_htons(ETH_P_ARP))
|
||||
return 0;
|
||||
}
|
||||
if (master->priv_flags & IFF_MASTER_8023AD &&
|
||||
skb->protocol == __constant_htons(ETH_P_SLOW))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
if (master->priv_flags & IFF_MASTER_ALB) {
|
||||
if (skb->pkt_type != PACKET_BROADCAST &&
|
||||
skb->pkt_type != PACKET_MULTICAST)
|
||||
return 0;
|
||||
}
|
||||
if (master->priv_flags & IFF_MASTER_8023AD &&
|
||||
skb->protocol == __constant_htons(ETH_P_SLOW))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern struct pernet_operations __net_initdata loopback_net_ops;
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _LINUX_DEV_H */
|
||||
|
@@ -141,6 +141,7 @@ enum ctattr_protonat {
|
||||
#define CTA_PROTONAT_MAX (__CTA_PROTONAT_MAX - 1)
|
||||
|
||||
enum ctattr_natseq {
|
||||
CTA_NAT_SEQ_UNSPEC,
|
||||
CTA_NAT_SEQ_CORRECTION_POS,
|
||||
CTA_NAT_SEQ_OFFSET_BEFORE,
|
||||
CTA_NAT_SEQ_OFFSET_AFTER,
|
||||
|
@@ -300,7 +300,8 @@ struct ebt_table
|
||||
|
||||
#define EBT_ALIGN(s) (((s) + (__alignof__(struct ebt_replace)-1)) & \
|
||||
~(__alignof__(struct ebt_replace)-1))
|
||||
extern int ebt_register_table(struct ebt_table *table);
|
||||
extern struct ebt_table *ebt_register_table(struct net *net,
|
||||
struct ebt_table *table);
|
||||
extern void ebt_unregister_table(struct ebt_table *table);
|
||||
extern unsigned int ebt_do_table(unsigned int hook, struct sk_buff *skb,
|
||||
const struct net_device *in, const struct net_device *out,
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#ifndef _IPT_POLICY_H
|
||||
#define _IPT_POLICY_H
|
||||
|
||||
#include <linux/netfilter/xt_policy.h>
|
||||
|
||||
#define IPT_POLICY_MAX_ELEM XT_POLICY_MAX_ELEM
|
||||
|
||||
/* ipt_policy_flags */
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#ifndef _IP6T_POLICY_H
|
||||
#define _IP6T_POLICY_H
|
||||
|
||||
#include <linux/netfilter/xt_policy.h>
|
||||
|
||||
#define IP6T_POLICY_MAX_ELEM XT_POLICY_MAX_ELEM
|
||||
|
||||
/* ip6t_policy_flags */
|
||||
|
@@ -242,7 +242,8 @@ __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags)
|
||||
nlh->nlmsg_flags = flags;
|
||||
nlh->nlmsg_pid = pid;
|
||||
nlh->nlmsg_seq = seq;
|
||||
memset(NLMSG_DATA(nlh) + len, 0, NLMSG_ALIGN(size) - size);
|
||||
if (!__builtin_constant_p(size) || NLMSG_ALIGN(size) - size != 0)
|
||||
memset(NLMSG_DATA(nlh) + len, 0, NLMSG_ALIGN(size) - size);
|
||||
return nlh;
|
||||
}
|
||||
|
||||
|
@@ -94,11 +94,6 @@ static inline void netpoll_poll_unlock(void *have)
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
static inline void netpoll_netdev_init(struct net_device *dev)
|
||||
{
|
||||
INIT_LIST_HEAD(&dev->napi_list);
|
||||
}
|
||||
|
||||
#else
|
||||
static inline int netpoll_rx(struct sk_buff *skb)
|
||||
{
|
||||
|
@@ -83,7 +83,7 @@ struct nfs_open_context {
|
||||
struct rpc_cred *cred;
|
||||
struct nfs4_state *state;
|
||||
fl_owner_t lockowner;
|
||||
int mode;
|
||||
fmode_t mode;
|
||||
|
||||
unsigned long flags;
|
||||
#define NFS_CONTEXT_ERROR_WRITE (0)
|
||||
@@ -130,7 +130,10 @@ struct nfs_inode {
|
||||
*
|
||||
* We need to revalidate the cached attrs for this inode if
|
||||
*
|
||||
* jiffies - read_cache_jiffies > attrtimeo
|
||||
* jiffies - read_cache_jiffies >= attrtimeo
|
||||
*
|
||||
* Please note the comparison is greater than or equal
|
||||
* so that zero timeout values can be specified.
|
||||
*/
|
||||
unsigned long read_cache_jiffies;
|
||||
unsigned long attrtimeo;
|
||||
@@ -180,7 +183,7 @@ struct nfs_inode {
|
||||
/* NFSv4 state */
|
||||
struct list_head open_states;
|
||||
struct nfs_delegation *delegation;
|
||||
int delegation_state;
|
||||
fmode_t delegation_state;
|
||||
struct rw_semaphore rwsem;
|
||||
#endif /* CONFIG_NFS_V4*/
|
||||
struct inode vfs_inode;
|
||||
@@ -342,7 +345,7 @@ extern int nfs_setattr(struct dentry *, struct iattr *);
|
||||
extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr);
|
||||
extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx);
|
||||
extern void put_nfs_open_context(struct nfs_open_context *ctx);
|
||||
extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, int mode);
|
||||
extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, fmode_t mode);
|
||||
extern u64 nfs_compat_user_ino64(u64 fileid);
|
||||
extern void nfs_fattr_init(struct nfs_fattr *fattr);
|
||||
|
||||
@@ -532,12 +535,6 @@ static inline void nfs3_forget_cached_acls(struct inode *inode)
|
||||
}
|
||||
#endif /* CONFIG_NFS_V3_ACL */
|
||||
|
||||
/*
|
||||
* linux/fs/mount_clnt.c
|
||||
*/
|
||||
extern int nfs_mount(struct sockaddr *, size_t, char *, char *,
|
||||
int, int, struct nfs_fh *);
|
||||
|
||||
/*
|
||||
* inline functions
|
||||
*/
|
||||
|
@@ -42,12 +42,6 @@ struct nfs_client {
|
||||
struct rb_root cl_openowner_id;
|
||||
struct rb_root cl_lockowner_id;
|
||||
|
||||
/*
|
||||
* The following rwsem ensures exclusive access to the server
|
||||
* while we recover the state following a lease expiration.
|
||||
*/
|
||||
struct rw_semaphore cl_sem;
|
||||
|
||||
struct list_head cl_delegations;
|
||||
struct rb_root cl_state_owners;
|
||||
spinlock_t cl_lock;
|
||||
|
@@ -45,7 +45,7 @@ struct nfs_mount_data {
|
||||
char context[NFS_MAX_CONTEXT_LEN + 1]; /* 6 */
|
||||
};
|
||||
|
||||
/* bits in the flags field */
|
||||
/* bits in the flags field visible to user space */
|
||||
|
||||
#define NFS_MOUNT_SOFT 0x0001 /* 1 */
|
||||
#define NFS_MOUNT_INTR 0x0002 /* 1 */ /* now unused, but ABI */
|
||||
@@ -68,5 +68,6 @@ struct nfs_mount_data {
|
||||
/* The following are for internal use only */
|
||||
#define NFS_MOUNT_LOOKUP_CACHE_NONEG 0x10000
|
||||
#define NFS_MOUNT_LOOKUP_CACHE_NONE 0x20000
|
||||
#define NFS_MOUNT_NORESVPORT 0x40000
|
||||
|
||||
#endif
|
||||
|
@@ -120,13 +120,14 @@ struct nfs_openargs {
|
||||
const struct nfs_fh * fh;
|
||||
struct nfs_seqid * seqid;
|
||||
int open_flags;
|
||||
fmode_t fmode;
|
||||
__u64 clientid;
|
||||
__u64 id;
|
||||
union {
|
||||
struct iattr * attrs; /* UNCHECKED, GUARDED */
|
||||
nfs4_verifier verifier; /* EXCLUSIVE */
|
||||
nfs4_stateid delegation; /* CLAIM_DELEGATE_CUR */
|
||||
int delegation_type; /* CLAIM_PREVIOUS */
|
||||
fmode_t delegation_type; /* CLAIM_PREVIOUS */
|
||||
} u;
|
||||
const struct qstr * name;
|
||||
const struct nfs_server *server; /* Needed for ID mapping */
|
||||
@@ -143,7 +144,7 @@ struct nfs_openres {
|
||||
struct nfs_fattr * dir_attr;
|
||||
struct nfs_seqid * seqid;
|
||||
const struct nfs_server *server;
|
||||
int delegation_type;
|
||||
fmode_t delegation_type;
|
||||
nfs4_stateid delegation;
|
||||
__u32 do_recall;
|
||||
__u64 maxsize;
|
||||
@@ -171,7 +172,7 @@ struct nfs_closeargs {
|
||||
struct nfs_fh * fh;
|
||||
nfs4_stateid * stateid;
|
||||
struct nfs_seqid * seqid;
|
||||
int open_flags;
|
||||
fmode_t fmode;
|
||||
const u32 * bitmask;
|
||||
};
|
||||
|
||||
|
@@ -124,6 +124,8 @@ struct nfs4_client {
|
||||
nfs4_verifier cl_verifier; /* generated by client */
|
||||
time_t cl_time; /* time of last lease renewal */
|
||||
__be32 cl_addr; /* client ipaddress */
|
||||
u32 cl_flavor; /* setclientid pseudoflavor */
|
||||
char *cl_principal; /* setclientid principal name */
|
||||
struct svc_cred cl_cred; /* setclientid principal */
|
||||
clientid_t cl_clientid; /* generated by server */
|
||||
nfs4_verifier cl_confirm; /* generated by server */
|
||||
|
@@ -3,7 +3,26 @@
|
||||
/*
|
||||
* 802.11 netlink interface public header
|
||||
*
|
||||
* Copyright 2006, 2007 Johannes Berg <johannes@sipsolutions.net>
|
||||
* Copyright 2006, 2007, 2008 Johannes Berg <johannes@sipsolutions.net>
|
||||
* Copyright 2008 Michael Wu <flamingice@sourmilk.net>
|
||||
* Copyright 2008 Luis Carlos Cobo <luisca@cozybit.com>
|
||||
* Copyright 2008 Michael Buesch <mb@bu3sch.de>
|
||||
* Copyright 2008 Luis R. Rodriguez <lrodriguez@atheros.com>
|
||||
* Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com>
|
||||
* Copyright 2008 Colin McCabe <colin@cozybit.com>
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -25,8 +44,10 @@
|
||||
*
|
||||
* @NL80211_CMD_GET_WIPHY: request information about a wiphy or dump request
|
||||
* to get a list of all present wiphys.
|
||||
* @NL80211_CMD_SET_WIPHY: set wiphy name, needs %NL80211_ATTR_WIPHY and
|
||||
* %NL80211_ATTR_WIPHY_NAME.
|
||||
* @NL80211_CMD_SET_WIPHY: set wiphy parameters, needs %NL80211_ATTR_WIPHY or
|
||||
* %NL80211_ATTR_IFINDEX; can be used to set %NL80211_ATTR_WIPHY_NAME,
|
||||
* %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ, and/or
|
||||
* %NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET.
|
||||
* @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request
|
||||
* or rename notification. Has attributes %NL80211_ATTR_WIPHY and
|
||||
* %NL80211_ATTR_WIPHY_NAME.
|
||||
@@ -106,6 +127,12 @@
|
||||
* to the the specified ISO/IEC 3166-1 alpha2 country code. The core will
|
||||
* store this as a valid request and then query userspace for it.
|
||||
*
|
||||
* @NL80211_CMD_GET_MESH_PARAMS: Get mesh networking properties for the
|
||||
* interface identified by %NL80211_ATTR_IFINDEX
|
||||
*
|
||||
* @NL80211_CMD_SET_MESH_PARAMS: Set mesh networking properties for the
|
||||
* interface identified by %NL80211_ATTR_IFINDEX
|
||||
*
|
||||
* @NL80211_CMD_MAX: highest used command number
|
||||
* @__NL80211_CMD_AFTER_LAST: internal use
|
||||
*/
|
||||
@@ -148,6 +175,9 @@ enum nl80211_commands {
|
||||
NL80211_CMD_SET_REG,
|
||||
NL80211_CMD_REQ_SET_REG,
|
||||
|
||||
NL80211_CMD_GET_MESH_PARAMS,
|
||||
NL80211_CMD_SET_MESH_PARAMS,
|
||||
|
||||
/* add new commands above here */
|
||||
|
||||
/* used to define NL80211_CMD_MAX below */
|
||||
@@ -169,6 +199,15 @@ enum nl80211_commands {
|
||||
* @NL80211_ATTR_WIPHY: index of wiphy to operate on, cf.
|
||||
* /sys/class/ieee80211/<phyname>/index
|
||||
* @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming)
|
||||
* @NL80211_ATTR_WIPHY_TXQ_PARAMS: a nested array of TX queue parameters
|
||||
* @NL80211_ATTR_WIPHY_FREQ: frequency of the selected channel in MHz
|
||||
* @NL80211_ATTR_WIPHY_CHANNEL_TYPE: included with NL80211_ATTR_WIPHY_FREQ
|
||||
* if HT20 or HT40 are allowed (i.e., 802.11n disabled if not included):
|
||||
* NL80211_CHAN_NO_HT = HT not allowed (i.e., same as not including
|
||||
* this attribute)
|
||||
* NL80211_CHAN_HT20 = HT20 only
|
||||
* NL80211_CHAN_HT40MINUS = secondary channel is below the primary channel
|
||||
* NL80211_CHAN_HT40PLUS = secondary channel is above the primary channel
|
||||
*
|
||||
* @NL80211_ATTR_IFINDEX: network interface index of the device to operate on
|
||||
* @NL80211_ATTR_IFNAME: network interface name
|
||||
@@ -234,6 +273,9 @@ enum nl80211_commands {
|
||||
* (u8, 0 or 1)
|
||||
* @NL80211_ATTR_BSS_SHORT_SLOT_TIME: whether short slot time enabled
|
||||
* (u8, 0 or 1)
|
||||
* @NL80211_ATTR_BSS_BASIC_RATES: basic rates, array of basic
|
||||
* rates in format defined by IEEE 802.11 7.3.2.2 but without the length
|
||||
* restriction (at most %NL80211_MAX_SUPP_RATES).
|
||||
*
|
||||
* @NL80211_ATTR_HT_CAPABILITY: HT Capability information element (from
|
||||
* association request when used with NL80211_CMD_NEW_STATION)
|
||||
@@ -296,6 +338,14 @@ enum nl80211_attrs {
|
||||
NL80211_ATTR_REG_ALPHA2,
|
||||
NL80211_ATTR_REG_RULES,
|
||||
|
||||
NL80211_ATTR_MESH_PARAMS,
|
||||
|
||||
NL80211_ATTR_BSS_BASIC_RATES,
|
||||
|
||||
NL80211_ATTR_WIPHY_TXQ_PARAMS,
|
||||
NL80211_ATTR_WIPHY_FREQ,
|
||||
NL80211_ATTR_WIPHY_CHANNEL_TYPE,
|
||||
|
||||
/* add attributes here, update the policy in nl80211.c */
|
||||
|
||||
__NL80211_ATTR_AFTER_LAST,
|
||||
@@ -307,6 +357,10 @@ enum nl80211_attrs {
|
||||
* here
|
||||
*/
|
||||
#define NL80211_ATTR_HT_CAPABILITY NL80211_ATTR_HT_CAPABILITY
|
||||
#define NL80211_ATTR_BSS_BASIC_RATES NL80211_ATTR_BSS_BASIC_RATES
|
||||
#define NL80211_ATTR_WIPHY_TXQ_PARAMS NL80211_ATTR_WIPHY_TXQ_PARAMS
|
||||
#define NL80211_ATTR_WIPHY_FREQ NL80211_ATTR_WIPHY_FREQ
|
||||
#define NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET
|
||||
|
||||
#define NL80211_MAX_SUPP_RATES 32
|
||||
#define NL80211_MAX_SUPP_REG_RULES 32
|
||||
@@ -370,6 +424,32 @@ enum nl80211_sta_flags {
|
||||
NL80211_STA_FLAG_MAX = __NL80211_STA_FLAG_AFTER_LAST - 1
|
||||
};
|
||||
|
||||
/**
|
||||
* enum nl80211_rate_info - bitrate information
|
||||
*
|
||||
* These attribute types are used with %NL80211_STA_INFO_TXRATE
|
||||
* when getting information about the bitrate of a station.
|
||||
*
|
||||
* @__NL80211_RATE_INFO_INVALID: attribute number 0 is reserved
|
||||
* @NL80211_RATE_INFO_BITRATE: total bitrate (u16, 100kbit/s)
|
||||
* @NL80211_RATE_INFO_MCS: mcs index for 802.11n (u8)
|
||||
* @NL80211_RATE_INFO_40_MHZ_WIDTH: 40 Mhz dualchannel bitrate
|
||||
* @NL80211_RATE_INFO_SHORT_GI: 400ns guard interval
|
||||
* @NL80211_RATE_INFO_MAX: highest rate_info number currently defined
|
||||
* @__NL80211_RATE_INFO_AFTER_LAST: internal use
|
||||
*/
|
||||
enum nl80211_rate_info {
|
||||
__NL80211_RATE_INFO_INVALID,
|
||||
NL80211_RATE_INFO_BITRATE,
|
||||
NL80211_RATE_INFO_MCS,
|
||||
NL80211_RATE_INFO_40_MHZ_WIDTH,
|
||||
NL80211_RATE_INFO_SHORT_GI,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_RATE_INFO_AFTER_LAST,
|
||||
NL80211_RATE_INFO_MAX = __NL80211_RATE_INFO_AFTER_LAST - 1
|
||||
};
|
||||
|
||||
/**
|
||||
* enum nl80211_sta_info - station information
|
||||
*
|
||||
@@ -382,6 +462,9 @@ enum nl80211_sta_flags {
|
||||
* @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station)
|
||||
* @__NL80211_STA_INFO_AFTER_LAST: internal
|
||||
* @NL80211_STA_INFO_MAX: highest possible station info attribute
|
||||
* @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm)
|
||||
* @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute
|
||||
* containing info as possible, see &enum nl80211_sta_info_txrate.
|
||||
*/
|
||||
enum nl80211_sta_info {
|
||||
__NL80211_STA_INFO_INVALID,
|
||||
@@ -391,6 +474,8 @@ enum nl80211_sta_info {
|
||||
NL80211_STA_INFO_LLID,
|
||||
NL80211_STA_INFO_PLID,
|
||||
NL80211_STA_INFO_PLINK_STATE,
|
||||
NL80211_STA_INFO_SIGNAL,
|
||||
NL80211_STA_INFO_TX_BITRATE,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_STA_INFO_AFTER_LAST,
|
||||
@@ -452,17 +537,29 @@ enum nl80211_mpath_info {
|
||||
* an array of nested frequency attributes
|
||||
* @NL80211_BAND_ATTR_RATES: supported bitrates in this band,
|
||||
* an array of nested bitrate attributes
|
||||
* @NL80211_BAND_ATTR_HT_MCS_SET: 16-byte attribute containing the MCS set as
|
||||
* defined in 802.11n
|
||||
* @NL80211_BAND_ATTR_HT_CAPA: HT capabilities, as in the HT information IE
|
||||
* @NL80211_BAND_ATTR_HT_AMPDU_FACTOR: A-MPDU factor, as in 11n
|
||||
* @NL80211_BAND_ATTR_HT_AMPDU_DENSITY: A-MPDU density, as in 11n
|
||||
*/
|
||||
enum nl80211_band_attr {
|
||||
__NL80211_BAND_ATTR_INVALID,
|
||||
NL80211_BAND_ATTR_FREQS,
|
||||
NL80211_BAND_ATTR_RATES,
|
||||
|
||||
NL80211_BAND_ATTR_HT_MCS_SET,
|
||||
NL80211_BAND_ATTR_HT_CAPA,
|
||||
NL80211_BAND_ATTR_HT_AMPDU_FACTOR,
|
||||
NL80211_BAND_ATTR_HT_AMPDU_DENSITY,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_BAND_ATTR_AFTER_LAST,
|
||||
NL80211_BAND_ATTR_MAX = __NL80211_BAND_ATTR_AFTER_LAST - 1
|
||||
};
|
||||
|
||||
#define NL80211_BAND_ATTR_HT_CAPA NL80211_BAND_ATTR_HT_CAPA
|
||||
|
||||
/**
|
||||
* enum nl80211_frequency_attr - frequency attributes
|
||||
* @NL80211_FREQUENCY_ATTR_FREQ: Frequency in MHz
|
||||
@@ -474,6 +571,8 @@ enum nl80211_band_attr {
|
||||
* on this channel in current regulatory domain.
|
||||
* @NL80211_FREQUENCY_ATTR_RADAR: Radar detection is mandatory
|
||||
* on this channel in current regulatory domain.
|
||||
* @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm
|
||||
* (100 * dBm).
|
||||
*/
|
||||
enum nl80211_frequency_attr {
|
||||
__NL80211_FREQUENCY_ATTR_INVALID,
|
||||
@@ -482,12 +581,15 @@ enum nl80211_frequency_attr {
|
||||
NL80211_FREQUENCY_ATTR_PASSIVE_SCAN,
|
||||
NL80211_FREQUENCY_ATTR_NO_IBSS,
|
||||
NL80211_FREQUENCY_ATTR_RADAR,
|
||||
NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_FREQUENCY_ATTR_AFTER_LAST,
|
||||
NL80211_FREQUENCY_ATTR_MAX = __NL80211_FREQUENCY_ATTR_AFTER_LAST - 1
|
||||
};
|
||||
|
||||
#define NL80211_FREQUENCY_ATTR_MAX_TX_POWER NL80211_FREQUENCY_ATTR_MAX_TX_POWER
|
||||
|
||||
/**
|
||||
* enum nl80211_bitrate_attr - bitrate attributes
|
||||
* @NL80211_BITRATE_ATTR_RATE: Bitrate in units of 100 kbps
|
||||
@@ -594,4 +696,119 @@ enum nl80211_mntr_flags {
|
||||
NL80211_MNTR_FLAG_MAX = __NL80211_MNTR_FLAG_AFTER_LAST - 1
|
||||
};
|
||||
|
||||
/**
|
||||
* enum nl80211_meshconf_params - mesh configuration parameters
|
||||
*
|
||||
* Mesh configuration parameters
|
||||
*
|
||||
* @__NL80211_MESHCONF_INVALID: internal use
|
||||
*
|
||||
* @NL80211_MESHCONF_RETRY_TIMEOUT: specifies the initial retry timeout in
|
||||
* millisecond units, used by the Peer Link Open message
|
||||
*
|
||||
* @NL80211_MESHCONF_CONFIRM_TIMEOUT: specifies the inital confirm timeout, in
|
||||
* millisecond units, used by the peer link management to close a peer link
|
||||
*
|
||||
* @NL80211_MESHCONF_HOLDING_TIMEOUT: specifies the holding timeout, in
|
||||
* millisecond units
|
||||
*
|
||||
* @NL80211_MESHCONF_MAX_PEER_LINKS: maximum number of peer links allowed
|
||||
* on this mesh interface
|
||||
*
|
||||
* @NL80211_MESHCONF_MAX_RETRIES: specifies the maximum number of peer link
|
||||
* open retries that can be sent to establish a new peer link instance in a
|
||||
* mesh
|
||||
*
|
||||
* @NL80211_MESHCONF_TTL: specifies the value of TTL field set at a source mesh
|
||||
* point.
|
||||
*
|
||||
* @NL80211_MESHCONF_AUTO_OPEN_PLINKS: whether we should automatically
|
||||
* open peer links when we detect compatible mesh peers.
|
||||
*
|
||||
* @NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES: the number of action frames
|
||||
* containing a PREQ that an MP can send to a particular destination (path
|
||||
* target)
|
||||
*
|
||||
* @NL80211_MESHCONF_PATH_REFRESH_TIME: how frequently to refresh mesh paths
|
||||
* (in milliseconds)
|
||||
*
|
||||
* @NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT: minimum length of time to wait
|
||||
* until giving up on a path discovery (in milliseconds)
|
||||
*
|
||||
* @NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT: The time (in TUs) for which mesh
|
||||
* points receiving a PREQ shall consider the forwarding information from the
|
||||
* root to be valid. (TU = time unit)
|
||||
*
|
||||
* @NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL: The minimum interval of time (in
|
||||
* TUs) during which an MP can send only one action frame containing a PREQ
|
||||
* reference element
|
||||
*
|
||||
* @NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME: The interval of time (in TUs)
|
||||
* that it takes for an HWMP information element to propagate across the mesh
|
||||
*
|
||||
* @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute
|
||||
*
|
||||
* @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
|
||||
*/
|
||||
enum nl80211_meshconf_params {
|
||||
__NL80211_MESHCONF_INVALID,
|
||||
NL80211_MESHCONF_RETRY_TIMEOUT,
|
||||
NL80211_MESHCONF_CONFIRM_TIMEOUT,
|
||||
NL80211_MESHCONF_HOLDING_TIMEOUT,
|
||||
NL80211_MESHCONF_MAX_PEER_LINKS,
|
||||
NL80211_MESHCONF_MAX_RETRIES,
|
||||
NL80211_MESHCONF_TTL,
|
||||
NL80211_MESHCONF_AUTO_OPEN_PLINKS,
|
||||
NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES,
|
||||
NL80211_MESHCONF_PATH_REFRESH_TIME,
|
||||
NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT,
|
||||
NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT,
|
||||
NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL,
|
||||
NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_MESHCONF_ATTR_AFTER_LAST,
|
||||
NL80211_MESHCONF_ATTR_MAX = __NL80211_MESHCONF_ATTR_AFTER_LAST - 1
|
||||
};
|
||||
|
||||
/**
|
||||
* enum nl80211_txq_attr - TX queue parameter attributes
|
||||
* @__NL80211_TXQ_ATTR_INVALID: Attribute number 0 is reserved
|
||||
* @NL80211_TXQ_ATTR_QUEUE: TX queue identifier (NL80211_TXQ_Q_*)
|
||||
* @NL80211_TXQ_ATTR_TXOP: Maximum burst time in units of 32 usecs, 0 meaning
|
||||
* disabled
|
||||
* @NL80211_TXQ_ATTR_CWMIN: Minimum contention window [a value of the form
|
||||
* 2^n-1 in the range 1..32767]
|
||||
* @NL80211_TXQ_ATTR_CWMAX: Maximum contention window [a value of the form
|
||||
* 2^n-1 in the range 1..32767]
|
||||
* @NL80211_TXQ_ATTR_AIFS: Arbitration interframe space [0..255]
|
||||
* @__NL80211_TXQ_ATTR_AFTER_LAST: Internal
|
||||
* @NL80211_TXQ_ATTR_MAX: Maximum TXQ attribute number
|
||||
*/
|
||||
enum nl80211_txq_attr {
|
||||
__NL80211_TXQ_ATTR_INVALID,
|
||||
NL80211_TXQ_ATTR_QUEUE,
|
||||
NL80211_TXQ_ATTR_TXOP,
|
||||
NL80211_TXQ_ATTR_CWMIN,
|
||||
NL80211_TXQ_ATTR_CWMAX,
|
||||
NL80211_TXQ_ATTR_AIFS,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_TXQ_ATTR_AFTER_LAST,
|
||||
NL80211_TXQ_ATTR_MAX = __NL80211_TXQ_ATTR_AFTER_LAST - 1
|
||||
};
|
||||
|
||||
enum nl80211_txq_q {
|
||||
NL80211_TXQ_Q_VO,
|
||||
NL80211_TXQ_Q_VI,
|
||||
NL80211_TXQ_Q_BE,
|
||||
NL80211_TXQ_Q_BK
|
||||
};
|
||||
|
||||
enum nl80211_channel_type {
|
||||
NL80211_CHAN_NO_HT,
|
||||
NL80211_CHAN_HT20,
|
||||
NL80211_CHAN_HT40MINUS,
|
||||
NL80211_CHAN_HT40PLUS
|
||||
};
|
||||
#endif /* __LINUX_NL80211_H */
|
||||
|
@@ -27,7 +27,6 @@ struct nsproxy {
|
||||
struct ipc_namespace *ipc_ns;
|
||||
struct mnt_namespace *mnt_ns;
|
||||
struct pid_namespace *pid_ns;
|
||||
struct user_namespace *user_ns;
|
||||
struct net *net_ns;
|
||||
};
|
||||
extern struct nsproxy init_nsproxy;
|
||||
|
@@ -57,6 +57,12 @@ extern struct device_node *of_get_next_child(const struct device_node *node,
|
||||
for (child = of_get_next_child(parent, NULL); child != NULL; \
|
||||
child = of_get_next_child(parent, child))
|
||||
|
||||
extern struct device_node *of_find_node_with_property(
|
||||
struct device_node *from, const char *prop_name);
|
||||
#define for_each_node_with_property(dn, prop_name) \
|
||||
for (dn = of_find_node_with_property(NULL, prop_name); dn; \
|
||||
dn = of_find_node_with_property(dn, prop_name))
|
||||
|
||||
extern struct property *of_find_property(const struct device_node *np,
|
||||
const char *name,
|
||||
int *lenp);
|
||||
|
@@ -14,9 +14,22 @@
|
||||
#ifndef __LINUX_OF_GPIO_H
|
||||
#define __LINUX_OF_GPIO_H
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
struct device_node;
|
||||
|
||||
/*
|
||||
* This is Linux-specific flags. By default controllers' and Linux' mapping
|
||||
* match, but GPIO controllers are free to translate their own flags to
|
||||
* Linux-specific in their .xlate callback. Though, 1:1 mapping is recommended.
|
||||
*/
|
||||
enum of_gpio_flags {
|
||||
OF_GPIO_ACTIVE_LOW = 0x1,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_OF_GPIO
|
||||
|
||||
/*
|
||||
@@ -26,7 +39,7 @@ struct of_gpio_chip {
|
||||
struct gpio_chip gc;
|
||||
int gpio_cells;
|
||||
int (*xlate)(struct of_gpio_chip *of_gc, struct device_node *np,
|
||||
const void *gpio_spec);
|
||||
const void *gpio_spec, enum of_gpio_flags *flags);
|
||||
};
|
||||
|
||||
static inline struct of_gpio_chip *to_of_gpio_chip(struct gpio_chip *gc)
|
||||
@@ -50,20 +63,43 @@ static inline struct of_mm_gpio_chip *to_of_mm_gpio_chip(struct gpio_chip *gc)
|
||||
return container_of(of_gc, struct of_mm_gpio_chip, of_gc);
|
||||
}
|
||||
|
||||
extern int of_get_gpio(struct device_node *np, int index);
|
||||
extern int of_get_gpio_flags(struct device_node *np, int index,
|
||||
enum of_gpio_flags *flags);
|
||||
extern unsigned int of_gpio_count(struct device_node *np);
|
||||
|
||||
extern int of_mm_gpiochip_add(struct device_node *np,
|
||||
struct of_mm_gpio_chip *mm_gc);
|
||||
extern int of_gpio_simple_xlate(struct of_gpio_chip *of_gc,
|
||||
struct device_node *np,
|
||||
const void *gpio_spec);
|
||||
const void *gpio_spec,
|
||||
enum of_gpio_flags *flags);
|
||||
#else
|
||||
|
||||
/* Drivers may not strictly depend on the GPIO support, so let them link. */
|
||||
static inline int of_get_gpio(struct device_node *np, int index)
|
||||
static inline int of_get_gpio_flags(struct device_node *np, int index,
|
||||
enum of_gpio_flags *flags)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline unsigned int of_gpio_count(struct device_node *np)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_OF_GPIO */
|
||||
|
||||
/**
|
||||
* of_get_gpio - Get a GPIO number to use with GPIO API
|
||||
* @np: device node to get GPIO from
|
||||
* @index: index of the GPIO
|
||||
*
|
||||
* Returns GPIO number to use with Linux generic GPIO API, or one of the errno
|
||||
* value on the error condition.
|
||||
*/
|
||||
static inline int of_get_gpio(struct device_node *np, int index)
|
||||
{
|
||||
return of_get_gpio_flags(np, index, NULL);
|
||||
}
|
||||
|
||||
#endif /* __LINUX_OF_GPIO_H */
|
||||
|
@@ -26,8 +26,7 @@ extern struct bus_type of_platform_bus_type;
|
||||
|
||||
/*
|
||||
* An of_platform_driver driver is attached to a basic of_device on
|
||||
* the "platform bus" (of_platform_bus_type) (or ISA, EBUS and SBUS
|
||||
* busses on sparc).
|
||||
* the "platform bus" (of_platform_bus_type).
|
||||
*/
|
||||
struct of_platform_driver
|
||||
{
|
||||
|
@@ -86,8 +86,7 @@ int oprofile_arch_init(struct oprofile_operations * ops);
|
||||
void oprofile_arch_exit(void);
|
||||
|
||||
/**
|
||||
* Add a sample. This may be called from any context. Pass
|
||||
* smp_processor_id() as cpu.
|
||||
* Add a sample. This may be called from any context.
|
||||
*/
|
||||
void oprofile_add_sample(struct pt_regs * const regs, unsigned long event);
|
||||
|
||||
|
@@ -134,6 +134,11 @@ enum pci_dev_flags {
|
||||
PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2,
|
||||
};
|
||||
|
||||
enum pci_irq_reroute_variant {
|
||||
INTEL_IRQ_REROUTE_VARIANT = 1,
|
||||
MAX_IRQ_REROUTE_VARIANTS = 3
|
||||
};
|
||||
|
||||
typedef unsigned short __bitwise pci_bus_flags_t;
|
||||
enum pci_bus_flags {
|
||||
PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1,
|
||||
@@ -218,6 +223,7 @@ struct pci_dev {
|
||||
unsigned int no_msi:1; /* device may not use msi */
|
||||
unsigned int block_ucfg_access:1; /* userspace config space access is blocked */
|
||||
unsigned int broken_parity_status:1; /* Device generates false positive parity */
|
||||
unsigned int irq_reroute_variant:2; /* device needs IRQ rerouting variant */
|
||||
unsigned int msi_enabled:1;
|
||||
unsigned int msix_enabled:1;
|
||||
unsigned int ari_enabled:1; /* ARI forwarding */
|
||||
|
@@ -2304,6 +2304,10 @@
|
||||
#define PCI_DEVICE_ID_INTEL_PXH_0 0x0329
|
||||
#define PCI_DEVICE_ID_INTEL_PXH_1 0x032A
|
||||
#define PCI_DEVICE_ID_INTEL_PXHV 0x032C
|
||||
#define PCI_DEVICE_ID_INTEL_80332_0 0x0330
|
||||
#define PCI_DEVICE_ID_INTEL_80332_1 0x0332
|
||||
#define PCI_DEVICE_ID_INTEL_80333_0 0x0370
|
||||
#define PCI_DEVICE_ID_INTEL_80333_1 0x0372
|
||||
#define PCI_DEVICE_ID_INTEL_82375 0x0482
|
||||
#define PCI_DEVICE_ID_INTEL_82424 0x0483
|
||||
#define PCI_DEVICE_ID_INTEL_82378 0x0484
|
||||
@@ -2376,6 +2380,7 @@
|
||||
#define PCI_DEVICE_ID_INTEL_ESB_4 0x25a4
|
||||
#define PCI_DEVICE_ID_INTEL_ESB_5 0x25a6
|
||||
#define PCI_DEVICE_ID_INTEL_ESB_9 0x25ab
|
||||
#define PCI_DEVICE_ID_INTEL_ESB_10 0x25ac
|
||||
#define PCI_DEVICE_ID_INTEL_82820_HB 0x2500
|
||||
#define PCI_DEVICE_ID_INTEL_82820_UP_HB 0x2501
|
||||
#define PCI_DEVICE_ID_INTEL_82850_HB 0x2530
|
||||
|
@@ -467,6 +467,8 @@ int genphy_restart_aneg(struct phy_device *phydev);
|
||||
int genphy_config_aneg(struct phy_device *phydev);
|
||||
int genphy_update_link(struct phy_device *phydev);
|
||||
int genphy_read_status(struct phy_device *phydev);
|
||||
int genphy_suspend(struct phy_device *phydev);
|
||||
int genphy_resume(struct phy_device *phydev);
|
||||
void phy_driver_unregister(struct phy_driver *drv);
|
||||
int phy_driver_register(struct phy_driver *new_driver);
|
||||
void phy_prepare_link(struct phy_device *phydev,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user