@@ -19,6 +19,7 @@
#include "common/debug.h"
#include "arch/probe.h"
#include "arch/intel.h"
+#include "arch/neon.h"
#include "erasure-code/ErasureCodePlugin.h"
#define dout_subsys ceph_subsys_osd
@@ -44,6 +45,8 @@ static string get_variant() {
ceph_arch_intel_sse3 &&
ceph_arch_intel_sse2) {
return "sse3";
+ } else if (ceph_arch_neon) {
+ return "neon";
} else {
return "generic";
}
@@ -50,6 +50,30 @@ endif
erasure_codelib_LTLIBRARIES += libec_jerasure_generic.la
+libec_jerasure_neon_la_SOURCES = ${jerasure_sources} \
+ erasure-code/jerasure/gf-complete/src/neon/gf_w4_neon.c \
+ erasure-code/jerasure/gf-complete/src/neon/gf_w8_neon.c \
+ erasure-code/jerasure/gf-complete/src/neon/gf_w16_neon.c \
+ erasure-code/jerasure/gf-complete/src/neon/gf_w32_neon.c \
+ erasure-code/jerasure/gf-complete/src/neon/gf_w64_neon.c
+libec_jerasure_neon_la_CFLAGS = ${AM_CFLAGS} \
+ ${ARM_NEON_FLAGS} \
+ -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+ -I$(srcdir)/erasure-code/jerasure/jerasure/include
+libec_jerasure_neon_la_CXXFLAGS= ${AM_CXXFLAGS} \
+ ${ARM_NEON_FLAGS} \
+ -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+ -I$(srcdir)/erasure-code/jerasure/jerasure/include
+libec_jerasure_neon_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
+libec_jerasure_neon_la_LDFLAGS = ${AM_LDFLAGS} -version-info 2:0:0
+if LINUX
+libec_jerasure_neon_la_LDFLAGS += -export-symbols-regex '.*__erasure_code_.*'
+endif
+
+if HAVE_NEON
+erasure_codelib_LTLIBRARIES += libec_jerasure_neon.la
+endif
+
libec_jerasure_sse3_la_SOURCES = ${jerasure_sources}
libec_jerasure_sse3_la_CFLAGS = ${AM_CFLAGS} \
${INTEL_SSE_FLAGS} \
@@ -68,6 +68,16 @@ libec_fail_to_register_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
libec_fail_to_register_la_LDFLAGS = ${AM_LDFLAGS} -export-symbols-regex '.*__erasure_code_.*'
erasure_codelib_LTLIBRARIES += libec_fail_to_register.la
+libec_test_jerasure_neon_la_SOURCES = test/erasure-code/TestJerasurePluginNEON.cc
+test/erasure-code/TestJerasurePluginNEON.cc: ./ceph_ver.h
+libec_test_jerasure_neon_la_CFLAGS = ${AM_CFLAGS}
+libec_test_jerasure_neon_la_CXXFLAGS= ${AM_CXXFLAGS}
+libec_test_jerasure_neon_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
+libec_test_jerasure_neon_la_LDFLAGS = ${AM_LDFLAGS} -export-symbols-regex '.*__erasure_code_.*'
+if HAVE_NEON
+erasure_codelib_LTLIBRARIES += libec_test_jerasure_neon.la
+endif
+
libec_test_jerasure_sse4_la_SOURCES = test/erasure-code/TestJerasurePluginSSE4.cc
test/erasure-code/TestJerasurePluginSSE4.cc: ./ceph_ver.h
libec_test_jerasure_sse4_la_CFLAGS = ${AM_CFLAGS}
new file mode 100644
@@ -0,0 +1,25 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph distributed storage system
+ *
+ * Copyright (C) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
+ * Copyright (C) 2014 Red Hat <contact@redhat.com>
+ *
+ * Author: Loic Dachary <loic@dachary.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ */
+
+#include "ceph_ver.h"
+
+extern "C" const char *__erasure_code_version() { return CEPH_GIT_NICE_VER; }
+
+extern "C" int __erasure_code_init(char *plugin_name, char *directory)
+{
+ return -444;
+}