linux/kernel
Yunfei Wang 5146690a6c ANDROID: dma/debug: fix warning of check_sync
check_sync() checks for whether device driver DMA sync sg list entry count equals to map sg list entry count, but in struct dma_buf_ops, there has below interface:
 int (*begin_cpu_access_partial)
 int (*end_cpu_access_partial)

When vendor implement these interface in dma heap to support dma-buf partial cache sync for performance improvement, in dma_buf_ops of heap, we copy a sgtable from orginal sgtable but with necessary nents, it will less then nents used in map attachment, in the way, the following warning had occurred:
DMA-API: device_xxx: device driver syncs DMA sg list with different entry count [map count=5] [sync count=1]
Call trace:
 check_sync+0x6d8/0xb40
 debug_dma_sync_sg_for_cpu+0x114/0x16c
 dma_sync_sg_for_cpu+0xa0/0xe4

So need change check conditation in check_sync to support dma-buf partial cache sync.

Bug: 236343688
Signed-off-by: Mingyuan Ma <mingyuan.ma@mediatek.com>
Signed-off-by: Yunfei Wang <yf.wang@mediatek.com>
Change-Id: I2f4db3b156e752eeb022927957f77a3fa534a573
(cherry picked from commit d61fe3ad4bab3f4bc040e7ac0c7ec919b50e8a43)
2022-06-22 19:59:42 +00:00
..
bpf This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
cgroup This is the 5.10.109 stable release 2022-03-28 10:10:32 +02:00
configs
debug kdb: Fix the putarea helper function 2022-04-08 14:40:29 +02:00
dma ANDROID: dma/debug: fix warning of check_sync 2022-06-22 19:59:42 +00:00
entry
events This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
gcov
irq
kcsan
livepatch livepatch: Fix build failure on 32 bits processors 2022-04-08 14:40:15 +02:00
locking Merge tag 'android12-5.10.110_r01' into android12-5.10 2022-05-27 09:24:14 -07:00
power This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
printk This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
rcu This is the 5.10.109 stable release 2022-03-28 10:10:32 +02:00
sched This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
time BACKPORT: timers: implement usleep_idle_range() 2022-04-28 23:09:17 +08:00
trace Merge tag 'android12-5.10.101_r00' into android12-5.10 2022-03-21 14:29:02 +01:00
.gitignore
acct.c
async.c Revert "module, async: async_synchronize_full() on module init iff async is used" 2022-02-23 12:01:00 +01:00
audit_fsnotify.c
audit_tree.c
audit_watch.c
audit.c audit: improve audit queue handling when "audit=1" on cmdline 2022-02-08 18:30:34 +01:00
audit.h audit: log AUDIT_TIME_* records only from rules 2022-04-08 14:40:00 +02:00
auditfilter.c
auditsc.c audit: log AUDIT_TIME_* records only from rules 2022-04-08 14:40:00 +02:00
backtracetest.c
bounds.c
capability.c
cfi.c
compat.c
configs.c
context_tracking.c
cpu_pm.c
cpu.c Merge branch 'android12-5.10' into android12-5.10-lts 2022-02-09 18:16:30 +01:00
crash_core.c
crash_dump.c
cred.c
delayacct.c
dma.c
exec_domain.c
exit.c
extable.c
fail_function.c
fork.c Merge branch 'android12-5.10' into android12-5.10-lts 2022-03-21 16:49:21 +01:00
freezer.c
futex.c
gen_kheaders.sh
groups.c
hung_task.c
iomem.c
irq_work.c
jump_label.c
kallsyms.c
kcmp.c
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt
kcov.c
kexec_core.c
kexec_elf.c
kexec_file.c
kexec_internal.h
kexec.c
kheaders.c
kmod.c
kprobes.c
ksysfs.c
kthread.c
latencytop.c
Makefile
module_signature.c
module_signing.c
module-internal.h
module.c This is the 5.10.102 stable release 2022-02-23 12:56:37 +01:00
notifier.c
nsproxy.c
padata.c
panic.c
params.c
pid_namespace.c
pid.c
profile.c
ptrace.c ptrace: Check PTRACE_O_SUSPEND_SECCOMP permission on PTRACE_SEIZE 2022-04-08 14:39:50 +02:00
range.c
reboot.c
regset.c
relay.c
resource.c
rseq.c rseq: Remove broken uapi field layout on 32-bit little endian 2022-04-08 14:40:03 +02:00
scftorture.c
scs.c
seccomp.c
signal.c ANDROID: signal: Add vendor hook for memory reaping 2022-05-11 18:12:20 +00:00
smp.c
smpboot.c
smpboot.h
softirq.c
stackleak.c gcc-plugins/stackleak: Use noinstr in favor of notrace 2022-02-23 12:01:00 +01:00
stacktrace.c
static_call.c
stop_machine.c
sys_ni.c
sys.c
sysctl-test.c
sysctl.c Merge d04937ae94 ("x86/speculation: Warn about eIBRS + LFENCE + Unprivileged eBPF + SMT") into android12-5.10-lts 2022-03-14 19:56:31 +01:00
task_work.c
taskstats.c
test_kprobes.c
torture.c
tracepoint.c
tsacct.c taskstats: Cleanup the use of task->exit_code 2022-01-27 10:54:33 +01:00
ucount.c
uid16.c
uid16.h
umh.c
up.c
user_namespace.c
user-return-notifier.c
user.c
usermode_driver.c
utsname_sysctl.c
utsname.c
watch_queue.c watch_queue: Free the page array when watch_queue is dismantled 2022-04-08 14:40:41 +02:00
watchdog_hld.c
watchdog.c
workqueue_internal.h
workqueue.c Merge branch 'android12-5.10' into android12-5.10-lts 2022-02-09 18:16:30 +01:00