mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
Merge commit '85082fd7cb' into test-build
Manual fixup of: arch/powerpc/Kconfig
This commit is contained in:
commit
43d2548bb2
1806 changed files with 120558 additions and 38321 deletions
|
|
@ -82,6 +82,7 @@ char * __acpi_map_table (unsigned long phys_addr, unsigned long size);
|
|||
int early_acpi_boot_init(void);
|
||||
int acpi_boot_init (void);
|
||||
int acpi_boot_table_init (void);
|
||||
int acpi_mps_check (void);
|
||||
int acpi_numa_init (void);
|
||||
|
||||
int acpi_table_init (void);
|
||||
|
|
@ -250,6 +251,11 @@ static inline int acpi_boot_table_init(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int acpi_mps_check(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int acpi_check_resource_conflict(struct resource *res)
|
||||
{
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ struct bio_vec {
|
|||
|
||||
struct bio_set;
|
||||
struct bio;
|
||||
struct bio_integrity_payload;
|
||||
typedef void (bio_end_io_t) (struct bio *, int);
|
||||
typedef void (bio_destructor_t) (struct bio *);
|
||||
|
||||
|
|
@ -112,6 +113,9 @@ struct bio {
|
|||
atomic_t bi_cnt; /* pin count */
|
||||
|
||||
void *bi_private;
|
||||
#if defined(CONFIG_BLK_DEV_INTEGRITY)
|
||||
struct bio_integrity_payload *bi_integrity; /* data integrity */
|
||||
#endif
|
||||
|
||||
bio_destructor_t *bi_destructor; /* destructor */
|
||||
};
|
||||
|
|
@ -271,6 +275,29 @@ static inline void *bio_data(struct bio *bio)
|
|||
*/
|
||||
#define bio_get(bio) atomic_inc(&(bio)->bi_cnt)
|
||||
|
||||
#if defined(CONFIG_BLK_DEV_INTEGRITY)
|
||||
/*
|
||||
* bio integrity payload
|
||||
*/
|
||||
struct bio_integrity_payload {
|
||||
struct bio *bip_bio; /* parent bio */
|
||||
struct bio_vec *bip_vec; /* integrity data vector */
|
||||
|
||||
sector_t bip_sector; /* virtual start sector */
|
||||
|
||||
void *bip_buf; /* generated integrity data */
|
||||
bio_end_io_t *bip_end_io; /* saved I/O completion fn */
|
||||
|
||||
int bip_error; /* saved I/O error */
|
||||
unsigned int bip_size;
|
||||
|
||||
unsigned short bip_pool; /* pool the ivec came from */
|
||||
unsigned short bip_vcnt; /* # of integrity bio_vecs */
|
||||
unsigned short bip_idx; /* current bip_vec index */
|
||||
|
||||
struct work_struct bip_work; /* I/O completion */
|
||||
};
|
||||
#endif /* CONFIG_BLK_DEV_INTEGRITY */
|
||||
|
||||
/*
|
||||
* A bio_pair is used when we need to split a bio.
|
||||
|
|
@ -283,10 +310,14 @@ static inline void *bio_data(struct bio *bio)
|
|||
* in bio2.bi_private
|
||||
*/
|
||||
struct bio_pair {
|
||||
struct bio bio1, bio2;
|
||||
struct bio_vec bv1, bv2;
|
||||
atomic_t cnt;
|
||||
int error;
|
||||
struct bio bio1, bio2;
|
||||
struct bio_vec bv1, bv2;
|
||||
#if defined(CONFIG_BLK_DEV_INTEGRITY)
|
||||
struct bio_integrity_payload bip1, bip2;
|
||||
struct bio_vec iv1, iv2;
|
||||
#endif
|
||||
atomic_t cnt;
|
||||
int error;
|
||||
};
|
||||
extern struct bio_pair *bio_split(struct bio *bi, mempool_t *pool,
|
||||
int first_sectors);
|
||||
|
|
@ -333,6 +364,39 @@ extern struct bio *bio_copy_user_iov(struct request_queue *, struct sg_iovec *,
|
|||
int, int);
|
||||
extern int bio_uncopy_user(struct bio *);
|
||||
void zero_fill_bio(struct bio *bio);
|
||||
extern struct bio_vec *bvec_alloc_bs(gfp_t, int, unsigned long *, struct bio_set *);
|
||||
extern unsigned int bvec_nr_vecs(unsigned short idx);
|
||||
|
||||
/*
|
||||
* bio_set is used to allow other portions of the IO system to
|
||||
* allocate their own private memory pools for bio and iovec structures.
|
||||
* These memory pools in turn all allocate from the bio_slab
|
||||
* and the bvec_slabs[].
|
||||
*/
|
||||
#define BIO_POOL_SIZE 2
|
||||
#define BIOVEC_NR_POOLS 6
|
||||
|
||||
struct bio_set {
|
||||
mempool_t *bio_pool;
|
||||
#if defined(CONFIG_BLK_DEV_INTEGRITY)
|
||||
mempool_t *bio_integrity_pool;
|
||||
#endif
|
||||
mempool_t *bvec_pools[BIOVEC_NR_POOLS];
|
||||
};
|
||||
|
||||
struct biovec_slab {
|
||||
int nr_vecs;
|
||||
char *name;
|
||||
struct kmem_cache *slab;
|
||||
};
|
||||
|
||||
extern struct bio_set *fs_bio_set;
|
||||
|
||||
/*
|
||||
* a small number of entries is fine, not going to be performance critical.
|
||||
* basically we just need to survive
|
||||
*/
|
||||
#define BIO_SPLIT_ENTRIES 2
|
||||
|
||||
#ifdef CONFIG_HIGHMEM
|
||||
/*
|
||||
|
|
@ -381,5 +445,63 @@ static inline char *__bio_kmap_irq(struct bio *bio, unsigned short idx,
|
|||
__bio_kmap_irq((bio), (bio)->bi_idx, (flags))
|
||||
#define bio_kunmap_irq(buf,flags) __bio_kunmap_irq(buf, flags)
|
||||
|
||||
#if defined(CONFIG_BLK_DEV_INTEGRITY)
|
||||
|
||||
#define bip_vec_idx(bip, idx) (&(bip->bip_vec[(idx)]))
|
||||
#define bip_vec(bip) bip_vec_idx(bip, 0)
|
||||
|
||||
#define __bip_for_each_vec(bvl, bip, i, start_idx) \
|
||||
for (bvl = bip_vec_idx((bip), (start_idx)), i = (start_idx); \
|
||||
i < (bip)->bip_vcnt; \
|
||||
bvl++, i++)
|
||||
|
||||
#define bip_for_each_vec(bvl, bip, i) \
|
||||
__bip_for_each_vec(bvl, bip, i, (bip)->bip_idx)
|
||||
|
||||
static inline int bio_integrity(struct bio *bio)
|
||||
{
|
||||
#if defined(CONFIG_BLK_DEV_INTEGRITY)
|
||||
return bio->bi_integrity != NULL;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
extern struct bio_integrity_payload *bio_integrity_alloc_bioset(struct bio *, gfp_t, unsigned int, struct bio_set *);
|
||||
extern struct bio_integrity_payload *bio_integrity_alloc(struct bio *, gfp_t, unsigned int);
|
||||
extern void bio_integrity_free(struct bio *, struct bio_set *);
|
||||
extern int bio_integrity_add_page(struct bio *, struct page *, unsigned int, unsigned int);
|
||||
extern int bio_integrity_enabled(struct bio *bio);
|
||||
extern int bio_integrity_set_tag(struct bio *, void *, unsigned int);
|
||||
extern int bio_integrity_get_tag(struct bio *, void *, unsigned int);
|
||||
extern int bio_integrity_prep(struct bio *);
|
||||
extern void bio_integrity_endio(struct bio *, int);
|
||||
extern void bio_integrity_advance(struct bio *, unsigned int);
|
||||
extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int);
|
||||
extern void bio_integrity_split(struct bio *, struct bio_pair *, int);
|
||||
extern int bio_integrity_clone(struct bio *, struct bio *, struct bio_set *);
|
||||
extern int bioset_integrity_create(struct bio_set *, int);
|
||||
extern void bioset_integrity_free(struct bio_set *);
|
||||
extern void bio_integrity_init_slab(void);
|
||||
|
||||
#else /* CONFIG_BLK_DEV_INTEGRITY */
|
||||
|
||||
#define bio_integrity(a) (0)
|
||||
#define bioset_integrity_create(a, b) (0)
|
||||
#define bio_integrity_prep(a) (0)
|
||||
#define bio_integrity_enabled(a) (0)
|
||||
#define bio_integrity_clone(a, b, c) (0)
|
||||
#define bioset_integrity_free(a) do { } while (0)
|
||||
#define bio_integrity_free(a, b) do { } while (0)
|
||||
#define bio_integrity_endio(a, b) do { } while (0)
|
||||
#define bio_integrity_advance(a, b) do { } while (0)
|
||||
#define bio_integrity_trim(a, b, c) do { } while (0)
|
||||
#define bio_integrity_split(a, b, c) do { } while (0)
|
||||
#define bio_integrity_set_tag(a, b, c) do { } while (0)
|
||||
#define bio_integrity_get_tag(a, b, c) do { } while (0)
|
||||
#define bio_integrity_init_slab(a) do { } while (0)
|
||||
|
||||
#endif /* CONFIG_BLK_DEV_INTEGRITY */
|
||||
|
||||
#endif /* CONFIG_BLOCK */
|
||||
#endif /* __LINUX_BIO_H */
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
struct scsi_ioctl_command;
|
||||
|
||||
struct request_queue;
|
||||
typedef struct request_queue request_queue_t __deprecated;
|
||||
struct elevator_queue;
|
||||
typedef struct elevator_queue elevator_t;
|
||||
struct request_pm_state;
|
||||
|
|
@ -34,12 +33,6 @@ struct sg_io_hdr;
|
|||
#define BLKDEV_MIN_RQ 4
|
||||
#define BLKDEV_MAX_RQ 128 /* Default maximum */
|
||||
|
||||
int put_io_context(struct io_context *ioc);
|
||||
void exit_io_context(void);
|
||||
struct io_context *get_io_context(gfp_t gfp_flags, int node);
|
||||
struct io_context *alloc_io_context(gfp_t gfp_flags, int node);
|
||||
void copy_io_context(struct io_context **pdst, struct io_context **psrc);
|
||||
|
||||
struct request;
|
||||
typedef void (rq_end_io_fn)(struct request *, int);
|
||||
|
||||
|
|
@ -113,6 +106,7 @@ enum rq_flag_bits {
|
|||
__REQ_ALLOCED, /* request came from our alloc pool */
|
||||
__REQ_RW_META, /* metadata io request */
|
||||
__REQ_COPY_USER, /* contains copies of user pages */
|
||||
__REQ_INTEGRITY, /* integrity metadata has been remapped */
|
||||
__REQ_NR_BITS, /* stops here */
|
||||
};
|
||||
|
||||
|
|
@ -135,6 +129,7 @@ enum rq_flag_bits {
|
|||
#define REQ_ALLOCED (1 << __REQ_ALLOCED)
|
||||
#define REQ_RW_META (1 << __REQ_RW_META)
|
||||
#define REQ_COPY_USER (1 << __REQ_COPY_USER)
|
||||
#define REQ_INTEGRITY (1 << __REQ_INTEGRITY)
|
||||
|
||||
#define BLK_MAX_CDB 16
|
||||
|
||||
|
|
@ -259,7 +254,14 @@ typedef int (prep_rq_fn) (struct request_queue *, struct request *);
|
|||
typedef void (unplug_fn) (struct request_queue *);
|
||||
|
||||
struct bio_vec;
|
||||
typedef int (merge_bvec_fn) (struct request_queue *, struct bio *, struct bio_vec *);
|
||||
struct bvec_merge_data {
|
||||
struct block_device *bi_bdev;
|
||||
sector_t bi_sector;
|
||||
unsigned bi_size;
|
||||
unsigned long bi_rw;
|
||||
};
|
||||
typedef int (merge_bvec_fn) (struct request_queue *, struct bvec_merge_data *,
|
||||
struct bio_vec *);
|
||||
typedef void (prepare_flush_fn) (struct request_queue *, struct request *);
|
||||
typedef void (softirq_done_fn)(struct request *);
|
||||
typedef int (dma_drain_needed_fn)(struct request *);
|
||||
|
|
@ -426,6 +428,32 @@ static inline void queue_flag_set_unlocked(unsigned int flag,
|
|||
__set_bit(flag, &q->queue_flags);
|
||||
}
|
||||
|
||||
static inline int queue_flag_test_and_clear(unsigned int flag,
|
||||
struct request_queue *q)
|
||||
{
|
||||
WARN_ON_ONCE(!queue_is_locked(q));
|
||||
|
||||
if (test_bit(flag, &q->queue_flags)) {
|
||||
__clear_bit(flag, &q->queue_flags);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int queue_flag_test_and_set(unsigned int flag,
|
||||
struct request_queue *q)
|
||||
{
|
||||
WARN_ON_ONCE(!queue_is_locked(q));
|
||||
|
||||
if (!test_bit(flag, &q->queue_flags)) {
|
||||
__set_bit(flag, &q->queue_flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline void queue_flag_set(unsigned int flag, struct request_queue *q)
|
||||
{
|
||||
WARN_ON_ONCE(!queue_is_locked(q));
|
||||
|
|
@ -676,7 +704,6 @@ extern int blk_execute_rq(struct request_queue *, struct gendisk *,
|
|||
struct request *, int);
|
||||
extern void blk_execute_rq_nowait(struct request_queue *, struct gendisk *,
|
||||
struct request *, int, rq_end_io_fn *);
|
||||
extern int blk_verify_command(unsigned char *, int);
|
||||
extern void blk_unplug(struct request_queue *q);
|
||||
|
||||
static inline struct request_queue *bdev_get_queue(struct block_device *bdev)
|
||||
|
|
@ -749,6 +776,7 @@ extern void blk_queue_max_segment_size(struct request_queue *, unsigned int);
|
|||
extern void blk_queue_hardsect_size(struct request_queue *, unsigned short);
|
||||
extern void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b);
|
||||
extern void blk_queue_dma_pad(struct request_queue *, unsigned int);
|
||||
extern void blk_queue_update_dma_pad(struct request_queue *, unsigned int);
|
||||
extern int blk_queue_dma_drain(struct request_queue *q,
|
||||
dma_drain_needed_fn *dma_drain_needed,
|
||||
void *buf, unsigned int size);
|
||||
|
|
@ -802,6 +830,15 @@ static inline struct request *blk_map_queue_find_tag(struct blk_queue_tag *bqt,
|
|||
|
||||
extern int blkdev_issue_flush(struct block_device *, sector_t *);
|
||||
|
||||
/*
|
||||
* command filter functions
|
||||
*/
|
||||
extern int blk_verify_command(struct file *file, unsigned char *cmd);
|
||||
extern int blk_cmd_filter_verify_command(struct blk_scsi_cmd_filter *filter,
|
||||
unsigned char *cmd, mode_t *f_mode);
|
||||
extern int blk_register_filter(struct gendisk *disk);
|
||||
extern void blk_unregister_filter(struct gendisk *disk);
|
||||
|
||||
#define MAX_PHYS_SEGMENTS 128
|
||||
#define MAX_HW_SEGMENTS 128
|
||||
#define SAFE_MAX_SECTORS 255
|
||||
|
|
@ -865,6 +902,105 @@ void kblockd_flush_work(struct work_struct *work);
|
|||
#define MODULE_ALIAS_BLOCKDEV_MAJOR(major) \
|
||||
MODULE_ALIAS("block-major-" __stringify(major) "-*")
|
||||
|
||||
#if defined(CONFIG_BLK_DEV_INTEGRITY)
|
||||
|
||||
#define INTEGRITY_FLAG_READ 2 /* verify data integrity on read */
|
||||
#define INTEGRITY_FLAG_WRITE 4 /* generate data integrity on write */
|
||||
|
||||
struct blk_integrity_exchg {
|
||||
void *prot_buf;
|
||||
void *data_buf;
|
||||
sector_t sector;
|
||||
unsigned int data_size;
|
||||
unsigned short sector_size;
|
||||
const char *disk_name;
|
||||
};
|
||||
|
||||
typedef void (integrity_gen_fn) (struct blk_integrity_exchg *);
|
||||
typedef int (integrity_vrfy_fn) (struct blk_integrity_exchg *);
|
||||
typedef void (integrity_set_tag_fn) (void *, void *, unsigned int);
|
||||
typedef void (integrity_get_tag_fn) (void *, void *, unsigned int);
|
||||
|
||||
struct blk_integrity {
|
||||
integrity_gen_fn *generate_fn;
|
||||
integrity_vrfy_fn *verify_fn;
|
||||
integrity_set_tag_fn *set_tag_fn;
|
||||
integrity_get_tag_fn *get_tag_fn;
|
||||
|
||||
unsigned short flags;
|
||||
unsigned short tuple_size;
|
||||
unsigned short sector_size;
|
||||
unsigned short tag_size;
|
||||
|
||||
const char *name;
|
||||
|
||||
struct kobject kobj;
|
||||
};
|
||||
|
||||
extern int blk_integrity_register(struct gendisk *, struct blk_integrity *);
|
||||
extern void blk_integrity_unregister(struct gendisk *);
|
||||
extern int blk_integrity_compare(struct block_device *, struct block_device *);
|
||||
extern int blk_rq_map_integrity_sg(struct request *, struct scatterlist *);
|
||||
extern int blk_rq_count_integrity_sg(struct request *);
|
||||
|
||||
static inline unsigned short blk_integrity_tuple_size(struct blk_integrity *bi)
|
||||
{
|
||||
if (bi)
|
||||
return bi->tuple_size;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline struct blk_integrity *bdev_get_integrity(struct block_device *bdev)
|
||||
{
|
||||
return bdev->bd_disk->integrity;
|
||||
}
|
||||
|
||||
static inline unsigned int bdev_get_tag_size(struct block_device *bdev)
|
||||
{
|
||||
struct blk_integrity *bi = bdev_get_integrity(bdev);
|
||||
|
||||
if (bi)
|
||||
return bi->tag_size;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int bdev_integrity_enabled(struct block_device *bdev, int rw)
|
||||
{
|
||||
struct blk_integrity *bi = bdev_get_integrity(bdev);
|
||||
|
||||
if (bi == NULL)
|
||||
return 0;
|
||||
|
||||
if (rw == READ && bi->verify_fn != NULL &&
|
||||
(bi->flags & INTEGRITY_FLAG_READ))
|
||||
return 1;
|
||||
|
||||
if (rw == WRITE && bi->generate_fn != NULL &&
|
||||
(bi->flags & INTEGRITY_FLAG_WRITE))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int blk_integrity_rq(struct request *rq)
|
||||
{
|
||||
return bio_integrity(rq->bio);
|
||||
}
|
||||
|
||||
#else /* CONFIG_BLK_DEV_INTEGRITY */
|
||||
|
||||
#define blk_integrity_rq(rq) (0)
|
||||
#define blk_rq_count_integrity_sg(a) (0)
|
||||
#define blk_rq_map_integrity_sg(a, b) (0)
|
||||
#define bdev_get_integrity(a) (0)
|
||||
#define bdev_get_tag_size(a) (0)
|
||||
#define blk_integrity_compare(a, b) (0)
|
||||
#define blk_integrity_register(a, b) (0)
|
||||
#define blk_integrity_unregister(a) do { } while (0);
|
||||
|
||||
#endif /* CONFIG_BLK_DEV_INTEGRITY */
|
||||
|
||||
#else /* CONFIG_BLOCK */
|
||||
/*
|
||||
|
|
@ -877,17 +1013,6 @@ static inline long nr_blockdev_pages(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline void exit_io_context(void)
|
||||
{
|
||||
}
|
||||
|
||||
struct io_context;
|
||||
static inline int put_io_context(struct io_context *ioc)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
#endif /* CONFIG_BLOCK */
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -129,6 +129,7 @@ struct blk_trace {
|
|||
u32 dev;
|
||||
struct dentry *dir;
|
||||
struct dentry *dropped_file;
|
||||
struct dentry *msg_file;
|
||||
atomic_t dropped;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -84,6 +84,8 @@ extern int reserve_bootmem(unsigned long addr, unsigned long size, int flags);
|
|||
__alloc_bootmem_low(x, PAGE_SIZE, 0)
|
||||
#endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */
|
||||
|
||||
extern int reserve_bootmem_generic(unsigned long addr, unsigned long size,
|
||||
int flags);
|
||||
extern unsigned long free_all_bootmem(void);
|
||||
extern unsigned long free_all_bootmem_node(pg_data_t *pgdat);
|
||||
extern void *__alloc_bootmem_node(pg_data_t *pgdat,
|
||||
|
|
|
|||
|
|
@ -108,6 +108,8 @@ struct console {
|
|||
struct console *next;
|
||||
};
|
||||
|
||||
extern int console_set_on_cmdline;
|
||||
|
||||
extern int add_preferred_console(char *name, int idx, char *options);
|
||||
extern int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, char *options);
|
||||
extern void register_console(struct console *);
|
||||
|
|
|
|||
|
|
@ -30,15 +30,17 @@
|
|||
*/
|
||||
#define CRYPTO_ALG_TYPE_MASK 0x0000000f
|
||||
#define CRYPTO_ALG_TYPE_CIPHER 0x00000001
|
||||
#define CRYPTO_ALG_TYPE_DIGEST 0x00000002
|
||||
#define CRYPTO_ALG_TYPE_HASH 0x00000003
|
||||
#define CRYPTO_ALG_TYPE_COMPRESS 0x00000002
|
||||
#define CRYPTO_ALG_TYPE_AEAD 0x00000003
|
||||
#define CRYPTO_ALG_TYPE_BLKCIPHER 0x00000004
|
||||
#define CRYPTO_ALG_TYPE_ABLKCIPHER 0x00000005
|
||||
#define CRYPTO_ALG_TYPE_GIVCIPHER 0x00000006
|
||||
#define CRYPTO_ALG_TYPE_COMPRESS 0x00000008
|
||||
#define CRYPTO_ALG_TYPE_AEAD 0x00000009
|
||||
#define CRYPTO_ALG_TYPE_DIGEST 0x00000008
|
||||
#define CRYPTO_ALG_TYPE_HASH 0x00000009
|
||||
#define CRYPTO_ALG_TYPE_AHASH 0x0000000a
|
||||
|
||||
#define CRYPTO_ALG_TYPE_HASH_MASK 0x0000000e
|
||||
#define CRYPTO_ALG_TYPE_AHASH_MASK 0x0000000c
|
||||
#define CRYPTO_ALG_TYPE_BLKCIPHER_MASK 0x0000000c
|
||||
|
||||
#define CRYPTO_ALG_LARVAL 0x00000010
|
||||
|
|
@ -102,6 +104,7 @@ struct crypto_async_request;
|
|||
struct crypto_aead;
|
||||
struct crypto_blkcipher;
|
||||
struct crypto_hash;
|
||||
struct crypto_ahash;
|
||||
struct crypto_tfm;
|
||||
struct crypto_type;
|
||||
struct aead_givcrypt_request;
|
||||
|
|
@ -131,6 +134,16 @@ struct ablkcipher_request {
|
|||
void *__ctx[] CRYPTO_MINALIGN_ATTR;
|
||||
};
|
||||
|
||||
struct ahash_request {
|
||||
struct crypto_async_request base;
|
||||
|
||||
unsigned int nbytes;
|
||||
struct scatterlist *src;
|
||||
u8 *result;
|
||||
|
||||
void *__ctx[] CRYPTO_MINALIGN_ATTR;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct aead_request - AEAD request
|
||||
* @base: Common attributes for async crypto requests
|
||||
|
|
@ -195,6 +208,17 @@ struct ablkcipher_alg {
|
|||
unsigned int ivsize;
|
||||
};
|
||||
|
||||
struct ahash_alg {
|
||||
int (*init)(struct ahash_request *req);
|
||||
int (*update)(struct ahash_request *req);
|
||||
int (*final)(struct ahash_request *req);
|
||||
int (*digest)(struct ahash_request *req);
|
||||
int (*setkey)(struct crypto_ahash *tfm, const u8 *key,
|
||||
unsigned int keylen);
|
||||
|
||||
unsigned int digestsize;
|
||||
};
|
||||
|
||||
struct aead_alg {
|
||||
int (*setkey)(struct crypto_aead *tfm, const u8 *key,
|
||||
unsigned int keylen);
|
||||
|
|
@ -272,6 +296,7 @@ struct compress_alg {
|
|||
#define cra_cipher cra_u.cipher
|
||||
#define cra_digest cra_u.digest
|
||||
#define cra_hash cra_u.hash
|
||||
#define cra_ahash cra_u.ahash
|
||||
#define cra_compress cra_u.compress
|
||||
|
||||
struct crypto_alg {
|
||||
|
|
@ -298,6 +323,7 @@ struct crypto_alg {
|
|||
struct cipher_alg cipher;
|
||||
struct digest_alg digest;
|
||||
struct hash_alg hash;
|
||||
struct ahash_alg ahash;
|
||||
struct compress_alg compress;
|
||||
} cra_u;
|
||||
|
||||
|
|
@ -383,6 +409,18 @@ struct hash_tfm {
|
|||
unsigned int digestsize;
|
||||
};
|
||||
|
||||
struct ahash_tfm {
|
||||
int (*init)(struct ahash_request *req);
|
||||
int (*update)(struct ahash_request *req);
|
||||
int (*final)(struct ahash_request *req);
|
||||
int (*digest)(struct ahash_request *req);
|
||||
int (*setkey)(struct crypto_ahash *tfm, const u8 *key,
|
||||
unsigned int keylen);
|
||||
|
||||
unsigned int digestsize;
|
||||
unsigned int reqsize;
|
||||
};
|
||||
|
||||
struct compress_tfm {
|
||||
int (*cot_compress)(struct crypto_tfm *tfm,
|
||||
const u8 *src, unsigned int slen,
|
||||
|
|
@ -397,6 +435,7 @@ struct compress_tfm {
|
|||
#define crt_blkcipher crt_u.blkcipher
|
||||
#define crt_cipher crt_u.cipher
|
||||
#define crt_hash crt_u.hash
|
||||
#define crt_ahash crt_u.ahash
|
||||
#define crt_compress crt_u.compress
|
||||
|
||||
struct crypto_tfm {
|
||||
|
|
@ -409,6 +448,7 @@ struct crypto_tfm {
|
|||
struct blkcipher_tfm blkcipher;
|
||||
struct cipher_tfm cipher;
|
||||
struct hash_tfm hash;
|
||||
struct ahash_tfm ahash;
|
||||
struct compress_tfm compress;
|
||||
} crt_u;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ static inline void ndelay(unsigned long x)
|
|||
#define ndelay(x) ndelay(x)
|
||||
#endif
|
||||
|
||||
extern unsigned long lpj_fine;
|
||||
void calibrate_delay(void);
|
||||
void msleep(unsigned int msecs);
|
||||
unsigned long msleep_interruptible(unsigned int msecs);
|
||||
|
|
|
|||
|
|
@ -287,7 +287,6 @@ efi_guid_unparse(efi_guid_t *guid, char *out)
|
|||
extern void efi_init (void);
|
||||
extern void *efi_get_pal_addr (void);
|
||||
extern void efi_map_pal_code (void);
|
||||
extern void efi_map_memmap(void);
|
||||
extern void efi_memmap_walk (efi_freemem_callback_t callback, void *arg);
|
||||
extern void efi_gettimeofday (struct timespec *ts);
|
||||
extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if possible */
|
||||
|
|
@ -295,14 +294,11 @@ extern u64 efi_get_iobase (void);
|
|||
extern u32 efi_mem_type (unsigned long phys_addr);
|
||||
extern u64 efi_mem_attributes (unsigned long phys_addr);
|
||||
extern u64 efi_mem_attribute (unsigned long phys_addr, unsigned long size);
|
||||
extern int efi_mem_attribute_range (unsigned long phys_addr, unsigned long size,
|
||||
u64 attr);
|
||||
extern int __init efi_uart_console_only (void);
|
||||
extern void efi_initialize_iomem_resources(struct resource *code_resource,
|
||||
struct resource *data_resource, struct resource *bss_resource);
|
||||
extern unsigned long efi_get_time(void);
|
||||
extern int efi_set_rtc_mmss(unsigned long nowtime);
|
||||
extern int is_available_memory(efi_memory_desc_t * md);
|
||||
extern struct efi_memory_map memmap;
|
||||
|
||||
/**
|
||||
|
|
|
|||
74
include/linux/firmware-map.h
Normal file
74
include/linux/firmware-map.h
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* include/linux/firmware-map.h:
|
||||
* Copyright (C) 2008 SUSE LINUX Products GmbH
|
||||
* by Bernhard Walle <bwalle@suse.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License v2.0 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.
|
||||
*
|
||||
*/
|
||||
#ifndef _LINUX_FIRMWARE_MAP_H
|
||||
#define _LINUX_FIRMWARE_MAP_H
|
||||
|
||||
#include <linux/list.h>
|
||||
#include <linux/kobject.h>
|
||||
|
||||
/*
|
||||
* provide a dummy interface if CONFIG_FIRMWARE_MEMMAP is disabled
|
||||
*/
|
||||
#ifdef CONFIG_FIRMWARE_MEMMAP
|
||||
|
||||
/**
|
||||
* Adds a firmware mapping entry. This function uses kmalloc() for memory
|
||||
* allocation. Use firmware_map_add_early() if you want to use the bootmem
|
||||
* allocator.
|
||||
*
|
||||
* That function must be called before late_initcall.
|
||||
*
|
||||
* @start: Start of the memory range.
|
||||
* @end: End of the memory range (inclusive).
|
||||
* @type: Type of the memory range.
|
||||
*
|
||||
* Returns 0 on success, or -ENOMEM if no memory could be allocated.
|
||||
*/
|
||||
int firmware_map_add(resource_size_t start, resource_size_t end,
|
||||
const char *type);
|
||||
|
||||
/**
|
||||
* Adds a firmware mapping entry. This function uses the bootmem allocator
|
||||
* for memory allocation. Use firmware_map_add() if you want to use kmalloc().
|
||||
*
|
||||
* That function must be called before late_initcall.
|
||||
*
|
||||
* @start: Start of the memory range.
|
||||
* @end: End of the memory range (inclusive).
|
||||
* @type: Type of the memory range.
|
||||
*
|
||||
* Returns 0 on success, or -ENOMEM if no memory could be allocated.
|
||||
*/
|
||||
int firmware_map_add_early(resource_size_t start, resource_size_t end,
|
||||
const char *type);
|
||||
|
||||
#else /* CONFIG_FIRMWARE_MEMMAP */
|
||||
|
||||
static inline int firmware_map_add(resource_size_t start, resource_size_t end,
|
||||
const char *type)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int firmware_map_add_early(resource_size_t start,
|
||||
resource_size_t end, const char *type)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_FIRMWARE_MEMMAP */
|
||||
|
||||
#endif /* _LINUX_FIRMWARE_MAP_H */
|
||||
|
|
@ -1870,7 +1870,8 @@ extern void
|
|||
file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
|
||||
extern loff_t no_llseek(struct file *file, loff_t offset, int origin);
|
||||
extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin);
|
||||
extern loff_t remote_llseek(struct file *file, loff_t offset, int origin);
|
||||
extern loff_t generic_file_llseek_unlocked(struct file *file, loff_t offset,
|
||||
int origin);
|
||||
extern int generic_file_open(struct inode * inode, struct file * filp);
|
||||
extern int nonseekable_open(struct inode * inode, struct file * filp);
|
||||
|
||||
|
|
|
|||
144
include/linux/ftrace.h
Normal file
144
include/linux/ftrace.h
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
#ifndef _LINUX_FTRACE_H
|
||||
#define _LINUX_FTRACE_H
|
||||
|
||||
#ifdef CONFIG_FTRACE
|
||||
|
||||
#include <linux/linkage.h>
|
||||
#include <linux/fs.h>
|
||||
|
||||
extern int ftrace_enabled;
|
||||
extern int
|
||||
ftrace_enable_sysctl(struct ctl_table *table, int write,
|
||||
struct file *filp, void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
|
||||
typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip);
|
||||
|
||||
struct ftrace_ops {
|
||||
ftrace_func_t func;
|
||||
struct ftrace_ops *next;
|
||||
};
|
||||
|
||||
/*
|
||||
* The ftrace_ops must be a static and should also
|
||||
* be read_mostly. These functions do modify read_mostly variables
|
||||
* so use them sparely. Never free an ftrace_op or modify the
|
||||
* next pointer after it has been registered. Even after unregistering
|
||||
* it, the next pointer may still be used internally.
|
||||
*/
|
||||
int register_ftrace_function(struct ftrace_ops *ops);
|
||||
int unregister_ftrace_function(struct ftrace_ops *ops);
|
||||
void clear_ftrace_function(void);
|
||||
|
||||
extern void ftrace_stub(unsigned long a0, unsigned long a1);
|
||||
|
||||
#else /* !CONFIG_FTRACE */
|
||||
# define register_ftrace_function(ops) do { } while (0)
|
||||
# define unregister_ftrace_function(ops) do { } while (0)
|
||||
# define clear_ftrace_function(ops) do { } while (0)
|
||||
#endif /* CONFIG_FTRACE */
|
||||
|
||||
#ifdef CONFIG_DYNAMIC_FTRACE
|
||||
# define FTRACE_HASHBITS 10
|
||||
# define FTRACE_HASHSIZE (1<<FTRACE_HASHBITS)
|
||||
|
||||
enum {
|
||||
FTRACE_FL_FREE = (1 << 0),
|
||||
FTRACE_FL_FAILED = (1 << 1),
|
||||
FTRACE_FL_FILTER = (1 << 2),
|
||||
FTRACE_FL_ENABLED = (1 << 3),
|
||||
FTRACE_FL_NOTRACE = (1 << 4),
|
||||
FTRACE_FL_CONVERTED = (1 << 5),
|
||||
FTRACE_FL_FROZEN = (1 << 6),
|
||||
};
|
||||
|
||||
struct dyn_ftrace {
|
||||
struct hlist_node node;
|
||||
unsigned long ip; /* address of mcount call-site */
|
||||
unsigned long flags;
|
||||
};
|
||||
|
||||
int ftrace_force_update(void);
|
||||
void ftrace_set_filter(unsigned char *buf, int len, int reset);
|
||||
|
||||
/* defined in arch */
|
||||
extern int ftrace_ip_converted(unsigned long ip);
|
||||
extern unsigned char *ftrace_nop_replace(void);
|
||||
extern unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr);
|
||||
extern int ftrace_dyn_arch_init(void *data);
|
||||
extern int ftrace_mcount_set(unsigned long *data);
|
||||
extern int ftrace_modify_code(unsigned long ip, unsigned char *old_code,
|
||||
unsigned char *new_code);
|
||||
extern int ftrace_update_ftrace_func(ftrace_func_t func);
|
||||
extern void ftrace_caller(void);
|
||||
extern void ftrace_call(void);
|
||||
extern void mcount_call(void);
|
||||
|
||||
extern int skip_trace(unsigned long ip);
|
||||
|
||||
void ftrace_disable_daemon(void);
|
||||
void ftrace_enable_daemon(void);
|
||||
|
||||
#else
|
||||
# define skip_trace(ip) ({ 0; })
|
||||
# define ftrace_force_update() ({ 0; })
|
||||
# define ftrace_set_filter(buf, len, reset) do { } while (0)
|
||||
# define ftrace_disable_daemon() do { } while (0)
|
||||
# define ftrace_enable_daemon() do { } while (0)
|
||||
#endif /* CONFIG_DYNAMIC_FTRACE */
|
||||
|
||||
/* totally disable ftrace - can not re-enable after this */
|
||||
void ftrace_kill(void);
|
||||
void ftrace_kill_atomic(void);
|
||||
|
||||
static inline void tracer_disable(void)
|
||||
{
|
||||
#ifdef CONFIG_FTRACE
|
||||
ftrace_enabled = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FRAME_POINTER
|
||||
/* TODO: need to fix this for ARM */
|
||||
# define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0))
|
||||
# define CALLER_ADDR1 ((unsigned long)__builtin_return_address(1))
|
||||
# define CALLER_ADDR2 ((unsigned long)__builtin_return_address(2))
|
||||
# define CALLER_ADDR3 ((unsigned long)__builtin_return_address(3))
|
||||
# define CALLER_ADDR4 ((unsigned long)__builtin_return_address(4))
|
||||
# define CALLER_ADDR5 ((unsigned long)__builtin_return_address(5))
|
||||
# define CALLER_ADDR6 ((unsigned long)__builtin_return_address(6))
|
||||
#else
|
||||
# define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0))
|
||||
# define CALLER_ADDR1 0UL
|
||||
# define CALLER_ADDR2 0UL
|
||||
# define CALLER_ADDR3 0UL
|
||||
# define CALLER_ADDR4 0UL
|
||||
# define CALLER_ADDR5 0UL
|
||||
# define CALLER_ADDR6 0UL
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IRQSOFF_TRACER
|
||||
extern void time_hardirqs_on(unsigned long a0, unsigned long a1);
|
||||
extern void time_hardirqs_off(unsigned long a0, unsigned long a1);
|
||||
#else
|
||||
# define time_hardirqs_on(a0, a1) do { } while (0)
|
||||
# define time_hardirqs_off(a0, a1) do { } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PREEMPT_TRACER
|
||||
extern void trace_preempt_on(unsigned long a0, unsigned long a1);
|
||||
extern void trace_preempt_off(unsigned long a0, unsigned long a1);
|
||||
#else
|
||||
# define trace_preempt_on(a0, a1) do { } while (0)
|
||||
# define trace_preempt_off(a0, a1) do { } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TRACING
|
||||
extern void
|
||||
ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3);
|
||||
#else
|
||||
static inline void
|
||||
ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { }
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_FTRACE_H */
|
||||
|
|
@ -110,6 +110,14 @@ struct hd_struct {
|
|||
#define GENHD_FL_SUPPRESS_PARTITION_INFO 32
|
||||
#define GENHD_FL_FAIL 64
|
||||
|
||||
#define BLK_SCSI_MAX_CMDS (256)
|
||||
#define BLK_SCSI_CMD_PER_LONG (BLK_SCSI_MAX_CMDS / (sizeof(long) * 8))
|
||||
|
||||
struct blk_scsi_cmd_filter {
|
||||
unsigned long read_ok[BLK_SCSI_CMD_PER_LONG];
|
||||
unsigned long write_ok[BLK_SCSI_CMD_PER_LONG];
|
||||
struct kobject kobj;
|
||||
};
|
||||
|
||||
struct gendisk {
|
||||
int major; /* major number of driver */
|
||||
|
|
@ -120,6 +128,7 @@ struct gendisk {
|
|||
struct hd_struct **part; /* [indexed by minor] */
|
||||
struct block_device_operations *fops;
|
||||
struct request_queue *queue;
|
||||
struct blk_scsi_cmd_filter cmd_filter;
|
||||
void *private_data;
|
||||
sector_t capacity;
|
||||
|
||||
|
|
@ -141,6 +150,9 @@ struct gendisk {
|
|||
struct disk_stats dkstats;
|
||||
#endif
|
||||
struct work_struct async_notify;
|
||||
#ifdef CONFIG_BLK_DEV_INTEGRITY
|
||||
struct blk_integrity *integrity;
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -285,12 +285,11 @@ enum
|
|||
struct softirq_action
|
||||
{
|
||||
void (*action)(struct softirq_action *);
|
||||
void *data;
|
||||
};
|
||||
|
||||
asmlinkage void do_softirq(void);
|
||||
asmlinkage void __do_softirq(void);
|
||||
extern void open_softirq(int nr, void (*action)(struct softirq_action*), void *data);
|
||||
extern void open_softirq(int nr, void (*action)(struct softirq_action *));
|
||||
extern void softirq_init(void);
|
||||
#define __raise_softirq_irqoff(nr) do { or_softirq_pending(1UL << (nr)); } while (0)
|
||||
extern void raise_softirq_irqoff(unsigned int nr);
|
||||
|
|
|
|||
|
|
@ -99,4 +99,22 @@ static inline struct io_context *ioc_task_link(struct io_context *ioc)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BLOCK
|
||||
int put_io_context(struct io_context *ioc);
|
||||
void exit_io_context(void);
|
||||
struct io_context *get_io_context(gfp_t gfp_flags, int node);
|
||||
struct io_context *alloc_io_context(gfp_t gfp_flags, int node);
|
||||
void copy_io_context(struct io_context **pdst, struct io_context **psrc);
|
||||
#else
|
||||
static inline void exit_io_context(void)
|
||||
{
|
||||
}
|
||||
|
||||
struct io_context;
|
||||
static inline int put_io_context(struct io_context *ioc)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@
|
|||
#define _LINUX_TRACE_IRQFLAGS_H
|
||||
|
||||
#ifdef CONFIG_TRACE_IRQFLAGS
|
||||
extern void trace_hardirqs_on(void);
|
||||
extern void trace_hardirqs_off(void);
|
||||
extern void trace_softirqs_on(unsigned long ip);
|
||||
extern void trace_softirqs_off(unsigned long ip);
|
||||
extern void trace_hardirqs_on(void);
|
||||
extern void trace_hardirqs_off(void);
|
||||
# define trace_hardirq_context(p) ((p)->hardirq_context)
|
||||
# define trace_softirq_context(p) ((p)->softirq_context)
|
||||
# define trace_hardirqs_enabled(p) ((p)->hardirqs_enabled)
|
||||
|
|
@ -41,6 +41,15 @@
|
|||
# define INIT_TRACE_IRQFLAGS
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_IRQSOFF_TRACER) || \
|
||||
defined(CONFIG_PREEMPT_TRACER)
|
||||
extern void stop_critical_timings(void);
|
||||
extern void start_critical_timings(void);
|
||||
#else
|
||||
# define stop_critical_timings() do { } while (0)
|
||||
# define start_critical_timings() do { } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
|
||||
|
||||
#include <asm/irqflags.h>
|
||||
|
|
|
|||
|
|
@ -187,9 +187,6 @@ asmlinkage int vprintk(const char *fmt, va_list args)
|
|||
__attribute__ ((format (printf, 1, 0)));
|
||||
asmlinkage int printk(const char * fmt, ...)
|
||||
__attribute__ ((format (printf, 1, 2))) __cold;
|
||||
extern int log_buf_get_len(void);
|
||||
extern int log_buf_read(int idx);
|
||||
extern int log_buf_copy(char *dest, int idx, int len);
|
||||
|
||||
extern int printk_ratelimit_jiffies;
|
||||
extern int printk_ratelimit_burst;
|
||||
|
|
@ -205,9 +202,6 @@ static inline int vprintk(const char *s, va_list args) { return 0; }
|
|||
static inline int printk(const char *s, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
static inline int __cold printk(const char *s, ...) { return 0; }
|
||||
static inline int log_buf_get_len(void) { return 0; }
|
||||
static inline int log_buf_read(int idx) { return 0; }
|
||||
static inline int log_buf_copy(char *dest, int idx, int len) { return 0; }
|
||||
static inline int printk_ratelimit(void) { return 0; }
|
||||
static inline int __printk_ratelimit(int ratelimit_jiffies, \
|
||||
int ratelimit_burst) { return 0; }
|
||||
|
|
@ -216,7 +210,7 @@ static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \
|
|||
{ return false; }
|
||||
#endif
|
||||
|
||||
extern void __attribute__((format(printf, 1, 2)))
|
||||
extern void asmlinkage __attribute__((format(printf, 1, 2)))
|
||||
early_printk(const char *fmt, ...);
|
||||
|
||||
unsigned long int_sqrt(unsigned long);
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
#ifndef _LINUX_KERNEL_STAT_H
|
||||
#define _LINUX_KERNEL_STAT_H
|
||||
|
||||
#include <asm/irq.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/threads.h>
|
||||
#include <linux/percpu.h>
|
||||
#include <linux/cpumask.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/cputime.h>
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -259,6 +259,10 @@ void recycle_rp_inst(struct kretprobe_instance *ri, struct hlist_head *head);
|
|||
struct jprobe;
|
||||
struct kretprobe;
|
||||
|
||||
static inline struct kprobe *get_kprobe(void *addr)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
static inline struct kprobe *kprobe_running(void)
|
||||
{
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
#ifndef _LINUX_LINKAGE_H
|
||||
#define _LINUX_LINKAGE_H
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <asm/linkage.h>
|
||||
|
||||
#define notrace __attribute__((no_instrument_function))
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define CPP_ASMLINKAGE extern "C"
|
||||
#else
|
||||
|
|
@ -17,6 +20,9 @@
|
|||
# define asmregparm
|
||||
#endif
|
||||
|
||||
#define __page_aligned_data __section(.data.page_aligned) __aligned(PAGE_SIZE)
|
||||
#define __page_aligned_bss __section(.bss.page_aligned) __aligned(PAGE_SIZE)
|
||||
|
||||
/*
|
||||
* This is used by architectures to keep arguments on the stack
|
||||
* untouched by the compiler by keeping them live until the end.
|
||||
|
|
|
|||
|
|
@ -182,6 +182,9 @@ struct lock_list {
|
|||
* We record lock dependency chains, so that we can cache them:
|
||||
*/
|
||||
struct lock_chain {
|
||||
u8 irq_context;
|
||||
u8 depth;
|
||||
u16 base;
|
||||
struct list_head entry;
|
||||
u64 chain_key;
|
||||
};
|
||||
|
|
@ -275,14 +278,6 @@ extern void lockdep_init_map(struct lockdep_map *lock, const char *name,
|
|||
lockdep_init_map(&(lock)->dep_map, #lock, \
|
||||
(lock)->dep_map.key, sub)
|
||||
|
||||
/*
|
||||
* To initialize a lockdep_map statically use this macro.
|
||||
* Note that _name must not be NULL.
|
||||
*/
|
||||
#define STATIC_LOCKDEP_MAP_INIT(_name, _key) \
|
||||
{ .name = (_name), .key = (void *)(_key), }
|
||||
|
||||
|
||||
/*
|
||||
* Acquire a lock.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ struct marker {
|
|||
*/
|
||||
char state; /* Marker state. */
|
||||
char ptype; /* probe type : 0 : single, 1 : multi */
|
||||
void (*call)(const struct marker *mdata, /* Probe wrapper */
|
||||
void *call_private, const char *fmt, ...);
|
||||
/* Probe wrapper */
|
||||
void (*call)(const struct marker *mdata, void *call_private, ...);
|
||||
struct marker_probe_closure single;
|
||||
struct marker_probe_closure *multi;
|
||||
} __attribute__((aligned(8)));
|
||||
|
|
@ -58,8 +58,12 @@ struct marker {
|
|||
* Make sure the alignment of the structure in the __markers section will
|
||||
* not add unwanted padding between the beginning of the section and the
|
||||
* structure. Force alignment to the same alignment as the section start.
|
||||
*
|
||||
* The "generic" argument controls which marker enabling mechanism must be used.
|
||||
* If generic is true, a variable read is used.
|
||||
* If generic is false, immediate values are used.
|
||||
*/
|
||||
#define __trace_mark(name, call_private, format, args...) \
|
||||
#define __trace_mark(generic, name, call_private, format, args...) \
|
||||
do { \
|
||||
static const char __mstrtab_##name[] \
|
||||
__attribute__((section("__markers_strings"))) \
|
||||
|
|
@ -72,15 +76,14 @@ struct marker {
|
|||
__mark_check_format(format, ## args); \
|
||||
if (unlikely(__mark_##name.state)) { \
|
||||
(*__mark_##name.call) \
|
||||
(&__mark_##name, call_private, \
|
||||
format, ## args); \
|
||||
(&__mark_##name, call_private, ## args);\
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
extern void marker_update_probe_range(struct marker *begin,
|
||||
struct marker *end);
|
||||
#else /* !CONFIG_MARKERS */
|
||||
#define __trace_mark(name, call_private, format, args...) \
|
||||
#define __trace_mark(generic, name, call_private, format, args...) \
|
||||
__mark_check_format(format, ## args)
|
||||
static inline void marker_update_probe_range(struct marker *begin,
|
||||
struct marker *end)
|
||||
|
|
@ -88,15 +91,30 @@ static inline void marker_update_probe_range(struct marker *begin,
|
|||
#endif /* CONFIG_MARKERS */
|
||||
|
||||
/**
|
||||
* trace_mark - Marker
|
||||
* trace_mark - Marker using code patching
|
||||
* @name: marker name, not quoted.
|
||||
* @format: format string
|
||||
* @args...: variable argument list
|
||||
*
|
||||
* Places a marker.
|
||||
* Places a marker using optimized code patching technique (imv_read())
|
||||
* to be enabled when immediate values are present.
|
||||
*/
|
||||
#define trace_mark(name, format, args...) \
|
||||
__trace_mark(name, NULL, format, ## args)
|
||||
__trace_mark(0, name, NULL, format, ## args)
|
||||
|
||||
/**
|
||||
* _trace_mark - Marker using variable read
|
||||
* @name: marker name, not quoted.
|
||||
* @format: format string
|
||||
* @args...: variable argument list
|
||||
*
|
||||
* Places a marker using a standard memory read (_imv_read()) to be
|
||||
* enabled. Should be used for markers in code paths where instruction
|
||||
* modification based enabling is not welcome. (__init and __exit functions,
|
||||
* lockdep, some traps, printk).
|
||||
*/
|
||||
#define _trace_mark(name, format, args...) \
|
||||
__trace_mark(1, name, NULL, format, ## args)
|
||||
|
||||
/**
|
||||
* MARK_NOARGS - Format string for a marker with no argument.
|
||||
|
|
@ -117,9 +135,9 @@ static inline void __printf(1, 2) ___mark_check_format(const char *fmt, ...)
|
|||
extern marker_probe_func __mark_empty_function;
|
||||
|
||||
extern void marker_probe_cb(const struct marker *mdata,
|
||||
void *call_private, const char *fmt, ...);
|
||||
void *call_private, ...);
|
||||
extern void marker_probe_cb_noarg(const struct marker *mdata,
|
||||
void *call_private, const char *fmt, ...);
|
||||
void *call_private, ...);
|
||||
|
||||
/*
|
||||
* Connect a probe to a marker.
|
||||
|
|
|
|||
|
|
@ -999,8 +999,8 @@ extern void free_area_init_node(int nid, pg_data_t *pgdat,
|
|||
extern void free_area_init_nodes(unsigned long *max_zone_pfn);
|
||||
extern void add_active_range(unsigned int nid, unsigned long start_pfn,
|
||||
unsigned long end_pfn);
|
||||
extern void shrink_active_range(unsigned int nid, unsigned long old_end_pfn,
|
||||
unsigned long new_end_pfn);
|
||||
extern void remove_active_range(unsigned int nid, unsigned long start_pfn,
|
||||
unsigned long end_pfn);
|
||||
extern void push_node_boundaries(unsigned int nid, unsigned long start_pfn,
|
||||
unsigned long end_pfn);
|
||||
extern void remove_all_active_ranges(void);
|
||||
|
|
@ -1012,6 +1012,8 @@ extern unsigned long find_min_pfn_with_active_regions(void);
|
|||
extern unsigned long find_max_pfn_with_active_regions(void);
|
||||
extern void free_bootmem_with_active_regions(int nid,
|
||||
unsigned long max_low_pfn);
|
||||
typedef int (*work_fn_t)(unsigned long, unsigned long, void *);
|
||||
extern void work_with_active_regions(int nid, work_fn_t work_fn, void *data);
|
||||
extern void sparse_memory_present_with_active_regions(int nid);
|
||||
#ifndef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
|
||||
extern int early_pfn_to_nid(unsigned long pfn);
|
||||
|
|
@ -1025,6 +1027,7 @@ extern void mem_init(void);
|
|||
extern void show_mem(void);
|
||||
extern void si_meminfo(struct sysinfo * val);
|
||||
extern void si_meminfo_node(struct sysinfo *val, int nid);
|
||||
extern int after_bootmem;
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
extern void setup_per_cpu_pageset(void);
|
||||
|
|
|
|||
85
include/linux/mmiotrace.h
Normal file
85
include/linux/mmiotrace.h
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
#ifndef MMIOTRACE_H
|
||||
#define MMIOTRACE_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/list.h>
|
||||
|
||||
struct kmmio_probe;
|
||||
struct pt_regs;
|
||||
|
||||
typedef void (*kmmio_pre_handler_t)(struct kmmio_probe *,
|
||||
struct pt_regs *, unsigned long addr);
|
||||
typedef void (*kmmio_post_handler_t)(struct kmmio_probe *,
|
||||
unsigned long condition, struct pt_regs *);
|
||||
|
||||
struct kmmio_probe {
|
||||
struct list_head list; /* kmmio internal list */
|
||||
unsigned long addr; /* start location of the probe point */
|
||||
unsigned long len; /* length of the probe region */
|
||||
kmmio_pre_handler_t pre_handler; /* Called before addr is executed. */
|
||||
kmmio_post_handler_t post_handler; /* Called after addr is executed */
|
||||
void *private;
|
||||
};
|
||||
|
||||
/* kmmio is active by some kmmio_probes? */
|
||||
static inline int is_kmmio_active(void)
|
||||
{
|
||||
extern unsigned int kmmio_count;
|
||||
return kmmio_count;
|
||||
}
|
||||
|
||||
extern int register_kmmio_probe(struct kmmio_probe *p);
|
||||
extern void unregister_kmmio_probe(struct kmmio_probe *p);
|
||||
|
||||
/* Called from page fault handler. */
|
||||
extern int kmmio_handler(struct pt_regs *regs, unsigned long addr);
|
||||
|
||||
/* Called from ioremap.c */
|
||||
#ifdef CONFIG_MMIOTRACE
|
||||
extern void mmiotrace_ioremap(resource_size_t offset, unsigned long size,
|
||||
void __iomem *addr);
|
||||
extern void mmiotrace_iounmap(volatile void __iomem *addr);
|
||||
#else
|
||||
static inline void mmiotrace_ioremap(resource_size_t offset,
|
||||
unsigned long size, void __iomem *addr)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void mmiotrace_iounmap(volatile void __iomem *addr)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_MMIOTRACE_HOOKS */
|
||||
|
||||
enum mm_io_opcode {
|
||||
MMIO_READ = 0x1, /* struct mmiotrace_rw */
|
||||
MMIO_WRITE = 0x2, /* struct mmiotrace_rw */
|
||||
MMIO_PROBE = 0x3, /* struct mmiotrace_map */
|
||||
MMIO_UNPROBE = 0x4, /* struct mmiotrace_map */
|
||||
MMIO_MARKER = 0x5, /* raw char data */
|
||||
MMIO_UNKNOWN_OP = 0x6, /* struct mmiotrace_rw */
|
||||
};
|
||||
|
||||
struct mmiotrace_rw {
|
||||
resource_size_t phys; /* PCI address of register */
|
||||
unsigned long value;
|
||||
unsigned long pc; /* optional program counter */
|
||||
int map_id;
|
||||
unsigned char opcode; /* one of MMIO_{READ,WRITE,UNKNOWN_OP} */
|
||||
unsigned char width; /* size of register access in bytes */
|
||||
};
|
||||
|
||||
struct mmiotrace_map {
|
||||
resource_size_t phys; /* base address in PCI space */
|
||||
unsigned long virt; /* base virtual address */
|
||||
unsigned long len; /* mapping size */
|
||||
int map_id;
|
||||
unsigned char opcode; /* MMIO_PROBE or MMIO_UNPROBE */
|
||||
};
|
||||
|
||||
/* in kernel/trace/trace_mmiotrace.c */
|
||||
extern void enable_mmiotrace(void);
|
||||
extern void disable_mmiotrace(void);
|
||||
extern void mmio_trace_rw(struct mmiotrace_rw *rw);
|
||||
extern void mmio_trace_mapping(struct mmiotrace_map *map);
|
||||
|
||||
#endif /* MMIOTRACE_H */
|
||||
|
|
@ -159,6 +159,15 @@ struct ap_device_id {
|
|||
|
||||
#define AP_DEVICE_ID_MATCH_DEVICE_TYPE 0x01
|
||||
|
||||
/* s390 css bus devices (subchannels) */
|
||||
struct css_device_id {
|
||||
__u8 match_flags;
|
||||
__u8 type; /* subchannel type */
|
||||
__u16 pad2;
|
||||
__u32 pad3;
|
||||
kernel_ulong_t driver_data;
|
||||
};
|
||||
|
||||
#define ACPI_ID_LEN 16 /* only 9 bytes needed here, 16 bytes are used */
|
||||
/* to workaround crosscompile issues */
|
||||
|
||||
|
|
|
|||
|
|
@ -157,6 +157,7 @@ PAGEFLAG(Active, active) __CLEARPAGEFLAG(Active, active)
|
|||
__PAGEFLAG(Slab, slab)
|
||||
PAGEFLAG(Checked, owner_priv_1) /* Used by some filesystems */
|
||||
PAGEFLAG(Pinned, owner_priv_1) TESTSCFLAG(Pinned, owner_priv_1) /* Xen */
|
||||
PAGEFLAG(SavePinned, dirty); /* Xen */
|
||||
PAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved)
|
||||
PAGEFLAG(Private, private) __CLEARPAGEFLAG(Private, private)
|
||||
__SETPAGEFLAG(Private, private)
|
||||
|
|
|
|||
|
|
@ -25,13 +25,11 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
|
||||
/* Macro to aid the definition of ranges of bits */
|
||||
#define PB_range(name, required_bits) \
|
||||
name, name ## _end = (name + required_bits) - 1
|
||||
|
||||
/* Bit indices that affect a whole block of pages */
|
||||
enum pageblock_bits {
|
||||
PB_range(PB_migrate, 3), /* 3 bits required for migrate types */
|
||||
PB_migrate,
|
||||
PB_migrate_end = PB_migrate + 3 - 1,
|
||||
/* 3 bits required for migrate types */
|
||||
NR_PAGEBLOCK_BITS
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#include <linux/linkage.h>
|
||||
#include <linux/list.h>
|
||||
|
||||
#ifdef CONFIG_DEBUG_PREEMPT
|
||||
#if defined(CONFIG_DEBUG_PREEMPT) || defined(CONFIG_PREEMPT_TRACER)
|
||||
extern void add_preempt_count(int val);
|
||||
extern void sub_preempt_count(int val);
|
||||
#else
|
||||
|
|
@ -52,6 +52,34 @@ do { \
|
|||
preempt_check_resched(); \
|
||||
} while (0)
|
||||
|
||||
/* For debugging and tracer internals only! */
|
||||
#define add_preempt_count_notrace(val) \
|
||||
do { preempt_count() += (val); } while (0)
|
||||
#define sub_preempt_count_notrace(val) \
|
||||
do { preempt_count() -= (val); } while (0)
|
||||
#define inc_preempt_count_notrace() add_preempt_count_notrace(1)
|
||||
#define dec_preempt_count_notrace() sub_preempt_count_notrace(1)
|
||||
|
||||
#define preempt_disable_notrace() \
|
||||
do { \
|
||||
inc_preempt_count_notrace(); \
|
||||
barrier(); \
|
||||
} while (0)
|
||||
|
||||
#define preempt_enable_no_resched_notrace() \
|
||||
do { \
|
||||
barrier(); \
|
||||
dec_preempt_count_notrace(); \
|
||||
} while (0)
|
||||
|
||||
/* preempt_check_resched is OK to trace */
|
||||
#define preempt_enable_notrace() \
|
||||
do { \
|
||||
preempt_enable_no_resched_notrace(); \
|
||||
barrier(); \
|
||||
preempt_check_resched(); \
|
||||
} while (0)
|
||||
|
||||
#else
|
||||
|
||||
#define preempt_disable() do { } while (0)
|
||||
|
|
@ -59,6 +87,10 @@ do { \
|
|||
#define preempt_enable() do { } while (0)
|
||||
#define preempt_check_resched() do { } while (0)
|
||||
|
||||
#define preempt_disable_notrace() do { } while (0)
|
||||
#define preempt_enable_no_resched_notrace() do { } while (0)
|
||||
#define preempt_enable_notrace() do { } while (0)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PREEMPT_NOTIFIERS
|
||||
|
|
|
|||
|
|
@ -95,8 +95,12 @@ extern void __ptrace_link(struct task_struct *child,
|
|||
struct task_struct *new_parent);
|
||||
extern void __ptrace_unlink(struct task_struct *child);
|
||||
extern void ptrace_untrace(struct task_struct *child);
|
||||
extern int ptrace_may_attach(struct task_struct *task);
|
||||
extern int __ptrace_may_attach(struct task_struct *task);
|
||||
#define PTRACE_MODE_READ 1
|
||||
#define PTRACE_MODE_ATTACH 2
|
||||
/* Returns 0 on success, -errno on denial. */
|
||||
extern int __ptrace_may_access(struct task_struct *task, unsigned int mode);
|
||||
/* Returns true on success, false on denial. */
|
||||
extern bool ptrace_may_access(struct task_struct *task, unsigned int mode);
|
||||
|
||||
static inline int ptrace_reparented(struct task_struct *child)
|
||||
{
|
||||
|
|
|
|||
31
include/linux/pwm.h
Normal file
31
include/linux/pwm.h
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#ifndef __LINUX_PWM_H
|
||||
#define __LINUX_PWM_H
|
||||
|
||||
struct pwm_device;
|
||||
|
||||
/*
|
||||
* pwm_request - request a PWM device
|
||||
*/
|
||||
struct pwm_device *pwm_request(int pwm_id, const char *label);
|
||||
|
||||
/*
|
||||
* pwm_free - free a PWM device
|
||||
*/
|
||||
void pwm_free(struct pwm_device *pwm);
|
||||
|
||||
/*
|
||||
* pwm_config - change a PWM device configuration
|
||||
*/
|
||||
int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns);
|
||||
|
||||
/*
|
||||
* pwm_enable - start a PWM output toggling
|
||||
*/
|
||||
int pwm_enable(struct pwm_device *pwm);
|
||||
|
||||
/*
|
||||
* pwm_disable - stop a PWM output toggling
|
||||
*/
|
||||
void pwm_disable(struct pwm_device *pwm);
|
||||
|
||||
#endif /* __ASM_ARCH_PWM_H */
|
||||
17
include/linux/pwm_backlight.h
Normal file
17
include/linux/pwm_backlight.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* Generic PWM backlight driver data - see drivers/video/backlight/pwm_bl.c
|
||||
*/
|
||||
#ifndef __LINUX_PWM_BACKLIGHT_H
|
||||
#define __LINUX_PWM_BACKLIGHT_H
|
||||
|
||||
struct platform_pwm_backlight_data {
|
||||
int pwm_id;
|
||||
unsigned int max_brightness;
|
||||
unsigned int dft_brightness;
|
||||
unsigned int pwm_period_ns;
|
||||
int (*init)(struct device *dev);
|
||||
int (*notify)(int brightness);
|
||||
void (*exit)(struct device *dev);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -8,7 +8,7 @@ extern int pm_trace_enabled;
|
|||
|
||||
struct device;
|
||||
extern void set_trace_device(struct device *);
|
||||
extern void generate_resume_trace(void *tracedata, unsigned int user);
|
||||
extern void generate_resume_trace(const void *tracedata, unsigned int user);
|
||||
|
||||
#define TRACE_DEVICE(dev) do { \
|
||||
if (pm_trace_enabled) \
|
||||
|
|
|
|||
|
|
@ -134,7 +134,6 @@ extern unsigned long nr_running(void);
|
|||
extern unsigned long nr_uninterruptible(void);
|
||||
extern unsigned long nr_active(void);
|
||||
extern unsigned long nr_iowait(void);
|
||||
extern unsigned long weighted_cpuload(const int cpu);
|
||||
|
||||
struct seq_file;
|
||||
struct cfs_rq;
|
||||
|
|
@ -246,6 +245,8 @@ extern asmlinkage void schedule_tail(struct task_struct *prev);
|
|||
extern void init_idle(struct task_struct *idle, int cpu);
|
||||
extern void init_idle_bootup_task(struct task_struct *idle);
|
||||
|
||||
extern int runqueue_is_locked(void);
|
||||
|
||||
extern cpumask_t nohz_cpu_mask;
|
||||
#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ)
|
||||
extern int select_nohz_load_balancer(int cpu);
|
||||
|
|
@ -784,6 +785,8 @@ struct sched_domain {
|
|||
unsigned int balance_interval; /* initialise to 1. units in ms. */
|
||||
unsigned int nr_balance_failed; /* initialise to 0 */
|
||||
|
||||
u64 last_update;
|
||||
|
||||
#ifdef CONFIG_SCHEDSTATS
|
||||
/* load_balance() stats */
|
||||
unsigned int lb_count[CPU_MAX_IDLE_TYPES];
|
||||
|
|
@ -823,23 +826,6 @@ extern int arch_reinit_sched_domains(void);
|
|||
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
/*
|
||||
* A runqueue laden with a single nice 0 task scores a weighted_cpuload of
|
||||
* SCHED_LOAD_SCALE. This function returns 1 if any cpu is laden with a
|
||||
* task of nice 0 or enough lower priority tasks to bring up the
|
||||
* weighted_cpuload
|
||||
*/
|
||||
static inline int above_background_load(void)
|
||||
{
|
||||
unsigned long cpu;
|
||||
|
||||
for_each_online_cpu(cpu) {
|
||||
if (weighted_cpuload(cpu) >= SCHED_LOAD_SCALE)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct io_context; /* See blkdev.h */
|
||||
#define NGROUPS_SMALL 32
|
||||
#define NGROUPS_PER_BLOCK ((unsigned int)(PAGE_SIZE / sizeof(gid_t)))
|
||||
|
|
@ -921,8 +907,8 @@ struct sched_class {
|
|||
void (*set_cpus_allowed)(struct task_struct *p,
|
||||
const cpumask_t *newmask);
|
||||
|
||||
void (*join_domain)(struct rq *rq);
|
||||
void (*leave_domain)(struct rq *rq);
|
||||
void (*rq_online)(struct rq *rq);
|
||||
void (*rq_offline)(struct rq *rq);
|
||||
|
||||
void (*switched_from) (struct rq *this_rq, struct task_struct *task,
|
||||
int running);
|
||||
|
|
@ -1039,6 +1025,7 @@ struct task_struct {
|
|||
#endif
|
||||
|
||||
int prio, static_prio, normal_prio;
|
||||
unsigned int rt_priority;
|
||||
const struct sched_class *sched_class;
|
||||
struct sched_entity se;
|
||||
struct sched_rt_entity rt;
|
||||
|
|
@ -1122,7 +1109,6 @@ struct task_struct {
|
|||
int __user *set_child_tid; /* CLONE_CHILD_SETTID */
|
||||
int __user *clear_child_tid; /* CLONE_CHILD_CLEARTID */
|
||||
|
||||
unsigned int rt_priority;
|
||||
cputime_t utime, stime, utimescaled, stimescaled;
|
||||
cputime_t gtime;
|
||||
cputime_t prev_utime, prev_stime;
|
||||
|
|
@ -1141,12 +1127,12 @@ struct task_struct {
|
|||
gid_t gid,egid,sgid,fsgid;
|
||||
struct group_info *group_info;
|
||||
kernel_cap_t cap_effective, cap_inheritable, cap_permitted, cap_bset;
|
||||
unsigned securebits;
|
||||
struct user_struct *user;
|
||||
unsigned securebits;
|
||||
#ifdef CONFIG_KEYS
|
||||
unsigned char jit_keyring; /* default keyring to attach requested keys to */
|
||||
struct key *request_key_auth; /* assumed request_key authority */
|
||||
struct key *thread_keyring; /* keyring private to this thread */
|
||||
unsigned char jit_keyring; /* default keyring to attach requested keys to */
|
||||
#endif
|
||||
char comm[TASK_COMM_LEN]; /* executable name excluding path
|
||||
- access with [gs]et_task_comm (which lock
|
||||
|
|
@ -1233,8 +1219,8 @@ struct task_struct {
|
|||
# define MAX_LOCK_DEPTH 48UL
|
||||
u64 curr_chain_key;
|
||||
int lockdep_depth;
|
||||
struct held_lock held_locks[MAX_LOCK_DEPTH];
|
||||
unsigned int lockdep_recursion;
|
||||
struct held_lock held_locks[MAX_LOCK_DEPTH];
|
||||
#endif
|
||||
|
||||
/* journalling filesystem info */
|
||||
|
|
@ -1262,10 +1248,6 @@ struct task_struct {
|
|||
u64 acct_vm_mem1; /* accumulated virtual memory usage */
|
||||
cputime_t acct_stimexpd;/* stime since last update */
|
||||
#endif
|
||||
#ifdef CONFIG_NUMA
|
||||
struct mempolicy *mempolicy;
|
||||
short il_next;
|
||||
#endif
|
||||
#ifdef CONFIG_CPUSETS
|
||||
nodemask_t mems_allowed;
|
||||
int cpuset_mems_generation;
|
||||
|
|
@ -1284,6 +1266,10 @@ struct task_struct {
|
|||
#endif
|
||||
struct list_head pi_state_list;
|
||||
struct futex_pi_state *pi_state_cache;
|
||||
#endif
|
||||
#ifdef CONFIG_NUMA
|
||||
struct mempolicy *mempolicy;
|
||||
short il_next;
|
||||
#endif
|
||||
atomic_t fs_excl; /* holding fs exclusive resources */
|
||||
struct rcu_head rcu;
|
||||
|
|
@ -1504,6 +1490,7 @@ static inline void put_task_struct(struct task_struct *t)
|
|||
#define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */
|
||||
#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_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 */
|
||||
|
|
@ -1573,13 +1560,28 @@ static inline void sched_clock_idle_sleep_event(void)
|
|||
static inline void sched_clock_idle_wakeup_event(u64 delta_ns)
|
||||
{
|
||||
}
|
||||
#else
|
||||
|
||||
#ifdef CONFIG_NO_HZ
|
||||
static inline void sched_clock_tick_stop(int cpu)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void sched_clock_tick_start(int cpu)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#else /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */
|
||||
extern void sched_clock_init(void);
|
||||
extern u64 sched_clock_cpu(int cpu);
|
||||
extern void sched_clock_tick(void);
|
||||
extern void sched_clock_idle_sleep_event(void);
|
||||
extern void sched_clock_idle_wakeup_event(u64 delta_ns);
|
||||
#ifdef CONFIG_NO_HZ
|
||||
extern void sched_clock_tick_stop(int cpu);
|
||||
extern void sched_clock_tick_start(int cpu);
|
||||
#endif
|
||||
#endif /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */
|
||||
|
||||
/*
|
||||
* For kernel-internal use: high-speed (but slightly incorrect) per-cpu
|
||||
|
|
@ -1622,6 +1624,7 @@ extern unsigned int sysctl_sched_child_runs_first;
|
|||
extern unsigned int sysctl_sched_features;
|
||||
extern unsigned int sysctl_sched_migration_cost;
|
||||
extern unsigned int sysctl_sched_nr_migrate;
|
||||
extern unsigned int sysctl_sched_shares_ratelimit;
|
||||
|
||||
int sched_nr_latency_handler(struct ctl_table *table, int write,
|
||||
struct file *file, void __user *buffer, size_t *length,
|
||||
|
|
@ -1655,6 +1658,8 @@ extern int can_nice(const struct task_struct *p, const int nice);
|
|||
extern int task_curr(const struct task_struct *p);
|
||||
extern int idle_cpu(int cpu);
|
||||
extern int sched_setscheduler(struct task_struct *, int, struct sched_param *);
|
||||
extern int sched_setscheduler_nocheck(struct task_struct *, int,
|
||||
struct sched_param *);
|
||||
extern struct task_struct *idle_task(int cpu);
|
||||
extern struct task_struct *curr_task(int cpu);
|
||||
extern void set_curr_task(int cpu, struct task_struct *p);
|
||||
|
|
@ -2131,6 +2136,18 @@ static inline void arch_pick_mmap_layout(struct mm_struct *mm)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TRACING
|
||||
extern void
|
||||
__trace_special(void *__tr, void *__data,
|
||||
unsigned long arg1, unsigned long arg2, unsigned long arg3);
|
||||
#else
|
||||
static inline void
|
||||
__trace_special(void *__tr, void *__data,
|
||||
unsigned long arg1, unsigned long arg2, unsigned long arg3)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
extern long sched_setaffinity(pid_t pid, const cpumask_t *new_mask);
|
||||
extern long sched_getaffinity(pid_t pid, cpumask_t *mask);
|
||||
|
||||
|
|
@ -2225,6 +2242,8 @@ static inline void mm_init_owner(struct mm_struct *mm, struct task_struct *p)
|
|||
}
|
||||
#endif /* CONFIG_MM_OWNER */
|
||||
|
||||
#define TASK_STATE_TO_CHAR_STR "RSDTtZX"
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -46,7 +46,8 @@ struct audit_krule;
|
|||
*/
|
||||
extern int cap_capable(struct task_struct *tsk, int cap);
|
||||
extern int cap_settime(struct timespec *ts, struct timezone *tz);
|
||||
extern int cap_ptrace(struct task_struct *parent, struct task_struct *child);
|
||||
extern int cap_ptrace(struct task_struct *parent, struct task_struct *child,
|
||||
unsigned int mode);
|
||||
extern int cap_capget(struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted);
|
||||
extern int cap_capset_check(struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted);
|
||||
extern void cap_capset_set(struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted);
|
||||
|
|
@ -79,6 +80,7 @@ struct xfrm_selector;
|
|||
struct xfrm_policy;
|
||||
struct xfrm_state;
|
||||
struct xfrm_user_sec_ctx;
|
||||
struct seq_file;
|
||||
|
||||
extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb);
|
||||
extern int cap_netlink_recv(struct sk_buff *skb, int cap);
|
||||
|
|
@ -289,10 +291,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
|
|||
* Update module state after a successful pivot.
|
||||
* @old_path contains the path for the old root.
|
||||
* @new_path contains the path for the new root.
|
||||
* @sb_get_mnt_opts:
|
||||
* Get the security relevant mount options used for a superblock
|
||||
* @sb the superblock to get security mount options from
|
||||
* @opts binary data structure containing all lsm mount data
|
||||
* @sb_set_mnt_opts:
|
||||
* Set the security relevant mount options used for a superblock
|
||||
* @sb the superblock to set security mount options for
|
||||
|
|
@ -1170,6 +1168,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
|
|||
* attributes would be changed by the execve.
|
||||
* @parent contains the task_struct structure for parent process.
|
||||
* @child contains the task_struct structure for child process.
|
||||
* @mode contains the PTRACE_MODE flags indicating the form of access.
|
||||
* Return 0 if permission is granted.
|
||||
* @capget:
|
||||
* Get the @effective, @inheritable, and @permitted capability sets for
|
||||
|
|
@ -1240,11 +1239,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
|
|||
* @pages contains the number of pages.
|
||||
* Return 0 if permission is granted.
|
||||
*
|
||||
* @register_security:
|
||||
* allow module stacking.
|
||||
* @name contains the name of the security module being stacked.
|
||||
* @ops contains a pointer to the struct security_operations of the module to stack.
|
||||
*
|
||||
* @secid_to_secctx:
|
||||
* Convert secid to security context.
|
||||
* @secid contains the security ID.
|
||||
|
|
@ -1295,7 +1289,8 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
|
|||
struct security_operations {
|
||||
char name[SECURITY_NAME_MAX + 1];
|
||||
|
||||
int (*ptrace) (struct task_struct *parent, struct task_struct *child);
|
||||
int (*ptrace) (struct task_struct *parent, struct task_struct *child,
|
||||
unsigned int mode);
|
||||
int (*capget) (struct task_struct *target,
|
||||
kernel_cap_t *effective,
|
||||
kernel_cap_t *inheritable, kernel_cap_t *permitted);
|
||||
|
|
@ -1328,6 +1323,7 @@ struct security_operations {
|
|||
void (*sb_free_security) (struct super_block *sb);
|
||||
int (*sb_copy_data) (char *orig, char *copy);
|
||||
int (*sb_kern_mount) (struct super_block *sb, void *data);
|
||||
int (*sb_show_options) (struct seq_file *m, struct super_block *sb);
|
||||
int (*sb_statfs) (struct dentry *dentry);
|
||||
int (*sb_mount) (char *dev_name, struct path *path,
|
||||
char *type, unsigned long flags, void *data);
|
||||
|
|
@ -1343,8 +1339,6 @@ struct security_operations {
|
|||
struct path *new_path);
|
||||
void (*sb_post_pivotroot) (struct path *old_path,
|
||||
struct path *new_path);
|
||||
int (*sb_get_mnt_opts) (const struct super_block *sb,
|
||||
struct security_mnt_opts *opts);
|
||||
int (*sb_set_mnt_opts) (struct super_block *sb,
|
||||
struct security_mnt_opts *opts);
|
||||
void (*sb_clone_mnt_opts) (const struct super_block *oldsb,
|
||||
|
|
@ -1472,10 +1466,6 @@ struct security_operations {
|
|||
int (*netlink_send) (struct sock *sk, struct sk_buff *skb);
|
||||
int (*netlink_recv) (struct sk_buff *skb, int cap);
|
||||
|
||||
/* allow module stacking */
|
||||
int (*register_security) (const char *name,
|
||||
struct security_operations *ops);
|
||||
|
||||
void (*d_instantiate) (struct dentry *dentry, struct inode *inode);
|
||||
|
||||
int (*getprocattr) (struct task_struct *p, char *name, char **value);
|
||||
|
|
@ -1565,7 +1555,6 @@ struct security_operations {
|
|||
extern int security_init(void);
|
||||
extern int security_module_enable(struct security_operations *ops);
|
||||
extern int register_security(struct security_operations *ops);
|
||||
extern int mod_reg_security(const char *name, struct security_operations *ops);
|
||||
extern struct dentry *securityfs_create_file(const char *name, mode_t mode,
|
||||
struct dentry *parent, void *data,
|
||||
const struct file_operations *fops);
|
||||
|
|
@ -1573,7 +1562,8 @@ extern struct dentry *securityfs_create_dir(const char *name, struct dentry *par
|
|||
extern void securityfs_remove(struct dentry *dentry);
|
||||
|
||||
/* Security operations */
|
||||
int security_ptrace(struct task_struct *parent, struct task_struct *child);
|
||||
int security_ptrace(struct task_struct *parent, struct task_struct *child,
|
||||
unsigned int mode);
|
||||
int security_capget(struct task_struct *target,
|
||||
kernel_cap_t *effective,
|
||||
kernel_cap_t *inheritable,
|
||||
|
|
@ -1606,6 +1596,7 @@ int security_sb_alloc(struct super_block *sb);
|
|||
void security_sb_free(struct super_block *sb);
|
||||
int security_sb_copy_data(char *orig, char *copy);
|
||||
int security_sb_kern_mount(struct super_block *sb, void *data);
|
||||
int security_sb_show_options(struct seq_file *m, struct super_block *sb);
|
||||
int security_sb_statfs(struct dentry *dentry);
|
||||
int security_sb_mount(char *dev_name, struct path *path,
|
||||
char *type, unsigned long flags, void *data);
|
||||
|
|
@ -1617,8 +1608,6 @@ void security_sb_post_remount(struct vfsmount *mnt, unsigned long flags, void *d
|
|||
void security_sb_post_addmount(struct vfsmount *mnt, struct path *mountpoint);
|
||||
int security_sb_pivotroot(struct path *old_path, struct path *new_path);
|
||||
void security_sb_post_pivotroot(struct path *old_path, struct path *new_path);
|
||||
int security_sb_get_mnt_opts(const struct super_block *sb,
|
||||
struct security_mnt_opts *opts);
|
||||
int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts);
|
||||
void security_sb_clone_mnt_opts(const struct super_block *oldsb,
|
||||
struct super_block *newsb);
|
||||
|
|
@ -1755,9 +1744,11 @@ static inline int security_init(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int security_ptrace(struct task_struct *parent, struct task_struct *child)
|
||||
static inline int security_ptrace(struct task_struct *parent,
|
||||
struct task_struct *child,
|
||||
unsigned int mode)
|
||||
{
|
||||
return cap_ptrace(parent, child);
|
||||
return cap_ptrace(parent, child, mode);
|
||||
}
|
||||
|
||||
static inline int security_capget(struct task_struct *target,
|
||||
|
|
@ -1881,6 +1872,12 @@ static inline int security_sb_kern_mount(struct super_block *sb, void *data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int security_sb_show_options(struct seq_file *m,
|
||||
struct super_block *sb)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int security_sb_statfs(struct dentry *dentry)
|
||||
{
|
||||
return 0;
|
||||
|
|
@ -1927,12 +1924,6 @@ static inline int security_sb_pivotroot(struct path *old_path,
|
|||
static inline void security_sb_post_pivotroot(struct path *old_path,
|
||||
struct path *new_path)
|
||||
{ }
|
||||
static inline int security_sb_get_mnt_opts(const struct super_block *sb,
|
||||
struct security_mnt_opts *opts)
|
||||
{
|
||||
security_init_mnt_opts(opts);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int security_sb_set_mnt_opts(struct super_block *sb,
|
||||
struct security_mnt_opts *opts)
|
||||
|
|
|
|||
|
|
@ -27,11 +27,24 @@ static inline int reacquire_kernel_lock(struct task_struct *task)
|
|||
extern void __lockfunc lock_kernel(void) __acquires(kernel_lock);
|
||||
extern void __lockfunc unlock_kernel(void) __releases(kernel_lock);
|
||||
|
||||
/*
|
||||
* Various legacy drivers don't really need the BKL in a specific
|
||||
* function, but they *do* need to know that the BKL became available.
|
||||
* This function just avoids wrapping a bunch of lock/unlock pairs
|
||||
* around code which doesn't really need it.
|
||||
*/
|
||||
static inline void cycle_kernel_lock(void)
|
||||
{
|
||||
lock_kernel();
|
||||
unlock_kernel();
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define lock_kernel() do { } while(0)
|
||||
#define unlock_kernel() do { } while(0)
|
||||
#define release_kernel_lock(task) do { } while(0)
|
||||
#define cycle_kernel_lock() do { } while(0)
|
||||
#define reacquire_kernel_lock(task) 0
|
||||
#define kernel_locked() 1
|
||||
|
||||
|
|
|
|||
|
|
@ -105,6 +105,8 @@ extern int vm_highmem_is_dirtyable;
|
|||
extern int block_dump;
|
||||
extern int laptop_mode;
|
||||
|
||||
extern unsigned long determine_dirtyable_memory(void);
|
||||
|
||||
extern int dirty_ratio_handler(struct ctl_table *table, int write,
|
||||
struct file *filp, void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
|
|
|
|||
Loading…
Reference in a new issue