From: Xianting Tian Date: Fri, 15 Oct 2021 02:46:56 +0000 (+0800) Subject: tty: hvc: use correct dma alignment size X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=30480f65b575631ea5ac8172174f492bd1342ab5;p=linux.git tty: hvc: use correct dma alignment size Use L1_CACHE_BYTES as the dma alignment size, use 'sizeof(long)' as dma alignment is wrong. Signed-off-by: Xianting Tian Signed-off-by: Shile Zhang Link: https://lore.kernel.org/r/20211015024658.1353987-2-xianting.tian@linux.alibaba.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c index 7b30d5a05e2f5..4802cfaa107fc 100644 --- a/drivers/tty/hvc/hvc_console.c +++ b/drivers/tty/hvc/hvc_console.c @@ -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;