On 20/06/2017, 15:00, "Savolainen, Petri (Nokia - FI/Espoo)"
<petri.savolai...@nokia.com> wrote:

>
>> +#endif  /* PLATFORM_LINUXGENERIC_ARCH_ARM_CPU_IDLING_H */
>> diff --git a/platform/linux-generic/arch/arm/odp_llsc.h
>>b/platform/linux-
>> generic/arch/arm/odp_llsc.h
>> new file mode 100644
>> index 00000000..3ab5c909
>> --- /dev/null
>> +++ b/platform/linux-generic/arch/arm/odp_llsc.h
>> @@ -0,0 +1,249 @@
>> +/* Copyright (c) 2017, ARM Limited
>> + * All rights reserved.
>> + *
>> + * SPDX-License-Identifier: BSD-3-Clause
>> + */
>> +
>> +#ifndef PLATFORM_LINUXGENERIC_ARCH_ARM_LLSC_H
>> +#define PLATFORM_LINUXGENERIC_ARCH_ARM_LLSC_H
>> +
>> +#ifndef PLATFORM_LINUXGENERIC_ARCH_ARM_ODP_CPU_H
>> +#error This file should not be included directly, please include
>> odp_cpu.h
>> +#endif
>> +
>> +#if __ARM_ARCH == 7 || (__ARM_ARCH == 8 && __ARM_64BIT_STATE == 0)
>> +
>
>
>> +
>> +#if __ARM_ARCH == 8 && __ARM_64BIT_STATE == 1
>> +
>
>Build broken for ARMv6? There are so many #ifdefs that it's hard to tell
>which code path is built.
GCC preprocessor symbols for the ARM architecture(s) is a mess (and
different with different compiler versions I think) but thatĀ¹s not our
fault.

> Maybe it would make sense to explicitly document/report an error when
>building for a non-supported ARM target. E.g. the original raspberry pi
>is ARMv6, it's possible that someone is building odp-linux for that...
Different versions of the ARM architecture are actually more or less
different architectures from an ODP perspective. Perhaps the architecture
recognition should be more specific and identify ARMv7a and ARMv8a (32-bit
and 64-bit) and treat everything else as "defaultĀ². I think ODP should use
the default (aka generic) arch implementation when the architecture is not
recognised/supported.


>
>-Petri
>
>

Reply via email to