diff options
Diffstat (limited to 'target/linux/generic/patches-3.13/132-mips_inline_dma_ops.patch')
-rw-r--r-- | target/linux/generic/patches-3.13/132-mips_inline_dma_ops.patch | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/target/linux/generic/patches-3.13/132-mips_inline_dma_ops.patch b/target/linux/generic/patches-3.13/132-mips_inline_dma_ops.patch index 53cbbb2455..a42a049d86 100644 --- a/target/linux/generic/patches-3.13/132-mips_inline_dma_ops.patch +++ b/target/linux/generic/patches-3.13/132-mips_inline_dma_ops.patch @@ -1,6 +1,33 @@ +From 2c58080407554e1bac8fd50d23cb02420524caed Mon Sep 17 00:00:00 2001 +From: Felix Fietkau <nbd@openwrt.org> +Date: Mon, 12 Aug 2013 12:50:22 +0200 +Subject: [PATCH] MIPS: partially inline dma ops + +Several DMA ops are no-op on many platforms, and the indirection through +the mips_dma_map_ops function table is causing the compiler to emit +unnecessary code. + +Inlining visibly improves network performance in my tests (on a 24Kc +based system), and also slightly reduces code size of a few drivers. + +Signed-off-by: Felix Fietkau <nbd@openwrt.org> +--- + arch/mips/Kconfig | 4 + + arch/mips/include/asm/dma-mapping.h | 360 +++++++++++++++++++++++++++++++++++- + arch/mips/mm/dma-default.c | 163 ++-------------- + 3 files changed, 373 insertions(+), 154 deletions(-) + --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -1377,6 +1377,7 @@ config CPU_CAVIUM_OCTEON +@@ -1145,6 +1145,7 @@ config CPU_LOONGSON2F + depends on SYS_HAS_CPU_LOONGSON2F + select CPU_LOONGSON2 + select ARCH_REQUIRE_GPIOLIB ++ select SYS_HAS_DMA_OPS + help + The Loongson 2F processor implements the MIPS III instruction set + with many extensions. +@@ -1377,6 +1378,7 @@ config CPU_CAVIUM_OCTEON select LIBFDT select USE_OF select USB_EHCI_BIG_ENDIAN_MMIO @@ -8,7 +35,7 @@ help The Cavium Octeon processor is a highly integrated chip containing many ethernet hardware widgets for networking tasks. The processor -@@ -1599,6 +1600,9 @@ config SYS_HAS_CPU_XLR +@@ -1599,6 +1601,9 @@ config SYS_HAS_CPU_XLR config SYS_HAS_CPU_XLP bool |