diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/drm/radeon_drm.h | 23 | ||||
| -rw-r--r-- | include/drm/ttm/ttm_bo_driver.h | 20 | ||||
| -rw-r--r-- | include/drm/ttm/ttm_module.h | 2 | ||||
| -rw-r--r-- | include/linux/cgroup.h | 28 | ||||
| -rw-r--r-- | include/linux/flex_array.h | 47 | ||||
| -rw-r--r-- | include/linux/fs.h | 1 | ||||
| -rw-r--r-- | include/linux/lguest.h | 39 | ||||
| -rw-r--r-- | include/linux/lguest_launcher.h | 18 | ||||
| -rw-r--r-- | include/linux/libata.h | 1 | ||||
| -rw-r--r-- | include/linux/pps.h | 2 | ||||
| -rw-r--r-- | include/linux/tty.h | 1 | ||||
| -rw-r--r-- | include/linux/uio.h | 17 | ||||
| -rw-r--r-- | include/linux/virtio_blk.h | 6 | ||||
| -rw-r--r-- | include/linux/virtio_config.h | 3 | ||||
| -rw-r--r-- | include/linux/virtio_net.h | 6 | ||||
| -rw-r--r-- | include/linux/virtio_ring.h | 12 |
16 files changed, 169 insertions, 57 deletions
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h index 41862e9a4c2..af4b4826997 100644 --- a/include/drm/radeon_drm.h +++ b/include/drm/radeon_drm.h | |||
| @@ -506,6 +506,8 @@ typedef struct { | |||
| 506 | #define DRM_RADEON_GEM_WAIT_IDLE 0x24 | 506 | #define DRM_RADEON_GEM_WAIT_IDLE 0x24 |
| 507 | #define DRM_RADEON_CS 0x26 | 507 | #define DRM_RADEON_CS 0x26 |
| 508 | #define DRM_RADEON_INFO 0x27 | 508 | #define DRM_RADEON_INFO 0x27 |
| 509 | #define DRM_RADEON_GEM_SET_TILING 0x28 | ||
| 510 | #define DRM_RADEON_GEM_GET_TILING 0x29 | ||
| 509 | 511 | ||
| 510 | #define DRM_IOCTL_RADEON_CP_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CP_INIT, drm_radeon_init_t) | 512 | #define DRM_IOCTL_RADEON_CP_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CP_INIT, drm_radeon_init_t) |
| 511 | #define DRM_IOCTL_RADEON_CP_START DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_START) | 513 | #define DRM_IOCTL_RADEON_CP_START DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_START) |
| @@ -544,7 +546,8 @@ typedef struct { | |||
| 544 | #define DRM_IOCTL_RADEON_GEM_WAIT_IDLE DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_GEM_WAIT_IDLE, struct drm_radeon_gem_wait_idle) | 546 | #define DRM_IOCTL_RADEON_GEM_WAIT_IDLE DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_GEM_WAIT_IDLE, struct drm_radeon_gem_wait_idle) |
| 545 | #define DRM_IOCTL_RADEON_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_CS, struct drm_radeon_cs) | 547 | #define DRM_IOCTL_RADEON_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_CS, struct drm_radeon_cs) |
| 546 | #define DRM_IOCTL_RADEON_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INFO, struct drm_radeon_info) | 548 | #define DRM_IOCTL_RADEON_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INFO, struct drm_radeon_info) |
| 547 | 549 | #define DRM_IOCTL_RADEON_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_TILING, struct drm_radeon_gem_set_tiling) | |
| 550 | #define DRM_IOCTL_RADEON_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_GET_TILING, struct drm_radeon_gem_get_tiling) | ||
| 548 | 551 | ||
| 549 | typedef struct drm_radeon_init { | 552 | typedef struct drm_radeon_init { |
| 550 | enum { | 553 | enum { |
| @@ -796,6 +799,24 @@ struct drm_radeon_gem_create { | |||
| 796 | uint32_t flags; | 799 | uint32_t flags; |
| 797 | }; | 800 | }; |
| 798 | 801 | ||
| 802 | #define RADEON_TILING_MACRO 0x1 | ||
| 803 | #define RADEON_TILING_MICRO 0x2 | ||
| 804 | #define RADEON_TILING_SWAP 0x4 | ||
| 805 | #define RADEON_TILING_SURFACE 0x8 /* this object requires a surface | ||
| 806 | * when mapped - i.e. front buffer */ | ||
| 807 | |||
| 808 | struct drm_radeon_gem_set_tiling { | ||
| 809 | uint32_t handle; | ||
| 810 | uint32_t tiling_flags; | ||
| 811 | uint32_t pitch; | ||
| 812 | }; | ||
| 813 | |||
| 814 | struct drm_radeon_gem_get_tiling { | ||
| 815 | uint32_t handle; | ||
| 816 | uint32_t tiling_flags; | ||
| 817 | uint32_t pitch; | ||
| 818 | }; | ||
| 819 | |||
| 799 | struct drm_radeon_gem_mmap { | 820 | struct drm_radeon_gem_mmap { |
| 800 | uint32_t handle; | 821 | uint32_t handle; |
| 801 | uint32_t pad; | 822 | uint32_t pad; |
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index 62ed733c52a..a68829db381 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h | |||
| @@ -121,6 +121,7 @@ struct ttm_backend { | |||
| 121 | #define TTM_PAGE_FLAG_SWAPPED (1 << 4) | 121 | #define TTM_PAGE_FLAG_SWAPPED (1 << 4) |
| 122 | #define TTM_PAGE_FLAG_PERSISTANT_SWAP (1 << 5) | 122 | #define TTM_PAGE_FLAG_PERSISTANT_SWAP (1 << 5) |
| 123 | #define TTM_PAGE_FLAG_ZERO_ALLOC (1 << 6) | 123 | #define TTM_PAGE_FLAG_ZERO_ALLOC (1 << 6) |
| 124 | #define TTM_PAGE_FLAG_DMA32 (1 << 7) | ||
| 124 | 125 | ||
| 125 | enum ttm_caching_state { | 126 | enum ttm_caching_state { |
| 126 | tt_uncached, | 127 | tt_uncached, |
| @@ -353,6 +354,14 @@ struct ttm_bo_driver { | |||
| 353 | int (*sync_obj_flush) (void *sync_obj, void *sync_arg); | 354 | int (*sync_obj_flush) (void *sync_obj, void *sync_arg); |
| 354 | void (*sync_obj_unref) (void **sync_obj); | 355 | void (*sync_obj_unref) (void **sync_obj); |
| 355 | void *(*sync_obj_ref) (void *sync_obj); | 356 | void *(*sync_obj_ref) (void *sync_obj); |
| 357 | |||
| 358 | /* hook to notify driver about a driver move so it | ||
| 359 | * can do tiling things */ | ||
| 360 | void (*move_notify)(struct ttm_buffer_object *bo, | ||
| 361 | struct ttm_mem_reg *new_mem); | ||
| 362 | /* notify the driver we are taking a fault on this BO | ||
| 363 | * and have reserved it */ | ||
| 364 | void (*fault_reserve_notify)(struct ttm_buffer_object *bo); | ||
| 356 | }; | 365 | }; |
| 357 | 366 | ||
| 358 | #define TTM_NUM_MEM_TYPES 8 | 367 | #define TTM_NUM_MEM_TYPES 8 |
| @@ -429,6 +438,8 @@ struct ttm_bo_device { | |||
| 429 | */ | 438 | */ |
| 430 | 439 | ||
| 431 | struct delayed_work wq; | 440 | struct delayed_work wq; |
| 441 | |||
| 442 | bool need_dma32; | ||
| 432 | }; | 443 | }; |
| 433 | 444 | ||
| 434 | /** | 445 | /** |
| @@ -648,7 +659,14 @@ extern int ttm_bo_device_release(struct ttm_bo_device *bdev); | |||
| 648 | extern int ttm_bo_device_init(struct ttm_bo_device *bdev, | 659 | extern int ttm_bo_device_init(struct ttm_bo_device *bdev, |
| 649 | struct ttm_mem_global *mem_glob, | 660 | struct ttm_mem_global *mem_glob, |
| 650 | struct ttm_bo_driver *driver, | 661 | struct ttm_bo_driver *driver, |
| 651 | uint64_t file_page_offset); | 662 | uint64_t file_page_offset, bool need_dma32); |
| 663 | |||
| 664 | /** | ||
| 665 | * ttm_bo_unmap_virtual | ||
| 666 | * | ||
| 667 | * @bo: tear down the virtual mappings for this BO | ||
| 668 | */ | ||
| 669 | extern void ttm_bo_unmap_virtual(struct ttm_buffer_object *bo); | ||
| 652 | 670 | ||
| 653 | /** | 671 | /** |
| 654 | * ttm_bo_reserve: | 672 | * ttm_bo_reserve: |
diff --git a/include/drm/ttm/ttm_module.h b/include/drm/ttm/ttm_module.h index 889a4c7958a..d1d433834e4 100644 --- a/include/drm/ttm/ttm_module.h +++ b/include/drm/ttm/ttm_module.h | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | 33 | ||
| 34 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
| 35 | 35 | ||
| 36 | #define TTM_PFX "[TTM]" | 36 | #define TTM_PFX "[TTM] " |
| 37 | 37 | ||
| 38 | enum ttm_global_types { | 38 | enum ttm_global_types { |
| 39 | TTM_GLOBAL_TTM_MEM = 0, | 39 | TTM_GLOBAL_TTM_MEM = 0, |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 665fa70e409..90bba9e6228 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
| @@ -179,14 +179,11 @@ struct cgroup { | |||
| 179 | */ | 179 | */ |
| 180 | struct list_head release_list; | 180 | struct list_head release_list; |
| 181 | 181 | ||
| 182 | /* pids_mutex protects the fields below */ | 182 | /* pids_mutex protects pids_list and cached pid arrays. */ |
| 183 | struct rw_semaphore pids_mutex; | 183 | struct rw_semaphore pids_mutex; |
| 184 | /* Array of process ids in the cgroup */ | 184 | |
| 185 | pid_t *tasks_pids; | 185 | /* Linked list of struct cgroup_pids */ |
| 186 | /* How many files are using the current tasks_pids array */ | 186 | struct list_head pids_list; |
| 187 | int pids_use_count; | ||
| 188 | /* Length of the current tasks_pids array */ | ||
| 189 | int pids_length; | ||
| 190 | 187 | ||
| 191 | /* For RCU-protected deletion */ | 188 | /* For RCU-protected deletion */ |
| 192 | struct rcu_head rcu_head; | 189 | struct rcu_head rcu_head; |
| @@ -366,6 +363,23 @@ int cgroup_task_count(const struct cgroup *cgrp); | |||
| 366 | int cgroup_is_descendant(const struct cgroup *cgrp, struct task_struct *task); | 363 | int cgroup_is_descendant(const struct cgroup *cgrp, struct task_struct *task); |
| 367 | 364 | ||
| 368 | /* | 365 | /* |
| 366 | * When the subsys has to access css and may add permanent refcnt to css, | ||
| 367 | * it should take care of racy conditions with rmdir(). Following set of | ||
| 368 | * functions, is for stop/restart rmdir if necessary. | ||
| 369 | * Because these will call css_get/put, "css" should be alive css. | ||
| 370 | * | ||
| 371 | * cgroup_exclude_rmdir(); | ||
| 372 | * ...do some jobs which may access arbitrary empty cgroup | ||
| 373 | * cgroup_release_and_wakeup_rmdir(); | ||
| 374 | * | ||
| 375 | * When someone removes a cgroup while cgroup_exclude_rmdir() holds it, | ||
| 376 | * it sleeps and cgroup_release_and_wakeup_rmdir() will wake him up. | ||
| 377 | */ | ||
| 378 | |||
| 379 | void cgroup_exclude_rmdir(struct cgroup_subsys_state *css); | ||
| 380 | void cgroup_release_and_wakeup_rmdir(struct cgroup_subsys_state *css); | ||
| 381 | |||
| 382 | /* | ||
| 369 | * Control Group subsystem type. | 383 | * Control Group subsystem type. |
| 370 | * See Documentation/cgroups/cgroups.txt for details | 384 | * See Documentation/cgroups/cgroups.txt for details |
| 371 | */ | 385 | */ |
diff --git a/include/linux/flex_array.h b/include/linux/flex_array.h new file mode 100644 index 00000000000..23c1ec79a31 --- /dev/null +++ b/include/linux/flex_array.h | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | #ifndef _FLEX_ARRAY_H | ||
| 2 | #define _FLEX_ARRAY_H | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | #include <asm/page.h> | ||
| 6 | |||
| 7 | #define FLEX_ARRAY_PART_SIZE PAGE_SIZE | ||
| 8 | #define FLEX_ARRAY_BASE_SIZE PAGE_SIZE | ||
| 9 | |||
| 10 | struct flex_array_part; | ||
| 11 | |||
| 12 | /* | ||
| 13 | * This is meant to replace cases where an array-like | ||
| 14 | * structure has gotten too big to fit into kmalloc() | ||
| 15 | * and the developer is getting tempted to use | ||
| 16 | * vmalloc(). | ||
| 17 | */ | ||
| 18 | |||
| 19 | struct flex_array { | ||
| 20 | union { | ||
| 21 | struct { | ||
| 22 | int element_size; | ||
| 23 | int total_nr_elements; | ||
| 24 | struct flex_array_part *parts[0]; | ||
| 25 | }; | ||
| 26 | /* | ||
| 27 | * This little trick makes sure that | ||
| 28 | * sizeof(flex_array) == PAGE_SIZE | ||
| 29 | */ | ||
| 30 | char padding[FLEX_ARRAY_BASE_SIZE]; | ||
| 31 | }; | ||
| 32 | }; | ||
| 33 | |||
| 34 | #define FLEX_ARRAY_INIT(size, total) { { {\ | ||
| 35 | .element_size = (size), \ | ||
| 36 | .total_nr_elements = (total), \ | ||
| 37 | } } } | ||
| 38 | |||
| 39 | struct flex_array *flex_array_alloc(int element_size, int total, gfp_t flags); | ||
| 40 | int flex_array_prealloc(struct flex_array *fa, int start, int end, gfp_t flags); | ||
| 41 | void flex_array_free(struct flex_array *fa); | ||
| 42 | void flex_array_free_parts(struct flex_array *fa); | ||
| 43 | int flex_array_put(struct flex_array *fa, int element_nr, void *src, | ||
| 44 | gfp_t flags); | ||
| 45 | void *flex_array_get(struct flex_array *fa, int element_nr); | ||
| 46 | |||
| 47 | #endif /* _FLEX_ARRAY_H */ | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 0872372184f..a36ffa5a77a 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -1946,6 +1946,7 @@ extern void putname(const char *name); | |||
| 1946 | extern int register_blkdev(unsigned int, const char *); | 1946 | extern int register_blkdev(unsigned int, const char *); |
| 1947 | extern void unregister_blkdev(unsigned int, const char *); | 1947 | extern void unregister_blkdev(unsigned int, const char *); |
| 1948 | extern struct block_device *bdget(dev_t); | 1948 | extern struct block_device *bdget(dev_t); |
| 1949 | extern struct block_device *bdgrab(struct block_device *bdev); | ||
| 1949 | extern void bd_set_size(struct block_device *, loff_t size); | 1950 | extern void bd_set_size(struct block_device *, loff_t size); |
| 1950 | extern void bd_forget(struct inode *inode); | 1951 | extern void bd_forget(struct inode *inode); |
| 1951 | extern void bdput(struct block_device *); | 1952 | extern void bdput(struct block_device *); |
diff --git a/include/linux/lguest.h b/include/linux/lguest.h index dbf2479e808..2fb1dcbcb5a 100644 --- a/include/linux/lguest.h +++ b/include/linux/lguest.h | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | /* Things the lguest guest needs to know. Note: like all lguest interfaces, | 1 | /* |
| 2 | * this is subject to wild and random change between versions. */ | 2 | * Things the lguest guest needs to know. Note: like all lguest interfaces, |
| 3 | * this is subject to wild and random change between versions. | ||
| 4 | */ | ||
| 3 | #ifndef _LINUX_LGUEST_H | 5 | #ifndef _LINUX_LGUEST_H |
| 4 | #define _LINUX_LGUEST_H | 6 | #define _LINUX_LGUEST_H |
| 5 | 7 | ||
| @@ -11,32 +13,41 @@ | |||
| 11 | #define LG_CLOCK_MIN_DELTA 100UL | 13 | #define LG_CLOCK_MIN_DELTA 100UL |
| 12 | #define LG_CLOCK_MAX_DELTA ULONG_MAX | 14 | #define LG_CLOCK_MAX_DELTA ULONG_MAX |
| 13 | 15 | ||
| 14 | /*G:031 The second method of communicating with the Host is to via "struct | 16 | /*G:031 |
| 17 | * The second method of communicating with the Host is to via "struct | ||
| 15 | * lguest_data". Once the Guest's initialization hypercall tells the Host where | 18 | * lguest_data". Once the Guest's initialization hypercall tells the Host where |
| 16 | * this is, the Guest and Host both publish information in it. :*/ | 19 | * this is, the Guest and Host both publish information in it. |
| 17 | struct lguest_data | 20 | :*/ |
| 18 | { | 21 | struct lguest_data { |
| 19 | /* 512 == enabled (same as eflags in normal hardware). The Guest | 22 | /* |
| 20 | * changes interrupts so often that a hypercall is too slow. */ | 23 | * 512 == enabled (same as eflags in normal hardware). The Guest |
| 24 | * changes interrupts so often that a hypercall is too slow. | ||
| 25 | */ | ||
| 21 | unsigned int irq_enabled; | 26 | unsigned int irq_enabled; |
| 22 | /* Fine-grained interrupt disabling by the Guest */ | 27 | /* Fine-grained interrupt disabling by the Guest */ |
| 23 | DECLARE_BITMAP(blocked_interrupts, LGUEST_IRQS); | 28 | DECLARE_BITMAP(blocked_interrupts, LGUEST_IRQS); |
| 24 | 29 | ||
| 25 | /* The Host writes the virtual address of the last page fault here, | 30 | /* |
| 31 | * The Host writes the virtual address of the last page fault here, | ||
| 26 | * which saves the Guest a hypercall. CR2 is the native register where | 32 | * which saves the Guest a hypercall. CR2 is the native register where |
| 27 | * this address would normally be found. */ | 33 | * this address would normally be found. |
| 34 | */ | ||
| 28 | unsigned long cr2; | 35 | unsigned long cr2; |
| 29 | 36 | ||
| 30 | /* Wallclock time set by the Host. */ | 37 | /* Wallclock time set by the Host. */ |
| 31 | struct timespec time; | 38 | struct timespec time; |
| 32 | 39 | ||
| 33 | /* Interrupt pending set by the Host. The Guest should do a hypercall | 40 | /* |
| 34 | * if it re-enables interrupts and sees this set (to X86_EFLAGS_IF). */ | 41 | * Interrupt pending set by the Host. The Guest should do a hypercall |
| 42 | * if it re-enables interrupts and sees this set (to X86_EFLAGS_IF). | ||
| 43 | */ | ||
| 35 | int irq_pending; | 44 | int irq_pending; |
| 36 | 45 | ||
| 37 | /* Async hypercall ring. Instead of directly making hypercalls, we can | 46 | /* |
| 47 | * Async hypercall ring. Instead of directly making hypercalls, we can | ||
| 38 | * place them in here for processing the next time the Host wants. | 48 | * place them in here for processing the next time the Host wants. |
| 39 | * This batching can be quite efficient. */ | 49 | * This batching can be quite efficient. |
| 50 | */ | ||
| 40 | 51 | ||
| 41 | /* 0xFF == done (set by Host), 0 == pending (set by Guest). */ | 52 | /* 0xFF == done (set by Host), 0 == pending (set by Guest). */ |
| 42 | u8 hcall_status[LHCALL_RING_SIZE]; | 53 | u8 hcall_status[LHCALL_RING_SIZE]; |
diff --git a/include/linux/lguest_launcher.h b/include/linux/lguest_launcher.h index bfefbdf7498..495203ff221 100644 --- a/include/linux/lguest_launcher.h +++ b/include/linux/lguest_launcher.h | |||
| @@ -29,8 +29,10 @@ struct lguest_device_desc { | |||
| 29 | __u8 type; | 29 | __u8 type; |
| 30 | /* The number of virtqueues (first in config array) */ | 30 | /* The number of virtqueues (first in config array) */ |
| 31 | __u8 num_vq; | 31 | __u8 num_vq; |
| 32 | /* The number of bytes of feature bits. Multiply by 2: one for host | 32 | /* |
| 33 | * features and one for Guest acknowledgements. */ | 33 | * The number of bytes of feature bits. Multiply by 2: one for host |
| 34 | * features and one for Guest acknowledgements. | ||
| 35 | */ | ||
| 34 | __u8 feature_len; | 36 | __u8 feature_len; |
| 35 | /* The number of bytes of the config array after virtqueues. */ | 37 | /* The number of bytes of the config array after virtqueues. */ |
| 36 | __u8 config_len; | 38 | __u8 config_len; |
| @@ -39,8 +41,10 @@ struct lguest_device_desc { | |||
| 39 | __u8 config[0]; | 41 | __u8 config[0]; |
| 40 | }; | 42 | }; |
| 41 | 43 | ||
| 42 | /*D:135 This is how we expect the device configuration field for a virtqueue | 44 | /*D:135 |
| 43 | * to be laid out in config space. */ | 45 | * This is how we expect the device configuration field for a virtqueue |
| 46 | * to be laid out in config space. | ||
| 47 | */ | ||
| 44 | struct lguest_vqconfig { | 48 | struct lguest_vqconfig { |
| 45 | /* The number of entries in the virtio_ring */ | 49 | /* The number of entries in the virtio_ring */ |
| 46 | __u16 num; | 50 | __u16 num; |
| @@ -61,7 +65,9 @@ enum lguest_req | |||
| 61 | LHREQ_EVENTFD, /* + address, fd. */ | 65 | LHREQ_EVENTFD, /* + address, fd. */ |
| 62 | }; | 66 | }; |
| 63 | 67 | ||
| 64 | /* The alignment to use between consumer and producer parts of vring. | 68 | /* |
| 65 | * x86 pagesize for historical reasons. */ | 69 | * The alignment to use between consumer and producer parts of vring. |
| 70 | * x86 pagesize for historical reasons. | ||
| 71 | */ | ||
| 66 | #define LGUEST_VRING_ALIGN 4096 | 72 | #define LGUEST_VRING_ALIGN 4096 |
| 67 | #endif /* _LINUX_LGUEST_LAUNCHER */ | 73 | #endif /* _LINUX_LGUEST_LAUNCHER */ |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 79b6d7fd4ac..e5b6e33c657 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -589,6 +589,7 @@ struct ata_device { | |||
| 589 | #endif | 589 | #endif |
| 590 | /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */ | 590 | /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */ |
| 591 | u64 n_sectors; /* size of device, if ATA */ | 591 | u64 n_sectors; /* size of device, if ATA */ |
| 592 | u64 n_native_sectors; /* native size, if ATA */ | ||
| 592 | unsigned int class; /* ATA_DEV_xxx */ | 593 | unsigned int class; /* ATA_DEV_xxx */ |
| 593 | unsigned long unpark_deadline; | 594 | unsigned long unpark_deadline; |
| 594 | 595 | ||
diff --git a/include/linux/pps.h b/include/linux/pps.h index cfe5c7214ec..0194ab06177 100644 --- a/include/linux/pps.h +++ b/include/linux/pps.h | |||
| @@ -22,6 +22,8 @@ | |||
| 22 | #ifndef _PPS_H_ | 22 | #ifndef _PPS_H_ |
| 23 | #define _PPS_H_ | 23 | #define _PPS_H_ |
| 24 | 24 | ||
| 25 | #include <linux/types.h> | ||
| 26 | |||
| 25 | #define PPS_VERSION "5.3.6" | 27 | #define PPS_VERSION "5.3.6" |
| 26 | #define PPS_MAX_SOURCES 16 /* should be enough... */ | 28 | #define PPS_MAX_SOURCES 16 /* should be enough... */ |
| 27 | 29 | ||
diff --git a/include/linux/tty.h b/include/linux/tty.h index 1488d8c81aa..e8c6c9136c9 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -394,6 +394,7 @@ extern void __do_SAK(struct tty_struct *tty); | |||
| 394 | extern void disassociate_ctty(int priv); | 394 | extern void disassociate_ctty(int priv); |
| 395 | extern void no_tty(void); | 395 | extern void no_tty(void); |
| 396 | extern void tty_flip_buffer_push(struct tty_struct *tty); | 396 | extern void tty_flip_buffer_push(struct tty_struct *tty); |
| 397 | extern void tty_flush_to_ldisc(struct tty_struct *tty); | ||
| 397 | extern void tty_buffer_free_all(struct tty_struct *tty); | 398 | extern void tty_buffer_free_all(struct tty_struct *tty); |
| 398 | extern void tty_buffer_flush(struct tty_struct *tty); | 399 | extern void tty_buffer_flush(struct tty_struct *tty); |
| 399 | extern void tty_buffer_init(struct tty_struct *tty); | 400 | extern void tty_buffer_init(struct tty_struct *tty); |
diff --git a/include/linux/uio.h b/include/linux/uio.h index b7fe13883bd..98c114323a8 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h | |||
| @@ -19,15 +19,6 @@ struct iovec | |||
| 19 | __kernel_size_t iov_len; /* Must be size_t (1003.1g) */ | 19 | __kernel_size_t iov_len; /* Must be size_t (1003.1g) */ |
| 20 | }; | 20 | }; |
| 21 | 21 | ||
| 22 | #ifdef __KERNEL__ | ||
| 23 | |||
| 24 | struct kvec { | ||
| 25 | void *iov_base; /* and that should *never* hold a userland pointer */ | ||
| 26 | size_t iov_len; | ||
| 27 | }; | ||
| 28 | |||
| 29 | #endif | ||
| 30 | |||
| 31 | /* | 22 | /* |
| 32 | * UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1) | 23 | * UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1) |
| 33 | */ | 24 | */ |
| @@ -35,6 +26,13 @@ struct kvec { | |||
| 35 | #define UIO_FASTIOV 8 | 26 | #define UIO_FASTIOV 8 |
| 36 | #define UIO_MAXIOV 1024 | 27 | #define UIO_MAXIOV 1024 |
| 37 | 28 | ||
| 29 | #ifdef __KERNEL__ | ||
| 30 | |||
| 31 | struct kvec { | ||
| 32 | void *iov_base; /* and that should *never* hold a userland pointer */ | ||
| 33 | size_t iov_len; | ||
| 34 | }; | ||
| 35 | |||
| 38 | /* | 36 | /* |
| 39 | * Total number of bytes covered by an iovec. | 37 | * Total number of bytes covered by an iovec. |
| 40 | * | 38 | * |
| @@ -53,5 +51,6 @@ static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs) | |||
| 53 | } | 51 | } |
| 54 | 52 | ||
| 55 | unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to); | 53 | unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to); |
| 54 | #endif | ||
| 56 | 55 | ||
| 57 | #endif | 56 | #endif |
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h index be7d255fc7c..8dab9f2b883 100644 --- a/include/linux/virtio_blk.h +++ b/include/linux/virtio_blk.h | |||
| @@ -20,8 +20,7 @@ | |||
| 20 | 20 | ||
| 21 | #define VIRTIO_BLK_ID_BYTES (sizeof(__u16[256])) /* IDENTIFY DATA */ | 21 | #define VIRTIO_BLK_ID_BYTES (sizeof(__u16[256])) /* IDENTIFY DATA */ |
| 22 | 22 | ||
| 23 | struct virtio_blk_config | 23 | struct virtio_blk_config { |
| 24 | { | ||
| 25 | /* The capacity (in 512-byte sectors). */ | 24 | /* The capacity (in 512-byte sectors). */ |
| 26 | __u64 capacity; | 25 | __u64 capacity; |
| 27 | /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ | 26 | /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ |
| @@ -50,8 +49,7 @@ struct virtio_blk_config | |||
| 50 | #define VIRTIO_BLK_T_BARRIER 0x80000000 | 49 | #define VIRTIO_BLK_T_BARRIER 0x80000000 |
| 51 | 50 | ||
| 52 | /* This is the first element of the read scatter-gather list. */ | 51 | /* This is the first element of the read scatter-gather list. */ |
| 53 | struct virtio_blk_outhdr | 52 | struct virtio_blk_outhdr { |
| 54 | { | ||
| 55 | /* VIRTIO_BLK_T* */ | 53 | /* VIRTIO_BLK_T* */ |
| 56 | __u32 type; | 54 | __u32 type; |
| 57 | /* io priority. */ | 55 | /* io priority. */ |
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index 99f514575f6..e547e3c8ee9 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h | |||
| @@ -79,8 +79,7 @@ | |||
| 79 | * the dev->feature bits if it wants. | 79 | * the dev->feature bits if it wants. |
| 80 | */ | 80 | */ |
| 81 | typedef void vq_callback_t(struct virtqueue *); | 81 | typedef void vq_callback_t(struct virtqueue *); |
| 82 | struct virtio_config_ops | 82 | struct virtio_config_ops { |
| 83 | { | ||
| 84 | void (*get)(struct virtio_device *vdev, unsigned offset, | 83 | void (*get)(struct virtio_device *vdev, unsigned offset, |
| 85 | void *buf, unsigned len); | 84 | void *buf, unsigned len); |
| 86 | void (*set)(struct virtio_device *vdev, unsigned offset, | 85 | void (*set)(struct virtio_device *vdev, unsigned offset, |
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 9c543d6ac53..d8dd539c9f4 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
| @@ -31,8 +31,7 @@ | |||
| 31 | 31 | ||
| 32 | #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ | 32 | #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ |
| 33 | 33 | ||
| 34 | struct virtio_net_config | 34 | struct virtio_net_config { |
| 35 | { | ||
| 36 | /* The config defining mac address (if VIRTIO_NET_F_MAC) */ | 35 | /* The config defining mac address (if VIRTIO_NET_F_MAC) */ |
| 37 | __u8 mac[6]; | 36 | __u8 mac[6]; |
| 38 | /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */ | 37 | /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */ |
| @@ -41,8 +40,7 @@ struct virtio_net_config | |||
| 41 | 40 | ||
| 42 | /* This is the first element of the scatter-gather list. If you don't | 41 | /* This is the first element of the scatter-gather list. If you don't |
| 43 | * specify GSO or CSUM features, you can simply ignore the header. */ | 42 | * specify GSO or CSUM features, you can simply ignore the header. */ |
| 44 | struct virtio_net_hdr | 43 | struct virtio_net_hdr { |
| 45 | { | ||
| 46 | #define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 // Use csum_start, csum_offset | 44 | #define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 // Use csum_start, csum_offset |
| 47 | __u8 flags; | 45 | __u8 flags; |
| 48 | #define VIRTIO_NET_HDR_GSO_NONE 0 // Not a GSO frame | 46 | #define VIRTIO_NET_HDR_GSO_NONE 0 // Not a GSO frame |
diff --git a/include/linux/virtio_ring.h b/include/linux/virtio_ring.h index 693e0ec5afa..e4d144b132b 100644 --- a/include/linux/virtio_ring.h +++ b/include/linux/virtio_ring.h | |||
| @@ -30,8 +30,7 @@ | |||
| 30 | #define VIRTIO_RING_F_INDIRECT_DESC 28 | 30 | #define VIRTIO_RING_F_INDIRECT_DESC 28 |
| 31 | 31 | ||
| 32 | /* Virtio ring descriptors: 16 bytes. These can chain together via "next". */ | 32 | /* Virtio ring descriptors: 16 bytes. These can chain together via "next". */ |
| 33 | struct vring_desc | 33 | struct vring_desc { |
| 34 | { | ||
| 35 | /* Address (guest-physical). */ | 34 | /* Address (guest-physical). */ |
| 36 | __u64 addr; | 35 | __u64 addr; |
| 37 | /* Length. */ | 36 | /* Length. */ |
| @@ -42,24 +41,21 @@ struct vring_desc | |||
| 42 | __u16 next; | 41 | __u16 next; |
| 43 | }; | 42 | }; |
| 44 | 43 | ||
| 45 | struct vring_avail | 44 | struct vring_avail { |
| 46 | { | ||
| 47 | __u16 flags; | 45 | __u16 flags; |
| 48 | __u16 idx; | 46 | __u16 idx; |
| 49 | __u16 ring[]; | 47 | __u16 ring[]; |
| 50 | }; | 48 | }; |
| 51 | 49 | ||
| 52 | /* u32 is used here for ids for padding reasons. */ | 50 | /* u32 is used here for ids for padding reasons. */ |
| 53 | struct vring_used_elem | 51 | struct vring_used_elem { |
| 54 | { | ||
| 55 | /* Index of start of used descriptor chain. */ | 52 | /* Index of start of used descriptor chain. */ |
| 56 | __u32 id; | 53 | __u32 id; |
| 57 | /* Total length of the descriptor chain which was used (written to) */ | 54 | /* Total length of the descriptor chain which was used (written to) */ |
| 58 | __u32 len; | 55 | __u32 len; |
| 59 | }; | 56 | }; |
| 60 | 57 | ||
| 61 | struct vring_used | 58 | struct vring_used { |
| 62 | { | ||
| 63 | __u16 flags; | 59 | __u16 flags; |
| 64 | __u16 idx; | 60 | __u16 idx; |
| 65 | struct vring_used_elem ring[]; | 61 | struct vring_used_elem ring[]; |
