]> git.baikalelectronics.ru Git - kernel.git/commitdiff
tty: hvc: use correct dma alignment size
authorXianting Tian <xianting.tian@linux.alibaba.com>
Fri, 15 Oct 2021 02:46:56 +0000 (10:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Oct 2021 08:34:30 +0000 (10:34 +0200)
Use L1_CACHE_BYTES as the dma alignment size, use 'sizeof(long)' as
dma alignment is wrong.

Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>
Signed-off-by: Shile Zhang <shile.zhang@linux.alibaba.com>
Link: https://lore.kernel.org/r/20211015024658.1353987-2-xianting.tian@linux.alibaba.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/hvc/hvc_console.c

index 7b30d5a05e2f5bdf0e01d86664e12ae5a5e14d38..4802cfaa107fce88cbfb5907b52c9e93fb6ed503 100644 (file)
@@ -49,7 +49,7 @@
 #define N_OUTBUF       16
 #define N_INBUF                16
 
-#define __ALIGNED__ __attribute__((__aligned__(sizeof(long))))
+#define __ALIGNED__ __attribute__((__aligned__(L1_CACHE_BYTES)))
 
 static struct tty_driver *hvc_driver;
 static struct task_struct *hvc_task;