habanalabs: enforce alignment upon registers access through debugfs
authorDafna Hirschfeld <dhirschfeld@habana.ai>
Wed, 16 Mar 2022 17:45:24 +0000 (19:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 May 2022 19:01:16 +0000 (21:01 +0200)
commit9248aa90d2fa0a03955f0813d17accde9e1f0751
tree3de2a9fbc2f84177fa403a475afa3b9a9753ad58
parentee8a10c833c4a49720055f23eeb215352b969bda
habanalabs: enforce alignment upon registers access through debugfs

When accessing the configuration registers through debugfs,
it is only allowed to access aligned address.
Fail if address is not aligned.

Signed-off-by: Dafna Hirschfeld <dhirschfeld@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/habanalabs/common/device.c