diff options
author | Shawn Landden <shawn@git.icu> | 2019-05-11 14:19:51 -0300 |
---|---|---|
committer | Shawn Landden <shawn@git.icu> | 2019-05-13 16:25:28 -0500 |
commit | cc6513fd7d0e049c0c0dae0c6ef62eb6ad11afe1 (patch) | |
tree | 8ea0fe17d01d9287d090a05305f1210cf64a555d /src/crypto/Kbuild.include | |
parent | [Zinc] Add PowerPC chacha20 implementation from openssl/cryptograms (diff) | |
download | wireguard-monolithic-historical-cc6513fd7d0e049c0c0dae0c6ef62eb6ad11afe1.tar.xz wireguard-monolithic-historical-cc6513fd7d0e049c0c0dae0c6ef62eb6ad11afe1.zip |
[zinc] Add PowerPC accelerated poly1305 from openssl/cryptogramssl/ppc
Unfortunately I am not seeing a speed up with this patch,
but it does decrease CPU usage.
Only (currently) runs on the outbound path, as the in-bound path is in
an interrupt, but that can be fixed in Linux.
v2: - Do not include the FPU version, as +10% performance on POWER8
(admittedly better on really old CPUs, like old world macs) is not
worth it, especially when there is a fast VSX version available.
- Honor CONFIG_VSX.
Signed-off-by: Shawn Landden <shawn@git.icu>
Diffstat (limited to 'src/crypto/Kbuild.include')
-rw-r--r-- | src/crypto/Kbuild.include | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/crypto/Kbuild.include b/src/crypto/Kbuild.include index 4e05181..ece20c9 100644 --- a/src/crypto/Kbuild.include +++ b/src/crypto/Kbuild.include @@ -36,6 +36,8 @@ zinc-$(CONFIG_ZINC_ARCH_ARM64) += poly1305/poly1305-arm64.o zinc-$(CONFIG_ZINC_ARCH_MIPS) += poly1305/poly1305-mips.o AFLAGS_poly1305-mips.o += -O2 # This is required to fill the branch delay slots zinc-$(CONFIG_ZINC_ARCH_MIPS64) += poly1305/poly1305-mips64.o +zinc-$(CONFIG_ZINC_ARCH_PPC32) += poly1305/poly1305-ppc.o +zinc-$(CONFIG_ZINC_ARCH_PPC64) += poly1305/poly1305-ppc.o zinc-y += chacha20poly1305.o @@ -46,16 +48,16 @@ zinc-y += curve25519/curve25519.o zinc-$(CONFIG_ZINC_ARCH_ARM) += curve25519/curve25519-arm.o quiet_cmd_perlasm = PERLASM $@ - cmd_perlasm = $(PERL) $< $(perlflags-y) > $@ + cmd_perlasm = $(PERL) $(perlflags-y) $< $(perlargs-y) > $@ $(obj)/%.S: $(src)/%.pl FORCE $(call if_changed,perlasm) kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) targets := $(patsubst $(kbuild-dir)/%.pl,%.S,$(wildcard $(patsubst %.o,$(kbuild-dir)/crypto/zinc/%.pl,$(zinc-y) $(zinc-m) $(zinc-)))) -perlflags-$(CONFIG_ZINC_ARCH_PPC32) += linux32 +perlargs-$(CONFIG_ZINC_ARCH_PPC32) += linux32 ifeq ($(CONFIG_ZINC_ARCH_PPC64),y) -perlflags-$(CONFIG_CPU_BIG_ENDIAN) += linux64 -perlflags-$(CONFIG_CPU_LITTLE_ENDIAN) += linux64le +perlargs-$(CONFIG_CPU_BIG_ENDIAN) += linux64 +perlargs-$(CONFIG_CPU_LITTLE_ENDIAN) += linux64le endif # Old kernels don't set this, which causes trouble. |