From: Markus Stockhausen Date: Sat, 23 May 2026 10:59:39 +0000 (+0200) Subject: realtek: mach: specify alignment topology X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc61e795ee93f9eecd640f021a536e54a19eb1e0;p=thirdparty%2Fopenwrt.git realtek: mach: specify alignment topology The kernel has two helper defines that guide about hardware characteristics. MIPS_L1_CACHE_SHIFT defines the cache line sizes (1< --- diff --git a/target/linux/realtek/files-6.18/arch/mips/include/asm/mach-rtl-otto/kmalloc.h b/target/linux/realtek/files-6.18/arch/mips/include/asm/mach-rtl-otto/kmalloc.h new file mode 100644 index 00000000000..7bf463ab3d4 --- /dev/null +++ b/target/linux/realtek/files-6.18/arch/mips/include/asm/mach-rtl-otto/kmalloc.h @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __ASM_MACH_RTL_OTTO_KMALLOC_H +#define __ASM_MACH_RTL_OTTO_KMALLOC_H + +#define ARCH_DMA_MINALIGN L1_CACHE_BYTES + +#endif /* __ASM_MACH_RTL_OTTO_KMALLOC_H */ diff --git a/target/linux/realtek/patches-6.18/300-mips-add-rtl838x-platform.patch b/target/linux/realtek/patches-6.18/300-mips-add-rtl838x-platform.patch index 7115255fba1..bbaf0910435 100644 --- a/target/linux/realtek/patches-6.18/300-mips-add-rtl838x-platform.patch +++ b/target/linux/realtek/patches-6.18/300-mips-add-rtl838x-platform.patch @@ -52,7 +52,7 @@ Submitted-by: Birger Koblitz config SGI_IP22 bool "SGI IP22 (Indy/Indigo2)" -@@ -1056,6 +1057,36 @@ config FIT_IMAGE_FDT_EPM5 +@@ -1056,6 +1057,37 @@ config FIT_IMAGE_FDT_EPM5 from Mobileye in the FIT kernel image. This requires u-boot on the platform. @@ -61,6 +61,7 @@ Submitted-by: Birger Koblitz + depends on MACH_REALTEK_RTL + select CPU_SUPPORTS_CPUFREQ + select MIPS_EXTERNAL_TIMER ++ select MIPS_L1_CACHE_SHIFT_4 + +config RTL839X + bool "Realtek RTL839X based platforms" diff --git a/target/linux/realtek/rtl838x/config-6.18 b/target/linux/realtek/rtl838x/config-6.18 index 714417e555d..97c45083042 100644 --- a/target/linux/realtek/rtl838x/config-6.18 +++ b/target/linux/realtek/rtl838x/config-6.18 @@ -144,7 +144,8 @@ CONFIG_MIPS_ASID_SHIFT=0 # CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set CONFIG_MIPS_CMDLINE_FROM_DTB=y CONFIG_MIPS_EXTERNAL_TIMER=y -CONFIG_MIPS_L1_CACHE_SHIFT=5 +CONFIG_MIPS_L1_CACHE_SHIFT=4 +CONFIG_MIPS_L1_CACHE_SHIFT_4=y # CONFIG_MIPS_NO_APPENDED_DTB is not set CONFIG_MIPS_RAW_APPENDED_DTB=y CONFIG_MIPS_SPRAM=y