On 6 November 2015 at 18:54, Maxim Uvarov <[email protected]> wrote:
> On 11/06/2015 13:44, [email protected] wrote:
>>
>> From: Hongbo Zhang <[email protected]>
>>
>> In the default dummy function systemcpu(), only cpu_hz[0] and model_str[0]
>> are set to dummy values, then in the validation code if iterate each CPU,
>> cores other than core 0 report failure, this patchs pad all the arrays to
>> default values to pass validation.
>>
>> For bug: https://bugs.linaro.org/show_bug.cgi?id=1870
>>
>> Signed-off-by: Hongbo Zhang <[email protected]>
>> ---
>> platform/linux-generic/odp_system_info.c | 11 ++++++++---
>> 1 file changed, 8 insertions(+), 3 deletions(-)
>>
>> diff --git a/platform/linux-generic/odp_system_info.c
>> b/platform/linux-generic/odp_system_info.c
>> index 8bd1584..944d29f 100644
>> --- a/platform/linux-generic/odp_system_info.c
>> +++ b/platform/linux-generic/odp_system_info.c
>> @@ -358,7 +358,7 @@ static int systemcpu(odp_system_info_t *sysinfo)
>> static int systemcpu(odp_system_info_t *sysinfo)
>> {
>> - int ret;
>> + int ret, i;
>> ret = sysconf_cpu_count();
>> if (ret == 0) {
>> @@ -371,10 +371,15 @@ static int systemcpu(odp_system_info_t *sysinfo)
>> sysinfo->huge_page_size = huge_page_size();
>> /* Dummy values */
>> - sysinfo->cpu_hz[0] = 1400000000;
>> sysinfo->cache_line_size = 64;
>> - strncpy(sysinfo->model_str[0], "UNKNOWN",
>> sizeof(sysinfo->model_str));
>
> Don't put debug for each cpu. Put it here:
>
> ODP_DBG("Warning: use dummy values for freq and model string\n")
> ODP_DBG("Refer to
> https://bugs.linaro.org/show_bug.cgi?id=1870\n");
OK, I see.
>>
>> + for (i = 0; i < MAX_CPU_NUMBER; i++) {
>> + sysinfo->cpu_hz[i] = 1400000000;
>> + ODP_DBG("temporary dummy CPU frequency\n");
>> +
>> + strcpy(sysinfo->model_str[i], "UNKNOWN");
>> + ODP_DBG("temporary dummy CPU model string\n");
>> + }
>> return 0;
>> }
>
>
> _______________________________________________
> lng-odp mailing list
> [email protected]
> https://lists.linaro.org/mailman/listinfo/lng-odp
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp