[v6,API-NEXT,00/12] Separate CPU info codes into their platform files

Message ID CAOhR-w0fK+XVA2NF+92kYVvs45my45bL5Pc1ET3+EekXPB+BVw@mail.gmail.com
State New
Headers show

Commit Message

Hongbo Zhang Jan. 20, 2016, 6:36 a.m.
This "WARNING: adding a line without newline at end of file" comes from patch 7:


when adding new symlink in patch, there is such a warning, it is not
an effective warning I think.


Yes the symlink should be changed to ../linux/odp_cpu_arch.c


I don't have full environment to verify codes of mips and powerpc, so
I tested my odp_sysinfo_parse.c on my x86 platform this way:
replace arch/x86/odp_sysinfo_parse.c with mips/odp_sysinfo_parse.c or
powerpc/odp_sysinfo_parse.c, and let them to parse a fake /tmp/cpuinfo
instead of /proc/cpuinfo, so I verified logic of my codes, but symlink
compilation was missed.

Will correct the symlink.


On 19 January 2016 at 20:44, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:
> did you compile it for powerpc?
>
> there is wrong symlink.
>
> And also checkpatch warns about empty line at the end of file.
>
> Maxim.
>
>
> On 01/19/2016 13:22, Hongbo Zhang wrote:
>>
>> There are still some checkpatch warnings of patches 6 and 7, but they
>> should be due some defect of checkpatch.pl script and can be ignored I
>> think.
>>
>> On 19 January 2016 at 18:17,  <hongbo.zhang@linaro.org> wrote:
>>>
>>> From: Hongbo Zhang <hongbo.zhang@linaro.org>
>>>
>>> v5->v6 changes:
>>>   - eliminate checkpatch.pl warnings
>>>
>>> v4->v5 changes:
>>>   - rebase to latest api-next branch
>>>
>>> v3->v4 changes:
>>>   - update patch 9 of platform naming
>>>   - add new patch 12 to rename cpu_hz to cpu_hz_max
>>>
>>> v2->v3 changes:
>>> use "api: cpu:" tag in patch 8/11 title instead of "linux-generic:
>>> sysinfo"
>>>
>>> v1->v2 changes:
>>>   - don't create arch/arm/ since there isn't implementation now, use
>>> arch/linux
>>> as default choice
>>>   - create symlink to arch/linux/odp_cpu_cycles.c for powerpc, if absent
>>> this
>>> arch cannot be compiled
>>>   - add some clean-ups patches 8~11, these patches are against the
>>> previous ones
>>> so send them together for better review and merge.
>>>
>>> v1 notes:
>>> This patch set separates the CPU info codes into their own platform
>>> sepcific
>>> files.
>>> It is common sence that the top general layer call an uniform interface
>>> to
>>> initialize some plarform specific data structures, and this uniform
>>> interface
>>> is implemented in their own platform specific files.
>>> This patch set makes it.
>>>
>>> Hongbo Zhang (12):
>>>    linux-generic: sysinfo: move cpu_arch_str to odp_system_info_t
>>>    linux-generic: sysinfo: use uniform call odp_sysinfo_parser
>>>    linux-generic: sysinfo: rename odp_cpu_hz_current with odp_ prefix
>>>    linux-generic: sysinfo: move x86 system info codes to its plarform
>>>      file
>>>    linux-generic: sysinfo: move MIPS system info codes to its plarform
>>>      file
>>>    linux-generic: sysinfo: move ARM system info codes to default arch
>>>      file
>>>    linux-generic: sysinfo: move PowerPC system info codes to its plarform
>>>      file
>>>    api: cpu: make frequency API return 0 on failure
>>>    linux-generic: sysinfo: set values for cpu_arch_str
>>>    linux-generic: sysinfo: apply per-CPU implementation to MIPS
>>>    linux-generic: sysinfo: apply per-CPU implementation to PowerPC
>>>    linux-generic: sysinfo: rename variable cpu_hz to cpu_hz_max
>>>
>>>   configure.ac                                       |   1 +
>>>   include/odp/api/cpu.h                              |   4 +
>>>   platform/linux-generic/Makefile.am                 |  10 +-
>>>   .../linux-generic/arch/linux/odp_sysinfo_parse.c   |  19 ++
>>>   .../linux-generic/arch/mips64/odp_sysinfo_parse.c  |  64 ++++++
>>>   platform/linux-generic/arch/powerpc/odp_cpu_arch.c |   1 +
>>>   .../linux-generic/arch/powerpc/odp_sysinfo_parse.c |  63 ++++++
>>>   .../linux-generic/arch/x86/odp_sysinfo_parse.c     |  73 +++++++
>>>   platform/linux-generic/include/odp_internal.h      |   7 +-
>>>   platform/linux-generic/odp_system_info.c           | 220
>>> +--------------------
>>>   10 files changed, 245 insertions(+), 217 deletions(-)
>>>   create mode 100644
>>> platform/linux-generic/arch/linux/odp_sysinfo_parse.c
>>>   create mode 100644
>>> platform/linux-generic/arch/mips64/odp_sysinfo_parse.c
>>>   create mode 120000 platform/linux-generic/arch/powerpc/odp_cpu_arch.c
>>>   create mode 100644
>>> platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c
>>>   create mode 100644 platform/linux-generic/arch/x86/odp_sysinfo_parse.c
>>>
>>> --
>>> 2.1.4
>>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> https://lists.linaro.org/mailman/listinfo/lng-odp
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp

Patch

--- /dev/null
+++ b/platform/linux-generic/arch/powerpc/odp_cpu_arch.c
@@ -0,0 +1 @@ 
+platform/linux-generic/arch/linux/odp_cpu_arch.c
\ No newline at end of file