aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-03-10 13:17:23 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-03-10 13:17:23 -0400
commit3d8dfe75ef69f4dd4ba35c09b20a5aa58b4a5078 (patch)
treee5dd2ba86a027007610df67331304e083fe560ec /lib
parentd6075262969321bcb5d795de25595fc2a141ac02 (diff)
parentb855b58ac1b7891b219e1d9ef60c45c774cadefe (diff)
Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 updates from Catalin Marinas: - Pseudo NMI support for arm64 using GICv3 interrupt priorities - uaccess macros clean-up (unsafe user accessors also merged but reverted, waiting for objtool support on arm64) - ptrace regsets for Pointer Authentication (ARMv8.3) key management - inX() ordering w.r.t. delay() on arm64 and riscv (acks in place by the riscv maintainers) - arm64/perf updates: PMU bindings converted to json-schema, unused variable and misleading comment removed - arm64/debug fixes to ensure checking of the triggering exception level and to avoid the propagation of the UNKNOWN FAR value into the si_code for debug signals - Workaround for Fujitsu A64FX erratum 010001 - lib/raid6 ARM NEON optimisations - NR_CPUS now defaults to 256 on arm64 - Minor clean-ups (documentation/comments, Kconfig warning, unused asm-offsets, clang warnings) - MAINTAINERS update for list information to the ARM64 ACPI entry * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (54 commits) arm64: mmu: drop paging_init comments arm64: debug: Ensure debug handlers check triggering exception level arm64: debug: Don't propagate UNKNOWN FAR into si_code for debug signals Revert "arm64: uaccess: Implement unsafe accessors" arm64: avoid clang warning about self-assignment arm64: Kconfig.platforms: fix warning unmet direct dependencies lib/raid6: arm: optimize away a mask operation in NEON recovery routine lib/raid6: use vdupq_n_u8 to avoid endianness warnings arm64: io: Hook up __io_par() for inX() ordering riscv: io: Update __io_[p]ar() macros to take an argument asm-generic/io: Pass result of I/O accessor to __io_[p]ar() arm64: Add workaround for Fujitsu A64FX erratum 010001 arm64: Rename get_thread_info() arm64: Remove documentation about TIF_USEDFPU arm64: irqflags: Fix clang build warnings arm64: Enable the support of pseudo-NMIs arm64: Skip irqflags tracing for NMI in IRQs disabled context arm64: Skip preemption when exiting an NMI arm64: Handle serror in NMI context irqchip/gic-v3: Allow interrupts to be set as pseudo-NMI ...
Diffstat (limited to 'lib')
-rw-r--r--lib/raid6/neon.uc5
-rw-r--r--lib/raid6/recov_neon_inner.c19
2 files changed, 10 insertions, 14 deletions
diff --git a/lib/raid6/neon.uc b/lib/raid6/neon.uc
index d5242f544551..b7c68030da4f 100644
--- a/lib/raid6/neon.uc
+++ b/lib/raid6/neon.uc
@@ -28,7 +28,6 @@
28 28
29typedef uint8x16_t unative_t; 29typedef uint8x16_t unative_t;
30 30
31#define NBYTES(x) ((unative_t){x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x})
32#define NSIZE sizeof(unative_t) 31#define NSIZE sizeof(unative_t)
33 32
34/* 33/*
@@ -61,7 +60,7 @@ void raid6_neon$#_gen_syndrome_real(int disks, unsigned long bytes, void **ptrs)
61 int d, z, z0; 60 int d, z, z0;
62 61
63 register unative_t wd$$, wq$$, wp$$, w1$$, w2$$; 62 register unative_t wd$$, wq$$, wp$$, w1$$, w2$$;
64 const unative_t x1d = NBYTES(0x1d); 63 const unative_t x1d = vdupq_n_u8(0x1d);
65 64
66 z0 = disks - 3; /* Highest data disk */ 65 z0 = disks - 3; /* Highest data disk */
67 p = dptr[z0+1]; /* XOR parity */ 66 p = dptr[z0+1]; /* XOR parity */
@@ -92,7 +91,7 @@ void raid6_neon$#_xor_syndrome_real(int disks, int start, int stop,
92 int d, z, z0; 91 int d, z, z0;
93 92
94 register unative_t wd$$, wq$$, wp$$, w1$$, w2$$; 93 register unative_t wd$$, wq$$, wp$$, w1$$, w2$$;
95 const unative_t x1d = NBYTES(0x1d); 94 const unative_t x1d = vdupq_n_u8(0x1d);
96 95
97 z0 = stop; /* P/Q right side optimization */ 96 z0 = stop; /* P/Q right side optimization */
98 p = dptr[disks-2]; /* XOR parity */ 97 p = dptr[disks-2]; /* XOR parity */
diff --git a/lib/raid6/recov_neon_inner.c b/lib/raid6/recov_neon_inner.c
index 8cd20c9f834a..f13c07f82297 100644
--- a/lib/raid6/recov_neon_inner.c
+++ b/lib/raid6/recov_neon_inner.c
@@ -10,11 +10,6 @@
10 10
11#include <arm_neon.h> 11#include <arm_neon.h>
12 12
13static const uint8x16_t x0f = {
14 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
15 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
16};
17
18#ifdef CONFIG_ARM 13#ifdef CONFIG_ARM
19/* 14/*
20 * AArch32 does not provide this intrinsic natively because it does not 15 * AArch32 does not provide this intrinsic natively because it does not
@@ -41,6 +36,7 @@ void __raid6_2data_recov_neon(int bytes, uint8_t *p, uint8_t *q, uint8_t *dp,
41 uint8x16_t pm1 = vld1q_u8(pbmul + 16); 36 uint8x16_t pm1 = vld1q_u8(pbmul + 16);
42 uint8x16_t qm0 = vld1q_u8(qmul); 37 uint8x16_t qm0 = vld1q_u8(qmul);
43 uint8x16_t qm1 = vld1q_u8(qmul + 16); 38 uint8x16_t qm1 = vld1q_u8(qmul + 16);
39 uint8x16_t x0f = vdupq_n_u8(0x0f);
44 40
45 /* 41 /*
46 * while ( bytes-- ) { 42 * while ( bytes-- ) {
@@ -60,14 +56,14 @@ void __raid6_2data_recov_neon(int bytes, uint8_t *p, uint8_t *q, uint8_t *dp,
60 px = veorq_u8(vld1q_u8(p), vld1q_u8(dp)); 56 px = veorq_u8(vld1q_u8(p), vld1q_u8(dp));
61 vx = veorq_u8(vld1q_u8(q), vld1q_u8(dq)); 57 vx = veorq_u8(vld1q_u8(q), vld1q_u8(dq));
62 58
63 vy = (uint8x16_t)vshrq_n_s16((int16x8_t)vx, 4); 59 vy = vshrq_n_u8(vx, 4);
64 vx = vqtbl1q_u8(qm0, vandq_u8(vx, x0f)); 60 vx = vqtbl1q_u8(qm0, vandq_u8(vx, x0f));
65 vy = vqtbl1q_u8(qm1, vandq_u8(vy, x0f)); 61 vy = vqtbl1q_u8(qm1, vy);
66 qx = veorq_u8(vx, vy); 62 qx = veorq_u8(vx, vy);
67 63
68 vy = (uint8x16_t)vshrq_n_s16((int16x8_t)px, 4); 64 vy = vshrq_n_u8(px, 4);
69 vx = vqtbl1q_u8(pm0, vandq_u8(px, x0f)); 65 vx = vqtbl1q_u8(pm0, vandq_u8(px, x0f));
70 vy = vqtbl1q_u8(pm1, vandq_u8(vy, x0f)); 66 vy = vqtbl1q_u8(pm1, vy);
71 vx = veorq_u8(vx, vy); 67 vx = veorq_u8(vx, vy);
72 db = veorq_u8(vx, qx); 68 db = veorq_u8(vx, qx);
73 69
@@ -87,6 +83,7 @@ void __raid6_datap_recov_neon(int bytes, uint8_t *p, uint8_t *q, uint8_t *dq,
87{ 83{
88 uint8x16_t qm0 = vld1q_u8(qmul); 84 uint8x16_t qm0 = vld1q_u8(qmul);
89 uint8x16_t qm1 = vld1q_u8(qmul + 16); 85 uint8x16_t qm1 = vld1q_u8(qmul + 16);
86 uint8x16_t x0f = vdupq_n_u8(0x0f);
90 87
91 /* 88 /*
92 * while (bytes--) { 89 * while (bytes--) {
@@ -100,9 +97,9 @@ void __raid6_datap_recov_neon(int bytes, uint8_t *p, uint8_t *q, uint8_t *dq,
100 97
101 vx = veorq_u8(vld1q_u8(q), vld1q_u8(dq)); 98 vx = veorq_u8(vld1q_u8(q), vld1q_u8(dq));
102 99
103 vy = (uint8x16_t)vshrq_n_s16((int16x8_t)vx, 4); 100 vy = vshrq_n_u8(vx, 4);
104 vx = vqtbl1q_u8(qm0, vandq_u8(vx, x0f)); 101 vx = vqtbl1q_u8(qm0, vandq_u8(vx, x0f));
105 vy = vqtbl1q_u8(qm1, vandq_u8(vy, x0f)); 102 vy = vqtbl1q_u8(qm1, vy);
106 vx = veorq_u8(vx, vy); 103 vx = veorq_u8(vx, vy);
107 vy = veorq_u8(vx, vld1q_u8(p)); 104 vy = veorq_u8(vx, vld1q_u8(p));
108 105