diff options
author | Ohad Sharabi <osharabi@habana.ai> | 2022-06-25 23:36:13 +0300 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2022-07-12 09:09:26 +0300 |
commit | fce854e9bc244da700f71a90f5c2c4b7e7002f8f (patch) | |
tree | d412dc4b9089b92ced52cf0774f3e4b95e73a725 /drivers/misc/habanalabs/common/memory.c | |
parent | a74cf4a8f61bcb82a4c9b7c8d29f29f003b826ae (diff) | |
download | linux-fce854e9bc244da700f71a90f5c2c4b7e7002f8f.tar.xz |
habanalabs: communicate supported page sizes to user
Because in future ASICs the driver will allow the user to set the
page size we need to make sure this data is propagated in all APIs.
In addition, since this is already an ASIC property we no longer need
ASIC function for it.
Signed-off-by: Ohad Sharabi <osharabi@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/common/memory.c')
-rw-r--r-- | drivers/misc/habanalabs/common/memory.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/habanalabs/common/memory.c b/drivers/misc/habanalabs/common/memory.c index bc921f32716a..0964c26d717c 100644 --- a/drivers/misc/habanalabs/common/memory.c +++ b/drivers/misc/habanalabs/common/memory.c @@ -27,7 +27,7 @@ static int allocate_timestamps_buffers(struct hl_fpriv *hpriv, static int set_alloc_page_size(struct hl_device *hdev, struct hl_mem_in *args, u32 *page_size) { struct asic_fixed_properties *prop = &hdev->asic_prop; - u32 psize; + u64 psize; /* * for ASIC that supports setting the allocation page size by user we will address @@ -37,7 +37,7 @@ static int set_alloc_page_size(struct hl_device *hdev, struct hl_mem_in *args, u psize = args->alloc.page_size; if (!is_power_of_2(psize)) { - dev_err(hdev->dev, "user page size (%#x) is not power of 2\n", psize); + dev_err(hdev->dev, "user page size (%#llx) is not power of 2\n", psize); return -EINVAL; } } else { |