OSDN Git Service

habanalabs: remove DMA mask hack for Goya
authorOded Gabbay <oded.gabbay@gmail.com>
Wed, 29 May 2019 14:58:38 +0000 (17:58 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Wed, 29 May 2019 14:58:38 +0000 (17:58 +0300)
commit2a51558c8c7f8275b16db918bf3a33108bc0cd2d
tree3aee2d840902b50c83c1fd1cb7880c3023a50609
parentf09415f507c478a0916647b3af62720c8fab0d53
habanalabs: remove DMA mask hack for Goya

This patch removes the non-standard DMA mask setting for Goya. Now that
the device CPU goes through the MMU, we are not limited to allocating the
CPU accessible memory area in the address space of under 39 bits.
Therefore, we don't need to set the DMA masking twice during
initialization, a practice that is not working on POWER architecture.

The patch sets the DMA mask to 48 bits once during the initialization. The
address of the CPU accessible memory area is configured to the MMU and the
matching VA is given to the device CPU.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/goya/goya.c