diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2009-12-07 12:36:18 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-12-10 00:09:03 -0500 |
commit | 98ffc4158e12008102cb6ae242a7fc46f9243f0d (patch) | |
tree | fa8b231281fac87afe88ab9a0539c6ab5cdc2100 /include | |
parent | 312ea8da049a1830aa50c6e00002e50e30df476e (diff) |
drm/ttm: Have the TTM code return -ERESTARTSYS instead of -ERESTART.
Return -ERESTARTSYS instead of -ERESTART when interrupted by a signal.
The -ERESTARTSYS is converted to an -EINTR by the kernel signal layer
before returned to user-space.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/drm/ttm/ttm_bo_api.h | 14 | ||||
-rw-r--r-- | include/drm/ttm/ttm_bo_driver.h | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h index 2f7f56da2147..4fd498523ce3 100644 --- a/include/drm/ttm/ttm_bo_api.h +++ b/include/drm/ttm/ttm_bo_api.h | |||
@@ -303,7 +303,7 @@ ttm_bo_reference(struct ttm_buffer_object *bo) | |||
303 | * Note: It might be necessary to block validations before the | 303 | * Note: It might be necessary to block validations before the |
304 | * wait by reserving the buffer. | 304 | * wait by reserving the buffer. |
305 | * Returns -EBUSY if no_wait is true and the buffer is busy. | 305 | * Returns -EBUSY if no_wait is true and the buffer is busy. |
306 | * Returns -ERESTART if interrupted by a signal. | 306 | * Returns -ERESTARTSYS if interrupted by a signal. |
307 | */ | 307 | */ |
308 | extern int ttm_bo_wait(struct ttm_buffer_object *bo, bool lazy, | 308 | extern int ttm_bo_wait(struct ttm_buffer_object *bo, bool lazy, |
309 | bool interruptible, bool no_wait); | 309 | bool interruptible, bool no_wait); |
@@ -321,7 +321,7 @@ extern int ttm_bo_wait(struct ttm_buffer_object *bo, bool lazy, | |||
321 | * -EINVAL on invalid proposed placement. | 321 | * -EINVAL on invalid proposed placement. |
322 | * -ENOMEM on out-of-memory condition. | 322 | * -ENOMEM on out-of-memory condition. |
323 | * -EBUSY if no_wait is true and buffer busy. | 323 | * -EBUSY if no_wait is true and buffer busy. |
324 | * -ERESTART if interrupted by a signal. | 324 | * -ERESTARTSYS if interrupted by a signal. |
325 | */ | 325 | */ |
326 | extern int ttm_buffer_object_validate(struct ttm_buffer_object *bo, | 326 | extern int ttm_buffer_object_validate(struct ttm_buffer_object *bo, |
327 | struct ttm_placement *placement, | 327 | struct ttm_placement *placement, |
@@ -347,7 +347,7 @@ extern void ttm_bo_unref(struct ttm_buffer_object **bo); | |||
347 | * waiting for buffer idle. This lock is recursive. | 347 | * waiting for buffer idle. This lock is recursive. |
348 | * Returns | 348 | * Returns |
349 | * -EBUSY if the buffer is busy and no_wait is true. | 349 | * -EBUSY if the buffer is busy and no_wait is true. |
350 | * -ERESTART if interrupted by a signal. | 350 | * -ERESTARTSYS if interrupted by a signal. |
351 | */ | 351 | */ |
352 | 352 | ||
353 | extern int | 353 | extern int |
@@ -390,7 +390,7 @@ extern void ttm_bo_synccpu_write_release(struct ttm_buffer_object *bo); | |||
390 | * Returns | 390 | * Returns |
391 | * -ENOMEM: Out of memory. | 391 | * -ENOMEM: Out of memory. |
392 | * -EINVAL: Invalid placement flags. | 392 | * -EINVAL: Invalid placement flags. |
393 | * -ERESTART: Interrupted by signal while sleeping waiting for resources. | 393 | * -ERESTARTSYS: Interrupted by signal while sleeping waiting for resources. |
394 | */ | 394 | */ |
395 | 395 | ||
396 | extern int ttm_buffer_object_init(struct ttm_bo_device *bdev, | 396 | extern int ttm_buffer_object_init(struct ttm_bo_device *bdev, |
@@ -430,7 +430,7 @@ extern int ttm_buffer_object_init(struct ttm_bo_device *bdev, | |||
430 | * Returns | 430 | * Returns |
431 | * -ENOMEM: Out of memory. | 431 | * -ENOMEM: Out of memory. |
432 | * -EINVAL: Invalid placement flags. | 432 | * -EINVAL: Invalid placement flags. |
433 | * -ERESTART: Interrupted by signal while waiting for resources. | 433 | * -ERESTARTSYS: Interrupted by signal while waiting for resources. |
434 | */ | 434 | */ |
435 | 435 | ||
436 | extern int ttm_buffer_object_create(struct ttm_bo_device *bdev, | 436 | extern int ttm_buffer_object_create(struct ttm_bo_device *bdev, |
@@ -521,7 +521,7 @@ extern int ttm_bo_clean_mm(struct ttm_bo_device *bdev, unsigned mem_type); | |||
521 | * | 521 | * |
522 | * Returns: | 522 | * Returns: |
523 | * -EINVAL: Invalid or uninitialized memory type. | 523 | * -EINVAL: Invalid or uninitialized memory type. |
524 | * -ERESTART: The call was interrupted by a signal while waiting to | 524 | * -ERESTARTSYS: The call was interrupted by a signal while waiting to |
525 | * evict a buffer. | 525 | * evict a buffer. |
526 | */ | 526 | */ |
527 | 527 | ||
@@ -624,7 +624,7 @@ extern int ttm_bo_mmap(struct file *filp, struct vm_area_struct *vma, | |||
624 | * be called from the fops::read and fops::write method. | 624 | * be called from the fops::read and fops::write method. |
625 | * Returns: | 625 | * Returns: |
626 | * See man (2) write, man(2) read. In particular, | 626 | * See man (2) write, man(2) read. In particular, |
627 | * the function may return -EINTR if | 627 | * the function may return -ERESTARTSYS if |
628 | * interrupted by a signal. | 628 | * interrupted by a signal. |
629 | */ | 629 | */ |
630 | 630 | ||
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index fa5c9e51ee7e..ff7664e0c3cd 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h | |||
@@ -638,7 +638,7 @@ extern bool ttm_mem_reg_is_pci(struct ttm_bo_device *bdev, | |||
638 | * -EBUSY: No space available (only if no_wait == 1). | 638 | * -EBUSY: No space available (only if no_wait == 1). |
639 | * -ENOMEM: Could not allocate memory for the buffer object, either due to | 639 | * -ENOMEM: Could not allocate memory for the buffer object, either due to |
640 | * fragmentation or concurrent allocators. | 640 | * fragmentation or concurrent allocators. |
641 | * -ERESTART: An interruptible sleep was interrupted by a signal. | 641 | * -ERESTARTSYS: An interruptible sleep was interrupted by a signal. |
642 | */ | 642 | */ |
643 | extern int ttm_bo_mem_space(struct ttm_buffer_object *bo, | 643 | extern int ttm_bo_mem_space(struct ttm_buffer_object *bo, |
644 | struct ttm_placement *placement, | 644 | struct ttm_placement *placement, |
@@ -653,7 +653,7 @@ extern int ttm_bo_mem_space(struct ttm_buffer_object *bo, | |||
653 | * Wait until a buffer object is no longer sync'ed for CPU access. | 653 | * Wait until a buffer object is no longer sync'ed for CPU access. |
654 | * Returns: | 654 | * Returns: |
655 | * -EBUSY: Buffer object was sync'ed for CPU access. (only if no_wait == 1). | 655 | * -EBUSY: Buffer object was sync'ed for CPU access. (only if no_wait == 1). |
656 | * -ERESTART: An interruptible sleep was interrupted by a signal. | 656 | * -ERESTARTSYS: An interruptible sleep was interrupted by a signal. |
657 | */ | 657 | */ |
658 | 658 | ||
659 | extern int ttm_bo_wait_cpu(struct ttm_buffer_object *bo, bool no_wait); | 659 | extern int ttm_bo_wait_cpu(struct ttm_buffer_object *bo, bool no_wait); |
@@ -757,7 +757,7 @@ extern void ttm_bo_unmap_virtual(struct ttm_buffer_object *bo); | |||
757 | * -EAGAIN: The reservation may cause a deadlock. | 757 | * -EAGAIN: The reservation may cause a deadlock. |
758 | * Release all buffer reservations, wait for @bo to become unreserved and | 758 | * Release all buffer reservations, wait for @bo to become unreserved and |
759 | * try again. (only if use_sequence == 1). | 759 | * try again. (only if use_sequence == 1). |
760 | * -ERESTART: A wait for the buffer to become unreserved was interrupted by | 760 | * -ERESTARTSYS: A wait for the buffer to become unreserved was interrupted by |
761 | * a signal. Release all buffer reservations and return to user-space. | 761 | * a signal. Release all buffer reservations and return to user-space. |
762 | */ | 762 | */ |
763 | extern int ttm_bo_reserve(struct ttm_buffer_object *bo, | 763 | extern int ttm_bo_reserve(struct ttm_buffer_object *bo, |
@@ -798,7 +798,7 @@ extern int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo, | |||
798 | * | 798 | * |
799 | * Returns: | 799 | * Returns: |
800 | * -EBUSY: If no_wait == 1 and the buffer is already reserved. | 800 | * -EBUSY: If no_wait == 1 and the buffer is already reserved. |
801 | * -ERESTART: If interruptible == 1 and the process received a signal | 801 | * -ERESTARTSYS: If interruptible == 1 and the process received a signal |
802 | * while sleeping. | 802 | * while sleeping. |
803 | */ | 803 | */ |
804 | extern int ttm_bo_block_reservation(struct ttm_buffer_object *bo, | 804 | extern int ttm_bo_block_reservation(struct ttm_buffer_object *bo, |