rk322x: fix patches for rk322x legacy kernel 4.4

This commit is contained in:
Paolo Sabatino 2023-04-30 14:42:30 +02:00 committed by Ricardo Pardini
parent 7a5cd0b246
commit 51b884a441
3 changed files with 5033 additions and 5363 deletions

File diff suppressed because it is too large Load Diff

View File

@ -2656,27 +2656,3 @@ index c3bd238b0c22..a25ab357b87c 100644
thrd->free = true;
}
From 31c885c621005218388ca68648dec38d2ea3f9a2 Mon Sep 17 00:00:00 2001
From: John Keeping <john@metanate.com>
Date: Tue, 17 Jul 2018 11:48:16 +0100
Subject: [PATCH] dmaengine: pl330: fix irq race with terminate_all
In pl330_update() when checking if a channel has been aborted, the
channel's lock is not taken, only the overall pl330_dmac lock. But in
pl330_terminate_all() the aborted flag (req_running==-1) is set under
the channel lock and not the pl330_dmac lock.
With threaded interrupts, this leads to a potential race:
pl330_terminate_all pl330_update
------------------- ------------
lock channel
entry
lock pl330
_stop channel
unlock pl330
lock pl330
check req_running != -1
req_running = -1
_start channel

View File

@ -168,7 +168,7 @@ index f86faef..e1df615 100644
-EXTRA_CFLAGS := -I$(KBUILD_TOP) -I$(KBUILD_TOP)/include
+EXTRA_CFLAGS := -I$(KBUILD_TOP) -I$(KBUILD_TOP)/include -Wno-error=missing-attributes
+EXTRA_CFLAGS := -I$(KBUILD_TOP) -I$(KBUILD_TOP)/include -Wno-error=missing-attributes -Wno-error=array-bounds
DEF_PARSER_H = $(KBUILD_TOP)/include/ssv_conf_parser.h
$(shell env ccflags="$(ccflags-y)" $(KBUILD_TOP)/parser-conf.sh $(DEF_PARSER_H))