diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2018-11-07 12:10:38 -0500 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2018-11-08 12:50:26 -0500 |
commit | 26a4676faa1ad5d99317e0cd701e5d6f3e716b77 (patch) | |
tree | e028f8b341426293dd78072515a6dac5a6c10fc2 | |
parent | 313a06e636808387822af24c507cba92703568b1 (diff) |
arm64: mm: define NET_IP_ALIGN to 0
On arm64, there is no need to add 2 bytes of padding to the start of
each network buffer just to make the IP header appear 32-bit aligned.
Since this might actually adversely affect DMA performance some
platforms, let's override NET_IP_ALIGN to 0 to get rid of this
padding.
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-rw-r--r-- | arch/arm64/include/asm/processor.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 3e2091708b8e..6b0d4dff5012 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h | |||
@@ -24,6 +24,14 @@ | |||
24 | #define KERNEL_DS UL(-1) | 24 | #define KERNEL_DS UL(-1) |
25 | #define USER_DS (TASK_SIZE_64 - 1) | 25 | #define USER_DS (TASK_SIZE_64 - 1) |
26 | 26 | ||
27 | /* | ||
28 | * On arm64 systems, unaligned accesses by the CPU are cheap, and so there is | ||
29 | * no point in shifting all network buffers by 2 bytes just to make some IP | ||
30 | * header fields appear aligned in memory, potentially sacrificing some DMA | ||
31 | * performance on some platforms. | ||
32 | */ | ||
33 | #define NET_IP_ALIGN 0 | ||
34 | |||
27 | #ifndef __ASSEMBLY__ | 35 | #ifndef __ASSEMBLY__ |
28 | #ifdef __KERNEL__ | 36 | #ifdef __KERNEL__ |
29 | 37 | ||