mm: move aml_smmu ko to memory_debug directory. [1/1]

PD#SWPL-150034

Problem:
reduce the ko number.

Solution:
move aml_smmu ko to memory_debug directory.

Verify:
local.

Change-Id: If537a6a6493a9944319caa344ad8e3a73c294179
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
This commit is contained in:
Jianxiong Pan
2024-01-18 15:11:08 +08:00
parent 358d933a32
commit ea5f9fa169
11 changed files with 29 additions and 20 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ MODULE_NAME = amlogic-memory-debug
PR_FMT = $(subst amlogic-,,$(MODULE_NAME))
PR_FMT_DEFINE="-Dpr_fmt(fmt)= \"[$(PR_FMT)]: \" fmt"
ccflags-y += $(PR_FMT_DEFINE)
ccflags-y += $(PR_FMT_DEFINE) -I$(srctree)/drivers/iommu/arm/arm-smmu-v3
obj-$(CONFIG_AMLOGIC_MEMORY_DEBUG) = $(MODULE_NAME).o
$(MODULE_NAME)-y += main.o
+1
View File
@@ -94,6 +94,7 @@ static int __init memory_main_init(void)
#if IS_ENABLED(CONFIG_AMLOGIC_DEBUG_IOTRACE)
free_iotrace_reserved_memory();
#endif
call_sub_init(aml_smmu_init);
pr_debug("### %s() end\n", __func__);
return 0;
+9
View File
@@ -76,4 +76,13 @@ static inline void ramdump_uninit(void)
}
#endif
#if IS_ENABLED(CONFIG_AMLOGIC_FAKE_SMMU)
int __init aml_smmu_init(void);
#else
static inline int aml_smmu_init(void)
{
return 0;
}
#endif
#endif /* _MEMORY_MAIN_H__ */
+8
View File
@@ -17,3 +17,11 @@ config AMLOGIC_WATCHPOINT
This driver export a debug sysfs in order
to using watch point function on ARMv8.
say y to enable Amlogic watch point driver
config AMLOGIC_FAKE_SMMU
tristate "Amlogic fake smmu"
depends on IOMMU_SUPPORT
default n
help
Register a fake smmu device to replace ops for 64bit
+1
View File
@@ -2,3 +2,4 @@
$(MODULE_NAME)-$(CONFIG_AMLOGIC_FILE_CACHE) += memory_ext/file_cache.o
$(MODULE_NAME)-$(CONFIG_AMLOGIC_WATCHPOINT) += memory_ext/watch_point.o
$(MODULE_NAME)-$(CONFIG_AMLOGIC_FAKE_SMMU) += memory_ext/aml_smmu.o
@@ -231,7 +231,6 @@ static struct iommu_domain *aml_smmu_domain_alloc(unsigned int type)
static void aml_smmu_release_device(struct device *dev)
{
return;
}
#if CONFIG_AMLOGIC_KERNEL_VERSION >= 15606
@@ -1437,11 +1436,11 @@ static struct platform_driver aml_smmu_driver = {
.shutdown = aml_smmu_device_shutdown,
};
//module_platform_driver(aml_smmu_driver);
static int __init aml_smmu_init(void)
/* module_platform_driver(aml_smmu_driver); */
int __init aml_smmu_init(void)
{
return platform_driver_register(&aml_smmu_driver);
}
core_initcall(aml_smmu_init);
/* core_initcall(aml_smmu_init); */
MODULE_LICENSE("GPL v2");
-7
View File
@@ -194,13 +194,6 @@ config AMLOGIC_PCIE_DMA_OPS
custom a dma_ops to limit the memory for PCIE device
operations to a fixed area
config AMLOGIC_FAKE_SMMU
tristate "Amlogic fake smmu"
depends on IOMMU_SUPPORT
default n
help
Register a fake smmu device to replace ops for 64bit
config AMLOGIC_ARM_KASAN
bool "support arm kasan"
depends on KASAN
-1
View File
@@ -11,5 +11,4 @@ obj-$(CONFIG_AMLOGIC_MEMORY_EXTEND) += memory.o
obj-$(CONFIG_AMLOGIC_USER_FAULT) += user_fault.o
obj-$(CONFIG_AMLOGIC_PIN_LOCKED_FILE) += pin_file.o
obj-$(CONFIG_AMLOGIC_PCIE_DMA_OPS) += dma_pcie_mapping.o
obj-$(CONFIG_AMLOGIC_FAKE_SMMU) += aml_smmu.o
obj-$(CONFIG_AMLOGIC_MIX_ZRAM) += mix_zram.o
+6 -5
View File
@@ -771,12 +771,13 @@ static const struct proc_ops slabtrace_proc_ops = {
static int __init slab_trace_module_init(void)
{
if (slab_trace_en)
if (slab_trace_en) {
d_slabtrace = proc_create("slabtrace", 0444,
NULL, &slabtrace_proc_ops);
if (IS_ERR_OR_NULL(d_slabtrace)) {
pr_err("%s, create slabtrace failed\n", __func__);
return -1;
NULL, &slabtrace_proc_ops);
if (IS_ERR_OR_NULL(d_slabtrace)) {
pr_err("%s, create slabtrace failed\n", __func__);
return -1;
}
}
return 0;
-1
View File
@@ -75,7 +75,6 @@ AMLOGIC_COMMON_MODULES = [
"common_drivers/drivers/media/aml_media.ko",
"common_drivers/drivers/media/camera/amlogic-camera.ko",
"common_drivers/drivers/memory_debug/amlogic-memory-debug.ko",
"common_drivers/drivers/memory_ext/aml_smmu.ko",
"common_drivers/drivers/mmc/host/amlogic-mmc.ko",
"common_drivers/drivers/net/ethernet/stmicro/stmmac/amlogic-phy-debug.ko",
"common_drivers/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.ko",
-1
View File
@@ -25,7 +25,6 @@ RAMDISK_MODULES_LOAD_LIST=(
tee.ko
optee.ko
amlogic-tee.ko
aml_smmu.ko
videobuf-core.ko
dvb-core.ko
amlogic-pm.ko