Merge commit 'v2.6.32-rc5' into perf/probes
Conflicts: kernel/trace/trace_event_profile.c Merge reason: update to -rc5 and resolve conflict. Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -126,6 +126,7 @@ header-y += nfs_mount.h
|
||||
header-y += nl80211.h
|
||||
header-y += param.h
|
||||
header-y += pci_regs.h
|
||||
header-y += perf_event.h
|
||||
header-y += pfkeyv2.h
|
||||
header-y += pg.h
|
||||
header-y += phantom.h
|
||||
|
||||
@@ -53,7 +53,7 @@ struct agp_kern_info {
|
||||
int current_memory;
|
||||
bool cant_use_aperture;
|
||||
unsigned long page_mask;
|
||||
struct vm_operations_struct *vm_ops;
|
||||
const struct vm_operations_struct *vm_ops;
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* include/linux/amba/mmci.h
|
||||
*/
|
||||
#ifndef AMBA_MMCI_H
|
||||
#define AMBA_MMCI_H
|
||||
|
||||
#include <linux/mmc/host.h>
|
||||
|
||||
struct mmci_platform_data {
|
||||
unsigned int ocr_mask; /* available voltages */
|
||||
u32 (*translate_vdd)(struct device *, unsigned int);
|
||||
unsigned int (*status)(struct device *);
|
||||
int gpio_wp;
|
||||
int gpio_cd;
|
||||
unsigned long capabilities;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -136,12 +136,12 @@ enum ssp_tx_level_trig {
|
||||
|
||||
/**
|
||||
* enum SPI Clock Phase - clock phase (Motorola SPI interface only)
|
||||
* @SSP_CLK_RISING_EDGE: Receive data on rising edge
|
||||
* @SSP_CLK_FALLING_EDGE: Receive data on falling edge
|
||||
* @SSP_CLK_FIRST_EDGE: Receive data on first edge transition (actual direction depends on polarity)
|
||||
* @SSP_CLK_SECOND_EDGE: Receive data on second edge transition (actual direction depends on polarity)
|
||||
*/
|
||||
enum ssp_spi_clk_phase {
|
||||
SSP_CLK_RISING_EDGE,
|
||||
SSP_CLK_FALLING_EDGE
|
||||
SSP_CLK_FIRST_EDGE,
|
||||
SSP_CLK_SECOND_EDGE
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
+97
-32
@@ -58,25 +58,60 @@ struct dma_chan_ref {
|
||||
* array.
|
||||
* @ASYNC_TX_ACK: immediately ack the descriptor, precludes setting up a
|
||||
* dependency chain
|
||||
* @ASYNC_TX_DEP_ACK: ack the dependency descriptor. Useful for chaining.
|
||||
* @ASYNC_TX_FENCE: specify that the next operation in the dependency
|
||||
* chain uses this operation's result as an input
|
||||
*/
|
||||
enum async_tx_flags {
|
||||
ASYNC_TX_XOR_ZERO_DST = (1 << 0),
|
||||
ASYNC_TX_XOR_DROP_DST = (1 << 1),
|
||||
ASYNC_TX_ACK = (1 << 3),
|
||||
ASYNC_TX_DEP_ACK = (1 << 4),
|
||||
ASYNC_TX_ACK = (1 << 2),
|
||||
ASYNC_TX_FENCE = (1 << 3),
|
||||
};
|
||||
|
||||
/**
|
||||
* struct async_submit_ctl - async_tx submission/completion modifiers
|
||||
* @flags: submission modifiers
|
||||
* @depend_tx: parent dependency of the current operation being submitted
|
||||
* @cb_fn: callback routine to run at operation completion
|
||||
* @cb_param: parameter for the callback routine
|
||||
* @scribble: caller provided space for dma/page address conversions
|
||||
*/
|
||||
struct async_submit_ctl {
|
||||
enum async_tx_flags flags;
|
||||
struct dma_async_tx_descriptor *depend_tx;
|
||||
dma_async_tx_callback cb_fn;
|
||||
void *cb_param;
|
||||
void *scribble;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_DMA_ENGINE
|
||||
#define async_tx_issue_pending_all dma_issue_pending_all
|
||||
|
||||
/**
|
||||
* async_tx_issue_pending - send pending descriptor to the hardware channel
|
||||
* @tx: descriptor handle to retrieve hardware context
|
||||
*
|
||||
* Note: any dependent operations will have already been issued by
|
||||
* async_tx_channel_switch, or (in the case of no channel switch) will
|
||||
* be already pending on this channel.
|
||||
*/
|
||||
static inline void async_tx_issue_pending(struct dma_async_tx_descriptor *tx)
|
||||
{
|
||||
if (likely(tx)) {
|
||||
struct dma_chan *chan = tx->chan;
|
||||
struct dma_device *dma = chan->device;
|
||||
|
||||
dma->device_issue_pending(chan);
|
||||
}
|
||||
}
|
||||
#ifdef CONFIG_ARCH_HAS_ASYNC_TX_FIND_CHANNEL
|
||||
#include <asm/async_tx.h>
|
||||
#else
|
||||
#define async_tx_find_channel(dep, type, dst, dst_count, src, src_count, len) \
|
||||
__async_tx_find_channel(dep, type)
|
||||
struct dma_chan *
|
||||
__async_tx_find_channel(struct dma_async_tx_descriptor *depend_tx,
|
||||
enum dma_transaction_type tx_type);
|
||||
__async_tx_find_channel(struct async_submit_ctl *submit,
|
||||
enum dma_transaction_type tx_type);
|
||||
#endif /* CONFIG_ARCH_HAS_ASYNC_TX_FIND_CHANNEL */
|
||||
#else
|
||||
static inline void async_tx_issue_pending_all(void)
|
||||
@@ -84,10 +119,16 @@ static inline void async_tx_issue_pending_all(void)
|
||||
do { } while (0);
|
||||
}
|
||||
|
||||
static inline void async_tx_issue_pending(struct dma_async_tx_descriptor *tx)
|
||||
{
|
||||
do { } while (0);
|
||||
}
|
||||
|
||||
static inline struct dma_chan *
|
||||
async_tx_find_channel(struct dma_async_tx_descriptor *depend_tx,
|
||||
enum dma_transaction_type tx_type, struct page **dst, int dst_count,
|
||||
struct page **src, int src_count, size_t len)
|
||||
async_tx_find_channel(struct async_submit_ctl *submit,
|
||||
enum dma_transaction_type tx_type, struct page **dst,
|
||||
int dst_count, struct page **src, int src_count,
|
||||
size_t len)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -99,46 +140,70 @@ async_tx_find_channel(struct dma_async_tx_descriptor *depend_tx,
|
||||
* @cb_fn_param: parameter to pass to the callback routine
|
||||
*/
|
||||
static inline void
|
||||
async_tx_sync_epilog(dma_async_tx_callback cb_fn, void *cb_fn_param)
|
||||
async_tx_sync_epilog(struct async_submit_ctl *submit)
|
||||
{
|
||||
if (cb_fn)
|
||||
cb_fn(cb_fn_param);
|
||||
if (submit->cb_fn)
|
||||
submit->cb_fn(submit->cb_param);
|
||||
}
|
||||
|
||||
void
|
||||
async_tx_submit(struct dma_chan *chan, struct dma_async_tx_descriptor *tx,
|
||||
enum async_tx_flags flags, struct dma_async_tx_descriptor *depend_tx,
|
||||
dma_async_tx_callback cb_fn, void *cb_fn_param);
|
||||
typedef union {
|
||||
unsigned long addr;
|
||||
struct page *page;
|
||||
dma_addr_t dma;
|
||||
} addr_conv_t;
|
||||
|
||||
static inline void
|
||||
init_async_submit(struct async_submit_ctl *args, enum async_tx_flags flags,
|
||||
struct dma_async_tx_descriptor *tx,
|
||||
dma_async_tx_callback cb_fn, void *cb_param,
|
||||
addr_conv_t *scribble)
|
||||
{
|
||||
args->flags = flags;
|
||||
args->depend_tx = tx;
|
||||
args->cb_fn = cb_fn;
|
||||
args->cb_param = cb_param;
|
||||
args->scribble = scribble;
|
||||
}
|
||||
|
||||
void async_tx_submit(struct dma_chan *chan, struct dma_async_tx_descriptor *tx,
|
||||
struct async_submit_ctl *submit);
|
||||
|
||||
struct dma_async_tx_descriptor *
|
||||
async_xor(struct page *dest, struct page **src_list, unsigned int offset,
|
||||
int src_cnt, size_t len, enum async_tx_flags flags,
|
||||
struct dma_async_tx_descriptor *depend_tx,
|
||||
dma_async_tx_callback cb_fn, void *cb_fn_param);
|
||||
int src_cnt, size_t len, struct async_submit_ctl *submit);
|
||||
|
||||
struct dma_async_tx_descriptor *
|
||||
async_xor_zero_sum(struct page *dest, struct page **src_list,
|
||||
unsigned int offset, int src_cnt, size_t len,
|
||||
u32 *result, enum async_tx_flags flags,
|
||||
struct dma_async_tx_descriptor *depend_tx,
|
||||
dma_async_tx_callback cb_fn, void *cb_fn_param);
|
||||
async_xor_val(struct page *dest, struct page **src_list, unsigned int offset,
|
||||
int src_cnt, size_t len, enum sum_check_flags *result,
|
||||
struct async_submit_ctl *submit);
|
||||
|
||||
struct dma_async_tx_descriptor *
|
||||
async_memcpy(struct page *dest, struct page *src, unsigned int dest_offset,
|
||||
unsigned int src_offset, size_t len, enum async_tx_flags flags,
|
||||
struct dma_async_tx_descriptor *depend_tx,
|
||||
dma_async_tx_callback cb_fn, void *cb_fn_param);
|
||||
unsigned int src_offset, size_t len,
|
||||
struct async_submit_ctl *submit);
|
||||
|
||||
struct dma_async_tx_descriptor *
|
||||
async_memset(struct page *dest, int val, unsigned int offset,
|
||||
size_t len, enum async_tx_flags flags,
|
||||
struct dma_async_tx_descriptor *depend_tx,
|
||||
dma_async_tx_callback cb_fn, void *cb_fn_param);
|
||||
size_t len, struct async_submit_ctl *submit);
|
||||
|
||||
struct dma_async_tx_descriptor *async_trigger_callback(struct async_submit_ctl *submit);
|
||||
|
||||
struct dma_async_tx_descriptor *
|
||||
async_trigger_callback(enum async_tx_flags flags,
|
||||
struct dma_async_tx_descriptor *depend_tx,
|
||||
dma_async_tx_callback cb_fn, void *cb_fn_param);
|
||||
async_gen_syndrome(struct page **blocks, unsigned int offset, int src_cnt,
|
||||
size_t len, struct async_submit_ctl *submit);
|
||||
|
||||
struct dma_async_tx_descriptor *
|
||||
async_syndrome_val(struct page **blocks, unsigned int offset, int src_cnt,
|
||||
size_t len, enum sum_check_flags *pqres, struct page *spare,
|
||||
struct async_submit_ctl *submit);
|
||||
|
||||
struct dma_async_tx_descriptor *
|
||||
async_raid6_2data_recov(int src_num, size_t bytes, int faila, int failb,
|
||||
struct page **ptrs, struct async_submit_ctl *submit);
|
||||
|
||||
struct dma_async_tx_descriptor *
|
||||
async_raid6_datap_recov(int src_num, size_t bytes, int faila,
|
||||
struct page **ptrs, struct async_submit_ctl *submit);
|
||||
|
||||
void async_tx_quiesce(struct dma_async_tx_descriptor **tx);
|
||||
#endif /* _ASYNC_TX_H_ */
|
||||
|
||||
+6
-3
@@ -334,9 +334,12 @@ enum {
|
||||
SETFEATURES_SATA_DISABLE = 0x90, /* Disable use of SATA feature */
|
||||
|
||||
/* SETFEATURE Sector counts for SATA features */
|
||||
SATA_AN = 0x05, /* Asynchronous Notification */
|
||||
SATA_DIPM = 0x03, /* Device Initiated Power Management */
|
||||
SATA_FPDMA_AA = 0x02, /* DMA Setup FIS Auto-Activate */
|
||||
SATA_FPDMA_OFFSET = 0x01, /* FPDMA non-zero buffer offsets */
|
||||
SATA_FPDMA_AA = 0x02, /* FPDMA Setup FIS Auto-Activate */
|
||||
SATA_DIPM = 0x03, /* Device Initiated Power Management */
|
||||
SATA_FPDMA_IN_ORDER = 0x04, /* FPDMA in-order data delivery */
|
||||
SATA_AN = 0x05, /* Asynchronous Notification */
|
||||
SATA_SSP = 0x06, /* Software Settings Preservation */
|
||||
|
||||
/* feature values for SET_MAX */
|
||||
ATA_SET_MAX_ADDR = 0x00,
|
||||
|
||||
@@ -397,7 +397,7 @@ struct atmdev_ops { /* only send is required */
|
||||
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,
|
||||
void __user *optval,int optlen);
|
||||
void __user *optval,unsigned int optlen);
|
||||
int (*send)(struct atm_vcc *vcc,struct sk_buff *skb);
|
||||
int (*send_oam)(struct atm_vcc *vcc,void *cell,int flags);
|
||||
void (*phy_put)(struct atm_dev *dev,unsigned char value,
|
||||
|
||||
@@ -101,7 +101,8 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent,
|
||||
const char *fmt, ...);
|
||||
int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev);
|
||||
void bdi_unregister(struct backing_dev_info *bdi);
|
||||
void bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages);
|
||||
void bdi_start_writeback(struct backing_dev_info *bdi, struct super_block *sb,
|
||||
long nr_pages);
|
||||
int bdi_writeback_task(struct bdi_writeback *wb);
|
||||
int bdi_has_dirty_io(struct backing_dev_info *bdi);
|
||||
|
||||
|
||||
@@ -27,6 +27,11 @@
|
||||
* Any other use of the locks below is probably wrong.
|
||||
*/
|
||||
|
||||
enum backlight_update_reason {
|
||||
BACKLIGHT_UPDATE_HOTKEY,
|
||||
BACKLIGHT_UPDATE_SYSFS,
|
||||
};
|
||||
|
||||
struct backlight_device;
|
||||
struct fb_info;
|
||||
|
||||
@@ -100,6 +105,8 @@ static inline void backlight_update_status(struct backlight_device *bd)
|
||||
extern struct backlight_device *backlight_device_register(const char *name,
|
||||
struct device *dev, void *devdata, struct backlight_ops *ops);
|
||||
extern void backlight_device_unregister(struct backlight_device *bd);
|
||||
extern void backlight_force_update(struct backlight_device *bd,
|
||||
enum backlight_update_reason reason);
|
||||
|
||||
#define to_backlight_device(obj) container_of(obj, struct backlight_device, dev)
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm);
|
||||
extern int prepare_bprm_creds(struct linux_binprm *bprm);
|
||||
extern void install_exec_creds(struct linux_binprm *bprm);
|
||||
extern void do_coredump(long signr, int exit_code, struct pt_regs *regs);
|
||||
extern int set_binfmt(struct linux_binfmt *new);
|
||||
extern void set_binfmt(struct linux_binfmt *new);
|
||||
extern void free_bprm(struct linux_binprm *);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
+35
-9
@@ -82,7 +82,6 @@ enum rq_cmd_type_bits {
|
||||
enum {
|
||||
REQ_LB_OP_EJECT = 0x40, /* eject request */
|
||||
REQ_LB_OP_FLUSH = 0x41, /* flush request */
|
||||
REQ_LB_OP_DISCARD = 0x42, /* discard sectors */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -261,7 +260,6 @@ typedef void (request_fn_proc) (struct request_queue *q);
|
||||
typedef int (make_request_fn) (struct request_queue *q, struct bio *bio);
|
||||
typedef int (prep_rq_fn) (struct request_queue *, struct request *);
|
||||
typedef void (unplug_fn) (struct request_queue *);
|
||||
typedef int (prepare_discard_fn) (struct request_queue *, struct request *);
|
||||
|
||||
struct bio_vec;
|
||||
struct bvec_merge_data {
|
||||
@@ -313,6 +311,7 @@ struct queue_limits {
|
||||
unsigned int alignment_offset;
|
||||
unsigned int io_min;
|
||||
unsigned int io_opt;
|
||||
unsigned int max_discard_sectors;
|
||||
|
||||
unsigned short logical_block_size;
|
||||
unsigned short max_hw_segments;
|
||||
@@ -340,7 +339,6 @@ struct request_queue
|
||||
make_request_fn *make_request_fn;
|
||||
prep_rq_fn *prep_rq_fn;
|
||||
unplug_fn *unplug_fn;
|
||||
prepare_discard_fn *prepare_discard_fn;
|
||||
merge_bvec_fn *merge_bvec_fn;
|
||||
prepare_flush_fn *prepare_flush_fn;
|
||||
softirq_done_fn *softirq_done_fn;
|
||||
@@ -460,6 +458,7 @@ struct request_queue
|
||||
#define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */
|
||||
#define QUEUE_FLAG_IO_STAT 15 /* do IO stats */
|
||||
#define QUEUE_FLAG_CQ 16 /* hardware does queuing */
|
||||
#define QUEUE_FLAG_DISCARD 17 /* supports DISCARD */
|
||||
|
||||
#define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \
|
||||
(1 << QUEUE_FLAG_CLUSTER) | \
|
||||
@@ -591,6 +590,7 @@ enum {
|
||||
#define blk_queue_flushing(q) ((q)->ordseq)
|
||||
#define blk_queue_stackable(q) \
|
||||
test_bit(QUEUE_FLAG_STACKABLE, &(q)->queue_flags)
|
||||
#define blk_queue_discard(q) test_bit(QUEUE_FLAG_DISCARD, &(q)->queue_flags)
|
||||
|
||||
#define blk_fs_request(rq) ((rq)->cmd_type == REQ_TYPE_FS)
|
||||
#define blk_pc_request(rq) ((rq)->cmd_type == REQ_TYPE_BLOCK_PC)
|
||||
@@ -929,6 +929,8 @@ extern void blk_queue_max_hw_sectors(struct request_queue *, unsigned int);
|
||||
extern void blk_queue_max_phys_segments(struct request_queue *, unsigned short);
|
||||
extern void blk_queue_max_hw_segments(struct request_queue *, unsigned short);
|
||||
extern void blk_queue_max_segment_size(struct request_queue *, unsigned int);
|
||||
extern void blk_queue_max_discard_sectors(struct request_queue *q,
|
||||
unsigned int max_discard_sectors);
|
||||
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,
|
||||
@@ -955,7 +957,6 @@ extern void blk_queue_merge_bvec(struct request_queue *, merge_bvec_fn *);
|
||||
extern void blk_queue_dma_alignment(struct request_queue *, int);
|
||||
extern void blk_queue_update_dma_alignment(struct request_queue *, int);
|
||||
extern void blk_queue_softirq_done(struct request_queue *, softirq_done_fn *);
|
||||
extern void blk_queue_set_discard(struct request_queue *, prepare_discard_fn *);
|
||||
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);
|
||||
@@ -1080,25 +1081,37 @@ static inline unsigned int queue_physical_block_size(struct request_queue *q)
|
||||
return q->limits.physical_block_size;
|
||||
}
|
||||
|
||||
static inline int bdev_physical_block_size(struct block_device *bdev)
|
||||
{
|
||||
return queue_physical_block_size(bdev_get_queue(bdev));
|
||||
}
|
||||
|
||||
static inline unsigned int queue_io_min(struct request_queue *q)
|
||||
{
|
||||
return q->limits.io_min;
|
||||
}
|
||||
|
||||
static inline int bdev_io_min(struct block_device *bdev)
|
||||
{
|
||||
return queue_io_min(bdev_get_queue(bdev));
|
||||
}
|
||||
|
||||
static inline unsigned int queue_io_opt(struct request_queue *q)
|
||||
{
|
||||
return q->limits.io_opt;
|
||||
}
|
||||
|
||||
static inline int bdev_io_opt(struct block_device *bdev)
|
||||
{
|
||||
return queue_io_opt(bdev_get_queue(bdev));
|
||||
}
|
||||
|
||||
static inline int queue_alignment_offset(struct request_queue *q)
|
||||
{
|
||||
if (q && q->limits.misaligned)
|
||||
if (q->limits.misaligned)
|
||||
return -1;
|
||||
|
||||
if (q && q->limits.alignment_offset)
|
||||
return q->limits.alignment_offset;
|
||||
|
||||
return 0;
|
||||
return q->limits.alignment_offset;
|
||||
}
|
||||
|
||||
static inline int queue_sector_alignment_offset(struct request_queue *q,
|
||||
@@ -1108,6 +1121,19 @@ static inline int queue_sector_alignment_offset(struct request_queue *q,
|
||||
& (q->limits.io_min - 1);
|
||||
}
|
||||
|
||||
static inline int bdev_alignment_offset(struct block_device *bdev)
|
||||
{
|
||||
struct request_queue *q = bdev_get_queue(bdev);
|
||||
|
||||
if (q->limits.misaligned)
|
||||
return -1;
|
||||
|
||||
if (bdev != bdev->bd_contains)
|
||||
return bdev->bd_part->alignment_offset;
|
||||
|
||||
return q->limits.alignment_offset;
|
||||
}
|
||||
|
||||
static inline int queue_dma_alignment(struct request_queue *q)
|
||||
{
|
||||
return q ? q->dma_alignment : 511;
|
||||
|
||||
@@ -198,6 +198,7 @@ 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);
|
||||
extern int blk_trace_remove(struct request_queue *q);
|
||||
extern void blk_trace_remove_sysfs(struct device *dev);
|
||||
extern int blk_trace_init_sysfs(struct device *dev);
|
||||
|
||||
extern struct attribute_group blk_trace_attr_group;
|
||||
@@ -211,6 +212,7 @@ extern struct attribute_group blk_trace_attr_group;
|
||||
# define blk_trace_startstop(q, start) (-ENOTTY)
|
||||
# define blk_trace_remove(q) (-ENOTTY)
|
||||
# define blk_add_trace_msg(q, fmt, ...) do { } while (0)
|
||||
# define blk_trace_remove_sysfs(dev) do { } while (0)
|
||||
static inline int blk_trace_init_sysfs(struct device *dev)
|
||||
{
|
||||
return 0;
|
||||
|
||||
+46
-9
@@ -37,7 +37,7 @@ extern void cgroup_exit(struct task_struct *p, int run_callbacks);
|
||||
extern int cgroupstats_build(struct cgroupstats *stats,
|
||||
struct dentry *dentry);
|
||||
|
||||
extern struct file_operations proc_cgroup_operations;
|
||||
extern const struct file_operations proc_cgroup_operations;
|
||||
|
||||
/* Define the enumeration of all cgroup subsystems */
|
||||
#define SUBSYS(_x) _x ## _subsys_id,
|
||||
@@ -141,6 +141,38 @@ enum {
|
||||
CGRP_WAIT_ON_RMDIR,
|
||||
};
|
||||
|
||||
/* which pidlist file are we talking about? */
|
||||
enum cgroup_filetype {
|
||||
CGROUP_FILE_PROCS,
|
||||
CGROUP_FILE_TASKS,
|
||||
};
|
||||
|
||||
/*
|
||||
* A pidlist is a list of pids that virtually represents the contents of one
|
||||
* of the cgroup files ("procs" or "tasks"). We keep a list of such pidlists,
|
||||
* a pair (one each for procs, tasks) for each pid namespace that's relevant
|
||||
* to the cgroup.
|
||||
*/
|
||||
struct cgroup_pidlist {
|
||||
/*
|
||||
* used to find which pidlist is wanted. doesn't change as long as
|
||||
* this particular list stays in the list.
|
||||
*/
|
||||
struct { enum cgroup_filetype type; struct pid_namespace *ns; } key;
|
||||
/* array of xids */
|
||||
pid_t *list;
|
||||
/* how many elements the above list has */
|
||||
int length;
|
||||
/* how many files are using the current array */
|
||||
int use_count;
|
||||
/* each of these stored in a list by its cgroup */
|
||||
struct list_head links;
|
||||
/* pointer to the cgroup we belong to, for list removal purposes */
|
||||
struct cgroup *owner;
|
||||
/* protects the other fields */
|
||||
struct rw_semaphore mutex;
|
||||
};
|
||||
|
||||
struct cgroup {
|
||||
unsigned long flags; /* "unsigned long" so bitops work */
|
||||
|
||||
@@ -179,11 +211,12 @@ struct cgroup {
|
||||
*/
|
||||
struct list_head release_list;
|
||||
|
||||
/* pids_mutex protects pids_list and cached pid arrays. */
|
||||
struct rw_semaphore pids_mutex;
|
||||
|
||||
/* Linked list of struct cgroup_pids */
|
||||
struct list_head pids_list;
|
||||
/*
|
||||
* list of pidlists, up to two for each namespace (one for procs, one
|
||||
* for tasks); created on demand.
|
||||
*/
|
||||
struct list_head pidlists;
|
||||
struct mutex pidlist_mutex;
|
||||
|
||||
/* For RCU-protected deletion */
|
||||
struct rcu_head rcu_head;
|
||||
@@ -227,6 +260,9 @@ struct css_set {
|
||||
* during subsystem registration (at boot time).
|
||||
*/
|
||||
struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT];
|
||||
|
||||
/* For RCU-protected deletion */
|
||||
struct rcu_head rcu_head;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -389,10 +425,11 @@ struct cgroup_subsys {
|
||||
struct cgroup *cgrp);
|
||||
int (*pre_destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp);
|
||||
void (*destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp);
|
||||
int (*can_attach)(struct cgroup_subsys *ss,
|
||||
struct cgroup *cgrp, struct task_struct *tsk);
|
||||
int (*can_attach)(struct cgroup_subsys *ss, struct cgroup *cgrp,
|
||||
struct task_struct *tsk, bool threadgroup);
|
||||
void (*attach)(struct cgroup_subsys *ss, struct cgroup *cgrp,
|
||||
struct cgroup *old_cgrp, struct task_struct *tsk);
|
||||
struct cgroup *old_cgrp, struct task_struct *tsk,
|
||||
bool threadgroup);
|
||||
void (*fork)(struct cgroup_subsys *ss, struct task_struct *task);
|
||||
void (*exit)(struct cgroup_subsys *ss, struct task_struct *task);
|
||||
int (*populate)(struct cgroup_subsys *ss,
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
*
|
||||
* configfs Copyright (C) 2005 Oracle. All rights reserved.
|
||||
*
|
||||
* Please read Documentation/filesystems/configfs.txt before using the
|
||||
* configfs interface, ESPECIALLY the parts about reference counts and
|
||||
* Please read Documentation/filesystems/configfs/configfs.txt before using
|
||||
* the configfs interface, ESPECIALLY the parts about reference counts and
|
||||
* item destructors.
|
||||
*/
|
||||
|
||||
|
||||
@@ -132,11 +132,8 @@ struct cn_callback_id {
|
||||
};
|
||||
|
||||
struct cn_callback_data {
|
||||
void (*destruct_data) (void *);
|
||||
void *ddata;
|
||||
|
||||
void *callback_priv;
|
||||
void (*callback) (struct cn_msg *);
|
||||
struct sk_buff *skb;
|
||||
void (*callback) (struct cn_msg *, struct netlink_skb_parms *);
|
||||
|
||||
void *free;
|
||||
};
|
||||
@@ -167,11 +164,11 @@ struct cn_dev {
|
||||
struct cn_queue_dev *cbdev;
|
||||
};
|
||||
|
||||
int cn_add_callback(struct cb_id *, char *, void (*callback) (struct cn_msg *));
|
||||
int cn_add_callback(struct cb_id *, char *, void (*callback) (struct cn_msg *, struct netlink_skb_parms *));
|
||||
void cn_del_callback(struct cb_id *);
|
||||
int cn_netlink_send(struct cn_msg *, u32, gfp_t);
|
||||
|
||||
int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(struct cn_msg *));
|
||||
int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(struct cn_msg *, struct netlink_skb_parms *));
|
||||
void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id);
|
||||
|
||||
int queue_cn_work(struct cn_callback_entry *cbq, struct work_struct *work);
|
||||
|
||||
+252
-457
@@ -3,444 +3,37 @@
|
||||
|
||||
/*
|
||||
* Cpumasks provide a bitmap suitable for representing the
|
||||
* set of CPU's in a system, one bit position per CPU number.
|
||||
*
|
||||
* The new cpumask_ ops take a "struct cpumask *"; the old ones
|
||||
* use cpumask_t.
|
||||
*
|
||||
* See detailed comments in the file linux/bitmap.h describing the
|
||||
* data type on which these cpumasks are based.
|
||||
*
|
||||
* For details of cpumask_scnprintf() and cpumask_parse_user(),
|
||||
* see bitmap_scnprintf() and bitmap_parse_user() in lib/bitmap.c.
|
||||
* For details of cpulist_scnprintf() and cpulist_parse(), see
|
||||
* bitmap_scnlistprintf() and bitmap_parselist(), also in bitmap.c.
|
||||
* For details of cpu_remap(), see bitmap_bitremap in lib/bitmap.c
|
||||
* For details of cpus_remap(), see bitmap_remap in lib/bitmap.c.
|
||||
* For details of cpus_onto(), see bitmap_onto in lib/bitmap.c.
|
||||
* For details of cpus_fold(), see bitmap_fold in lib/bitmap.c.
|
||||
*
|
||||
* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
* Note: The alternate operations with the suffix "_nr" are used
|
||||
* to limit the range of the loop to nr_cpu_ids instead of
|
||||
* NR_CPUS when NR_CPUS > 64 for performance reasons.
|
||||
* If NR_CPUS is <= 64 then most assembler bitmask
|
||||
* operators execute faster with a constant range, so
|
||||
* the operator will continue to use NR_CPUS.
|
||||
*
|
||||
* Another consideration is that nr_cpu_ids is initialized
|
||||
* to NR_CPUS and isn't lowered until the possible cpus are
|
||||
* discovered (including any disabled cpus). So early uses
|
||||
* will span the entire range of NR_CPUS.
|
||||
* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
*
|
||||
* The obsolescent cpumask operations are:
|
||||
*
|
||||
* void cpu_set(cpu, mask) turn on bit 'cpu' in mask
|
||||
* void cpu_clear(cpu, mask) turn off bit 'cpu' in mask
|
||||
* void cpus_setall(mask) set all bits
|
||||
* void cpus_clear(mask) clear all bits
|
||||
* int cpu_isset(cpu, mask) true iff bit 'cpu' set in mask
|
||||
* int cpu_test_and_set(cpu, mask) test and set bit 'cpu' in mask
|
||||
*
|
||||
* int cpus_and(dst, src1, src2) dst = src1 & src2 [intersection]
|
||||
* void cpus_or(dst, src1, src2) dst = src1 | src2 [union]
|
||||
* void cpus_xor(dst, src1, src2) dst = src1 ^ src2
|
||||
* int cpus_andnot(dst, src1, src2) dst = src1 & ~src2
|
||||
* void cpus_complement(dst, src) dst = ~src
|
||||
*
|
||||
* int cpus_equal(mask1, mask2) Does mask1 == mask2?
|
||||
* int cpus_intersects(mask1, mask2) Do mask1 and mask2 intersect?
|
||||
* int cpus_subset(mask1, mask2) Is mask1 a subset of mask2?
|
||||
* int cpus_empty(mask) Is mask empty (no bits sets)?
|
||||
* int cpus_full(mask) Is mask full (all bits sets)?
|
||||
* int cpus_weight(mask) Hamming weigh - number of set bits
|
||||
* int cpus_weight_nr(mask) Same using nr_cpu_ids instead of NR_CPUS
|
||||
*
|
||||
* void cpus_shift_right(dst, src, n) Shift right
|
||||
* void cpus_shift_left(dst, src, n) Shift left
|
||||
*
|
||||
* int first_cpu(mask) Number lowest set bit, or NR_CPUS
|
||||
* int next_cpu(cpu, mask) Next cpu past 'cpu', or NR_CPUS
|
||||
* int next_cpu_nr(cpu, mask) Next cpu past 'cpu', or nr_cpu_ids
|
||||
*
|
||||
* cpumask_t cpumask_of_cpu(cpu) Return cpumask with bit 'cpu' set
|
||||
* (can be used as an lvalue)
|
||||
* CPU_MASK_ALL Initializer - all bits set
|
||||
* CPU_MASK_NONE Initializer - no bits set
|
||||
* unsigned long *cpus_addr(mask) Array of unsigned long's in mask
|
||||
*
|
||||
* CPUMASK_ALLOC kmalloc's a structure that is a composite of many cpumask_t
|
||||
* variables, and CPUMASK_PTR provides pointers to each field.
|
||||
*
|
||||
* The structure should be defined something like this:
|
||||
* struct my_cpumasks {
|
||||
* cpumask_t mask1;
|
||||
* cpumask_t mask2;
|
||||
* };
|
||||
*
|
||||
* Usage is then:
|
||||
* CPUMASK_ALLOC(my_cpumasks);
|
||||
* CPUMASK_PTR(mask1, my_cpumasks);
|
||||
* CPUMASK_PTR(mask2, my_cpumasks);
|
||||
*
|
||||
* --- DO NOT reference cpumask_t pointers until this check ---
|
||||
* if (my_cpumasks == NULL)
|
||||
* "kmalloc failed"...
|
||||
*
|
||||
* References are now pointers to the cpumask_t variables (*mask1, ...)
|
||||
*
|
||||
*if NR_CPUS > BITS_PER_LONG
|
||||
* CPUMASK_ALLOC(m) Declares and allocates struct m *m =
|
||||
* kmalloc(sizeof(*m), GFP_KERNEL)
|
||||
* CPUMASK_FREE(m) Macro for kfree(m)
|
||||
*else
|
||||
* CPUMASK_ALLOC(m) Declares struct m _m, *m = &_m
|
||||
* CPUMASK_FREE(m) Nop
|
||||
*endif
|
||||
* CPUMASK_PTR(v, m) Declares cpumask_t *v = &(m->v)
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* int cpumask_scnprintf(buf, len, mask) Format cpumask for printing
|
||||
* int cpumask_parse_user(ubuf, ulen, mask) Parse ascii string as cpumask
|
||||
* int cpulist_scnprintf(buf, len, mask) Format cpumask as list for printing
|
||||
* int cpulist_parse(buf, map) Parse ascii string as cpulist
|
||||
* int cpu_remap(oldbit, old, new) newbit = map(old, new)(oldbit)
|
||||
* void cpus_remap(dst, src, old, new) *dst = map(old, new)(src)
|
||||
* void cpus_onto(dst, orig, relmap) *dst = orig relative to relmap
|
||||
* void cpus_fold(dst, orig, sz) dst bits = orig bits mod sz
|
||||
*
|
||||
* for_each_cpu_mask(cpu, mask) for-loop cpu over mask using NR_CPUS
|
||||
* for_each_cpu_mask_nr(cpu, mask) for-loop cpu over mask using nr_cpu_ids
|
||||
*
|
||||
* int num_online_cpus() Number of online CPUs
|
||||
* int num_possible_cpus() Number of all possible CPUs
|
||||
* int num_present_cpus() Number of present CPUs
|
||||
*
|
||||
* int cpu_online(cpu) Is some cpu online?
|
||||
* int cpu_possible(cpu) Is some cpu possible?
|
||||
* int cpu_present(cpu) Is some cpu present (can schedule)?
|
||||
*
|
||||
* int any_online_cpu(mask) First online cpu in mask
|
||||
*
|
||||
* for_each_possible_cpu(cpu) for-loop cpu over cpu_possible_map
|
||||
* for_each_online_cpu(cpu) for-loop cpu over cpu_online_map
|
||||
* for_each_present_cpu(cpu) for-loop cpu over cpu_present_map
|
||||
*
|
||||
* Subtlety:
|
||||
* 1) The 'type-checked' form of cpu_isset() causes gcc (3.3.2, anyway)
|
||||
* to generate slightly worse code. Note for example the additional
|
||||
* 40 lines of assembly code compiling the "for each possible cpu"
|
||||
* loops buried in the disk_stat_read() macros calls when compiling
|
||||
* drivers/block/genhd.c (arch i386, CONFIG_SMP=y). So use a simple
|
||||
* one-line #define for cpu_isset(), instead of wrapping an inline
|
||||
* inside a macro, the way we do the other calls.
|
||||
* set of CPU's in a system, one bit position per CPU number. In general,
|
||||
* only nr_cpu_ids (<= NR_CPUS) bits are valid.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/threads.h>
|
||||
#include <linux/bitmap.h>
|
||||
|
||||
typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t;
|
||||
extern cpumask_t _unused_cpumask_arg_;
|
||||
|
||||
#ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
|
||||
#define cpu_set(cpu, dst) __cpu_set((cpu), &(dst))
|
||||
static inline void __cpu_set(int cpu, volatile cpumask_t *dstp)
|
||||
{
|
||||
set_bit(cpu, dstp->bits);
|
||||
}
|
||||
|
||||
#define cpu_clear(cpu, dst) __cpu_clear((cpu), &(dst))
|
||||
static inline void __cpu_clear(int cpu, volatile cpumask_t *dstp)
|
||||
{
|
||||
clear_bit(cpu, dstp->bits);
|
||||
}
|
||||
|
||||
#define cpus_setall(dst) __cpus_setall(&(dst), NR_CPUS)
|
||||
static inline void __cpus_setall(cpumask_t *dstp, int nbits)
|
||||
{
|
||||
bitmap_fill(dstp->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_clear(dst) __cpus_clear(&(dst), NR_CPUS)
|
||||
static inline void __cpus_clear(cpumask_t *dstp, int nbits)
|
||||
{
|
||||
bitmap_zero(dstp->bits, nbits);
|
||||
}
|
||||
|
||||
/* No static inline type checking - see Subtlety (1) above. */
|
||||
#define cpu_isset(cpu, cpumask) test_bit((cpu), (cpumask).bits)
|
||||
|
||||
#define cpu_test_and_set(cpu, cpumask) __cpu_test_and_set((cpu), &(cpumask))
|
||||
static inline int __cpu_test_and_set(int cpu, cpumask_t *addr)
|
||||
{
|
||||
return test_and_set_bit(cpu, addr->bits);
|
||||
}
|
||||
|
||||
#define cpus_and(dst, src1, src2) __cpus_and(&(dst), &(src1), &(src2), NR_CPUS)
|
||||
static inline int __cpus_and(cpumask_t *dstp, const cpumask_t *src1p,
|
||||
const cpumask_t *src2p, int nbits)
|
||||
{
|
||||
return bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_or(dst, src1, src2) __cpus_or(&(dst), &(src1), &(src2), NR_CPUS)
|
||||
static inline void __cpus_or(cpumask_t *dstp, const cpumask_t *src1p,
|
||||
const cpumask_t *src2p, int nbits)
|
||||
{
|
||||
bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_xor(dst, src1, src2) __cpus_xor(&(dst), &(src1), &(src2), NR_CPUS)
|
||||
static inline void __cpus_xor(cpumask_t *dstp, const cpumask_t *src1p,
|
||||
const cpumask_t *src2p, int nbits)
|
||||
{
|
||||
bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_andnot(dst, src1, src2) \
|
||||
__cpus_andnot(&(dst), &(src1), &(src2), NR_CPUS)
|
||||
static inline int __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p,
|
||||
const cpumask_t *src2p, int nbits)
|
||||
{
|
||||
return bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_complement(dst, src) __cpus_complement(&(dst), &(src), NR_CPUS)
|
||||
static inline void __cpus_complement(cpumask_t *dstp,
|
||||
const cpumask_t *srcp, int nbits)
|
||||
{
|
||||
bitmap_complement(dstp->bits, srcp->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_equal(src1, src2) __cpus_equal(&(src1), &(src2), NR_CPUS)
|
||||
static inline int __cpus_equal(const cpumask_t *src1p,
|
||||
const cpumask_t *src2p, int nbits)
|
||||
{
|
||||
return bitmap_equal(src1p->bits, src2p->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_intersects(src1, src2) __cpus_intersects(&(src1), &(src2), NR_CPUS)
|
||||
static inline int __cpus_intersects(const cpumask_t *src1p,
|
||||
const cpumask_t *src2p, int nbits)
|
||||
{
|
||||
return bitmap_intersects(src1p->bits, src2p->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_subset(src1, src2) __cpus_subset(&(src1), &(src2), NR_CPUS)
|
||||
static inline int __cpus_subset(const cpumask_t *src1p,
|
||||
const cpumask_t *src2p, int nbits)
|
||||
{
|
||||
return bitmap_subset(src1p->bits, src2p->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_empty(src) __cpus_empty(&(src), NR_CPUS)
|
||||
static inline int __cpus_empty(const cpumask_t *srcp, int nbits)
|
||||
{
|
||||
return bitmap_empty(srcp->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_full(cpumask) __cpus_full(&(cpumask), NR_CPUS)
|
||||
static inline int __cpus_full(const cpumask_t *srcp, int nbits)
|
||||
{
|
||||
return bitmap_full(srcp->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_weight(cpumask) __cpus_weight(&(cpumask), NR_CPUS)
|
||||
static inline int __cpus_weight(const cpumask_t *srcp, int nbits)
|
||||
{
|
||||
return bitmap_weight(srcp->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_shift_right(dst, src, n) \
|
||||
__cpus_shift_right(&(dst), &(src), (n), NR_CPUS)
|
||||
static inline void __cpus_shift_right(cpumask_t *dstp,
|
||||
const cpumask_t *srcp, int n, int nbits)
|
||||
{
|
||||
bitmap_shift_right(dstp->bits, srcp->bits, n, nbits);
|
||||
}
|
||||
|
||||
#define cpus_shift_left(dst, src, n) \
|
||||
__cpus_shift_left(&(dst), &(src), (n), NR_CPUS)
|
||||
static inline void __cpus_shift_left(cpumask_t *dstp,
|
||||
const cpumask_t *srcp, int n, int nbits)
|
||||
{
|
||||
bitmap_shift_left(dstp->bits, srcp->bits, n, nbits);
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS */
|
||||
|
||||
/**
|
||||
* to_cpumask - convert an NR_CPUS bitmap to a struct cpumask *
|
||||
* @bitmap: the bitmap
|
||||
* cpumask_bits - get the bits in a cpumask
|
||||
* @maskp: the struct cpumask *
|
||||
*
|
||||
* There are a few places where cpumask_var_t isn't appropriate and
|
||||
* static cpumasks must be used (eg. very early boot), yet we don't
|
||||
* expose the definition of 'struct cpumask'.
|
||||
*
|
||||
* This does the conversion, and can be used as a constant initializer.
|
||||
* You should only assume nr_cpu_ids bits of this mask are valid. This is
|
||||
* a macro so it's const-correct.
|
||||
*/
|
||||
#define to_cpumask(bitmap) \
|
||||
((struct cpumask *)(1 ? (bitmap) \
|
||||
: (void *)sizeof(__check_is_bitmap(bitmap))))
|
||||
|
||||
static inline int __check_is_bitmap(const unsigned long *bitmap)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Special-case data structure for "single bit set only" constant CPU masks.
|
||||
*
|
||||
* We pre-generate all the 64 (or 32) possible bit positions, with enough
|
||||
* padding to the left and the right, and return the constant pointer
|
||||
* appropriately offset.
|
||||
*/
|
||||
extern const unsigned long
|
||||
cpu_bit_bitmap[BITS_PER_LONG+1][BITS_TO_LONGS(NR_CPUS)];
|
||||
|
||||
static inline const struct cpumask *get_cpu_mask(unsigned int cpu)
|
||||
{
|
||||
const unsigned long *p = cpu_bit_bitmap[1 + cpu % BITS_PER_LONG];
|
||||
p -= cpu / BITS_PER_LONG;
|
||||
return to_cpumask(p);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
|
||||
/*
|
||||
* In cases where we take the address of the cpumask immediately,
|
||||
* gcc optimizes it out (it's a constant) and there's no huge stack
|
||||
* variable created:
|
||||
*/
|
||||
#define cpumask_of_cpu(cpu) (*get_cpu_mask(cpu))
|
||||
|
||||
|
||||
#define CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS)
|
||||
|
||||
#if NR_CPUS <= BITS_PER_LONG
|
||||
|
||||
#define CPU_MASK_ALL \
|
||||
(cpumask_t) { { \
|
||||
[BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \
|
||||
} }
|
||||
|
||||
#define CPU_MASK_ALL_PTR (&CPU_MASK_ALL)
|
||||
|
||||
#else
|
||||
|
||||
#define CPU_MASK_ALL \
|
||||
(cpumask_t) { { \
|
||||
[0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, \
|
||||
[BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \
|
||||
} }
|
||||
|
||||
/* cpu_mask_all is in init/main.c */
|
||||
extern cpumask_t cpu_mask_all;
|
||||
#define CPU_MASK_ALL_PTR (&cpu_mask_all)
|
||||
|
||||
#endif
|
||||
|
||||
#define CPU_MASK_NONE \
|
||||
(cpumask_t) { { \
|
||||
[0 ... BITS_TO_LONGS(NR_CPUS)-1] = 0UL \
|
||||
} }
|
||||
|
||||
#define CPU_MASK_CPU0 \
|
||||
(cpumask_t) { { \
|
||||
[0] = 1UL \
|
||||
} }
|
||||
|
||||
#define cpus_addr(src) ((src).bits)
|
||||
|
||||
#if NR_CPUS > BITS_PER_LONG
|
||||
#define CPUMASK_ALLOC(m) struct m *m = kmalloc(sizeof(*m), GFP_KERNEL)
|
||||
#define CPUMASK_FREE(m) kfree(m)
|
||||
#else
|
||||
#define CPUMASK_ALLOC(m) struct m _m, *m = &_m
|
||||
#define CPUMASK_FREE(m)
|
||||
#endif
|
||||
#define CPUMASK_PTR(v, m) cpumask_t *v = &(m->v)
|
||||
|
||||
#define cpu_remap(oldbit, old, new) \
|
||||
__cpu_remap((oldbit), &(old), &(new), NR_CPUS)
|
||||
static inline int __cpu_remap(int oldbit,
|
||||
const cpumask_t *oldp, const cpumask_t *newp, int nbits)
|
||||
{
|
||||
return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_remap(dst, src, old, new) \
|
||||
__cpus_remap(&(dst), &(src), &(old), &(new), NR_CPUS)
|
||||
static inline void __cpus_remap(cpumask_t *dstp, const cpumask_t *srcp,
|
||||
const cpumask_t *oldp, const cpumask_t *newp, int nbits)
|
||||
{
|
||||
bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_onto(dst, orig, relmap) \
|
||||
__cpus_onto(&(dst), &(orig), &(relmap), NR_CPUS)
|
||||
static inline void __cpus_onto(cpumask_t *dstp, const cpumask_t *origp,
|
||||
const cpumask_t *relmapp, int nbits)
|
||||
{
|
||||
bitmap_onto(dstp->bits, origp->bits, relmapp->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_fold(dst, orig, sz) \
|
||||
__cpus_fold(&(dst), &(orig), sz, NR_CPUS)
|
||||
static inline void __cpus_fold(cpumask_t *dstp, const cpumask_t *origp,
|
||||
int sz, int nbits)
|
||||
{
|
||||
bitmap_fold(dstp->bits, origp->bits, sz, nbits);
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS */
|
||||
#define cpumask_bits(maskp) ((maskp)->bits)
|
||||
|
||||
#if NR_CPUS == 1
|
||||
|
||||
#define nr_cpu_ids 1
|
||||
#ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
|
||||
#define first_cpu(src) ({ (void)(src); 0; })
|
||||
#define next_cpu(n, src) ({ (void)(src); 1; })
|
||||
#define any_online_cpu(mask) 0
|
||||
#define for_each_cpu_mask(cpu, mask) \
|
||||
for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
|
||||
#endif /* !CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS */
|
||||
#else /* NR_CPUS > 1 */
|
||||
|
||||
#else
|
||||
extern int nr_cpu_ids;
|
||||
#ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
|
||||
int __first_cpu(const cpumask_t *srcp);
|
||||
int __next_cpu(int n, const cpumask_t *srcp);
|
||||
int __any_online_cpu(const cpumask_t *mask);
|
||||
|
||||
#define first_cpu(src) __first_cpu(&(src))
|
||||
#define next_cpu(n, src) __next_cpu((n), &(src))
|
||||
#define any_online_cpu(mask) __any_online_cpu(&(mask))
|
||||
#define for_each_cpu_mask(cpu, mask) \
|
||||
for ((cpu) = -1; \
|
||||
(cpu) = next_cpu((cpu), (mask)), \
|
||||
(cpu) < NR_CPUS; )
|
||||
#endif /* !CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS */
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
|
||||
#if NR_CPUS <= 64
|
||||
|
||||
#define next_cpu_nr(n, src) next_cpu(n, src)
|
||||
#define cpus_weight_nr(cpumask) cpus_weight(cpumask)
|
||||
#define for_each_cpu_mask_nr(cpu, mask) for_each_cpu_mask(cpu, mask)
|
||||
|
||||
#else /* NR_CPUS > 64 */
|
||||
|
||||
int __next_cpu_nr(int n, const cpumask_t *srcp);
|
||||
#define next_cpu_nr(n, src) __next_cpu_nr((n), &(src))
|
||||
#define cpus_weight_nr(cpumask) __cpus_weight(&(cpumask), nr_cpu_ids)
|
||||
#define for_each_cpu_mask_nr(cpu, mask) \
|
||||
for ((cpu) = -1; \
|
||||
(cpu) = next_cpu_nr((cpu), (mask)), \
|
||||
(cpu) < nr_cpu_ids; )
|
||||
|
||||
#endif /* NR_CPUS > 64 */
|
||||
#endif /* !CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS */
|
||||
#ifdef CONFIG_CPUMASK_OFFSTACK
|
||||
/* Assuming NR_CPUS is huge, a runtime limit is more efficient. Also,
|
||||
* not all bits may be allocated. */
|
||||
#define nr_cpumask_bits nr_cpu_ids
|
||||
#else
|
||||
#define nr_cpumask_bits NR_CPUS
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The following particular system cpumasks and operations manage
|
||||
@@ -487,12 +80,6 @@ extern const struct cpumask *const cpu_online_mask;
|
||||
extern const struct cpumask *const cpu_present_mask;
|
||||
extern const struct cpumask *const cpu_active_mask;
|
||||
|
||||
/* These strip const, as traditionally they weren't const. */
|
||||
#define cpu_possible_map (*(cpumask_t *)cpu_possible_mask)
|
||||
#define cpu_online_map (*(cpumask_t *)cpu_online_mask)
|
||||
#define cpu_present_map (*(cpumask_t *)cpu_present_mask)
|
||||
#define cpu_active_map (*(cpumask_t *)cpu_active_mask)
|
||||
|
||||
#if NR_CPUS > 1
|
||||
#define num_online_cpus() cpumask_weight(cpu_online_mask)
|
||||
#define num_possible_cpus() cpumask_weight(cpu_possible_mask)
|
||||
@@ -511,35 +98,6 @@ extern const struct cpumask *const cpu_active_mask;
|
||||
#define cpu_active(cpu) ((cpu) == 0)
|
||||
#endif
|
||||
|
||||
#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu))
|
||||
|
||||
/* These are the new versions of the cpumask operators: passed by pointer.
|
||||
* The older versions will be implemented in terms of these, then deleted. */
|
||||
#define cpumask_bits(maskp) ((maskp)->bits)
|
||||
|
||||
#if NR_CPUS <= BITS_PER_LONG
|
||||
#define CPU_BITS_ALL \
|
||||
{ \
|
||||
[BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \
|
||||
}
|
||||
|
||||
#else /* NR_CPUS > BITS_PER_LONG */
|
||||
|
||||
#define CPU_BITS_ALL \
|
||||
{ \
|
||||
[0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, \
|
||||
[BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \
|
||||
}
|
||||
#endif /* NR_CPUS > BITS_PER_LONG */
|
||||
|
||||
#ifdef CONFIG_CPUMASK_OFFSTACK
|
||||
/* Assuming NR_CPUS is huge, a runtime limit is more efficient. Also,
|
||||
* not all bits may be allocated. */
|
||||
#define nr_cpumask_bits nr_cpu_ids
|
||||
#else
|
||||
#define nr_cpumask_bits NR_CPUS
|
||||
#endif
|
||||
|
||||
/* verify cpu argument to cpumask_* operators */
|
||||
static inline unsigned int cpumask_check(unsigned int cpu)
|
||||
{
|
||||
@@ -1100,4 +658,241 @@ void set_cpu_active(unsigned int cpu, bool active);
|
||||
void init_cpu_present(const struct cpumask *src);
|
||||
void init_cpu_possible(const struct cpumask *src);
|
||||
void init_cpu_online(const struct cpumask *src);
|
||||
|
||||
/**
|
||||
* to_cpumask - convert an NR_CPUS bitmap to a struct cpumask *
|
||||
* @bitmap: the bitmap
|
||||
*
|
||||
* There are a few places where cpumask_var_t isn't appropriate and
|
||||
* static cpumasks must be used (eg. very early boot), yet we don't
|
||||
* expose the definition of 'struct cpumask'.
|
||||
*
|
||||
* This does the conversion, and can be used as a constant initializer.
|
||||
*/
|
||||
#define to_cpumask(bitmap) \
|
||||
((struct cpumask *)(1 ? (bitmap) \
|
||||
: (void *)sizeof(__check_is_bitmap(bitmap))))
|
||||
|
||||
static inline int __check_is_bitmap(const unsigned long *bitmap)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Special-case data structure for "single bit set only" constant CPU masks.
|
||||
*
|
||||
* We pre-generate all the 64 (or 32) possible bit positions, with enough
|
||||
* padding to the left and the right, and return the constant pointer
|
||||
* appropriately offset.
|
||||
*/
|
||||
extern const unsigned long
|
||||
cpu_bit_bitmap[BITS_PER_LONG+1][BITS_TO_LONGS(NR_CPUS)];
|
||||
|
||||
static inline const struct cpumask *get_cpu_mask(unsigned int cpu)
|
||||
{
|
||||
const unsigned long *p = cpu_bit_bitmap[1 + cpu % BITS_PER_LONG];
|
||||
p -= cpu / BITS_PER_LONG;
|
||||
return to_cpumask(p);
|
||||
}
|
||||
|
||||
#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu))
|
||||
|
||||
#if NR_CPUS <= BITS_PER_LONG
|
||||
#define CPU_BITS_ALL \
|
||||
{ \
|
||||
[BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \
|
||||
}
|
||||
|
||||
#else /* NR_CPUS > BITS_PER_LONG */
|
||||
|
||||
#define CPU_BITS_ALL \
|
||||
{ \
|
||||
[0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, \
|
||||
[BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \
|
||||
}
|
||||
#endif /* NR_CPUS > BITS_PER_LONG */
|
||||
|
||||
/*
|
||||
*
|
||||
* From here down, all obsolete. Use cpumask_ variants!
|
||||
*
|
||||
*/
|
||||
#ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
|
||||
/* These strip const, as traditionally they weren't const. */
|
||||
#define cpu_possible_map (*(cpumask_t *)cpu_possible_mask)
|
||||
#define cpu_online_map (*(cpumask_t *)cpu_online_mask)
|
||||
#define cpu_present_map (*(cpumask_t *)cpu_present_mask)
|
||||
#define cpu_active_map (*(cpumask_t *)cpu_active_mask)
|
||||
|
||||
#define cpumask_of_cpu(cpu) (*get_cpu_mask(cpu))
|
||||
|
||||
#define CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS)
|
||||
|
||||
#if NR_CPUS <= BITS_PER_LONG
|
||||
|
||||
#define CPU_MASK_ALL \
|
||||
(cpumask_t) { { \
|
||||
[BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \
|
||||
} }
|
||||
|
||||
#else
|
||||
|
||||
#define CPU_MASK_ALL \
|
||||
(cpumask_t) { { \
|
||||
[0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, \
|
||||
[BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \
|
||||
} }
|
||||
|
||||
#endif
|
||||
|
||||
#define CPU_MASK_NONE \
|
||||
(cpumask_t) { { \
|
||||
[0 ... BITS_TO_LONGS(NR_CPUS)-1] = 0UL \
|
||||
} }
|
||||
|
||||
#define CPU_MASK_CPU0 \
|
||||
(cpumask_t) { { \
|
||||
[0] = 1UL \
|
||||
} }
|
||||
|
||||
#if NR_CPUS == 1
|
||||
#define first_cpu(src) ({ (void)(src); 0; })
|
||||
#define next_cpu(n, src) ({ (void)(src); 1; })
|
||||
#define any_online_cpu(mask) 0
|
||||
#define for_each_cpu_mask(cpu, mask) \
|
||||
for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
|
||||
#else /* NR_CPUS > 1 */
|
||||
int __first_cpu(const cpumask_t *srcp);
|
||||
int __next_cpu(int n, const cpumask_t *srcp);
|
||||
int __any_online_cpu(const cpumask_t *mask);
|
||||
|
||||
#define first_cpu(src) __first_cpu(&(src))
|
||||
#define next_cpu(n, src) __next_cpu((n), &(src))
|
||||
#define any_online_cpu(mask) __any_online_cpu(&(mask))
|
||||
#define for_each_cpu_mask(cpu, mask) \
|
||||
for ((cpu) = -1; \
|
||||
(cpu) = next_cpu((cpu), (mask)), \
|
||||
(cpu) < NR_CPUS; )
|
||||
#endif /* SMP */
|
||||
|
||||
#if NR_CPUS <= 64
|
||||
|
||||
#define for_each_cpu_mask_nr(cpu, mask) for_each_cpu_mask(cpu, mask)
|
||||
|
||||
#else /* NR_CPUS > 64 */
|
||||
|
||||
int __next_cpu_nr(int n, const cpumask_t *srcp);
|
||||
#define for_each_cpu_mask_nr(cpu, mask) \
|
||||
for ((cpu) = -1; \
|
||||
(cpu) = __next_cpu_nr((cpu), &(mask)), \
|
||||
(cpu) < nr_cpu_ids; )
|
||||
|
||||
#endif /* NR_CPUS > 64 */
|
||||
|
||||
#define cpus_addr(src) ((src).bits)
|
||||
|
||||
#define cpu_set(cpu, dst) __cpu_set((cpu), &(dst))
|
||||
static inline void __cpu_set(int cpu, volatile cpumask_t *dstp)
|
||||
{
|
||||
set_bit(cpu, dstp->bits);
|
||||
}
|
||||
|
||||
#define cpu_clear(cpu, dst) __cpu_clear((cpu), &(dst))
|
||||
static inline void __cpu_clear(int cpu, volatile cpumask_t *dstp)
|
||||
{
|
||||
clear_bit(cpu, dstp->bits);
|
||||
}
|
||||
|
||||
#define cpus_setall(dst) __cpus_setall(&(dst), NR_CPUS)
|
||||
static inline void __cpus_setall(cpumask_t *dstp, int nbits)
|
||||
{
|
||||
bitmap_fill(dstp->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_clear(dst) __cpus_clear(&(dst), NR_CPUS)
|
||||
static inline void __cpus_clear(cpumask_t *dstp, int nbits)
|
||||
{
|
||||
bitmap_zero(dstp->bits, nbits);
|
||||
}
|
||||
|
||||
/* No static inline type checking - see Subtlety (1) above. */
|
||||
#define cpu_isset(cpu, cpumask) test_bit((cpu), (cpumask).bits)
|
||||
|
||||
#define cpu_test_and_set(cpu, cpumask) __cpu_test_and_set((cpu), &(cpumask))
|
||||
static inline int __cpu_test_and_set(int cpu, cpumask_t *addr)
|
||||
{
|
||||
return test_and_set_bit(cpu, addr->bits);
|
||||
}
|
||||
|
||||
#define cpus_and(dst, src1, src2) __cpus_and(&(dst), &(src1), &(src2), NR_CPUS)
|
||||
static inline int __cpus_and(cpumask_t *dstp, const cpumask_t *src1p,
|
||||
const cpumask_t *src2p, int nbits)
|
||||
{
|
||||
return bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_or(dst, src1, src2) __cpus_or(&(dst), &(src1), &(src2), NR_CPUS)
|
||||
static inline void __cpus_or(cpumask_t *dstp, const cpumask_t *src1p,
|
||||
const cpumask_t *src2p, int nbits)
|
||||
{
|
||||
bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_xor(dst, src1, src2) __cpus_xor(&(dst), &(src1), &(src2), NR_CPUS)
|
||||
static inline void __cpus_xor(cpumask_t *dstp, const cpumask_t *src1p,
|
||||
const cpumask_t *src2p, int nbits)
|
||||
{
|
||||
bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_andnot(dst, src1, src2) \
|
||||
__cpus_andnot(&(dst), &(src1), &(src2), NR_CPUS)
|
||||
static inline int __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p,
|
||||
const cpumask_t *src2p, int nbits)
|
||||
{
|
||||
return bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_equal(src1, src2) __cpus_equal(&(src1), &(src2), NR_CPUS)
|
||||
static inline int __cpus_equal(const cpumask_t *src1p,
|
||||
const cpumask_t *src2p, int nbits)
|
||||
{
|
||||
return bitmap_equal(src1p->bits, src2p->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_intersects(src1, src2) __cpus_intersects(&(src1), &(src2), NR_CPUS)
|
||||
static inline int __cpus_intersects(const cpumask_t *src1p,
|
||||
const cpumask_t *src2p, int nbits)
|
||||
{
|
||||
return bitmap_intersects(src1p->bits, src2p->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_subset(src1, src2) __cpus_subset(&(src1), &(src2), NR_CPUS)
|
||||
static inline int __cpus_subset(const cpumask_t *src1p,
|
||||
const cpumask_t *src2p, int nbits)
|
||||
{
|
||||
return bitmap_subset(src1p->bits, src2p->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_empty(src) __cpus_empty(&(src), NR_CPUS)
|
||||
static inline int __cpus_empty(const cpumask_t *srcp, int nbits)
|
||||
{
|
||||
return bitmap_empty(srcp->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_weight(cpumask) __cpus_weight(&(cpumask), NR_CPUS)
|
||||
static inline int __cpus_weight(const cpumask_t *srcp, int nbits)
|
||||
{
|
||||
return bitmap_weight(srcp->bits, nbits);
|
||||
}
|
||||
|
||||
#define cpus_shift_left(dst, src, n) \
|
||||
__cpus_shift_left(&(dst), &(src), (n), NR_CPUS)
|
||||
static inline void __cpus_shift_left(cpumask_t *dstp,
|
||||
const cpumask_t *srcp, int n, int nbits)
|
||||
{
|
||||
bitmap_shift_left(dstp->bits, srcp->bits, n, nbits);
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS */
|
||||
|
||||
#endif /* __LINUX_CPUMASK_H */
|
||||
|
||||
+1
-17
@@ -176,23 +176,7 @@ extern void __invalid_creds(const struct cred *, const char *, unsigned);
|
||||
extern void __validate_process_creds(struct task_struct *,
|
||||
const char *, unsigned);
|
||||
|
||||
static inline bool creds_are_invalid(const struct cred *cred)
|
||||
{
|
||||
if (cred->magic != CRED_MAGIC)
|
||||
return true;
|
||||
if (atomic_read(&cred->usage) < atomic_read(&cred->subscribers))
|
||||
return true;
|
||||
#ifdef CONFIG_SECURITY_SELINUX
|
||||
if (selinux_is_enabled()) {
|
||||
if ((unsigned long) cred->security < PAGE_SIZE)
|
||||
return true;
|
||||
if ((*(u32 *)cred->security & 0xffffff00) ==
|
||||
(POISON_FREE << 24 | POISON_FREE << 16 | POISON_FREE << 8))
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
extern bool creds_are_invalid(const struct cred *cred);
|
||||
|
||||
static inline void __validate_creds(const struct cred *cred,
|
||||
const char *file, unsigned line)
|
||||
|
||||
+10
-1
@@ -20,6 +20,9 @@
|
||||
*/
|
||||
#ifndef DCA_H
|
||||
#define DCA_H
|
||||
|
||||
#include <linux/pci.h>
|
||||
|
||||
/* DCA Provider API */
|
||||
|
||||
/* DCA Notifier Interface */
|
||||
@@ -36,6 +39,12 @@ struct dca_provider {
|
||||
int id;
|
||||
};
|
||||
|
||||
struct dca_domain {
|
||||
struct list_head node;
|
||||
struct list_head dca_providers;
|
||||
struct pci_bus *pci_rc;
|
||||
};
|
||||
|
||||
struct dca_ops {
|
||||
int (*add_requester) (struct dca_provider *, struct device *);
|
||||
int (*remove_requester) (struct dca_provider *, struct device *);
|
||||
@@ -47,7 +56,7 @@ struct dca_ops {
|
||||
struct dca_provider *alloc_dca_provider(struct dca_ops *ops, int priv_size);
|
||||
void free_dca_provider(struct dca_provider *dca);
|
||||
int register_dca_provider(struct dca_provider *dca, struct device *dev);
|
||||
void unregister_dca_provider(struct dca_provider *dca);
|
||||
void unregister_dca_provider(struct dca_provider *dca, struct device *dev);
|
||||
|
||||
static inline void *dca_priv(struct dca_provider *dca)
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* debugfs is for people to use instead of /proc or /sys.
|
||||
* See Documentation/DocBook/kernel-api for more details.
|
||||
* See Documentation/DocBook/filesystems for more details.
|
||||
*/
|
||||
|
||||
#ifndef _DEBUGFS_H_
|
||||
|
||||
+161
-18
@@ -48,19 +48,20 @@ enum dma_status {
|
||||
|
||||
/**
|
||||
* enum dma_transaction_type - DMA transaction types/indexes
|
||||
*
|
||||
* Note: The DMA_ASYNC_TX capability is not to be set by drivers. It is
|
||||
* automatically set as dma devices are registered.
|
||||
*/
|
||||
enum dma_transaction_type {
|
||||
DMA_MEMCPY,
|
||||
DMA_XOR,
|
||||
DMA_PQ_XOR,
|
||||
DMA_DUAL_XOR,
|
||||
DMA_PQ_UPDATE,
|
||||
DMA_ZERO_SUM,
|
||||
DMA_PQ_ZERO_SUM,
|
||||
DMA_PQ,
|
||||
DMA_XOR_VAL,
|
||||
DMA_PQ_VAL,
|
||||
DMA_MEMSET,
|
||||
DMA_MEMCPY_CRC32C,
|
||||
DMA_INTERRUPT,
|
||||
DMA_PRIVATE,
|
||||
DMA_ASYNC_TX,
|
||||
DMA_SLAVE,
|
||||
};
|
||||
|
||||
@@ -70,18 +71,25 @@ enum dma_transaction_type {
|
||||
|
||||
/**
|
||||
* enum dma_ctrl_flags - DMA flags to augment operation preparation,
|
||||
* control completion, and communicate status.
|
||||
* control completion, and communicate status.
|
||||
* @DMA_PREP_INTERRUPT - trigger an interrupt (callback) upon completion of
|
||||
* this transaction
|
||||
* this transaction
|
||||
* @DMA_CTRL_ACK - the descriptor cannot be reused until the client
|
||||
* acknowledges receipt, i.e. has has a chance to establish any
|
||||
* dependency chains
|
||||
* acknowledges receipt, i.e. has has a chance to establish any dependency
|
||||
* chains
|
||||
* @DMA_COMPL_SKIP_SRC_UNMAP - set to disable dma-unmapping the source buffer(s)
|
||||
* @DMA_COMPL_SKIP_DEST_UNMAP - set to disable dma-unmapping the destination(s)
|
||||
* @DMA_COMPL_SRC_UNMAP_SINGLE - set to do the source dma-unmapping as single
|
||||
* (if not set, do the source dma-unmapping as page)
|
||||
* @DMA_COMPL_DEST_UNMAP_SINGLE - set to do the destination dma-unmapping as single
|
||||
* (if not set, do the destination dma-unmapping as page)
|
||||
* @DMA_PREP_PQ_DISABLE_P - prevent generation of P while generating Q
|
||||
* @DMA_PREP_PQ_DISABLE_Q - prevent generation of Q while generating P
|
||||
* @DMA_PREP_CONTINUE - indicate to a driver that it is reusing buffers as
|
||||
* sources that were the result of a previous operation, in the case of a PQ
|
||||
* operation it continues the calculation with new sources
|
||||
* @DMA_PREP_FENCE - tell the driver that subsequent operations depend
|
||||
* on the result of this operation
|
||||
*/
|
||||
enum dma_ctrl_flags {
|
||||
DMA_PREP_INTERRUPT = (1 << 0),
|
||||
@@ -90,8 +98,31 @@ enum dma_ctrl_flags {
|
||||
DMA_COMPL_SKIP_DEST_UNMAP = (1 << 3),
|
||||
DMA_COMPL_SRC_UNMAP_SINGLE = (1 << 4),
|
||||
DMA_COMPL_DEST_UNMAP_SINGLE = (1 << 5),
|
||||
DMA_PREP_PQ_DISABLE_P = (1 << 6),
|
||||
DMA_PREP_PQ_DISABLE_Q = (1 << 7),
|
||||
DMA_PREP_CONTINUE = (1 << 8),
|
||||
DMA_PREP_FENCE = (1 << 9),
|
||||
};
|
||||
|
||||
/**
|
||||
* enum sum_check_bits - bit position of pq_check_flags
|
||||
*/
|
||||
enum sum_check_bits {
|
||||
SUM_CHECK_P = 0,
|
||||
SUM_CHECK_Q = 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum pq_check_flags - result of async_{xor,pq}_zero_sum operations
|
||||
* @SUM_CHECK_P_RESULT - 1 if xor zero sum error, 0 otherwise
|
||||
* @SUM_CHECK_Q_RESULT - 1 if reed-solomon zero sum error, 0 otherwise
|
||||
*/
|
||||
enum sum_check_flags {
|
||||
SUM_CHECK_P_RESULT = (1 << SUM_CHECK_P),
|
||||
SUM_CHECK_Q_RESULT = (1 << SUM_CHECK_Q),
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* dma_cap_mask_t - capabilities bitmap modeled after cpumask_t.
|
||||
* See linux/cpumask.h
|
||||
@@ -180,8 +211,6 @@ typedef void (*dma_async_tx_callback)(void *dma_async_param);
|
||||
* @flags: flags to augment operation preparation, control completion, and
|
||||
* communicate status
|
||||
* @phys: physical address of the descriptor
|
||||
* @tx_list: driver common field for operations that require multiple
|
||||
* descriptors
|
||||
* @chan: target channel for this operation
|
||||
* @tx_submit: set the prepared descriptor(s) to be executed by the engine
|
||||
* @callback: routine to call after this operation is complete
|
||||
@@ -195,7 +224,6 @@ struct dma_async_tx_descriptor {
|
||||
dma_cookie_t cookie;
|
||||
enum dma_ctrl_flags flags; /* not a 'long' to pack with cookie */
|
||||
dma_addr_t phys;
|
||||
struct list_head tx_list;
|
||||
struct dma_chan *chan;
|
||||
dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx);
|
||||
dma_async_tx_callback callback;
|
||||
@@ -213,6 +241,11 @@ struct dma_async_tx_descriptor {
|
||||
* @global_node: list_head for global dma_device_list
|
||||
* @cap_mask: one or more dma_capability flags
|
||||
* @max_xor: maximum number of xor sources, 0 if no capability
|
||||
* @max_pq: maximum number of PQ sources and PQ-continue capability
|
||||
* @copy_align: alignment shift for memcpy operations
|
||||
* @xor_align: alignment shift for xor operations
|
||||
* @pq_align: alignment shift for pq operations
|
||||
* @fill_align: alignment shift for memset operations
|
||||
* @dev_id: unique device ID
|
||||
* @dev: struct device reference for dma mapping api
|
||||
* @device_alloc_chan_resources: allocate resources and return the
|
||||
@@ -220,7 +253,9 @@ struct dma_async_tx_descriptor {
|
||||
* @device_free_chan_resources: release DMA channel's resources
|
||||
* @device_prep_dma_memcpy: prepares a memcpy operation
|
||||
* @device_prep_dma_xor: prepares a xor operation
|
||||
* @device_prep_dma_zero_sum: prepares a zero_sum operation
|
||||
* @device_prep_dma_xor_val: prepares a xor validation operation
|
||||
* @device_prep_dma_pq: prepares a pq operation
|
||||
* @device_prep_dma_pq_val: prepares a pqzero_sum operation
|
||||
* @device_prep_dma_memset: prepares a memset operation
|
||||
* @device_prep_dma_interrupt: prepares an end of chain interrupt operation
|
||||
* @device_prep_slave_sg: prepares a slave dma operation
|
||||
@@ -235,7 +270,13 @@ struct dma_device {
|
||||
struct list_head channels;
|
||||
struct list_head global_node;
|
||||
dma_cap_mask_t cap_mask;
|
||||
int max_xor;
|
||||
unsigned short max_xor;
|
||||
unsigned short max_pq;
|
||||
u8 copy_align;
|
||||
u8 xor_align;
|
||||
u8 pq_align;
|
||||
u8 fill_align;
|
||||
#define DMA_HAS_PQ_CONTINUE (1 << 15)
|
||||
|
||||
int dev_id;
|
||||
struct device *dev;
|
||||
@@ -249,9 +290,17 @@ struct dma_device {
|
||||
struct dma_async_tx_descriptor *(*device_prep_dma_xor)(
|
||||
struct dma_chan *chan, dma_addr_t dest, dma_addr_t *src,
|
||||
unsigned int src_cnt, size_t len, unsigned long flags);
|
||||
struct dma_async_tx_descriptor *(*device_prep_dma_zero_sum)(
|
||||
struct dma_async_tx_descriptor *(*device_prep_dma_xor_val)(
|
||||
struct dma_chan *chan, dma_addr_t *src, unsigned int src_cnt,
|
||||
size_t len, u32 *result, unsigned long flags);
|
||||
size_t len, enum sum_check_flags *result, unsigned long flags);
|
||||
struct dma_async_tx_descriptor *(*device_prep_dma_pq)(
|
||||
struct dma_chan *chan, dma_addr_t *dst, dma_addr_t *src,
|
||||
unsigned int src_cnt, const unsigned char *scf,
|
||||
size_t len, unsigned long flags);
|
||||
struct dma_async_tx_descriptor *(*device_prep_dma_pq_val)(
|
||||
struct dma_chan *chan, dma_addr_t *pq, dma_addr_t *src,
|
||||
unsigned int src_cnt, const unsigned char *scf, size_t len,
|
||||
enum sum_check_flags *pqres, unsigned long flags);
|
||||
struct dma_async_tx_descriptor *(*device_prep_dma_memset)(
|
||||
struct dma_chan *chan, dma_addr_t dest, int value, size_t len,
|
||||
unsigned long flags);
|
||||
@@ -270,6 +319,96 @@ struct dma_device {
|
||||
void (*device_issue_pending)(struct dma_chan *chan);
|
||||
};
|
||||
|
||||
static inline bool dmaengine_check_align(u8 align, size_t off1, size_t off2, size_t len)
|
||||
{
|
||||
size_t mask;
|
||||
|
||||
if (!align)
|
||||
return true;
|
||||
mask = (1 << align) - 1;
|
||||
if (mask & (off1 | off2 | len))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline bool is_dma_copy_aligned(struct dma_device *dev, size_t off1,
|
||||
size_t off2, size_t len)
|
||||
{
|
||||
return dmaengine_check_align(dev->copy_align, off1, off2, len);
|
||||
}
|
||||
|
||||
static inline bool is_dma_xor_aligned(struct dma_device *dev, size_t off1,
|
||||
size_t off2, size_t len)
|
||||
{
|
||||
return dmaengine_check_align(dev->xor_align, off1, off2, len);
|
||||
}
|
||||
|
||||
static inline bool is_dma_pq_aligned(struct dma_device *dev, size_t off1,
|
||||
size_t off2, size_t len)
|
||||
{
|
||||
return dmaengine_check_align(dev->pq_align, off1, off2, len);
|
||||
}
|
||||
|
||||
static inline bool is_dma_fill_aligned(struct dma_device *dev, size_t off1,
|
||||
size_t off2, size_t len)
|
||||
{
|
||||
return dmaengine_check_align(dev->fill_align, off1, off2, len);
|
||||
}
|
||||
|
||||
static inline void
|
||||
dma_set_maxpq(struct dma_device *dma, int maxpq, int has_pq_continue)
|
||||
{
|
||||
dma->max_pq = maxpq;
|
||||
if (has_pq_continue)
|
||||
dma->max_pq |= DMA_HAS_PQ_CONTINUE;
|
||||
}
|
||||
|
||||
static inline bool dmaf_continue(enum dma_ctrl_flags flags)
|
||||
{
|
||||
return (flags & DMA_PREP_CONTINUE) == DMA_PREP_CONTINUE;
|
||||
}
|
||||
|
||||
static inline bool dmaf_p_disabled_continue(enum dma_ctrl_flags flags)
|
||||
{
|
||||
enum dma_ctrl_flags mask = DMA_PREP_CONTINUE | DMA_PREP_PQ_DISABLE_P;
|
||||
|
||||
return (flags & mask) == mask;
|
||||
}
|
||||
|
||||
static inline bool dma_dev_has_pq_continue(struct dma_device *dma)
|
||||
{
|
||||
return (dma->max_pq & DMA_HAS_PQ_CONTINUE) == DMA_HAS_PQ_CONTINUE;
|
||||
}
|
||||
|
||||
static unsigned short dma_dev_to_maxpq(struct dma_device *dma)
|
||||
{
|
||||
return dma->max_pq & ~DMA_HAS_PQ_CONTINUE;
|
||||
}
|
||||
|
||||
/* dma_maxpq - reduce maxpq in the face of continued operations
|
||||
* @dma - dma device with PQ capability
|
||||
* @flags - to check if DMA_PREP_CONTINUE and DMA_PREP_PQ_DISABLE_P are set
|
||||
*
|
||||
* When an engine does not support native continuation we need 3 extra
|
||||
* source slots to reuse P and Q with the following coefficients:
|
||||
* 1/ {00} * P : remove P from Q', but use it as a source for P'
|
||||
* 2/ {01} * Q : use Q to continue Q' calculation
|
||||
* 3/ {00} * Q : subtract Q from P' to cancel (2)
|
||||
*
|
||||
* In the case where P is disabled we only need 1 extra source:
|
||||
* 1/ {01} * Q : use Q to continue Q' calculation
|
||||
*/
|
||||
static inline int dma_maxpq(struct dma_device *dma, enum dma_ctrl_flags flags)
|
||||
{
|
||||
if (dma_dev_has_pq_continue(dma) || !dmaf_continue(flags))
|
||||
return dma_dev_to_maxpq(dma);
|
||||
else if (dmaf_p_disabled_continue(flags))
|
||||
return dma_dev_to_maxpq(dma) - 1;
|
||||
else if (dmaf_continue(flags))
|
||||
return dma_dev_to_maxpq(dma) - 3;
|
||||
BUG();
|
||||
}
|
||||
|
||||
/* --- public DMA engine API --- */
|
||||
|
||||
#ifdef CONFIG_DMA_ENGINE
|
||||
@@ -299,7 +438,11 @@ static inline void net_dmaengine_put(void)
|
||||
#ifdef CONFIG_ASYNC_TX_DMA
|
||||
#define async_dmaengine_get() dmaengine_get()
|
||||
#define async_dmaengine_put() dmaengine_put()
|
||||
#ifdef CONFIG_ASYNC_TX_DISABLE_CHANNEL_SWITCH
|
||||
#define async_dma_find_channel(type) dma_find_channel(DMA_ASYNC_TX)
|
||||
#else
|
||||
#define async_dma_find_channel(type) dma_find_channel(type)
|
||||
#endif /* CONFIG_ASYNC_TX_DISABLE_CHANNEL_SWITCH */
|
||||
#else
|
||||
static inline void async_dmaengine_get(void)
|
||||
{
|
||||
@@ -312,7 +455,7 @@ async_dma_find_channel(enum dma_transaction_type type)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
#endif /* CONFIG_ASYNC_TX_DMA */
|
||||
|
||||
dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan,
|
||||
void *dest, void *src, size_t len);
|
||||
|
||||
@@ -361,6 +361,7 @@ typedef struct elf64_shdr {
|
||||
#define NT_PPC_VSX 0x102 /* PowerPC VSX registers */
|
||||
#define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */
|
||||
#define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */
|
||||
#define NT_PRXSTATUS 0x300 /* s390 upper register halves */
|
||||
|
||||
|
||||
/* Note header in a PT_NOTE section */
|
||||
|
||||
@@ -133,6 +133,7 @@ struct dentry;
|
||||
#define FB_ACCEL_NEOMAGIC_NM2230 96 /* NeoMagic NM2230 */
|
||||
#define FB_ACCEL_NEOMAGIC_NM2360 97 /* NeoMagic NM2360 */
|
||||
#define FB_ACCEL_NEOMAGIC_NM2380 98 /* NeoMagic NM2380 */
|
||||
#define FB_ACCEL_PXA3XX 99 /* PXA3xx */
|
||||
|
||||
#define FB_ACCEL_SAVAGE4 0x80 /* S3 Savage4 */
|
||||
#define FB_ACCEL_SAVAGE3D 0x81 /* S3 Savage3D */
|
||||
|
||||
+12
-5
@@ -300,6 +300,10 @@ struct inodes_stat_t {
|
||||
#define BLKTRACESTOP _IO(0x12,117)
|
||||
#define BLKTRACETEARDOWN _IO(0x12,118)
|
||||
#define BLKDISCARD _IO(0x12,119)
|
||||
#define BLKIOMIN _IO(0x12,120)
|
||||
#define BLKIOOPT _IO(0x12,121)
|
||||
#define BLKALIGNOFF _IO(0x12,122)
|
||||
#define BLKPBSZGET _IO(0x12,123)
|
||||
|
||||
#define BMAP_IOCTL 1 /* obsolete - kept for compatibility */
|
||||
#define FIBMAP _IO(0x00,1) /* bmap access */
|
||||
@@ -595,6 +599,7 @@ struct address_space_operations {
|
||||
int (*launder_page) (struct page *);
|
||||
int (*is_partially_uptodate) (struct page *, read_descriptor_t *,
|
||||
unsigned long);
|
||||
int (*error_remove_page)(struct address_space *, struct page *);
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -640,7 +645,6 @@ struct block_device {
|
||||
struct super_block * bd_super;
|
||||
int bd_openers;
|
||||
struct mutex bd_mutex; /* open/close mutex */
|
||||
struct semaphore bd_mount_sem;
|
||||
struct list_head bd_inodes;
|
||||
void * bd_holder;
|
||||
int bd_holders;
|
||||
@@ -1315,7 +1319,7 @@ struct super_block {
|
||||
unsigned long s_blocksize;
|
||||
unsigned char s_blocksize_bits;
|
||||
unsigned char s_dirt;
|
||||
unsigned long long s_maxbytes; /* Max file size */
|
||||
loff_t s_maxbytes; /* Max file size */
|
||||
struct file_system_type *s_type;
|
||||
const struct super_operations *s_op;
|
||||
const struct dquot_operations *dq_op;
|
||||
@@ -2156,6 +2160,7 @@ extern ino_t iunique(struct super_block *, ino_t);
|
||||
extern int inode_needs_sync(struct inode *inode);
|
||||
extern void generic_delete_inode(struct inode *inode);
|
||||
extern void generic_drop_inode(struct inode *inode);
|
||||
extern int generic_detach_inode(struct inode *inode);
|
||||
|
||||
extern struct inode *ilookup5_nowait(struct super_block *sb,
|
||||
unsigned long hashval, int (*test)(struct inode *, void *),
|
||||
@@ -2334,6 +2339,7 @@ extern void get_filesystem(struct file_system_type *fs);
|
||||
extern void put_filesystem(struct file_system_type *fs);
|
||||
extern struct file_system_type *get_fs_type(const char *name);
|
||||
extern struct super_block *get_super(struct block_device *);
|
||||
extern struct super_block *get_active_super(struct block_device *bdev);
|
||||
extern struct super_block *user_get_super(dev_t);
|
||||
extern void drop_super(struct super_block *sb);
|
||||
|
||||
@@ -2381,7 +2387,8 @@ extern int buffer_migrate_page(struct address_space *,
|
||||
#define buffer_migrate_page NULL
|
||||
#endif
|
||||
|
||||
extern int inode_change_ok(struct inode *, struct iattr *);
|
||||
extern int inode_change_ok(const struct inode *, struct iattr *);
|
||||
extern int inode_newsize_ok(const struct inode *, loff_t offset);
|
||||
extern int __must_check inode_setattr(struct inode *, struct iattr *);
|
||||
|
||||
extern void file_update_time(struct file *file);
|
||||
@@ -2443,7 +2450,7 @@ static int __fops ## _open(struct inode *inode, struct file *file) \
|
||||
__simple_attr_check_format(__fmt, 0ull); \
|
||||
return simple_attr_open(inode, file, __get, __set, __fmt); \
|
||||
} \
|
||||
static struct file_operations __fops = { \
|
||||
static const struct file_operations __fops = { \
|
||||
.owner = THIS_MODULE, \
|
||||
.open = __fops ## _open, \
|
||||
.release = simple_attr_release, \
|
||||
@@ -2467,7 +2474,7 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf,
|
||||
size_t len, loff_t *ppos);
|
||||
|
||||
struct ctl_table;
|
||||
int proc_nr_files(struct ctl_table *table, int write, struct file *filp,
|
||||
int proc_nr_files(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp, loff_t *ppos);
|
||||
|
||||
int __init get_filesystem_list(char *buf);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
extern int ftrace_enabled;
|
||||
extern int
|
||||
ftrace_enable_sysctl(struct ctl_table *table, int write,
|
||||
struct file *filp, void __user *buffer, size_t *lenp,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
|
||||
typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip);
|
||||
@@ -94,7 +94,7 @@ static inline void ftrace_start(void) { }
|
||||
extern int stack_tracer_enabled;
|
||||
int
|
||||
stack_trace_sysctl(struct ctl_table *table, int write,
|
||||
struct file *file, void __user *buffer, size_t *lenp,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
#endif
|
||||
|
||||
@@ -241,7 +241,7 @@ extern void ftrace_enable_daemon(void);
|
||||
# define ftrace_set_filter(buf, len, reset) do { } while (0)
|
||||
# define ftrace_disable_daemon() do { } while (0)
|
||||
# define ftrace_enable_daemon() do { } while (0)
|
||||
static inline void ftrace_release(void *start, unsigned long size) { }
|
||||
static inline void ftrace_release_mod(struct module *mod) {}
|
||||
static inline int register_ftrace_command(struct ftrace_func_command *cmd)
|
||||
{
|
||||
return -EINVAL;
|
||||
|
||||
@@ -4,11 +4,6 @@
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
struct inode;
|
||||
struct mm_struct;
|
||||
struct task_struct;
|
||||
union ktime;
|
||||
|
||||
/* Second argument to futex syscall */
|
||||
|
||||
|
||||
@@ -38,8 +33,8 @@ union ktime;
|
||||
#define FUTEX_LOCK_PI_PRIVATE (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG)
|
||||
#define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG)
|
||||
#define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG)
|
||||
#define FUTEX_WAIT_BITSET_PRIVATE (FUTEX_WAIT_BITS | FUTEX_PRIVATE_FLAG)
|
||||
#define FUTEX_WAKE_BITSET_PRIVATE (FUTEX_WAKE_BITS | FUTEX_PRIVATE_FLAG)
|
||||
#define FUTEX_WAIT_BITSET_PRIVATE (FUTEX_WAIT_BITSET | FUTEX_PRIVATE_FLAG)
|
||||
#define FUTEX_WAKE_BITSET_PRIVATE (FUTEX_WAKE_BITSET | FUTEX_PRIVATE_FLAG)
|
||||
#define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | \
|
||||
FUTEX_PRIVATE_FLAG)
|
||||
#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | \
|
||||
@@ -129,6 +124,11 @@ struct robust_list_head {
|
||||
#define FUTEX_BITSET_MATCH_ANY 0xffffffff
|
||||
|
||||
#ifdef __KERNEL__
|
||||
struct inode;
|
||||
struct mm_struct;
|
||||
struct task_struct;
|
||||
union ktime;
|
||||
|
||||
long do_futex(u32 __user *uaddr, int op, u32 val, union ktime *timeout,
|
||||
u32 __user *uaddr2, u32 val2, u32 val3);
|
||||
|
||||
|
||||
+12
-8
@@ -3,15 +3,15 @@
|
||||
|
||||
#include <linux/fs.h>
|
||||
|
||||
struct ctl_table;
|
||||
struct user_struct;
|
||||
|
||||
#ifdef CONFIG_HUGETLB_PAGE
|
||||
|
||||
#include <linux/mempolicy.h>
|
||||
#include <linux/shm.h>
|
||||
#include <asm/tlbflush.h>
|
||||
|
||||
struct ctl_table;
|
||||
struct user_struct;
|
||||
|
||||
int PageHuge(struct page *page);
|
||||
|
||||
static inline int is_vm_hugetlb_page(struct vm_area_struct *vma)
|
||||
@@ -20,9 +20,9 @@ static inline int is_vm_hugetlb_page(struct vm_area_struct *vma)
|
||||
}
|
||||
|
||||
void reset_vma_resv_huge_pages(struct vm_area_struct *vma);
|
||||
int hugetlb_sysctl_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *);
|
||||
int hugetlb_overcommit_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *);
|
||||
int hugetlb_treat_movable_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *);
|
||||
int hugetlb_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
|
||||
int hugetlb_overcommit_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
|
||||
int hugetlb_treat_movable_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
|
||||
int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *);
|
||||
int follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *,
|
||||
struct page **, struct vm_area_struct **,
|
||||
@@ -163,7 +163,7 @@ static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb)
|
||||
}
|
||||
|
||||
extern const struct file_operations hugetlbfs_file_operations;
|
||||
extern struct vm_operations_struct hugetlb_vm_ops;
|
||||
extern const struct vm_operations_struct hugetlb_vm_ops;
|
||||
struct file *hugetlb_file_setup(const char *name, size_t size, int acct,
|
||||
struct user_struct **user, int creat_flags);
|
||||
int hugetlb_get_quota(struct address_space *mapping, long delta);
|
||||
@@ -187,7 +187,11 @@ static inline void set_file_hugepages(struct file *file)
|
||||
|
||||
#define is_file_hugepages(file) 0
|
||||
#define set_file_hugepages(file) BUG()
|
||||
#define hugetlb_file_setup(name,size,acct,user,creat) ERR_PTR(-ENOSYS)
|
||||
static inline struct file *hugetlb_file_setup(const char *name, size_t size,
|
||||
int acctflag, struct user_struct **user, int creat_flags)
|
||||
{
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
||||
#endif /* !CONFIG_HUGETLBFS */
|
||||
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Analog Devices ADP5588 I/O Expander and QWERTY Keypad Controller
|
||||
*
|
||||
* Copyright 2009 Analog Devices Inc.
|
||||
*
|
||||
* Licensed under the GPL-2 or later.
|
||||
*/
|
||||
|
||||
#ifndef _ADP5588_H
|
||||
#define _ADP5588_H
|
||||
|
||||
#define DEV_ID 0x00 /* Device ID */
|
||||
#define CFG 0x01 /* Configuration Register1 */
|
||||
#define INT_STAT 0x02 /* Interrupt Status Register */
|
||||
#define KEY_LCK_EC_STAT 0x03 /* Key Lock and Event Counter Register */
|
||||
#define Key_EVENTA 0x04 /* Key Event Register A */
|
||||
#define Key_EVENTB 0x05 /* Key Event Register B */
|
||||
#define Key_EVENTC 0x06 /* Key Event Register C */
|
||||
#define Key_EVENTD 0x07 /* Key Event Register D */
|
||||
#define Key_EVENTE 0x08 /* Key Event Register E */
|
||||
#define Key_EVENTF 0x09 /* Key Event Register F */
|
||||
#define Key_EVENTG 0x0A /* Key Event Register G */
|
||||
#define Key_EVENTH 0x0B /* Key Event Register H */
|
||||
#define Key_EVENTI 0x0C /* Key Event Register I */
|
||||
#define Key_EVENTJ 0x0D /* Key Event Register J */
|
||||
#define KP_LCK_TMR 0x0E /* Keypad Lock1 to Lock2 Timer */
|
||||
#define UNLOCK1 0x0F /* Unlock Key1 */
|
||||
#define UNLOCK2 0x10 /* Unlock Key2 */
|
||||
#define GPIO_INT_STAT1 0x11 /* GPIO Interrupt Status */
|
||||
#define GPIO_INT_STAT2 0x12 /* GPIO Interrupt Status */
|
||||
#define GPIO_INT_STAT3 0x13 /* GPIO Interrupt Status */
|
||||
#define GPIO_DAT_STAT1 0x14 /* GPIO Data Status, Read twice to clear */
|
||||
#define GPIO_DAT_STAT2 0x15 /* GPIO Data Status, Read twice to clear */
|
||||
#define GPIO_DAT_STAT3 0x16 /* GPIO Data Status, Read twice to clear */
|
||||
#define GPIO_DAT_OUT1 0x17 /* GPIO DATA OUT */
|
||||
#define GPIO_DAT_OUT2 0x18 /* GPIO DATA OUT */
|
||||
#define GPIO_DAT_OUT3 0x19 /* GPIO DATA OUT */
|
||||
#define GPIO_INT_EN1 0x1A /* GPIO Interrupt Enable */
|
||||
#define GPIO_INT_EN2 0x1B /* GPIO Interrupt Enable */
|
||||
#define GPIO_INT_EN3 0x1C /* GPIO Interrupt Enable */
|
||||
#define KP_GPIO1 0x1D /* Keypad or GPIO Selection */
|
||||
#define KP_GPIO2 0x1E /* Keypad or GPIO Selection */
|
||||
#define KP_GPIO3 0x1F /* Keypad or GPIO Selection */
|
||||
#define GPI_EM1 0x20 /* GPI Event Mode 1 */
|
||||
#define GPI_EM2 0x21 /* GPI Event Mode 2 */
|
||||
#define GPI_EM3 0x22 /* GPI Event Mode 3 */
|
||||
#define GPIO_DIR1 0x23 /* GPIO Data Direction */
|
||||
#define GPIO_DIR2 0x24 /* GPIO Data Direction */
|
||||
#define GPIO_DIR3 0x25 /* GPIO Data Direction */
|
||||
#define GPIO_INT_LVL1 0x26 /* GPIO Edge/Level Detect */
|
||||
#define GPIO_INT_LVL2 0x27 /* GPIO Edge/Level Detect */
|
||||
#define GPIO_INT_LVL3 0x28 /* GPIO Edge/Level Detect */
|
||||
#define Debounce_DIS1 0x29 /* Debounce Disable */
|
||||
#define Debounce_DIS2 0x2A /* Debounce Disable */
|
||||
#define Debounce_DIS3 0x2B /* Debounce Disable */
|
||||
#define GPIO_PULL1 0x2C /* GPIO Pull Disable */
|
||||
#define GPIO_PULL2 0x2D /* GPIO Pull Disable */
|
||||
#define GPIO_PULL3 0x2E /* GPIO Pull Disable */
|
||||
#define CMP_CFG_STAT 0x30 /* Comparator Configuration and Status Register */
|
||||
#define CMP_CONFG_SENS1 0x31 /* Sensor1 Comparator Configuration Register */
|
||||
#define CMP_CONFG_SENS2 0x32 /* L2 Light Sensor Reference Level, Output Falling for Sensor 1 */
|
||||
#define CMP1_LVL2_TRIP 0x33 /* L2 Light Sensor Hysteresis (Active when Output Rising) for Sensor 1 */
|
||||
#define CMP1_LVL2_HYS 0x34 /* L3 Light Sensor Reference Level, Output Falling For Sensor 1 */
|
||||
#define CMP1_LVL3_TRIP 0x35 /* L3 Light Sensor Hysteresis (Active when Output Rising) For Sensor 1 */
|
||||
#define CMP1_LVL3_HYS 0x36 /* Sensor 2 Comparator Configuration Register */
|
||||
#define CMP2_LVL2_TRIP 0x37 /* L2 Light Sensor Reference Level, Output Falling for Sensor 2 */
|
||||
#define CMP2_LVL2_HYS 0x38 /* L2 Light Sensor Hysteresis (Active when Output Rising) for Sensor 2 */
|
||||
#define CMP2_LVL3_TRIP 0x39 /* L3 Light Sensor Reference Level, Output Falling For Sensor 2 */
|
||||
#define CMP2_LVL3_HYS 0x3A /* L3 Light Sensor Hysteresis (Active when Output Rising) For Sensor 2 */
|
||||
#define CMP1_ADC_DAT_R1 0x3B /* Comparator 1 ADC data Register1 */
|
||||
#define CMP1_ADC_DAT_R2 0x3C /* Comparator 1 ADC data Register2 */
|
||||
#define CMP2_ADC_DAT_R1 0x3D /* Comparator 2 ADC data Register1 */
|
||||
#define CMP2_ADC_DAT_R2 0x3E /* Comparator 2 ADC data Register2 */
|
||||
|
||||
#define ADP5588_DEVICE_ID_MASK 0xF
|
||||
|
||||
/* Put one of these structures in i2c_board_info platform_data */
|
||||
|
||||
#define ADP5588_KEYMAPSIZE 80
|
||||
|
||||
struct adp5588_kpad_platform_data {
|
||||
int rows; /* Number of rows */
|
||||
int cols; /* Number of columns */
|
||||
const unsigned short *keymap; /* Pointer to keymap */
|
||||
unsigned short keymapsize; /* Keymap size */
|
||||
unsigned repeat:1; /* Enable key repeat */
|
||||
unsigned en_keylock:1; /* Enable Key Lock feature */
|
||||
unsigned short unlock_key1; /* Unlock Key 1 */
|
||||
unsigned short unlock_key2; /* Unlock Key 2 */
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* mcs5000_ts.h
|
||||
*
|
||||
* Copyright (C) 2009 Samsung Electronics Co.Ltd
|
||||
* Author: Joonyoung Shim <jy0922.shim@samsung.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_MCS5000_TS_H
|
||||
#define __LINUX_MCS5000_TS_H
|
||||
|
||||
/* platform data for the MELFAS MCS-5000 touchscreen driver */
|
||||
struct mcs5000_ts_platform_data {
|
||||
void (*cfg_pin)(void);
|
||||
int x_size;
|
||||
int y_size;
|
||||
};
|
||||
|
||||
#endif /* __LINUX_MCS5000_TS_H */
|
||||
@@ -349,11 +349,11 @@ struct twl4030_madc_platform_data {
|
||||
int irq_line;
|
||||
};
|
||||
|
||||
/* Boards have uniqe mappings of {col, row} --> keycode.
|
||||
* Column and row are 4 bits, but range only from 0..7.
|
||||
/* Boards have uniqe mappings of {row, col} --> keycode.
|
||||
* Column and row are 8 bits each, but range only from 0..7.
|
||||
* a PERSISTENT_KEY is "always on" and never reported.
|
||||
*/
|
||||
#define PERSISTENT_KEY(c, r) KEY((c), (r), KEY_RESERVED)
|
||||
#define PERSISTENT_KEY(r, c) KEY((r), (c), KEY_RESERVED)
|
||||
|
||||
struct twl4030_keypad_data {
|
||||
const struct matrix_keymap_data *keymap_data;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
* the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/*
|
||||
* Standard commands.
|
||||
@@ -30,6 +31,35 @@
|
||||
#define I8042_CMD_MUX_PFX 0x0090
|
||||
#define I8042_CMD_MUX_SEND 0x1090
|
||||
|
||||
struct serio;
|
||||
|
||||
#if defined(CONFIG_SERIO_I8042) || defined(CONFIG_SERIO_I8042_MODULE)
|
||||
|
||||
void i8042_lock_chip(void);
|
||||
void i8042_unlock_chip(void);
|
||||
int i8042_command(unsigned char *param, int command);
|
||||
bool i8042_check_port_owner(const struct serio *);
|
||||
|
||||
#else
|
||||
|
||||
void i8042_lock_chip(void)
|
||||
{
|
||||
}
|
||||
|
||||
void i8042_unlock_chip(void)
|
||||
{
|
||||
}
|
||||
|
||||
int i8042_command(unsigned char *param, int command)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
bool i8042_check_port_owner(const struct serio *serio)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -44,7 +44,7 @@ struct ip_tunnel_prl {
|
||||
__u16 flags;
|
||||
__u16 __reserved;
|
||||
__u32 datalen;
|
||||
__u32 rs_delay;
|
||||
__u32 __reserved2;
|
||||
/* data follows */
|
||||
};
|
||||
|
||||
|
||||
@@ -271,6 +271,7 @@ void __init parse_early_options(char *cmdline);
|
||||
#else /* MODULE */
|
||||
|
||||
/* Don't use these in modules, but some people do... */
|
||||
#define early_initcall(fn) module_init(fn)
|
||||
#define core_initcall(fn) module_init(fn)
|
||||
#define postcore_initcall(fn) module_init(fn)
|
||||
#define arch_initcall(fn) module_init(fn)
|
||||
|
||||
@@ -1123,7 +1123,7 @@ struct input_dev {
|
||||
struct mutex mutex;
|
||||
|
||||
unsigned int users;
|
||||
int going_away;
|
||||
bool going_away;
|
||||
|
||||
struct device dev;
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include <linux/irqreturn.h>
|
||||
#include <linux/irqnr.h>
|
||||
#include <linux/hardirq.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/irqflags.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/percpu.h>
|
||||
@@ -84,7 +83,6 @@ typedef irqreturn_t (*irq_handler_t)(int, void *);
|
||||
* struct irqaction - per interrupt action descriptor
|
||||
* @handler: interrupt handler function
|
||||
* @flags: flags (see IRQF_* above)
|
||||
* @mask: no comment as it is useless and about to be removed
|
||||
* @name: name of the device
|
||||
* @dev_id: cookie to identify the device
|
||||
* @next: pointer to the next irqaction for shared interrupts
|
||||
@@ -97,7 +95,6 @@ typedef irqreturn_t (*irq_handler_t)(int, void *);
|
||||
struct irqaction {
|
||||
irq_handler_t handler;
|
||||
unsigned long flags;
|
||||
cpumask_t mask;
|
||||
const char *name;
|
||||
void *dev_id;
|
||||
struct irqaction *next;
|
||||
@@ -612,6 +609,7 @@ extern void debug_poll_all_shared_irqs(void);
|
||||
static inline void debug_poll_all_shared_irqs(void) { }
|
||||
#endif
|
||||
|
||||
struct seq_file;
|
||||
int show_interrupts(struct seq_file *p, void *v);
|
||||
|
||||
struct irq_desc;
|
||||
|
||||
@@ -78,8 +78,6 @@ struct ipc_kludge {
|
||||
#define IPCCALL(version,op) ((version)<<16 | (op))
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <linux/kref.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
#define IPCMNI 32768 /* <= MAX_INT limit for ipc arrays (including sysctl changes) */
|
||||
|
||||
+7
-20
@@ -464,9 +464,9 @@ struct handle_s
|
||||
*/
|
||||
struct transaction_chp_stats_s {
|
||||
unsigned long cs_chp_time;
|
||||
unsigned long cs_forced_to_close;
|
||||
unsigned long cs_written;
|
||||
unsigned long cs_dropped;
|
||||
__u32 cs_forced_to_close;
|
||||
__u32 cs_written;
|
||||
__u32 cs_dropped;
|
||||
};
|
||||
|
||||
/* The transaction_t type is the guts of the journaling mechanism. It
|
||||
@@ -668,23 +668,16 @@ struct transaction_run_stats_s {
|
||||
unsigned long rs_flushing;
|
||||
unsigned long rs_logging;
|
||||
|
||||
unsigned long rs_handle_count;
|
||||
unsigned long rs_blocks;
|
||||
unsigned long rs_blocks_logged;
|
||||
__u32 rs_handle_count;
|
||||
__u32 rs_blocks;
|
||||
__u32 rs_blocks_logged;
|
||||
};
|
||||
|
||||
struct transaction_stats_s {
|
||||
int ts_type;
|
||||
unsigned long ts_tid;
|
||||
union {
|
||||
struct transaction_run_stats_s run;
|
||||
struct transaction_chp_stats_s chp;
|
||||
} u;
|
||||
struct transaction_run_stats_s run;
|
||||
};
|
||||
|
||||
#define JBD2_STATS_RUN 1
|
||||
#define JBD2_STATS_CHECKPOINT 2
|
||||
|
||||
static inline unsigned long
|
||||
jbd2_time_diff(unsigned long start, unsigned long end)
|
||||
{
|
||||
@@ -988,12 +981,6 @@ struct journal_s
|
||||
/*
|
||||
* Journal statistics
|
||||
*/
|
||||
struct transaction_stats_s *j_history;
|
||||
int j_history_max;
|
||||
int j_history_cur;
|
||||
/*
|
||||
* Protect the transactions statistics history
|
||||
*/
|
||||
spinlock_t j_history_lock;
|
||||
struct proc_dir_entry *j_proc_entry;
|
||||
struct transaction_stats_s j_stats;
|
||||
|
||||
@@ -659,6 +659,12 @@ extern int do_sysinfo(struct sysinfo *info);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#ifndef __EXPORTED_HEADERS__
|
||||
#ifndef __KERNEL__
|
||||
#warning Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* __EXPORTED_HEADERS__ */
|
||||
|
||||
#define SI_LOAD_SHIFT 16
|
||||
struct sysinfo {
|
||||
long uptime; /* Seconds since boot */
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#define _KREF_H_
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <asm/atomic.h>
|
||||
|
||||
struct kref {
|
||||
atomic_t refcount;
|
||||
|
||||
@@ -418,6 +418,17 @@ enum {
|
||||
ATA_TIMING_ACTIVE | ATA_TIMING_RECOVER |
|
||||
ATA_TIMING_DMACK_HOLD | ATA_TIMING_CYCLE |
|
||||
ATA_TIMING_UDMA,
|
||||
|
||||
/* ACPI constants */
|
||||
ATA_ACPI_FILTER_SETXFER = 1 << 0,
|
||||
ATA_ACPI_FILTER_LOCK = 1 << 1,
|
||||
ATA_ACPI_FILTER_DIPM = 1 << 2,
|
||||
ATA_ACPI_FILTER_FPDMA_OFFSET = 1 << 3, /* FPDMA non-zero offset */
|
||||
ATA_ACPI_FILTER_FPDMA_AA = 1 << 4, /* FPDMA auto activate */
|
||||
|
||||
ATA_ACPI_FILTER_DEFAULT = ATA_ACPI_FILTER_SETXFER |
|
||||
ATA_ACPI_FILTER_LOCK |
|
||||
ATA_ACPI_FILTER_DIPM,
|
||||
};
|
||||
|
||||
enum ata_xfer_mask {
|
||||
@@ -587,6 +598,7 @@ struct ata_device {
|
||||
#ifdef CONFIG_ATA_ACPI
|
||||
acpi_handle acpi_handle;
|
||||
union acpi_object *gtf_cache;
|
||||
unsigned int gtf_filter;
|
||||
#endif
|
||||
/* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */
|
||||
u64 n_sectors; /* size of device, if ATA */
|
||||
|
||||
@@ -44,6 +44,8 @@ struct ps2dev {
|
||||
void ps2_init(struct ps2dev *ps2dev, struct serio *serio);
|
||||
int ps2_sendbyte(struct ps2dev *ps2dev, unsigned char byte, int timeout);
|
||||
void ps2_drain(struct ps2dev *ps2dev, int maxbytes, int timeout);
|
||||
void ps2_begin_command(struct ps2dev *ps2dev);
|
||||
void ps2_end_command(struct ps2dev *ps2dev);
|
||||
int __ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command);
|
||||
int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command);
|
||||
int ps2_handle_ack(struct ps2dev *ps2dev, unsigned char data);
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
|
||||
#ifndef LINKER_SCRIPT
|
||||
#define ALIGN __ALIGN
|
||||
#define ALIGN_STR __ALIGN_STR
|
||||
|
||||
@@ -66,6 +67,7 @@
|
||||
ALIGN; \
|
||||
name:
|
||||
#endif
|
||||
#endif /* LINKER_SCRIPT */
|
||||
|
||||
#ifndef WEAK
|
||||
#define WEAK(name) \
|
||||
|
||||
@@ -118,6 +118,9 @@ static inline bool mem_cgroup_disabled(void)
|
||||
|
||||
extern bool mem_cgroup_oom_called(struct task_struct *task);
|
||||
void mem_cgroup_update_mapped_file_stat(struct page *page, int val);
|
||||
unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order,
|
||||
gfp_t gfp_mask, int nid,
|
||||
int zid);
|
||||
#else /* CONFIG_CGROUP_MEM_RES_CTLR */
|
||||
struct mem_cgroup;
|
||||
|
||||
@@ -276,6 +279,13 @@ static inline void mem_cgroup_update_mapped_file_stat(struct page *page,
|
||||
{
|
||||
}
|
||||
|
||||
static inline
|
||||
unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order,
|
||||
gfp_t gfp_mask, int nid, int zid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_CGROUP_MEM_CONT */
|
||||
|
||||
#endif /* _LINUX_MEMCONTROL_H */
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* include/linux/mfd/wm831x/status.h -- Status LEDs for WM831x
|
||||
*
|
||||
* Copyright 2009 Wolfson Microelectronics PLC.
|
||||
*
|
||||
* Author: Mark Brown <broonie@opensource.wolfsonmicro.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 __MFD_WM831X_STATUS_H__
|
||||
#define __MFD_WM831X_STATUS_H__
|
||||
|
||||
#define WM831X_LED_SRC_MASK 0xC000 /* LED_SRC - [15:14] */
|
||||
#define WM831X_LED_SRC_SHIFT 14 /* LED_SRC - [15:14] */
|
||||
#define WM831X_LED_SRC_WIDTH 2 /* LED_SRC - [15:14] */
|
||||
#define WM831X_LED_MODE_MASK 0x0300 /* LED_MODE - [9:8] */
|
||||
#define WM831X_LED_MODE_SHIFT 8 /* LED_MODE - [9:8] */
|
||||
#define WM831X_LED_MODE_WIDTH 2 /* LED_MODE - [9:8] */
|
||||
#define WM831X_LED_SEQ_LEN_MASK 0x0030 /* LED_SEQ_LEN - [5:4] */
|
||||
#define WM831X_LED_SEQ_LEN_SHIFT 4 /* LED_SEQ_LEN - [5:4] */
|
||||
#define WM831X_LED_SEQ_LEN_WIDTH 2 /* LED_SEQ_LEN - [5:4] */
|
||||
#define WM831X_LED_DUR_MASK 0x000C /* LED_DUR - [3:2] */
|
||||
#define WM831X_LED_DUR_SHIFT 2 /* LED_DUR - [3:2] */
|
||||
#define WM831X_LED_DUR_WIDTH 2 /* LED_DUR - [3:2] */
|
||||
#define WM831X_LED_DUTY_CYC_MASK 0x0003 /* LED_DUTY_CYC - [1:0] */
|
||||
#define WM831X_LED_DUTY_CYC_SHIFT 0 /* LED_DUTY_CYC - [1:0] */
|
||||
#define WM831X_LED_DUTY_CYC_WIDTH 2 /* LED_DUTY_CYC - [1:0] */
|
||||
|
||||
#endif
|
||||
+19
-5
@@ -288,7 +288,7 @@ static inline int is_vmalloc_addr(const void *x)
|
||||
#ifdef CONFIG_MMU
|
||||
extern int is_vmalloc_or_module_addr(const void *x);
|
||||
#else
|
||||
static int is_vmalloc_or_module_addr(const void *x)
|
||||
static inline int is_vmalloc_or_module_addr(const void *x)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -695,11 +695,12 @@ static inline int page_mapped(struct page *page)
|
||||
#define VM_FAULT_SIGBUS 0x0002
|
||||
#define VM_FAULT_MAJOR 0x0004
|
||||
#define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */
|
||||
#define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned page */
|
||||
|
||||
#define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */
|
||||
#define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */
|
||||
|
||||
#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS)
|
||||
#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON)
|
||||
|
||||
/*
|
||||
* Can be called by the pagefault handler when it gets a VM_FAULT_OOM.
|
||||
@@ -791,8 +792,14 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping,
|
||||
unmap_mapping_range(mapping, holebegin, holelen, 0);
|
||||
}
|
||||
|
||||
extern int vmtruncate(struct inode * inode, loff_t offset);
|
||||
extern int vmtruncate_range(struct inode * inode, loff_t offset, loff_t end);
|
||||
extern void truncate_pagecache(struct inode *inode, loff_t old, loff_t new);
|
||||
extern int vmtruncate(struct inode *inode, loff_t offset);
|
||||
extern int vmtruncate_range(struct inode *inode, loff_t offset, loff_t end);
|
||||
|
||||
int truncate_inode_page(struct address_space *mapping, struct page *page);
|
||||
int generic_error_remove_page(struct address_space *mapping, struct page *page);
|
||||
|
||||
int invalidate_inode_page(struct page *page);
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
|
||||
@@ -1279,7 +1286,7 @@ int in_gate_area_no_task(unsigned long addr);
|
||||
#define in_gate_area(task, addr) ({(void)task; in_gate_area_no_task(addr);})
|
||||
#endif /* __HAVE_ARCH_GATE_AREA */
|
||||
|
||||
int drop_caches_sysctl_handler(struct ctl_table *, int, struct file *,
|
||||
int drop_caches_sysctl_handler(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask,
|
||||
unsigned long lru_pages);
|
||||
@@ -1308,5 +1315,12 @@ void vmemmap_populate_print_last(void);
|
||||
extern int account_locked_memory(struct mm_struct *mm, struct rlimit *rlim,
|
||||
size_t size);
|
||||
extern void refund_locked_memory(struct mm_struct *mm, size_t size);
|
||||
|
||||
extern void memory_failure(unsigned long pfn, int trapno);
|
||||
extern int __memory_failure(unsigned long pfn, int trapno, int ref);
|
||||
extern int sysctl_memory_failure_early_kill;
|
||||
extern int sysctl_memory_failure_recovery;
|
||||
extern atomic_long_t mce_bad_pages;
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _LINUX_MM_H */
|
||||
|
||||
@@ -171,7 +171,7 @@ struct vm_area_struct {
|
||||
struct anon_vma *anon_vma; /* Serialized by page_table_lock */
|
||||
|
||||
/* Function pointers to deal with this struct. */
|
||||
struct vm_operations_struct * vm_ops;
|
||||
const struct vm_operations_struct *vm_ops;
|
||||
|
||||
/* Information about our backing store: */
|
||||
unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE
|
||||
@@ -240,6 +240,8 @@ struct mm_struct {
|
||||
|
||||
unsigned long saved_auxv[AT_VECTOR_SIZE]; /* for /proc/PID/auxv */
|
||||
|
||||
struct linux_binfmt *binfmt;
|
||||
|
||||
cpumask_t cpu_vm_mask;
|
||||
|
||||
/* Architecture-specific MM context */
|
||||
@@ -259,11 +261,10 @@ struct mm_struct {
|
||||
unsigned long flags; /* Must use atomic bitops to access the bits */
|
||||
|
||||
struct core_state *core_state; /* coredumping support */
|
||||
|
||||
/* aio bits */
|
||||
#ifdef CONFIG_AIO
|
||||
spinlock_t ioctx_lock;
|
||||
struct hlist_head ioctx_list;
|
||||
|
||||
#endif
|
||||
#ifdef CONFIG_MM_OWNER
|
||||
/*
|
||||
* "owner" points to a task that is regarded as the canonical
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#define LINUX_MMC_HOST_H
|
||||
|
||||
#include <linux/leds.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
#include <linux/mmc/core.h>
|
||||
|
||||
|
||||
@@ -755,21 +755,20 @@ static inline int is_dma(struct zone *zone)
|
||||
|
||||
/* These two functions are used to setup the per zone pages min values */
|
||||
struct ctl_table;
|
||||
struct file;
|
||||
int min_free_kbytes_sysctl_handler(struct ctl_table *, int, struct file *,
|
||||
int min_free_kbytes_sysctl_handler(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1];
|
||||
int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, struct file *,
|
||||
int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int, struct file *,
|
||||
int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int,
|
||||
struct file *, void __user *, size_t *, loff_t *);
|
||||
void __user *, size_t *, loff_t *);
|
||||
int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int,
|
||||
struct file *, void __user *, size_t *, loff_t *);
|
||||
void __user *, size_t *, loff_t *);
|
||||
|
||||
extern int numa_zonelist_order_handler(struct ctl_table *, int,
|
||||
struct file *, void __user *, size_t *, loff_t *);
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern char numa_zonelist_order[];
|
||||
#define NUMA_ZONELIST_ORDER_LEN 16 /* string buffer size */
|
||||
|
||||
|
||||
+12
-5
@@ -128,7 +128,10 @@ extern struct module __this_module;
|
||||
*/
|
||||
#define MODULE_LICENSE(_license) MODULE_INFO(license, _license)
|
||||
|
||||
/* Author, ideally of form NAME[, NAME]*[ and NAME] */
|
||||
/*
|
||||
* Author(s), use "Name <email>" or just "Name", for multiple
|
||||
* authors use multiple MODULE_AUTHOR() statements/lines.
|
||||
*/
|
||||
#define MODULE_AUTHOR(_author) MODULE_INFO(author, _author)
|
||||
|
||||
/* What your module does. */
|
||||
@@ -308,10 +311,14 @@ struct module
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KALLSYMS
|
||||
/* We keep the symbol and string tables for kallsyms. */
|
||||
Elf_Sym *symtab;
|
||||
unsigned int num_symtab;
|
||||
char *strtab;
|
||||
/*
|
||||
* We keep the symbol and string tables for kallsyms.
|
||||
* The core_* fields below are temporary, loader-only (they
|
||||
* could really be discarded after module init).
|
||||
*/
|
||||
Elf_Sym *symtab, *core_symtab;
|
||||
unsigned int num_symtab, core_num_syms;
|
||||
char *strtab, *core_strtab;
|
||||
|
||||
/* Section attributes */
|
||||
struct module_sect_attrs *sect_attrs;
|
||||
|
||||
@@ -145,14 +145,14 @@ static inline int ip_mroute_opt(int opt)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IP_MROUTE
|
||||
extern int ip_mroute_setsockopt(struct sock *, int, char __user *, int);
|
||||
extern int ip_mroute_setsockopt(struct sock *, int, char __user *, unsigned int);
|
||||
extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *);
|
||||
extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg);
|
||||
extern int ip_mr_init(void);
|
||||
#else
|
||||
static inline
|
||||
int ip_mroute_setsockopt(struct sock *sock,
|
||||
int optname, char __user *optval, int optlen)
|
||||
int optname, char __user *optval, unsigned int optlen)
|
||||
{
|
||||
return -ENOPROTOOPT;
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ static inline int ip6_mroute_opt(int opt)
|
||||
struct sock;
|
||||
|
||||
#ifdef CONFIG_IPV6_MROUTE
|
||||
extern int ip6_mroute_setsockopt(struct sock *, int, char __user *, int);
|
||||
extern int ip6_mroute_setsockopt(struct sock *, int, char __user *, unsigned int);
|
||||
extern int ip6_mroute_getsockopt(struct sock *, int, char __user *, int __user *);
|
||||
extern int ip6_mr_input(struct sk_buff *skb);
|
||||
extern int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg);
|
||||
@@ -143,7 +143,7 @@ extern void ip6_mr_cleanup(void);
|
||||
#else
|
||||
static inline
|
||||
int ip6_mroute_setsockopt(struct sock *sock,
|
||||
int optname, char __user *optval, int optlen)
|
||||
int optname, char __user *optval, unsigned int optlen)
|
||||
{
|
||||
return -ENOPROTOOPT;
|
||||
}
|
||||
|
||||
+4
-4
@@ -178,11 +178,11 @@ struct proto_ops {
|
||||
int (*listen) (struct socket *sock, int len);
|
||||
int (*shutdown) (struct socket *sock, int flags);
|
||||
int (*setsockopt)(struct socket *sock, int level,
|
||||
int optname, char __user *optval, int optlen);
|
||||
int optname, char __user *optval, unsigned int optlen);
|
||||
int (*getsockopt)(struct socket *sock, int level,
|
||||
int optname, char __user *optval, int __user *optlen);
|
||||
int (*compat_setsockopt)(struct socket *sock, int level,
|
||||
int optname, char __user *optval, int optlen);
|
||||
int optname, char __user *optval, unsigned int optlen);
|
||||
int (*compat_getsockopt)(struct socket *sock, int level,
|
||||
int optname, char __user *optval, int __user *optlen);
|
||||
int (*sendmsg) (struct kiocb *iocb, struct socket *sock,
|
||||
@@ -256,7 +256,7 @@ extern int kernel_getpeername(struct socket *sock, struct sockaddr *addr,
|
||||
extern int kernel_getsockopt(struct socket *sock, int level, int optname,
|
||||
char *optval, int *optlen);
|
||||
extern int kernel_setsockopt(struct socket *sock, int level, int optname,
|
||||
char *optval, int optlen);
|
||||
char *optval, unsigned int optlen);
|
||||
extern int kernel_sendpage(struct socket *sock, struct page *page, int offset,
|
||||
size_t size, int flags);
|
||||
extern int kernel_sock_ioctl(struct socket *sock, int cmd, unsigned long arg);
|
||||
@@ -313,7 +313,7 @@ SOCKCALL_WRAP(name, compat_ioctl, (struct socket *sock, unsigned int cmd, \
|
||||
SOCKCALL_WRAP(name, listen, (struct socket *sock, int len), (sock, len)) \
|
||||
SOCKCALL_WRAP(name, shutdown, (struct socket *sock, int flags), (sock, flags)) \
|
||||
SOCKCALL_WRAP(name, setsockopt, (struct socket *sock, int level, int optname, \
|
||||
char __user *optval, int optlen), (sock, level, optname, optval, optlen)) \
|
||||
char __user *optval, unsigned int optlen), (sock, level, optname, optval, optlen)) \
|
||||
SOCKCALL_WRAP(name, getsockopt, (struct socket *sock, int level, int optname, \
|
||||
char __user *optval, int __user *optlen), (sock, level, optname, optval, optlen)) \
|
||||
SOCKCALL_WRAP(name, sendmsg, (struct kiocb *iocb, struct socket *sock, struct msghdr *m, size_t len), \
|
||||
|
||||
@@ -557,7 +557,7 @@ struct netdev_queue {
|
||||
* Callback uses when the transmitter has not made any progress
|
||||
* for dev->watchdog ticks.
|
||||
*
|
||||
* struct net_device_stats* (*get_stats)(struct net_device *dev);
|
||||
* struct net_device_stats* (*ndo_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.
|
||||
|
||||
@@ -221,12 +221,12 @@ __ret;})
|
||||
|
||||
/* Call setsockopt() */
|
||||
int nf_setsockopt(struct sock *sk, u_int8_t pf, int optval, char __user *opt,
|
||||
int len);
|
||||
unsigned int len);
|
||||
int nf_getsockopt(struct sock *sk, u_int8_t pf, int optval, char __user *opt,
|
||||
int *len);
|
||||
|
||||
int compat_nf_setsockopt(struct sock *sk, u_int8_t pf, int optval,
|
||||
char __user *opt, int len);
|
||||
char __user *opt, unsigned int len);
|
||||
int compat_nf_getsockopt(struct sock *sk, u_int8_t pf, int optval,
|
||||
char __user *opt, int *len);
|
||||
|
||||
|
||||
@@ -187,6 +187,7 @@ extern struct sock *netlink_kernel_create(struct net *net,
|
||||
extern void netlink_kernel_release(struct sock *sk);
|
||||
extern int __netlink_change_ngroups(struct sock *sk, unsigned int groups);
|
||||
extern int netlink_change_ngroups(struct sock *sk, unsigned int groups);
|
||||
extern void __netlink_clear_multicast_users(struct sock *sk, unsigned int group);
|
||||
extern void netlink_clear_multicast_users(struct sock *sk, unsigned int group);
|
||||
extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err);
|
||||
extern int netlink_has_listeners(struct sock *sk, unsigned int group);
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <linux/in.h>
|
||||
#include <linux/kref.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/pagemap.h>
|
||||
#include <linux/rbtree.h>
|
||||
|
||||
@@ -51,6 +51,9 @@
|
||||
* PG_buddy is set to indicate that the page is free and in the buddy system
|
||||
* (see mm/page_alloc.c).
|
||||
*
|
||||
* PG_hwpoison indicates that a page got corrupted in hardware and contains
|
||||
* data with incorrect ECC bits that triggered a machine check. Accessing is
|
||||
* not safe since it may cause another machine check. Don't touch!
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -101,6 +104,9 @@ enum pageflags {
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_USES_PG_UNCACHED
|
||||
PG_uncached, /* Page has been mapped as uncached */
|
||||
#endif
|
||||
#ifdef CONFIG_MEMORY_FAILURE
|
||||
PG_hwpoison, /* hardware poisoned page. Don't touch */
|
||||
#endif
|
||||
__NR_PAGEFLAGS,
|
||||
|
||||
@@ -269,6 +275,15 @@ PAGEFLAG(Uncached, uncached)
|
||||
PAGEFLAG_FALSE(Uncached)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MEMORY_FAILURE
|
||||
PAGEFLAG(HWPoison, hwpoison)
|
||||
TESTSETFLAG(HWPoison, hwpoison)
|
||||
#define __PG_HWPOISON (1UL << PG_hwpoison)
|
||||
#else
|
||||
PAGEFLAG_FALSE(HWPoison)
|
||||
#define __PG_HWPOISON 0
|
||||
#endif
|
||||
|
||||
static inline int PageUptodate(struct page *page)
|
||||
{
|
||||
int ret = test_bit(PG_uptodate, &(page)->flags);
|
||||
@@ -393,7 +408,7 @@ static inline void __ClearPageTail(struct page *page)
|
||||
1 << PG_private | 1 << PG_private_2 | \
|
||||
1 << PG_buddy | 1 << PG_writeback | 1 << PG_reserved | \
|
||||
1 << PG_slab | 1 << PG_swapcache | 1 << PG_active | \
|
||||
1 << PG_unevictable | __PG_MLOCKED)
|
||||
1 << PG_unevictable | __PG_MLOCKED | __PG_HWPOISON)
|
||||
|
||||
/*
|
||||
* Flags checked when a page is prepped for return by the page allocator.
|
||||
|
||||
@@ -38,6 +38,7 @@ enum {
|
||||
PCG_LOCK, /* page cgroup is locked */
|
||||
PCG_CACHE, /* charged as cache */
|
||||
PCG_USED, /* this object is in use. */
|
||||
PCG_ACCT_LRU, /* page has been accounted for */
|
||||
};
|
||||
|
||||
#define TESTPCGFLAG(uname, lname) \
|
||||
@@ -52,11 +53,23 @@ static inline void SetPageCgroup##uname(struct page_cgroup *pc)\
|
||||
static inline void ClearPageCgroup##uname(struct page_cgroup *pc) \
|
||||
{ clear_bit(PCG_##lname, &pc->flags); }
|
||||
|
||||
#define TESTCLEARPCGFLAG(uname, lname) \
|
||||
static inline int TestClearPageCgroup##uname(struct page_cgroup *pc) \
|
||||
{ return test_and_clear_bit(PCG_##lname, &pc->flags); }
|
||||
|
||||
/* Cache flag is set only once (at allocation) */
|
||||
TESTPCGFLAG(Cache, CACHE)
|
||||
CLEARPCGFLAG(Cache, CACHE)
|
||||
SETPCGFLAG(Cache, CACHE)
|
||||
|
||||
TESTPCGFLAG(Used, USED)
|
||||
CLEARPCGFLAG(Used, USED)
|
||||
SETPCGFLAG(Used, USED)
|
||||
|
||||
SETPCGFLAG(AcctLRU, ACCT_LRU)
|
||||
CLEARPCGFLAG(AcctLRU, ACCT_LRU)
|
||||
TESTPCGFLAG(AcctLRU, ACCT_LRU)
|
||||
TESTCLEARPCGFLAG(AcctLRU, ACCT_LRU)
|
||||
|
||||
static inline int page_cgroup_nid(struct page_cgroup *pc)
|
||||
{
|
||||
|
||||
@@ -776,6 +776,7 @@
|
||||
#define PCI_DEVICE_ID_TI_X515 0x8036
|
||||
#define PCI_DEVICE_ID_TI_XX12 0x8039
|
||||
#define PCI_DEVICE_ID_TI_XX12_FM 0x803b
|
||||
#define PCI_DEVICE_ID_TI_XIO2000A 0x8231
|
||||
#define PCI_DEVICE_ID_TI_1130 0xac12
|
||||
#define PCI_DEVICE_ID_TI_1031 0xac13
|
||||
#define PCI_DEVICE_ID_TI_1131 0xac15
|
||||
@@ -2527,6 +2528,16 @@
|
||||
#define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e
|
||||
#define PCI_DEVICE_ID_INTEL_IOAT_CNB 0x360b
|
||||
#define PCI_DEVICE_ID_INTEL_FBD_CNB 0x360c
|
||||
#define PCI_DEVICE_ID_INTEL_IOAT_JSF0 0x3710
|
||||
#define PCI_DEVICE_ID_INTEL_IOAT_JSF1 0x3711
|
||||
#define PCI_DEVICE_ID_INTEL_IOAT_JSF2 0x3712
|
||||
#define PCI_DEVICE_ID_INTEL_IOAT_JSF3 0x3713
|
||||
#define PCI_DEVICE_ID_INTEL_IOAT_JSF4 0x3714
|
||||
#define PCI_DEVICE_ID_INTEL_IOAT_JSF5 0x3715
|
||||
#define PCI_DEVICE_ID_INTEL_IOAT_JSF6 0x3716
|
||||
#define PCI_DEVICE_ID_INTEL_IOAT_JSF7 0x3717
|
||||
#define PCI_DEVICE_ID_INTEL_IOAT_JSF8 0x3718
|
||||
#define PCI_DEVICE_ID_INTEL_IOAT_JSF9 0x3719
|
||||
#define PCI_DEVICE_ID_INTEL_ICH10_0 0x3a14
|
||||
#define PCI_DEVICE_ID_INTEL_ICH10_1 0x3a16
|
||||
#define PCI_DEVICE_ID_INTEL_ICH10_2 0x3a18
|
||||
|
||||
@@ -361,7 +361,7 @@ enum perf_event_type {
|
||||
* struct perf_event_header header;
|
||||
* u32 pid, ppid;
|
||||
* u32 tid, ptid;
|
||||
* { u64 time; } && PERF_SAMPLE_TIME
|
||||
* u64 time;
|
||||
* };
|
||||
*/
|
||||
PERF_EVENT_FORK = 7,
|
||||
|
||||
@@ -357,7 +357,7 @@ enum perf_event_type {
|
||||
* struct perf_event_header header;
|
||||
* u32 pid, ppid;
|
||||
* u32 tid, ptid;
|
||||
* { u64 time; } && PERF_SAMPLE_TIME
|
||||
* u64 time;
|
||||
* };
|
||||
*/
|
||||
PERF_RECORD_FORK = 7,
|
||||
@@ -442,6 +442,7 @@ enum perf_callchain_context {
|
||||
#include <linux/hrtimer.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/pid_namespace.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <asm/atomic.h>
|
||||
|
||||
#define PERF_MAX_STACK_DEPTH 255
|
||||
@@ -513,6 +514,10 @@ struct file;
|
||||
|
||||
struct perf_mmap_data {
|
||||
struct rcu_head rcu_head;
|
||||
#ifdef CONFIG_PERF_USE_VMALLOC
|
||||
struct work_struct work;
|
||||
#endif
|
||||
int data_order;
|
||||
int nr_pages; /* nr of data pages */
|
||||
int writable; /* are we writable */
|
||||
int nr_locked; /* nr pages mlocked */
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#define PNPIPE_IFINDEX 2
|
||||
|
||||
#define PNADDR_ANY 0
|
||||
#define PNADDR_BROADCAST 0xFC
|
||||
#define PNPORT_RESOURCE_ROUTING 0
|
||||
|
||||
/* Values for PNPIPE_ENCAP option */
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/ktime.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/sched.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
/* ~832 bytes of stack space used max in sys_select/sys_poll before allocating
|
||||
|
||||
@@ -88,4 +88,6 @@
|
||||
#define PR_TASK_PERF_EVENTS_DISABLE 31
|
||||
#define PR_TASK_PERF_EVENTS_ENABLE 32
|
||||
|
||||
#define PR_MCE_KILL 33
|
||||
|
||||
#endif /* _LINUX_PRCTL_H */
|
||||
|
||||
@@ -17,7 +17,7 @@ extern int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma);
|
||||
#endif
|
||||
|
||||
extern const struct file_operations ramfs_file_operations;
|
||||
extern struct vm_operations_struct generic_file_vm_ops;
|
||||
extern const struct vm_operations_struct generic_file_vm_ops;
|
||||
extern int __init init_rootfs(void);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -77,7 +77,7 @@ extern int rcu_scheduler_active;
|
||||
#error "Unknown RCU implementation specified to kernel configuration"
|
||||
#endif
|
||||
|
||||
#define RCU_HEAD_INIT { .next = NULL, .func = NULL }
|
||||
#define RCU_HEAD_INIT { .next = NULL, .func = NULL }
|
||||
#define RCU_HEAD(head) struct rcu_head head = RCU_HEAD_INIT
|
||||
#define INIT_RCU_HEAD(ptr) do { \
|
||||
(ptr)->next = NULL; (ptr)->func = NULL; \
|
||||
@@ -129,12 +129,6 @@ static inline void rcu_read_lock(void)
|
||||
rcu_read_acquire();
|
||||
}
|
||||
|
||||
/**
|
||||
* rcu_read_unlock - marks the end of an RCU read-side critical section.
|
||||
*
|
||||
* See rcu_read_lock() for more information.
|
||||
*/
|
||||
|
||||
/*
|
||||
* So where is rcu_write_lock()? It does not exist, as there is no
|
||||
* way for writers to lock out RCU readers. This is a feature, not
|
||||
@@ -144,6 +138,12 @@ static inline void rcu_read_lock(void)
|
||||
* used as well. RCU does not care how the writers keep out of each
|
||||
* others' way, as long as they do so.
|
||||
*/
|
||||
|
||||
/**
|
||||
* rcu_read_unlock - marks the end of an RCU read-side critical section.
|
||||
*
|
||||
* See rcu_read_lock() for more information.
|
||||
*/
|
||||
static inline void rcu_read_unlock(void)
|
||||
{
|
||||
rcu_read_release();
|
||||
@@ -196,6 +196,8 @@ static inline void rcu_read_lock_sched(void)
|
||||
__acquire(RCU_SCHED);
|
||||
rcu_read_acquire();
|
||||
}
|
||||
|
||||
/* Used by lockdep and tracing: cannot be traced, cannot call lockdep. */
|
||||
static inline notrace void rcu_read_lock_sched_notrace(void)
|
||||
{
|
||||
preempt_disable_notrace();
|
||||
@@ -213,6 +215,8 @@ static inline void rcu_read_unlock_sched(void)
|
||||
__release(RCU_SCHED);
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
/* Used by lockdep and tracing: cannot be traced, cannot call lockdep. */
|
||||
static inline notrace void rcu_read_unlock_sched_notrace(void)
|
||||
{
|
||||
__release(RCU_SCHED);
|
||||
|
||||
@@ -30,10 +30,14 @@
|
||||
#ifndef __LINUX_RCUTREE_H
|
||||
#define __LINUX_RCUTREE_H
|
||||
|
||||
struct notifier_block;
|
||||
|
||||
extern void rcu_sched_qs(int cpu);
|
||||
extern void rcu_bh_qs(int cpu);
|
||||
|
||||
extern int rcu_cpu_notify(struct notifier_block *self,
|
||||
unsigned long action, void *hcpu);
|
||||
extern int rcu_needs_cpu(int cpu);
|
||||
extern int rcu_expedited_torture_stats(char *page);
|
||||
|
||||
#ifdef CONFIG_TREE_PREEMPT_RCU
|
||||
|
||||
@@ -85,16 +89,11 @@ static inline void synchronize_rcu_bh_expedited(void)
|
||||
|
||||
extern void __rcu_init(void);
|
||||
extern void rcu_check_callbacks(int cpu, int user);
|
||||
extern void rcu_restart_cpu(int cpu);
|
||||
|
||||
extern long rcu_batches_completed(void);
|
||||
extern long rcu_batches_completed_bh(void);
|
||||
extern long rcu_batches_completed_sched(void);
|
||||
|
||||
static inline void rcu_init_sched(void)
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NO_HZ
|
||||
void rcu_enter_nohz(void);
|
||||
void rcu_exit_nohz(void);
|
||||
@@ -107,7 +106,7 @@ static inline void rcu_exit_nohz(void)
|
||||
}
|
||||
#endif /* CONFIG_NO_HZ */
|
||||
|
||||
/* A context switch is a grace period for rcutree. */
|
||||
/* A context switch is a grace period for RCU-sched and RCU-bh. */
|
||||
static inline int rcu_blocking_is_gp(void)
|
||||
{
|
||||
return num_online_cpus() == 1;
|
||||
|
||||
@@ -140,7 +140,7 @@ struct rchan_callbacks
|
||||
* cause relay_open() to create a single global buffer rather
|
||||
* than the default set of per-cpu buffers.
|
||||
*
|
||||
* See Documentation/filesystems/relayfs.txt for more info.
|
||||
* See Documentation/filesystems/relay.txt for more info.
|
||||
*/
|
||||
struct dentry *(*create_buf_file)(const char *filename,
|
||||
struct dentry *parent,
|
||||
|
||||
@@ -34,6 +34,10 @@ struct res_counter {
|
||||
* the limit that usage cannot exceed
|
||||
*/
|
||||
unsigned long long limit;
|
||||
/*
|
||||
* the limit that usage can be exceed
|
||||
*/
|
||||
unsigned long long soft_limit;
|
||||
/*
|
||||
* the number of unsuccessful attempts to consume the resource
|
||||
*/
|
||||
@@ -87,6 +91,7 @@ enum {
|
||||
RES_MAX_USAGE,
|
||||
RES_LIMIT,
|
||||
RES_FAILCNT,
|
||||
RES_SOFT_LIMIT,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -132,6 +137,36 @@ static inline bool res_counter_limit_check_locked(struct res_counter *cnt)
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool res_counter_soft_limit_check_locked(struct res_counter *cnt)
|
||||
{
|
||||
if (cnt->usage < cnt->soft_limit)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the difference between the usage and the soft limit
|
||||
* @cnt: The counter
|
||||
*
|
||||
* Returns 0 if usage is less than or equal to soft limit
|
||||
* The difference between usage and soft limit, otherwise.
|
||||
*/
|
||||
static inline unsigned long long
|
||||
res_counter_soft_limit_excess(struct res_counter *cnt)
|
||||
{
|
||||
unsigned long long excess;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&cnt->lock, flags);
|
||||
if (cnt->usage <= cnt->soft_limit)
|
||||
excess = 0;
|
||||
else
|
||||
excess = cnt->usage - cnt->soft_limit;
|
||||
spin_unlock_irqrestore(&cnt->lock, flags);
|
||||
return excess;
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper function to detect if the cgroup is within it's limit or
|
||||
* not. It's currently called from cgroup_rss_prepare()
|
||||
@@ -147,6 +182,17 @@ static inline bool res_counter_check_under_limit(struct res_counter *cnt)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline bool res_counter_check_under_soft_limit(struct res_counter *cnt)
|
||||
{
|
||||
bool ret;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&cnt->lock, flags);
|
||||
ret = res_counter_soft_limit_check_locked(cnt);
|
||||
spin_unlock_irqrestore(&cnt->lock, flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline void res_counter_reset_max(struct res_counter *cnt)
|
||||
{
|
||||
unsigned long flags;
|
||||
@@ -180,4 +226,16 @@ static inline int res_counter_set_limit(struct res_counter *cnt,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline int
|
||||
res_counter_set_soft_limit(struct res_counter *cnt,
|
||||
unsigned long long soft_limit)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&cnt->lock, flags);
|
||||
cnt->soft_limit = soft_limit;
|
||||
spin_unlock_irqrestore(&cnt->lock, flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+20
-1
@@ -81,7 +81,19 @@ static inline void page_dup_rmap(struct page *page)
|
||||
*/
|
||||
int page_referenced(struct page *, int is_locked,
|
||||
struct mem_cgroup *cnt, unsigned long *vm_flags);
|
||||
int try_to_unmap(struct page *, int ignore_refs);
|
||||
enum ttu_flags {
|
||||
TTU_UNMAP = 0, /* unmap mode */
|
||||
TTU_MIGRATION = 1, /* migration mode */
|
||||
TTU_MUNLOCK = 2, /* munlock mode */
|
||||
TTU_ACTION_MASK = 0xff,
|
||||
|
||||
TTU_IGNORE_MLOCK = (1 << 8), /* ignore mlock */
|
||||
TTU_IGNORE_ACCESS = (1 << 9), /* don't age */
|
||||
TTU_IGNORE_HWPOISON = (1 << 10),/* corrupted page is recoverable */
|
||||
};
|
||||
#define TTU_ACTION(x) ((x) & TTU_ACTION_MASK)
|
||||
|
||||
int try_to_unmap(struct page *, enum ttu_flags flags);
|
||||
|
||||
/*
|
||||
* Called from mm/filemap_xip.c to unmap empty zero page
|
||||
@@ -108,6 +120,13 @@ int page_mkclean(struct page *);
|
||||
*/
|
||||
int try_to_munlock(struct page *);
|
||||
|
||||
/*
|
||||
* Called by memory-failure.c to kill processes.
|
||||
*/
|
||||
struct anon_vma *page_lock_anon_vma(struct page *page);
|
||||
void page_unlock_anon_vma(struct anon_vma *anon_vma);
|
||||
int page_mapped_in_vma(struct page *page, struct vm_area_struct *vma);
|
||||
|
||||
#else /* !CONFIG_MMU */
|
||||
|
||||
#define anon_vma_init() do {} while (0)
|
||||
|
||||
+14
-6
@@ -309,7 +309,7 @@ extern void softlockup_tick(void);
|
||||
extern void touch_softlockup_watchdog(void);
|
||||
extern void touch_all_softlockup_watchdogs(void);
|
||||
extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write,
|
||||
struct file *filp, void __user *buffer,
|
||||
void __user *buffer,
|
||||
size_t *lenp, loff_t *ppos);
|
||||
extern unsigned int softlockup_panic;
|
||||
extern int softlockup_thresh;
|
||||
@@ -331,7 +331,7 @@ extern unsigned long sysctl_hung_task_check_count;
|
||||
extern unsigned long sysctl_hung_task_timeout_secs;
|
||||
extern unsigned long sysctl_hung_task_warnings;
|
||||
extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
|
||||
struct file *filp, void __user *buffer,
|
||||
void __user *buffer,
|
||||
size_t *lenp, loff_t *ppos);
|
||||
#endif
|
||||
|
||||
@@ -1271,7 +1271,6 @@ struct task_struct {
|
||||
struct mm_struct *mm, *active_mm;
|
||||
|
||||
/* task state */
|
||||
struct linux_binfmt *binfmt;
|
||||
int exit_state;
|
||||
int exit_code, exit_signal;
|
||||
int pdeath_signal; /* The signal sent when the parent dies */
|
||||
@@ -1735,6 +1734,7 @@ extern cputime_t task_gtime(struct task_struct *p);
|
||||
#define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */
|
||||
#define PF_VCPU 0x00000010 /* I'm a virtual CPU */
|
||||
#define PF_FORKNOEXEC 0x00000040 /* forked but didn't exec */
|
||||
#define PF_MCE_PROCESS 0x00000080 /* process policy on mce errors */
|
||||
#define PF_SUPERPRIV 0x00000100 /* used super-user privileges */
|
||||
#define PF_DUMPCORE 0x00000200 /* dumped core */
|
||||
#define PF_SIGNALED 0x00000400 /* killed by a signal */
|
||||
@@ -1754,6 +1754,7 @@ extern cputime_t task_gtime(struct task_struct *p);
|
||||
#define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */
|
||||
#define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */
|
||||
#define PF_THREAD_BOUND 0x04000000 /* Thread bound to specific cpu */
|
||||
#define PF_MCE_EARLY 0x08000000 /* Early kill for mce process policy */
|
||||
#define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */
|
||||
#define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */
|
||||
#define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezeable */
|
||||
@@ -1817,10 +1818,13 @@ static inline int set_cpus_allowed_ptr(struct task_struct *p,
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_CPUMASK_OFFSTACK
|
||||
static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
|
||||
{
|
||||
return set_cpus_allowed_ptr(p, &new_mask);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Architectures can set this to 1 if they have specified
|
||||
@@ -1903,7 +1907,7 @@ extern unsigned int sysctl_sched_time_avg;
|
||||
extern unsigned int sysctl_timer_migration;
|
||||
|
||||
int sched_nr_latency_handler(struct ctl_table *table, int write,
|
||||
struct file *file, void __user *buffer, size_t *length,
|
||||
void __user *buffer, size_t *length,
|
||||
loff_t *ppos);
|
||||
#endif
|
||||
#ifdef CONFIG_SCHED_DEBUG
|
||||
@@ -1921,7 +1925,7 @@ extern unsigned int sysctl_sched_rt_period;
|
||||
extern int sysctl_sched_rt_runtime;
|
||||
|
||||
int sched_rt_handler(struct ctl_table *table, int write,
|
||||
struct file *filp, void __user *buffer, size_t *lenp,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
|
||||
extern unsigned int sysctl_sched_compat_yield;
|
||||
@@ -2056,6 +2060,7 @@ extern int kill_pgrp(struct pid *pid, int sig, int priv);
|
||||
extern int kill_pid(struct pid *pid, int sig, int priv);
|
||||
extern int kill_proc_info(int, struct siginfo *, pid_t);
|
||||
extern int do_notify_parent(struct task_struct *, int);
|
||||
extern void __wake_up_parent(struct task_struct *p, struct task_struct *parent);
|
||||
extern void force_sig(int, struct task_struct *);
|
||||
extern void force_sig_specific(int, struct task_struct *);
|
||||
extern int send_sig(int, struct task_struct *, int);
|
||||
@@ -2333,7 +2338,10 @@ static inline int signal_pending(struct task_struct *p)
|
||||
return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING));
|
||||
}
|
||||
|
||||
extern int __fatal_signal_pending(struct task_struct *p);
|
||||
static inline int __fatal_signal_pending(struct task_struct *p)
|
||||
{
|
||||
return unlikely(sigismember(&p->pending.signal, SIGKILL));
|
||||
}
|
||||
|
||||
static inline int fatal_signal_pending(struct task_struct *p)
|
||||
{
|
||||
|
||||
@@ -133,7 +133,7 @@ static inline unsigned long round_hint_to_min(unsigned long hint)
|
||||
return PAGE_ALIGN(mmap_min_addr);
|
||||
return hint;
|
||||
}
|
||||
extern int mmap_min_addr_handler(struct ctl_table *table, int write, struct file *filp,
|
||||
extern int mmap_min_addr_handler(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp, loff_t *ppos);
|
||||
|
||||
#ifdef CONFIG_SECURITY
|
||||
|
||||
@@ -35,6 +35,44 @@ struct seq_operations {
|
||||
|
||||
#define SEQ_SKIP 1
|
||||
|
||||
/**
|
||||
* seq_get_buf - get buffer to write arbitrary data to
|
||||
* @m: the seq_file handle
|
||||
* @bufp: the beginning of the buffer is stored here
|
||||
*
|
||||
* Return the number of bytes available in the buffer, or zero if
|
||||
* there's no space.
|
||||
*/
|
||||
static inline size_t seq_get_buf(struct seq_file *m, char **bufp)
|
||||
{
|
||||
BUG_ON(m->count > m->size);
|
||||
if (m->count < m->size)
|
||||
*bufp = m->buf + m->count;
|
||||
else
|
||||
*bufp = NULL;
|
||||
|
||||
return m->size - m->count;
|
||||
}
|
||||
|
||||
/**
|
||||
* seq_commit - commit data to the buffer
|
||||
* @m: the seq_file handle
|
||||
* @num: the number of bytes to commit
|
||||
*
|
||||
* Commit @num bytes of data written to a buffer previously acquired
|
||||
* by seq_buf_get. To signal an error condition, or that the data
|
||||
* didn't fit in the available space, pass a negative @num value.
|
||||
*/
|
||||
static inline void seq_commit(struct seq_file *m, int num)
|
||||
{
|
||||
if (num < 0) {
|
||||
m->count = m->size;
|
||||
} else {
|
||||
BUG_ON(m->count + num > m->size);
|
||||
m->count += num;
|
||||
}
|
||||
}
|
||||
|
||||
char *mangle_path(char *s, char *p, char *esc);
|
||||
int seq_open(struct file *, const struct seq_operations *);
|
||||
ssize_t seq_read(struct file *, char __user *, size_t, loff_t *);
|
||||
|
||||
@@ -176,6 +176,9 @@
|
||||
/* Qualcomm MSM SoCs */
|
||||
#define PORT_MSM 88
|
||||
|
||||
/* BCM63xx family SoCs */
|
||||
#define PORT_BCM63XX 89
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <linux/compiler.h>
|
||||
|
||||
@@ -233,6 +233,8 @@ static inline int valid_signal(unsigned long sig)
|
||||
}
|
||||
|
||||
extern int next_signal(struct sigpending *pending, sigset_t *mask);
|
||||
extern int do_send_sig_info(int sig, struct siginfo *info,
|
||||
struct task_struct *p, bool group);
|
||||
extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p);
|
||||
extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *);
|
||||
extern long do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig,
|
||||
|
||||
@@ -73,15 +73,6 @@ int smp_call_function(void(*func)(void *info), void *info, int wait);
|
||||
void smp_call_function_many(const struct cpumask *mask,
|
||||
void (*func)(void *info), void *info, bool wait);
|
||||
|
||||
/* Deprecated: Use smp_call_function_many which takes a pointer to the mask. */
|
||||
static inline int
|
||||
smp_call_function_mask(cpumask_t mask, void(*func)(void *info), void *info,
|
||||
int wait)
|
||||
{
|
||||
smp_call_function_many(&mask, func, info, wait);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __smp_call_function_single(int cpuid, struct call_single_data *data,
|
||||
int wait);
|
||||
|
||||
@@ -144,8 +135,6 @@ static inline int up_smp_call_function(void (*func)(void *), void *info)
|
||||
static inline void smp_send_reschedule(int cpu) { }
|
||||
#define num_booting_cpus() 1
|
||||
#define smp_prepare_boot_cpu() do {} while (0)
|
||||
#define smp_call_function_mask(mask, func, info, wait) \
|
||||
(up_smp_call_function(func, info))
|
||||
#define smp_call_function_many(mask, func, info, wait) \
|
||||
(up_smp_call_function(func, info))
|
||||
static inline void init_call_single_data(void)
|
||||
|
||||
+3
-18
@@ -16,7 +16,7 @@ struct __kernel_sockaddr_storage {
|
||||
/* _SS_MAXSIZE value minus size of ss_family */
|
||||
} __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */
|
||||
|
||||
#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <asm/socket.h> /* arch-dependent defines */
|
||||
#include <linux/sockios.h> /* the SIOCxxx I/O controls */
|
||||
@@ -100,21 +100,6 @@ struct cmsghdr {
|
||||
((mhdr)->msg_controllen - \
|
||||
((char *)(cmsg) - (char *)(mhdr)->msg_control)))
|
||||
|
||||
/*
|
||||
* This mess will go away with glibc
|
||||
*/
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#define __KINLINE static inline
|
||||
#elif defined(__GNUC__)
|
||||
#define __KINLINE static __inline__
|
||||
#elif defined(__cplusplus)
|
||||
#define __KINLINE static inline
|
||||
#else
|
||||
#define __KINLINE static
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Get the next cmsg header
|
||||
*
|
||||
@@ -128,7 +113,7 @@ struct cmsghdr {
|
||||
* ancillary object DATA. --ANK (980731)
|
||||
*/
|
||||
|
||||
__KINLINE struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size,
|
||||
static inline struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size,
|
||||
struct cmsghdr *__cmsg)
|
||||
{
|
||||
struct cmsghdr * __ptr;
|
||||
@@ -140,7 +125,7 @@ __KINLINE struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size,
|
||||
return __ptr;
|
||||
}
|
||||
|
||||
__KINLINE struct cmsghdr * cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg)
|
||||
static inline struct cmsghdr * cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg)
|
||||
{
|
||||
return __cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* lms283gf05.h - Platform glue for Samsung LMS283GF05 LCD
|
||||
*
|
||||
* Copyright (C) 2009 Marek Vasut <marek.vasut@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that 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
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE_LINUX_SPI_LMS283GF05_H_
|
||||
#define _INCLUDE_LINUX_SPI_LMS283GF05_H_
|
||||
|
||||
struct lms283gf05_pdata {
|
||||
unsigned long reset_gpio;
|
||||
bool reset_inverted;
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE_LINUX_SPI_LMS283GF05_H_ */
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#include <linux/uio.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <asm/unaligned.h>
|
||||
#include <linux/scatterlist.h>
|
||||
|
||||
/*
|
||||
@@ -117,14 +118,14 @@ static inline __be32 *xdr_encode_array(__be32 *p, const void *s, unsigned int le
|
||||
static inline __be32 *
|
||||
xdr_encode_hyper(__be32 *p, __u64 val)
|
||||
{
|
||||
*(__be64 *)p = cpu_to_be64(val);
|
||||
put_unaligned_be64(val, p);
|
||||
return p + 2;
|
||||
}
|
||||
|
||||
static inline __be32 *
|
||||
xdr_decode_hyper(__be32 *p, __u64 *valp)
|
||||
{
|
||||
*valp = be64_to_cpup((__be64 *)p);
|
||||
*valp = get_unaligned_be64(p);
|
||||
return p + 2;
|
||||
}
|
||||
|
||||
|
||||
+34
-7
@@ -34,15 +34,37 @@ static inline int current_is_kswapd(void)
|
||||
* the type/offset into the pte as 5/27 as well.
|
||||
*/
|
||||
#define MAX_SWAPFILES_SHIFT 5
|
||||
#ifndef CONFIG_MIGRATION
|
||||
#define MAX_SWAPFILES (1 << MAX_SWAPFILES_SHIFT)
|
||||
|
||||
/*
|
||||
* Use some of the swap files numbers for other purposes. This
|
||||
* is a convenient way to hook into the VM to trigger special
|
||||
* actions on faults.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NUMA node memory migration support
|
||||
*/
|
||||
#ifdef CONFIG_MIGRATION
|
||||
#define SWP_MIGRATION_NUM 2
|
||||
#define SWP_MIGRATION_READ (MAX_SWAPFILES + SWP_HWPOISON_NUM)
|
||||
#define SWP_MIGRATION_WRITE (MAX_SWAPFILES + SWP_HWPOISON_NUM + 1)
|
||||
#else
|
||||
/* Use last two entries for page migration swap entries */
|
||||
#define MAX_SWAPFILES ((1 << MAX_SWAPFILES_SHIFT)-2)
|
||||
#define SWP_MIGRATION_READ MAX_SWAPFILES
|
||||
#define SWP_MIGRATION_WRITE (MAX_SWAPFILES + 1)
|
||||
#define SWP_MIGRATION_NUM 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Handling of hardware poisoned pages with memory corruption.
|
||||
*/
|
||||
#ifdef CONFIG_MEMORY_FAILURE
|
||||
#define SWP_HWPOISON_NUM 1
|
||||
#define SWP_HWPOISON MAX_SWAPFILES
|
||||
#else
|
||||
#define SWP_HWPOISON_NUM 0
|
||||
#endif
|
||||
|
||||
#define MAX_SWAPFILES \
|
||||
((1 << MAX_SWAPFILES_SHIFT) - SWP_MIGRATION_NUM - SWP_HWPOISON_NUM)
|
||||
|
||||
/*
|
||||
* Magic header for a swap area. The first part of the union is
|
||||
* what the swap magic looks like for the old (limited to 128MB)
|
||||
@@ -217,6 +239,11 @@ extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order,
|
||||
extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem,
|
||||
gfp_t gfp_mask, bool noswap,
|
||||
unsigned int swappiness);
|
||||
extern unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *mem,
|
||||
gfp_t gfp_mask, bool noswap,
|
||||
unsigned int swappiness,
|
||||
struct zone *zone,
|
||||
int nid);
|
||||
extern int __isolate_lru_page(struct page *page, int mode, int file);
|
||||
extern unsigned long shrink_all_memory(unsigned long nr_pages);
|
||||
extern int vm_swappiness;
|
||||
@@ -240,7 +267,7 @@ extern int page_evictable(struct page *page, struct vm_area_struct *vma);
|
||||
extern void scan_mapping_unevictable_pages(struct address_space *);
|
||||
|
||||
extern unsigned long scan_unevictable_pages;
|
||||
extern int scan_unevictable_handler(struct ctl_table *, int, struct file *,
|
||||
extern int scan_unevictable_handler(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int scan_unevictable_register_node(struct node *node);
|
||||
extern void scan_unevictable_unregister_node(struct node *node);
|
||||
|
||||
@@ -131,3 +131,41 @@ static inline int is_write_migration_entry(swp_entry_t entry)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MEMORY_FAILURE
|
||||
/*
|
||||
* Support for hardware poisoned pages
|
||||
*/
|
||||
static inline swp_entry_t make_hwpoison_entry(struct page *page)
|
||||
{
|
||||
BUG_ON(!PageLocked(page));
|
||||
return swp_entry(SWP_HWPOISON, page_to_pfn(page));
|
||||
}
|
||||
|
||||
static inline int is_hwpoison_entry(swp_entry_t entry)
|
||||
{
|
||||
return swp_type(entry) == SWP_HWPOISON;
|
||||
}
|
||||
#else
|
||||
|
||||
static inline swp_entry_t make_hwpoison_entry(struct page *page)
|
||||
{
|
||||
return swp_entry(0, 0);
|
||||
}
|
||||
|
||||
static inline int is_hwpoison_entry(swp_entry_t swp)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_MEMORY_FAILURE) || defined(CONFIG_MIGRATION)
|
||||
static inline int non_swap_entry(swp_entry_t entry)
|
||||
{
|
||||
return swp_type(entry) >= MAX_SWAPFILES;
|
||||
}
|
||||
#else
|
||||
static inline int non_swap_entry(swp_entry_t entry)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
+9
-10
@@ -29,7 +29,6 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/compiler.h>
|
||||
|
||||
struct file;
|
||||
struct completion;
|
||||
|
||||
#define CTL_MAXNAME 10 /* how many path components do we allow in a
|
||||
@@ -977,25 +976,25 @@ typedef int ctl_handler (struct ctl_table *table,
|
||||
void __user *oldval, size_t __user *oldlenp,
|
||||
void __user *newval, size_t newlen);
|
||||
|
||||
typedef int proc_handler (struct ctl_table *ctl, int write, struct file * filp,
|
||||
typedef int proc_handler (struct ctl_table *ctl, int write,
|
||||
void __user *buffer, size_t *lenp, loff_t *ppos);
|
||||
|
||||
extern int proc_dostring(struct ctl_table *, int, struct file *,
|
||||
extern int proc_dostring(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_dointvec(struct ctl_table *, int, struct file *,
|
||||
extern int proc_dointvec(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_dointvec_minmax(struct ctl_table *, int, struct file *,
|
||||
extern int proc_dointvec_minmax(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_dointvec_jiffies(struct ctl_table *, int, struct file *,
|
||||
extern int proc_dointvec_jiffies(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_dointvec_userhz_jiffies(struct ctl_table *, int, struct file *,
|
||||
extern int proc_dointvec_userhz_jiffies(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_dointvec_ms_jiffies(struct ctl_table *, int, struct file *,
|
||||
extern int proc_dointvec_ms_jiffies(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_doulongvec_minmax(struct ctl_table *, int, struct file *,
|
||||
extern int proc_doulongvec_minmax(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int,
|
||||
struct file *, void __user *, size_t *, loff_t *);
|
||||
void __user *, size_t *, loff_t *);
|
||||
|
||||
extern int do_sysctl (int __user *name, int nlen,
|
||||
void __user *oldval, size_t __user *oldlenp,
|
||||
|
||||
@@ -155,6 +155,34 @@ extern void timekeeping_leap_insert(int leapsecond);
|
||||
struct tms;
|
||||
extern void do_sys_times(struct tms *);
|
||||
|
||||
/*
|
||||
* Similar to the struct tm in userspace <time.h>, but it needs to be here so
|
||||
* that the kernel source is self contained.
|
||||
*/
|
||||
struct tm {
|
||||
/*
|
||||
* the number of seconds after the minute, normally in the range
|
||||
* 0 to 59, but can be up to 60 to allow for leap seconds
|
||||
*/
|
||||
int tm_sec;
|
||||
/* the number of minutes after the hour, in the range 0 to 59*/
|
||||
int tm_min;
|
||||
/* the number of hours past midnight, in the range 0 to 23 */
|
||||
int tm_hour;
|
||||
/* the day of the month, in the range 1 to 31 */
|
||||
int tm_mday;
|
||||
/* the number of months since January, in the range 0 to 11 */
|
||||
int tm_mon;
|
||||
/* the number of years since 1900 */
|
||||
long tm_year;
|
||||
/* the number of days since Sunday, in the range 0 to 6 */
|
||||
int tm_wday;
|
||||
/* the number of days since January 1, in the range 0 to 365 */
|
||||
int tm_yday;
|
||||
};
|
||||
|
||||
void time_to_tm(time_t totalsecs, int offset, struct tm *result);
|
||||
|
||||
/**
|
||||
* timespec_to_ns - Convert timespec to nanoseconds
|
||||
* @ts: pointer to the timespec variable to be converted
|
||||
|
||||
@@ -211,12 +211,6 @@ int arch_update_cpu_topology(void);
|
||||
#ifndef topology_core_id
|
||||
#define topology_core_id(cpu) ((void)(cpu), 0)
|
||||
#endif
|
||||
#ifndef topology_thread_siblings
|
||||
#define topology_thread_siblings(cpu) cpumask_of_cpu(cpu)
|
||||
#endif
|
||||
#ifndef topology_core_siblings
|
||||
#define topology_core_siblings(cpu) cpumask_of_cpu(cpu)
|
||||
#endif
|
||||
#ifndef topology_thread_cpumask
|
||||
#define topology_thread_cpumask(cpu) cpumask_of(cpu)
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Tracing hooks
|
||||
*
|
||||
* Copyright (C) 2008 Red Hat, Inc. All rights reserved.
|
||||
* Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved.
|
||||
*
|
||||
* This copyrighted material is made available to anyone wishing to use,
|
||||
* modify, copy, or redistribute it subject to the terms and conditions
|
||||
@@ -463,22 +463,38 @@ static inline int tracehook_get_signal(struct task_struct *task,
|
||||
|
||||
/**
|
||||
* tracehook_notify_jctl - report about job control stop/continue
|
||||
* @notify: nonzero if this is the last thread in the group to stop
|
||||
* @notify: zero, %CLD_STOPPED or %CLD_CONTINUED
|
||||
* @why: %CLD_STOPPED or %CLD_CONTINUED
|
||||
*
|
||||
* This is called when we might call do_notify_parent_cldstop().
|
||||
* It's called when about to stop for job control; we are already in
|
||||
* %TASK_STOPPED state, about to call schedule(). It's also called when
|
||||
* a delayed %CLD_STOPPED or %CLD_CONTINUED report is ready to be made.
|
||||
*
|
||||
* Return nonzero to generate a %SIGCHLD with @why, which is
|
||||
* normal if @notify is nonzero.
|
||||
* @notify is zero if we would not ordinarily send a %SIGCHLD,
|
||||
* or is the %CLD_STOPPED or %CLD_CONTINUED .si_code for %SIGCHLD.
|
||||
*
|
||||
* Called with no locks held.
|
||||
* @why is %CLD_STOPPED when about to stop for job control;
|
||||
* we are already in %TASK_STOPPED state, about to call schedule().
|
||||
* It might also be that we have just exited (check %PF_EXITING),
|
||||
* but need to report that a group-wide stop is complete.
|
||||
*
|
||||
* @why is %CLD_CONTINUED when waking up after job control stop and
|
||||
* ready to make a delayed @notify report.
|
||||
*
|
||||
* Return the %CLD_* value for %SIGCHLD, or zero to generate no signal.
|
||||
*
|
||||
* Called with the siglock held.
|
||||
*/
|
||||
static inline int tracehook_notify_jctl(int notify, int why)
|
||||
{
|
||||
return notify || (current->ptrace & PT_PTRACED);
|
||||
return notify ?: (current->ptrace & PT_PTRACED) ? why : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* tracehook_finish_jctl - report about return from job control stop
|
||||
*
|
||||
* This is called by do_signal_stop() after wakeup.
|
||||
*/
|
||||
static inline void tracehook_finish_jctl(void)
|
||||
{
|
||||
}
|
||||
|
||||
#define DEATH_REAP -1
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/*
|
||||
* Kernel Tracepoint API.
|
||||
*
|
||||
* See Documentation/tracepoint.txt.
|
||||
* See Documentation/trace/tracepoints.txt.
|
||||
*
|
||||
* (C) Copyright 2008 Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
|
||||
*
|
||||
@@ -36,7 +36,7 @@ struct tracepoint {
|
||||
#ifndef DECLARE_TRACE
|
||||
|
||||
#define TP_PROTO(args...) args
|
||||
#define TP_ARGS(args...) args
|
||||
#define TP_ARGS(args...) args
|
||||
|
||||
#ifdef CONFIG_TRACEPOINTS
|
||||
|
||||
|
||||
@@ -45,8 +45,16 @@
|
||||
*
|
||||
* void (*shutdown)(struct tty_struct * tty);
|
||||
*
|
||||
* This routine is called when a particular tty device is closed for
|
||||
* the last time freeing up the resources.
|
||||
* This routine is called synchronously when a particular tty device
|
||||
* is closed for the last time freeing up the resources.
|
||||
*
|
||||
*
|
||||
* void (*cleanup)(struct tty_struct * tty);
|
||||
*
|
||||
* This routine is called asynchronously when a particular tty device
|
||||
* is closed for the last time freeing up the resources. This is
|
||||
* actually the second part of shutdown for routines that might sleep.
|
||||
*
|
||||
*
|
||||
* int (*write)(struct tty_struct * tty,
|
||||
* const unsigned char *buf, int count);
|
||||
@@ -233,6 +241,7 @@ struct tty_operations {
|
||||
int (*open)(struct tty_struct * tty, struct file * filp);
|
||||
void (*close)(struct tty_struct * tty, struct file * filp);
|
||||
void (*shutdown)(struct tty_struct *tty);
|
||||
void (*cleanup)(struct tty_struct *tty);
|
||||
int (*write)(struct tty_struct * tty,
|
||||
const unsigned char *buf, int count);
|
||||
int (*put_char)(struct tty_struct *tty, unsigned char ch);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _LINUX_UNALIGNED_BE_BYTESHIFT_H
|
||||
#define _LINUX_UNALIGNED_BE_BYTESHIFT_H
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
static inline u16 __get_unaligned_be16(const u8 *p)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _LINUX_UNALIGNED_LE_BYTESHIFT_H
|
||||
#define _LINUX_UNALIGNED_LE_BYTESHIFT_H
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
static inline u16 __get_unaligned_le16(const u8 *p)
|
||||
{
|
||||
|
||||
@@ -150,6 +150,7 @@ struct usb_serial {
|
||||
struct usb_interface *interface;
|
||||
unsigned char disconnected:1;
|
||||
unsigned char suspending:1;
|
||||
unsigned char attached:1;
|
||||
unsigned char minor;
|
||||
unsigned char num_ports;
|
||||
unsigned char num_port_pointers;
|
||||
|
||||
@@ -89,6 +89,7 @@ struct driver_info {
|
||||
#define FLAG_FRAMING_AX 0x0040 /* AX88772/178 packets */
|
||||
#define FLAG_WLAN 0x0080 /* use "wlan%d" names */
|
||||
#define FLAG_AVOID_UNLINK_URBS 0x0100 /* don't unlink urbs at usbnet_stop() */
|
||||
#define FLAG_SEND_ZLP 0x0200 /* hw requires ZLPs are sent */
|
||||
|
||||
|
||||
/* init device ... can sleep, or cause probe() failure */
|
||||
|
||||
@@ -36,7 +36,6 @@ struct new_utsname {
|
||||
#include <linux/kref.h>
|
||||
#include <linux/nsproxy.h>
|
||||
#include <linux/err.h>
|
||||
#include <asm/atomic.h>
|
||||
|
||||
struct uts_namespace {
|
||||
struct kref kref;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* vgaarb.c
|
||||
* The VGA aribiter manages VGA space routing and VGA resource decode to
|
||||
* allow multiple VGA devices to be used in a system in a safe way.
|
||||
*
|
||||
* (C) Copyright 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
||||
* (C) Copyright 2007 Paulo R. Zanoni <przanoni@gmail.com>
|
||||
|
||||
@@ -207,6 +207,7 @@ extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq,
|
||||
|
||||
extern void flush_workqueue(struct workqueue_struct *wq);
|
||||
extern void flush_scheduled_work(void);
|
||||
extern void flush_delayed_work(struct delayed_work *work);
|
||||
|
||||
extern int schedule_work(struct work_struct *work);
|
||||
extern int schedule_work_on(int cpu, struct work_struct *work);
|
||||
|
||||
@@ -110,21 +110,20 @@ extern int laptop_mode;
|
||||
extern unsigned long determine_dirtyable_memory(void);
|
||||
|
||||
extern int dirty_background_ratio_handler(struct ctl_table *table, int write,
|
||||
struct file *filp, void __user *buffer, size_t *lenp,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
extern int dirty_background_bytes_handler(struct ctl_table *table, int write,
|
||||
struct file *filp, void __user *buffer, size_t *lenp,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
extern int dirty_ratio_handler(struct ctl_table *table, int write,
|
||||
struct file *filp, void __user *buffer, size_t *lenp,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
extern int dirty_bytes_handler(struct ctl_table *table, int write,
|
||||
struct file *filp, void __user *buffer, size_t *lenp,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
|
||||
struct ctl_table;
|
||||
struct file;
|
||||
int dirty_writeback_centisecs_handler(struct ctl_table *, int, struct file *,
|
||||
int dirty_writeback_centisecs_handler(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
|
||||
void get_dirty_limits(unsigned long *pbackground, unsigned long *pdirty,
|
||||
|
||||
Reference in New Issue
Block a user