Merge commit 'origin/x86/urgent' into x86/asm
This commit is contained in:
commit
e8a2eb47e6
1119 changed files with 33360 additions and 16906 deletions
|
|
@ -913,6 +913,7 @@ extern void blk_queue_logical_block_size(struct request_queue *, unsigned short)
|
|||
extern void blk_queue_physical_block_size(struct request_queue *, unsigned short);
|
||||
extern void blk_queue_alignment_offset(struct request_queue *q,
|
||||
unsigned int alignment);
|
||||
extern void blk_limits_io_min(struct queue_limits *limits, unsigned int min);
|
||||
extern void blk_queue_io_min(struct request_queue *q, unsigned int min);
|
||||
extern void blk_queue_io_opt(struct request_queue *q, unsigned int opt);
|
||||
extern void blk_set_default_limits(struct queue_limits *lim);
|
||||
|
|
|
|||
|
|
@ -140,29 +140,6 @@ void cb710_dump_regs(struct cb710_chip *chip, unsigned dump);
|
|||
#include <linux/highmem.h>
|
||||
#include <linux/scatterlist.h>
|
||||
|
||||
/**
|
||||
* cb710_sg_miter_stop_writing - stop mapping iteration after writing
|
||||
* @miter: sg mapping iter to be stopped
|
||||
*
|
||||
* Description:
|
||||
* Stops mapping iterator @miter. @miter should have been started
|
||||
* started using sg_miter_start(). A stopped iteration can be
|
||||
* resumed by calling sg_miter_next() on it. This is useful when
|
||||
* resources (kmap) need to be released during iteration.
|
||||
*
|
||||
* This is a convenience wrapper that will be optimized out for arches
|
||||
* that don't need flush_kernel_dcache_page().
|
||||
*
|
||||
* Context:
|
||||
* IRQ disabled if the SG_MITER_ATOMIC is set. Don't care otherwise.
|
||||
*/
|
||||
static inline void cb710_sg_miter_stop_writing(struct sg_mapping_iter *miter)
|
||||
{
|
||||
if (miter->page)
|
||||
flush_kernel_dcache_page(miter->page);
|
||||
sg_miter_stop(miter);
|
||||
}
|
||||
|
||||
/*
|
||||
* 32-bit PIO mapping sg iterator
|
||||
*
|
||||
|
|
@ -171,12 +148,12 @@ static inline void cb710_sg_miter_stop_writing(struct sg_mapping_iter *miter)
|
|||
* without DMA support).
|
||||
*
|
||||
* Best-case reading (transfer from device):
|
||||
* sg_miter_start();
|
||||
* sg_miter_start(, SG_MITER_TO_SG);
|
||||
* cb710_sg_dwiter_write_from_io();
|
||||
* cb710_sg_miter_stop_writing();
|
||||
* sg_miter_stop();
|
||||
*
|
||||
* Best-case writing (transfer to device):
|
||||
* sg_miter_start();
|
||||
* sg_miter_start(, SG_MITER_FROM_SG);
|
||||
* cb710_sg_dwiter_read_to_io();
|
||||
* sg_miter_stop();
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -179,14 +179,11 @@ struct cgroup {
|
|||
*/
|
||||
struct list_head release_list;
|
||||
|
||||
/* pids_mutex protects the fields below */
|
||||
/* pids_mutex protects pids_list and cached pid arrays. */
|
||||
struct rw_semaphore pids_mutex;
|
||||
/* Array of process ids in the cgroup */
|
||||
pid_t *tasks_pids;
|
||||
/* How many files are using the current tasks_pids array */
|
||||
int pids_use_count;
|
||||
/* Length of the current tasks_pids array */
|
||||
int pids_length;
|
||||
|
||||
/* Linked list of struct cgroup_pids */
|
||||
struct list_head pids_list;
|
||||
|
||||
/* For RCU-protected deletion */
|
||||
struct rcu_head rcu_head;
|
||||
|
|
@ -365,6 +362,23 @@ int cgroup_task_count(const struct cgroup *cgrp);
|
|||
/* Return true if cgrp is a descendant of the task's cgroup */
|
||||
int cgroup_is_descendant(const struct cgroup *cgrp, struct task_struct *task);
|
||||
|
||||
/*
|
||||
* When the subsys has to access css and may add permanent refcnt to css,
|
||||
* it should take care of racy conditions with rmdir(). Following set of
|
||||
* functions, is for stop/restart rmdir if necessary.
|
||||
* Because these will call css_get/put, "css" should be alive css.
|
||||
*
|
||||
* cgroup_exclude_rmdir();
|
||||
* ...do some jobs which may access arbitrary empty cgroup
|
||||
* cgroup_release_and_wakeup_rmdir();
|
||||
*
|
||||
* When someone removes a cgroup while cgroup_exclude_rmdir() holds it,
|
||||
* it sleeps and cgroup_release_and_wakeup_rmdir() will wake him up.
|
||||
*/
|
||||
|
||||
void cgroup_exclude_rmdir(struct cgroup_subsys_state *css);
|
||||
void cgroup_release_and_wakeup_rmdir(struct cgroup_subsys_state *css);
|
||||
|
||||
/*
|
||||
* Control Group subsystem type.
|
||||
* See Documentation/cgroups/cgroups.txt for details
|
||||
|
|
|
|||
|
|
@ -293,7 +293,12 @@ static inline int clocksource_enable(struct clocksource *cs)
|
|||
if (cs->enable)
|
||||
ret = cs->enable(cs);
|
||||
|
||||
/* save mult_orig on enable */
|
||||
/*
|
||||
* The frequency may have changed while the clocksource
|
||||
* was disabled. If so the code in ->enable() must update
|
||||
* the mult value to reflect the new frequency. Make sure
|
||||
* mult_orig follows this change.
|
||||
*/
|
||||
cs->mult_orig = cs->mult;
|
||||
|
||||
return ret;
|
||||
|
|
@ -309,6 +314,13 @@ static inline int clocksource_enable(struct clocksource *cs)
|
|||
*/
|
||||
static inline void clocksource_disable(struct clocksource *cs)
|
||||
{
|
||||
/*
|
||||
* Save mult_orig in mult so clocksource_enable() can
|
||||
* restore the value regardless if ->enable() updates
|
||||
* the value of mult or not.
|
||||
*/
|
||||
cs->mult = cs->mult_orig;
|
||||
|
||||
if (cs->disable)
|
||||
cs->disable(cs);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,31 +1,37 @@
|
|||
#ifndef DECOMPRESS_GENERIC_H
|
||||
#define DECOMPRESS_GENERIC_H
|
||||
|
||||
/* Minimal chunksize to be read.
|
||||
*Bzip2 prefers at least 4096
|
||||
*Lzma prefers 0x10000 */
|
||||
#define COMPR_IOBUF_SIZE 4096
|
||||
|
||||
typedef int (*decompress_fn) (unsigned char *inbuf, int len,
|
||||
int(*fill)(void*, unsigned int),
|
||||
int(*writebb)(void*, unsigned int),
|
||||
unsigned char *output,
|
||||
int(*flush)(void*, unsigned int),
|
||||
unsigned char *outbuf,
|
||||
int *posp,
|
||||
void(*error)(char *x));
|
||||
|
||||
/* inbuf - input buffer
|
||||
*len - len of pre-read data in inbuf
|
||||
*fill - function to fill inbuf if empty
|
||||
*writebb - function to write out outbug
|
||||
*fill - function to fill inbuf when empty
|
||||
*flush - function to write out outbuf
|
||||
*outbuf - output buffer
|
||||
*posp - if non-null, input position (number of bytes read) will be
|
||||
* returned here
|
||||
*
|
||||
*If len != 0, the inbuf is initialized (with as much data), and fill
|
||||
*should not be called
|
||||
*If len = 0, the inbuf is allocated, but empty. Its size is IOBUF_SIZE
|
||||
*fill should be called (repeatedly...) to read data, at most IOBUF_SIZE
|
||||
*If len != 0, inbuf should contain all the necessary input data, and fill
|
||||
*should be NULL
|
||||
*If len = 0, inbuf can be NULL, in which case the decompressor will allocate
|
||||
*the input buffer. If inbuf != NULL it must be at least XXX_IOBUF_SIZE bytes.
|
||||
*fill will be called (repeatedly...) to read data, at most XXX_IOBUF_SIZE
|
||||
*bytes should be read per call. Replace XXX with the appropriate decompressor
|
||||
*name, i.e. LZMA_IOBUF_SIZE.
|
||||
*
|
||||
*If flush = NULL, outbuf must be large enough to buffer all the expected
|
||||
*output. If flush != NULL, the output buffer will be allocated by the
|
||||
*decompressor (outbuf = NULL), and the flush function will be called to
|
||||
*flush the output buffer at the appropriate time (decompressor and stream
|
||||
*dependent).
|
||||
*/
|
||||
|
||||
|
||||
/* Utility routine to detect the decompression method */
|
||||
decompress_fn decompress_method(const unsigned char *inbuf, int len,
|
||||
const char **name);
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ typedef int (*dm_merge_fn) (struct dm_target *ti, struct bvec_merge_data *bvm,
|
|||
|
||||
typedef int (*iterate_devices_callout_fn) (struct dm_target *ti,
|
||||
struct dm_dev *dev,
|
||||
sector_t physical_start,
|
||||
sector_t start, sector_t len,
|
||||
void *data);
|
||||
|
||||
typedef int (*dm_iterate_devices_fn) (struct dm_target *ti,
|
||||
|
|
@ -104,7 +104,7 @@ void dm_error(const char *message);
|
|||
* Combine device limits.
|
||||
*/
|
||||
int dm_set_device_limits(struct dm_target *ti, struct dm_dev *dev,
|
||||
sector_t start, void *data);
|
||||
sector_t start, sector_t len, void *data);
|
||||
|
||||
struct dm_dev {
|
||||
struct block_device *bdev;
|
||||
|
|
|
|||
|
|
@ -874,7 +874,7 @@ struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *);
|
|||
struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *);
|
||||
int ext3_get_blocks_handle(handle_t *handle, struct inode *inode,
|
||||
sector_t iblock, unsigned long maxblocks, struct buffer_head *bh_result,
|
||||
int create, int extend_disksize);
|
||||
int create);
|
||||
|
||||
extern struct inode *ext3_iget(struct super_block *, unsigned long);
|
||||
extern int ext3_write_inode (struct inode *, int);
|
||||
|
|
|
|||
47
include/linux/flex_array.h
Normal file
47
include/linux/flex_array.h
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
#ifndef _FLEX_ARRAY_H
|
||||
#define _FLEX_ARRAY_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <asm/page.h>
|
||||
|
||||
#define FLEX_ARRAY_PART_SIZE PAGE_SIZE
|
||||
#define FLEX_ARRAY_BASE_SIZE PAGE_SIZE
|
||||
|
||||
struct flex_array_part;
|
||||
|
||||
/*
|
||||
* This is meant to replace cases where an array-like
|
||||
* structure has gotten too big to fit into kmalloc()
|
||||
* and the developer is getting tempted to use
|
||||
* vmalloc().
|
||||
*/
|
||||
|
||||
struct flex_array {
|
||||
union {
|
||||
struct {
|
||||
int element_size;
|
||||
int total_nr_elements;
|
||||
struct flex_array_part *parts[0];
|
||||
};
|
||||
/*
|
||||
* This little trick makes sure that
|
||||
* sizeof(flex_array) == PAGE_SIZE
|
||||
*/
|
||||
char padding[FLEX_ARRAY_BASE_SIZE];
|
||||
};
|
||||
};
|
||||
|
||||
#define FLEX_ARRAY_INIT(size, total) { { {\
|
||||
.element_size = (size), \
|
||||
.total_nr_elements = (total), \
|
||||
} } }
|
||||
|
||||
struct flex_array *flex_array_alloc(int element_size, int total, gfp_t flags);
|
||||
int flex_array_prealloc(struct flex_array *fa, int start, int end, gfp_t flags);
|
||||
void flex_array_free(struct flex_array *fa);
|
||||
void flex_array_free_parts(struct flex_array *fa);
|
||||
int flex_array_put(struct flex_array *fa, int element_nr, void *src,
|
||||
gfp_t flags);
|
||||
void *flex_array_get(struct flex_array *fa, int element_nr);
|
||||
|
||||
#endif /* _FLEX_ARRAY_H */
|
||||
|
|
@ -1946,6 +1946,7 @@ extern void putname(const char *name);
|
|||
extern int register_blkdev(unsigned int, const char *);
|
||||
extern void unregister_blkdev(unsigned int, const char *);
|
||||
extern struct block_device *bdget(dev_t);
|
||||
extern struct block_device *bdgrab(struct block_device *bdev);
|
||||
extern void bd_set_size(struct block_device *, loff_t size);
|
||||
extern void bd_forget(struct inode *inode);
|
||||
extern void bdput(struct block_device *);
|
||||
|
|
@ -2136,7 +2137,7 @@ 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 int 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 *);
|
||||
|
|
@ -2163,6 +2164,7 @@ extern void __iget(struct inode * inode);
|
|||
extern void iget_failed(struct inode *);
|
||||
extern void clear_inode(struct inode *);
|
||||
extern void destroy_inode(struct inode *);
|
||||
extern void __destroy_inode(struct inode *);
|
||||
extern struct inode *new_inode(struct super_block *);
|
||||
extern int should_remove_suid(struct dentry *);
|
||||
extern int file_remove_suid(struct file *);
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ extern void fsnotify_unmount_inodes(struct list_head *list);
|
|||
/* put here because inotify does some weird stuff when destroying watches */
|
||||
extern struct fsnotify_event *fsnotify_create_event(struct inode *to_tell, __u32 mask,
|
||||
void *data, int data_is, const char *name,
|
||||
u32 cookie);
|
||||
u32 cookie, gfp_t gfp);
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,9 @@ enum print_line_t {
|
|||
TRACE_TYPE_NO_CONSUME = 3 /* Handled but ask to not consume */
|
||||
};
|
||||
|
||||
|
||||
void tracing_generic_entry_update(struct trace_entry *entry,
|
||||
unsigned long flags,
|
||||
int pc);
|
||||
struct ring_buffer_event *
|
||||
trace_current_buffer_lock_reserve(int type, unsigned long len,
|
||||
unsigned long flags, int pc);
|
||||
|
|
@ -119,11 +121,9 @@ struct ftrace_event_call {
|
|||
void *filter;
|
||||
void *mod;
|
||||
|
||||
#ifdef CONFIG_EVENT_PROFILE
|
||||
atomic_t profile_count;
|
||||
int (*profile_enable)(struct ftrace_event_call *);
|
||||
void (*profile_disable)(struct ftrace_event_call *);
|
||||
#endif
|
||||
atomic_t profile_count;
|
||||
int (*profile_enable)(struct ftrace_event_call *);
|
||||
void (*profile_disable)(struct ftrace_event_call *);
|
||||
};
|
||||
|
||||
#define MAX_FILTER_PRED 32
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev)
|
|||
|
||||
#define IN_DEV_FORWARD(in_dev) IN_DEV_CONF_GET((in_dev), FORWARDING)
|
||||
#define IN_DEV_MFORWARD(in_dev) IN_DEV_ANDCONF((in_dev), MC_FORWARDING)
|
||||
#define IN_DEV_RPFILTER(in_dev) IN_DEV_ANDCONF((in_dev), RP_FILTER)
|
||||
#define IN_DEV_RPFILTER(in_dev) IN_DEV_MAXCONF((in_dev), RP_FILTER)
|
||||
#define IN_DEV_SOURCE_ROUTE(in_dev) IN_DEV_ANDCONF((in_dev), \
|
||||
ACCEPT_SOURCE_ROUTE)
|
||||
#define IN_DEV_BOOTP_RELAY(in_dev) IN_DEV_ANDCONF((in_dev), BOOTP_RELAY)
|
||||
|
|
|
|||
|
|
@ -15,12 +15,13 @@
|
|||
#define KEY_COL(k) (((k) >> 16) & 0xff)
|
||||
#define KEY_VAL(k) ((k) & 0xffff)
|
||||
|
||||
#define MATRIX_SCAN_CODE(row, col, row_shift) (((row) << (row_shift)) + (col))
|
||||
|
||||
/**
|
||||
* struct matrix_keymap_data - keymap for matrix keyboards
|
||||
* @keymap: pointer to array of uint32 values encoded with KEY() macro
|
||||
* representing keymap
|
||||
* @keymap_size: number of entries (initialized) in this keymap
|
||||
* @max_keymap_size: maximum size of keymap supported by the device
|
||||
*
|
||||
* This structure is supposed to be used by platform code to supply
|
||||
* keymaps to drivers that implement matrix-like keypads/keyboards.
|
||||
|
|
@ -28,14 +29,13 @@
|
|||
struct matrix_keymap_data {
|
||||
const uint32_t *keymap;
|
||||
unsigned int keymap_size;
|
||||
unsigned int max_keymap_size;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct matrix_keypad_platform_data - platform-dependent keypad data
|
||||
* @keymap_data: pointer to &matrix_keymap_data
|
||||
* @row_gpios: array of gpio numbers reporesenting rows
|
||||
* @col_gpios: array of gpio numbers reporesenting colums
|
||||
* @row_gpios: pointer to array of gpio numbers representing rows
|
||||
* @col_gpios: pointer to array of gpio numbers reporesenting colums
|
||||
* @num_row_gpios: actual number of row gpios used by device
|
||||
* @num_col_gpios: actual number of col gpios used by device
|
||||
* @col_scan_delay_us: delay, measured in microseconds, that is
|
||||
|
|
@ -48,8 +48,9 @@ struct matrix_keymap_data {
|
|||
struct matrix_keypad_platform_data {
|
||||
const struct matrix_keymap_data *keymap_data;
|
||||
|
||||
unsigned int row_gpios[MATRIX_MAX_ROWS];
|
||||
unsigned int col_gpios[MATRIX_MAX_COLS];
|
||||
const unsigned int *row_gpios;
|
||||
const unsigned int *col_gpios;
|
||||
|
||||
unsigned int num_row_gpios;
|
||||
unsigned int num_col_gpios;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
#include <linux/irqflags.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/percpu.h>
|
||||
#include <linux/hrtimer.h>
|
||||
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
|
@ -64,11 +65,13 @@
|
|||
* IRQTF_RUNTHREAD - signals that the interrupt handler thread should run
|
||||
* IRQTF_DIED - handler thread died
|
||||
* IRQTF_WARNED - warning "IRQ_WAKE_THREAD w/o thread_fn" has been printed
|
||||
* IRQTF_AFFINITY - irq thread is requested to adjust affinity
|
||||
*/
|
||||
enum {
|
||||
IRQTF_RUNTHREAD,
|
||||
IRQTF_DIED,
|
||||
IRQTF_WARNED,
|
||||
IRQTF_AFFINITY,
|
||||
};
|
||||
|
||||
typedef irqreturn_t (*irq_handler_t)(int, void *);
|
||||
|
|
@ -517,6 +520,31 @@ extern void tasklet_kill_immediate(struct tasklet_struct *t, unsigned int cpu);
|
|||
extern void tasklet_init(struct tasklet_struct *t,
|
||||
void (*func)(unsigned long), unsigned long data);
|
||||
|
||||
struct tasklet_hrtimer {
|
||||
struct hrtimer timer;
|
||||
struct tasklet_struct tasklet;
|
||||
enum hrtimer_restart (*function)(struct hrtimer *);
|
||||
};
|
||||
|
||||
extern void
|
||||
tasklet_hrtimer_init(struct tasklet_hrtimer *ttimer,
|
||||
enum hrtimer_restart (*function)(struct hrtimer *),
|
||||
clockid_t which_clock, enum hrtimer_mode mode);
|
||||
|
||||
static inline
|
||||
int tasklet_hrtimer_start(struct tasklet_hrtimer *ttimer, ktime_t time,
|
||||
const enum hrtimer_mode mode)
|
||||
{
|
||||
return hrtimer_start(&ttimer->timer, time, mode);
|
||||
}
|
||||
|
||||
static inline
|
||||
void tasklet_hrtimer_cancel(struct tasklet_hrtimer *ttimer)
|
||||
{
|
||||
hrtimer_cancel(&ttimer->timer);
|
||||
tasklet_kill(&ttimer->tasklet);
|
||||
}
|
||||
|
||||
/*
|
||||
* Autoprobing for irqs:
|
||||
*
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ static inline struct io_context *ioc_task_link(struct io_context *ioc)
|
|||
* a race).
|
||||
*/
|
||||
if (ioc && atomic_long_inc_not_zero(&ioc->refcount)) {
|
||||
atomic_long_inc(&ioc->refcount);
|
||||
atomic_inc(&ioc->nr_tasks);
|
||||
return ioc;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ struct kvm_memory_slot {
|
|||
|
||||
struct kvm_kernel_irq_routing_entry {
|
||||
u32 gsi;
|
||||
u32 type;
|
||||
int (*set)(struct kvm_kernel_irq_routing_entry *e,
|
||||
struct kvm *kvm, int level);
|
||||
union {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
/* Things the lguest guest needs to know. Note: like all lguest interfaces,
|
||||
* this is subject to wild and random change between versions. */
|
||||
/*
|
||||
* Things the lguest guest needs to know. Note: like all lguest interfaces,
|
||||
* this is subject to wild and random change between versions.
|
||||
*/
|
||||
#ifndef _LINUX_LGUEST_H
|
||||
#define _LINUX_LGUEST_H
|
||||
|
||||
|
|
@ -11,32 +13,41 @@
|
|||
#define LG_CLOCK_MIN_DELTA 100UL
|
||||
#define LG_CLOCK_MAX_DELTA ULONG_MAX
|
||||
|
||||
/*G:031 The second method of communicating with the Host is to via "struct
|
||||
/*G:031
|
||||
* The second method of communicating with the Host is to via "struct
|
||||
* lguest_data". Once the Guest's initialization hypercall tells the Host where
|
||||
* this is, the Guest and Host both publish information in it. :*/
|
||||
struct lguest_data
|
||||
{
|
||||
/* 512 == enabled (same as eflags in normal hardware). The Guest
|
||||
* changes interrupts so often that a hypercall is too slow. */
|
||||
* this is, the Guest and Host both publish information in it.
|
||||
:*/
|
||||
struct lguest_data {
|
||||
/*
|
||||
* 512 == enabled (same as eflags in normal hardware). The Guest
|
||||
* changes interrupts so often that a hypercall is too slow.
|
||||
*/
|
||||
unsigned int irq_enabled;
|
||||
/* Fine-grained interrupt disabling by the Guest */
|
||||
DECLARE_BITMAP(blocked_interrupts, LGUEST_IRQS);
|
||||
|
||||
/* The Host writes the virtual address of the last page fault here,
|
||||
/*
|
||||
* The Host writes the virtual address of the last page fault here,
|
||||
* which saves the Guest a hypercall. CR2 is the native register where
|
||||
* this address would normally be found. */
|
||||
* this address would normally be found.
|
||||
*/
|
||||
unsigned long cr2;
|
||||
|
||||
/* Wallclock time set by the Host. */
|
||||
struct timespec time;
|
||||
|
||||
/* Interrupt pending set by the Host. The Guest should do a hypercall
|
||||
* if it re-enables interrupts and sees this set (to X86_EFLAGS_IF). */
|
||||
/*
|
||||
* Interrupt pending set by the Host. The Guest should do a hypercall
|
||||
* if it re-enables interrupts and sees this set (to X86_EFLAGS_IF).
|
||||
*/
|
||||
int irq_pending;
|
||||
|
||||
/* Async hypercall ring. Instead of directly making hypercalls, we can
|
||||
/*
|
||||
* Async hypercall ring. Instead of directly making hypercalls, we can
|
||||
* place them in here for processing the next time the Host wants.
|
||||
* This batching can be quite efficient. */
|
||||
* This batching can be quite efficient.
|
||||
*/
|
||||
|
||||
/* 0xFF == done (set by Host), 0 == pending (set by Guest). */
|
||||
u8 hcall_status[LHCALL_RING_SIZE];
|
||||
|
|
|
|||
|
|
@ -29,8 +29,10 @@ struct lguest_device_desc {
|
|||
__u8 type;
|
||||
/* The number of virtqueues (first in config array) */
|
||||
__u8 num_vq;
|
||||
/* The number of bytes of feature bits. Multiply by 2: one for host
|
||||
* features and one for Guest acknowledgements. */
|
||||
/*
|
||||
* The number of bytes of feature bits. Multiply by 2: one for host
|
||||
* features and one for Guest acknowledgements.
|
||||
*/
|
||||
__u8 feature_len;
|
||||
/* The number of bytes of the config array after virtqueues. */
|
||||
__u8 config_len;
|
||||
|
|
@ -39,8 +41,10 @@ struct lguest_device_desc {
|
|||
__u8 config[0];
|
||||
};
|
||||
|
||||
/*D:135 This is how we expect the device configuration field for a virtqueue
|
||||
* to be laid out in config space. */
|
||||
/*D:135
|
||||
* This is how we expect the device configuration field for a virtqueue
|
||||
* to be laid out in config space.
|
||||
*/
|
||||
struct lguest_vqconfig {
|
||||
/* The number of entries in the virtio_ring */
|
||||
__u16 num;
|
||||
|
|
@ -61,7 +65,9 @@ enum lguest_req
|
|||
LHREQ_EVENTFD, /* + address, fd. */
|
||||
};
|
||||
|
||||
/* The alignment to use between consumer and producer parts of vring.
|
||||
* x86 pagesize for historical reasons. */
|
||||
/*
|
||||
* 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 */
|
||||
|
|
|
|||
|
|
@ -589,6 +589,7 @@ struct ata_device {
|
|||
#endif
|
||||
/* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */
|
||||
u64 n_sectors; /* size of device, if ATA */
|
||||
u64 n_native_sectors; /* native size, if ATA */
|
||||
unsigned int class; /* ATA_DEV_xxx */
|
||||
unsigned long unpark_deadline;
|
||||
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ struct mtd_info {
|
|||
|
||||
static inline struct mtd_info *dev_to_mtd(struct device *dev)
|
||||
{
|
||||
return dev ? container_of(dev, struct mtd_info, dev) : NULL;
|
||||
return dev ? dev_get_drvdata(dev) : NULL;
|
||||
}
|
||||
|
||||
static inline uint32_t mtd_div_by_eb(uint64_t sz, struct mtd_info *mtd)
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ struct mtd_partition {
|
|||
#define MTDPART_SIZ_FULL (0)
|
||||
|
||||
|
||||
struct mtd_info;
|
||||
|
||||
int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int);
|
||||
int del_mtd_partitions(struct mtd_info *);
|
||||
|
||||
|
|
|
|||
|
|
@ -473,7 +473,6 @@ extern int nfs_writepages(struct address_space *, struct writeback_control *);
|
|||
extern int nfs_flush_incompatible(struct file *file, struct page *page);
|
||||
extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned int);
|
||||
extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *);
|
||||
extern void nfs_writedata_release(void *);
|
||||
|
||||
/*
|
||||
* Try to write back everything synchronously (but check the
|
||||
|
|
@ -488,7 +487,6 @@ extern int nfs_wb_page_cancel(struct inode *inode, struct page* page);
|
|||
extern int nfs_commit_inode(struct inode *, int);
|
||||
extern struct nfs_write_data *nfs_commitdata_alloc(void);
|
||||
extern void nfs_commit_free(struct nfs_write_data *wdata);
|
||||
extern void nfs_commitdata_release(void *wdata);
|
||||
#else
|
||||
static inline int
|
||||
nfs_commit_inode(struct inode *inode, int how)
|
||||
|
|
@ -507,6 +505,7 @@ nfs_have_writebacks(struct inode *inode)
|
|||
* Allocate nfs_write_data structures
|
||||
*/
|
||||
extern struct nfs_write_data *nfs_writedata_alloc(unsigned int npages);
|
||||
extern void nfs_writedata_free(struct nfs_write_data *);
|
||||
|
||||
/*
|
||||
* linux/fs/nfs/read.c
|
||||
|
|
@ -515,7 +514,6 @@ extern int nfs_readpage(struct file *, struct page *);
|
|||
extern int nfs_readpages(struct file *, struct address_space *,
|
||||
struct list_head *, unsigned);
|
||||
extern int nfs_readpage_result(struct rpc_task *, struct nfs_read_data *);
|
||||
extern void nfs_readdata_release(void *data);
|
||||
extern int nfs_readpage_async(struct nfs_open_context *, struct inode *,
|
||||
struct page *);
|
||||
|
||||
|
|
@ -523,6 +521,7 @@ extern int nfs_readpage_async(struct nfs_open_context *, struct inode *,
|
|||
* Allocate nfs_read_data structures
|
||||
*/
|
||||
extern struct nfs_read_data *nfs_readdata_alloc(unsigned int npages);
|
||||
extern void nfs_readdata_free(struct nfs_read_data *);
|
||||
|
||||
/*
|
||||
* linux/fs/nfs3proc.c
|
||||
|
|
|
|||
|
|
@ -82,6 +82,12 @@
|
|||
* to generate slightly worse code. So use a simple one-line #define
|
||||
* for node_isset(), instead of wrapping an inline inside a macro, the
|
||||
* way we do the other calls.
|
||||
*
|
||||
* NODEMASK_SCRATCH
|
||||
* When doing above logical AND, OR, XOR, Remap operations the callers tend to
|
||||
* need temporary nodemask_t's on the stack. But if NODES_SHIFT is large,
|
||||
* nodemask_t's consume too much stack space. NODEMASK_SCRATCH is a helper
|
||||
* for such situations. See below and CPUMASK_ALLOC also.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
|
|
@ -473,4 +479,26 @@ static inline int num_node_state(enum node_states state)
|
|||
#define for_each_node(node) for_each_node_state(node, N_POSSIBLE)
|
||||
#define for_each_online_node(node) for_each_node_state(node, N_ONLINE)
|
||||
|
||||
/*
|
||||
* For nodemask scrach area.(See CPUMASK_ALLOC() in cpumask.h)
|
||||
*/
|
||||
|
||||
#if NODES_SHIFT > 8 /* nodemask_t > 64 bytes */
|
||||
#define NODEMASK_ALLOC(x, m) struct x *m = kmalloc(sizeof(*m), GFP_KERNEL)
|
||||
#define NODEMASK_FREE(m) kfree(m)
|
||||
#else
|
||||
#define NODEMASK_ALLOC(x, m) struct x _m, *m = &_m
|
||||
#define NODEMASK_FREE(m)
|
||||
#endif
|
||||
|
||||
/* A example struture for using NODEMASK_ALLOC, used in mempolicy. */
|
||||
struct nodemask_scratch {
|
||||
nodemask_t mask1;
|
||||
nodemask_t mask2;
|
||||
};
|
||||
|
||||
#define NODEMASK_SCRATCH(x) NODEMASK_ALLOC(nodemask_scratch, x)
|
||||
#define NODEMASK_SCRATCH_FREE(x) NODEMASK_FREE(x)
|
||||
|
||||
|
||||
#endif /* __LINUX_NODEMASK_H */
|
||||
|
|
|
|||
|
|
@ -18,5 +18,8 @@ extern struct phy_device *of_phy_connect(struct net_device *dev,
|
|||
struct device_node *phy_np,
|
||||
void (*hndlr)(struct net_device *),
|
||||
u32 flags, phy_interface_t iface);
|
||||
extern struct phy_device *of_phy_connect_fixed_link(struct net_device *dev,
|
||||
void (*hndlr)(struct net_device *),
|
||||
phy_interface_t iface);
|
||||
|
||||
#endif /* __LINUX_OF_MDIO_H */
|
||||
|
|
|
|||
|
|
@ -115,26 +115,44 @@ enum perf_counter_sample_format {
|
|||
PERF_SAMPLE_TID = 1U << 1,
|
||||
PERF_SAMPLE_TIME = 1U << 2,
|
||||
PERF_SAMPLE_ADDR = 1U << 3,
|
||||
PERF_SAMPLE_GROUP = 1U << 4,
|
||||
PERF_SAMPLE_READ = 1U << 4,
|
||||
PERF_SAMPLE_CALLCHAIN = 1U << 5,
|
||||
PERF_SAMPLE_ID = 1U << 6,
|
||||
PERF_SAMPLE_CPU = 1U << 7,
|
||||
PERF_SAMPLE_PERIOD = 1U << 8,
|
||||
PERF_SAMPLE_STREAM_ID = 1U << 9,
|
||||
PERF_SAMPLE_RAW = 1U << 10,
|
||||
|
||||
PERF_SAMPLE_MAX = 1U << 9, /* non-ABI */
|
||||
PERF_SAMPLE_MAX = 1U << 11, /* non-ABI */
|
||||
};
|
||||
|
||||
/*
|
||||
* Bits that can be set in attr.read_format to request that
|
||||
* reads on the counter should return the indicated quantities,
|
||||
* in increasing order of bit value, after the counter value.
|
||||
* The format of the data returned by read() on a perf counter fd,
|
||||
* as specified by attr.read_format:
|
||||
*
|
||||
* struct read_format {
|
||||
* { u64 value;
|
||||
* { u64 time_enabled; } && PERF_FORMAT_ENABLED
|
||||
* { u64 time_running; } && PERF_FORMAT_RUNNING
|
||||
* { u64 id; } && PERF_FORMAT_ID
|
||||
* } && !PERF_FORMAT_GROUP
|
||||
*
|
||||
* { u64 nr;
|
||||
* { u64 time_enabled; } && PERF_FORMAT_ENABLED
|
||||
* { u64 time_running; } && PERF_FORMAT_RUNNING
|
||||
* { u64 value;
|
||||
* { u64 id; } && PERF_FORMAT_ID
|
||||
* } cntr[nr];
|
||||
* } && PERF_FORMAT_GROUP
|
||||
* };
|
||||
*/
|
||||
enum perf_counter_read_format {
|
||||
PERF_FORMAT_TOTAL_TIME_ENABLED = 1U << 0,
|
||||
PERF_FORMAT_TOTAL_TIME_RUNNING = 1U << 1,
|
||||
PERF_FORMAT_ID = 1U << 2,
|
||||
PERF_FORMAT_GROUP = 1U << 3,
|
||||
|
||||
PERF_FORMAT_MAX = 1U << 3, /* non-ABI */
|
||||
PERF_FORMAT_MAX = 1U << 4, /* non-ABI */
|
||||
};
|
||||
|
||||
#define PERF_ATTR_SIZE_VER0 64 /* sizeof first published struct */
|
||||
|
|
@ -180,8 +198,9 @@ struct perf_counter_attr {
|
|||
freq : 1, /* use freq, not period */
|
||||
inherit_stat : 1, /* per task counts */
|
||||
enable_on_exec : 1, /* next exec enables */
|
||||
task : 1, /* trace fork/exit */
|
||||
|
||||
__reserved_1 : 51;
|
||||
__reserved_1 : 50;
|
||||
|
||||
__u32 wakeup_events; /* wakeup every n events */
|
||||
__u32 __reserved_2;
|
||||
|
|
@ -310,18 +329,18 @@ enum perf_event_type {
|
|||
/*
|
||||
* struct {
|
||||
* struct perf_event_header header;
|
||||
* u64 time;
|
||||
* u64 id;
|
||||
* u64 sample_period;
|
||||
* u32 pid, ppid;
|
||||
* u32 tid, ptid;
|
||||
* };
|
||||
*/
|
||||
PERF_EVENT_PERIOD = 4,
|
||||
PERF_EVENT_EXIT = 4,
|
||||
|
||||
/*
|
||||
* struct {
|
||||
* struct perf_event_header header;
|
||||
* u64 time;
|
||||
* u64 id;
|
||||
* u64 stream_id;
|
||||
* };
|
||||
*/
|
||||
PERF_EVENT_THROTTLE = 5,
|
||||
|
|
@ -331,6 +350,7 @@ enum perf_event_type {
|
|||
* struct {
|
||||
* struct perf_event_header header;
|
||||
* u32 pid, ppid;
|
||||
* u32 tid, ptid;
|
||||
* };
|
||||
*/
|
||||
PERF_EVENT_FORK = 7,
|
||||
|
|
@ -339,10 +359,8 @@ enum perf_event_type {
|
|||
* struct {
|
||||
* struct perf_event_header header;
|
||||
* u32 pid, tid;
|
||||
* u64 value;
|
||||
* { u64 time_enabled; } && PERF_FORMAT_ENABLED
|
||||
* { u64 time_running; } && PERF_FORMAT_RUNNING
|
||||
* { u64 parent_id; } && PERF_FORMAT_ID
|
||||
*
|
||||
* struct read_format values;
|
||||
* };
|
||||
*/
|
||||
PERF_EVENT_READ = 8,
|
||||
|
|
@ -356,14 +374,28 @@ enum perf_event_type {
|
|||
* { u64 time; } && PERF_SAMPLE_TIME
|
||||
* { u64 addr; } && PERF_SAMPLE_ADDR
|
||||
* { u64 id; } && PERF_SAMPLE_ID
|
||||
* { u64 stream_id;} && PERF_SAMPLE_STREAM_ID
|
||||
* { u32 cpu, res; } && PERF_SAMPLE_CPU
|
||||
* { u64 period; } && PERF_SAMPLE_PERIOD
|
||||
*
|
||||
* { u64 nr;
|
||||
* { u64 id, val; } cnt[nr]; } && PERF_SAMPLE_GROUP
|
||||
* { struct read_format values; } && PERF_SAMPLE_READ
|
||||
*
|
||||
* { u64 nr,
|
||||
* u64 ips[nr]; } && PERF_SAMPLE_CALLCHAIN
|
||||
*
|
||||
* #
|
||||
* # The RAW record below is opaque data wrt the ABI
|
||||
* #
|
||||
* # That is, the ABI doesn't make any promises wrt to
|
||||
* # the stability of its content, it may vary depending
|
||||
* # on event, hardware, kernel version and phase of
|
||||
* # the moon.
|
||||
* #
|
||||
* # In other words, PERF_SAMPLE_RAW contents are not an ABI.
|
||||
* #
|
||||
*
|
||||
* { u32 size;
|
||||
* char data[size];}&& PERF_SAMPLE_RAW
|
||||
* };
|
||||
*/
|
||||
PERF_EVENT_SAMPLE = 9,
|
||||
|
|
@ -409,6 +441,11 @@ struct perf_callchain_entry {
|
|||
__u64 ip[PERF_MAX_STACK_DEPTH];
|
||||
};
|
||||
|
||||
struct perf_raw_record {
|
||||
u32 size;
|
||||
void *data;
|
||||
};
|
||||
|
||||
struct task_struct;
|
||||
|
||||
/**
|
||||
|
|
@ -677,10 +714,13 @@ struct perf_sample_data {
|
|||
struct pt_regs *regs;
|
||||
u64 addr;
|
||||
u64 period;
|
||||
struct perf_raw_record *raw;
|
||||
};
|
||||
|
||||
extern int perf_counter_overflow(struct perf_counter *counter, int nmi,
|
||||
struct perf_sample_data *data);
|
||||
extern void perf_counter_output(struct perf_counter *counter, int nmi,
|
||||
struct perf_sample_data *data);
|
||||
|
||||
/*
|
||||
* Return 1 for a software counter, 0 for a hardware counter
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
#ifndef _PPS_H_
|
||||
#define _PPS_H_
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define PPS_VERSION "5.3.6"
|
||||
#define PPS_MAX_SOURCES 16 /* should be enough... */
|
||||
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ void rfkill_destroy(struct rfkill *rfkill);
|
|||
* should be blocked) so that drivers need not keep track of the soft
|
||||
* block state -- which they might not be able to.
|
||||
*/
|
||||
bool __must_check rfkill_set_hw_state(struct rfkill *rfkill, bool blocked);
|
||||
bool rfkill_set_hw_state(struct rfkill *rfkill, bool blocked);
|
||||
|
||||
/**
|
||||
* rfkill_set_sw_state - Set the internal rfkill software block state
|
||||
|
|
|
|||
|
|
@ -242,6 +242,8 @@ size_t sg_copy_to_buffer(struct scatterlist *sgl, unsigned int nents,
|
|||
*/
|
||||
|
||||
#define SG_MITER_ATOMIC (1 << 0) /* use kmap_atomic */
|
||||
#define SG_MITER_TO_SG (1 << 1) /* flush back to phys on unmap */
|
||||
#define SG_MITER_FROM_SG (1 << 2) /* nop */
|
||||
|
||||
struct sg_mapping_iter {
|
||||
/* the following three fields can be accessed directly */
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ extern unsigned long long time_sync_thresh;
|
|||
((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0)
|
||||
#define task_contributes_to_load(task) \
|
||||
((task->state & TASK_UNINTERRUPTIBLE) != 0 && \
|
||||
(task->flags & PF_FROZEN) == 0)
|
||||
(task->flags & PF_FREEZING) == 0)
|
||||
|
||||
#define __set_task_state(tsk, state_value) \
|
||||
do { (tsk)->state = (state_value); } while (0)
|
||||
|
|
@ -1680,6 +1680,7 @@ extern cputime_t task_gtime(struct task_struct *p);
|
|||
#define PF_MEMALLOC 0x00000800 /* Allocating memory */
|
||||
#define PF_FLUSHER 0x00001000 /* responsible for disk writeback */
|
||||
#define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */
|
||||
#define PF_FREEZING 0x00004000 /* freeze in progress. do not account to load */
|
||||
#define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */
|
||||
#define PF_FROZEN 0x00010000 /* frozen for system suspend */
|
||||
#define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */
|
||||
|
|
|
|||
|
|
@ -394,6 +394,7 @@ extern void __do_SAK(struct tty_struct *tty);
|
|||
extern void disassociate_ctty(int priv);
|
||||
extern void no_tty(void);
|
||||
extern void tty_flip_buffer_push(struct tty_struct *tty);
|
||||
extern void tty_flush_to_ldisc(struct tty_struct *tty);
|
||||
extern void tty_buffer_free_all(struct tty_struct *tty);
|
||||
extern void tty_buffer_flush(struct tty_struct *tty);
|
||||
extern void tty_buffer_init(struct tty_struct *tty);
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ struct tty_ldisc_ops {
|
|||
|
||||
struct tty_ldisc {
|
||||
struct tty_ldisc_ops *ops;
|
||||
int refcount;
|
||||
atomic_t users;
|
||||
};
|
||||
|
||||
#define TTY_LDISC_MAGIC 0x5403
|
||||
|
|
|
|||
|
|
@ -19,15 +19,6 @@ struct iovec
|
|||
__kernel_size_t iov_len; /* Must be size_t (1003.1g) */
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
struct kvec {
|
||||
void *iov_base; /* and that should *never* hold a userland pointer */
|
||||
size_t iov_len;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1)
|
||||
*/
|
||||
|
|
@ -35,6 +26,13 @@ struct kvec {
|
|||
#define UIO_FASTIOV 8
|
||||
#define UIO_MAXIOV 1024
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
struct kvec {
|
||||
void *iov_base; /* and that should *never* hold a userland pointer */
|
||||
size_t iov_len;
|
||||
};
|
||||
|
||||
/*
|
||||
* Total number of bytes covered by an iovec.
|
||||
*
|
||||
|
|
@ -53,5 +51,6 @@ static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs)
|
|||
}
|
||||
|
||||
unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -338,6 +338,7 @@ struct v4l2_pix_format {
|
|||
/* Vendor-specific formats */
|
||||
#define V4L2_PIX_FMT_WNVA v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */
|
||||
#define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */
|
||||
#define V4L2_PIX_FMT_SN9C20X_I420 v4l2_fourcc('S', '9', '2', '0') /* SN9C20x YUV 4:2:0 */
|
||||
#define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P', 'W', 'C', '1') /* pwc older webcam */
|
||||
#define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P', 'W', 'C', '2') /* pwc newer webcam */
|
||||
#define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E', '6', '2', '5') /* ET61X251 compression */
|
||||
|
|
|
|||
|
|
@ -20,8 +20,7 @@
|
|||
|
||||
#define VIRTIO_BLK_ID_BYTES (sizeof(__u16[256])) /* IDENTIFY DATA */
|
||||
|
||||
struct virtio_blk_config
|
||||
{
|
||||
struct virtio_blk_config {
|
||||
/* The capacity (in 512-byte sectors). */
|
||||
__u64 capacity;
|
||||
/* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */
|
||||
|
|
@ -50,8 +49,7 @@ struct virtio_blk_config
|
|||
#define VIRTIO_BLK_T_BARRIER 0x80000000
|
||||
|
||||
/* This is the first element of the read scatter-gather list. */
|
||||
struct virtio_blk_outhdr
|
||||
{
|
||||
struct virtio_blk_outhdr {
|
||||
/* VIRTIO_BLK_T* */
|
||||
__u32 type;
|
||||
/* io priority. */
|
||||
|
|
|
|||
|
|
@ -79,8 +79,7 @@
|
|||
* the dev->feature bits if it wants.
|
||||
*/
|
||||
typedef void vq_callback_t(struct virtqueue *);
|
||||
struct virtio_config_ops
|
||||
{
|
||||
struct virtio_config_ops {
|
||||
void (*get)(struct virtio_device *vdev, unsigned offset,
|
||||
void *buf, unsigned len);
|
||||
void (*set)(struct virtio_device *vdev, unsigned offset,
|
||||
|
|
|
|||
|
|
@ -31,8 +31,7 @@
|
|||
|
||||
#define VIRTIO_NET_S_LINK_UP 1 /* Link is up */
|
||||
|
||||
struct virtio_net_config
|
||||
{
|
||||
struct virtio_net_config {
|
||||
/* The config defining mac address (if VIRTIO_NET_F_MAC) */
|
||||
__u8 mac[6];
|
||||
/* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */
|
||||
|
|
@ -41,8 +40,7 @@ struct virtio_net_config
|
|||
|
||||
/* This is the first element of the scatter-gather list. If you don't
|
||||
* specify GSO or CSUM features, you can simply ignore the header. */
|
||||
struct virtio_net_hdr
|
||||
{
|
||||
struct virtio_net_hdr {
|
||||
#define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 // Use csum_start, csum_offset
|
||||
__u8 flags;
|
||||
#define VIRTIO_NET_HDR_GSO_NONE 0 // Not a GSO frame
|
||||
|
|
|
|||
|
|
@ -30,8 +30,7 @@
|
|||
#define VIRTIO_RING_F_INDIRECT_DESC 28
|
||||
|
||||
/* Virtio ring descriptors: 16 bytes. These can chain together via "next". */
|
||||
struct vring_desc
|
||||
{
|
||||
struct vring_desc {
|
||||
/* Address (guest-physical). */
|
||||
__u64 addr;
|
||||
/* Length. */
|
||||
|
|
@ -42,24 +41,21 @@ struct vring_desc
|
|||
__u16 next;
|
||||
};
|
||||
|
||||
struct vring_avail
|
||||
{
|
||||
struct vring_avail {
|
||||
__u16 flags;
|
||||
__u16 idx;
|
||||
__u16 ring[];
|
||||
};
|
||||
|
||||
/* u32 is used here for ids for padding reasons. */
|
||||
struct vring_used_elem
|
||||
{
|
||||
struct vring_used_elem {
|
||||
/* Index of start of used descriptor chain. */
|
||||
__u32 id;
|
||||
/* Total length of the descriptor chain which was used (written to) */
|
||||
__u32 len;
|
||||
};
|
||||
|
||||
struct vring_used
|
||||
{
|
||||
struct vring_used {
|
||||
__u16 flags;
|
||||
__u16 idx;
|
||||
struct vring_used_elem ring[];
|
||||
|
|
|
|||
|
|
@ -77,7 +77,14 @@ struct task_struct;
|
|||
#define __WAIT_BIT_KEY_INITIALIZER(word, bit) \
|
||||
{ .flags = word, .bit_nr = bit, }
|
||||
|
||||
extern void init_waitqueue_head(wait_queue_head_t *q);
|
||||
extern void __init_waitqueue_head(wait_queue_head_t *q, struct lock_class_key *);
|
||||
|
||||
#define init_waitqueue_head(q) \
|
||||
do { \
|
||||
static struct lock_class_key __key; \
|
||||
\
|
||||
__init_waitqueue_head((q), &__key); \
|
||||
} while (0)
|
||||
|
||||
#ifdef CONFIG_LOCKDEP
|
||||
# define __WAIT_QUEUE_HEAD_INIT_ONSTACK(name) \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue