diff options
Diffstat (limited to 'include/linux')
50 files changed, 870 insertions, 121 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 03f22076381f..334a3593cdfd 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
| @@ -57,6 +57,7 @@ header-y += dlmconstants.h | |||
| 57 | header-y += dlm_device.h | 57 | header-y += dlm_device.h |
| 58 | header-y += dlm_netlink.h | 58 | header-y += dlm_netlink.h |
| 59 | header-y += dm-ioctl.h | 59 | header-y += dm-ioctl.h |
| 60 | header-y += dm-log-userspace.h | ||
| 60 | header-y += dn.h | 61 | header-y += dn.h |
| 61 | header-y += dqblk_xfs.h | 62 | header-y += dqblk_xfs.h |
| 62 | header-y += efs_fs_sb.h | 63 | header-y += efs_fs_sb.h |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 51b4b0a5ce8c..34321cfffeab 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -113,9 +113,6 @@ void acpi_irq_stats_init(void); | |||
| 113 | extern u32 acpi_irq_handled; | 113 | extern u32 acpi_irq_handled; |
| 114 | extern u32 acpi_irq_not_handled; | 114 | extern u32 acpi_irq_not_handled; |
| 115 | 115 | ||
| 116 | extern struct acpi_mcfg_allocation *pci_mmcfg_config; | ||
| 117 | extern int pci_mmcfg_config_num; | ||
| 118 | |||
| 119 | extern int sbf_port; | 116 | extern int sbf_port; |
| 120 | extern unsigned long acpi_realmode_flags; | 117 | extern unsigned long acpi_realmode_flags; |
| 121 | 118 | ||
| @@ -293,7 +290,10 @@ void __init acpi_s4_no_nvs(void); | |||
| 293 | OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL) | 290 | OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL) |
| 294 | 291 | ||
| 295 | extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, u32 flags); | 292 | extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, u32 flags); |
| 293 | extern void acpi_early_init(void); | ||
| 294 | |||
| 296 | #else /* CONFIG_ACPI */ | 295 | #else /* CONFIG_ACPI */ |
| 296 | static inline void acpi_early_init(void) { } | ||
| 297 | 297 | ||
| 298 | static inline int early_acpi_boot_init(void) | 298 | static inline int early_acpi_boot_init(void) |
| 299 | { | 299 | { |
diff --git a/include/linux/aio.h b/include/linux/aio.h index b16a957030f8..47f7d932a01d 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
| @@ -121,9 +121,9 @@ struct kiocb { | |||
| 121 | 121 | ||
| 122 | /* | 122 | /* |
| 123 | * If the aio_resfd field of the userspace iocb is not zero, | 123 | * If the aio_resfd field of the userspace iocb is not zero, |
| 124 | * this is the underlying file* to deliver event to. | 124 | * this is the underlying eventfd context to deliver events to. |
| 125 | */ | 125 | */ |
| 126 | struct file *ki_eventfd; | 126 | struct eventfd_ctx *ki_eventfd; |
| 127 | }; | 127 | }; |
| 128 | 128 | ||
| 129 | #define is_sync_kiocb(iocb) ((iocb)->ki_key == KIOCB_SYNC_KEY) | 129 | #define is_sync_kiocb(iocb) ((iocb)->ki_key == KIOCB_SYNC_KEY) |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 4fa2810b675e..3c7a358241a7 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
| @@ -599,6 +599,8 @@ extern void audit_log_untrustedstring(struct audit_buffer *ab, | |||
| 599 | extern void audit_log_d_path(struct audit_buffer *ab, | 599 | extern void audit_log_d_path(struct audit_buffer *ab, |
| 600 | const char *prefix, | 600 | const char *prefix, |
| 601 | struct path *path); | 601 | struct path *path); |
| 602 | extern void audit_log_key(struct audit_buffer *ab, | ||
| 603 | char *key); | ||
| 602 | extern void audit_log_lost(const char *message); | 604 | extern void audit_log_lost(const char *message); |
| 603 | extern int audit_update_lsm_rules(void); | 605 | extern int audit_update_lsm_rules(void); |
| 604 | 606 | ||
| @@ -621,6 +623,7 @@ extern int audit_enabled; | |||
| 621 | #define audit_log_n_untrustedstring(a,n,s) do { ; } while (0) | 623 | #define audit_log_n_untrustedstring(a,n,s) do { ; } while (0) |
| 622 | #define audit_log_untrustedstring(a,s) do { ; } while (0) | 624 | #define audit_log_untrustedstring(a,s) do { ; } while (0) |
| 623 | #define audit_log_d_path(b, p, d) do { ; } while (0) | 625 | #define audit_log_d_path(b, p, d) do { ; } while (0) |
| 626 | #define audit_log_key(b, k) do { ; } while (0) | ||
| 624 | #define audit_enabled 0 | 627 | #define audit_enabled 0 |
| 625 | #endif | 628 | #endif |
| 626 | #endif | 629 | #endif |
diff --git a/include/linux/bio.h b/include/linux/bio.h index 2a04eb54c0dd..2892b710771c 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
| @@ -319,7 +319,6 @@ static inline int bio_has_allocated_vec(struct bio *bio) | |||
| 319 | */ | 319 | */ |
| 320 | struct bio_integrity_payload { | 320 | struct bio_integrity_payload { |
| 321 | struct bio *bip_bio; /* parent bio */ | 321 | struct bio *bip_bio; /* parent bio */ |
| 322 | struct bio_vec *bip_vec; /* integrity data vector */ | ||
| 323 | 322 | ||
| 324 | sector_t bip_sector; /* virtual start sector */ | 323 | sector_t bip_sector; /* virtual start sector */ |
| 325 | 324 | ||
| @@ -328,11 +327,12 @@ struct bio_integrity_payload { | |||
| 328 | 327 | ||
| 329 | unsigned int bip_size; | 328 | unsigned int bip_size; |
| 330 | 329 | ||
| 331 | unsigned short bip_pool; /* pool the ivec came from */ | 330 | unsigned short bip_slab; /* slab the bip came from */ |
| 332 | unsigned short bip_vcnt; /* # of integrity bio_vecs */ | 331 | unsigned short bip_vcnt; /* # of integrity bio_vecs */ |
| 333 | unsigned short bip_idx; /* current bip_vec index */ | 332 | unsigned short bip_idx; /* current bip_vec index */ |
| 334 | 333 | ||
| 335 | struct work_struct bip_work; /* I/O completion */ | 334 | struct work_struct bip_work; /* I/O completion */ |
| 335 | struct bio_vec bip_vec[0]; /* embedded bvec array */ | ||
| 336 | }; | 336 | }; |
| 337 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ | 337 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ |
| 338 | 338 | ||
| @@ -430,6 +430,9 @@ struct bio_set { | |||
| 430 | unsigned int front_pad; | 430 | unsigned int front_pad; |
| 431 | 431 | ||
| 432 | mempool_t *bio_pool; | 432 | mempool_t *bio_pool; |
| 433 | #if defined(CONFIG_BLK_DEV_INTEGRITY) | ||
| 434 | mempool_t *bio_integrity_pool; | ||
| 435 | #endif | ||
| 433 | mempool_t *bvec_pool; | 436 | mempool_t *bvec_pool; |
| 434 | }; | 437 | }; |
| 435 | 438 | ||
| @@ -634,8 +637,9 @@ static inline struct bio *bio_list_get(struct bio_list *bl) | |||
| 634 | 637 | ||
| 635 | #define bio_integrity(bio) (bio->bi_integrity != NULL) | 638 | #define bio_integrity(bio) (bio->bi_integrity != NULL) |
| 636 | 639 | ||
| 640 | extern struct bio_integrity_payload *bio_integrity_alloc_bioset(struct bio *, gfp_t, unsigned int, struct bio_set *); | ||
| 637 | extern struct bio_integrity_payload *bio_integrity_alloc(struct bio *, gfp_t, unsigned int); | 641 | extern struct bio_integrity_payload *bio_integrity_alloc(struct bio *, gfp_t, unsigned int); |
| 638 | extern void bio_integrity_free(struct bio *); | 642 | extern void bio_integrity_free(struct bio *, struct bio_set *); |
| 639 | extern int bio_integrity_add_page(struct bio *, struct page *, unsigned int, unsigned int); | 643 | extern int bio_integrity_add_page(struct bio *, struct page *, unsigned int, unsigned int); |
| 640 | extern int bio_integrity_enabled(struct bio *bio); | 644 | extern int bio_integrity_enabled(struct bio *bio); |
| 641 | extern int bio_integrity_set_tag(struct bio *, void *, unsigned int); | 645 | extern int bio_integrity_set_tag(struct bio *, void *, unsigned int); |
| @@ -645,21 +649,27 @@ extern void bio_integrity_endio(struct bio *, int); | |||
| 645 | extern void bio_integrity_advance(struct bio *, unsigned int); | 649 | extern void bio_integrity_advance(struct bio *, unsigned int); |
| 646 | extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int); | 650 | extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int); |
| 647 | extern void bio_integrity_split(struct bio *, struct bio_pair *, int); | 651 | extern void bio_integrity_split(struct bio *, struct bio_pair *, int); |
| 648 | extern int bio_integrity_clone(struct bio *, struct bio *, gfp_t); | 652 | extern int bio_integrity_clone(struct bio *, struct bio *, gfp_t, struct bio_set *); |
| 653 | extern int bioset_integrity_create(struct bio_set *, int); | ||
| 654 | extern void bioset_integrity_free(struct bio_set *); | ||
| 655 | extern void bio_integrity_init(void); | ||
| 649 | 656 | ||
| 650 | #else /* CONFIG_BLK_DEV_INTEGRITY */ | 657 | #else /* CONFIG_BLK_DEV_INTEGRITY */ |
| 651 | 658 | ||
| 652 | #define bio_integrity(a) (0) | 659 | #define bio_integrity(a) (0) |
| 660 | #define bioset_integrity_create(a, b) (0) | ||
| 653 | #define bio_integrity_prep(a) (0) | 661 | #define bio_integrity_prep(a) (0) |
| 654 | #define bio_integrity_enabled(a) (0) | 662 | #define bio_integrity_enabled(a) (0) |
| 655 | #define bio_integrity_clone(a, b, c) (0) | 663 | #define bio_integrity_clone(a, b, c, d) (0) |
| 656 | #define bio_integrity_free(a) do { } while (0) | 664 | #define bioset_integrity_free(a) do { } while (0) |
| 665 | #define bio_integrity_free(a, b) do { } while (0) | ||
| 657 | #define bio_integrity_endio(a, b) do { } while (0) | 666 | #define bio_integrity_endio(a, b) do { } while (0) |
| 658 | #define bio_integrity_advance(a, b) do { } while (0) | 667 | #define bio_integrity_advance(a, b) do { } while (0) |
| 659 | #define bio_integrity_trim(a, b, c) do { } while (0) | 668 | #define bio_integrity_trim(a, b, c) do { } while (0) |
| 660 | #define bio_integrity_split(a, b, c) do { } while (0) | 669 | #define bio_integrity_split(a, b, c) do { } while (0) |
| 661 | #define bio_integrity_set_tag(a, b, c) do { } while (0) | 670 | #define bio_integrity_set_tag(a, b, c) do { } while (0) |
| 662 | #define bio_integrity_get_tag(a, b, c) do { } while (0) | 671 | #define bio_integrity_get_tag(a, b, c) do { } while (0) |
| 672 | #define bio_integrity_init(a) do { } while (0) | ||
| 663 | 673 | ||
| 664 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ | 674 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ |
| 665 | 675 | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 8963d9149b5f..49ae07951d55 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -301,12 +301,6 @@ struct blk_queue_tag { | |||
| 301 | #define BLK_SCSI_MAX_CMDS (256) | 301 | #define BLK_SCSI_MAX_CMDS (256) |
| 302 | #define BLK_SCSI_CMD_PER_LONG (BLK_SCSI_MAX_CMDS / (sizeof(long) * 8)) | 302 | #define BLK_SCSI_CMD_PER_LONG (BLK_SCSI_MAX_CMDS / (sizeof(long) * 8)) |
| 303 | 303 | ||
| 304 | struct blk_cmd_filter { | ||
| 305 | unsigned long read_ok[BLK_SCSI_CMD_PER_LONG]; | ||
| 306 | unsigned long write_ok[BLK_SCSI_CMD_PER_LONG]; | ||
| 307 | struct kobject kobj; | ||
| 308 | }; | ||
| 309 | |||
| 310 | struct queue_limits { | 304 | struct queue_limits { |
| 311 | unsigned long bounce_pfn; | 305 | unsigned long bounce_pfn; |
| 312 | unsigned long seg_boundary_mask; | 306 | unsigned long seg_boundary_mask; |
| @@ -445,7 +439,6 @@ struct request_queue | |||
| 445 | #if defined(CONFIG_BLK_DEV_BSG) | 439 | #if defined(CONFIG_BLK_DEV_BSG) |
| 446 | struct bsg_class_device bsg_dev; | 440 | struct bsg_class_device bsg_dev; |
| 447 | #endif | 441 | #endif |
| 448 | struct blk_cmd_filter cmd_filter; | ||
| 449 | }; | 442 | }; |
| 450 | 443 | ||
| 451 | #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ | 444 | #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ |
| @@ -998,13 +991,7 @@ static inline int sb_issue_discard(struct super_block *sb, | |||
| 998 | return blkdev_issue_discard(sb->s_bdev, block, nr_blocks, GFP_KERNEL); | 991 | return blkdev_issue_discard(sb->s_bdev, block, nr_blocks, GFP_KERNEL); |
| 999 | } | 992 | } |
| 1000 | 993 | ||
| 1001 | /* | 994 | extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm); |
| 1002 | * command filter functions | ||
| 1003 | */ | ||
| 1004 | extern int blk_verify_command(struct blk_cmd_filter *filter, | ||
| 1005 | unsigned char *cmd, fmode_t has_write_perm); | ||
| 1006 | extern void blk_unregister_filter(struct gendisk *disk); | ||
| 1007 | extern void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter); | ||
| 1008 | 995 | ||
| 1009 | #define MAX_PHYS_SEGMENTS 128 | 996 | #define MAX_PHYS_SEGMENTS 128 |
| 1010 | #define MAX_HW_SEGMENTS 128 | 997 | #define MAX_HW_SEGMENTS 128 |
diff --git a/include/linux/connector.h b/include/linux/connector.h index b9966e64604e..b68d27850d51 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
| @@ -41,8 +41,10 @@ | |||
| 41 | #define CN_IDX_BB 0x5 /* BlackBoard, from the TSP GPL sampling framework */ | 41 | #define CN_IDX_BB 0x5 /* BlackBoard, from the TSP GPL sampling framework */ |
| 42 | #define CN_DST_IDX 0x6 | 42 | #define CN_DST_IDX 0x6 |
| 43 | #define CN_DST_VAL 0x1 | 43 | #define CN_DST_VAL 0x1 |
| 44 | #define CN_IDX_DM 0x7 /* Device Mapper */ | ||
| 45 | #define CN_VAL_DM_USERSPACE_LOG 0x1 | ||
| 44 | 46 | ||
| 45 | #define CN_NETLINK_USERS 7 | 47 | #define CN_NETLINK_USERS 8 |
| 46 | 48 | ||
| 47 | /* | 49 | /* |
| 48 | * Maximum connector's message size. | 50 | * Maximum connector's message size. |
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 49c2362977fd..0d6310657f32 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #include <linux/bio.h> | 11 | #include <linux/bio.h> |
| 12 | #include <linux/blkdev.h> | 12 | #include <linux/blkdev.h> |
| 13 | 13 | ||
| 14 | struct dm_dev; | ||
| 14 | struct dm_target; | 15 | struct dm_target; |
| 15 | struct dm_table; | 16 | struct dm_table; |
| 16 | struct mapped_device; | 17 | struct mapped_device; |
| @@ -21,6 +22,7 @@ typedef enum { STATUSTYPE_INFO, STATUSTYPE_TABLE } status_type_t; | |||
| 21 | union map_info { | 22 | union map_info { |
| 22 | void *ptr; | 23 | void *ptr; |
| 23 | unsigned long long ll; | 24 | unsigned long long ll; |
| 25 | unsigned flush_request; | ||
| 24 | }; | 26 | }; |
| 25 | 27 | ||
| 26 | /* | 28 | /* |
| @@ -80,6 +82,15 @@ typedef int (*dm_ioctl_fn) (struct dm_target *ti, unsigned int cmd, | |||
| 80 | typedef int (*dm_merge_fn) (struct dm_target *ti, struct bvec_merge_data *bvm, | 82 | typedef int (*dm_merge_fn) (struct dm_target *ti, struct bvec_merge_data *bvm, |
| 81 | struct bio_vec *biovec, int max_size); | 83 | struct bio_vec *biovec, int max_size); |
| 82 | 84 | ||
| 85 | typedef int (*iterate_devices_callout_fn) (struct dm_target *ti, | ||
| 86 | struct dm_dev *dev, | ||
| 87 | sector_t physical_start, | ||
| 88 | void *data); | ||
| 89 | |||
| 90 | typedef int (*dm_iterate_devices_fn) (struct dm_target *ti, | ||
| 91 | iterate_devices_callout_fn fn, | ||
| 92 | void *data); | ||
| 93 | |||
| 83 | /* | 94 | /* |
| 84 | * Returns: | 95 | * Returns: |
| 85 | * 0: The target can handle the next I/O immediately. | 96 | * 0: The target can handle the next I/O immediately. |
| @@ -92,7 +103,8 @@ void dm_error(const char *message); | |||
| 92 | /* | 103 | /* |
| 93 | * Combine device limits. | 104 | * Combine device limits. |
| 94 | */ | 105 | */ |
| 95 | void dm_set_device_limits(struct dm_target *ti, struct block_device *bdev); | 106 | int dm_set_device_limits(struct dm_target *ti, struct dm_dev *dev, |
| 107 | sector_t start, void *data); | ||
| 96 | 108 | ||
| 97 | struct dm_dev { | 109 | struct dm_dev { |
| 98 | struct block_device *bdev; | 110 | struct block_device *bdev; |
| @@ -138,23 +150,12 @@ struct target_type { | |||
| 138 | dm_ioctl_fn ioctl; | 150 | dm_ioctl_fn ioctl; |
| 139 | dm_merge_fn merge; | 151 | dm_merge_fn merge; |
| 140 | dm_busy_fn busy; | 152 | dm_busy_fn busy; |
| 153 | dm_iterate_devices_fn iterate_devices; | ||
| 141 | 154 | ||
| 142 | /* For internal device-mapper use. */ | 155 | /* For internal device-mapper use. */ |
| 143 | struct list_head list; | 156 | struct list_head list; |
| 144 | }; | 157 | }; |
| 145 | 158 | ||
| 146 | struct io_restrictions { | ||
| 147 | unsigned long bounce_pfn; | ||
| 148 | unsigned long seg_boundary_mask; | ||
| 149 | unsigned max_hw_sectors; | ||
| 150 | unsigned max_sectors; | ||
| 151 | unsigned max_segment_size; | ||
| 152 | unsigned short logical_block_size; | ||
| 153 | unsigned short max_hw_segments; | ||
| 154 | unsigned short max_phys_segments; | ||
| 155 | unsigned char no_cluster; /* inverted so that 0 is default */ | ||
| 156 | }; | ||
| 157 | |||
| 158 | struct dm_target { | 159 | struct dm_target { |
| 159 | struct dm_table *table; | 160 | struct dm_table *table; |
| 160 | struct target_type *type; | 161 | struct target_type *type; |
| @@ -163,15 +164,18 @@ struct dm_target { | |||
| 163 | sector_t begin; | 164 | sector_t begin; |
| 164 | sector_t len; | 165 | sector_t len; |
| 165 | 166 | ||
| 166 | /* FIXME: turn this into a mask, and merge with io_restrictions */ | ||
| 167 | /* Always a power of 2 */ | 167 | /* Always a power of 2 */ |
| 168 | sector_t split_io; | 168 | sector_t split_io; |
| 169 | 169 | ||
| 170 | /* | 170 | /* |
| 171 | * These are automatically filled in by | 171 | * A number of zero-length barrier requests that will be submitted |
| 172 | * dm_table_get_device. | 172 | * to the target for the purpose of flushing cache. |
| 173 | * | ||
| 174 | * The request number will be placed in union map_info->flush_request. | ||
| 175 | * It is a responsibility of the target driver to remap these requests | ||
| 176 | * to the real underlying devices. | ||
| 173 | */ | 177 | */ |
| 174 | struct io_restrictions limits; | 178 | unsigned num_flush_requests; |
| 175 | 179 | ||
| 176 | /* target specific data */ | 180 | /* target specific data */ |
| 177 | void *private; | 181 | void *private; |
| @@ -230,6 +234,7 @@ struct gendisk *dm_disk(struct mapped_device *md); | |||
| 230 | int dm_suspended(struct mapped_device *md); | 234 | int dm_suspended(struct mapped_device *md); |
| 231 | int dm_noflush_suspending(struct dm_target *ti); | 235 | int dm_noflush_suspending(struct dm_target *ti); |
| 232 | union map_info *dm_get_mapinfo(struct bio *bio); | 236 | union map_info *dm_get_mapinfo(struct bio *bio); |
| 237 | union map_info *dm_get_rq_mapinfo(struct request *rq); | ||
| 233 | 238 | ||
| 234 | /* | 239 | /* |
| 235 | * Geometry functions. | 240 | * Geometry functions. |
| @@ -392,4 +397,12 @@ static inline unsigned long to_bytes(sector_t n) | |||
| 392 | return (n << SECTOR_SHIFT); | 397 | return (n << SECTOR_SHIFT); |
| 393 | } | 398 | } |
| 394 | 399 | ||
| 400 | /*----------------------------------------------------------------- | ||
| 401 | * Helper for block layer and dm core operations | ||
| 402 | *---------------------------------------------------------------*/ | ||
| 403 | void dm_dispatch_request(struct request *rq); | ||
| 404 | void dm_requeue_unmapped_request(struct request *rq); | ||
| 405 | void dm_kill_unmapped_request(struct request *rq, int error); | ||
| 406 | int dm_underlying_device_busy(struct request_queue *q); | ||
| 407 | |||
| 395 | #endif /* _LINUX_DEVICE_MAPPER_H */ | 408 | #endif /* _LINUX_DEVICE_MAPPER_H */ |
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h index 48e44ee2b466..2ab84c83c31a 100644 --- a/include/linux/dm-ioctl.h +++ b/include/linux/dm-ioctl.h | |||
| @@ -123,6 +123,16 @@ struct dm_ioctl { | |||
| 123 | __u32 target_count; /* in/out */ | 123 | __u32 target_count; /* in/out */ |
| 124 | __s32 open_count; /* out */ | 124 | __s32 open_count; /* out */ |
| 125 | __u32 flags; /* in/out */ | 125 | __u32 flags; /* in/out */ |
| 126 | |||
| 127 | /* | ||
| 128 | * event_nr holds either the event number (input and output) or the | ||
| 129 | * udev cookie value (input only). | ||
| 130 | * The DM_DEV_WAIT ioctl takes an event number as input. | ||
| 131 | * The DM_SUSPEND, DM_DEV_REMOVE and DM_DEV_RENAME ioctls | ||
| 132 | * use the field as a cookie to return in the DM_COOKIE | ||
| 133 | * variable with the uevents they issue. | ||
| 134 | * For output, the ioctls return the event number, not the cookie. | ||
| 135 | */ | ||
| 126 | __u32 event_nr; /* in/out */ | 136 | __u32 event_nr; /* in/out */ |
| 127 | __u32 padding; | 137 | __u32 padding; |
| 128 | 138 | ||
| @@ -256,9 +266,9 @@ enum { | |||
| 256 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) | 266 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
| 257 | 267 | ||
| 258 | #define DM_VERSION_MAJOR 4 | 268 | #define DM_VERSION_MAJOR 4 |
| 259 | #define DM_VERSION_MINOR 14 | 269 | #define DM_VERSION_MINOR 15 |
| 260 | #define DM_VERSION_PATCHLEVEL 0 | 270 | #define DM_VERSION_PATCHLEVEL 0 |
| 261 | #define DM_VERSION_EXTRA "-ioctl (2008-04-23)" | 271 | #define DM_VERSION_EXTRA "-ioctl (2009-04-01)" |
| 262 | 272 | ||
| 263 | /* Status bits */ | 273 | /* Status bits */ |
| 264 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ | 274 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
diff --git a/include/linux/dm-log-userspace.h b/include/linux/dm-log-userspace.h new file mode 100644 index 000000000000..642e3017b51f --- /dev/null +++ b/include/linux/dm-log-userspace.h | |||
| @@ -0,0 +1,386 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2006-2009 Red Hat, Inc. | ||
| 3 | * | ||
| 4 | * This file is released under the LGPL. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #ifndef __DM_LOG_USERSPACE_H__ | ||
| 8 | #define __DM_LOG_USERSPACE_H__ | ||
| 9 | |||
| 10 | #include <linux/dm-ioctl.h> /* For DM_UUID_LEN */ | ||
| 11 | |||
| 12 | /* | ||
| 13 | * The device-mapper userspace log module consists of a kernel component and | ||
| 14 | * a user-space component. The kernel component implements the API defined | ||
| 15 | * in dm-dirty-log.h. Its purpose is simply to pass the parameters and | ||
| 16 | * return values of those API functions between kernel and user-space. | ||
| 17 | * | ||
| 18 | * Below are defined the 'request_types' - DM_ULOG_CTR, DM_ULOG_DTR, etc. | ||
| 19 | * These request types represent the different functions in the device-mapper | ||
| 20 | * dirty log API. Each of these is described in more detail below. | ||
| 21 | * | ||
| 22 | * The user-space program must listen for requests from the kernel (representing | ||
| 23 | * the various API functions) and process them. | ||
| 24 | * | ||
| 25 | * User-space begins by setting up the communication link (error checking | ||
| 26 | * removed for clarity): | ||
| 27 | * fd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR); | ||
| 28 | * addr.nl_family = AF_NETLINK; | ||
| 29 | * addr.nl_groups = CN_IDX_DM; | ||
| 30 | * addr.nl_pid = 0; | ||
| 31 | * r = bind(fd, (struct sockaddr *) &addr, sizeof(addr)); | ||
| 32 | * opt = addr.nl_groups; | ||
| 33 | * setsockopt(fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, &opt, sizeof(opt)); | ||
| 34 | * | ||
| 35 | * User-space will then wait to receive requests form the kernel, which it | ||
| 36 | * will process as described below. The requests are received in the form, | ||
| 37 | * ((struct dm_ulog_request) + (additional data)). Depending on the request | ||
| 38 | * type, there may or may not be 'additional data'. In the descriptions below, | ||
| 39 | * you will see 'Payload-to-userspace' and 'Payload-to-kernel'. The | ||
| 40 | * 'Payload-to-userspace' is what the kernel sends in 'additional data' as | ||
| 41 | * necessary parameters to complete the request. The 'Payload-to-kernel' is | ||
| 42 | * the 'additional data' returned to the kernel that contains the necessary | ||
| 43 | * results of the request. The 'data_size' field in the dm_ulog_request | ||
| 44 | * structure denotes the availability and amount of payload data. | ||
| 45 | */ | ||
| 46 | |||
| 47 | /* | ||
| 48 | * DM_ULOG_CTR corresponds to (found in dm-dirty-log.h): | ||
| 49 | * int (*ctr)(struct dm_dirty_log *log, struct dm_target *ti, | ||
| 50 | * unsigned argc, char **argv); | ||
| 51 | * | ||
| 52 | * Payload-to-userspace: | ||
| 53 | * A single string containing all the argv arguments separated by ' 's | ||
| 54 | * Payload-to-kernel: | ||
| 55 | * None. ('data_size' in the dm_ulog_request struct should be 0.) | ||
| 56 | * | ||
| 57 | * The UUID contained in the dm_ulog_request structure is the reference that | ||
| 58 | * will be used by all request types to a specific log. The constructor must | ||
| 59 | * record this assotiation with instance created. | ||
| 60 | * | ||
| 61 | * When the request has been processed, user-space must return the | ||
| 62 | * dm_ulog_request to the kernel - setting the 'error' field and | ||
| 63 | * 'data_size' appropriately. | ||
| 64 | */ | ||
| 65 | #define DM_ULOG_CTR 1 | ||
| 66 | |||
| 67 | /* | ||
| 68 | * DM_ULOG_DTR corresponds to (found in dm-dirty-log.h): | ||
| 69 | * void (*dtr)(struct dm_dirty_log *log); | ||
| 70 | * | ||
| 71 | * Payload-to-userspace: | ||
| 72 | * A single string containing all the argv arguments separated by ' 's | ||
| 73 | * Payload-to-kernel: | ||
| 74 | * None. ('data_size' in the dm_ulog_request struct should be 0.) | ||
| 75 | * | ||
| 76 | * The UUID contained in the dm_ulog_request structure is all that is | ||
| 77 | * necessary to identify the log instance being destroyed. There is no | ||
| 78 | * payload data. | ||
| 79 | * | ||
| 80 | * When the request has been processed, user-space must return the | ||
| 81 | * dm_ulog_request to the kernel - setting the 'error' field and clearing | ||
| 82 | * 'data_size' appropriately. | ||
| 83 | */ | ||
| 84 | #define DM_ULOG_DTR 2 | ||
| 85 | |||
| 86 | /* | ||
| 87 | * DM_ULOG_PRESUSPEND corresponds to (found in dm-dirty-log.h): | ||
| 88 | * int (*presuspend)(struct dm_dirty_log *log); | ||
| 89 | * | ||
| 90 | * Payload-to-userspace: | ||
| 91 | * None. | ||
| 92 | * Payload-to-kernel: | ||
| 93 | * None. | ||
| 94 | * | ||
| 95 | * The UUID contained in the dm_ulog_request structure is all that is | ||
| 96 | * necessary to identify the log instance being presuspended. There is no | ||
| 97 | * payload data. | ||
| 98 | * | ||
| 99 | * When the request has been processed, user-space must return the | ||
| 100 | * dm_ulog_request to the kernel - setting the 'error' field and | ||
| 101 | * 'data_size' appropriately. | ||
| 102 | */ | ||
| 103 | #define DM_ULOG_PRESUSPEND 3 | ||
| 104 | |||
| 105 | /* | ||
| 106 | * DM_ULOG_POSTSUSPEND corresponds to (found in dm-dirty-log.h): | ||
| 107 | * int (*postsuspend)(struct dm_dirty_log *log); | ||
| 108 | * | ||
| 109 | * Payload-to-userspace: | ||
| 110 | * None. | ||
| 111 | * Payload-to-kernel: | ||
| 112 | * None. | ||
| 113 | * | ||
| 114 | * The UUID contained in the dm_ulog_request structure is all that is | ||
| 115 | * necessary to identify the log instance being postsuspended. There is no | ||
| 116 | * payload data. | ||
| 117 | * | ||
| 118 | * When the request has been processed, user-space must return the | ||
| 119 | * dm_ulog_request to the kernel - setting the 'error' field and | ||
| 120 | * 'data_size' appropriately. | ||
| 121 | */ | ||
| 122 | #define DM_ULOG_POSTSUSPEND 4 | ||
| 123 | |||
| 124 | /* | ||
| 125 | * DM_ULOG_RESUME corresponds to (found in dm-dirty-log.h): | ||
| 126 | * int (*resume)(struct dm_dirty_log *log); | ||
| 127 | * | ||
| 128 | * Payload-to-userspace: | ||
| 129 | * None. | ||
| 130 | * Payload-to-kernel: | ||
| 131 | * None. | ||
| 132 | * | ||
| 133 | * The UUID contained in the dm_ulog_request structure is all that is | ||
| 134 | * necessary to identify the log instance being resumed. There is no | ||
| 135 | * payload data. | ||
| 136 | * | ||
| 137 | * When the request has been processed, user-space must return the | ||
| 138 | * dm_ulog_request to the kernel - setting the 'error' field and | ||
| 139 | * 'data_size' appropriately. | ||
| 140 | */ | ||
| 141 | #define DM_ULOG_RESUME 5 | ||
| 142 | |||
| 143 | /* | ||
| 144 | * DM_ULOG_GET_REGION_SIZE corresponds to (found in dm-dirty-log.h): | ||
| 145 | * uint32_t (*get_region_size)(struct dm_dirty_log *log); | ||
| 146 | * | ||
| 147 | * Payload-to-userspace: | ||
| 148 | * None. | ||
| 149 | * Payload-to-kernel: | ||
| 150 | * uint64_t - contains the region size | ||
| 151 | * | ||
| 152 | * The region size is something that was determined at constructor time. | ||
| 153 | * It is returned in the payload area and 'data_size' is set to | ||
| 154 | * reflect this. | ||
| 155 | * | ||
| 156 | * When the request has been processed, user-space must return the | ||
| 157 | * dm_ulog_request to the kernel - setting the 'error' field appropriately. | ||
| 158 | */ | ||
| 159 | #define DM_ULOG_GET_REGION_SIZE 6 | ||
| 160 | |||
| 161 | /* | ||
| 162 | * DM_ULOG_IS_CLEAN corresponds to (found in dm-dirty-log.h): | ||
| 163 | * int (*is_clean)(struct dm_dirty_log *log, region_t region); | ||
| 164 | * | ||
| 165 | * Payload-to-userspace: | ||
| 166 | * uint64_t - the region to get clean status on | ||
| 167 | * Payload-to-kernel: | ||
| 168 | * int64_t - 1 if clean, 0 otherwise | ||
| 169 | * | ||
| 170 | * Payload is sizeof(uint64_t) and contains the region for which the clean | ||
| 171 | * status is being made. | ||
| 172 | * | ||
| 173 | * When the request has been processed, user-space must return the | ||
| 174 | * dm_ulog_request to the kernel - filling the payload with 0 (not clean) or | ||
| 175 | * 1 (clean), setting 'data_size' and 'error' appropriately. | ||
| 176 | */ | ||
| 177 | #define DM_ULOG_IS_CLEAN 7 | ||
| 178 | |||
| 179 | /* | ||
| 180 | * DM_ULOG_IN_SYNC corresponds to (found in dm-dirty-log.h): | ||
| 181 | * int (*in_sync)(struct dm_dirty_log *log, region_t region, | ||
| 182 | * int can_block); | ||
| 183 | * | ||
| 184 | * Payload-to-userspace: | ||
| 185 | * uint64_t - the region to get sync status on | ||
| 186 | * Payload-to-kernel: | ||
| 187 | * int64_t - 1 if in-sync, 0 otherwise | ||
| 188 | * | ||
| 189 | * Exactly the same as 'is_clean' above, except this time asking "has the | ||
| 190 | * region been recovered?" vs. "is the region not being modified?" | ||
| 191 | */ | ||
| 192 | #define DM_ULOG_IN_SYNC 8 | ||
| 193 | |||
| 194 | /* | ||
| 195 | * DM_ULOG_FLUSH corresponds to (found in dm-dirty-log.h): | ||
| 196 | * int (*flush)(struct dm_dirty_log *log); | ||
| 197 | * | ||
| 198 | * Payload-to-userspace: | ||
| 199 | * None. | ||
| 200 | * Payload-to-kernel: | ||
| 201 | * None. | ||
| 202 | * | ||
| 203 | * No incoming or outgoing payload. Simply flush log state to disk. | ||
| 204 | * | ||
| 205 | * When the request has been processed, user-space must return the | ||
| 206 | * dm_ulog_request to the kernel - setting the 'error' field and clearing | ||
| 207 | * 'data_size' appropriately. | ||
| 208 | */ | ||
| 209 | #define DM_ULOG_FLUSH 9 | ||
| 210 | |||
| 211 | /* | ||
| 212 | * DM_ULOG_MARK_REGION corresponds to (found in dm-dirty-log.h): | ||
| 213 | * void (*mark_region)(struct dm_dirty_log *log, region_t region); | ||
| 214 | * | ||
| 215 | * Payload-to-userspace: | ||
| 216 | * uint64_t [] - region(s) to mark | ||
| 217 | * Payload-to-kernel: | ||
| 218 | * None. | ||
| 219 | * | ||
| 220 | * Incoming payload contains the one or more regions to mark dirty. | ||
| 221 | * The number of regions contained in the payload can be determined from | ||
| 222 | * 'data_size/sizeof(uint64_t)'. | ||
| 223 | * | ||
| 224 | * When the request has been processed, user-space must return the | ||
| 225 | * dm_ulog_request to the kernel - setting the 'error' field and clearing | ||
| 226 | * 'data_size' appropriately. | ||
| 227 | */ | ||
| 228 | #define DM_ULOG_MARK_REGION 10 | ||
| 229 | |||
| 230 | /* | ||
| 231 | * DM_ULOG_CLEAR_REGION corresponds to (found in dm-dirty-log.h): | ||
| 232 | * void (*clear_region)(struct dm_dirty_log *log, region_t region); | ||
| 233 | * | ||
| 234 | * Payload-to-userspace: | ||
| 235 | * uint64_t [] - region(s) to clear | ||
| 236 | * Payload-to-kernel: | ||
| 237 | * None. | ||
| 238 | * | ||
| 239 | * Incoming payload contains the one or more regions to mark clean. | ||
| 240 | * The number of regions contained in the payload can be determined from | ||
| 241 | * 'data_size/sizeof(uint64_t)'. | ||
| 242 | * | ||
| 243 | * When the request has been processed, user-space must return the | ||
| 244 | * dm_ulog_request to the kernel - setting the 'error' field and clearing | ||
| 245 | * 'data_size' appropriately. | ||
| 246 | */ | ||
| 247 | #define DM_ULOG_CLEAR_REGION 11 | ||
| 248 | |||
| 249 | /* | ||
| 250 | * DM_ULOG_GET_RESYNC_WORK corresponds to (found in dm-dirty-log.h): | ||
| 251 | * int (*get_resync_work)(struct dm_dirty_log *log, region_t *region); | ||
| 252 | * | ||
| 253 | * Payload-to-userspace: | ||
| 254 | * None. | ||
| 255 | * Payload-to-kernel: | ||
| 256 | * { | ||
| 257 | * int64_t i; -- 1 if recovery necessary, 0 otherwise | ||
| 258 | * uint64_t r; -- The region to recover if i=1 | ||
| 259 | * } | ||
| 260 | * 'data_size' should be set appropriately. | ||
| 261 | * | ||
| 262 | * When the request has been processed, user-space must return the | ||
| 263 | * dm_ulog_request to the kernel - setting the 'error' field appropriately. | ||
| 264 | */ | ||
| 265 | #define DM_ULOG_GET_RESYNC_WORK 12 | ||
| 266 | |||
| 267 | /* | ||
| 268 | * DM_ULOG_SET_REGION_SYNC corresponds to (found in dm-dirty-log.h): | ||
| 269 | * void (*set_region_sync)(struct dm_dirty_log *log, | ||
| 270 | * region_t region, int in_sync); | ||
| 271 | * | ||
| 272 | * Payload-to-userspace: | ||
| 273 | * { | ||
| 274 | * uint64_t - region to set sync state on | ||
| 275 | * int64_t - 0 if not-in-sync, 1 if in-sync | ||
| 276 | * } | ||
| 277 | * Payload-to-kernel: | ||
| 278 | * None. | ||
| 279 | * | ||
| 280 | * When the request has been processed, user-space must return the | ||
| 281 | * dm_ulog_request to the kernel - setting the 'error' field and clearing | ||
| 282 | * 'data_size' appropriately. | ||
| 283 | */ | ||
| 284 | #define DM_ULOG_SET_REGION_SYNC 13 | ||
| 285 | |||
| 286 | /* | ||
| 287 | * DM_ULOG_GET_SYNC_COUNT corresponds to (found in dm-dirty-log.h): | ||
| 288 | * region_t (*get_sync_count)(struct dm_dirty_log *log); | ||
| 289 | * | ||
| 290 | * Payload-to-userspace: | ||
| 291 | * None. | ||
| 292 | * Payload-to-kernel: | ||
| 293 | * uint64_t - the number of in-sync regions | ||
| 294 | * | ||
| 295 | * No incoming payload. Kernel-bound payload contains the number of | ||
| 296 | * regions that are in-sync (in a size_t). | ||
| 297 | * | ||
| 298 | * When the request has been processed, user-space must return the | ||
| 299 | * dm_ulog_request to the kernel - setting the 'error' field and | ||
| 300 | * 'data_size' appropriately. | ||
| 301 | */ | ||
| 302 | #define DM_ULOG_GET_SYNC_COUNT 14 | ||
| 303 | |||
| 304 | /* | ||
| 305 | * DM_ULOG_STATUS_INFO corresponds to (found in dm-dirty-log.h): | ||
| 306 | * int (*status)(struct dm_dirty_log *log, STATUSTYPE_INFO, | ||
| 307 | * char *result, unsigned maxlen); | ||
| 308 | * | ||
| 309 | * Payload-to-userspace: | ||
| 310 | * None. | ||
| 311 | * Payload-to-kernel: | ||
| 312 | * Character string containing STATUSTYPE_INFO | ||
| 313 | * | ||
| 314 | * When the request has been processed, user-space must return the | ||
| 315 | * dm_ulog_request to the kernel - setting the 'error' field and | ||
| 316 | * 'data_size' appropriately. | ||
| 317 | */ | ||
| 318 | #define DM_ULOG_STATUS_INFO 15 | ||
| 319 | |||
| 320 | /* | ||
| 321 | * DM_ULOG_STATUS_TABLE corresponds to (found in dm-dirty-log.h): | ||
| 322 | * int (*status)(struct dm_dirty_log *log, STATUSTYPE_TABLE, | ||
| 323 | * char *result, unsigned maxlen); | ||
| 324 | * | ||
| 325 | * Payload-to-userspace: | ||
| 326 | * None. | ||
| 327 | * Payload-to-kernel: | ||
| 328 | * Character string containing STATUSTYPE_TABLE | ||
| 329 | * | ||
| 330 | * When the request has been processed, user-space must return the | ||
| 331 | * dm_ulog_request to the kernel - setting the 'error' field and | ||
| 332 | * 'data_size' appropriately. | ||
| 333 | */ | ||
| 334 | #define DM_ULOG_STATUS_TABLE 16 | ||
| 335 | |||
| 336 | /* | ||
| 337 | * DM_ULOG_IS_REMOTE_RECOVERING corresponds to (found in dm-dirty-log.h): | ||
| 338 | * int (*is_remote_recovering)(struct dm_dirty_log *log, region_t region); | ||
| 339 | * | ||
| 340 | * Payload-to-userspace: | ||
| 341 | * uint64_t - region to determine recovery status on | ||
| 342 | * Payload-to-kernel: | ||
| 343 | * { | ||
| 344 | * int64_t is_recovering; -- 0 if no, 1 if yes | ||
| 345 | * uint64_t in_sync_hint; -- lowest region still needing resync | ||
| 346 | * } | ||
| 347 | * | ||
| 348 | * When the request has been processed, user-space must return the | ||
| 349 | * dm_ulog_request to the kernel - setting the 'error' field and | ||
| 350 | * 'data_size' appropriately. | ||
| 351 | */ | ||
| 352 | #define DM_ULOG_IS_REMOTE_RECOVERING 17 | ||
| 353 | |||
| 354 | /* | ||
| 355 | * (DM_ULOG_REQUEST_MASK & request_type) to get the request type | ||
| 356 | * | ||
| 357 | * Payload-to-userspace: | ||
| 358 | * A single string containing all the argv arguments separated by ' 's | ||
| 359 | * Payload-to-kernel: | ||
| 360 | * None. ('data_size' in the dm_ulog_request struct should be 0.) | ||
| 361 | * | ||
| 362 | * We are reserving 8 bits of the 32-bit 'request_type' field for the | ||
| 363 | * various request types above. The remaining 24-bits are currently | ||
| 364 | * set to zero and are reserved for future use and compatibility concerns. | ||
| 365 | * | ||
| 366 | * User-space should always use DM_ULOG_REQUEST_TYPE to aquire the | ||
| 367 | * request type from the 'request_type' field to maintain forward compatibility. | ||
| 368 | */ | ||
| 369 | #define DM_ULOG_REQUEST_MASK 0xFF | ||
| 370 | #define DM_ULOG_REQUEST_TYPE(request_type) \ | ||
| 371 | (DM_ULOG_REQUEST_MASK & (request_type)) | ||
| 372 | |||
| 373 | struct dm_ulog_request { | ||
| 374 | char uuid[DM_UUID_LEN]; /* Ties a request to a specific mirror log */ | ||
| 375 | char padding[7]; /* Padding because DM_UUID_LEN = 129 */ | ||
| 376 | |||
| 377 | int32_t error; /* Used to report back processing errors */ | ||
| 378 | |||
| 379 | uint32_t seq; /* Sequence number for request */ | ||
| 380 | uint32_t request_type; /* DM_ULOG_* defined above */ | ||
| 381 | uint32_t data_size; /* How much data (not including this struct) */ | ||
| 382 | |||
| 383 | char data[0]; | ||
| 384 | }; | ||
| 385 | |||
| 386 | #endif /* __DM_LOG_USERSPACE_H__ */ | ||
diff --git a/include/linux/dmar.h b/include/linux/dmar.h index 1731fb5fd775..4a2b162c256a 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h | |||
| @@ -126,6 +126,8 @@ extern int free_irte(int irq); | |||
| 126 | extern int irq_remapped(int irq); | 126 | extern int irq_remapped(int irq); |
| 127 | extern struct intel_iommu *map_dev_to_ir(struct pci_dev *dev); | 127 | extern struct intel_iommu *map_dev_to_ir(struct pci_dev *dev); |
| 128 | extern struct intel_iommu *map_ioapic_to_ir(int apic); | 128 | extern struct intel_iommu *map_ioapic_to_ir(int apic); |
| 129 | extern int set_ioapic_sid(struct irte *irte, int apic); | ||
| 130 | extern int set_msi_sid(struct irte *irte, struct pci_dev *dev); | ||
| 129 | #else | 131 | #else |
| 130 | static inline int alloc_irte(struct intel_iommu *iommu, int irq, u16 count) | 132 | static inline int alloc_irte(struct intel_iommu *iommu, int irq, u16 count) |
| 131 | { | 133 | { |
| @@ -156,6 +158,15 @@ static inline struct intel_iommu *map_ioapic_to_ir(int apic) | |||
| 156 | { | 158 | { |
| 157 | return NULL; | 159 | return NULL; |
| 158 | } | 160 | } |
| 161 | static inline int set_ioapic_sid(struct irte *irte, int apic) | ||
| 162 | { | ||
| 163 | return 0; | ||
| 164 | } | ||
| 165 | static inline int set_msi_sid(struct irte *irte, struct pci_dev *dev) | ||
| 166 | { | ||
| 167 | return 0; | ||
| 168 | } | ||
| 169 | |||
| 159 | #define irq_remapped(irq) (0) | 170 | #define irq_remapped(irq) (0) |
| 160 | #define enable_intr_remapping(mode) (-1) | 171 | #define enable_intr_remapping(mode) (-1) |
| 161 | #define disable_intr_remapping() (0) | 172 | #define disable_intr_remapping() (0) |
diff --git a/include/linux/eventfd.h b/include/linux/eventfd.h index f45a8ae5f828..3b85ba6479f4 100644 --- a/include/linux/eventfd.h +++ b/include/linux/eventfd.h | |||
| @@ -8,10 +8,8 @@ | |||
| 8 | #ifndef _LINUX_EVENTFD_H | 8 | #ifndef _LINUX_EVENTFD_H |
| 9 | #define _LINUX_EVENTFD_H | 9 | #define _LINUX_EVENTFD_H |
| 10 | 10 | ||
| 11 | #ifdef CONFIG_EVENTFD | ||
| 12 | |||
| 13 | /* For O_CLOEXEC and O_NONBLOCK */ | ||
| 14 | #include <linux/fcntl.h> | 11 | #include <linux/fcntl.h> |
| 12 | #include <linux/file.h> | ||
| 15 | 13 | ||
| 16 | /* | 14 | /* |
| 17 | * CAREFUL: Check include/asm-generic/fcntl.h when defining | 15 | * CAREFUL: Check include/asm-generic/fcntl.h when defining |
| @@ -27,16 +25,37 @@ | |||
| 27 | #define EFD_SHARED_FCNTL_FLAGS (O_CLOEXEC | O_NONBLOCK) | 25 | #define EFD_SHARED_FCNTL_FLAGS (O_CLOEXEC | O_NONBLOCK) |
| 28 | #define EFD_FLAGS_SET (EFD_SHARED_FCNTL_FLAGS | EFD_SEMAPHORE) | 26 | #define EFD_FLAGS_SET (EFD_SHARED_FCNTL_FLAGS | EFD_SEMAPHORE) |
| 29 | 27 | ||
| 28 | #ifdef CONFIG_EVENTFD | ||
| 29 | |||
| 30 | struct eventfd_ctx *eventfd_ctx_get(struct eventfd_ctx *ctx); | ||
| 31 | void eventfd_ctx_put(struct eventfd_ctx *ctx); | ||
| 30 | struct file *eventfd_fget(int fd); | 32 | struct file *eventfd_fget(int fd); |
| 31 | int eventfd_signal(struct file *file, int n); | 33 | struct eventfd_ctx *eventfd_ctx_fdget(int fd); |
| 34 | struct eventfd_ctx *eventfd_ctx_fileget(struct file *file); | ||
| 35 | int eventfd_signal(struct eventfd_ctx *ctx, int n); | ||
| 32 | 36 | ||
| 33 | #else /* CONFIG_EVENTFD */ | 37 | #else /* CONFIG_EVENTFD */ |
| 34 | 38 | ||
| 35 | #define eventfd_fget(fd) ERR_PTR(-ENOSYS) | 39 | /* |
| 36 | static inline int eventfd_signal(struct file *file, int n) | 40 | * Ugly ugly ugly error layer to support modules that uses eventfd but |
| 37 | { return 0; } | 41 | * pretend to work in !CONFIG_EVENTFD configurations. Namely, AIO. |
| 42 | */ | ||
| 43 | static inline struct eventfd_ctx *eventfd_ctx_fdget(int fd) | ||
| 44 | { | ||
| 45 | return ERR_PTR(-ENOSYS); | ||
| 46 | } | ||
| 47 | |||
| 48 | static inline int eventfd_signal(struct eventfd_ctx *ctx, int n) | ||
| 49 | { | ||
| 50 | return -ENOSYS; | ||
| 51 | } | ||
| 52 | |||
| 53 | static inline void eventfd_ctx_put(struct eventfd_ctx *ctx) | ||
| 54 | { | ||
| 55 | |||
| 56 | } | ||
| 38 | 57 | ||
| 39 | #endif /* CONFIG_EVENTFD */ | 58 | #endif |
| 40 | 59 | ||
| 41 | #endif /* _LINUX_EVENTFD_H */ | 60 | #endif /* _LINUX_EVENTFD_H */ |
| 42 | 61 | ||
diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h index 7894dd0f3b77..ca1bfe90004f 100644 --- a/include/linux/ext3_fs_i.h +++ b/include/linux/ext3_fs_i.h | |||
| @@ -103,10 +103,6 @@ struct ext3_inode_info { | |||
| 103 | */ | 103 | */ |
| 104 | struct rw_semaphore xattr_sem; | 104 | struct rw_semaphore xattr_sem; |
| 105 | #endif | 105 | #endif |
| 106 | #ifdef CONFIG_EXT3_FS_POSIX_ACL | ||
| 107 | struct posix_acl *i_acl; | ||
| 108 | struct posix_acl *i_default_acl; | ||
| 109 | #endif | ||
| 110 | 106 | ||
| 111 | struct list_head i_orphan; /* unlinked but open inodes */ | 107 | struct list_head i_orphan; /* unlinked but open inodes */ |
| 112 | 108 | ||
diff --git a/include/linux/falloc.h b/include/linux/falloc.h index 8e912ab6a072..3c155107d61f 100644 --- a/include/linux/falloc.h +++ b/include/linux/falloc.h | |||
| @@ -3,4 +3,25 @@ | |||
| 3 | 3 | ||
| 4 | #define FALLOC_FL_KEEP_SIZE 0x01 /* default is extend size */ | 4 | #define FALLOC_FL_KEEP_SIZE 0x01 /* default is extend size */ |
| 5 | 5 | ||
| 6 | #ifdef __KERNEL__ | ||
| 7 | |||
| 8 | /* | ||
| 9 | * Space reservation ioctls and argument structure | ||
| 10 | * are designed to be compatible with the legacy XFS ioctls. | ||
| 11 | */ | ||
| 12 | struct space_resv { | ||
| 13 | __s16 l_type; | ||
| 14 | __s16 l_whence; | ||
| 15 | __s64 l_start; | ||
| 16 | __s64 l_len; /* len == 0 means until end of file */ | ||
| 17 | __s32 l_sysid; | ||
| 18 | __u32 l_pid; | ||
| 19 | __s32 l_pad[4]; /* reserved area */ | ||
| 20 | }; | ||
| 21 | |||
| 22 | #define FS_IOC_RESVSP _IOW('X', 40, struct space_resv) | ||
| 23 | #define FS_IOC_RESVSP64 _IOW('X', 42, struct space_resv) | ||
| 24 | |||
| 25 | #endif /* __KERNEL__ */ | ||
| 26 | |||
| 6 | #endif /* _FALLOC_H_ */ | 27 | #endif /* _FALLOC_H_ */ |
diff --git a/include/linux/fb.h b/include/linux/fb.h index dd68358996b7..f847df9e99b6 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
| @@ -819,6 +819,7 @@ struct fb_info { | |||
| 819 | int node; | 819 | int node; |
| 820 | int flags; | 820 | int flags; |
| 821 | struct mutex lock; /* Lock for open/release/ioctl funcs */ | 821 | struct mutex lock; /* Lock for open/release/ioctl funcs */ |
| 822 | struct mutex mm_lock; /* Lock for fb_mmap and smem_* fields */ | ||
| 822 | struct fb_var_screeninfo var; /* Current var */ | 823 | struct fb_var_screeninfo var; /* Current var */ |
| 823 | struct fb_fix_screeninfo fix; /* Current fix */ | 824 | struct fb_fix_screeninfo fix; /* Current fix */ |
| 824 | struct fb_monspecs monspecs; /* Current Monitor specs */ | 825 | struct fb_monspecs monspecs; /* Current Monitor specs */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 1ff5e4e01952..0872372184fe 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -710,6 +710,9 @@ static inline int mapping_writably_mapped(struct address_space *mapping) | |||
| 710 | #define i_size_ordered_init(inode) do { } while (0) | 710 | #define i_size_ordered_init(inode) do { } while (0) |
| 711 | #endif | 711 | #endif |
| 712 | 712 | ||
| 713 | struct posix_acl; | ||
| 714 | #define ACL_NOT_CACHED ((void *)(-1)) | ||
| 715 | |||
| 713 | struct inode { | 716 | struct inode { |
| 714 | struct hlist_node i_hash; | 717 | struct hlist_node i_hash; |
| 715 | struct list_head i_list; | 718 | struct list_head i_list; |
| @@ -773,6 +776,10 @@ struct inode { | |||
| 773 | #ifdef CONFIG_SECURITY | 776 | #ifdef CONFIG_SECURITY |
| 774 | void *i_security; | 777 | void *i_security; |
| 775 | #endif | 778 | #endif |
| 779 | #ifdef CONFIG_FS_POSIX_ACL | ||
| 780 | struct posix_acl *i_acl; | ||
| 781 | struct posix_acl *i_default_acl; | ||
| 782 | #endif | ||
| 776 | void *i_private; /* fs or device private pointer */ | 783 | void *i_private; /* fs or device private pointer */ |
| 777 | }; | 784 | }; |
| 778 | 785 | ||
| @@ -1906,6 +1913,8 @@ static inline int break_lease(struct inode *inode, unsigned int mode) | |||
| 1906 | 1913 | ||
| 1907 | extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, | 1914 | extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, |
| 1908 | struct file *filp); | 1915 | struct file *filp); |
| 1916 | extern int do_fallocate(struct file *file, int mode, loff_t offset, | ||
| 1917 | loff_t len); | ||
| 1909 | extern long do_sys_open(int dfd, const char __user *filename, int flags, | 1918 | extern long do_sys_open(int dfd, const char __user *filename, int flags, |
| 1910 | int mode); | 1919 | int mode); |
| 1911 | extern struct file *filp_open(const char *, int, int); | 1920 | extern struct file *filp_open(const char *, int, int); |
| @@ -1914,6 +1923,10 @@ extern struct file * dentry_open(struct dentry *, struct vfsmount *, int, | |||
| 1914 | extern int filp_close(struct file *, fl_owner_t id); | 1923 | extern int filp_close(struct file *, fl_owner_t id); |
| 1915 | extern char * getname(const char __user *); | 1924 | extern char * getname(const char __user *); |
| 1916 | 1925 | ||
| 1926 | /* fs/ioctl.c */ | ||
| 1927 | |||
| 1928 | extern int ioctl_preallocate(struct file *filp, void __user *argp); | ||
| 1929 | |||
| 1917 | /* fs/dcache.c */ | 1930 | /* fs/dcache.c */ |
| 1918 | extern void __init vfs_caches_init_early(void); | 1931 | extern void __init vfs_caches_init_early(void); |
| 1919 | extern void __init vfs_caches_init(unsigned long); | 1932 | extern void __init vfs_caches_init(unsigned long); |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 44848aa830dc..6c3de999fb34 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
| @@ -280,7 +280,7 @@ static inline void __fsnotify_update_dcache_flags(struct dentry *dentry) | |||
| 280 | assert_spin_locked(&dentry->d_lock); | 280 | assert_spin_locked(&dentry->d_lock); |
| 281 | 281 | ||
| 282 | parent = dentry->d_parent; | 282 | parent = dentry->d_parent; |
| 283 | if (fsnotify_inode_watches_children(parent->d_inode)) | 283 | if (parent->d_inode && fsnotify_inode_watches_children(parent->d_inode)) |
| 284 | dentry->d_flags |= DCACHE_FSNOTIFY_PARENT_WATCHED; | 284 | dentry->d_flags |= DCACHE_FSNOTIFY_PARENT_WATCHED; |
| 285 | else | 285 | else |
| 286 | dentry->d_flags &= ~DCACHE_FSNOTIFY_PARENT_WATCHED; | 286 | dentry->d_flags &= ~DCACHE_FSNOTIFY_PARENT_WATCHED; |
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index d41ed593f79f..cf593bf9fd32 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
| @@ -25,6 +25,11 @@ | |||
| 25 | * - add IOCTL message | 25 | * - add IOCTL message |
| 26 | * - add unsolicited notification support | 26 | * - add unsolicited notification support |
| 27 | * - add POLL message and NOTIFY_POLL notification | 27 | * - add POLL message and NOTIFY_POLL notification |
| 28 | * | ||
| 29 | * 7.12 | ||
| 30 | * - add umask flag to input argument of open, mknod and mkdir | ||
| 31 | * - add notification messages for invalidation of inodes and | ||
| 32 | * directory entries | ||
| 28 | */ | 33 | */ |
| 29 | 34 | ||
| 30 | #ifndef _LINUX_FUSE_H | 35 | #ifndef _LINUX_FUSE_H |
| @@ -36,7 +41,7 @@ | |||
| 36 | #define FUSE_KERNEL_VERSION 7 | 41 | #define FUSE_KERNEL_VERSION 7 |
| 37 | 42 | ||
| 38 | /** Minor version number of this interface */ | 43 | /** Minor version number of this interface */ |
| 39 | #define FUSE_KERNEL_MINOR_VERSION 11 | 44 | #define FUSE_KERNEL_MINOR_VERSION 12 |
| 40 | 45 | ||
| 41 | /** The node ID of the root inode */ | 46 | /** The node ID of the root inode */ |
| 42 | #define FUSE_ROOT_ID 1 | 47 | #define FUSE_ROOT_ID 1 |
| @@ -112,6 +117,7 @@ struct fuse_file_lock { | |||
| 112 | * INIT request/reply flags | 117 | * INIT request/reply flags |
| 113 | * | 118 | * |
| 114 | * FUSE_EXPORT_SUPPORT: filesystem handles lookups of "." and ".." | 119 | * FUSE_EXPORT_SUPPORT: filesystem handles lookups of "." and ".." |
| 120 | * FUSE_DONT_MASK: don't apply umask to file mode on create operations | ||
| 115 | */ | 121 | */ |
| 116 | #define FUSE_ASYNC_READ (1 << 0) | 122 | #define FUSE_ASYNC_READ (1 << 0) |
| 117 | #define FUSE_POSIX_LOCKS (1 << 1) | 123 | #define FUSE_POSIX_LOCKS (1 << 1) |
| @@ -119,6 +125,7 @@ struct fuse_file_lock { | |||
| 119 | #define FUSE_ATOMIC_O_TRUNC (1 << 3) | 125 | #define FUSE_ATOMIC_O_TRUNC (1 << 3) |
| 120 | #define FUSE_EXPORT_SUPPORT (1 << 4) | 126 | #define FUSE_EXPORT_SUPPORT (1 << 4) |
| 121 | #define FUSE_BIG_WRITES (1 << 5) | 127 | #define FUSE_BIG_WRITES (1 << 5) |
| 128 | #define FUSE_DONT_MASK (1 << 6) | ||
| 122 | 129 | ||
| 123 | /** | 130 | /** |
| 124 | * CUSE INIT request/reply flags | 131 | * CUSE INIT request/reply flags |
| @@ -224,6 +231,8 @@ enum fuse_opcode { | |||
| 224 | 231 | ||
| 225 | enum fuse_notify_code { | 232 | enum fuse_notify_code { |
| 226 | FUSE_NOTIFY_POLL = 1, | 233 | FUSE_NOTIFY_POLL = 1, |
| 234 | FUSE_NOTIFY_INVAL_INODE = 2, | ||
| 235 | FUSE_NOTIFY_INVAL_ENTRY = 3, | ||
| 227 | FUSE_NOTIFY_CODE_MAX, | 236 | FUSE_NOTIFY_CODE_MAX, |
| 228 | }; | 237 | }; |
| 229 | 238 | ||
| @@ -262,14 +271,18 @@ struct fuse_attr_out { | |||
| 262 | struct fuse_attr attr; | 271 | struct fuse_attr attr; |
| 263 | }; | 272 | }; |
| 264 | 273 | ||
| 274 | #define FUSE_COMPAT_MKNOD_IN_SIZE 8 | ||
| 275 | |||
| 265 | struct fuse_mknod_in { | 276 | struct fuse_mknod_in { |
| 266 | __u32 mode; | 277 | __u32 mode; |
| 267 | __u32 rdev; | 278 | __u32 rdev; |
| 279 | __u32 umask; | ||
| 280 | __u32 padding; | ||
| 268 | }; | 281 | }; |
| 269 | 282 | ||
| 270 | struct fuse_mkdir_in { | 283 | struct fuse_mkdir_in { |
| 271 | __u32 mode; | 284 | __u32 mode; |
| 272 | __u32 padding; | 285 | __u32 umask; |
| 273 | }; | 286 | }; |
| 274 | 287 | ||
| 275 | struct fuse_rename_in { | 288 | struct fuse_rename_in { |
| @@ -301,7 +314,14 @@ struct fuse_setattr_in { | |||
| 301 | 314 | ||
| 302 | struct fuse_open_in { | 315 | struct fuse_open_in { |
| 303 | __u32 flags; | 316 | __u32 flags; |
| 317 | __u32 unused; | ||
| 318 | }; | ||
| 319 | |||
| 320 | struct fuse_create_in { | ||
| 321 | __u32 flags; | ||
| 304 | __u32 mode; | 322 | __u32 mode; |
| 323 | __u32 umask; | ||
| 324 | __u32 padding; | ||
| 305 | }; | 325 | }; |
| 306 | 326 | ||
| 307 | struct fuse_open_out { | 327 | struct fuse_open_out { |
| @@ -508,4 +528,16 @@ struct fuse_dirent { | |||
| 508 | #define FUSE_DIRENT_SIZE(d) \ | 528 | #define FUSE_DIRENT_SIZE(d) \ |
| 509 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) | 529 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) |
| 510 | 530 | ||
| 531 | struct fuse_notify_inval_inode_out { | ||
| 532 | __u64 ino; | ||
| 533 | __s64 off; | ||
| 534 | __s64 len; | ||
| 535 | }; | ||
| 536 | |||
| 537 | struct fuse_notify_inval_entry_out { | ||
| 538 | __u64 parent; | ||
| 539 | __u32 namelen; | ||
| 540 | __u32 padding; | ||
| 541 | }; | ||
| 542 | |||
| 511 | #endif /* _LINUX_FUSE_H */ | 543 | #endif /* _LINUX_FUSE_H */ |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 7400900de94a..54648e625efd 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
| 22 | #include <linux/wait.h> | 22 | #include <linux/wait.h> |
| 23 | #include <linux/percpu.h> | 23 | #include <linux/percpu.h> |
| 24 | #include <linux/timer.h> | ||
| 24 | 25 | ||
| 25 | 26 | ||
| 26 | struct hrtimer_clock_base; | 27 | struct hrtimer_clock_base; |
| @@ -447,6 +448,8 @@ extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | |||
| 447 | 448 | ||
| 448 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) | 449 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) |
| 449 | { | 450 | { |
| 451 | if (likely(!timer->start_pid)) | ||
| 452 | return; | ||
| 450 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, | 453 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, |
| 451 | timer->function, timer->start_comm, 0); | 454 | timer->function, timer->start_comm, 0); |
| 452 | } | 455 | } |
| @@ -456,6 +459,8 @@ extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer, | |||
| 456 | 459 | ||
| 457 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) | 460 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) |
| 458 | { | 461 | { |
| 462 | if (likely(!timer_stats_active)) | ||
| 463 | return; | ||
| 459 | __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0)); | 464 | __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0)); |
| 460 | } | 465 | } |
| 461 | 466 | ||
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index a05a5ef33391..2723513a5651 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
| @@ -33,7 +33,7 @@ void hugetlb_report_meminfo(struct seq_file *); | |||
| 33 | int hugetlb_report_node_meminfo(int, char *); | 33 | int hugetlb_report_node_meminfo(int, char *); |
| 34 | unsigned long hugetlb_total_pages(void); | 34 | unsigned long hugetlb_total_pages(void); |
| 35 | int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, | 35 | int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, |
| 36 | unsigned long address, int write_access); | 36 | unsigned long address, unsigned int flags); |
| 37 | int hugetlb_reserve_pages(struct inode *inode, long from, long to, | 37 | int hugetlb_reserve_pages(struct inode *inode, long from, long to, |
| 38 | struct vm_area_struct *vma, | 38 | struct vm_area_struct *vma, |
| 39 | int acctflags); | 39 | int acctflags); |
| @@ -98,7 +98,7 @@ static inline void hugetlb_report_meminfo(struct seq_file *m) | |||
| 98 | #define pud_huge(x) 0 | 98 | #define pud_huge(x) 0 |
| 99 | #define is_hugepage_only_range(mm, addr, len) 0 | 99 | #define is_hugepage_only_range(mm, addr, len) 0 |
| 100 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) | 100 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) |
| 101 | #define hugetlb_fault(mm, vma, addr, write) ({ BUG(); 0; }) | 101 | #define hugetlb_fault(mm, vma, addr, flags) ({ BUG(); 0; }) |
| 102 | 102 | ||
| 103 | #define hugetlb_change_protection(vma, address, end, newprot) | 103 | #define hugetlb_change_protection(vma, address, end, newprot) |
| 104 | 104 | ||
diff --git a/include/linux/icmpv6.h b/include/linux/icmpv6.h index 10d701eec484..b6a85183c333 100644 --- a/include/linux/icmpv6.h +++ b/include/linux/icmpv6.h | |||
| @@ -175,16 +175,16 @@ struct icmp6_filter { | |||
| 175 | 175 | ||
| 176 | 176 | ||
| 177 | extern void icmpv6_send(struct sk_buff *skb, | 177 | extern void icmpv6_send(struct sk_buff *skb, |
| 178 | int type, int code, | 178 | u8 type, u8 code, |
| 179 | __u32 info, | 179 | __u32 info, |
| 180 | struct net_device *dev); | 180 | struct net_device *dev); |
| 181 | 181 | ||
| 182 | extern int icmpv6_init(void); | 182 | extern int icmpv6_init(void); |
| 183 | extern int icmpv6_err_convert(int type, int code, | 183 | extern int icmpv6_err_convert(u8 type, u8 code, |
| 184 | int *err); | 184 | int *err); |
| 185 | extern void icmpv6_cleanup(void); | 185 | extern void icmpv6_cleanup(void); |
| 186 | extern void icmpv6_param_prob(struct sk_buff *skb, | 186 | extern void icmpv6_param_prob(struct sk_buff *skb, |
| 187 | int code, int pos); | 187 | u8 code, int pos); |
| 188 | 188 | ||
| 189 | struct flowi; | 189 | struct flowi; |
| 190 | struct in6_addr; | 190 | struct in6_addr; |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 95c6e00a72e8..edc93a6d931d 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
| @@ -1062,7 +1062,6 @@ int generic_ide_ioctl(ide_drive_t *, struct block_device *, unsigned, unsigned l | |||
| 1062 | extern int ide_vlb_clk; | 1062 | extern int ide_vlb_clk; |
| 1063 | extern int ide_pci_clk; | 1063 | extern int ide_pci_clk; |
| 1064 | 1064 | ||
| 1065 | unsigned int ide_rq_bytes(struct request *); | ||
| 1066 | int ide_end_rq(ide_drive_t *, struct request *, int, unsigned int); | 1065 | int ide_end_rq(ide_drive_t *, struct request *, int, unsigned int); |
| 1067 | void ide_kill_rq(ide_drive_t *, struct request *); | 1066 | void ide_kill_rq(ide_drive_t *, struct request *); |
| 1068 | 1067 | ||
| @@ -1361,7 +1360,6 @@ int ide_in_drive_list(u16 *, const struct drive_list_entry *); | |||
| 1361 | #ifdef CONFIG_BLK_DEV_IDEDMA | 1360 | #ifdef CONFIG_BLK_DEV_IDEDMA |
| 1362 | int ide_dma_good_drive(ide_drive_t *); | 1361 | int ide_dma_good_drive(ide_drive_t *); |
| 1363 | int __ide_dma_bad_drive(ide_drive_t *); | 1362 | int __ide_dma_bad_drive(ide_drive_t *); |
| 1364 | int ide_id_dma_bug(ide_drive_t *); | ||
| 1365 | 1363 | ||
| 1366 | u8 ide_find_dma_mode(ide_drive_t *, u8); | 1364 | u8 ide_find_dma_mode(ide_drive_t *, u8); |
| 1367 | 1365 | ||
| @@ -1402,7 +1400,6 @@ void ide_dma_lost_irq(ide_drive_t *); | |||
| 1402 | ide_startstop_t ide_dma_timeout_retry(ide_drive_t *, int); | 1400 | ide_startstop_t ide_dma_timeout_retry(ide_drive_t *, int); |
| 1403 | 1401 | ||
| 1404 | #else | 1402 | #else |
| 1405 | static inline int ide_id_dma_bug(ide_drive_t *drive) { return 0; } | ||
| 1406 | static inline u8 ide_find_dma_mode(ide_drive_t *drive, u8 speed) { return 0; } | 1403 | static inline u8 ide_find_dma_mode(ide_drive_t *drive, u8 speed) { return 0; } |
| 1407 | static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; } | 1404 | static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; } |
| 1408 | static inline void ide_dma_off_quietly(ide_drive_t *drive) { ; } | 1405 | static inline void ide_dma_off_quietly(ide_drive_t *drive) { ; } |
| @@ -1422,6 +1419,7 @@ static inline void ide_dma_unmap_sg(ide_drive_t *drive, | |||
| 1422 | 1419 | ||
| 1423 | #ifdef CONFIG_BLK_DEV_IDEACPI | 1420 | #ifdef CONFIG_BLK_DEV_IDEACPI |
| 1424 | int ide_acpi_init(void); | 1421 | int ide_acpi_init(void); |
| 1422 | bool ide_port_acpi(ide_hwif_t *hwif); | ||
| 1425 | extern int ide_acpi_exec_tfs(ide_drive_t *drive); | 1423 | extern int ide_acpi_exec_tfs(ide_drive_t *drive); |
| 1426 | extern void ide_acpi_get_timing(ide_hwif_t *hwif); | 1424 | extern void ide_acpi_get_timing(ide_hwif_t *hwif); |
| 1427 | extern void ide_acpi_push_timing(ide_hwif_t *hwif); | 1425 | extern void ide_acpi_push_timing(ide_hwif_t *hwif); |
| @@ -1430,6 +1428,7 @@ void ide_acpi_port_init_devices(ide_hwif_t *); | |||
| 1430 | extern void ide_acpi_set_state(ide_hwif_t *hwif, int on); | 1428 | extern void ide_acpi_set_state(ide_hwif_t *hwif, int on); |
| 1431 | #else | 1429 | #else |
| 1432 | static inline int ide_acpi_init(void) { return 0; } | 1430 | static inline int ide_acpi_init(void) { return 0; } |
| 1431 | static inline bool ide_port_acpi(ide_hwif_t *hwif) { return 0; } | ||
| 1433 | static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } | 1432 | static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } |
| 1434 | static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } | 1433 | static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } |
| 1435 | static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } | 1434 | static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } |
diff --git a/include/linux/ima.h b/include/linux/ima.h index b1b827d091a9..0e3f2a4c25f6 100644 --- a/include/linux/ima.h +++ b/include/linux/ima.h | |||
| @@ -24,6 +24,7 @@ extern int ima_path_check(struct path *path, int mask, int update_counts); | |||
| 24 | extern void ima_file_free(struct file *file); | 24 | extern void ima_file_free(struct file *file); |
| 25 | extern int ima_file_mmap(struct file *file, unsigned long prot); | 25 | extern int ima_file_mmap(struct file *file, unsigned long prot); |
| 26 | extern void ima_counts_get(struct file *file); | 26 | extern void ima_counts_get(struct file *file); |
| 27 | extern void ima_counts_put(struct path *path, int mask); | ||
| 27 | 28 | ||
| 28 | #else | 29 | #else |
| 29 | static inline int ima_bprm_check(struct linux_binprm *bprm) | 30 | static inline int ima_bprm_check(struct linux_binprm *bprm) |
| @@ -60,5 +61,10 @@ static inline void ima_counts_get(struct file *file) | |||
| 60 | { | 61 | { |
| 61 | return; | 62 | return; |
| 62 | } | 63 | } |
| 64 | |||
| 65 | static inline void ima_counts_put(struct path *path, int mask) | ||
| 66 | { | ||
| 67 | return; | ||
| 68 | } | ||
| 63 | #endif /* CONFIG_IMA_H */ | 69 | #endif /* CONFIG_IMA_H */ |
| 64 | #endif /* _LINUX_IMA_H */ | 70 | #endif /* _LINUX_IMA_H */ |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 5368fbdc7801..7fc01b13be43 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
| @@ -183,5 +183,8 @@ extern struct cred init_cred; | |||
| 183 | LIST_HEAD_INIT(cpu_timers[2]), \ | 183 | LIST_HEAD_INIT(cpu_timers[2]), \ |
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | /* Attach to the init_task data structure for proper alignment */ | ||
| 187 | #define __init_task_data __attribute__((__section__(".data.init_task"))) | ||
| 188 | |||
| 186 | 189 | ||
| 187 | #endif | 190 | #endif |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index fac104e7186a..d6320a3e8def 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -303,6 +303,7 @@ extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in | |||
| 303 | extern int panic_timeout; | 303 | extern int panic_timeout; |
| 304 | extern int panic_on_oops; | 304 | extern int panic_on_oops; |
| 305 | extern int panic_on_unrecovered_nmi; | 305 | extern int panic_on_unrecovered_nmi; |
| 306 | extern int panic_on_io_nmi; | ||
| 306 | extern const char *print_tainted(void); | 307 | extern const char *print_tainted(void); |
| 307 | extern void add_taint(unsigned flag); | 308 | extern void add_taint(unsigned flag); |
| 308 | extern int test_taint(unsigned flag); | 309 | extern int test_taint(unsigned flag); |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index aacc5449f586..16713dc672e4 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
| @@ -125,6 +125,7 @@ struct kvm_kernel_irq_routing_entry { | |||
| 125 | struct kvm { | 125 | struct kvm { |
| 126 | struct mutex lock; /* protects the vcpus array and APIC accesses */ | 126 | struct mutex lock; /* protects the vcpus array and APIC accesses */ |
| 127 | spinlock_t mmu_lock; | 127 | spinlock_t mmu_lock; |
| 128 | spinlock_t requests_lock; | ||
| 128 | struct rw_semaphore slots_lock; | 129 | struct rw_semaphore slots_lock; |
| 129 | struct mm_struct *mm; /* userspace tied to this vm */ | 130 | struct mm_struct *mm; /* userspace tied to this vm */ |
| 130 | int nmemslots; | 131 | int nmemslots; |
diff --git a/include/linux/leds-lp3944.h b/include/linux/leds-lp3944.h new file mode 100644 index 000000000000..afc9f9fd70f5 --- /dev/null +++ b/include/linux/leds-lp3944.h | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | /* | ||
| 2 | * leds-lp3944.h - platform data structure for lp3944 led controller | ||
| 3 | * | ||
| 4 | * Copyright (C) 2009 Antonio Ospite <ospite@studenti.unina.it> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef __LINUX_LEDS_LP3944_H | ||
| 13 | #define __LINUX_LEDS_LP3944_H | ||
| 14 | |||
| 15 | #include <linux/leds.h> | ||
| 16 | #include <linux/workqueue.h> | ||
| 17 | |||
| 18 | #define LP3944_LED0 0 | ||
| 19 | #define LP3944_LED1 1 | ||
| 20 | #define LP3944_LED2 2 | ||
| 21 | #define LP3944_LED3 3 | ||
| 22 | #define LP3944_LED4 4 | ||
| 23 | #define LP3944_LED5 5 | ||
| 24 | #define LP3944_LED6 6 | ||
| 25 | #define LP3944_LED7 7 | ||
| 26 | #define LP3944_LEDS_MAX 8 | ||
| 27 | |||
| 28 | #define LP3944_LED_STATUS_MASK 0x03 | ||
| 29 | enum lp3944_status { | ||
| 30 | LP3944_LED_STATUS_OFF = 0x0, | ||
| 31 | LP3944_LED_STATUS_ON = 0x1, | ||
| 32 | LP3944_LED_STATUS_DIM0 = 0x2, | ||
| 33 | LP3944_LED_STATUS_DIM1 = 0x3 | ||
| 34 | }; | ||
| 35 | |||
| 36 | enum lp3944_type { | ||
| 37 | LP3944_LED_TYPE_NONE, | ||
| 38 | LP3944_LED_TYPE_LED, | ||
| 39 | LP3944_LED_TYPE_LED_INVERTED, | ||
| 40 | }; | ||
| 41 | |||
| 42 | struct lp3944_led { | ||
| 43 | char *name; | ||
| 44 | enum lp3944_type type; | ||
| 45 | enum lp3944_status status; | ||
| 46 | }; | ||
| 47 | |||
| 48 | struct lp3944_platform_data { | ||
| 49 | struct lp3944_led leds[LP3944_LEDS_MAX]; | ||
| 50 | u8 leds_size; | ||
| 51 | }; | ||
| 52 | |||
| 53 | #endif /* __LINUX_LEDS_LP3944_H */ | ||
diff --git a/include/linux/leds.h b/include/linux/leds.h index 376fe07732ea..d8bf9665e70c 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
| @@ -45,7 +45,10 @@ struct led_classdev { | |||
| 45 | /* Get LED brightness level */ | 45 | /* Get LED brightness level */ |
| 46 | enum led_brightness (*brightness_get)(struct led_classdev *led_cdev); | 46 | enum led_brightness (*brightness_get)(struct led_classdev *led_cdev); |
| 47 | 47 | ||
| 48 | /* Activate hardware accelerated blink */ | 48 | /* Activate hardware accelerated blink, delays are in |
| 49 | * miliseconds and if none is provided then a sensible default | ||
| 50 | * should be chosen. The call can adjust the timings if it can't | ||
| 51 | * match the values specified exactly. */ | ||
| 49 | int (*blink_set)(struct led_classdev *led_cdev, | 52 | int (*blink_set)(struct led_classdev *led_cdev, |
| 50 | unsigned long *delay_on, | 53 | unsigned long *delay_on, |
| 51 | unsigned long *delay_off); | 54 | unsigned long *delay_off); |
| @@ -141,9 +144,14 @@ struct gpio_led { | |||
| 141 | const char *name; | 144 | const char *name; |
| 142 | const char *default_trigger; | 145 | const char *default_trigger; |
| 143 | unsigned gpio; | 146 | unsigned gpio; |
| 144 | u8 active_low : 1; | 147 | unsigned active_low : 1; |
| 145 | u8 retain_state_suspended : 1; | 148 | unsigned retain_state_suspended : 1; |
| 149 | unsigned default_state : 2; | ||
| 150 | /* default_state should be one of LEDS_GPIO_DEFSTATE_(ON|OFF|KEEP) */ | ||
| 146 | }; | 151 | }; |
| 152 | #define LEDS_GPIO_DEFSTATE_OFF 0 | ||
| 153 | #define LEDS_GPIO_DEFSTATE_ON 1 | ||
| 154 | #define LEDS_GPIO_DEFSTATE_KEEP 2 | ||
| 147 | 155 | ||
| 148 | struct gpio_led_platform_data { | 156 | struct gpio_led_platform_data { |
| 149 | int num_leds; | 157 | int num_leds; |
diff --git a/include/linux/linkage.h b/include/linux/linkage.h index fee9e59649c1..691f59171c6c 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h | |||
| @@ -22,6 +22,15 @@ | |||
| 22 | #define __page_aligned_bss __section(.bss.page_aligned) __aligned(PAGE_SIZE) | 22 | #define __page_aligned_bss __section(.bss.page_aligned) __aligned(PAGE_SIZE) |
| 23 | 23 | ||
| 24 | /* | 24 | /* |
| 25 | * For assembly routines. | ||
| 26 | * | ||
| 27 | * Note when using these that you must specify the appropriate | ||
| 28 | * alignment directives yourself | ||
| 29 | */ | ||
| 30 | #define __PAGE_ALIGNED_DATA .section ".data.page_aligned", "aw" | ||
| 31 | #define __PAGE_ALIGNED_BSS .section ".bss.page_aligned", "aw" | ||
| 32 | |||
| 33 | /* | ||
| 25 | * This is used by architectures to keep arguments on the stack | 34 | * This is used by architectures to keep arguments on the stack |
| 26 | * untouched by the compiler by keeping them live until the end. | 35 | * untouched by the compiler by keeping them live until the end. |
| 27 | * The argument stack may be owned by the assembly-language | 36 | * The argument stack may be owned by the assembly-language |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index da5a5a1f4cd2..b25d1b53df0d 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
| @@ -258,6 +258,16 @@ extern void lockdep_init_map(struct lockdep_map *lock, const char *name, | |||
| 258 | #define lockdep_set_subclass(lock, sub) \ | 258 | #define lockdep_set_subclass(lock, sub) \ |
| 259 | lockdep_init_map(&(lock)->dep_map, #lock, \ | 259 | lockdep_init_map(&(lock)->dep_map, #lock, \ |
| 260 | (lock)->dep_map.key, sub) | 260 | (lock)->dep_map.key, sub) |
| 261 | /* | ||
| 262 | * Compare locking classes | ||
| 263 | */ | ||
| 264 | #define lockdep_match_class(lock, key) lockdep_match_key(&(lock)->dep_map, key) | ||
| 265 | |||
| 266 | static inline int lockdep_match_key(struct lockdep_map *lock, | ||
| 267 | struct lock_class_key *key) | ||
| 268 | { | ||
| 269 | return lock->key == key; | ||
| 270 | } | ||
| 261 | 271 | ||
| 262 | /* | 272 | /* |
| 263 | * Acquire a lock. | 273 | * Acquire a lock. |
| @@ -326,6 +336,11 @@ static inline void lockdep_on(void) | |||
| 326 | #define lockdep_set_class_and_subclass(lock, key, sub) \ | 336 | #define lockdep_set_class_and_subclass(lock, key, sub) \ |
| 327 | do { (void)(key); } while (0) | 337 | do { (void)(key); } while (0) |
| 328 | #define lockdep_set_subclass(lock, sub) do { } while (0) | 338 | #define lockdep_set_subclass(lock, sub) do { } while (0) |
| 339 | /* | ||
| 340 | * We don't define lockdep_match_class() and lockdep_match_key() for !LOCKDEP | ||
| 341 | * case since the result is not well defined and the caller should rather | ||
| 342 | * #ifdef the call himself. | ||
| 343 | */ | ||
| 329 | 344 | ||
| 330 | # define INIT_LOCKDEP | 345 | # define INIT_LOCKDEP |
| 331 | # define lockdep_reset() do { debug_locks = 1; } while (0) | 346 | # define lockdep_reset() do { debug_locks = 1; } while (0) |
diff --git a/include/linux/max17040_battery.h b/include/linux/max17040_battery.h new file mode 100644 index 000000000000..ad97b06cf930 --- /dev/null +++ b/include/linux/max17040_battery.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2009 Samsung Electronics | ||
| 3 | * Minkyu Kang <mk7.kang@samsung.com> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __MAX17040_BATTERY_H_ | ||
| 11 | #define __MAX17040_BATTERY_H_ | ||
| 12 | |||
| 13 | struct max17040_platform_data { | ||
| 14 | int (*battery_online)(void); | ||
| 15 | int (*charger_online)(void); | ||
| 16 | int (*charger_enable)(void); | ||
| 17 | }; | ||
| 18 | |||
| 19 | #endif | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index d006e93d5c93..ba3a7cb1eaa0 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -826,7 +826,7 @@ extern int make_pages_present(unsigned long addr, unsigned long end); | |||
| 826 | extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); | 826 | extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); |
| 827 | 827 | ||
| 828 | int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | 828 | int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, |
| 829 | unsigned long start, int len, int write, int force, | 829 | unsigned long start, int nr_pages, int write, int force, |
| 830 | struct page **pages, struct vm_area_struct **vmas); | 830 | struct page **pages, struct vm_area_struct **vmas); |
| 831 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, | 831 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, |
| 832 | struct page **pages); | 832 | struct page **pages); |
diff --git a/include/linux/netfilter/xt_conntrack.h b/include/linux/netfilter/xt_conntrack.h index 3430c7751948..7ae05338e94c 100644 --- a/include/linux/netfilter/xt_conntrack.h +++ b/include/linux/netfilter/xt_conntrack.h | |||
| @@ -81,4 +81,17 @@ struct xt_conntrack_mtinfo1 { | |||
| 81 | __u8 state_mask, status_mask; | 81 | __u8 state_mask, status_mask; |
| 82 | }; | 82 | }; |
| 83 | 83 | ||
| 84 | struct xt_conntrack_mtinfo2 { | ||
| 85 | union nf_inet_addr origsrc_addr, origsrc_mask; | ||
| 86 | union nf_inet_addr origdst_addr, origdst_mask; | ||
| 87 | union nf_inet_addr replsrc_addr, replsrc_mask; | ||
| 88 | union nf_inet_addr repldst_addr, repldst_mask; | ||
| 89 | __u32 expires_min, expires_max; | ||
| 90 | __u16 l4proto; | ||
| 91 | __be16 origsrc_port, origdst_port; | ||
| 92 | __be16 replsrc_port, repldst_port; | ||
| 93 | __u16 match_flags, invert_flags; | ||
| 94 | __u16 state_mask, status_mask; | ||
| 95 | }; | ||
| 96 | |||
| 84 | #endif /*_XT_CONNTRACK_H*/ | 97 | #endif /*_XT_CONNTRACK_H*/ |
diff --git a/include/linux/netfilter/xt_osf.h b/include/linux/netfilter/xt_osf.h index fd2272e0959a..18afa495f973 100644 --- a/include/linux/netfilter/xt_osf.h +++ b/include/linux/netfilter/xt_osf.h | |||
| @@ -20,6 +20,8 @@ | |||
| 20 | #ifndef _XT_OSF_H | 20 | #ifndef _XT_OSF_H |
| 21 | #define _XT_OSF_H | 21 | #define _XT_OSF_H |
| 22 | 22 | ||
| 23 | #include <linux/types.h> | ||
| 24 | |||
| 23 | #define MAXGENRELEN 32 | 25 | #define MAXGENRELEN 32 |
| 24 | 26 | ||
| 25 | #define XT_OSF_GENRE (1<<0) | 27 | #define XT_OSF_GENRE (1<<0) |
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h index b3646cd7fd5a..4391741b99dc 100644 --- a/include/linux/pci_hotplug.h +++ b/include/linux/pci_hotplug.h | |||
| @@ -229,7 +229,6 @@ struct hotplug_params { | |||
| 229 | extern acpi_status acpi_get_hp_params_from_firmware(struct pci_bus *bus, | 229 | extern acpi_status acpi_get_hp_params_from_firmware(struct pci_bus *bus, |
| 230 | struct hotplug_params *hpp); | 230 | struct hotplug_params *hpp); |
| 231 | int acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev, u32 flags); | 231 | int acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev, u32 flags); |
| 232 | int acpi_root_bridge(acpi_handle handle); | ||
| 233 | int acpi_pci_check_ejectable(struct pci_bus *pbus, acpi_handle handle); | 232 | int acpi_pci_check_ejectable(struct pci_bus *pbus, acpi_handle handle); |
| 234 | int acpi_pci_detect_ejectable(struct pci_bus *pbus); | 233 | int acpi_pci_detect_ejectable(struct pci_bus *pbus); |
| 235 | #endif | 234 | #endif |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index a3b000365795..73b46b6b904f 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -2645,6 +2645,7 @@ | |||
| 2645 | #define PCI_DEVICE_ID_NETMOS_9835 0x9835 | 2645 | #define PCI_DEVICE_ID_NETMOS_9835 0x9835 |
| 2646 | #define PCI_DEVICE_ID_NETMOS_9845 0x9845 | 2646 | #define PCI_DEVICE_ID_NETMOS_9845 0x9845 |
| 2647 | #define PCI_DEVICE_ID_NETMOS_9855 0x9855 | 2647 | #define PCI_DEVICE_ID_NETMOS_9855 0x9855 |
| 2648 | #define PCI_DEVICE_ID_NETMOS_9901 0x9901 | ||
| 2648 | 2649 | ||
| 2649 | #define PCI_VENDOR_ID_3COM_2 0xa727 | 2650 | #define PCI_VENDOR_ID_3COM_2 0xa727 |
| 2650 | 2651 | ||
diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h index 8f921d74f49f..68438e18fff4 100644 --- a/include/linux/percpu-defs.h +++ b/include/linux/percpu-defs.h | |||
| @@ -24,7 +24,8 @@ | |||
| 24 | 24 | ||
| 25 | #define DEFINE_PER_CPU_SECTION(type, name, section) \ | 25 | #define DEFINE_PER_CPU_SECTION(type, name, section) \ |
| 26 | __attribute__((__section__(PER_CPU_BASE_SECTION section))) \ | 26 | __attribute__((__section__(PER_CPU_BASE_SECTION section))) \ |
| 27 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name | 27 | PER_CPU_ATTRIBUTES PER_CPU_DEF_ATTRIBUTES \ |
| 28 | __typeof__(type) per_cpu__##name | ||
| 28 | 29 | ||
| 29 | /* | 30 | /* |
| 30 | * Variant on the per-CPU variable declaration/definition theme used for | 31 | * Variant on the per-CPU variable declaration/definition theme used for |
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h index 89698d8aba5c..5e970c7d3fd5 100644 --- a/include/linux/perf_counter.h +++ b/include/linux/perf_counter.h | |||
| @@ -178,8 +178,10 @@ struct perf_counter_attr { | |||
| 178 | mmap : 1, /* include mmap data */ | 178 | mmap : 1, /* include mmap data */ |
| 179 | comm : 1, /* include comm data */ | 179 | comm : 1, /* include comm data */ |
| 180 | freq : 1, /* use freq, not period */ | 180 | freq : 1, /* use freq, not period */ |
| 181 | inherit_stat : 1, /* per task counts */ | ||
| 182 | enable_on_exec : 1, /* next exec enables */ | ||
| 181 | 183 | ||
| 182 | __reserved_1 : 53; | 184 | __reserved_1 : 51; |
| 183 | 185 | ||
| 184 | __u32 wakeup_events; /* wakeup every n events */ | 186 | __u32 wakeup_events; /* wakeup every n events */ |
| 185 | __u32 __reserved_2; | 187 | __u32 __reserved_2; |
| @@ -232,6 +234,14 @@ struct perf_counter_mmap_page { | |||
| 232 | __u32 lock; /* seqlock for synchronization */ | 234 | __u32 lock; /* seqlock for synchronization */ |
| 233 | __u32 index; /* hardware counter identifier */ | 235 | __u32 index; /* hardware counter identifier */ |
| 234 | __s64 offset; /* add to hardware counter value */ | 236 | __s64 offset; /* add to hardware counter value */ |
| 237 | __u64 time_enabled; /* time counter active */ | ||
| 238 | __u64 time_running; /* time counter on cpu */ | ||
| 239 | |||
| 240 | /* | ||
| 241 | * Hole for extension of the self monitor capabilities | ||
| 242 | */ | ||
| 243 | |||
| 244 | __u64 __reserved[123]; /* align to 1k */ | ||
| 235 | 245 | ||
| 236 | /* | 246 | /* |
| 237 | * Control data for the mmap() data buffer. | 247 | * Control data for the mmap() data buffer. |
| @@ -253,7 +263,6 @@ struct perf_counter_mmap_page { | |||
| 253 | #define PERF_EVENT_MISC_KERNEL (1 << 0) | 263 | #define PERF_EVENT_MISC_KERNEL (1 << 0) |
| 254 | #define PERF_EVENT_MISC_USER (2 << 0) | 264 | #define PERF_EVENT_MISC_USER (2 << 0) |
| 255 | #define PERF_EVENT_MISC_HYPERVISOR (3 << 0) | 265 | #define PERF_EVENT_MISC_HYPERVISOR (3 << 0) |
| 256 | #define PERF_EVENT_MISC_OVERFLOW (1 << 2) | ||
| 257 | 266 | ||
| 258 | struct perf_event_header { | 267 | struct perf_event_header { |
| 259 | __u32 type; | 268 | __u32 type; |
| @@ -327,9 +336,18 @@ enum perf_event_type { | |||
| 327 | PERF_EVENT_FORK = 7, | 336 | PERF_EVENT_FORK = 7, |
| 328 | 337 | ||
| 329 | /* | 338 | /* |
| 330 | * When header.misc & PERF_EVENT_MISC_OVERFLOW the event_type field | 339 | * struct { |
| 331 | * will be PERF_SAMPLE_* | 340 | * struct perf_event_header header; |
| 332 | * | 341 | * u32 pid, tid; |
| 342 | * u64 value; | ||
| 343 | * { u64 time_enabled; } && PERF_FORMAT_ENABLED | ||
| 344 | * { u64 time_running; } && PERF_FORMAT_RUNNING | ||
| 345 | * { u64 parent_id; } && PERF_FORMAT_ID | ||
| 346 | * }; | ||
| 347 | */ | ||
| 348 | PERF_EVENT_READ = 8, | ||
| 349 | |||
| 350 | /* | ||
| 333 | * struct { | 351 | * struct { |
| 334 | * struct perf_event_header header; | 352 | * struct perf_event_header header; |
| 335 | * | 353 | * |
| @@ -337,8 +355,9 @@ enum perf_event_type { | |||
| 337 | * { u32 pid, tid; } && PERF_SAMPLE_TID | 355 | * { u32 pid, tid; } && PERF_SAMPLE_TID |
| 338 | * { u64 time; } && PERF_SAMPLE_TIME | 356 | * { u64 time; } && PERF_SAMPLE_TIME |
| 339 | * { u64 addr; } && PERF_SAMPLE_ADDR | 357 | * { u64 addr; } && PERF_SAMPLE_ADDR |
| 340 | * { u64 config; } && PERF_SAMPLE_CONFIG | 358 | * { u64 id; } && PERF_SAMPLE_ID |
| 341 | * { u32 cpu, res; } && PERF_SAMPLE_CPU | 359 | * { u32 cpu, res; } && PERF_SAMPLE_CPU |
| 360 | * { u64 period; } && PERF_SAMPLE_PERIOD | ||
| 342 | * | 361 | * |
| 343 | * { u64 nr; | 362 | * { u64 nr; |
| 344 | * { u64 id, val; } cnt[nr]; } && PERF_SAMPLE_GROUP | 363 | * { u64 id, val; } cnt[nr]; } && PERF_SAMPLE_GROUP |
| @@ -347,6 +366,9 @@ enum perf_event_type { | |||
| 347 | * u64 ips[nr]; } && PERF_SAMPLE_CALLCHAIN | 366 | * u64 ips[nr]; } && PERF_SAMPLE_CALLCHAIN |
| 348 | * }; | 367 | * }; |
| 349 | */ | 368 | */ |
| 369 | PERF_EVENT_SAMPLE = 9, | ||
| 370 | |||
| 371 | PERF_EVENT_MAX, /* non-ABI */ | ||
| 350 | }; | 372 | }; |
| 351 | 373 | ||
| 352 | enum perf_callchain_context { | 374 | enum perf_callchain_context { |
| @@ -582,6 +604,7 @@ struct perf_counter_context { | |||
| 582 | int nr_counters; | 604 | int nr_counters; |
| 583 | int nr_active; | 605 | int nr_active; |
| 584 | int is_active; | 606 | int is_active; |
| 607 | int nr_stat; | ||
| 585 | atomic_t refcount; | 608 | atomic_t refcount; |
| 586 | struct task_struct *task; | 609 | struct task_struct *task; |
| 587 | 610 | ||
| @@ -669,7 +692,16 @@ static inline int is_software_counter(struct perf_counter *counter) | |||
| 669 | (counter->attr.type != PERF_TYPE_HW_CACHE); | 692 | (counter->attr.type != PERF_TYPE_HW_CACHE); |
| 670 | } | 693 | } |
| 671 | 694 | ||
| 672 | extern void perf_swcounter_event(u32, u64, int, struct pt_regs *, u64); | 695 | extern atomic_t perf_swcounter_enabled[PERF_COUNT_SW_MAX]; |
| 696 | |||
| 697 | extern void __perf_swcounter_event(u32, u64, int, struct pt_regs *, u64); | ||
| 698 | |||
| 699 | static inline void | ||
| 700 | perf_swcounter_event(u32 event, u64 nr, int nmi, struct pt_regs *regs, u64 addr) | ||
| 701 | { | ||
| 702 | if (atomic_read(&perf_swcounter_enabled[event])) | ||
| 703 | __perf_swcounter_event(event, nr, nmi, regs, addr); | ||
| 704 | } | ||
| 673 | 705 | ||
| 674 | extern void __perf_counter_mmap(struct vm_area_struct *vma); | 706 | extern void __perf_counter_mmap(struct vm_area_struct *vma); |
| 675 | 707 | ||
diff --git a/include/linux/posix_acl.h b/include/linux/posix_acl.h index 4bc241290c24..065a3652a3ea 100644 --- a/include/linux/posix_acl.h +++ b/include/linux/posix_acl.h | |||
| @@ -83,4 +83,78 @@ extern int posix_acl_chmod_masq(struct posix_acl *, mode_t); | |||
| 83 | extern struct posix_acl *get_posix_acl(struct inode *, int); | 83 | extern struct posix_acl *get_posix_acl(struct inode *, int); |
| 84 | extern int set_posix_acl(struct inode *, int, struct posix_acl *); | 84 | extern int set_posix_acl(struct inode *, int, struct posix_acl *); |
| 85 | 85 | ||
| 86 | #ifdef CONFIG_FS_POSIX_ACL | ||
| 87 | static inline struct posix_acl *get_cached_acl(struct inode *inode, int type) | ||
| 88 | { | ||
| 89 | struct posix_acl **p, *acl; | ||
| 90 | switch (type) { | ||
| 91 | case ACL_TYPE_ACCESS: | ||
| 92 | p = &inode->i_acl; | ||
| 93 | break; | ||
| 94 | case ACL_TYPE_DEFAULT: | ||
| 95 | p = &inode->i_default_acl; | ||
| 96 | break; | ||
| 97 | default: | ||
| 98 | return ERR_PTR(-EINVAL); | ||
| 99 | } | ||
| 100 | acl = ACCESS_ONCE(*p); | ||
| 101 | if (acl) { | ||
| 102 | spin_lock(&inode->i_lock); | ||
| 103 | acl = *p; | ||
| 104 | if (acl != ACL_NOT_CACHED) | ||
| 105 | acl = posix_acl_dup(acl); | ||
| 106 | spin_unlock(&inode->i_lock); | ||
| 107 | } | ||
| 108 | return acl; | ||
| 109 | } | ||
| 110 | |||
| 111 | static inline void set_cached_acl(struct inode *inode, | ||
| 112 | int type, | ||
| 113 | struct posix_acl *acl) | ||
| 114 | { | ||
| 115 | struct posix_acl *old = NULL; | ||
| 116 | spin_lock(&inode->i_lock); | ||
| 117 | switch (type) { | ||
| 118 | case ACL_TYPE_ACCESS: | ||
| 119 | old = inode->i_acl; | ||
| 120 | inode->i_acl = posix_acl_dup(acl); | ||
| 121 | break; | ||
| 122 | case ACL_TYPE_DEFAULT: | ||
| 123 | old = inode->i_default_acl; | ||
| 124 | inode->i_default_acl = posix_acl_dup(acl); | ||
| 125 | break; | ||
| 126 | } | ||
| 127 | spin_unlock(&inode->i_lock); | ||
| 128 | if (old != ACL_NOT_CACHED) | ||
| 129 | posix_acl_release(old); | ||
| 130 | } | ||
| 131 | |||
| 132 | static inline void forget_cached_acl(struct inode *inode, int type) | ||
| 133 | { | ||
| 134 | struct posix_acl *old = NULL; | ||
| 135 | spin_lock(&inode->i_lock); | ||
| 136 | switch (type) { | ||
| 137 | case ACL_TYPE_ACCESS: | ||
| 138 | old = inode->i_acl; | ||
| 139 | inode->i_acl = ACL_NOT_CACHED; | ||
| 140 | break; | ||
| 141 | case ACL_TYPE_DEFAULT: | ||
| 142 | old = inode->i_default_acl; | ||
| 143 | inode->i_default_acl = ACL_NOT_CACHED; | ||
| 144 | break; | ||
| 145 | } | ||
| 146 | spin_unlock(&inode->i_lock); | ||
| 147 | if (old != ACL_NOT_CACHED) | ||
| 148 | posix_acl_release(old); | ||
| 149 | } | ||
| 150 | #endif | ||
| 151 | |||
| 152 | static inline void cache_no_acl(struct inode *inode) | ||
| 153 | { | ||
| 154 | #ifdef CONFIG_FS_POSIX_ACL | ||
| 155 | inode->i_acl = NULL; | ||
| 156 | inode->i_default_acl = NULL; | ||
| 157 | #endif | ||
| 158 | } | ||
| 159 | |||
| 86 | #endif /* __LINUX_POSIX_ACL_H */ | 160 | #endif /* __LINUX_POSIX_ACL_H */ |
diff --git a/include/linux/reiserfs_acl.h b/include/linux/reiserfs_acl.h index 8cc65757e47a..b4448853900e 100644 --- a/include/linux/reiserfs_acl.h +++ b/include/linux/reiserfs_acl.h | |||
| @@ -56,15 +56,6 @@ int reiserfs_cache_default_acl(struct inode *dir); | |||
| 56 | extern struct xattr_handler reiserfs_posix_acl_default_handler; | 56 | extern struct xattr_handler reiserfs_posix_acl_default_handler; |
| 57 | extern struct xattr_handler reiserfs_posix_acl_access_handler; | 57 | extern struct xattr_handler reiserfs_posix_acl_access_handler; |
| 58 | 58 | ||
| 59 | static inline void reiserfs_init_acl_access(struct inode *inode) | ||
| 60 | { | ||
| 61 | REISERFS_I(inode)->i_acl_access = NULL; | ||
| 62 | } | ||
| 63 | |||
| 64 | static inline void reiserfs_init_acl_default(struct inode *inode) | ||
| 65 | { | ||
| 66 | REISERFS_I(inode)->i_acl_default = NULL; | ||
| 67 | } | ||
| 68 | #else | 59 | #else |
| 69 | 60 | ||
| 70 | #define reiserfs_cache_default_acl(inode) 0 | 61 | #define reiserfs_cache_default_acl(inode) 0 |
| @@ -86,12 +77,4 @@ reiserfs_inherit_default_acl(struct reiserfs_transaction_handle *th, | |||
| 86 | { | 77 | { |
| 87 | return 0; | 78 | return 0; |
| 88 | } | 79 | } |
| 89 | |||
| 90 | static inline void reiserfs_init_acl_access(struct inode *inode) | ||
| 91 | { | ||
| 92 | } | ||
| 93 | |||
| 94 | static inline void reiserfs_init_acl_default(struct inode *inode) | ||
| 95 | { | ||
| 96 | } | ||
| 97 | #endif | 80 | #endif |
diff --git a/include/linux/reiserfs_fs_i.h b/include/linux/reiserfs_fs_i.h index 76360b36ac33..89f4d3abbf5a 100644 --- a/include/linux/reiserfs_fs_i.h +++ b/include/linux/reiserfs_fs_i.h | |||
| @@ -54,10 +54,6 @@ struct reiserfs_inode_info { | |||
| 54 | unsigned int i_trans_id; | 54 | unsigned int i_trans_id; |
| 55 | struct reiserfs_journal_list *i_jl; | 55 | struct reiserfs_journal_list *i_jl; |
| 56 | struct mutex i_mmap; | 56 | struct mutex i_mmap; |
| 57 | #ifdef CONFIG_REISERFS_FS_POSIX_ACL | ||
| 58 | struct posix_acl *i_acl_access; | ||
| 59 | struct posix_acl *i_acl_default; | ||
| 60 | #endif | ||
| 61 | #ifdef CONFIG_REISERFS_FS_XATTR | 57 | #ifdef CONFIG_REISERFS_FS_XATTR |
| 62 | struct rw_semaphore i_xattr_sem; | 58 | struct rw_semaphore i_xattr_sem; |
| 63 | #endif | 59 | #endif |
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 216d024f830d..bf116d0dbf23 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
| @@ -118,7 +118,14 @@ int try_to_munlock(struct page *); | |||
| 118 | #define anon_vma_prepare(vma) (0) | 118 | #define anon_vma_prepare(vma) (0) |
| 119 | #define anon_vma_link(vma) do {} while (0) | 119 | #define anon_vma_link(vma) do {} while (0) |
| 120 | 120 | ||
| 121 | #define page_referenced(page, locked, cnt, flags) TestClearPageReferenced(page) | 121 | static inline int page_referenced(struct page *page, int is_locked, |
| 122 | struct mem_cgroup *cnt, | ||
| 123 | unsigned long *vm_flags) | ||
| 124 | { | ||
| 125 | *vm_flags = 0; | ||
| 126 | return TestClearPageReferenced(page); | ||
| 127 | } | ||
| 128 | |||
| 122 | #define try_to_unmap(page, refs) SWAP_FAIL | 129 | #define try_to_unmap(page, refs) SWAP_FAIL |
| 123 | 130 | ||
| 124 | static inline int page_mkclean(struct page *page) | 131 | static inline int page_mkclean(struct page *page) |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 4d0754269884..0085d758d645 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -349,8 +349,20 @@ extern int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner); | |||
| 349 | struct nsproxy; | 349 | struct nsproxy; |
| 350 | struct user_namespace; | 350 | struct user_namespace; |
| 351 | 351 | ||
| 352 | /* Maximum number of active map areas.. This is a random (large) number */ | 352 | /* |
| 353 | #define DEFAULT_MAX_MAP_COUNT 65536 | 353 | * Default maximum number of active map areas, this limits the number of vmas |
| 354 | * per mm struct. Users can overwrite this number by sysctl but there is a | ||
| 355 | * problem. | ||
| 356 | * | ||
| 357 | * When a program's coredump is generated as ELF format, a section is created | ||
| 358 | * per a vma. In ELF, the number of sections is represented in unsigned short. | ||
| 359 | * This means the number of sections should be smaller than 65535 at coredump. | ||
| 360 | * Because the kernel adds some informative sections to a image of program at | ||
| 361 | * generating coredump, we need some margin. The number of extra sections is | ||
| 362 | * 1-3 now and depends on arch. We use "5" as safe margin, here. | ||
| 363 | */ | ||
| 364 | #define MAPCOUNT_ELF_CORE_MARGIN (5) | ||
| 365 | #define DEFAULT_MAX_MAP_COUNT (USHORT_MAX - MAPCOUNT_ELF_CORE_MARGIN) | ||
| 354 | 366 | ||
| 355 | extern int sysctl_max_map_count; | 367 | extern int sysctl_max_map_count; |
| 356 | 368 | ||
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h index fd83f2584b15..abff6c9b413c 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h | |||
| @@ -19,10 +19,6 @@ struct shmem_inode_info { | |||
| 19 | swp_entry_t i_direct[SHMEM_NR_DIRECT]; /* first blocks */ | 19 | swp_entry_t i_direct[SHMEM_NR_DIRECT]; /* first blocks */ |
| 20 | struct list_head swaplist; /* chain of maybes on swap */ | 20 | struct list_head swaplist; /* chain of maybes on swap */ |
| 21 | struct inode vfs_inode; | 21 | struct inode vfs_inode; |
| 22 | #ifdef CONFIG_TMPFS_POSIX_ACL | ||
| 23 | struct posix_acl *i_acl; | ||
| 24 | struct posix_acl *i_default_acl; | ||
| 25 | #endif | ||
| 26 | }; | 22 | }; |
| 27 | 23 | ||
| 28 | struct shmem_sb_info { | 24 | struct shmem_sb_info { |
| @@ -45,7 +41,6 @@ static inline struct shmem_inode_info *SHMEM_I(struct inode *inode) | |||
| 45 | #ifdef CONFIG_TMPFS_POSIX_ACL | 41 | #ifdef CONFIG_TMPFS_POSIX_ACL |
| 46 | int shmem_permission(struct inode *, int); | 42 | int shmem_permission(struct inode *, int); |
| 47 | int shmem_acl_init(struct inode *, struct inode *); | 43 | int shmem_acl_init(struct inode *, struct inode *); |
| 48 | void shmem_acl_destroy_inode(struct inode *); | ||
| 49 | 44 | ||
| 50 | extern struct xattr_handler shmem_xattr_acl_access_handler; | 45 | extern struct xattr_handler shmem_xattr_acl_access_handler; |
| 51 | extern struct xattr_handler shmem_xattr_acl_default_handler; | 46 | extern struct xattr_handler shmem_xattr_acl_default_handler; |
| @@ -57,9 +52,6 @@ static inline int shmem_acl_init(struct inode *inode, struct inode *dir) | |||
| 57 | { | 52 | { |
| 58 | return 0; | 53 | return 0; |
| 59 | } | 54 | } |
| 60 | static inline void shmem_acl_destroy_inode(struct inode *inode) | ||
| 61 | { | ||
| 62 | } | ||
| 63 | #endif /* CONFIG_TMPFS_POSIX_ACL */ | 55 | #endif /* CONFIG_TMPFS_POSIX_ACL */ |
| 64 | 56 | ||
| 65 | #endif | 57 | #endif |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 9c4cd27f4685..c47c4b4da97e 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
| @@ -80,6 +80,8 @@ struct spi_device { | |||
| 80 | #define SPI_LSB_FIRST 0x08 /* per-word bits-on-wire */ | 80 | #define SPI_LSB_FIRST 0x08 /* per-word bits-on-wire */ |
| 81 | #define SPI_3WIRE 0x10 /* SI/SO signals shared */ | 81 | #define SPI_3WIRE 0x10 /* SI/SO signals shared */ |
| 82 | #define SPI_LOOP 0x20 /* loopback mode */ | 82 | #define SPI_LOOP 0x20 /* loopback mode */ |
| 83 | #define SPI_NO_CS 0x40 /* 1 dev/bus, no chipselect */ | ||
| 84 | #define SPI_READY 0x80 /* slave pulls low to pause */ | ||
| 83 | u8 bits_per_word; | 85 | u8 bits_per_word; |
| 84 | int irq; | 86 | int irq; |
| 85 | void *controller_state; | 87 | void *controller_state; |
| @@ -248,6 +250,10 @@ struct spi_master { | |||
| 248 | /* spi_device.mode flags understood by this controller driver */ | 250 | /* spi_device.mode flags understood by this controller driver */ |
| 249 | u16 mode_bits; | 251 | u16 mode_bits; |
| 250 | 252 | ||
| 253 | /* other constraints relevant to this driver */ | ||
| 254 | u16 flags; | ||
| 255 | #define SPI_MASTER_HALF_DUPLEX BIT(0) /* can't do full duplex */ | ||
| 256 | |||
| 251 | /* Setup mode and clock, etc (spi driver may call many times). | 257 | /* Setup mode and clock, etc (spi driver may call many times). |
| 252 | * | 258 | * |
| 253 | * IMPORTANT: this may be called when transfers to another | 259 | * IMPORTANT: this may be called when transfers to another |
diff --git a/include/linux/spi/spidev.h b/include/linux/spi/spidev.h index 95251ccd5a07..bf0570a84f7a 100644 --- a/include/linux/spi/spidev.h +++ b/include/linux/spi/spidev.h | |||
| @@ -40,6 +40,8 @@ | |||
| 40 | #define SPI_LSB_FIRST 0x08 | 40 | #define SPI_LSB_FIRST 0x08 |
| 41 | #define SPI_3WIRE 0x10 | 41 | #define SPI_3WIRE 0x10 |
| 42 | #define SPI_LOOP 0x20 | 42 | #define SPI_LOOP 0x20 |
| 43 | #define SPI_NO_CS 0x40 | ||
| 44 | #define SPI_READY 0x80 | ||
| 43 | 45 | ||
| 44 | /*---------------------------------------------------------------------------*/ | 46 | /*---------------------------------------------------------------------------*/ |
| 45 | 47 | ||
diff --git a/include/linux/swap.h b/include/linux/swap.h index c88b36665f79..7c15334f3ff2 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
| @@ -298,8 +298,8 @@ extern int try_to_free_swap(struct page *); | |||
| 298 | struct backing_dev_info; | 298 | struct backing_dev_info; |
| 299 | 299 | ||
| 300 | /* linux/mm/thrash.c */ | 300 | /* linux/mm/thrash.c */ |
| 301 | extern struct mm_struct * swap_token_mm; | 301 | extern struct mm_struct *swap_token_mm; |
| 302 | extern void grab_swap_token(void); | 302 | extern void grab_swap_token(struct mm_struct *); |
| 303 | extern void __put_swap_token(struct mm_struct *); | 303 | extern void __put_swap_token(struct mm_struct *); |
| 304 | 304 | ||
| 305 | static inline int has_swap_token(struct mm_struct *mm) | 305 | static inline int has_swap_token(struct mm_struct *mm) |
| @@ -419,10 +419,10 @@ static inline swp_entry_t get_swap_page(void) | |||
| 419 | } | 419 | } |
| 420 | 420 | ||
| 421 | /* linux/mm/thrash.c */ | 421 | /* linux/mm/thrash.c */ |
| 422 | #define put_swap_token(x) do { } while(0) | 422 | #define put_swap_token(mm) do { } while (0) |
| 423 | #define grab_swap_token() do { } while(0) | 423 | #define grab_swap_token(mm) do { } while (0) |
| 424 | #define has_swap_token(x) 0 | 424 | #define has_swap_token(mm) 0 |
| 425 | #define disable_swap_token() do { } while(0) | 425 | #define disable_swap_token() do { } while (0) |
| 426 | 426 | ||
| 427 | static inline void | 427 | static inline void |
| 428 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) | 428 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) |
diff --git a/include/linux/timer.h b/include/linux/timer.h index ccf882eed8f8..be62ec2ebea5 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
| @@ -190,6 +190,8 @@ extern unsigned long get_next_timer_interrupt(unsigned long now); | |||
| 190 | */ | 190 | */ |
| 191 | #ifdef CONFIG_TIMER_STATS | 191 | #ifdef CONFIG_TIMER_STATS |
| 192 | 192 | ||
| 193 | extern int timer_stats_active; | ||
| 194 | |||
| 193 | #define TIMER_STATS_FLAG_DEFERRABLE 0x1 | 195 | #define TIMER_STATS_FLAG_DEFERRABLE 0x1 |
| 194 | 196 | ||
| 195 | extern void init_timer_stats(void); | 197 | extern void init_timer_stats(void); |
| @@ -203,6 +205,8 @@ extern void __timer_stats_timer_set_start_info(struct timer_list *timer, | |||
| 203 | 205 | ||
| 204 | static inline void timer_stats_timer_set_start_info(struct timer_list *timer) | 206 | static inline void timer_stats_timer_set_start_info(struct timer_list *timer) |
| 205 | { | 207 | { |
| 208 | if (likely(!timer_stats_active)) | ||
| 209 | return; | ||
| 206 | __timer_stats_timer_set_start_info(timer, __builtin_return_address(0)); | 210 | __timer_stats_timer_set_start_info(timer, __builtin_return_address(0)); |
| 207 | } | 211 | } |
| 208 | 212 | ||
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 5d44059f6d63..310e18a880ff 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
| @@ -42,7 +42,6 @@ struct usbnet { | |||
| 42 | 42 | ||
| 43 | /* protocol/interface state */ | 43 | /* protocol/interface state */ |
| 44 | struct net_device *net; | 44 | struct net_device *net; |
| 45 | struct net_device_stats stats; | ||
| 46 | int msg_enable; | 45 | int msg_enable; |
| 47 | unsigned long data [5]; | 46 | unsigned long data [5]; |
| 48 | u32 xid; | 47 | u32 xid; |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index f24eceecc5a6..8a025d510904 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
| @@ -348,6 +348,7 @@ struct v4l2_pix_format { | |||
| 348 | #define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ | 348 | #define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ |
| 349 | #define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ | 349 | #define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ |
| 350 | #define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */ | 350 | #define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */ |
| 351 | #define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ | ||
| 351 | #define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ | 352 | #define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ |
| 352 | 353 | ||
| 353 | /* | 354 | /* |
| @@ -894,9 +895,10 @@ enum v4l2_colorfx { | |||
| 894 | V4L2_COLORFX_BW = 1, | 895 | V4L2_COLORFX_BW = 1, |
| 895 | V4L2_COLORFX_SEPIA = 2, | 896 | V4L2_COLORFX_SEPIA = 2, |
| 896 | }; | 897 | }; |
| 898 | #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) | ||
| 897 | 899 | ||
| 898 | /* last CID + 1 */ | 900 | /* last CID + 1 */ |
| 899 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+32) | 901 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+33) |
| 900 | 902 | ||
| 901 | /* MPEG-class control IDs defined by V4L2 */ | 903 | /* MPEG-class control IDs defined by V4L2 */ |
| 902 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) | 904 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) |
