2020-02-23 12:20:11 +00:00
|
|
|
From e3692cb2fcd5ba1244512a0f43b8118f65f1c375 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Felix Fietkau <nbd@nbd.name>
|
|
|
|
Date: Sat, 8 Jul 2017 08:20:43 +0200
|
|
|
|
Subject: debloat: dmabuf
|
|
|
|
|
|
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
---
|
|
|
|
drivers/base/Kconfig | 2 +-
|
|
|
|
drivers/dma-buf/Makefile | 10 +++++++---
|
|
|
|
drivers/dma-buf/dma-buf.c | 4 +++-
|
|
|
|
kernel/sched/core.c | 1 +
|
|
|
|
4 files changed, 12 insertions(+), 5 deletions(-)
|
|
|
|
|
|
|
|
--- a/drivers/base/Kconfig
|
|
|
|
+++ b/drivers/base/Kconfig
|
2019-11-25 15:08:31 +00:00
|
|
|
@@ -179,7 +179,7 @@ config SOC_BUS
|
2020-02-23 12:20:11 +00:00
|
|
|
source "drivers/base/regmap/Kconfig"
|
|
|
|
|
|
|
|
config DMA_SHARED_BUFFER
|
|
|
|
- bool
|
|
|
|
+ tristate
|
|
|
|
default n
|
|
|
|
select IRQ_WORK
|
2019-11-25 15:08:31 +00:00
|
|
|
help
|
2020-02-23 12:20:11 +00:00
|
|
|
--- a/drivers/dma-buf/Makefile
|
|
|
|
+++ b/drivers/dma-buf/Makefile
|
2019-11-25 15:08:31 +00:00
|
|
|
@@ -1,9 +1,13 @@
|
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
-obj-y := dma-buf.o dma-fence.o dma-fence-array.o dma-fence-chain.o \
|
|
|
|
- dma-resv.o seqno-fence.o
|
2020-02-23 12:20:11 +00:00
|
|
|
-obj-$(CONFIG_SYNC_FILE) += sync_file.o
|
|
|
|
-obj-$(CONFIG_SW_SYNC) += sw_sync.o sync_debug.o
|
2019-11-25 15:08:31 +00:00
|
|
|
-obj-$(CONFIG_UDMABUF) += udmabuf.o
|
2020-02-23 12:20:11 +00:00
|
|
|
+obj-$(CONFIG_DMA_SHARED_BUFFER) := dma-shared-buffer.o
|
|
|
|
+
|
2019-11-25 15:08:31 +00:00
|
|
|
+dma-buf-objs-y := dma-buf.o dma-fence.o dma-fence-array.o dma-fence-chain.o \
|
|
|
|
+ dma-resv.o seqno-fence.o
|
|
|
|
+dma-buf-objs-$(CONFIG_SYNC_FILE) += sync_file.o
|
2020-02-23 12:20:11 +00:00
|
|
|
+dma-buf-objs-$(CONFIG_SW_SYNC) += sw_sync.o sync_debug.o
|
2019-11-25 15:08:31 +00:00
|
|
|
+dma-buf-objs-$(CONFIG_UDMABUF) += udmabuf.o
|
2020-02-23 12:20:11 +00:00
|
|
|
+
|
|
|
|
+dma-shared-buffer-objs := $(dma-buf-objs-y)
|
2019-11-25 15:08:31 +00:00
|
|
|
|
|
|
|
dmabuf_selftests-y := \
|
|
|
|
selftest.o \
|
2020-02-23 12:20:11 +00:00
|
|
|
--- a/drivers/dma-buf/dma-buf.c
|
|
|
|
+++ b/drivers/dma-buf/dma-buf.c
|
2021-11-27 19:56:33 +00:00
|
|
|
@@ -1314,4 +1314,5 @@ static void __exit dma_buf_deinit(void)
|
2020-02-23 12:20:11 +00:00
|
|
|
dma_buf_uninit_debugfs();
|
2019-11-25 15:08:31 +00:00
|
|
|
kern_unmount(dma_buf_mnt);
|
2020-02-23 12:20:11 +00:00
|
|
|
}
|
|
|
|
-__exitcall(dma_buf_deinit);
|
|
|
|
+module_exit(dma_buf_deinit);
|
|
|
|
+MODULE_LICENSE("GPL");
|
|
|
|
--- a/kernel/sched/core.c
|
|
|
|
+++ b/kernel/sched/core.c
|
2021-11-27 20:40:46 +00:00
|
|
|
@@ -2770,6 +2770,7 @@ int wake_up_state(struct task_struct *p,
|
2020-02-23 12:20:11 +00:00
|
|
|
{
|
|
|
|
return try_to_wake_up(p, state, 0);
|
|
|
|
}
|
|
|
|
+EXPORT_SYMBOL_GPL(wake_up_state);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Perform scheduler related setup for a newly forked process p.
|
2019-11-25 15:08:31 +00:00
|
|
|
--- a/fs/d_path.c
|
|
|
|
+++ b/fs/d_path.c
|
kernel: bump 5.4 to 5.4.73
Removed upstreamed patches:
generic/pending-5.4
445-mtd-spinand-gigadevice-Only-one-dummy-byte-in-QUA.patch
446-mtd-spinand-gigadevice-Add-QE-Bit.patch
pistachio/patches-5.4
150-pwm-img-Fix-null-pointer-access-in-probe.patch
Manually rebased:
layerscape/patches-5.4
801-audio-0011-Revert-ASoC-fsl_sai-add-of_match-data.patch
801-audio-0039-MLK-16224-6-ASoC-fsl_sai-fix-DSD-suspend-resume.patch
801-audio-0073-MLK-21957-3-ASoC-fsl_sai-add-bitcount-and-timestamp-.patch
820-usb-0009-usb-dwc3-Add-workaround-for-host-mode-VBUS-glitch-wh.patch
All modifications made by update_kernel.sh
Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711,
mvebu (mamba, rango), x86_64, ramips/mt7621
Run-tested: ipq806x/R7800, mvebu (mamba, rango), x86_64, ramips (RT-AC57U)
No dmesg regressions, everything functional
Signed-off-by: John Audia <graysky@archlinux.us>
[alter 820-usb-0009-usb-dwc3-Add-workaround-for-host-mode-VBUS-glitch-wh]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-10-31 11:35:12 +00:00
|
|
|
@@ -311,6 +311,7 @@ char *dynamic_dname(struct dentry *dentr
|
2019-11-25 15:08:31 +00:00
|
|
|
buffer += buflen - sz;
|
|
|
|
return memcpy(buffer, temp, sz);
|
|
|
|
}
|
|
|
|
+EXPORT_SYMBOL_GPL(dynamic_dname);
|
|
|
|
|
|
|
|
char *simple_dname(struct dentry *dentry, char *buffer, int buflen)
|
|
|
|
{
|