Char/Misc driver fix for 5.18-rc2
Here is a single driver fix for 5.18-rc2. It resolves the build warning issue on 32bit systems in the habannalabs driver that came in during the 5.18-rc1 merge cycle. It has been in linux-next for all this week with no reported problems. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCYlK+5Q8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+ykTKQCgoOU9/+9EiS3crSlFzo24SdomjKAAoL1nQoN9 2s4KLX25ynnincGifSr5 =VVFs -----END PGP SIGNATURE----- Merge tag 'char-misc-5.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fix from Greg KH: "A single driver fix. It resolves the build warning issue on 32bit systems in the habannalabs driver that came in during the 5.18-rc1 merge cycle. It has been in linux-next for all this week with no reported problems" * tag 'char-misc-5.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: habanalabs: Fix test build failures
This commit is contained in:
commit
f58d3410c5
|
@ -111,10 +111,10 @@ static int alloc_device_memory(struct hl_ctx *ctx, struct hl_mem_in *args,
|
|||
|
||||
if (contiguous) {
|
||||
if (is_power_of_2(page_size))
|
||||
paddr = (u64) (uintptr_t) gen_pool_dma_alloc_align(vm->dram_pg_pool,
|
||||
total_size, NULL, page_size);
|
||||
paddr = (uintptr_t) gen_pool_dma_alloc_align(vm->dram_pg_pool,
|
||||
total_size, NULL, page_size);
|
||||
else
|
||||
paddr = (u64) (uintptr_t) gen_pool_alloc(vm->dram_pg_pool, total_size);
|
||||
paddr = gen_pool_alloc(vm->dram_pg_pool, total_size);
|
||||
if (!paddr) {
|
||||
dev_err(hdev->dev,
|
||||
"failed to allocate %llu contiguous pages with total size of %llu\n",
|
||||
|
@ -150,12 +150,12 @@ static int alloc_device_memory(struct hl_ctx *ctx, struct hl_mem_in *args,
|
|||
for (i = 0 ; i < num_pgs ; i++) {
|
||||
if (is_power_of_2(page_size))
|
||||
phys_pg_pack->pages[i] =
|
||||
(u64) gen_pool_dma_alloc_align(vm->dram_pg_pool,
|
||||
page_size, NULL,
|
||||
page_size);
|
||||
(uintptr_t)gen_pool_dma_alloc_align(vm->dram_pg_pool,
|
||||
page_size, NULL,
|
||||
page_size);
|
||||
else
|
||||
phys_pg_pack->pages[i] = (u64) gen_pool_alloc(vm->dram_pg_pool,
|
||||
page_size);
|
||||
phys_pg_pack->pages[i] = gen_pool_alloc(vm->dram_pg_pool,
|
||||
page_size);
|
||||
if (!phys_pg_pack->pages[i]) {
|
||||
dev_err(hdev->dev,
|
||||
"Failed to allocate device memory (out of memory)\n");
|
||||
|
|
Loading…
Reference in New Issue