summaryrefslogtreecommitdiffstats
path: root/include/uapi/misc
diff options
context:
space:
mode:
authorOded Gabbay2019-02-26 23:19:18 +0100
committerGreg Kroah-Hartman2019-02-27 16:00:20 +0100
commit230afe74d139f37ba5e344ad4e53d65911d12188 (patch)
tree0102fcdc091178a3f2cafe94220bb2dab6cfdc3e /include/uapi/misc
parentmic: vop: Allow building on more systems (diff)
downloadkernel-qcow2-linux-230afe74d139f37ba5e344ad4e53d65911d12188.tar.gz
kernel-qcow2-linux-230afe74d139f37ba5e344ad4e53d65911d12188.tar.xz
kernel-qcow2-linux-230afe74d139f37ba5e344ad4e53d65911d12188.zip
habanalabs: allow memory allocations larger than 4GB
This patch increase the size field in the uapi structure of the Memory IOCTL from 32-bit to 64-bit. This is to allow the user to allocate and/or map memory in chunks that are larger then 4GB. Goya's device memory (DRAM) can be up to 16GB, and for certain topologies, the user may want an allocation that is larger than 4GB. This change doesn't break current user-space because there was a "pad" field in the uapi structure right after the size field. Changing the size field to be 64-bit and removing the pad field maintains compatibility with current user-space. Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/uapi/misc')
-rw-r--r--include/uapi/misc/habanalabs.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/uapi/misc/habanalabs.h b/include/uapi/misc/habanalabs.h
index 4afc1891ece8..23d6ad3459cb 100644
--- a/include/uapi/misc/habanalabs.h
+++ b/include/uapi/misc/habanalabs.h
@@ -237,8 +237,7 @@ struct hl_mem_in {
/* HL_MEM_OP_ALLOC- allocate device memory */
struct {
/* Size to alloc */
- __u32 mem_size;
- __u32 pad;
+ __u64 mem_size;
} alloc;
/* HL_MEM_OP_FREE - free device memory */
@@ -278,8 +277,7 @@ struct hl_mem_in {
*/
__u64 hint_addr;
/* Size of allocated host memory */
- __u32 mem_size;
- __u32 pad;
+ __u64 mem_size;
} map_host;
/* HL_MEM_OP_UNMAP - unmap host memory */