diff options
author | Dave Airlie <airlied@redhat.com> | 2014-12-08 13:40:51 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-12-08 13:40:51 +1000 |
commit | b00ff043d164bba5d43cbac42bdf0aeeb43fbda8 (patch) | |
tree | 11e8e7f2da2dee3753f60a6057255078c209d355 /drivers/gpu | |
parent | 8c8639447063ddaa7966b0effd6029037fc86599 (diff) | |
parent | a18069c132cb0d065ff23c05977d06ea0c78404f (diff) | |
download | linux-stable-b00ff043d164bba5d43cbac42bdf0aeeb43fbda8.tar.gz linux-stable-b00ff043d164bba5d43cbac42bdf0aeeb43fbda8.tar.bz2 linux-stable-b00ff043d164bba5d43cbac42bdf0aeeb43fbda8.zip |
Merge branch 'amdkfd-next-3.19' of git://people.freedesktop.org/~gabbayo/linux into drm-next
As discussed on irc, I'm sending a pull request with one important change:
- Disable support for 32-bit user processes. This is done due to AMD's decision
to remove support for 32-bit user processes on Linux for its HSA stack.
* 'amdkfd-next-3.19' of git://people.freedesktop.org/~gabbayo/linux:
amdkfd: Disable support for 32-bit user processes
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c index 102cd36799b1..4f7b275f2f7b 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c @@ -102,15 +102,26 @@ struct device *kfd_chardev(void) static int kfd_open(struct inode *inode, struct file *filep) { struct kfd_process *process; + bool is_32bit_user_mode; if (iminor(inode) != 0) return -ENODEV; + is_32bit_user_mode = is_compat_task(); + + if (is_32bit_user_mode == true) { + dev_warn(kfd_device, + "Process %d (32-bit) failed to open /dev/kfd\n" + "32-bit processes are not supported by amdkfd\n", + current->pid); + return -EPERM; + } + process = kfd_create_process(current); if (IS_ERR(process)) return PTR_ERR(process); - process->is_32bit_user_mode = is_compat_task(); + process->is_32bit_user_mode = is_32bit_user_mode; dev_dbg(kfd_device, "process %d opened, compat mode (32 bit) - %d\n", process->pasid, process->is_32bit_user_mode); |