Skip to content

Commit 9bf5b9e

Browse files
Christoph Hellwigtorvalds
authored andcommitted
kernel: move use_mm/unuse_mm to kthread.c
Patch series "improve use_mm / unuse_mm", v2. This series improves the use_mm / unuse_mm interface by better documenting the assumptions, and my taking the set_fs manipulations spread over the callers into the core API. This patch (of 3): Use the proper API instead. Link: http://lkml.kernel.org/r/[email protected] These helpers are only for use with kernel threads, and I will tie them more into the kthread infrastructure going forward. Also move the prototypes to kthread.h - mmu_context.h was a little weird to start with as it otherwise contains very low-level MM bits. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Tested-by: Jens Axboe <[email protected]> Reviewed-by: Jens Axboe <[email protected]> Acked-by: Felix Kuehling <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Al Viro <[email protected]> Cc: Felipe Balbi <[email protected]> Cc: Jason Wang <[email protected]> Cc: "Michael S. Tsirkin" <[email protected]> Cc: Zhenyu Wang <[email protected]> Cc: Zhi Wang <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Link: http://lkml.kernel.org/r/[email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent 2c34f6f commit 9bf5b9e

File tree

18 files changed

+66
-85
lines changed

18 files changed

+66
-85
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
#include <linux/types.h>
2929
#include <linux/mm.h>
30+
#include <linux/kthread.h>
3031
#include <linux/workqueue.h>
3132
#include <kgd_kfd_interface.h>
3233
#include <drm/ttm/ttm_execbuf_util.h>

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include <linux/module.h>
2323
#include <linux/fdtable.h>
2424
#include <linux/uaccess.h>
25-
#include <linux/mmu_context.h>
2625
#include <linux/firmware.h>
2726
#include "amdgpu.h"
2827
#include "amdgpu_amdkfd.h"

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2020
* OTHER DEALINGS IN THE SOFTWARE.
2121
*/
22-
#include <linux/mmu_context.h>
2322
#include "amdgpu.h"
2423
#include "amdgpu_amdkfd.h"
2524
#include "gc/gc_10_1_0_offset.h"

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
* OTHER DEALINGS IN THE SOFTWARE.
2121
*/
2222

23-
#include <linux/mmu_context.h>
24-
2523
#include "amdgpu.h"
2624
#include "amdgpu_amdkfd.h"
2725
#include "cikd.h"

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
* OTHER DEALINGS IN THE SOFTWARE.
2121
*/
2222

23-
#include <linux/mmu_context.h>
24-
2523
#include "amdgpu.h"
2624
#include "amdgpu_amdkfd.h"
2725
#include "gfx_v8_0.h"

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2020
* OTHER DEALINGS IN THE SOFTWARE.
2121
*/
22-
#include <linux/mmu_context.h>
23-
2422
#include "amdgpu.h"
2523
#include "amdgpu_amdkfd.h"
2624
#include "gc/gc_9_0_offset.h"

drivers/gpu/drm/i915/gvt/kvmgt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <linux/init.h>
3232
#include <linux/device.h>
3333
#include <linux/mm.h>
34-
#include <linux/mmu_context.h>
34+
#include <linux/kthread.h>
3535
#include <linux/sched/mm.h>
3636
#include <linux/types.h>
3737
#include <linux/list.h>

drivers/usb/gadget/function/f_fs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include <linux/usb/functionfs.h>
3333

3434
#include <linux/aio.h>
35-
#include <linux/mmu_context.h>
35+
#include <linux/kthread.h>
3636
#include <linux/poll.h>
3737
#include <linux/eventfd.h>
3838

drivers/usb/gadget/legacy/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <linux/sched.h>
2222
#include <linux/slab.h>
2323
#include <linux/poll.h>
24-
#include <linux/mmu_context.h>
24+
#include <linux/kthread.h>
2525
#include <linux/aio.h>
2626
#include <linux/uio.h>
2727
#include <linux/refcount.h>

drivers/vhost/vhost.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include <linux/vhost.h>
1515
#include <linux/uio.h>
1616
#include <linux/mm.h>
17-
#include <linux/mmu_context.h>
1817
#include <linux/miscdevice.h>
1918
#include <linux/mutex.h>
2019
#include <linux/poll.h>

0 commit comments

Comments
 (0)