diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2009-07-30 13:38:04 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2009-07-30 13:38:04 -0400 |
commit | 2e6713c7662cc5ebc7346b033c404cb2f708fd51 (patch) | |
tree | 8492ea548fea2d8243e4af4b877906afc4e32783 /include | |
parent | b4093d6235b7e4249616651ee328600ced48a18a (diff) | |
parent | 658874f05d040ca96eb5ba9b1c30ce0ff287d762 (diff) |
Merge branch 'master' into for-linus
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/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 |
10 files changed, 123 insertions, 19 deletions
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h index 41862e9a4c20..af4b4826997e 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 62ed733c52a2..a68829db381a 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 889a4c7958ae..d1d433834e4f 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 665fa70e4094..90bba9e62286 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 000000000000..23c1ec79a31b --- /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 0872372184fe..a36ffa5a77a4 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/libata.h b/include/linux/libata.h index 79b6d7fd4ac2..e5b6e33c6571 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 cfe5c7214ec6..0194ab06177b 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 1488d8c81aac..e8c6c9136c97 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 b7fe13883bdb..98c114323a8b 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 |