lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 9 Feb 2021 21:26:40 +0100
From:   Daniel Lezcano <daniel.lezcano@...aro.org>
To:     Guo Ren <guoren@...nel.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-csky@...r.kernel.org, Guo Ren <guoren@...ux.alibaba.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Marc Zyngier <maz@...nel.org>
Subject: Re: [PATCH v2 2/2] drivers/clocksource: Fixup csky,mptimer compile
 error with CPU_CK610

On 09/02/2021 17:02, Guo Ren wrote:
> Hi Daniel,
> 
> On Sun, Feb 7, 2021 at 5:29 PM Daniel Lezcano <daniel.lezcano@...aro.org> wrote:
>>
>> On 07/02/2021 04:31, Guo Ren wrote:
>>> Hi Daniel,
>>>
>>> On Thu, Feb 4, 2021 at 4:48 PM Daniel Lezcano <daniel.lezcano@...aro.org> wrote:
>>>>
>>>> On 04/02/2021 08:46, guoren@...nel.org wrote:
>>>>> From: Guo Ren <guoren@...ux.alibaba.com>
>>>>>
>>>>> The timer-mp-csky.c only could support CPU_CK860 and it will
>>>>> compile error with CPU_CK610.
>>>>>
>>>>> It has been selected in arch/csky/Kconfig.
>>>>
>>>> It would be better if you fix the root cause of the compilation error.
>>> The timer-mp-csky.c has used specific instructions which only
>>> supported by CK860 and timer-mp-csky.c is only design for CK860.
>>
>> I guess you are referring to mfcr() ?
>>
>>> In arch/csky/Konfig we only select it with CK860.
>>>         select CSKY_MPINTC if CPU_CK860
>>>         select CSKY_MP_TIMER if CPU_CK860
>>>
>>> So here let's select timer-mp-csky.c in arch/csky/Kconfig, not in
>>> drivers/clocksource/Kconfig.
>>
>> The COMPILE_TEST option is there to let other architecture to compile
>> drivers and increase the compilation test coverage.
>>
>> The proposed change just removes the driver from this coverage.
> When we compile the csky arch with C860, it will be selected.
> 
>>
>> Ideally, it would be better to keep it with the COMPILE_TEST option, so
>> changes impacting all the drivers can be caught before submitting the
>> patches.
>>
>> By just adding
>>
>> #ifndef mfcr
>> #define mfcr(a) 0
>> #endif
> 
> 610 couldn't support CSKY_MP_TIMER and it's only for 860. So it's not
> a coding skill issue.

I think there is a misunderstanding.

When I want to compile on x64 all the timer drivers, I do enable
COMPILE_TEST, then the strings appear and the drivers can be selected.

If the COMPILE_TEST is not enabled, the string does not appear, it is
not possible to enable/disable it and the platform must enable it from
the aforementioned arch/csky/Konfig.

Actually, the timer drivers policy is : drivers can not be enabled from
the drivers/clocksource/Kconfig, it is up to the platform Kconfig to
select them. The exception is when the COMPILE_TEST option is set for
testing purpose.

The timer must compile on any other archs and the stubs for the platform
specific calls must be provided.

Did I miss something with your changes ?



-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ