diff options
Diffstat (limited to 'include/linux')
82 files changed, 759 insertions, 458 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 050a7bccb836..67c91b4418b0 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -219,7 +219,7 @@ static inline int acpi_video_display_switch_support(void) | |||
| 219 | 219 | ||
| 220 | extern int acpi_blacklisted(void); | 220 | extern int acpi_blacklisted(void); |
| 221 | extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); | 221 | extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); |
| 222 | extern int acpi_osi_setup(char *str); | 222 | extern void acpi_osi_setup(char *str); |
| 223 | 223 | ||
| 224 | #ifdef CONFIG_ACPI_NUMA | 224 | #ifdef CONFIG_ACPI_NUMA |
| 225 | int acpi_get_pxm(acpi_handle handle); | 225 | int acpi_get_pxm(acpi_handle handle); |
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index a8e4e832cdbb..475f8c42c0e9 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h | |||
| @@ -427,8 +427,10 @@ extern rwlock_t vcc_sklist_lock; | |||
| 427 | 427 | ||
| 428 | #define ATM_SKB(skb) (((struct atm_skb_data *) (skb)->cb)) | 428 | #define ATM_SKB(skb) (((struct atm_skb_data *) (skb)->cb)) |
| 429 | 429 | ||
| 430 | struct atm_dev *atm_dev_register(const char *type,const struct atmdev_ops *ops, | 430 | struct atm_dev *atm_dev_register(const char *type, struct device *parent, |
| 431 | int number,unsigned long *flags); /* number == -1: pick first available */ | 431 | const struct atmdev_ops *ops, |
| 432 | int number, /* -1 == pick first available */ | ||
| 433 | unsigned long *flags); | ||
| 432 | struct atm_dev *atm_dev_lookup(int number); | 434 | struct atm_dev *atm_dev_lookup(int number); |
| 433 | void atm_dev_deregister(struct atm_dev *dev); | 435 | void atm_dev_deregister(struct atm_dev *dev); |
| 434 | 436 | ||
diff --git a/include/linux/atomic.h b/include/linux/atomic.h new file mode 100644 index 000000000000..96c038e43d66 --- /dev/null +++ b/include/linux/atomic.h | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | #ifndef _LINUX_ATOMIC_H | ||
| 2 | #define _LINUX_ATOMIC_H | ||
| 3 | #include <asm/atomic.h> | ||
| 4 | |||
| 5 | /** | ||
| 6 | * atomic_inc_not_zero_hint - increment if not null | ||
| 7 | * @v: pointer of type atomic_t | ||
| 8 | * @hint: probable value of the atomic before the increment | ||
| 9 | * | ||
| 10 | * This version of atomic_inc_not_zero() gives a hint of probable | ||
| 11 | * value of the atomic. This helps processor to not read the memory | ||
| 12 | * before doing the atomic read/modify/write cycle, lowering | ||
| 13 | * number of bus transactions on some arches. | ||
| 14 | * | ||
| 15 | * Returns: 0 if increment was not done, 1 otherwise. | ||
| 16 | */ | ||
| 17 | #ifndef atomic_inc_not_zero_hint | ||
| 18 | static inline int atomic_inc_not_zero_hint(atomic_t *v, int hint) | ||
| 19 | { | ||
| 20 | int val, c = hint; | ||
| 21 | |||
| 22 | /* sanity test, should be removed by compiler if hint is a constant */ | ||
| 23 | if (!hint) | ||
| 24 | return atomic_inc_not_zero(v); | ||
| 25 | |||
| 26 | do { | ||
| 27 | val = atomic_cmpxchg(v, c, c + 1); | ||
| 28 | if (val == c) | ||
| 29 | return 1; | ||
| 30 | c = val; | ||
| 31 | } while (c); | ||
| 32 | |||
| 33 | return 0; | ||
| 34 | } | ||
| 35 | #endif | ||
| 36 | |||
| 37 | #endif /* _LINUX_ATOMIC_H */ | ||
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index a065612fc928..64a7114a9394 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
| @@ -29,6 +29,7 @@ struct linux_binprm{ | |||
| 29 | char buf[BINPRM_BUF_SIZE]; | 29 | char buf[BINPRM_BUF_SIZE]; |
| 30 | #ifdef CONFIG_MMU | 30 | #ifdef CONFIG_MMU |
| 31 | struct vm_area_struct *vma; | 31 | struct vm_area_struct *vma; |
| 32 | unsigned long vma_pages; | ||
| 32 | #else | 33 | #else |
| 33 | # define MAX_ARG_PAGES 32 | 34 | # define MAX_ARG_PAGES 32 |
| 34 | struct page *page[MAX_ARG_PAGES]; | 35 | struct page *page[MAX_ARG_PAGES]; |
| @@ -59,6 +60,10 @@ struct linux_binprm{ | |||
| 59 | unsigned long loader, exec; | 60 | unsigned long loader, exec; |
| 60 | }; | 61 | }; |
| 61 | 62 | ||
| 63 | extern void acct_arg_size(struct linux_binprm *bprm, unsigned long pages); | ||
| 64 | extern struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, | ||
| 65 | int write); | ||
| 66 | |||
| 62 | #define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0 | 67 | #define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0 |
| 63 | #define BINPRM_FLAGS_ENFORCE_NONDUMP (1 << BINPRM_FLAGS_ENFORCE_NONDUMP_BIT) | 68 | #define BINPRM_FLAGS_ENFORCE_NONDUMP (1 << BINPRM_FLAGS_ENFORCE_NONDUMP_BIT) |
| 64 | 69 | ||
diff --git a/include/linux/bio.h b/include/linux/bio.h index ba679992d39b..35dcdb3589bc 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
| @@ -66,10 +66,6 @@ | |||
| 66 | #define bio_offset(bio) bio_iovec((bio))->bv_offset | 66 | #define bio_offset(bio) bio_iovec((bio))->bv_offset |
| 67 | #define bio_segments(bio) ((bio)->bi_vcnt - (bio)->bi_idx) | 67 | #define bio_segments(bio) ((bio)->bi_vcnt - (bio)->bi_idx) |
| 68 | #define bio_sectors(bio) ((bio)->bi_size >> 9) | 68 | #define bio_sectors(bio) ((bio)->bi_size >> 9) |
| 69 | #define bio_empty_barrier(bio) \ | ||
| 70 | ((bio->bi_rw & REQ_HARDBARRIER) && \ | ||
| 71 | !bio_has_data(bio) && \ | ||
| 72 | !(bio->bi_rw & REQ_DISCARD)) | ||
| 73 | 69 | ||
| 74 | static inline unsigned int bio_cur_bytes(struct bio *bio) | 70 | static inline unsigned int bio_cur_bytes(struct bio *bio) |
| 75 | { | 71 | { |
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index 0437ab6bb54c..46ad5197537a 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h | |||
| @@ -122,7 +122,6 @@ enum rq_flag_bits { | |||
| 122 | __REQ_FAILFAST_TRANSPORT, /* no driver retries of transport errors */ | 122 | __REQ_FAILFAST_TRANSPORT, /* no driver retries of transport errors */ |
| 123 | __REQ_FAILFAST_DRIVER, /* no driver retries of driver errors */ | 123 | __REQ_FAILFAST_DRIVER, /* no driver retries of driver errors */ |
| 124 | 124 | ||
| 125 | __REQ_HARDBARRIER, /* may not be passed by drive either */ | ||
| 126 | __REQ_SYNC, /* request is sync (sync write or read) */ | 125 | __REQ_SYNC, /* request is sync (sync write or read) */ |
| 127 | __REQ_META, /* metadata io request */ | 126 | __REQ_META, /* metadata io request */ |
| 128 | __REQ_DISCARD, /* request to discard sectors */ | 127 | __REQ_DISCARD, /* request to discard sectors */ |
| @@ -159,7 +158,6 @@ enum rq_flag_bits { | |||
| 159 | #define REQ_FAILFAST_DEV (1 << __REQ_FAILFAST_DEV) | 158 | #define REQ_FAILFAST_DEV (1 << __REQ_FAILFAST_DEV) |
| 160 | #define REQ_FAILFAST_TRANSPORT (1 << __REQ_FAILFAST_TRANSPORT) | 159 | #define REQ_FAILFAST_TRANSPORT (1 << __REQ_FAILFAST_TRANSPORT) |
| 161 | #define REQ_FAILFAST_DRIVER (1 << __REQ_FAILFAST_DRIVER) | 160 | #define REQ_FAILFAST_DRIVER (1 << __REQ_FAILFAST_DRIVER) |
| 162 | #define REQ_HARDBARRIER (1 << __REQ_HARDBARRIER) | ||
| 163 | #define REQ_SYNC (1 << __REQ_SYNC) | 161 | #define REQ_SYNC (1 << __REQ_SYNC) |
| 164 | #define REQ_META (1 << __REQ_META) | 162 | #define REQ_META (1 << __REQ_META) |
| 165 | #define REQ_DISCARD (1 << __REQ_DISCARD) | 163 | #define REQ_DISCARD (1 << __REQ_DISCARD) |
| @@ -168,8 +166,8 @@ enum rq_flag_bits { | |||
| 168 | #define REQ_FAILFAST_MASK \ | 166 | #define REQ_FAILFAST_MASK \ |
| 169 | (REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | REQ_FAILFAST_DRIVER) | 167 | (REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | REQ_FAILFAST_DRIVER) |
| 170 | #define REQ_COMMON_MASK \ | 168 | #define REQ_COMMON_MASK \ |
| 171 | (REQ_WRITE | REQ_FAILFAST_MASK | REQ_HARDBARRIER | REQ_SYNC | \ | 169 | (REQ_WRITE | REQ_FAILFAST_MASK | REQ_SYNC | REQ_META | REQ_DISCARD | \ |
| 172 | REQ_META | REQ_DISCARD | REQ_NOIDLE | REQ_FLUSH | REQ_FUA) | 170 | REQ_NOIDLE | REQ_FLUSH | REQ_FUA) |
| 173 | #define REQ_CLONE_MASK REQ_COMMON_MASK | 171 | #define REQ_CLONE_MASK REQ_COMMON_MASK |
| 174 | 172 | ||
| 175 | #define REQ_UNPLUG (1 << __REQ_UNPLUG) | 173 | #define REQ_UNPLUG (1 << __REQ_UNPLUG) |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 5027a599077d..36ab42c9bb99 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -250,7 +250,7 @@ struct queue_limits { | |||
| 250 | 250 | ||
| 251 | unsigned char misaligned; | 251 | unsigned char misaligned; |
| 252 | unsigned char discard_misaligned; | 252 | unsigned char discard_misaligned; |
| 253 | unsigned char no_cluster; | 253 | unsigned char cluster; |
| 254 | signed char discard_zeroes_data; | 254 | signed char discard_zeroes_data; |
| 255 | }; | 255 | }; |
| 256 | 256 | ||
| @@ -380,7 +380,6 @@ struct request_queue | |||
| 380 | #endif | 380 | #endif |
| 381 | }; | 381 | }; |
| 382 | 382 | ||
| 383 | #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ | ||
| 384 | #define QUEUE_FLAG_QUEUED 1 /* uses generic tag queueing */ | 383 | #define QUEUE_FLAG_QUEUED 1 /* uses generic tag queueing */ |
| 385 | #define QUEUE_FLAG_STOPPED 2 /* queue is stopped */ | 384 | #define QUEUE_FLAG_STOPPED 2 /* queue is stopped */ |
| 386 | #define QUEUE_FLAG_SYNCFULL 3 /* read queue has been filled */ | 385 | #define QUEUE_FLAG_SYNCFULL 3 /* read queue has been filled */ |
| @@ -403,7 +402,6 @@ struct request_queue | |||
| 403 | #define QUEUE_FLAG_SECDISCARD 19 /* supports SECDISCARD */ | 402 | #define QUEUE_FLAG_SECDISCARD 19 /* supports SECDISCARD */ |
| 404 | 403 | ||
| 405 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ | 404 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ |
| 406 | (1 << QUEUE_FLAG_CLUSTER) | \ | ||
| 407 | (1 << QUEUE_FLAG_STACKABLE) | \ | 405 | (1 << QUEUE_FLAG_STACKABLE) | \ |
| 408 | (1 << QUEUE_FLAG_SAME_COMP) | \ | 406 | (1 << QUEUE_FLAG_SAME_COMP) | \ |
| 409 | (1 << QUEUE_FLAG_ADD_RANDOM)) | 407 | (1 << QUEUE_FLAG_ADD_RANDOM)) |
| @@ -510,6 +508,11 @@ static inline void queue_flag_clear(unsigned int flag, struct request_queue *q) | |||
| 510 | 508 | ||
| 511 | #define rq_data_dir(rq) ((rq)->cmd_flags & 1) | 509 | #define rq_data_dir(rq) ((rq)->cmd_flags & 1) |
| 512 | 510 | ||
| 511 | static inline unsigned int blk_queue_cluster(struct request_queue *q) | ||
| 512 | { | ||
| 513 | return q->limits.cluster; | ||
| 514 | } | ||
| 515 | |||
| 513 | /* | 516 | /* |
| 514 | * We regard a request as sync, if either a read or a sync write | 517 | * We regard a request as sync, if either a read or a sync write |
| 515 | */ | 518 | */ |
| @@ -552,8 +555,7 @@ static inline void blk_clear_queue_full(struct request_queue *q, int sync) | |||
| 552 | * it already be started by driver. | 555 | * it already be started by driver. |
| 553 | */ | 556 | */ |
| 554 | #define RQ_NOMERGE_FLAGS \ | 557 | #define RQ_NOMERGE_FLAGS \ |
| 555 | (REQ_NOMERGE | REQ_STARTED | REQ_HARDBARRIER | REQ_SOFTBARRIER | \ | 558 | (REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA) |
| 556 | REQ_FLUSH | REQ_FUA) | ||
| 557 | #define rq_mergeable(rq) \ | 559 | #define rq_mergeable(rq) \ |
| 558 | (!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && \ | 560 | (!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && \ |
| 559 | (((rq)->cmd_flags & REQ_DISCARD) || \ | 561 | (((rq)->cmd_flags & REQ_DISCARD) || \ |
| @@ -806,6 +808,7 @@ extern struct request_queue *blk_init_allocated_queue(struct request_queue *, | |||
| 806 | extern void blk_cleanup_queue(struct request_queue *); | 808 | extern void blk_cleanup_queue(struct request_queue *); |
| 807 | extern void blk_queue_make_request(struct request_queue *, make_request_fn *); | 809 | extern void blk_queue_make_request(struct request_queue *, make_request_fn *); |
| 808 | extern void blk_queue_bounce_limit(struct request_queue *, u64); | 810 | extern void blk_queue_bounce_limit(struct request_queue *, u64); |
| 811 | extern void blk_limits_max_hw_sectors(struct queue_limits *, unsigned int); | ||
| 809 | extern void blk_queue_max_hw_sectors(struct request_queue *, unsigned int); | 812 | extern void blk_queue_max_hw_sectors(struct request_queue *, unsigned int); |
| 810 | extern void blk_queue_max_segments(struct request_queue *, unsigned short); | 813 | extern void blk_queue_max_segments(struct request_queue *, unsigned short); |
| 811 | extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); | 814 | extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 266ab9291232..499dfe982a0e 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
| @@ -105,6 +105,8 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat, | |||
| 105 | 105 | ||
| 106 | #define alloc_bootmem(x) \ | 106 | #define alloc_bootmem(x) \ |
| 107 | __alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | 107 | __alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) |
| 108 | #define alloc_bootmem_align(x, align) \ | ||
| 109 | __alloc_bootmem(x, align, __pa(MAX_DMA_ADDRESS)) | ||
| 108 | #define alloc_bootmem_nopanic(x) \ | 110 | #define alloc_bootmem_nopanic(x) \ |
| 109 | __alloc_bootmem_nopanic(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | 111 | __alloc_bootmem_nopanic(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) |
| 110 | #define alloc_bootmem_pages(x) \ | 112 | #define alloc_bootmem_pages(x) \ |
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h index f22b2e941686..72c72bfccb88 100644 --- a/include/linux/ceph/libceph.h +++ b/include/linux/ceph/libceph.h | |||
| @@ -227,9 +227,10 @@ extern int ceph_open_session(struct ceph_client *client); | |||
| 227 | extern void ceph_release_page_vector(struct page **pages, int num_pages); | 227 | extern void ceph_release_page_vector(struct page **pages, int num_pages); |
| 228 | 228 | ||
| 229 | extern struct page **ceph_get_direct_page_vector(const char __user *data, | 229 | extern struct page **ceph_get_direct_page_vector(const char __user *data, |
| 230 | int num_pages, | 230 | int num_pages, |
| 231 | loff_t off, size_t len); | 231 | bool write_page); |
| 232 | extern void ceph_put_page_vector(struct page **pages, int num_pages); | 232 | extern void ceph_put_page_vector(struct page **pages, int num_pages, |
| 233 | bool dirty); | ||
| 233 | extern void ceph_release_page_vector(struct page **pages, int num_pages); | 234 | extern void ceph_release_page_vector(struct page **pages, int num_pages); |
| 234 | extern struct page **ceph_alloc_page_vector(int num_pages, gfp_t flags); | 235 | extern struct page **ceph_alloc_page_vector(int num_pages, gfp_t flags); |
| 235 | extern int ceph_copy_user_to_page_vector(struct page **pages, | 236 | extern int ceph_copy_user_to_page_vector(struct page **pages, |
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h index 5956d62c3057..a108b425fee2 100644 --- a/include/linux/ceph/messenger.h +++ b/include/linux/ceph/messenger.h | |||
| @@ -82,6 +82,7 @@ struct ceph_msg { | |||
| 82 | struct ceph_buffer *middle; | 82 | struct ceph_buffer *middle; |
| 83 | struct page **pages; /* data payload. NOT OWNER. */ | 83 | struct page **pages; /* data payload. NOT OWNER. */ |
| 84 | unsigned nr_pages; /* size of page array */ | 84 | unsigned nr_pages; /* size of page array */ |
| 85 | unsigned page_alignment; /* io offset in first page */ | ||
| 85 | struct ceph_pagelist *pagelist; /* instead of pages */ | 86 | struct ceph_pagelist *pagelist; /* instead of pages */ |
| 86 | struct list_head list_head; | 87 | struct list_head list_head; |
| 87 | struct kref kref; | 88 | struct kref kref; |
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index 6c91fb032c39..a1af29648fb5 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h | |||
| @@ -79,6 +79,7 @@ struct ceph_osd_request { | |||
| 79 | struct ceph_file_layout r_file_layout; | 79 | struct ceph_file_layout r_file_layout; |
| 80 | struct ceph_snap_context *r_snapc; /* snap context for writes */ | 80 | struct ceph_snap_context *r_snapc; /* snap context for writes */ |
| 81 | unsigned r_num_pages; /* size of page array (follows) */ | 81 | unsigned r_num_pages; /* size of page array (follows) */ |
| 82 | unsigned r_page_alignment; /* io offset in first page */ | ||
| 82 | struct page **r_pages; /* pages for data payload */ | 83 | struct page **r_pages; /* pages for data payload */ |
| 83 | int r_pages_from_pool; | 84 | int r_pages_from_pool; |
| 84 | int r_own_pages; /* if true, i own page list */ | 85 | int r_own_pages; /* if true, i own page list */ |
| @@ -194,7 +195,8 @@ extern struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *, | |||
| 194 | int do_sync, u32 truncate_seq, | 195 | int do_sync, u32 truncate_seq, |
| 195 | u64 truncate_size, | 196 | u64 truncate_size, |
| 196 | struct timespec *mtime, | 197 | struct timespec *mtime, |
| 197 | bool use_mempool, int num_reply); | 198 | bool use_mempool, int num_reply, |
| 199 | int page_align); | ||
| 198 | 200 | ||
| 199 | static inline void ceph_osdc_get_request(struct ceph_osd_request *req) | 201 | static inline void ceph_osdc_get_request(struct ceph_osd_request *req) |
| 200 | { | 202 | { |
| @@ -218,7 +220,8 @@ extern int ceph_osdc_readpages(struct ceph_osd_client *osdc, | |||
| 218 | struct ceph_file_layout *layout, | 220 | struct ceph_file_layout *layout, |
| 219 | u64 off, u64 *plen, | 221 | u64 off, u64 *plen, |
| 220 | u32 truncate_seq, u64 truncate_size, | 222 | u32 truncate_seq, u64 truncate_size, |
| 221 | struct page **pages, int nr_pages); | 223 | struct page **pages, int nr_pages, |
| 224 | int page_align); | ||
| 222 | 225 | ||
| 223 | extern int ceph_osdc_writepages(struct ceph_osd_client *osdc, | 226 | extern int ceph_osdc_writepages(struct ceph_osd_client *osdc, |
| 224 | struct ceph_vino vino, | 227 | struct ceph_vino vino, |
diff --git a/include/linux/cnt32_to_63.h b/include/linux/cnt32_to_63.h index 7605fdd1eb65..e3d8bf26e5eb 100644 --- a/include/linux/cnt32_to_63.h +++ b/include/linux/cnt32_to_63.h | |||
| @@ -61,13 +61,31 @@ union cnt32_to_63 { | |||
| 61 | * | 61 | * |
| 62 | * 2) this code must not be preempted for a duration longer than the | 62 | * 2) this code must not be preempted for a duration longer than the |
| 63 | * 32-bit counter half period minus the longest period between two | 63 | * 32-bit counter half period minus the longest period between two |
| 64 | * calls to this code. | 64 | * calls to this code; |
| 65 | * | 65 | * |
| 66 | * Those requirements ensure proper update to the state bit in memory. | 66 | * Those requirements ensure proper update to the state bit in memory. |
| 67 | * This is usually not a problem in practice, but if it is then a kernel | 67 | * This is usually not a problem in practice, but if it is then a kernel |
| 68 | * timer should be scheduled to manage for this code to be executed often | 68 | * timer should be scheduled to manage for this code to be executed often |
| 69 | * enough. | 69 | * enough. |
| 70 | * | 70 | * |
| 71 | * And finally: | ||
| 72 | * | ||
| 73 | * 3) the cnt_lo argument must be seen as a globally incrementing value, | ||
| 74 | * meaning that it should be a direct reference to the counter data which | ||
| 75 | * can be evaluated according to a specific ordering within the macro, | ||
| 76 | * and not the result of a previous evaluation stored in a variable. | ||
| 77 | * | ||
| 78 | * For example, this is wrong: | ||
| 79 | * | ||
| 80 | * u32 partial = get_hw_count(); | ||
| 81 | * u64 full = cnt32_to_63(partial); | ||
| 82 | * return full; | ||
| 83 | * | ||
| 84 | * This is fine: | ||
| 85 | * | ||
| 86 | * u64 full = cnt32_to_63(get_hw_count()); | ||
| 87 | * return full; | ||
| 88 | * | ||
| 71 | * Note that the top bit (bit 63) in the returned value should be considered | 89 | * Note that the top bit (bit 63) in the returned value should be considered |
| 72 | * as garbage. It is not cleared here because callers are likely to use a | 90 | * as garbage. It is not cleared here because callers are likely to use a |
| 73 | * multiplier on the returned value which can get rid of the top bit | 91 | * multiplier on the returned value which can get rid of the top bit |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 4823af64e9db..5f09323ee880 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
| @@ -10,11 +10,6 @@ | |||
| 10 | * | 10 | * |
| 11 | * CPUs are exported via sysfs in the class/cpu/devices/ | 11 | * CPUs are exported via sysfs in the class/cpu/devices/ |
| 12 | * directory. | 12 | * directory. |
| 13 | * | ||
| 14 | * Per-cpu interfaces can be implemented using a struct device_interface. | ||
| 15 | * See the following for how to do this: | ||
| 16 | * - drivers/base/intf.c | ||
| 17 | * - Documentation/driver-model/interface.txt | ||
| 18 | */ | 13 | */ |
| 19 | #ifndef _LINUX_CPU_H_ | 14 | #ifndef _LINUX_CPU_H_ |
| 20 | #define _LINUX_CPU_H_ | 15 | #define _LINUX_CPU_H_ |
diff --git a/include/linux/dmar.h b/include/linux/dmar.h index a7d9dc21391d..7b776d71d36d 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h | |||
| @@ -175,10 +175,21 @@ static inline int set_msi_sid(struct irte *irte, struct pci_dev *dev) | |||
| 175 | return 0; | 175 | return 0; |
| 176 | } | 176 | } |
| 177 | 177 | ||
| 178 | #define enable_intr_remapping(mode) (-1) | ||
| 179 | #define disable_intr_remapping() (0) | ||
| 180 | #define reenable_intr_remapping(mode) (0) | ||
| 181 | #define intr_remapping_enabled (0) | 178 | #define intr_remapping_enabled (0) |
| 179 | |||
| 180 | static inline int enable_intr_remapping(int eim) | ||
| 181 | { | ||
| 182 | return -1; | ||
| 183 | } | ||
| 184 | |||
| 185 | static inline void disable_intr_remapping(void) | ||
| 186 | { | ||
| 187 | } | ||
| 188 | |||
| 189 | static inline int reenable_intr_remapping(int eim) | ||
| 190 | { | ||
| 191 | return 0; | ||
| 192 | } | ||
| 182 | #endif | 193 | #endif |
| 183 | 194 | ||
| 184 | /* Can't use the common MSI interrupt functions | 195 | /* Can't use the common MSI interrupt functions |
diff --git a/include/linux/drbd.h b/include/linux/drbd.h index 9b2a0158f399..ef44c7a0638c 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h | |||
| @@ -53,7 +53,7 @@ | |||
| 53 | 53 | ||
| 54 | 54 | ||
| 55 | extern const char *drbd_buildtag(void); | 55 | extern const char *drbd_buildtag(void); |
| 56 | #define REL_VERSION "8.3.9rc2" | 56 | #define REL_VERSION "8.3.9" |
| 57 | #define API_VERSION 88 | 57 | #define API_VERSION 88 |
| 58 | #define PRO_VERSION_MIN 86 | 58 | #define PRO_VERSION_MIN 86 |
| 59 | #define PRO_VERSION_MAX 95 | 59 | #define PRO_VERSION_MAX 95 |
diff --git a/include/linux/fanotify.h b/include/linux/fanotify.h index 0f0121467fc4..6c6133f76e16 100644 --- a/include/linux/fanotify.h +++ b/include/linux/fanotify.h | |||
| @@ -83,11 +83,13 @@ | |||
| 83 | FAN_ALL_PERM_EVENTS |\ | 83 | FAN_ALL_PERM_EVENTS |\ |
| 84 | FAN_Q_OVERFLOW) | 84 | FAN_Q_OVERFLOW) |
| 85 | 85 | ||
| 86 | #define FANOTIFY_METADATA_VERSION 2 | 86 | #define FANOTIFY_METADATA_VERSION 3 |
| 87 | 87 | ||
| 88 | struct fanotify_event_metadata { | 88 | struct fanotify_event_metadata { |
| 89 | __u32 event_len; | 89 | __u32 event_len; |
| 90 | __u32 vers; | 90 | __u8 vers; |
| 91 | __u8 reserved; | ||
| 92 | __u16 metadata_len; | ||
| 91 | __aligned_u64 mask; | 93 | __aligned_u64 mask; |
| 92 | __s32 fd; | 94 | __s32 fd; |
| 93 | __s32 pid; | 95 | __s32 pid; |
| @@ -96,11 +98,13 @@ struct fanotify_event_metadata { | |||
| 96 | struct fanotify_response { | 98 | struct fanotify_response { |
| 97 | __s32 fd; | 99 | __s32 fd; |
| 98 | __u32 response; | 100 | __u32 response; |
| 99 | } __attribute__ ((packed)); | 101 | }; |
| 100 | 102 | ||
| 101 | /* Legit userspace responses to a _PERM event */ | 103 | /* Legit userspace responses to a _PERM event */ |
| 102 | #define FAN_ALLOW 0x01 | 104 | #define FAN_ALLOW 0x01 |
| 103 | #define FAN_DENY 0x02 | 105 | #define FAN_DENY 0x02 |
| 106 | /* No fd set in event */ | ||
| 107 | #define FAN_NOFD -1 | ||
| 104 | 108 | ||
| 105 | /* Helper functions to deal with fanotify_event_metadata buffers */ | 109 | /* Helper functions to deal with fanotify_event_metadata buffers */ |
| 106 | #define FAN_EVENT_METADATA_LEN (sizeof(struct fanotify_event_metadata)) | 110 | #define FAN_EVENT_METADATA_LEN (sizeof(struct fanotify_event_metadata)) |
diff --git a/include/linux/fb.h b/include/linux/fb.h index 7fca3dc4e475..d1631d37e9e0 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
| @@ -1122,6 +1122,7 @@ extern const struct fb_videomode *fb_find_best_display(const struct fb_monspecs | |||
| 1122 | 1122 | ||
| 1123 | /* drivers/video/fbcmap.c */ | 1123 | /* drivers/video/fbcmap.c */ |
| 1124 | extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); | 1124 | extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); |
| 1125 | extern int fb_alloc_cmap_gfp(struct fb_cmap *cmap, int len, int transp, gfp_t flags); | ||
| 1125 | extern void fb_dealloc_cmap(struct fb_cmap *cmap); | 1126 | extern void fb_dealloc_cmap(struct fb_cmap *cmap); |
| 1126 | extern int fb_copy_cmap(const struct fb_cmap *from, struct fb_cmap *to); | 1127 | extern int fb_copy_cmap(const struct fb_cmap *from, struct fb_cmap *to); |
| 1127 | extern int fb_cmap_to_user(const struct fb_cmap *from, struct fb_cmap_user *to); | 1128 | extern int fb_cmap_to_user(const struct fb_cmap *from, struct fb_cmap_user *to); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 1eb29399a4ff..090f0eacde29 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -34,9 +34,9 @@ | |||
| 34 | #define SEEK_MAX SEEK_END | 34 | #define SEEK_MAX SEEK_END |
| 35 | 35 | ||
| 36 | struct fstrim_range { | 36 | struct fstrim_range { |
| 37 | uint64_t start; | 37 | __u64 start; |
| 38 | uint64_t len; | 38 | __u64 len; |
| 39 | uint64_t minlen; | 39 | __u64 minlen; |
| 40 | }; | 40 | }; |
| 41 | 41 | ||
| 42 | /* And dynamically-tunable limits and defaults: */ | 42 | /* And dynamically-tunable limits and defaults: */ |
| @@ -602,6 +602,7 @@ struct address_space_operations { | |||
| 602 | sector_t (*bmap)(struct address_space *, sector_t); | 602 | sector_t (*bmap)(struct address_space *, sector_t); |
| 603 | void (*invalidatepage) (struct page *, unsigned long); | 603 | void (*invalidatepage) (struct page *, unsigned long); |
| 604 | int (*releasepage) (struct page *, gfp_t); | 604 | int (*releasepage) (struct page *, gfp_t); |
| 605 | void (*freepage)(struct page *); | ||
| 605 | ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, | 606 | ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, |
| 606 | loff_t offset, unsigned long nr_segs); | 607 | loff_t offset, unsigned long nr_segs); |
| 607 | int (*get_xip_mem)(struct address_space *, pgoff_t, int, | 608 | int (*get_xip_mem)(struct address_space *, pgoff_t, int, |
| @@ -1056,7 +1057,6 @@ struct lock_manager_operations { | |||
| 1056 | int (*fl_compare_owner)(struct file_lock *, struct file_lock *); | 1057 | int (*fl_compare_owner)(struct file_lock *, struct file_lock *); |
| 1057 | void (*fl_notify)(struct file_lock *); /* unblock callback */ | 1058 | void (*fl_notify)(struct file_lock *); /* unblock callback */ |
| 1058 | int (*fl_grant)(struct file_lock *, struct file_lock *, int); | 1059 | int (*fl_grant)(struct file_lock *, struct file_lock *, int); |
| 1059 | void (*fl_copy_lock)(struct file_lock *, struct file_lock *); | ||
| 1060 | void (*fl_release_private)(struct file_lock *); | 1060 | void (*fl_release_private)(struct file_lock *); |
| 1061 | void (*fl_break)(struct file_lock *); | 1061 | void (*fl_break)(struct file_lock *); |
| 1062 | int (*fl_mylease)(struct file_lock *, struct file_lock *); | 1062 | int (*fl_mylease)(struct file_lock *, struct file_lock *); |
| @@ -1613,7 +1613,6 @@ struct super_operations { | |||
| 1613 | ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); | 1613 | ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); |
| 1614 | #endif | 1614 | #endif |
| 1615 | int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t); | 1615 | int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t); |
| 1616 | int (*trim_fs) (struct super_block *, struct fstrim_range *); | ||
| 1617 | }; | 1616 | }; |
| 1618 | 1617 | ||
| 1619 | /* | 1618 | /* |
diff --git a/include/linux/fsl-diu-fb.h b/include/linux/fsl-diu-fb.h index fc295d7ea463..781d4671415f 100644 --- a/include/linux/fsl-diu-fb.h +++ b/include/linux/fsl-diu-fb.h | |||
| @@ -54,7 +54,6 @@ struct aoi_display_offset { | |||
| 54 | }; | 54 | }; |
| 55 | 55 | ||
| 56 | #define MFB_SET_CHROMA_KEY _IOW('M', 1, struct mfb_chroma_key) | 56 | #define MFB_SET_CHROMA_KEY _IOW('M', 1, struct mfb_chroma_key) |
| 57 | #define MFB_WAIT_FOR_VSYNC _IOW('F', 0x20, u_int32_t) | ||
| 58 | #define MFB_SET_BRIGHTNESS _IOW('M', 3, __u8) | 57 | #define MFB_SET_BRIGHTNESS _IOW('M', 3, __u8) |
| 59 | 58 | ||
| 60 | #define MFB_SET_ALPHA 0x80014d00 | 59 | #define MFB_SET_ALPHA 0x80014d00 |
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index 5c185fa27089..b10bcdeaef76 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
| @@ -235,9 +235,6 @@ static inline void fsnotify_open(struct file *file) | |||
| 235 | if (S_ISDIR(inode->i_mode)) | 235 | if (S_ISDIR(inode->i_mode)) |
| 236 | mask |= FS_ISDIR; | 236 | mask |= FS_ISDIR; |
| 237 | 237 | ||
| 238 | /* FMODE_NONOTIFY must never be set from user */ | ||
| 239 | file->f_mode &= ~FMODE_NONOTIFY; | ||
| 240 | |||
| 241 | fsnotify_parent(path, NULL, mask); | 238 | fsnotify_parent(path, NULL, mask); |
| 242 | fsnotify(inode, mask, path, FSNOTIFY_EVENT_PATH, NULL, 0); | 239 | fsnotify(inode, mask, path, FSNOTIFY_EVENT_PATH, NULL, 0); |
| 243 | } | 240 | } |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 0a68f924f06f..7380763595d3 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
| @@ -166,7 +166,7 @@ struct fsnotify_group { | |||
| 166 | struct mutex access_mutex; | 166 | struct mutex access_mutex; |
| 167 | struct list_head access_list; | 167 | struct list_head access_list; |
| 168 | wait_queue_head_t access_waitq; | 168 | wait_queue_head_t access_waitq; |
| 169 | bool bypass_perm; /* protected by access_mutex */ | 169 | atomic_t bypass_perm; |
| 170 | #endif /* CONFIG_FANOTIFY_ACCESS_PERMISSIONS */ | 170 | #endif /* CONFIG_FANOTIFY_ACCESS_PERMISSIONS */ |
| 171 | int f_flags; | 171 | int f_flags; |
| 172 | unsigned int max_marks; | 172 | unsigned int max_marks; |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index e8713d55360a..f54adfcbec9c 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
| @@ -360,7 +360,7 @@ void drain_local_pages(void *dummy); | |||
| 360 | 360 | ||
| 361 | extern gfp_t gfp_allowed_mask; | 361 | extern gfp_t gfp_allowed_mask; |
| 362 | 362 | ||
| 363 | extern void set_gfp_allowed_mask(gfp_t mask); | 363 | extern void pm_restrict_gfp_mask(void); |
| 364 | extern gfp_t clear_gfp_allowed_mask(gfp_t mask); | 364 | extern void pm_restore_gfp_mask(void); |
| 365 | 365 | ||
| 366 | #endif /* __LINUX_GFP_H */ | 366 | #endif /* __LINUX_GFP_H */ |
diff --git a/include/linux/gpio_keys.h b/include/linux/gpio_keys.h index ce73a30113b4..dd1a56fbe924 100644 --- a/include/linux/gpio_keys.h +++ b/include/linux/gpio_keys.h | |||
| @@ -16,6 +16,8 @@ struct gpio_keys_button { | |||
| 16 | struct gpio_keys_platform_data { | 16 | struct gpio_keys_platform_data { |
| 17 | struct gpio_keys_button *buttons; | 17 | struct gpio_keys_button *buttons; |
| 18 | int nbuttons; | 18 | int nbuttons; |
| 19 | unsigned int poll_interval; /* polling interval in msecs - | ||
| 20 | for polling driver only */ | ||
| 19 | unsigned int rep:1; /* enable input subsystem auto repeat */ | 21 | unsigned int rep:1; /* enable input subsystem auto repeat */ |
| 20 | int (*enable)(struct device *dev); | 22 | int (*enable)(struct device *dev); |
| 21 | void (*disable)(struct device *dev); | 23 | void (*disable)(struct device *dev); |
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 8a389b608ce3..32f9fd6619b4 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
| @@ -2,9 +2,6 @@ | |||
| 2 | #define LINUX_HARDIRQ_H | 2 | #define LINUX_HARDIRQ_H |
| 3 | 3 | ||
| 4 | #include <linux/preempt.h> | 4 | #include <linux/preempt.h> |
| 5 | #ifdef CONFIG_PREEMPT | ||
| 6 | #include <linux/smp_lock.h> | ||
| 7 | #endif | ||
| 8 | #include <linux/lockdep.h> | 5 | #include <linux/lockdep.h> |
| 9 | #include <linux/ftrace_irq.h> | 6 | #include <linux/ftrace_irq.h> |
| 10 | #include <asm/hardirq.h> | 7 | #include <asm/hardirq.h> |
| @@ -96,11 +93,16 @@ | |||
| 96 | */ | 93 | */ |
| 97 | #define in_nmi() (preempt_count() & NMI_MASK) | 94 | #define in_nmi() (preempt_count() & NMI_MASK) |
| 98 | 95 | ||
| 96 | #if defined(CONFIG_PREEMPT) && defined(CONFIG_BKL) | ||
| 97 | # include <linux/sched.h> | ||
| 98 | # define PREEMPT_INATOMIC_BASE (current->lock_depth >= 0) | ||
| 99 | #else | ||
| 100 | # define PREEMPT_INATOMIC_BASE 0 | ||
| 101 | #endif | ||
| 102 | |||
| 99 | #if defined(CONFIG_PREEMPT) | 103 | #if defined(CONFIG_PREEMPT) |
| 100 | # define PREEMPT_INATOMIC_BASE kernel_locked() | ||
| 101 | # define PREEMPT_CHECK_OFFSET 1 | 104 | # define PREEMPT_CHECK_OFFSET 1 |
| 102 | #else | 105 | #else |
| 103 | # define PREEMPT_INATOMIC_BASE 0 | ||
| 104 | # define PREEMPT_CHECK_OFFSET 0 | 106 | # define PREEMPT_CHECK_OFFSET 0 |
| 105 | #endif | 107 | #endif |
| 106 | 108 | ||
diff --git a/include/linux/highmem.h b/include/linux/highmem.h index e9138198e823..b676c585574e 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
| 6 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
| 7 | #include <linux/uaccess.h> | 7 | #include <linux/uaccess.h> |
| 8 | #include <linux/hardirq.h> | ||
| 8 | 9 | ||
| 9 | #include <asm/cacheflush.h> | 10 | #include <asm/cacheflush.h> |
| 10 | 11 | ||
diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h index a2d6ea49ec56..d1e55fed2c7d 100644 --- a/include/linux/hw_breakpoint.h +++ b/include/linux/hw_breakpoint.h | |||
| @@ -33,6 +33,8 @@ enum bp_type_idx { | |||
| 33 | 33 | ||
| 34 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | 34 | #ifdef CONFIG_HAVE_HW_BREAKPOINT |
| 35 | 35 | ||
| 36 | extern int __init init_hw_breakpoint(void); | ||
| 37 | |||
| 36 | static inline void hw_breakpoint_init(struct perf_event_attr *attr) | 38 | static inline void hw_breakpoint_init(struct perf_event_attr *attr) |
| 37 | { | 39 | { |
| 38 | memset(attr, 0, sizeof(*attr)); | 40 | memset(attr, 0, sizeof(*attr)); |
| @@ -108,6 +110,8 @@ static inline struct arch_hw_breakpoint *counter_arch_bp(struct perf_event *bp) | |||
| 108 | 110 | ||
| 109 | #else /* !CONFIG_HAVE_HW_BREAKPOINT */ | 111 | #else /* !CONFIG_HAVE_HW_BREAKPOINT */ |
| 110 | 112 | ||
| 113 | static inline int __init init_hw_breakpoint(void) { return 0; } | ||
| 114 | |||
| 111 | static inline struct perf_event * | 115 | static inline struct perf_event * |
| 112 | register_user_hw_breakpoint(struct perf_event_attr *attr, | 116 | register_user_hw_breakpoint(struct perf_event_attr *attr, |
| 113 | perf_overflow_handler_t triggered, | 117 | perf_overflow_handler_t triggered, |
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index e844a0b18695..4bef5c557160 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
| @@ -32,28 +32,6 @@ | |||
| 32 | */ | 32 | */ |
| 33 | 33 | ||
| 34 | /* --- Bit algorithm adapters */ | 34 | /* --- Bit algorithm adapters */ |
| 35 | #define I2C_HW_B_BT848 0x010005 /* BT848 video boards */ | ||
| 36 | #define I2C_HW_B_RIVA 0x010010 /* Riva based graphics cards */ | ||
| 37 | #define I2C_HW_B_ZR36067 0x010019 /* Zoran-36057/36067 based boards */ | ||
| 38 | #define I2C_HW_B_CX2388x 0x01001b /* connexant 2388x based tv cards */ | 35 | #define I2C_HW_B_CX2388x 0x01001b /* connexant 2388x based tv cards */ |
| 39 | #define I2C_HW_B_EM28XX 0x01001f /* em28xx video capture cards */ | ||
| 40 | #define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */ | ||
| 41 | #define I2C_HW_B_CX23885 0x010022 /* conexant 23885 based tv cards (bus1) */ | ||
| 42 | #define I2C_HW_B_AU0828 0x010023 /* auvitek au0828 usb bridge */ | ||
| 43 | #define I2C_HW_B_CX231XX 0x010024 /* Conexant CX231XX USB based cards */ | ||
| 44 | #define I2C_HW_B_HDPVR 0x010025 /* Hauppauge HD PVR */ | ||
| 45 | |||
| 46 | /* --- SGI adapters */ | ||
| 47 | #define I2C_HW_SGI_VINO 0x160000 | ||
| 48 | |||
| 49 | /* --- SMBus only adapters */ | ||
| 50 | #define I2C_HW_SMBUS_W9968CF 0x04000d | ||
| 51 | #define I2C_HW_SMBUS_OV511 0x04000e /* OV511(+) USB 1.1 webcam ICs */ | ||
| 52 | #define I2C_HW_SMBUS_OV518 0x04000f /* OV518(+) USB 1.1 webcam ICs */ | ||
| 53 | #define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */ | ||
| 54 | |||
| 55 | /* --- Miscellaneous adapters */ | ||
| 56 | #define I2C_HW_SAA7146 0x060000 /* SAA7146 video decoder bus */ | ||
| 57 | #define I2C_HW_SAA7134 0x090000 /* SAA7134 video decoder bus */ | ||
| 58 | 36 | ||
| 59 | #endif /* LINUX_I2C_ID_H */ | 37 | #endif /* LINUX_I2C_ID_H */ |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 1f66fa06a97c..56cfe23ffb39 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
| @@ -353,7 +353,7 @@ struct i2c_algorithm { | |||
| 353 | */ | 353 | */ |
| 354 | struct i2c_adapter { | 354 | struct i2c_adapter { |
| 355 | struct module *owner; | 355 | struct module *owner; |
| 356 | unsigned int id; | 356 | unsigned int id __deprecated; |
| 357 | unsigned int class; /* classes to allow probing for */ | 357 | unsigned int class; /* classes to allow probing for */ |
| 358 | const struct i2c_algorithm *algo; /* the algorithm to access the bus */ | 358 | const struct i2c_algorithm *algo; /* the algorithm to access the bus */ |
| 359 | void *algo_data; | 359 | void *algo_data; |
| @@ -407,8 +407,6 @@ void i2c_unlock_adapter(struct i2c_adapter *); | |||
| 407 | 407 | ||
| 408 | /* i2c adapter classes (bitmask) */ | 408 | /* i2c adapter classes (bitmask) */ |
| 409 | #define I2C_CLASS_HWMON (1<<0) /* lm_sensors, ... */ | 409 | #define I2C_CLASS_HWMON (1<<0) /* lm_sensors, ... */ |
| 410 | #define I2C_CLASS_TV_ANALOG (1<<1) /* bttv + friends */ | ||
| 411 | #define I2C_CLASS_TV_DIGITAL (1<<2) /* dvb cards */ | ||
| 412 | #define I2C_CLASS_DDC (1<<3) /* DDC bus on graphics adapters */ | 410 | #define I2C_CLASS_DDC (1<<3) /* DDC bus on graphics adapters */ |
| 413 | #define I2C_CLASS_SPD (1<<7) /* SPD EEPROMs and similar */ | 411 | #define I2C_CLASS_SPD (1<<7) /* SPD EEPROMs and similar */ |
| 414 | 412 | ||
diff --git a/include/linux/i2c/adp5588.h b/include/linux/i2c/adp5588.h index 3c5d6b6e765c..cec17cf6cac2 100644 --- a/include/linux/i2c/adp5588.h +++ b/include/linux/i2c/adp5588.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Analog Devices ADP5588 I/O Expander and QWERTY Keypad Controller | 2 | * Analog Devices ADP5588 I/O Expander and QWERTY Keypad Controller |
| 3 | * | 3 | * |
| 4 | * Copyright 2009 Analog Devices Inc. | 4 | * Copyright 2009-2010 Analog Devices Inc. |
| 5 | * | 5 | * |
| 6 | * Licensed under the GPL-2 or later. | 6 | * Licensed under the GPL-2 or later. |
| 7 | */ | 7 | */ |
| @@ -77,13 +77,26 @@ | |||
| 77 | /* Configuration Register1 */ | 77 | /* Configuration Register1 */ |
| 78 | #define ADP5588_AUTO_INC (1 << 7) | 78 | #define ADP5588_AUTO_INC (1 << 7) |
| 79 | #define ADP5588_GPIEM_CFG (1 << 6) | 79 | #define ADP5588_GPIEM_CFG (1 << 6) |
| 80 | #define ADP5588_OVR_FLOW_M (1 << 5) | ||
| 80 | #define ADP5588_INT_CFG (1 << 4) | 81 | #define ADP5588_INT_CFG (1 << 4) |
| 82 | #define ADP5588_OVR_FLOW_IEN (1 << 3) | ||
| 83 | #define ADP5588_K_LCK_IM (1 << 2) | ||
| 81 | #define ADP5588_GPI_IEN (1 << 1) | 84 | #define ADP5588_GPI_IEN (1 << 1) |
| 85 | #define ADP5588_KE_IEN (1 << 0) | ||
| 82 | 86 | ||
| 83 | /* Interrupt Status Register */ | 87 | /* Interrupt Status Register */ |
| 88 | #define ADP5588_CMP2_INT (1 << 5) | ||
| 89 | #define ADP5588_CMP1_INT (1 << 4) | ||
| 90 | #define ADP5588_OVR_FLOW_INT (1 << 3) | ||
| 91 | #define ADP5588_K_LCK_INT (1 << 2) | ||
| 84 | #define ADP5588_GPI_INT (1 << 1) | 92 | #define ADP5588_GPI_INT (1 << 1) |
| 85 | #define ADP5588_KE_INT (1 << 0) | 93 | #define ADP5588_KE_INT (1 << 0) |
| 86 | 94 | ||
| 95 | /* Key Lock and Event Counter Register */ | ||
| 96 | #define ADP5588_K_LCK_EN (1 << 6) | ||
| 97 | #define ADP5588_LCK21 0x30 | ||
| 98 | #define ADP5588_KEC 0xF | ||
| 99 | |||
| 87 | #define ADP5588_MAXGPIO 18 | 100 | #define ADP5588_MAXGPIO 18 |
| 88 | #define ADP5588_BANK(offs) ((offs) >> 3) | 101 | #define ADP5588_BANK(offs) ((offs) >> 3) |
| 89 | #define ADP5588_BIT(offs) (1u << ((offs) & 0x7)) | 102 | #define ADP5588_BIT(offs) (1u << ((offs) & 0x7)) |
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index c2f3a72712ce..635e1faec412 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
| @@ -339,6 +339,31 @@ static inline int vlan_get_tag(const struct sk_buff *skb, u16 *vlan_tci) | |||
| 339 | } | 339 | } |
| 340 | } | 340 | } |
| 341 | 341 | ||
| 342 | /** | ||
| 343 | * vlan_get_protocol - get protocol EtherType. | ||
| 344 | * @skb: skbuff to query | ||
| 345 | * | ||
| 346 | * Returns the EtherType of the packet, regardless of whether it is | ||
| 347 | * vlan encapsulated (normal or hardware accelerated) or not. | ||
| 348 | */ | ||
| 349 | static inline __be16 vlan_get_protocol(const struct sk_buff *skb) | ||
| 350 | { | ||
| 351 | __be16 protocol = 0; | ||
| 352 | |||
| 353 | if (vlan_tx_tag_present(skb) || | ||
| 354 | skb->protocol != cpu_to_be16(ETH_P_8021Q)) | ||
| 355 | protocol = skb->protocol; | ||
| 356 | else { | ||
| 357 | __be16 proto, *protop; | ||
| 358 | protop = skb_header_pointer(skb, offsetof(struct vlan_ethhdr, | ||
| 359 | h_vlan_encapsulated_proto), | ||
| 360 | sizeof(proto), &proto); | ||
| 361 | if (likely(protop)) | ||
| 362 | protocol = *protop; | ||
| 363 | } | ||
| 364 | |||
| 365 | return protocol; | ||
| 366 | } | ||
| 342 | #endif /* __KERNEL__ */ | 367 | #endif /* __KERNEL__ */ |
| 343 | 368 | ||
| 344 | /* VLAN IOCTLs are found in sockios.h */ | 369 | /* VLAN IOCTLs are found in sockios.h */ |
diff --git a/include/linux/input.h b/include/linux/input.h index 51af441f3a21..9777668883be 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -47,6 +47,25 @@ struct input_id { | |||
| 47 | __u16 version; | 47 | __u16 version; |
| 48 | }; | 48 | }; |
| 49 | 49 | ||
| 50 | /** | ||
| 51 | * struct input_absinfo - used by EVIOCGABS/EVIOCSABS ioctls | ||
| 52 | * @value: latest reported value for the axis. | ||
| 53 | * @minimum: specifies minimum value for the axis. | ||
| 54 | * @maximum: specifies maximum value for the axis. | ||
| 55 | * @fuzz: specifies fuzz value that is used to filter noise from | ||
| 56 | * the event stream. | ||
| 57 | * @flat: values that are within this value will be discarded by | ||
| 58 | * joydev interface and reported as 0 instead. | ||
| 59 | * @resolution: specifies resolution for the values reported for | ||
| 60 | * the axis. | ||
| 61 | * | ||
| 62 | * Note that input core does not clamp reported values to the | ||
| 63 | * [minimum, maximum] limits, such task is left to userspace. | ||
| 64 | * | ||
| 65 | * Resolution for main axes (ABS_X, ABS_Y, ABS_Z) is reported in | ||
| 66 | * units per millimeter (units/mm), resolution for rotational axes | ||
| 67 | * (ABS_RX, ABS_RY, ABS_RZ) is reported in units per radian. | ||
| 68 | */ | ||
| 50 | struct input_absinfo { | 69 | struct input_absinfo { |
| 51 | __s32 value; | 70 | __s32 value; |
| 52 | __s32 minimum; | 71 | __s32 minimum; |
| @@ -85,8 +104,10 @@ struct input_keymap_entry { | |||
| 85 | #define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */ | 104 | #define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */ |
| 86 | #define EVIOCSREP _IOW('E', 0x03, unsigned int[2]) /* set repeat settings */ | 105 | #define EVIOCSREP _IOW('E', 0x03, unsigned int[2]) /* set repeat settings */ |
| 87 | 106 | ||
| 88 | #define EVIOCGKEYCODE _IOR('E', 0x04, struct input_keymap_entry) /* get keycode */ | 107 | #define EVIOCGKEYCODE _IOR('E', 0x04, unsigned int[2]) /* get keycode */ |
| 89 | #define EVIOCSKEYCODE _IOW('E', 0x04, struct input_keymap_entry) /* set keycode */ | 108 | #define EVIOCGKEYCODE_V2 _IOR('E', 0x04, struct input_keymap_entry) |
| 109 | #define EVIOCSKEYCODE _IOW('E', 0x04, unsigned int[2]) /* set keycode */ | ||
| 110 | #define EVIOCSKEYCODE_V2 _IOW('E', 0x04, struct input_keymap_entry) | ||
| 90 | 111 | ||
| 91 | #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ | 112 | #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ |
| 92 | #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ | 113 | #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ |
| @@ -624,6 +645,10 @@ struct input_keymap_entry { | |||
| 624 | #define KEY_CAMERA_FOCUS 0x210 | 645 | #define KEY_CAMERA_FOCUS 0x210 |
| 625 | #define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ | 646 | #define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ |
| 626 | 647 | ||
| 648 | #define KEY_TOUCHPAD_TOGGLE 0x212 /* Request switch touchpad on or off */ | ||
| 649 | #define KEY_TOUCHPAD_ON 0x213 | ||
| 650 | #define KEY_TOUCHPAD_OFF 0x214 | ||
| 651 | |||
| 627 | #define BTN_TRIGGER_HAPPY 0x2c0 | 652 | #define BTN_TRIGGER_HAPPY 0x2c0 |
| 628 | #define BTN_TRIGGER_HAPPY1 0x2c0 | 653 | #define BTN_TRIGGER_HAPPY1 0x2c0 |
| 629 | #define BTN_TRIGGER_HAPPY2 0x2c1 | 654 | #define BTN_TRIGGER_HAPPY2 0x2c1 |
| @@ -1130,7 +1155,7 @@ struct input_mt_slot { | |||
| 1130 | * of tracked contacts | 1155 | * of tracked contacts |
| 1131 | * @mtsize: number of MT slots the device uses | 1156 | * @mtsize: number of MT slots the device uses |
| 1132 | * @slot: MT slot currently being transmitted | 1157 | * @slot: MT slot currently being transmitted |
| 1133 | * @absinfo: array of &struct absinfo elements holding information | 1158 | * @absinfo: array of &struct input_absinfo elements holding information |
| 1134 | * about absolute axes (current value, min, max, flat, fuzz, | 1159 | * about absolute axes (current value, min, max, flat, fuzz, |
| 1135 | * resolution) | 1160 | * resolution) |
| 1136 | * @key: reflects current state of device's keys/buttons | 1161 | * @key: reflects current state of device's keys/buttons |
| @@ -1406,6 +1431,8 @@ static inline void input_set_drvdata(struct input_dev *dev, void *data) | |||
| 1406 | int __must_check input_register_device(struct input_dev *); | 1431 | int __must_check input_register_device(struct input_dev *); |
| 1407 | void input_unregister_device(struct input_dev *); | 1432 | void input_unregister_device(struct input_dev *); |
| 1408 | 1433 | ||
| 1434 | void input_reset_device(struct input_dev *); | ||
| 1435 | |||
| 1409 | int __must_check input_register_handler(struct input_handler *); | 1436 | int __must_check input_register_handler(struct input_handler *); |
| 1410 | void input_unregister_handler(struct input_handler *); | 1437 | void input_unregister_handler(struct input_handler *); |
| 1411 | 1438 | ||
| @@ -1421,7 +1448,7 @@ void input_release_device(struct input_handle *); | |||
| 1421 | int input_open_device(struct input_handle *); | 1448 | int input_open_device(struct input_handle *); |
| 1422 | void input_close_device(struct input_handle *); | 1449 | void input_close_device(struct input_handle *); |
| 1423 | 1450 | ||
| 1424 | int input_flush_device(struct input_handle* handle, struct file* file); | 1451 | int input_flush_device(struct input_handle *handle, struct file *file); |
| 1425 | 1452 | ||
| 1426 | void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value); | 1453 | void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value); |
| 1427 | void input_inject_event(struct input_handle *handle, unsigned int type, unsigned int code, int value); | 1454 | void input_inject_event(struct input_handle *handle, unsigned int type, unsigned int code, int value); |
diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h index 3e70b21884a9..b2eee896dcbc 100644 --- a/include/linux/iocontext.h +++ b/include/linux/iocontext.h | |||
| @@ -76,7 +76,6 @@ int put_io_context(struct io_context *ioc); | |||
| 76 | void exit_io_context(struct task_struct *task); | 76 | void exit_io_context(struct task_struct *task); |
| 77 | struct io_context *get_io_context(gfp_t gfp_flags, int node); | 77 | struct io_context *get_io_context(gfp_t gfp_flags, int node); |
| 78 | struct io_context *alloc_io_context(gfp_t gfp_flags, int node); | 78 | struct io_context *alloc_io_context(gfp_t gfp_flags, int node); |
| 79 | void copy_io_context(struct io_context **pdst, struct io_context **psrc); | ||
| 80 | #else | 79 | #else |
| 81 | static inline void exit_io_context(struct task_struct *task) | 80 | static inline void exit_io_context(struct task_struct *task) |
| 82 | { | 81 | { |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index d377ea815d45..e9bb22cba764 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
| @@ -112,7 +112,6 @@ struct resource_list { | |||
| 112 | /* PC/ISA/whatever - the normal PC address spaces: IO and memory */ | 112 | /* PC/ISA/whatever - the normal PC address spaces: IO and memory */ |
| 113 | extern struct resource ioport_resource; | 113 | extern struct resource ioport_resource; |
| 114 | extern struct resource iomem_resource; | 114 | extern struct resource iomem_resource; |
| 115 | extern int resource_alloc_from_bottom; | ||
| 116 | 115 | ||
| 117 | extern struct resource *request_resource_conflict(struct resource *root, struct resource *new); | 116 | extern struct resource *request_resource_conflict(struct resource *root, struct resource *new); |
| 118 | extern int request_resource(struct resource *root, struct resource *new); | 117 | extern int request_resource(struct resource *root, struct resource *new); |
| @@ -124,6 +123,7 @@ extern void reserve_region_with_split(struct resource *root, | |||
| 124 | extern struct resource *insert_resource_conflict(struct resource *parent, struct resource *new); | 123 | extern struct resource *insert_resource_conflict(struct resource *parent, struct resource *new); |
| 125 | extern int insert_resource(struct resource *parent, struct resource *new); | 124 | extern int insert_resource(struct resource *parent, struct resource *new); |
| 126 | extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new); | 125 | extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new); |
| 126 | extern void arch_remove_reservations(struct resource *avail); | ||
| 127 | extern int allocate_resource(struct resource *root, struct resource *new, | 127 | extern int allocate_resource(struct resource *root, struct resource *new, |
| 128 | resource_size_t size, resource_size_t min, | 128 | resource_size_t size, resource_size_t min, |
| 129 | resource_size_t max, resource_size_t align, | 129 | resource_size_t max, resource_size_t align, |
diff --git a/include/linux/irq.h b/include/linux/irq.h index e9639115dff1..abde2527c699 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -412,6 +412,11 @@ static inline void irq_free_desc(unsigned int irq) | |||
| 412 | irq_free_descs(irq, 1); | 412 | irq_free_descs(irq, 1); |
| 413 | } | 413 | } |
| 414 | 414 | ||
| 415 | static inline int irq_reserve_irq(unsigned int irq) | ||
| 416 | { | ||
| 417 | return irq_reserve_irqs(irq, 1); | ||
| 418 | } | ||
| 419 | |||
| 415 | #endif /* CONFIG_GENERIC_HARDIRQS */ | 420 | #endif /* CONFIG_GENERIC_HARDIRQS */ |
| 416 | 421 | ||
| 417 | #endif /* !CONFIG_S390 */ | 422 | #endif /* !CONFIG_S390 */ |
diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h index 05aa8c23483f..3bc4dcab6e82 100644 --- a/include/linux/irqnr.h +++ b/include/linux/irqnr.h | |||
| @@ -43,7 +43,7 @@ unsigned int irq_get_next_irq(unsigned int offset); | |||
| 43 | else | 43 | else |
| 44 | 44 | ||
| 45 | #ifdef CONFIG_SMP | 45 | #ifdef CONFIG_SMP |
| 46 | #define irq_node(irq) (irq_to_desc(irq)->node) | 46 | #define irq_node(irq) (irq_get_irq_data(irq)->node) |
| 47 | #else | 47 | #else |
| 48 | #define irq_node(irq) 0 | 48 | #define irq_node(irq) 0 |
| 49 | #endif | 49 | #endif |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 450092c1e35f..b6de9a6f7018 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -17,13 +17,11 @@ | |||
| 17 | #include <linux/bitops.h> | 17 | #include <linux/bitops.h> |
| 18 | #include <linux/log2.h> | 18 | #include <linux/log2.h> |
| 19 | #include <linux/typecheck.h> | 19 | #include <linux/typecheck.h> |
| 20 | #include <linux/printk.h> | ||
| 20 | #include <linux/dynamic_debug.h> | 21 | #include <linux/dynamic_debug.h> |
| 21 | #include <asm/byteorder.h> | 22 | #include <asm/byteorder.h> |
| 22 | #include <asm/bug.h> | 23 | #include <asm/bug.h> |
| 23 | 24 | ||
| 24 | extern const char linux_banner[]; | ||
| 25 | extern const char linux_proc_banner[]; | ||
| 26 | |||
| 27 | #define USHRT_MAX ((u16)(~0U)) | 25 | #define USHRT_MAX ((u16)(~0U)) |
| 28 | #define SHRT_MAX ((s16)(USHRT_MAX>>1)) | 26 | #define SHRT_MAX ((s16)(USHRT_MAX>>1)) |
| 29 | #define SHRT_MIN ((s16)(-SHRT_MAX - 1)) | 27 | #define SHRT_MIN ((s16)(-SHRT_MAX - 1)) |
| @@ -60,7 +58,7 @@ extern const char linux_proc_banner[]; | |||
| 60 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) | 58 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) |
| 61 | #define roundup(x, y) ( \ | 59 | #define roundup(x, y) ( \ |
| 62 | { \ | 60 | { \ |
| 63 | typeof(y) __y = y; \ | 61 | const typeof(y) __y = y; \ |
| 64 | (((x) + (__y - 1)) / __y) * __y; \ | 62 | (((x) + (__y - 1)) / __y) * __y; \ |
| 65 | } \ | 63 | } \ |
| 66 | ) | 64 | ) |
| @@ -110,31 +108,6 @@ extern const char linux_proc_banner[]; | |||
| 110 | */ | 108 | */ |
| 111 | #define lower_32_bits(n) ((u32)(n)) | 109 | #define lower_32_bits(n) ((u32)(n)) |
| 112 | 110 | ||
| 113 | #define KERN_EMERG "<0>" /* system is unusable */ | ||
| 114 | #define KERN_ALERT "<1>" /* action must be taken immediately */ | ||
| 115 | #define KERN_CRIT "<2>" /* critical conditions */ | ||
| 116 | #define KERN_ERR "<3>" /* error conditions */ | ||
| 117 | #define KERN_WARNING "<4>" /* warning conditions */ | ||
| 118 | #define KERN_NOTICE "<5>" /* normal but significant condition */ | ||
| 119 | #define KERN_INFO "<6>" /* informational */ | ||
| 120 | #define KERN_DEBUG "<7>" /* debug-level messages */ | ||
| 121 | |||
| 122 | /* Use the default kernel loglevel */ | ||
| 123 | #define KERN_DEFAULT "<d>" | ||
| 124 | /* | ||
| 125 | * Annotation for a "continued" line of log printout (only done after a | ||
| 126 | * line that had no enclosing \n). Only to be used by core/arch code | ||
| 127 | * during early bootup (a continued line is not SMP-safe otherwise). | ||
| 128 | */ | ||
| 129 | #define KERN_CONT "<c>" | ||
| 130 | |||
| 131 | extern int console_printk[]; | ||
| 132 | |||
| 133 | #define console_loglevel (console_printk[0]) | ||
| 134 | #define default_message_loglevel (console_printk[1]) | ||
| 135 | #define minimum_console_loglevel (console_printk[2]) | ||
| 136 | #define default_console_loglevel (console_printk[3]) | ||
| 137 | |||
| 138 | struct completion; | 111 | struct completion; |
| 139 | struct pt_regs; | 112 | struct pt_regs; |
| 140 | struct user; | 113 | struct user; |
| @@ -187,11 +160,6 @@ static inline void might_fault(void) | |||
| 187 | } | 160 | } |
| 188 | #endif | 161 | #endif |
| 189 | 162 | ||
| 190 | struct va_format { | ||
| 191 | const char *fmt; | ||
| 192 | va_list *va; | ||
| 193 | }; | ||
| 194 | |||
| 195 | extern struct atomic_notifier_head panic_notifier_list; | 163 | extern struct atomic_notifier_head panic_notifier_list; |
| 196 | extern long (*panic_blink)(int state); | 164 | extern long (*panic_blink)(int state); |
| 197 | NORET_TYPE void panic(const char * fmt, ...) | 165 | NORET_TYPE void panic(const char * fmt, ...) |
| @@ -245,114 +213,8 @@ extern int func_ptr_is_kernel_text(void *ptr); | |||
| 245 | struct pid; | 213 | struct pid; |
| 246 | extern struct pid *session_of_pgrp(struct pid *pgrp); | 214 | extern struct pid *session_of_pgrp(struct pid *pgrp); |
| 247 | 215 | ||
| 248 | /* | ||
| 249 | * FW_BUG | ||
| 250 | * Add this to a message where you are sure the firmware is buggy or behaves | ||
| 251 | * really stupid or out of spec. Be aware that the responsible BIOS developer | ||
| 252 | * should be able to fix this issue or at least get a concrete idea of the | ||
| 253 | * problem by reading your message without the need of looking at the kernel | ||
| 254 | * code. | ||
| 255 | * | ||
| 256 | * Use it for definite and high priority BIOS bugs. | ||
| 257 | * | ||
| 258 | * FW_WARN | ||
| 259 | * Use it for not that clear (e.g. could the kernel messed up things already?) | ||
| 260 | * and medium priority BIOS bugs. | ||
| 261 | * | ||
| 262 | * FW_INFO | ||
| 263 | * Use this one if you want to tell the user or vendor about something | ||
| 264 | * suspicious, but generally harmless related to the firmware. | ||
| 265 | * | ||
| 266 | * Use it for information or very low priority BIOS bugs. | ||
| 267 | */ | ||
| 268 | #define FW_BUG "[Firmware Bug]: " | ||
| 269 | #define FW_WARN "[Firmware Warn]: " | ||
| 270 | #define FW_INFO "[Firmware Info]: " | ||
| 271 | |||
| 272 | /* | ||
| 273 | * HW_ERR | ||
| 274 | * Add this to a message for hardware errors, so that user can report | ||
| 275 | * it to hardware vendor instead of LKML or software vendor. | ||
| 276 | */ | ||
| 277 | #define HW_ERR "[Hardware Error]: " | ||
| 278 | |||
| 279 | #ifdef CONFIG_PRINTK | ||
| 280 | asmlinkage int vprintk(const char *fmt, va_list args) | ||
| 281 | __attribute__ ((format (printf, 1, 0))); | ||
| 282 | asmlinkage int printk(const char * fmt, ...) | ||
| 283 | __attribute__ ((format (printf, 1, 2))) __cold; | ||
| 284 | |||
| 285 | /* | ||
| 286 | * Please don't use printk_ratelimit(), because it shares ratelimiting state | ||
| 287 | * with all other unrelated printk_ratelimit() callsites. Instead use | ||
| 288 | * printk_ratelimited() or plain old __ratelimit(). | ||
| 289 | */ | ||
| 290 | extern int __printk_ratelimit(const char *func); | ||
| 291 | #define printk_ratelimit() __printk_ratelimit(__func__) | ||
| 292 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, | ||
| 293 | unsigned int interval_msec); | ||
| 294 | |||
| 295 | extern int printk_delay_msec; | ||
| 296 | |||
| 297 | /* | ||
| 298 | * Print a one-time message (analogous to WARN_ONCE() et al): | ||
| 299 | */ | ||
| 300 | #define printk_once(x...) ({ \ | ||
| 301 | static bool __print_once; \ | ||
| 302 | \ | ||
| 303 | if (!__print_once) { \ | ||
| 304 | __print_once = true; \ | ||
| 305 | printk(x); \ | ||
| 306 | } \ | ||
| 307 | }) | ||
| 308 | |||
| 309 | void log_buf_kexec_setup(void); | ||
| 310 | #else | ||
| 311 | static inline int vprintk(const char *s, va_list args) | ||
| 312 | __attribute__ ((format (printf, 1, 0))); | ||
| 313 | static inline int vprintk(const char *s, va_list args) { return 0; } | ||
| 314 | static inline int printk(const char *s, ...) | ||
| 315 | __attribute__ ((format (printf, 1, 2))); | ||
| 316 | static inline int __cold printk(const char *s, ...) { return 0; } | ||
| 317 | static inline int printk_ratelimit(void) { return 0; } | ||
| 318 | static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \ | ||
| 319 | unsigned int interval_msec) \ | ||
| 320 | { return false; } | ||
| 321 | |||
| 322 | /* No effect, but we still get type checking even in the !PRINTK case: */ | ||
| 323 | #define printk_once(x...) printk(x) | ||
| 324 | |||
| 325 | static inline void log_buf_kexec_setup(void) | ||
| 326 | { | ||
| 327 | } | ||
| 328 | #endif | ||
| 329 | |||
| 330 | /* | ||
| 331 | * Dummy printk for disabled debugging statements to use whilst maintaining | ||
| 332 | * gcc's format and side-effect checking. | ||
| 333 | */ | ||
| 334 | static inline __attribute__ ((format (printf, 1, 2))) | ||
| 335 | int no_printk(const char *s, ...) { return 0; } | ||
| 336 | |||
| 337 | extern int printk_needs_cpu(int cpu); | ||
| 338 | extern void printk_tick(void); | ||
| 339 | |||
| 340 | extern void asmlinkage __attribute__((format(printf, 1, 2))) | ||
| 341 | early_printk(const char *fmt, ...); | ||
| 342 | |||
| 343 | unsigned long int_sqrt(unsigned long); | 216 | unsigned long int_sqrt(unsigned long); |
| 344 | 217 | ||
| 345 | static inline void console_silent(void) | ||
| 346 | { | ||
| 347 | console_loglevel = 0; | ||
| 348 | } | ||
| 349 | |||
| 350 | static inline void console_verbose(void) | ||
| 351 | { | ||
| 352 | if (console_loglevel) | ||
| 353 | console_loglevel = 15; | ||
| 354 | } | ||
| 355 | |||
| 356 | extern void bust_spinlocks(int yes); | 218 | extern void bust_spinlocks(int yes); |
| 357 | extern void wake_up_klogd(void); | 219 | extern void wake_up_klogd(void); |
| 358 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ | 220 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ |
| @@ -389,22 +251,6 @@ extern enum system_states { | |||
| 389 | #define TAINT_CRAP 10 | 251 | #define TAINT_CRAP 10 |
| 390 | #define TAINT_FIRMWARE_WORKAROUND 11 | 252 | #define TAINT_FIRMWARE_WORKAROUND 11 |
| 391 | 253 | ||
| 392 | extern void dump_stack(void) __cold; | ||
| 393 | |||
| 394 | enum { | ||
| 395 | DUMP_PREFIX_NONE, | ||
| 396 | DUMP_PREFIX_ADDRESS, | ||
| 397 | DUMP_PREFIX_OFFSET | ||
| 398 | }; | ||
| 399 | extern void hex_dump_to_buffer(const void *buf, size_t len, | ||
| 400 | int rowsize, int groupsize, | ||
| 401 | char *linebuf, size_t linebuflen, bool ascii); | ||
| 402 | extern void print_hex_dump(const char *level, const char *prefix_str, | ||
| 403 | int prefix_type, int rowsize, int groupsize, | ||
| 404 | const void *buf, size_t len, bool ascii); | ||
| 405 | extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type, | ||
| 406 | const void *buf, size_t len); | ||
| 407 | |||
| 408 | extern const char hex_asc[]; | 254 | extern const char hex_asc[]; |
| 409 | #define hex_asc_lo(x) hex_asc[((x) & 0x0f)] | 255 | #define hex_asc_lo(x) hex_asc[((x) & 0x0f)] |
| 410 | #define hex_asc_hi(x) hex_asc[((x) & 0xf0) >> 4] | 256 | #define hex_asc_hi(x) hex_asc[((x) & 0xf0) >> 4] |
| @@ -418,94 +264,6 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
| 418 | 264 | ||
| 419 | extern int hex_to_bin(char ch); | 265 | extern int hex_to_bin(char ch); |
| 420 | 266 | ||
| 421 | #ifndef pr_fmt | ||
| 422 | #define pr_fmt(fmt) fmt | ||
| 423 | #endif | ||
| 424 | |||
| 425 | #define pr_emerg(fmt, ...) \ | ||
| 426 | printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 427 | #define pr_alert(fmt, ...) \ | ||
| 428 | printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) | ||
| 429 | #define pr_crit(fmt, ...) \ | ||
| 430 | printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) | ||
| 431 | #define pr_err(fmt, ...) \ | ||
| 432 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) | ||
| 433 | #define pr_warning(fmt, ...) \ | ||
| 434 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ||
| 435 | #define pr_warn pr_warning | ||
| 436 | #define pr_notice(fmt, ...) \ | ||
| 437 | printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) | ||
| 438 | #define pr_info(fmt, ...) \ | ||
| 439 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | ||
| 440 | #define pr_cont(fmt, ...) \ | ||
| 441 | printk(KERN_CONT fmt, ##__VA_ARGS__) | ||
| 442 | |||
| 443 | /* pr_devel() should produce zero code unless DEBUG is defined */ | ||
| 444 | #ifdef DEBUG | ||
| 445 | #define pr_devel(fmt, ...) \ | ||
| 446 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 447 | #else | ||
| 448 | #define pr_devel(fmt, ...) \ | ||
| 449 | ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) | ||
| 450 | #endif | ||
| 451 | |||
| 452 | /* If you are writing a driver, please use dev_dbg instead */ | ||
| 453 | #if defined(DEBUG) | ||
| 454 | #define pr_debug(fmt, ...) \ | ||
| 455 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 456 | #elif defined(CONFIG_DYNAMIC_DEBUG) | ||
| 457 | /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */ | ||
| 458 | #define pr_debug(fmt, ...) \ | ||
| 459 | dynamic_pr_debug(fmt, ##__VA_ARGS__) | ||
| 460 | #else | ||
| 461 | #define pr_debug(fmt, ...) \ | ||
| 462 | ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) | ||
| 463 | #endif | ||
| 464 | |||
| 465 | /* | ||
| 466 | * ratelimited messages with local ratelimit_state, | ||
| 467 | * no local ratelimit_state used in the !PRINTK case | ||
| 468 | */ | ||
| 469 | #ifdef CONFIG_PRINTK | ||
| 470 | #define printk_ratelimited(fmt, ...) ({ \ | ||
| 471 | static DEFINE_RATELIMIT_STATE(_rs, \ | ||
| 472 | DEFAULT_RATELIMIT_INTERVAL, \ | ||
| 473 | DEFAULT_RATELIMIT_BURST); \ | ||
| 474 | \ | ||
| 475 | if (__ratelimit(&_rs)) \ | ||
| 476 | printk(fmt, ##__VA_ARGS__); \ | ||
| 477 | }) | ||
| 478 | #else | ||
| 479 | /* No effect, but we still get type checking even in the !PRINTK case: */ | ||
| 480 | #define printk_ratelimited printk | ||
| 481 | #endif | ||
| 482 | |||
| 483 | #define pr_emerg_ratelimited(fmt, ...) \ | ||
| 484 | printk_ratelimited(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 485 | #define pr_alert_ratelimited(fmt, ...) \ | ||
| 486 | printk_ratelimited(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) | ||
| 487 | #define pr_crit_ratelimited(fmt, ...) \ | ||
| 488 | printk_ratelimited(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) | ||
| 489 | #define pr_err_ratelimited(fmt, ...) \ | ||
| 490 | printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) | ||
| 491 | #define pr_warning_ratelimited(fmt, ...) \ | ||
| 492 | printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ||
| 493 | #define pr_warn_ratelimited pr_warning_ratelimited | ||
| 494 | #define pr_notice_ratelimited(fmt, ...) \ | ||
| 495 | printk_ratelimited(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) | ||
| 496 | #define pr_info_ratelimited(fmt, ...) \ | ||
| 497 | printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | ||
| 498 | /* no pr_cont_ratelimited, don't do that... */ | ||
| 499 | /* If you are writing a driver, please use dev_dbg instead */ | ||
| 500 | #if defined(DEBUG) | ||
| 501 | #define pr_debug_ratelimited(fmt, ...) \ | ||
| 502 | printk_ratelimited(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 503 | #else | ||
| 504 | #define pr_debug_ratelimited(fmt, ...) \ | ||
| 505 | ({ if (0) printk_ratelimited(KERN_DEBUG pr_fmt(fmt), \ | ||
| 506 | ##__VA_ARGS__); 0; }) | ||
| 507 | #endif | ||
| 508 | |||
| 509 | /* | 267 | /* |
| 510 | * General tracing related utility functions - trace_printk(), | 268 | * General tracing related utility functions - trace_printk(), |
| 511 | * tracing_on/tracing_off and tracing_start()/tracing_stop | 269 | * tracing_on/tracing_off and tracing_start()/tracing_stop |
diff --git a/include/linux/leds-lp5521.h b/include/linux/leds-lp5521.h new file mode 100644 index 000000000000..38368d785f08 --- /dev/null +++ b/include/linux/leds-lp5521.h | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | /* | ||
| 2 | * LP5521 LED chip driver. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Nokia Corporation | ||
| 5 | * | ||
| 6 | * Contact: Samu Onkalo <samu.p.onkalo@nokia.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or | ||
| 9 | * modify it under the terms of the GNU General Public License | ||
| 10 | * version 2 as published by the Free Software Foundation. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, but | ||
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 15 | * General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
| 20 | * 02110-1301 USA | ||
| 21 | */ | ||
| 22 | |||
| 23 | #ifndef __LINUX_LP5521_H | ||
| 24 | #define __LINUX_LP5521_H | ||
| 25 | |||
| 26 | /* See Documentation/leds/leds-lp5521.txt */ | ||
| 27 | |||
| 28 | struct lp5521_led_config { | ||
| 29 | u8 chan_nr; | ||
| 30 | u8 led_current; /* mA x10, 0 if led is not connected */ | ||
| 31 | u8 max_current; | ||
| 32 | }; | ||
| 33 | |||
| 34 | #define LP5521_CLOCK_AUTO 0 | ||
| 35 | #define LP5521_CLOCK_INT 1 | ||
| 36 | #define LP5521_CLOCK_EXT 2 | ||
| 37 | |||
| 38 | struct lp5521_platform_data { | ||
| 39 | struct lp5521_led_config *led_config; | ||
| 40 | u8 num_channels; | ||
| 41 | u8 clock_mode; | ||
| 42 | int (*setup_resources)(void); | ||
| 43 | void (*release_resources)(void); | ||
| 44 | void (*enable)(bool state); | ||
| 45 | }; | ||
| 46 | |||
| 47 | #endif /* __LINUX_LP5521_H */ | ||
diff --git a/include/linux/leds-lp5523.h b/include/linux/leds-lp5523.h new file mode 100644 index 000000000000..796747637b80 --- /dev/null +++ b/include/linux/leds-lp5523.h | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | /* | ||
| 2 | * LP5523 LED Driver | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Nokia Corporation | ||
| 5 | * | ||
| 6 | * Contact: Samu Onkalo <samu.p.onkalo@nokia.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or | ||
| 9 | * modify it under the terms of the GNU General Public License | ||
| 10 | * version 2 as published by the Free Software Foundation. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, but | ||
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 15 | * General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
| 20 | * 02110-1301 USA | ||
| 21 | */ | ||
| 22 | |||
| 23 | #ifndef __LINUX_LP5523_H | ||
| 24 | #define __LINUX_LP5523_H | ||
| 25 | |||
| 26 | /* See Documentation/leds/leds-lp5523.txt */ | ||
| 27 | |||
| 28 | struct lp5523_led_config { | ||
| 29 | u8 chan_nr; | ||
| 30 | u8 led_current; /* mA x10, 0 if led is not connected */ | ||
| 31 | u8 max_current; | ||
| 32 | }; | ||
| 33 | |||
| 34 | #define LP5523_CLOCK_AUTO 0 | ||
| 35 | #define LP5523_CLOCK_INT 1 | ||
| 36 | #define LP5523_CLOCK_EXT 2 | ||
| 37 | |||
| 38 | struct lp5523_platform_data { | ||
| 39 | struct lp5523_led_config *led_config; | ||
| 40 | u8 num_channels; | ||
| 41 | u8 clock_mode; | ||
| 42 | int (*setup_resources)(void); | ||
| 43 | void (*release_resources)(void); | ||
| 44 | void (*enable)(bool state); | ||
| 45 | }; | ||
| 46 | |||
| 47 | #endif /* __LINUX_LP5523_H */ | ||
diff --git a/include/linux/leds.h b/include/linux/leds.h index ba6986a11663..0f19df9e37b0 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
| 16 | #include <linux/spinlock.h> | 16 | #include <linux/spinlock.h> |
| 17 | #include <linux/rwsem.h> | 17 | #include <linux/rwsem.h> |
| 18 | #include <linux/timer.h> | ||
| 18 | 19 | ||
| 19 | struct device; | 20 | struct device; |
| 20 | /* | 21 | /* |
| @@ -45,10 +46,14 @@ struct led_classdev { | |||
| 45 | /* Get LED brightness level */ | 46 | /* Get LED brightness level */ |
| 46 | enum led_brightness (*brightness_get)(struct led_classdev *led_cdev); | 47 | enum led_brightness (*brightness_get)(struct led_classdev *led_cdev); |
| 47 | 48 | ||
| 48 | /* Activate hardware accelerated blink, delays are in | 49 | /* |
| 49 | * miliseconds and if none is provided then a sensible default | 50 | * Activate hardware accelerated blink, delays are in milliseconds |
| 50 | * should be chosen. The call can adjust the timings if it can't | 51 | * and if both are zero then a sensible default should be chosen. |
| 51 | * match the values specified exactly. */ | 52 | * The call should adjust the timings in that case and if it can't |
| 53 | * match the values specified exactly. | ||
| 54 | * Deactivate blinking again when the brightness is set to a fixed | ||
| 55 | * value via the brightness_set() callback. | ||
| 56 | */ | ||
| 52 | int (*blink_set)(struct led_classdev *led_cdev, | 57 | int (*blink_set)(struct led_classdev *led_cdev, |
| 53 | unsigned long *delay_on, | 58 | unsigned long *delay_on, |
| 54 | unsigned long *delay_off); | 59 | unsigned long *delay_off); |
| @@ -57,6 +62,10 @@ struct led_classdev { | |||
| 57 | struct list_head node; /* LED Device list */ | 62 | struct list_head node; /* LED Device list */ |
| 58 | const char *default_trigger; /* Trigger to use */ | 63 | const char *default_trigger; /* Trigger to use */ |
| 59 | 64 | ||
| 65 | unsigned long blink_delay_on, blink_delay_off; | ||
| 66 | struct timer_list blink_timer; | ||
| 67 | int blink_brightness; | ||
| 68 | |||
| 60 | #ifdef CONFIG_LEDS_TRIGGERS | 69 | #ifdef CONFIG_LEDS_TRIGGERS |
| 61 | /* Protects the trigger data below */ | 70 | /* Protects the trigger data below */ |
| 62 | struct rw_semaphore trigger_lock; | 71 | struct rw_semaphore trigger_lock; |
| @@ -73,6 +82,36 @@ extern void led_classdev_unregister(struct led_classdev *led_cdev); | |||
| 73 | extern void led_classdev_suspend(struct led_classdev *led_cdev); | 82 | extern void led_classdev_suspend(struct led_classdev *led_cdev); |
| 74 | extern void led_classdev_resume(struct led_classdev *led_cdev); | 83 | extern void led_classdev_resume(struct led_classdev *led_cdev); |
| 75 | 84 | ||
| 85 | /** | ||
| 86 | * led_blink_set - set blinking with software fallback | ||
| 87 | * @led_cdev: the LED to start blinking | ||
| 88 | * @delay_on: the time it should be on (in ms) | ||
| 89 | * @delay_off: the time it should ble off (in ms) | ||
| 90 | * | ||
| 91 | * This function makes the LED blink, attempting to use the | ||
| 92 | * hardware acceleration if possible, but falling back to | ||
| 93 | * software blinking if there is no hardware blinking or if | ||
| 94 | * the LED refuses the passed values. | ||
| 95 | * | ||
| 96 | * Note that if software blinking is active, simply calling | ||
| 97 | * led_cdev->brightness_set() will not stop the blinking, | ||
| 98 | * use led_classdev_brightness_set() instead. | ||
| 99 | */ | ||
| 100 | extern void led_blink_set(struct led_classdev *led_cdev, | ||
| 101 | unsigned long *delay_on, | ||
| 102 | unsigned long *delay_off); | ||
| 103 | /** | ||
| 104 | * led_brightness_set - set LED brightness | ||
| 105 | * @led_cdev: the LED to set | ||
| 106 | * @brightness: the brightness to set it to | ||
| 107 | * | ||
| 108 | * Set an LED's brightness, and, if necessary, cancel the | ||
| 109 | * software blink timer that implements blinking when the | ||
| 110 | * hardware doesn't. | ||
| 111 | */ | ||
| 112 | extern void led_brightness_set(struct led_classdev *led_cdev, | ||
| 113 | enum led_brightness brightness); | ||
| 114 | |||
| 76 | /* | 115 | /* |
| 77 | * LED Triggers | 116 | * LED Triggers |
| 78 | */ | 117 | */ |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 15b77b8dc7e1..d947b1231662 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -986,7 +986,7 @@ extern void ata_host_init(struct ata_host *, struct device *, | |||
| 986 | unsigned long, struct ata_port_operations *); | 986 | unsigned long, struct ata_port_operations *); |
| 987 | extern int ata_scsi_detect(struct scsi_host_template *sht); | 987 | extern int ata_scsi_detect(struct scsi_host_template *sht); |
| 988 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 988 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
| 989 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 989 | extern int ata_scsi_queuecmd(struct Scsi_Host *h, struct scsi_cmnd *cmd); |
| 990 | extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev, | 990 | extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev, |
| 991 | int cmd, void __user *arg); | 991 | int cmd, void __user *arg); |
| 992 | extern void ata_sas_port_destroy(struct ata_port *); | 992 | extern void ata_sas_port_destroy(struct ata_port *); |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index a34dea46b629..2dee05e5119a 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
| @@ -43,6 +43,7 @@ struct nlm_host { | |||
| 43 | struct sockaddr_storage h_addr; /* peer address */ | 43 | struct sockaddr_storage h_addr; /* peer address */ |
| 44 | size_t h_addrlen; | 44 | size_t h_addrlen; |
| 45 | struct sockaddr_storage h_srcaddr; /* our address (optional) */ | 45 | struct sockaddr_storage h_srcaddr; /* our address (optional) */ |
| 46 | size_t h_srcaddrlen; | ||
| 46 | struct rpc_clnt *h_rpcclnt; /* RPC client to talk to peer */ | 47 | struct rpc_clnt *h_rpcclnt; /* RPC client to talk to peer */ |
| 47 | char *h_name; /* remote hostname */ | 48 | char *h_name; /* remote hostname */ |
| 48 | u32 h_version; /* interface version */ | 49 | u32 h_version; /* interface version */ |
diff --git a/include/linux/marvell_phy.h b/include/linux/marvell_phy.h index 1ff81b51b656..dd3c34ebca9a 100644 --- a/include/linux/marvell_phy.h +++ b/include/linux/marvell_phy.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #define MARVELL_PHY_ID_88E1118 0x01410e10 | 11 | #define MARVELL_PHY_ID_88E1118 0x01410e10 |
| 12 | #define MARVELL_PHY_ID_88E1121R 0x01410cb0 | 12 | #define MARVELL_PHY_ID_88E1121R 0x01410cb0 |
| 13 | #define MARVELL_PHY_ID_88E1145 0x01410cd0 | 13 | #define MARVELL_PHY_ID_88E1145 0x01410cd0 |
| 14 | #define MARVELL_PHY_ID_88E1149R 0x01410e50 | ||
| 14 | #define MARVELL_PHY_ID_88E1240 0x01410e30 | 15 | #define MARVELL_PHY_ID_88E1240 0x01410e30 |
| 15 | #define MARVELL_PHY_ID_88E1318S 0x01410e90 | 16 | #define MARVELL_PHY_ID_88E1318S 0x01410e90 |
| 16 | 17 | ||
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 4307231bd22f..31c237a00c48 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
| @@ -161,6 +161,9 @@ extern void register_page_bootmem_info_node(struct pglist_data *pgdat); | |||
| 161 | extern void put_page_bootmem(struct page *page); | 161 | extern void put_page_bootmem(struct page *page); |
| 162 | #endif | 162 | #endif |
| 163 | 163 | ||
| 164 | void lock_memory_hotplug(void); | ||
| 165 | void unlock_memory_hotplug(void); | ||
| 166 | |||
| 164 | #else /* ! CONFIG_MEMORY_HOTPLUG */ | 167 | #else /* ! CONFIG_MEMORY_HOTPLUG */ |
| 165 | /* | 168 | /* |
| 166 | * Stub functions for when hotplug is off | 169 | * Stub functions for when hotplug is off |
| @@ -192,6 +195,9 @@ static inline void register_page_bootmem_info_node(struct pglist_data *pgdat) | |||
| 192 | { | 195 | { |
| 193 | } | 196 | } |
| 194 | 197 | ||
| 198 | static inline void lock_memory_hotplug(void) {} | ||
| 199 | static inline void unlock_memory_hotplug(void) {} | ||
| 200 | |||
| 195 | #endif /* ! CONFIG_MEMORY_HOTPLUG */ | 201 | #endif /* ! CONFIG_MEMORY_HOTPLUG */ |
| 196 | 202 | ||
| 197 | #ifdef CONFIG_MEMORY_HOTREMOVE | 203 | #ifdef CONFIG_MEMORY_HOTREMOVE |
diff --git a/include/linux/mfd/wm8350/audio.h b/include/linux/mfd/wm8350/audio.h index a95141eafce3..bd581c6fa085 100644 --- a/include/linux/mfd/wm8350/audio.h +++ b/include/linux/mfd/wm8350/audio.h | |||
| @@ -522,9 +522,6 @@ | |||
| 522 | #define WM8350_MCLK_SEL_PLL_32K 3 | 522 | #define WM8350_MCLK_SEL_PLL_32K 3 |
| 523 | #define WM8350_MCLK_SEL_MCLK 5 | 523 | #define WM8350_MCLK_SEL_MCLK 5 |
| 524 | 524 | ||
| 525 | #define WM8350_MCLK_DIR_OUT 0 | ||
| 526 | #define WM8350_MCLK_DIR_IN 1 | ||
| 527 | |||
| 528 | /* clock divider id's */ | 525 | /* clock divider id's */ |
| 529 | #define WM8350_ADC_CLKDIV 0 | 526 | #define WM8350_ADC_CLKDIV 0 |
| 530 | #define WM8350_DAC_CLKDIV 1 | 527 | #define WM8350_DAC_CLKDIV 1 |
diff --git a/include/linux/mfd/wm8994/pdata.h b/include/linux/mfd/wm8994/pdata.h index 5c51f367c061..add8a1b8bcf0 100644 --- a/include/linux/mfd/wm8994/pdata.h +++ b/include/linux/mfd/wm8994/pdata.h | |||
| @@ -29,7 +29,7 @@ struct wm8994_ldo_pdata { | |||
| 29 | #define WM8994_CONFIGURE_GPIO 0x8000 | 29 | #define WM8994_CONFIGURE_GPIO 0x8000 |
| 30 | 30 | ||
| 31 | #define WM8994_DRC_REGS 5 | 31 | #define WM8994_DRC_REGS 5 |
| 32 | #define WM8994_EQ_REGS 19 | 32 | #define WM8994_EQ_REGS 20 |
| 33 | 33 | ||
| 34 | /** | 34 | /** |
| 35 | * DRC configurations are specified with a label and a set of register | 35 | * DRC configurations are specified with a label and a set of register |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 6d87f68ce4b6..30f6fad99a58 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
| @@ -168,6 +168,7 @@ struct mmc_host { | |||
| 168 | /* DDR mode at 1.8V */ | 168 | /* DDR mode at 1.8V */ |
| 169 | #define MMC_CAP_1_2V_DDR (1 << 12) /* can support */ | 169 | #define MMC_CAP_1_2V_DDR (1 << 12) /* can support */ |
| 170 | /* DDR mode at 1.2V */ | 170 | /* DDR mode at 1.2V */ |
| 171 | #define MMC_CAP_POWER_OFF_CARD (1 << 13) /* Can power off after boot */ | ||
| 171 | 172 | ||
| 172 | mmc_pm_flag_t pm_caps; /* supported pm features */ | 173 | mmc_pm_flag_t pm_caps; /* supported pm features */ |
| 173 | 174 | ||
diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h index d19e2114fd86..5c99da1078aa 100644 --- a/include/linux/mmc/sh_mmcif.h +++ b/include/linux/mmc/sh_mmcif.h | |||
| @@ -59,19 +59,19 @@ struct sh_mmcif_plat_data { | |||
| 59 | #define MMCIF_CE_HOST_STS2 0x0000004C | 59 | #define MMCIF_CE_HOST_STS2 0x0000004C |
| 60 | #define MMCIF_CE_VERSION 0x0000007C | 60 | #define MMCIF_CE_VERSION 0x0000007C |
| 61 | 61 | ||
| 62 | extern inline u32 sh_mmcif_readl(void __iomem *addr, int reg) | 62 | static inline u32 sh_mmcif_readl(void __iomem *addr, int reg) |
| 63 | { | 63 | { |
| 64 | return readl(addr + reg); | 64 | return readl(addr + reg); |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | extern inline void sh_mmcif_writel(void __iomem *addr, int reg, u32 val) | 67 | static inline void sh_mmcif_writel(void __iomem *addr, int reg, u32 val) |
| 68 | { | 68 | { |
| 69 | writel(val, addr + reg); | 69 | writel(val, addr + reg); |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | #define SH_MMCIF_BBS 512 /* boot block size */ | 72 | #define SH_MMCIF_BBS 512 /* boot block size */ |
| 73 | 73 | ||
| 74 | extern inline void sh_mmcif_boot_cmd_send(void __iomem *base, | 74 | static inline void sh_mmcif_boot_cmd_send(void __iomem *base, |
| 75 | unsigned long cmd, unsigned long arg) | 75 | unsigned long cmd, unsigned long arg) |
| 76 | { | 76 | { |
| 77 | sh_mmcif_writel(base, MMCIF_CE_INT, 0); | 77 | sh_mmcif_writel(base, MMCIF_CE_INT, 0); |
| @@ -79,7 +79,7 @@ extern inline void sh_mmcif_boot_cmd_send(void __iomem *base, | |||
| 79 | sh_mmcif_writel(base, MMCIF_CE_CMD_SET, cmd); | 79 | sh_mmcif_writel(base, MMCIF_CE_CMD_SET, cmd); |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | extern inline int sh_mmcif_boot_cmd_poll(void __iomem *base, unsigned long mask) | 82 | static inline int sh_mmcif_boot_cmd_poll(void __iomem *base, unsigned long mask) |
| 83 | { | 83 | { |
| 84 | unsigned long tmp; | 84 | unsigned long tmp; |
| 85 | int cnt; | 85 | int cnt; |
| @@ -95,14 +95,14 @@ extern inline int sh_mmcif_boot_cmd_poll(void __iomem *base, unsigned long mask) | |||
| 95 | return -1; | 95 | return -1; |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | extern inline int sh_mmcif_boot_cmd(void __iomem *base, | 98 | static inline int sh_mmcif_boot_cmd(void __iomem *base, |
| 99 | unsigned long cmd, unsigned long arg) | 99 | unsigned long cmd, unsigned long arg) |
| 100 | { | 100 | { |
| 101 | sh_mmcif_boot_cmd_send(base, cmd, arg); | 101 | sh_mmcif_boot_cmd_send(base, cmd, arg); |
| 102 | return sh_mmcif_boot_cmd_poll(base, 0x00010000); | 102 | return sh_mmcif_boot_cmd_poll(base, 0x00010000); |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | extern inline int sh_mmcif_boot_do_read_single(void __iomem *base, | 105 | static inline int sh_mmcif_boot_do_read_single(void __iomem *base, |
| 106 | unsigned int block_nr, | 106 | unsigned int block_nr, |
| 107 | unsigned long *buf) | 107 | unsigned long *buf) |
| 108 | { | 108 | { |
| @@ -125,7 +125,7 @@ extern inline int sh_mmcif_boot_do_read_single(void __iomem *base, | |||
| 125 | return 0; | 125 | return 0; |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | extern inline int sh_mmcif_boot_do_read(void __iomem *base, | 128 | static inline int sh_mmcif_boot_do_read(void __iomem *base, |
| 129 | unsigned long first_block, | 129 | unsigned long first_block, |
| 130 | unsigned long nr_blocks, | 130 | unsigned long nr_blocks, |
| 131 | void *buf) | 131 | void *buf) |
| @@ -143,7 +143,7 @@ extern inline int sh_mmcif_boot_do_read(void __iomem *base, | |||
| 143 | return ret; | 143 | return ret; |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | extern inline void sh_mmcif_boot_init(void __iomem *base) | 146 | static inline void sh_mmcif_boot_init(void __iomem *base) |
| 147 | { | 147 | { |
| 148 | unsigned long tmp; | 148 | unsigned long tmp; |
| 149 | 149 | ||
| @@ -177,7 +177,7 @@ extern inline void sh_mmcif_boot_init(void __iomem *base) | |||
| 177 | sh_mmcif_boot_cmd(base, 0x03400040, 0x00010000); | 177 | sh_mmcif_boot_cmd(base, 0x03400040, 0x00010000); |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | extern inline void sh_mmcif_boot_slurp(void __iomem *base, | 180 | static inline void sh_mmcif_boot_slurp(void __iomem *base, |
| 181 | unsigned char *buf, | 181 | unsigned char *buf, |
| 182 | unsigned long no_bytes) | 182 | unsigned long no_bytes) |
| 183 | { | 183 | { |
diff --git a/include/linux/module.h b/include/linux/module.h index b29e7458b966..7575bbbdf2a2 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -517,7 +517,7 @@ static inline void __module_get(struct module *module) | |||
| 517 | #define symbol_put_addr(p) do { } while(0) | 517 | #define symbol_put_addr(p) do { } while(0) |
| 518 | 518 | ||
| 519 | #endif /* CONFIG_MODULE_UNLOAD */ | 519 | #endif /* CONFIG_MODULE_UNLOAD */ |
| 520 | int use_module(struct module *a, struct module *b); | 520 | int ref_module(struct module *a, struct module *b); |
| 521 | 521 | ||
| 522 | /* This is a #define so the string doesn't get put in every .o file */ | 522 | /* This is a #define so the string doesn't get put in every .o file */ |
| 523 | #define module_name(mod) \ | 523 | #define module_name(mod) \ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 072652d94d9f..d8fd2c23a1b9 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -1554,6 +1554,11 @@ static inline void netif_tx_wake_all_queues(struct net_device *dev) | |||
| 1554 | 1554 | ||
| 1555 | static inline void netif_tx_stop_queue(struct netdev_queue *dev_queue) | 1555 | static inline void netif_tx_stop_queue(struct netdev_queue *dev_queue) |
| 1556 | { | 1556 | { |
| 1557 | if (WARN_ON(!dev_queue)) { | ||
| 1558 | printk(KERN_INFO "netif_stop_queue() cannot be called before " | ||
| 1559 | "register_netdev()"); | ||
| 1560 | return; | ||
| 1561 | } | ||
| 1557 | set_bit(__QUEUE_STATE_XOFF, &dev_queue->state); | 1562 | set_bit(__QUEUE_STATE_XOFF, &dev_queue->state); |
| 1558 | } | 1563 | } |
| 1559 | 1564 | ||
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 89341c32631a..03317c8d4077 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
| @@ -215,7 +215,7 @@ NF_HOOK_COND(uint8_t pf, unsigned int hook, struct sk_buff *skb, | |||
| 215 | int ret; | 215 | int ret; |
| 216 | 216 | ||
| 217 | if (!cond || | 217 | if (!cond || |
| 218 | (ret = nf_hook_thresh(pf, hook, skb, in, out, okfn, INT_MIN) == 1)) | 218 | ((ret = nf_hook_thresh(pf, hook, skb, in, out, okfn, INT_MIN)) == 1)) |
| 219 | ret = okfn(skb); | 219 | ret = okfn(skb); |
| 220 | return ret; | 220 | return ret; |
| 221 | } | 221 | } |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index bba26684acdc..29d504d5d1c3 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -401,6 +401,7 @@ extern const struct inode_operations nfs3_file_inode_operations; | |||
| 401 | #endif /* CONFIG_NFS_V3 */ | 401 | #endif /* CONFIG_NFS_V3 */ |
| 402 | extern const struct file_operations nfs_file_operations; | 402 | extern const struct file_operations nfs_file_operations; |
| 403 | extern const struct address_space_operations nfs_file_aops; | 403 | extern const struct address_space_operations nfs_file_aops; |
| 404 | extern const struct address_space_operations nfs_dir_aops; | ||
| 404 | 405 | ||
| 405 | static inline struct nfs_open_context *nfs_file_open_context(struct file *filp) | 406 | static inline struct nfs_open_context *nfs_file_open_context(struct file *filp) |
| 406 | { | 407 | { |
| @@ -593,12 +594,6 @@ nfs_fileid_to_ino_t(u64 fileid) | |||
| 593 | return ino; | 594 | return ino; |
| 594 | } | 595 | } |
| 595 | 596 | ||
| 596 | #define nfs_wait_event(clnt, wq, condition) \ | ||
| 597 | ({ \ | ||
| 598 | int __retval = wait_event_killable(wq, condition); \ | ||
| 599 | __retval; \ | ||
| 600 | }) | ||
| 601 | |||
| 602 | #define NFS_JUKEBOX_RETRY_TIME (5 * HZ) | 597 | #define NFS_JUKEBOX_RETRY_TIME (5 * HZ) |
| 603 | 598 | ||
| 604 | #endif /* __KERNEL__ */ | 599 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index f8b60e7f4c44..d55cee73f634 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | */ | 29 | */ |
| 30 | enum { | 30 | enum { |
| 31 | PG_BUSY = 0, | 31 | PG_BUSY = 0, |
| 32 | PG_MAPPED, | ||
| 32 | PG_CLEAN, | 33 | PG_CLEAN, |
| 33 | PG_NEED_COMMIT, | 34 | PG_NEED_COMMIT, |
| 34 | PG_NEED_RESCHED, | 35 | PG_NEED_RESCHED, |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index ba6cc8f223c9..80f07198a31a 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -483,6 +483,7 @@ struct nfs_entry { | |||
| 483 | int eof; | 483 | int eof; |
| 484 | struct nfs_fh * fh; | 484 | struct nfs_fh * fh; |
| 485 | struct nfs_fattr * fattr; | 485 | struct nfs_fattr * fattr; |
| 486 | unsigned char d_type; | ||
| 486 | }; | 487 | }; |
| 487 | 488 | ||
| 488 | /* | 489 | /* |
diff --git a/include/linux/node.h b/include/linux/node.h index 06292dac3eab..1466945cc9ef 100644 --- a/include/linux/node.h +++ b/include/linux/node.h | |||
| @@ -10,11 +10,6 @@ | |||
| 10 | * | 10 | * |
| 11 | * Nodes are exported via driverfs in the class/node/devices/ | 11 | * Nodes are exported via driverfs in the class/node/devices/ |
| 12 | * directory. | 12 | * directory. |
| 13 | * | ||
| 14 | * Per-node interfaces can be implemented using a struct device_interface. | ||
| 15 | * See the following for how to do this: | ||
| 16 | * - drivers/base/intf.c | ||
| 17 | * - Documentation/driver-model/interface.txt | ||
| 18 | */ | 13 | */ |
| 19 | #ifndef _LINUX_NODE_H_ | 14 | #ifndef _LINUX_NODE_H_ |
| 20 | #define _LINUX_NODE_H_ | 15 | #define _LINUX_NODE_H_ |
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index 5bb13b3db84d..b02195dfc1b0 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h | |||
| @@ -59,8 +59,6 @@ static inline void ClearPageCgroup##uname(struct page_cgroup *pc) \ | |||
| 59 | static inline int TestClearPageCgroup##uname(struct page_cgroup *pc) \ | 59 | static inline int TestClearPageCgroup##uname(struct page_cgroup *pc) \ |
| 60 | { return test_and_clear_bit(PCG_##lname, &pc->flags); } | 60 | { return test_and_clear_bit(PCG_##lname, &pc->flags); } |
| 61 | 61 | ||
| 62 | TESTPCGFLAG(Locked, LOCK) | ||
| 63 | |||
| 64 | /* Cache flag is set only once (at allocation) */ | 62 | /* Cache flag is set only once (at allocation) */ |
| 65 | TESTPCGFLAG(Cache, CACHE) | 63 | TESTPCGFLAG(Cache, CACHE) |
| 66 | CLEARPCGFLAG(Cache, CACHE) | 64 | CLEARPCGFLAG(Cache, CACHE) |
| @@ -104,6 +102,11 @@ static inline void unlock_page_cgroup(struct page_cgroup *pc) | |||
| 104 | bit_spin_unlock(PCG_LOCK, &pc->flags); | 102 | bit_spin_unlock(PCG_LOCK, &pc->flags); |
| 105 | } | 103 | } |
| 106 | 104 | ||
| 105 | static inline int page_is_cgroup_locked(struct page_cgroup *pc) | ||
| 106 | { | ||
| 107 | return bit_spin_is_locked(PCG_LOCK, &pc->flags); | ||
| 108 | } | ||
| 109 | |||
| 107 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ | 110 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ |
| 108 | struct page_cgroup; | 111 | struct page_cgroup; |
| 109 | 112 | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 87e2c2e7aed3..cb845c16ad7d 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -2047,6 +2047,7 @@ | |||
| 2047 | #define PCI_DEVICE_ID_AFAVLAB_P030 0x2182 | 2047 | #define PCI_DEVICE_ID_AFAVLAB_P030 0x2182 |
| 2048 | #define PCI_SUBDEVICE_ID_AFAVLAB_P061 0x2150 | 2048 | #define PCI_SUBDEVICE_ID_AFAVLAB_P061 0x2150 |
| 2049 | 2049 | ||
| 2050 | #define PCI_VENDOR_ID_BCM_GVC 0x14a4 | ||
| 2050 | #define PCI_VENDOR_ID_BROADCOM 0x14e4 | 2051 | #define PCI_VENDOR_ID_BROADCOM 0x14e4 |
| 2051 | #define PCI_DEVICE_ID_TIGON3_5752 0x1600 | 2052 | #define PCI_DEVICE_ID_TIGON3_5752 0x1600 |
| 2052 | #define PCI_DEVICE_ID_TIGON3_5752M 0x1601 | 2053 | #define PCI_DEVICE_ID_TIGON3_5752M 0x1601 |
| @@ -2441,6 +2442,7 @@ | |||
| 2441 | #define PCI_DEVICE_ID_INTEL_MFD_SDIO2 0x0822 | 2442 | #define PCI_DEVICE_ID_INTEL_MFD_SDIO2 0x0822 |
| 2442 | #define PCI_DEVICE_ID_INTEL_MFD_EMMC0 0x0823 | 2443 | #define PCI_DEVICE_ID_INTEL_MFD_EMMC0 0x0823 |
| 2443 | #define PCI_DEVICE_ID_INTEL_MFD_EMMC1 0x0824 | 2444 | #define PCI_DEVICE_ID_INTEL_MFD_EMMC1 0x0824 |
| 2445 | #define PCI_DEVICE_ID_INTEL_MRST_SD2 0x084F | ||
| 2444 | #define PCI_DEVICE_ID_INTEL_I960 0x0960 | 2446 | #define PCI_DEVICE_ID_INTEL_I960 0x0960 |
| 2445 | #define PCI_DEVICE_ID_INTEL_I960RM 0x0962 | 2447 | #define PCI_DEVICE_ID_INTEL_I960RM 0x0962 |
| 2446 | #define PCI_DEVICE_ID_INTEL_8257X_SOL 0x1062 | 2448 | #define PCI_DEVICE_ID_INTEL_8257X_SOL 0x1062 |
| @@ -2465,6 +2467,7 @@ | |||
| 2465 | #define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS 0x1c22 | 2467 | #define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS 0x1c22 |
| 2466 | #define PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MIN 0x1c41 | 2468 | #define PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MIN 0x1c41 |
| 2467 | #define PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MAX 0x1c5f | 2469 | #define PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MAX 0x1c5f |
| 2470 | #define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS 0x1d22 | ||
| 2468 | #define PCI_DEVICE_ID_INTEL_PATSBURG_LPC 0x1d40 | 2471 | #define PCI_DEVICE_ID_INTEL_PATSBURG_LPC 0x1d40 |
| 2469 | #define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410 | 2472 | #define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410 |
| 2470 | #define PCI_DEVICE_ID_INTEL_82801AA_1 0x2411 | 2473 | #define PCI_DEVICE_ID_INTEL_82801AA_1 0x2411 |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 057bf22a8323..4f1279e105ee 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -747,6 +747,16 @@ struct perf_event { | |||
| 747 | u64 tstamp_running; | 747 | u64 tstamp_running; |
| 748 | u64 tstamp_stopped; | 748 | u64 tstamp_stopped; |
| 749 | 749 | ||
| 750 | /* | ||
| 751 | * timestamp shadows the actual context timing but it can | ||
| 752 | * be safely used in NMI interrupt context. It reflects the | ||
| 753 | * context time as it was when the event was last scheduled in. | ||
| 754 | * | ||
| 755 | * ctx_time already accounts for ctx->timestamp. Therefore to | ||
| 756 | * compute ctx_time for a sample, simply add perf_clock(). | ||
| 757 | */ | ||
| 758 | u64 shadow_ctx_time; | ||
| 759 | |||
| 750 | struct perf_event_attr attr; | 760 | struct perf_event_attr attr; |
| 751 | struct hw_perf_event hw; | 761 | struct hw_perf_event hw; |
| 752 | 762 | ||
| @@ -840,6 +850,7 @@ struct perf_event_context { | |||
| 840 | int nr_active; | 850 | int nr_active; |
| 841 | int is_active; | 851 | int is_active; |
| 842 | int nr_stat; | 852 | int nr_stat; |
| 853 | int rotate_disable; | ||
| 843 | atomic_t refcount; | 854 | atomic_t refcount; |
| 844 | struct task_struct *task; | 855 | struct task_struct *task; |
| 845 | 856 | ||
| @@ -876,6 +887,7 @@ struct perf_cpu_context { | |||
| 876 | int exclusive; | 887 | int exclusive; |
| 877 | struct list_head rotation_list; | 888 | struct list_head rotation_list; |
| 878 | int jiffies_interval; | 889 | int jiffies_interval; |
| 890 | struct pmu *active_pmu; | ||
| 879 | }; | 891 | }; |
| 880 | 892 | ||
| 881 | struct perf_output_handle { | 893 | struct perf_output_handle { |
| @@ -898,20 +910,6 @@ extern int perf_num_counters(void); | |||
| 898 | extern const char *perf_pmu_name(void); | 910 | extern const char *perf_pmu_name(void); |
| 899 | extern void __perf_event_task_sched_in(struct task_struct *task); | 911 | extern void __perf_event_task_sched_in(struct task_struct *task); |
| 900 | extern void __perf_event_task_sched_out(struct task_struct *task, struct task_struct *next); | 912 | extern void __perf_event_task_sched_out(struct task_struct *task, struct task_struct *next); |
| 901 | |||
| 902 | extern atomic_t perf_task_events; | ||
| 903 | |||
| 904 | static inline void perf_event_task_sched_in(struct task_struct *task) | ||
| 905 | { | ||
| 906 | COND_STMT(&perf_task_events, __perf_event_task_sched_in(task)); | ||
| 907 | } | ||
| 908 | |||
| 909 | static inline | ||
| 910 | void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next) | ||
| 911 | { | ||
| 912 | COND_STMT(&perf_task_events, __perf_event_task_sched_out(task, next)); | ||
| 913 | } | ||
| 914 | |||
| 915 | extern int perf_event_init_task(struct task_struct *child); | 913 | extern int perf_event_init_task(struct task_struct *child); |
| 916 | extern void perf_event_exit_task(struct task_struct *child); | 914 | extern void perf_event_exit_task(struct task_struct *child); |
| 917 | extern void perf_event_free_task(struct task_struct *task); | 915 | extern void perf_event_free_task(struct task_struct *task); |
| @@ -1020,6 +1018,21 @@ have_event: | |||
| 1020 | __perf_sw_event(event_id, nr, nmi, regs, addr); | 1018 | __perf_sw_event(event_id, nr, nmi, regs, addr); |
| 1021 | } | 1019 | } |
| 1022 | 1020 | ||
| 1021 | extern atomic_t perf_task_events; | ||
| 1022 | |||
| 1023 | static inline void perf_event_task_sched_in(struct task_struct *task) | ||
| 1024 | { | ||
| 1025 | COND_STMT(&perf_task_events, __perf_event_task_sched_in(task)); | ||
| 1026 | } | ||
| 1027 | |||
| 1028 | static inline | ||
| 1029 | void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next) | ||
| 1030 | { | ||
| 1031 | perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 1, NULL, 0); | ||
| 1032 | |||
| 1033 | COND_STMT(&perf_task_events, __perf_event_task_sched_out(task, next)); | ||
| 1034 | } | ||
| 1035 | |||
| 1023 | extern void perf_event_mmap(struct vm_area_struct *vma); | 1036 | extern void perf_event_mmap(struct vm_area_struct *vma); |
| 1024 | extern struct perf_guest_info_callbacks *perf_guest_cbs; | 1037 | extern struct perf_guest_info_callbacks *perf_guest_cbs; |
| 1025 | extern int perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks); | 1038 | extern int perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks); |
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index 445796945ac9..bb27d7ec2fb9 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
| @@ -160,5 +160,6 @@ void generic_pipe_buf_release(struct pipe_inode_info *, struct pipe_buffer *); | |||
| 160 | 160 | ||
| 161 | /* for F_SETPIPE_SZ and F_GETPIPE_SZ */ | 161 | /* for F_SETPIPE_SZ and F_GETPIPE_SZ */ |
| 162 | long pipe_fcntl(struct file *, unsigned int, unsigned long arg); | 162 | long pipe_fcntl(struct file *, unsigned int, unsigned long arg); |
| 163 | struct pipe_inode_info *get_pipe_info(struct file *file); | ||
| 163 | 164 | ||
| 164 | #endif | 165 | #endif |
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 3ec2358f8692..d19f1cca7f74 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
| @@ -77,7 +77,8 @@ static inline void device_set_run_wake(struct device *dev, bool enable) | |||
| 77 | 77 | ||
| 78 | static inline bool pm_runtime_suspended(struct device *dev) | 78 | static inline bool pm_runtime_suspended(struct device *dev) |
| 79 | { | 79 | { |
| 80 | return dev->power.runtime_status == RPM_SUSPENDED; | 80 | return dev->power.runtime_status == RPM_SUSPENDED |
| 81 | && !dev->power.disable_depth; | ||
| 81 | } | 82 | } |
| 82 | 83 | ||
| 83 | static inline void pm_runtime_mark_last_busy(struct device *dev) | 84 | static inline void pm_runtime_mark_last_busy(struct device *dev) |
diff --git a/include/linux/printk.h b/include/linux/printk.h new file mode 100644 index 000000000000..b772ca5fbdf0 --- /dev/null +++ b/include/linux/printk.h | |||
| @@ -0,0 +1,248 @@ | |||
| 1 | #ifndef __KERNEL_PRINTK__ | ||
| 2 | #define __KERNEL_PRINTK__ | ||
| 3 | |||
| 4 | extern const char linux_banner[]; | ||
| 5 | extern const char linux_proc_banner[]; | ||
| 6 | |||
| 7 | #define KERN_EMERG "<0>" /* system is unusable */ | ||
| 8 | #define KERN_ALERT "<1>" /* action must be taken immediately */ | ||
| 9 | #define KERN_CRIT "<2>" /* critical conditions */ | ||
| 10 | #define KERN_ERR "<3>" /* error conditions */ | ||
| 11 | #define KERN_WARNING "<4>" /* warning conditions */ | ||
| 12 | #define KERN_NOTICE "<5>" /* normal but significant condition */ | ||
| 13 | #define KERN_INFO "<6>" /* informational */ | ||
| 14 | #define KERN_DEBUG "<7>" /* debug-level messages */ | ||
| 15 | |||
| 16 | /* Use the default kernel loglevel */ | ||
| 17 | #define KERN_DEFAULT "<d>" | ||
| 18 | /* | ||
| 19 | * Annotation for a "continued" line of log printout (only done after a | ||
| 20 | * line that had no enclosing \n). Only to be used by core/arch code | ||
| 21 | * during early bootup (a continued line is not SMP-safe otherwise). | ||
| 22 | */ | ||
| 23 | #define KERN_CONT "<c>" | ||
| 24 | |||
| 25 | extern int console_printk[]; | ||
| 26 | |||
| 27 | #define console_loglevel (console_printk[0]) | ||
| 28 | #define default_message_loglevel (console_printk[1]) | ||
| 29 | #define minimum_console_loglevel (console_printk[2]) | ||
| 30 | #define default_console_loglevel (console_printk[3]) | ||
| 31 | |||
| 32 | struct va_format { | ||
| 33 | const char *fmt; | ||
| 34 | va_list *va; | ||
| 35 | }; | ||
| 36 | |||
| 37 | /* | ||
| 38 | * FW_BUG | ||
| 39 | * Add this to a message where you are sure the firmware is buggy or behaves | ||
| 40 | * really stupid or out of spec. Be aware that the responsible BIOS developer | ||
| 41 | * should be able to fix this issue or at least get a concrete idea of the | ||
| 42 | * problem by reading your message without the need of looking at the kernel | ||
| 43 | * code. | ||
| 44 | * | ||
| 45 | * Use it for definite and high priority BIOS bugs. | ||
| 46 | * | ||
| 47 | * FW_WARN | ||
| 48 | * Use it for not that clear (e.g. could the kernel messed up things already?) | ||
| 49 | * and medium priority BIOS bugs. | ||
| 50 | * | ||
| 51 | * FW_INFO | ||
| 52 | * Use this one if you want to tell the user or vendor about something | ||
| 53 | * suspicious, but generally harmless related to the firmware. | ||
| 54 | * | ||
| 55 | * Use it for information or very low priority BIOS bugs. | ||
| 56 | */ | ||
| 57 | #define FW_BUG "[Firmware Bug]: " | ||
| 58 | #define FW_WARN "[Firmware Warn]: " | ||
| 59 | #define FW_INFO "[Firmware Info]: " | ||
| 60 | |||
| 61 | /* | ||
| 62 | * HW_ERR | ||
| 63 | * Add this to a message for hardware errors, so that user can report | ||
| 64 | * it to hardware vendor instead of LKML or software vendor. | ||
| 65 | */ | ||
| 66 | #define HW_ERR "[Hardware Error]: " | ||
| 67 | |||
| 68 | #ifdef CONFIG_PRINTK | ||
| 69 | asmlinkage int vprintk(const char *fmt, va_list args) | ||
| 70 | __attribute__ ((format (printf, 1, 0))); | ||
| 71 | asmlinkage int printk(const char * fmt, ...) | ||
| 72 | __attribute__ ((format (printf, 1, 2))) __cold; | ||
| 73 | |||
| 74 | /* | ||
| 75 | * Please don't use printk_ratelimit(), because it shares ratelimiting state | ||
| 76 | * with all other unrelated printk_ratelimit() callsites. Instead use | ||
| 77 | * printk_ratelimited() or plain old __ratelimit(). | ||
| 78 | */ | ||
| 79 | extern int __printk_ratelimit(const char *func); | ||
| 80 | #define printk_ratelimit() __printk_ratelimit(__func__) | ||
| 81 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, | ||
| 82 | unsigned int interval_msec); | ||
| 83 | |||
| 84 | extern int printk_delay_msec; | ||
| 85 | extern int dmesg_restrict; | ||
| 86 | |||
| 87 | /* | ||
| 88 | * Print a one-time message (analogous to WARN_ONCE() et al): | ||
| 89 | */ | ||
| 90 | #define printk_once(x...) ({ \ | ||
| 91 | static bool __print_once; \ | ||
| 92 | \ | ||
| 93 | if (!__print_once) { \ | ||
| 94 | __print_once = true; \ | ||
| 95 | printk(x); \ | ||
| 96 | } \ | ||
| 97 | }) | ||
| 98 | |||
| 99 | void log_buf_kexec_setup(void); | ||
| 100 | #else | ||
| 101 | static inline int vprintk(const char *s, va_list args) | ||
| 102 | __attribute__ ((format (printf, 1, 0))); | ||
| 103 | static inline int vprintk(const char *s, va_list args) { return 0; } | ||
| 104 | static inline int printk(const char *s, ...) | ||
| 105 | __attribute__ ((format (printf, 1, 2))); | ||
| 106 | static inline int __cold printk(const char *s, ...) { return 0; } | ||
| 107 | static inline int printk_ratelimit(void) { return 0; } | ||
| 108 | static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \ | ||
| 109 | unsigned int interval_msec) \ | ||
| 110 | { return false; } | ||
| 111 | |||
| 112 | /* No effect, but we still get type checking even in the !PRINTK case: */ | ||
| 113 | #define printk_once(x...) printk(x) | ||
| 114 | |||
| 115 | static inline void log_buf_kexec_setup(void) | ||
| 116 | { | ||
| 117 | } | ||
| 118 | #endif | ||
| 119 | |||
| 120 | /* | ||
| 121 | * Dummy printk for disabled debugging statements to use whilst maintaining | ||
| 122 | * gcc's format and side-effect checking. | ||
| 123 | */ | ||
| 124 | static inline __attribute__ ((format (printf, 1, 2))) | ||
| 125 | int no_printk(const char *s, ...) { return 0; } | ||
| 126 | |||
| 127 | extern int printk_needs_cpu(int cpu); | ||
| 128 | extern void printk_tick(void); | ||
| 129 | |||
| 130 | extern void asmlinkage __attribute__((format(printf, 1, 2))) | ||
| 131 | early_printk(const char *fmt, ...); | ||
| 132 | |||
| 133 | static inline void console_silent(void) | ||
| 134 | { | ||
| 135 | console_loglevel = 0; | ||
| 136 | } | ||
| 137 | |||
| 138 | static inline void console_verbose(void) | ||
| 139 | { | ||
| 140 | if (console_loglevel) | ||
| 141 | console_loglevel = 15; | ||
| 142 | } | ||
| 143 | |||
| 144 | extern void dump_stack(void) __cold; | ||
| 145 | |||
| 146 | enum { | ||
| 147 | DUMP_PREFIX_NONE, | ||
| 148 | DUMP_PREFIX_ADDRESS, | ||
| 149 | DUMP_PREFIX_OFFSET | ||
| 150 | }; | ||
| 151 | extern void hex_dump_to_buffer(const void *buf, size_t len, | ||
| 152 | int rowsize, int groupsize, | ||
| 153 | char *linebuf, size_t linebuflen, bool ascii); | ||
| 154 | extern void print_hex_dump(const char *level, const char *prefix_str, | ||
| 155 | int prefix_type, int rowsize, int groupsize, | ||
| 156 | const void *buf, size_t len, bool ascii); | ||
| 157 | extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type, | ||
| 158 | const void *buf, size_t len); | ||
| 159 | |||
| 160 | #ifndef pr_fmt | ||
| 161 | #define pr_fmt(fmt) fmt | ||
| 162 | #endif | ||
| 163 | |||
| 164 | #define pr_emerg(fmt, ...) \ | ||
| 165 | printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 166 | #define pr_alert(fmt, ...) \ | ||
| 167 | printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) | ||
| 168 | #define pr_crit(fmt, ...) \ | ||
| 169 | printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) | ||
| 170 | #define pr_err(fmt, ...) \ | ||
| 171 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) | ||
| 172 | #define pr_warning(fmt, ...) \ | ||
| 173 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ||
| 174 | #define pr_warn pr_warning | ||
| 175 | #define pr_notice(fmt, ...) \ | ||
| 176 | printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) | ||
| 177 | #define pr_info(fmt, ...) \ | ||
| 178 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | ||
| 179 | #define pr_cont(fmt, ...) \ | ||
| 180 | printk(KERN_CONT fmt, ##__VA_ARGS__) | ||
| 181 | |||
| 182 | /* pr_devel() should produce zero code unless DEBUG is defined */ | ||
| 183 | #ifdef DEBUG | ||
| 184 | #define pr_devel(fmt, ...) \ | ||
| 185 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 186 | #else | ||
| 187 | #define pr_devel(fmt, ...) \ | ||
| 188 | ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) | ||
| 189 | #endif | ||
| 190 | |||
| 191 | /* If you are writing a driver, please use dev_dbg instead */ | ||
| 192 | #if defined(DEBUG) | ||
| 193 | #define pr_debug(fmt, ...) \ | ||
| 194 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 195 | #elif defined(CONFIG_DYNAMIC_DEBUG) | ||
| 196 | /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */ | ||
| 197 | #define pr_debug(fmt, ...) \ | ||
| 198 | dynamic_pr_debug(fmt, ##__VA_ARGS__) | ||
| 199 | #else | ||
| 200 | #define pr_debug(fmt, ...) \ | ||
| 201 | ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) | ||
| 202 | #endif | ||
| 203 | |||
| 204 | /* | ||
| 205 | * ratelimited messages with local ratelimit_state, | ||
| 206 | * no local ratelimit_state used in the !PRINTK case | ||
| 207 | */ | ||
| 208 | #ifdef CONFIG_PRINTK | ||
| 209 | #define printk_ratelimited(fmt, ...) ({ \ | ||
| 210 | static DEFINE_RATELIMIT_STATE(_rs, \ | ||
| 211 | DEFAULT_RATELIMIT_INTERVAL, \ | ||
| 212 | DEFAULT_RATELIMIT_BURST); \ | ||
| 213 | \ | ||
| 214 | if (__ratelimit(&_rs)) \ | ||
| 215 | printk(fmt, ##__VA_ARGS__); \ | ||
| 216 | }) | ||
| 217 | #else | ||
| 218 | /* No effect, but we still get type checking even in the !PRINTK case: */ | ||
| 219 | #define printk_ratelimited printk | ||
| 220 | #endif | ||
| 221 | |||
| 222 | #define pr_emerg_ratelimited(fmt, ...) \ | ||
| 223 | printk_ratelimited(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 224 | #define pr_alert_ratelimited(fmt, ...) \ | ||
| 225 | printk_ratelimited(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) | ||
| 226 | #define pr_crit_ratelimited(fmt, ...) \ | ||
| 227 | printk_ratelimited(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) | ||
| 228 | #define pr_err_ratelimited(fmt, ...) \ | ||
| 229 | printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) | ||
| 230 | #define pr_warning_ratelimited(fmt, ...) \ | ||
| 231 | printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ||
| 232 | #define pr_warn_ratelimited pr_warning_ratelimited | ||
| 233 | #define pr_notice_ratelimited(fmt, ...) \ | ||
| 234 | printk_ratelimited(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) | ||
| 235 | #define pr_info_ratelimited(fmt, ...) \ | ||
| 236 | printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | ||
| 237 | /* no pr_cont_ratelimited, don't do that... */ | ||
| 238 | /* If you are writing a driver, please use dev_dbg instead */ | ||
| 239 | #if defined(DEBUG) | ||
| 240 | #define pr_debug_ratelimited(fmt, ...) \ | ||
| 241 | printk_ratelimited(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 242 | #else | ||
| 243 | #define pr_debug_ratelimited(fmt, ...) \ | ||
| 244 | ({ if (0) printk_ratelimited(KERN_DEBUG pr_fmt(fmt), \ | ||
| 245 | ##__VA_ARGS__); 0; }) | ||
| 246 | #endif | ||
| 247 | |||
| 248 | #endif | ||
diff --git a/include/linux/pwm_backlight.h b/include/linux/pwm_backlight.h index 01b3d759f1fc..e031e1a486d9 100644 --- a/include/linux/pwm_backlight.h +++ b/include/linux/pwm_backlight.h | |||
| @@ -8,6 +8,7 @@ struct platform_pwm_backlight_data { | |||
| 8 | int pwm_id; | 8 | int pwm_id; |
| 9 | unsigned int max_brightness; | 9 | unsigned int max_brightness; |
| 10 | unsigned int dft_brightness; | 10 | unsigned int dft_brightness; |
| 11 | unsigned int lth_brightness; | ||
| 11 | unsigned int pwm_period_ns; | 12 | unsigned int pwm_period_ns; |
| 12 | int (*init)(struct device *dev); | 13 | int (*init)(struct device *dev); |
| 13 | int (*notify)(struct device *dev, int brightness); | 14 | int (*notify)(struct device *dev, int brightness); |
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index a39cbed9ee17..ab2baa5c4884 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h | |||
| @@ -34,19 +34,13 @@ | |||
| 34 | * needed for RCU lookups (because root->height is unreliable). The only | 34 | * needed for RCU lookups (because root->height is unreliable). The only |
| 35 | * time callers need worry about this is when doing a lookup_slot under | 35 | * time callers need worry about this is when doing a lookup_slot under |
| 36 | * RCU. | 36 | * RCU. |
| 37 | * | ||
| 38 | * Indirect pointer in fact is also used to tag the last pointer of a node | ||
| 39 | * when it is shrunk, before we rcu free the node. See shrink code for | ||
| 40 | * details. | ||
| 37 | */ | 41 | */ |
| 38 | #define RADIX_TREE_INDIRECT_PTR 1 | 42 | #define RADIX_TREE_INDIRECT_PTR 1 |
| 39 | #define RADIX_TREE_RETRY ((void *)-1UL) | ||
| 40 | |||
| 41 | static inline void *radix_tree_ptr_to_indirect(void *ptr) | ||
| 42 | { | ||
| 43 | return (void *)((unsigned long)ptr | RADIX_TREE_INDIRECT_PTR); | ||
| 44 | } | ||
| 45 | 43 | ||
| 46 | static inline void *radix_tree_indirect_to_ptr(void *ptr) | ||
| 47 | { | ||
| 48 | return (void *)((unsigned long)ptr & ~RADIX_TREE_INDIRECT_PTR); | ||
| 49 | } | ||
| 50 | #define radix_tree_indirect_to_ptr(ptr) \ | 44 | #define radix_tree_indirect_to_ptr(ptr) \ |
| 51 | radix_tree_indirect_to_ptr((void __force *)(ptr)) | 45 | radix_tree_indirect_to_ptr((void __force *)(ptr)) |
| 52 | 46 | ||
| @@ -140,16 +134,29 @@ do { \ | |||
| 140 | * removed. | 134 | * removed. |
| 141 | * | 135 | * |
| 142 | * For use with radix_tree_lookup_slot(). Caller must hold tree at least read | 136 | * For use with radix_tree_lookup_slot(). Caller must hold tree at least read |
| 143 | * locked across slot lookup and dereference. More likely, will be used with | 137 | * locked across slot lookup and dereference. Not required if write lock is |
| 144 | * radix_tree_replace_slot(), as well, so caller will hold tree write locked. | 138 | * held (ie. items cannot be concurrently inserted). |
| 139 | * | ||
| 140 | * radix_tree_deref_retry must be used to confirm validity of the pointer if | ||
| 141 | * only the read lock is held. | ||
| 145 | */ | 142 | */ |
| 146 | static inline void *radix_tree_deref_slot(void **pslot) | 143 | static inline void *radix_tree_deref_slot(void **pslot) |
| 147 | { | 144 | { |
| 148 | void *ret = rcu_dereference(*pslot); | 145 | return rcu_dereference(*pslot); |
| 149 | if (unlikely(radix_tree_is_indirect_ptr(ret))) | ||
| 150 | ret = RADIX_TREE_RETRY; | ||
| 151 | return ret; | ||
| 152 | } | 146 | } |
| 147 | |||
| 148 | /** | ||
| 149 | * radix_tree_deref_retry - check radix_tree_deref_slot | ||
| 150 | * @arg: pointer returned by radix_tree_deref_slot | ||
| 151 | * Returns: 0 if retry is not required, otherwise retry is required | ||
| 152 | * | ||
| 153 | * radix_tree_deref_retry must be used with radix_tree_deref_slot. | ||
| 154 | */ | ||
| 155 | static inline int radix_tree_deref_retry(void *arg) | ||
| 156 | { | ||
| 157 | return unlikely((unsigned long)arg & RADIX_TREE_INDIRECT_PTR); | ||
| 158 | } | ||
| 159 | |||
| 153 | /** | 160 | /** |
| 154 | * radix_tree_replace_slot - replace item in a slot | 161 | * radix_tree_replace_slot - replace item in a slot |
| 155 | * @pslot: pointer to slot, returned by radix_tree_lookup_slot | 162 | * @pslot: pointer to slot, returned by radix_tree_lookup_slot |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 5ca47e59b727..c21072adbfad 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
| @@ -22,7 +22,6 @@ | |||
| 22 | #include <asm/unaligned.h> | 22 | #include <asm/unaligned.h> |
| 23 | #include <linux/bitops.h> | 23 | #include <linux/bitops.h> |
| 24 | #include <linux/proc_fs.h> | 24 | #include <linux/proc_fs.h> |
| 25 | #include <linux/smp_lock.h> | ||
| 26 | #include <linux/buffer_head.h> | 25 | #include <linux/buffer_head.h> |
| 27 | #include <linux/reiserfs_fs_i.h> | 26 | #include <linux/reiserfs_fs_i.h> |
| 28 | #include <linux/reiserfs_fs_sb.h> | 27 | #include <linux/reiserfs_fs_sb.h> |
diff --git a/include/linux/resource.h b/include/linux/resource.h index 88d36f9145ba..d01c96c1966e 100644 --- a/include/linux/resource.h +++ b/include/linux/resource.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define _LINUX_RESOURCE_H | 2 | #define _LINUX_RESOURCE_H |
| 3 | 3 | ||
| 4 | #include <linux/time.h> | 4 | #include <linux/time.h> |
| 5 | #include <linux/types.h> | ||
| 5 | 6 | ||
| 6 | /* | 7 | /* |
| 7 | * Resource control/accounting header file for linux | 8 | * Resource control/accounting header file for linux |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index d42f274418b8..bbad657a3725 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
| @@ -6,7 +6,6 @@ | |||
| 6 | #include <linux/if_link.h> | 6 | #include <linux/if_link.h> |
| 7 | #include <linux/if_addr.h> | 7 | #include <linux/if_addr.h> |
| 8 | #include <linux/neighbour.h> | 8 | #include <linux/neighbour.h> |
| 9 | #include <linux/netdevice.h> | ||
| 10 | 9 | ||
| 11 | /* rtnetlink families. Values up to 127 are reserved for real address | 10 | /* rtnetlink families. Values up to 127 are reserved for real address |
| 12 | * families, values above 128 may be used arbitrarily. | 11 | * families, values above 128 may be used arbitrarily. |
| @@ -606,6 +605,7 @@ struct tcamsg { | |||
| 606 | #ifdef __KERNEL__ | 605 | #ifdef __KERNEL__ |
| 607 | 606 | ||
| 608 | #include <linux/mutex.h> | 607 | #include <linux/mutex.h> |
| 608 | #include <linux/netdevice.h> | ||
| 609 | 609 | ||
| 610 | static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str) | 610 | static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str) |
| 611 | { | 611 | { |
diff --git a/include/linux/sched.h b/include/linux/sched.h index d0036e52a24a..223874538b33 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -143,7 +143,7 @@ extern unsigned long nr_iowait_cpu(int cpu); | |||
| 143 | extern unsigned long this_cpu_load(void); | 143 | extern unsigned long this_cpu_load(void); |
| 144 | 144 | ||
| 145 | 145 | ||
| 146 | extern void calc_global_load(void); | 146 | extern void calc_global_load(unsigned long ticks); |
| 147 | 147 | ||
| 148 | extern unsigned long get_parent_ip(unsigned long addr); | 148 | extern unsigned long get_parent_ip(unsigned long addr); |
| 149 | 149 | ||
| @@ -862,6 +862,7 @@ struct sched_group { | |||
| 862 | * single CPU. | 862 | * single CPU. |
| 863 | */ | 863 | */ |
| 864 | unsigned int cpu_power, cpu_power_orig; | 864 | unsigned int cpu_power, cpu_power_orig; |
| 865 | unsigned int group_weight; | ||
| 865 | 866 | ||
| 866 | /* | 867 | /* |
| 867 | * The CPUs this group covers. | 868 | * The CPUs this group covers. |
diff --git a/include/linux/security.h b/include/linux/security.h index b8246a8df7d2..fd4d55fb8845 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -77,7 +77,6 @@ extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, | |||
| 77 | extern int cap_task_setscheduler(struct task_struct *p); | 77 | extern int cap_task_setscheduler(struct task_struct *p); |
| 78 | extern int cap_task_setioprio(struct task_struct *p, int ioprio); | 78 | extern int cap_task_setioprio(struct task_struct *p, int ioprio); |
| 79 | extern int cap_task_setnice(struct task_struct *p, int nice); | 79 | extern int cap_task_setnice(struct task_struct *p, int nice); |
| 80 | extern int cap_syslog(int type, bool from_file); | ||
| 81 | extern int cap_vm_enough_memory(struct mm_struct *mm, long pages); | 80 | extern int cap_vm_enough_memory(struct mm_struct *mm, long pages); |
| 82 | 81 | ||
| 83 | struct msghdr; | 82 | struct msghdr; |
| @@ -1388,7 +1387,7 @@ struct security_operations { | |||
| 1388 | int (*sysctl) (struct ctl_table *table, int op); | 1387 | int (*sysctl) (struct ctl_table *table, int op); |
| 1389 | int (*quotactl) (int cmds, int type, int id, struct super_block *sb); | 1388 | int (*quotactl) (int cmds, int type, int id, struct super_block *sb); |
| 1390 | int (*quota_on) (struct dentry *dentry); | 1389 | int (*quota_on) (struct dentry *dentry); |
| 1391 | int (*syslog) (int type, bool from_file); | 1390 | int (*syslog) (int type); |
| 1392 | int (*settime) (struct timespec *ts, struct timezone *tz); | 1391 | int (*settime) (struct timespec *ts, struct timezone *tz); |
| 1393 | int (*vm_enough_memory) (struct mm_struct *mm, long pages); | 1392 | int (*vm_enough_memory) (struct mm_struct *mm, long pages); |
| 1394 | 1393 | ||
| @@ -1671,7 +1670,7 @@ int security_real_capable_noaudit(struct task_struct *tsk, int cap); | |||
| 1671 | int security_sysctl(struct ctl_table *table, int op); | 1670 | int security_sysctl(struct ctl_table *table, int op); |
| 1672 | int security_quotactl(int cmds, int type, int id, struct super_block *sb); | 1671 | int security_quotactl(int cmds, int type, int id, struct super_block *sb); |
| 1673 | int security_quota_on(struct dentry *dentry); | 1672 | int security_quota_on(struct dentry *dentry); |
| 1674 | int security_syslog(int type, bool from_file); | 1673 | int security_syslog(int type); |
| 1675 | int security_settime(struct timespec *ts, struct timezone *tz); | 1674 | int security_settime(struct timespec *ts, struct timezone *tz); |
| 1676 | int security_vm_enough_memory(long pages); | 1675 | int security_vm_enough_memory(long pages); |
| 1677 | int security_vm_enough_memory_mm(struct mm_struct *mm, long pages); | 1676 | int security_vm_enough_memory_mm(struct mm_struct *mm, long pages); |
| @@ -1901,9 +1900,9 @@ static inline int security_quota_on(struct dentry *dentry) | |||
| 1901 | return 0; | 1900 | return 0; |
| 1902 | } | 1901 | } |
| 1903 | 1902 | ||
| 1904 | static inline int security_syslog(int type, bool from_file) | 1903 | static inline int security_syslog(int type) |
| 1905 | { | 1904 | { |
| 1906 | return cap_syslog(type, from_file); | 1905 | return 0; |
| 1907 | } | 1906 | } |
| 1908 | 1907 | ||
| 1909 | static inline int security_settime(struct timespec *ts, struct timezone *tz) | 1908 | static inline int security_settime(struct timespec *ts, struct timezone *tz) |
diff --git a/include/linux/semaphore.h b/include/linux/semaphore.h index 5310d27abd2a..39fa04966aa8 100644 --- a/include/linux/semaphore.h +++ b/include/linux/semaphore.h | |||
| @@ -29,9 +29,6 @@ struct semaphore { | |||
| 29 | #define DEFINE_SEMAPHORE(name) \ | 29 | #define DEFINE_SEMAPHORE(name) \ |
| 30 | struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) | 30 | struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) |
| 31 | 31 | ||
| 32 | #define DECLARE_MUTEX(name) \ | ||
| 33 | struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) | ||
| 34 | |||
| 35 | static inline void sema_init(struct semaphore *sem, int val) | 32 | static inline void sema_init(struct semaphore *sem, int val) |
| 36 | { | 33 | { |
| 37 | static struct lock_class_key __key; | 34 | static struct lock_class_key __key; |
| @@ -39,9 +36,6 @@ static inline void sema_init(struct semaphore *sem, int val) | |||
| 39 | lockdep_init_map(&sem->lock.dep_map, "semaphore->lock", &__key, 0); | 36 | lockdep_init_map(&sem->lock.dep_map, "semaphore->lock", &__key, 0); |
| 40 | } | 37 | } |
| 41 | 38 | ||
| 42 | #define init_MUTEX(sem) sema_init(sem, 1) | ||
| 43 | #define init_MUTEX_LOCKED(sem) sema_init(sem, 0) | ||
| 44 | |||
| 45 | extern void down(struct semaphore *sem); | 39 | extern void down(struct semaphore *sem); |
| 46 | extern int __must_check down_interruptible(struct semaphore *sem); | 40 | extern int __must_check down_interruptible(struct semaphore *sem); |
| 47 | extern int __must_check down_killable(struct semaphore *sem); | 41 | extern int __must_check down_killable(struct semaphore *sem); |
diff --git a/include/linux/sh_clk.h b/include/linux/sh_clk.h index 4dca992f3093..9a52f72527dc 100644 --- a/include/linux/sh_clk.h +++ b/include/linux/sh_clk.h | |||
| @@ -19,11 +19,13 @@ struct clk_mapping { | |||
| 19 | }; | 19 | }; |
| 20 | 20 | ||
| 21 | struct clk_ops { | 21 | struct clk_ops { |
| 22 | #ifdef CONFIG_SH_CLK_CPG_LEGACY | ||
| 22 | void (*init)(struct clk *clk); | 23 | void (*init)(struct clk *clk); |
| 24 | #endif | ||
| 23 | int (*enable)(struct clk *clk); | 25 | int (*enable)(struct clk *clk); |
| 24 | void (*disable)(struct clk *clk); | 26 | void (*disable)(struct clk *clk); |
| 25 | unsigned long (*recalc)(struct clk *clk); | 27 | unsigned long (*recalc)(struct clk *clk); |
| 26 | int (*set_rate)(struct clk *clk, unsigned long rate, int algo_id); | 28 | int (*set_rate)(struct clk *clk, unsigned long rate); |
| 27 | int (*set_parent)(struct clk *clk, struct clk *parent); | 29 | int (*set_parent)(struct clk *clk, struct clk *parent); |
| 28 | long (*round_rate)(struct clk *clk, unsigned long rate); | 30 | long (*round_rate)(struct clk *clk, unsigned long rate); |
| 29 | }; | 31 | }; |
| @@ -67,36 +69,6 @@ int clk_register(struct clk *); | |||
| 67 | void clk_unregister(struct clk *); | 69 | void clk_unregister(struct clk *); |
| 68 | void clk_enable_init_clocks(void); | 70 | void clk_enable_init_clocks(void); |
| 69 | 71 | ||
| 70 | /** | ||
| 71 | * clk_set_rate_ex - set the clock rate for a clock source, with additional parameter | ||
| 72 | * @clk: clock source | ||
| 73 | * @rate: desired clock rate in Hz | ||
| 74 | * @algo_id: algorithm id to be passed down to ops->set_rate | ||
| 75 | * | ||
| 76 | * Returns success (0) or negative errno. | ||
| 77 | */ | ||
| 78 | int clk_set_rate_ex(struct clk *clk, unsigned long rate, int algo_id); | ||
| 79 | |||
| 80 | enum clk_sh_algo_id { | ||
| 81 | NO_CHANGE = 0, | ||
| 82 | |||
| 83 | IUS_N1_N1, | ||
| 84 | IUS_322, | ||
| 85 | IUS_522, | ||
| 86 | IUS_N11, | ||
| 87 | |||
| 88 | SB_N1, | ||
| 89 | |||
| 90 | SB3_N1, | ||
| 91 | SB3_32, | ||
| 92 | SB3_43, | ||
| 93 | SB3_54, | ||
| 94 | |||
| 95 | BP_N1, | ||
| 96 | |||
| 97 | IP_N1, | ||
| 98 | }; | ||
| 99 | |||
| 100 | struct clk_div_mult_table { | 72 | struct clk_div_mult_table { |
| 101 | unsigned int *divisors; | 73 | unsigned int *divisors; |
| 102 | unsigned int nr_divisors; | 74 | unsigned int nr_divisors; |
| @@ -122,6 +94,10 @@ int clk_rate_table_find(struct clk *clk, | |||
| 122 | long clk_rate_div_range_round(struct clk *clk, unsigned int div_min, | 94 | long clk_rate_div_range_round(struct clk *clk, unsigned int div_min, |
| 123 | unsigned int div_max, unsigned long rate); | 95 | unsigned int div_max, unsigned long rate); |
| 124 | 96 | ||
| 97 | long clk_round_parent(struct clk *clk, unsigned long target, | ||
| 98 | unsigned long *best_freq, unsigned long *parent_freq, | ||
| 99 | unsigned int div_min, unsigned int div_max); | ||
| 100 | |||
| 125 | #define SH_CLK_MSTP32(_parent, _enable_reg, _enable_bit, _flags) \ | 101 | #define SH_CLK_MSTP32(_parent, _enable_reg, _enable_bit, _flags) \ |
| 126 | { \ | 102 | { \ |
| 127 | .parent = _parent, \ | 103 | .parent = _parent, \ |
diff --git a/include/linux/sh_intc.h b/include/linux/sh_intc.h index f656d1a43dc0..5812fefbcedf 100644 --- a/include/linux/sh_intc.h +++ b/include/linux/sh_intc.h | |||
| @@ -79,7 +79,7 @@ struct intc_hw_desc { | |||
| 79 | unsigned int nr_subgroups; | 79 | unsigned int nr_subgroups; |
| 80 | }; | 80 | }; |
| 81 | 81 | ||
| 82 | #define _INTC_ARRAY(a) a, a == NULL ? 0 : sizeof(a)/sizeof(*a) | 82 | #define _INTC_ARRAY(a) a, __same_type(a, NULL) ? 0 : sizeof(a)/sizeof(*a) |
| 83 | 83 | ||
| 84 | #define INTC_HW_DESC(vectors, groups, mask_regs, \ | 84 | #define INTC_HW_DESC(vectors, groups, mask_regs, \ |
| 85 | prio_regs, sense_regs, ack_regs) \ | 85 | prio_regs, sense_regs, ack_regs) \ |
diff --git a/include/linux/sh_timer.h b/include/linux/sh_timer.h index 864bd56bd3b0..4d9dcd138315 100644 --- a/include/linux/sh_timer.h +++ b/include/linux/sh_timer.h | |||
| @@ -5,7 +5,6 @@ struct sh_timer_config { | |||
| 5 | char *name; | 5 | char *name; |
| 6 | long channel_offset; | 6 | long channel_offset; |
| 7 | int timer_bit; | 7 | int timer_bit; |
| 8 | char *clk; | ||
| 9 | unsigned long clockevent_rating; | 8 | unsigned long clockevent_rating; |
| 10 | unsigned long clocksource_rating; | 9 | unsigned long clocksource_rating; |
| 11 | }; | 10 | }; |
diff --git a/include/linux/smp_lock.h b/include/linux/smp_lock.h index 291f721144c2..3a1988202731 100644 --- a/include/linux/smp_lock.h +++ b/include/linux/smp_lock.h | |||
| @@ -4,8 +4,6 @@ | |||
| 4 | #ifdef CONFIG_LOCK_KERNEL | 4 | #ifdef CONFIG_LOCK_KERNEL |
| 5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
| 6 | 6 | ||
| 7 | #define kernel_locked() (current->lock_depth >= 0) | ||
| 8 | |||
| 9 | extern int __lockfunc __reacquire_kernel_lock(void); | 7 | extern int __lockfunc __reacquire_kernel_lock(void); |
| 10 | extern void __lockfunc __release_kernel_lock(void); | 8 | extern void __lockfunc __release_kernel_lock(void); |
| 11 | 9 | ||
| @@ -58,7 +56,6 @@ static inline void cycle_kernel_lock(void) | |||
| 58 | #define lock_kernel() | 56 | #define lock_kernel() |
| 59 | #define unlock_kernel() | 57 | #define unlock_kernel() |
| 60 | #define cycle_kernel_lock() do { } while(0) | 58 | #define cycle_kernel_lock() do { } while(0) |
| 61 | #define kernel_locked() 1 | ||
| 62 | #endif /* CONFIG_BKL */ | 59 | #endif /* CONFIG_BKL */ |
| 63 | 60 | ||
| 64 | #define release_kernel_lock(task) do { } while(0) | 61 | #define release_kernel_lock(task) do { } while(0) |
diff --git a/include/linux/snmp.h b/include/linux/snmp.h index ebb0c80ffd6e..12b2b18e50c1 100644 --- a/include/linux/snmp.h +++ b/include/linux/snmp.h | |||
| @@ -230,6 +230,7 @@ enum | |||
| 230 | LINUX_MIB_TCPMINTTLDROP, /* RFC 5082 */ | 230 | LINUX_MIB_TCPMINTTLDROP, /* RFC 5082 */ |
| 231 | LINUX_MIB_TCPDEFERACCEPTDROP, | 231 | LINUX_MIB_TCPDEFERACCEPTDROP, |
| 232 | LINUX_MIB_IPRPFILTER, /* IP Reverse Path Filter (rp_filter) */ | 232 | LINUX_MIB_IPRPFILTER, /* IP Reverse Path Filter (rp_filter) */ |
| 233 | LINUX_MIB_TCPTIMEWAITOVERFLOW, /* TCPTimeWaitOverflow */ | ||
| 233 | __LINUX_MIB_MAX | 234 | __LINUX_MIB_MAX |
| 234 | }; | 235 | }; |
| 235 | 236 | ||
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 92e52a1e6af3..b4d7710bc38d 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
| @@ -204,6 +204,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
| 204 | /** | 204 | /** |
| 205 | * struct spi_master - interface to SPI master controller | 205 | * struct spi_master - interface to SPI master controller |
| 206 | * @dev: device interface to this driver | 206 | * @dev: device interface to this driver |
| 207 | * @list: link with the global spi_master list | ||
| 207 | * @bus_num: board-specific (and often SOC-specific) identifier for a | 208 | * @bus_num: board-specific (and often SOC-specific) identifier for a |
| 208 | * given SPI controller. | 209 | * given SPI controller. |
| 209 | * @num_chipselect: chipselects are used to distinguish individual | 210 | * @num_chipselect: chipselects are used to distinguish individual |
| @@ -238,6 +239,8 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
| 238 | struct spi_master { | 239 | struct spi_master { |
| 239 | struct device dev; | 240 | struct device dev; |
| 240 | 241 | ||
| 242 | struct list_head list; | ||
| 243 | |||
| 241 | /* other than negative (== assign one dynamically), bus_num is fully | 244 | /* other than negative (== assign one dynamically), bus_num is fully |
| 242 | * board-specific. usually that simplifies to being SOC-specific. | 245 | * board-specific. usually that simplifies to being SOC-specific. |
| 243 | * example: one SOC has three SPI controllers, numbered 0..2, | 246 | * example: one SOC has three SPI controllers, numbered 0..2, |
diff --git a/include/linux/ssb/ssb_driver_gige.h b/include/linux/ssb/ssb_driver_gige.h index 942e38736901..eba52a100533 100644 --- a/include/linux/ssb/ssb_driver_gige.h +++ b/include/linux/ssb/ssb_driver_gige.h | |||
| @@ -96,16 +96,21 @@ static inline bool ssb_gige_must_flush_posted_writes(struct pci_dev *pdev) | |||
| 96 | return 0; | 96 | return 0; |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | extern char * nvram_get(const char *name); | 99 | #ifdef CONFIG_BCM47XX |
| 100 | #include <asm/mach-bcm47xx/nvram.h> | ||
| 100 | /* Get the device MAC address */ | 101 | /* Get the device MAC address */ |
| 101 | static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) | 102 | static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) |
| 102 | { | 103 | { |
| 103 | #ifdef CONFIG_BCM47XX | 104 | char buf[20]; |
| 104 | char *res = nvram_get("et0macaddr"); | 105 | if (nvram_getenv("et0macaddr", buf, sizeof(buf)) < 0) |
| 105 | if (res) | 106 | return; |
| 106 | memcpy(macaddr, res, 6); | 107 | nvram_parse_macaddr(buf, macaddr); |
| 107 | #endif | ||
| 108 | } | 108 | } |
| 109 | #else | ||
| 110 | static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) | ||
| 111 | { | ||
| 112 | } | ||
| 113 | #endif | ||
| 109 | 114 | ||
| 110 | extern int ssb_gige_pcibios_plat_dev_init(struct ssb_device *sdev, | 115 | extern int ssb_gige_pcibios_plat_dev_init(struct ssb_device *sdev, |
| 111 | struct pci_dev *pdev); | 116 | struct pci_dev *pdev); |
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index bbdb680ffbe9..aea0d438e3c7 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h | |||
| @@ -82,18 +82,28 @@ struct svc_xprt { | |||
| 82 | struct net *xpt_net; | 82 | struct net *xpt_net; |
| 83 | }; | 83 | }; |
| 84 | 84 | ||
| 85 | static inline void register_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u) | 85 | static inline void unregister_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u) |
| 86 | { | 86 | { |
| 87 | spin_lock(&xpt->xpt_lock); | 87 | spin_lock(&xpt->xpt_lock); |
| 88 | list_add(&u->list, &xpt->xpt_users); | 88 | list_del_init(&u->list); |
| 89 | spin_unlock(&xpt->xpt_lock); | 89 | spin_unlock(&xpt->xpt_lock); |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | static inline void unregister_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u) | 92 | static inline int register_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u) |
| 93 | { | 93 | { |
| 94 | spin_lock(&xpt->xpt_lock); | 94 | spin_lock(&xpt->xpt_lock); |
| 95 | list_del_init(&u->list); | 95 | if (test_bit(XPT_CLOSE, &xpt->xpt_flags)) { |
| 96 | /* | ||
| 97 | * The connection is about to be deleted soon (or, | ||
| 98 | * worse, may already be deleted--in which case we've | ||
| 99 | * already notified the xpt_users). | ||
| 100 | */ | ||
| 101 | spin_unlock(&xpt->xpt_lock); | ||
| 102 | return -ENOTCONN; | ||
| 103 | } | ||
| 104 | list_add(&u->list, &xpt->xpt_users); | ||
| 96 | spin_unlock(&xpt->xpt_lock); | 105 | spin_unlock(&xpt->xpt_lock); |
| 106 | return 0; | ||
| 97 | } | 107 | } |
| 98 | 108 | ||
| 99 | int svc_reg_xprt_class(struct svc_xprt_class *); | 109 | int svc_reg_xprt_class(struct svc_xprt_class *); |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 2a754748dd5f..54e4eaaa0561 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -13,7 +13,6 @@ | |||
| 13 | #include <linux/tty_driver.h> | 13 | #include <linux/tty_driver.h> |
| 14 | #include <linux/tty_ldisc.h> | 14 | #include <linux/tty_ldisc.h> |
| 15 | #include <linux/mutex.h> | 15 | #include <linux/mutex.h> |
| 16 | #include <linux/smp_lock.h> | ||
| 17 | 16 | ||
| 18 | #include <asm/system.h> | 17 | #include <asm/system.h> |
| 19 | 18 | ||
| @@ -50,7 +49,7 @@ | |||
| 50 | #define N_V253 19 /* Codec control over voice modem */ | 49 | #define N_V253 19 /* Codec control over voice modem */ |
| 51 | #define N_CAIF 20 /* CAIF protocol for talking to modems */ | 50 | #define N_CAIF 20 /* CAIF protocol for talking to modems */ |
| 52 | #define N_GSM0710 21 /* GSM 0710 Mux */ | 51 | #define N_GSM0710 21 /* GSM 0710 Mux */ |
| 53 | #define N_TI_WL 22 /* for TI's WL BT, FM, GPS combo chips */ | 52 | #define N_TI_WL 22 /* for TI's WL BT, FM, GPS combo chips */ |
| 54 | 53 | ||
| 55 | /* | 54 | /* |
| 56 | * This character is the same as _POSIX_VDISABLE: it cannot be used as | 55 | * This character is the same as _POSIX_VDISABLE: it cannot be used as |
| @@ -367,6 +366,7 @@ struct tty_file_private { | |||
| 367 | #define TTY_HUPPED 18 /* Post driver->hangup() */ | 366 | #define TTY_HUPPED 18 /* Post driver->hangup() */ |
| 368 | #define TTY_FLUSHING 19 /* Flushing to ldisc in progress */ | 367 | #define TTY_FLUSHING 19 /* Flushing to ldisc in progress */ |
| 369 | #define TTY_FLUSHPENDING 20 /* Queued buffer flush pending */ | 368 | #define TTY_FLUSHPENDING 20 /* Queued buffer flush pending */ |
| 369 | #define TTY_HUPPING 21 /* ->hangup() in progress */ | ||
| 370 | 370 | ||
| 371 | #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) | 371 | #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) |
| 372 | 372 | ||
diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h index d6188e5a52df..665517c05eaf 100644 --- a/include/linux/uio_driver.h +++ b/include/linux/uio_driver.h | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * | 3 | * |
| 4 | * Copyright(C) 2005, Benedikt Spranger <b.spranger@linutronix.de> | 4 | * Copyright(C) 2005, Benedikt Spranger <b.spranger@linutronix.de> |
| 5 | * Copyright(C) 2005, Thomas Gleixner <tglx@linutronix.de> | 5 | * Copyright(C) 2005, Thomas Gleixner <tglx@linutronix.de> |
| 6 | * Copyright(C) 2006, Hans J. Koch <hjk@linutronix.de> | 6 | * Copyright(C) 2006, Hans J. Koch <hjk@hansjkoch.de> |
| 7 | * Copyright(C) 2006, Greg Kroah-Hartman <greg@kroah.com> | 7 | * Copyright(C) 2006, Greg Kroah-Hartman <greg@kroah.com> |
| 8 | * | 8 | * |
| 9 | * Userspace IO driver. | 9 | * Userspace IO driver. |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 35fe6ab222bb..a28eb2592577 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -313,6 +313,10 @@ struct usb_bus { | |||
| 313 | int busnum; /* Bus number (in order of reg) */ | 313 | int busnum; /* Bus number (in order of reg) */ |
| 314 | const char *bus_name; /* stable id (PCI slot_name etc) */ | 314 | const char *bus_name; /* stable id (PCI slot_name etc) */ |
| 315 | u8 uses_dma; /* Does the host controller use DMA? */ | 315 | u8 uses_dma; /* Does the host controller use DMA? */ |
| 316 | u8 uses_pio_for_control; /* | ||
| 317 | * Does the host controller use PIO | ||
| 318 | * for control transfers? | ||
| 319 | */ | ||
| 316 | u8 otg_port; /* 0, or number of OTG/HNP port */ | 320 | u8 otg_port; /* 0, or number of OTG/HNP port */ |
| 317 | unsigned is_b_host:1; /* true during some HNP roleswitches */ | 321 | unsigned is_b_host:1; /* true during some HNP roleswitches */ |
| 318 | unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */ | 322 | unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */ |
| @@ -797,7 +801,7 @@ struct usbdrv_wrap { | |||
| 797 | * @disconnect: Called when the interface is no longer accessible, usually | 801 | * @disconnect: Called when the interface is no longer accessible, usually |
| 798 | * because its device has been (or is being) disconnected or the | 802 | * because its device has been (or is being) disconnected or the |
| 799 | * driver module is being unloaded. | 803 | * driver module is being unloaded. |
| 800 | * @ioctl: Used for drivers that want to talk to userspace through | 804 | * @unlocked_ioctl: Used for drivers that want to talk to userspace through |
| 801 | * the "usbfs" filesystem. This lets devices provide ways to | 805 | * the "usbfs" filesystem. This lets devices provide ways to |
| 802 | * expose information to user space regardless of where they | 806 | * expose information to user space regardless of where they |
| 803 | * do (or don't) show up otherwise in the filesystem. | 807 | * do (or don't) show up otherwise in the filesystem. |
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h index ee2dd1d506ed..2387f9fc8138 100644 --- a/include/linux/usb/musb.h +++ b/include/linux/usb/musb.h | |||
| @@ -89,6 +89,8 @@ struct musb_hdrc_config { | |||
| 89 | /* A GPIO controlling VRSEL in Blackfin */ | 89 | /* A GPIO controlling VRSEL in Blackfin */ |
| 90 | unsigned int gpio_vrsel; | 90 | unsigned int gpio_vrsel; |
| 91 | unsigned int gpio_vrsel_active; | 91 | unsigned int gpio_vrsel_active; |
| 92 | /* musb CLKIN in Blackfin in MHZ */ | ||
| 93 | unsigned char clkin; | ||
| 92 | #endif | 94 | #endif |
| 93 | 95 | ||
| 94 | }; | 96 | }; |
diff --git a/include/linux/video_output.h b/include/linux/video_output.h index 2fb46bc9340d..ed5cdeb3604d 100644 --- a/include/linux/video_output.h +++ b/include/linux/video_output.h | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #ifndef _LINUX_VIDEO_OUTPUT_H | 23 | #ifndef _LINUX_VIDEO_OUTPUT_H |
| 24 | #define _LINUX_VIDEO_OUTPUT_H | 24 | #define _LINUX_VIDEO_OUTPUT_H |
| 25 | #include <linux/device.h> | 25 | #include <linux/device.h> |
| 26 | #include <linux/err.h> | ||
| 26 | struct output_device; | 27 | struct output_device; |
| 27 | struct output_properties { | 28 | struct output_properties { |
| 28 | int (*set_state)(struct output_device *); | 29 | int (*set_state)(struct output_device *); |
| @@ -34,9 +35,23 @@ struct output_device { | |||
| 34 | struct device dev; | 35 | struct device dev; |
| 35 | }; | 36 | }; |
| 36 | #define to_output_device(obj) container_of(obj, struct output_device, dev) | 37 | #define to_output_device(obj) container_of(obj, struct output_device, dev) |
| 38 | #if defined(CONFIG_VIDEO_OUTPUT_CONTROL) || defined(CONFIG_VIDEO_OUTPUT_CONTROL_MODULE) | ||
| 37 | struct output_device *video_output_register(const char *name, | 39 | struct output_device *video_output_register(const char *name, |
| 38 | struct device *dev, | 40 | struct device *dev, |
| 39 | void *devdata, | 41 | void *devdata, |
| 40 | struct output_properties *op); | 42 | struct output_properties *op); |
| 41 | void video_output_unregister(struct output_device *dev); | 43 | void video_output_unregister(struct output_device *dev); |
| 44 | #else | ||
| 45 | static struct output_device *video_output_register(const char *name, | ||
| 46 | struct device *dev, | ||
| 47 | void *devdata, | ||
| 48 | struct output_properties *op) | ||
| 49 | { | ||
| 50 | return ERR_PTR(-ENODEV); | ||
| 51 | } | ||
| 52 | static void video_output_unregister(struct output_device *dev) | ||
| 53 | { | ||
| 54 | return; | ||
| 55 | } | ||
| 56 | #endif | ||
| 42 | #endif | 57 | #endif |
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index a03dcf62ca9d..44b54f619ac6 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
| @@ -7,8 +7,6 @@ | |||
| 7 | 7 | ||
| 8 | struct vm_area_struct; /* vma defining user mapping in mm_types.h */ | 8 | struct vm_area_struct; /* vma defining user mapping in mm_types.h */ |
| 9 | 9 | ||
| 10 | extern bool vmap_lazy_unmap; | ||
| 11 | |||
| 12 | /* bits in flags of vmalloc's vm_struct below */ | 10 | /* bits in flags of vmalloc's vm_struct below */ |
| 13 | #define VM_IOREMAP 0x00000001 /* ioremap() and friends */ | 11 | #define VM_IOREMAP 0x00000001 /* ioremap() and friends */ |
| 14 | #define VM_ALLOC 0x00000002 /* vmalloc() */ | 12 | #define VM_ALLOC 0x00000002 /* vmalloc() */ |
