Age | Commit message (Collapse) | Author |
|
Since the data is not necessarily aligned, use unaligned types to read
it, in order to avoid undefined behavior.
Fixes GCC undefined sanitizer errors:
hash_crc32.h:35:24: runtime error: load of misaligned address 0x0000005e12d4 for type 'const uint64_t', which requires 8 byte alignment
hash_crc32.h:40:14: runtime error: load of misaligned address 0x0000005ff879 for type 'const uint32_t', which requires 4 byte alignment
hash_crc32.h:51:47: runtime error: load of misaligned address 0x0000005e67af for type 'const uint16_t', which requires 2 byte alignment
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Update all implementation files to use the new shorter copyright format:
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) <YEAR> <COPYRIGHT HOLDER>
*/
Inherited DPDK copyright messages have also been updated to utilize SPDX
format and now list the original source files.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
|
|
Implement the new load and store synchronization barriers with
x86 and aarch64 instructions. The default implementation falls
back to the strongest GCC built-in (__sync_synchronize()), which
would be the strong enough on x86 (mfence), but too weak on
aarch64 (dmb).
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Refactor time codebase to enable more optimized architecture specific
implementations. After this commit x86 and aarch64 architectures are
assumed to always have support for HW time. The fallback to POSIX time
functions has been removed from these architectures for improved
performance.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Refactor CPU ABI and implementation files to follow common project inlining
style. odp_cpu_pause() function is now defined only once per architecture.
After this clean-up it's simpler for an implementation to add inlined
versions of CPU module functions.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Fix conversion warning "uint32_t {aka unsigned int}' from 'long long
unsigned int' may alter its value".
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Implemented strict versions of local and global time stamp read
functions. Moved time register read code into inline functions
on ARMv8.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Use x86 SSE 4.2 crc32 instructions via gcc builtin functions, if
available. These instructions support crc32c only.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Inline cpu HW time counter read function on x86. Time global
data structure is visible to applications, but Posix types
(timespec) or header files are not.
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Moved cpu cycle and pause functions into
arch/x86/odp_arch_cpu_inlines.h.
Uncommented pause function in spec file and removed it
from ABI file. It's safer for ABI compat mode to not have
code included into ABI spec files.
Other architectures use the default odp_arch_cpu_inlines.h,
which does not change the current implementation.
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
update Copyrights with the same script in rebased branch.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
_ODP_CACHE_LINE_SIZE is only used to define ODP_CACHE_LINE_SIZE. Drop
interim define and make cpu.h directly define ODP_CACHE_LINE_SIZE.
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|