drivers/irqchip: Fixup csky,mpintc compile error with CPU_CK610
Subsystems (3)
[email protected]
maintainerPATCH v2 1/2 drivers/irqchip: Fixup csky,mpintc compile error with CPU_CK610
From: Guo Ren <[email protected]>
The irq-csky-mpintc.c only could support CPU_CK860 and it will compile error with CPU_CK610.
It has beed selected in arch/csky/Kconfig
--- drivers/irqchip/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
---
v2: Drop the string after bool,
as suggested by Marc Zyngier <[email protected]>
drivers/irqchip/Kconfig +1 -1
@@ -432,7 +432,7 @@ config QCOM_PDC IRQs for Qualcomm Technologies Inc (QTI) mobile chips. config CSKY_MPINTC - bool "C-SKY Multi Processor Interrupt Controller" + bool depends on CSKY help Say yes here to enable C-SKY SMP interrupt controller driver used
Signature · 1 line
2.17.1
[email protected]
maintainerPATCH v2 2/2 drivers/clocksource: Fixup csky,mptimer compile error with CPU_CK610
From: Guo Ren <[email protected]>
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.
--- drivers/clocksource/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
---
v2: Drop the string after bool,
as suggested by Marc Zyngier <[email protected]>
drivers/clocksource/Kconfig +1 -1
@@ -662,7 +662,7 @@ config CLINT_TIMER driver is usually used for NoMMU RISC-V systems. config CSKY_MP_TIMER - bool "SMP Timer for the C-SKY platform" if COMPILE_TEST + bool depends on CSKY select TIMER_OF help
Signature · 1 line
2.17.1
Re: [PATCH v2 2/2] drivers/clocksource: Fixup csky,mptimer compile error with CPU_CK610
Quoted 6 lines · On 04/02/2021 08:46, [email protected] wrote:
From: Guo Ren <[email protected]>
The
timer-mp-csky.conly could supportCPU_CK860and it will compile error withCPU_CK610.It has been selected in
arch/csky/Kconfig.
It would be better if you fix the root cause of the compilation error.
The COMPILE_TEST is there for compilation test coverage when the changes are touching a lot of drivers.
Quoted 26 lines
Signed-off-by Guo Ren <[email protected]>Cc Daniel Lezcano <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Marc Zyngier <[email protected]>--- drivers/clocksource/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)---
v2: Drop the string after bool,
as suggested by Marc Zyngier <[email protected]>drivers/clocksource/Kconfig +1
-1@@ -662,7 +662,7 @@ config CLINT_TIMER driver is usually used for NoMMU RISC-V systems. config CSKY_MP_TIMER - bool "SMP Timer for the C-SKY platform" if COMPILE_TEST + bool depends on CSKY select TIMER_OF help
Signature · 5 lines
<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
Marc Zyngier
AppliedRe: (subset) [PATCH v2 1/2] drivers/irqchip: Fixup csky,mpintc compile error with CPU_CK610
In reply to [email protected]Quoted 4 lines · On Thu, 4 Feb 2021 15:46:08 +0800, [email protected] wrote:
The
irq-csky-mpintc.conly could supportCPU_CK860and it will compile error withCPU_CK610.It has beed selected in
arch/csky/Kconfig
Applied to irq/irqchip-next, thanks!
[1/2] drivers/irqchip: Fixup csky,mpintc compile error with CPU_CK610
commit: be1abc5ba4d2082df6749ab95ec6f87c4d3dbb23
Cheers,
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
[irqchip: irq/irqchip-next] irqchip/csky-mpintc: Prevent selection on unsupported platforms
In reply to [email protected]The following commit has been merged into the irq/irqchip-next branch of irqchip:
The following commit has been merged into the irq/irqchip-next branch of irqchip:
Commit-ID: be1abc5ba4d2082df6749ab95ec6f87c4d3dbb23 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/be1abc5ba4d2082df6749ab95ec6f87c4d3dbb23 Author: Guo Ren <[email protected]> AuthorDate: Thu, 04 Feb 2021 15:46:08 +08:00 Committer: Marc Zyngier <[email protected]> CommitterDate: Thu, 04 Feb 2021 10:37:28
irqchip/csky-mpintc: Prevent selection on unsupported platforms
The irq-csky-mpintc driver is only supported on CPU_CK860 and it will generate a compilation error when selected with CPU_CK610.
As it is already selected directly in the architecture Kconfig, drop the option to select it manually.
--- drivers/irqchip/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/Kconfig +1 -1
@@ -427,7 +427,7 @@ config QCOM_PDC IRQs for Qualcomm Technologies Inc (QTI) mobile chips. config CSKY_MPINTC - bool "C-SKY Multi Processor Interrupt Controller" + bool depends on CSKY help Say yes here to enable C-SKY SMP interrupt controller driver used
Guo Ren
maintainerRe: [PATCH v2 2/2] drivers/clocksource: Fixup csky,mptimer compile error with CPU_CK610
In reply to Daniel LezcanoHi Daniel,
Quoted 10 lines · Daniel Lezcano
Quoted 6 lines · On 04/02/2021 08:46, [email protected] wrote:
From: Guo Ren <[email protected]>
The
timer-mp-csky.conly could supportCPU_CK860and it will compile error withCPU_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.
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.
Signature · 4 lines
Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/
Guo Ren
maintainerRe: [PATCH v2 2/2] drivers/clocksource: Fixup csky,mptimer compile error with CPU_CK610
The same way in IRQ chip:
Quoted 30 lines · Guo Ren
Hi Daniel,
Quoted 10 lines · Daniel Lezcano
Quoted 6 lines · On 04/02/2021 08:46, [email protected] wrote:
From: Guo Ren <[email protected]>
The
timer-mp-csky.conly could supportCPU_CK860and it will compile error withCPU_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.chas used specific instructions which only supported by CK860 andtimer-mp-csky.cis only design for CK860.In
arch/csky/Konfigwe only select it with CK860.
selectCSKY_MPINTCifCPU_CK860
selectCSKY_MP_TIMERifCPU_CK860So here let's select
timer-mp-csky.cinarch/csky/Kconfig, not indrivers/clocksource/Kconfig.--
Best Regards
Guo Ren
Signature · 4 lines
Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/
Re: [PATCH v2 2/2] drivers/clocksource: Fixup csky,mptimer compile error with CPU_CK610
In reply to Guo RenQuoted 7 lines · Guo Ren
Hi Daniel,
Quoted 4 lines · Daniel Lezcano
Quoted 2 lines · On 04/02/2021 08:46, [email protected] wrote:
From: Guo Ren <[email protected]>
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
The
timer-mp-csky.conly could supportCPU_CK860and it will compile error withCPU_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.chas used specific instructions which only supported by CK860 andtimer-mp-csky.cis only design for CK860.
I guess you are referring to mfcr() ?
Quoted 6 lines
In
arch/csky/Konfigwe only select it with CK860.
selectCSKY_MPINTCifCPU_CK860
selectCSKY_MP_TIMERifCPU_CK860So here let's select
timer-mp-csky.cinarch/csky/Kconfig, not indrivers/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.
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
shoud fix the compilation issue, no ?
Signature · 5 lines
<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
Guo Ren
maintainerRe: [PATCH v2 2/2] drivers/clocksource: Fixup csky,mptimer compile error with CPU_CK610
Hi Daniel,
Quoted 24 lines · Daniel Lezcano
Quoted 7 lines · Guo Ren
Hi Daniel,
Quoted 4 lines · Daniel Lezcano
Quoted 2 lines · On 04/02/2021 08:46, [email protected] wrote:
From: Guo Ren <[email protected]>
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
The
timer-mp-csky.conly could supportCPU_CK860and it will compile error withCPU_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.chas used specific instructions which only supported by CK860 andtimer-mp-csky.cis only design for CK860.I guess you are referring to
mfcr()?Quoted 4 lines
In
arch/csky/Konfigwe only select it with CK860.
selectCSKY_MPINTCifCPU_CK860
selectCSKY_MP_TIMERifCPU_CK860
Quoted 7 lines
Quoted 2 lines
So here let's select
timer-mp-csky.cinarch/csky/Kconfig, not indrivers/clocksource/Kconfig.The
COMPILE_TESToption 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.
Quoted 10 lines
Ideally, it would be better to keep it with the
COMPILE_TESToption, 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.
Signature · 4 lines
Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/
Re: [PATCH v2 2/2] drivers/clocksource: Fixup csky,mptimer compile error with CPU_CK610
Quoted 41 lines · Guo Ren
Hi Daniel,
Quoted 24 lines · Daniel Lezcano
Quoted 7 lines · Guo Ren
Hi Daniel,
Quoted 4 lines · Daniel Lezcano
Quoted 2 lines · On 04/02/2021 08:46, [email protected] wrote:
From: Guo Ren <[email protected]>
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
The
timer-mp-csky.conly could supportCPU_CK860and it will compile error withCPU_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.chas used specific instructions which only supported by CK860 andtimer-mp-csky.cis only design for CK860.I guess you are referring to
mfcr()?Quoted 4 lines
In
arch/csky/Konfigwe only select it with CK860.
selectCSKY_MPINTCifCPU_CK860
selectCSKY_MP_TIMERifCPU_CK860Quoted 7 lines
Quoted 2 lines
So here let's select
timer-mp-csky.cinarch/csky/Kconfig, not indrivers/clocksource/Kconfig.The
COMPILE_TESToption 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.
Quoted 5 lines
Ideally, it would be better to keep it with the
COMPILE_TESToption, so changes impacting all the drivers can be caught before submitting the patches.
Quoted 8 lines
Quoted 5 lines
By just adding
#ifndef mfcr
#define mfcr(a) 0
#endif610 couldn't support
CSKY_MP_TIMERand 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 ?
Signature · 5 lines
<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
Guo Ren
maintainerRe: [PATCH v2 2/2] drivers/clocksource: Fixup csky,mptimer compile error with CPU_CK610
Hi Daniel,
Quoted 66 lines · Daniel Lezcano
Quoted 41 lines · Guo Ren
Hi Daniel,
Quoted 24 lines · Daniel Lezcano
Quoted 7 lines · Guo Ren
Hi Daniel,
Quoted 4 lines · Daniel Lezcano
Quoted 2 lines · On 04/02/2021 08:46, [email protected] wrote:
From: Guo Ren <[email protected]>
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
The
timer-mp-csky.conly could supportCPU_CK860and it will compile error withCPU_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.chas used specific instructions which only supported by CK860 andtimer-mp-csky.cis only design for CK860.I guess you are referring to
mfcr()?Quoted 4 lines
In
arch/csky/Konfigwe only select it with CK860.
selectCSKY_MPINTCifCPU_CK860
selectCSKY_MP_TIMERifCPU_CK860Quoted 7 lines
Quoted 2 lines
So here let's select
timer-mp-csky.cinarch/csky/Kconfig, not indrivers/clocksource/Kconfig.The
COMPILE_TESToption 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.
Quoted 5 lines
Ideally, it would be better to keep it with the
COMPILE_TESToption, so changes impacting all the drivers can be caught before submitting the patches.Quoted 8 lines
Quoted 5 lines
By just adding
#ifndef mfcr
#define mfcr(a) 0
#endif610 couldn't support
CSKY_MP_TIMERand 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_TESTis not enabled, the string does not appear, it is not possible to enable/disable it and the platform must enable it from the aforementionedarch/csky/Konfig.Actually, the timer drivers policy is : drivers can not be enabled from the
drivers/clocksource/Kconfig, it is up to the platformKconfigto select them. The exception is when theCOMPILE_TESToption is set for testing purpose.
Quoted 4 lines
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 ?
I think our biggest difference is:
- You think that CSKY_MPTIMER should not be related to the
architecture, but can be compiled with any architecture.
- But I think CSKY_MPTIMER only could to be compiled with CSKY C860.
But from the perspective of easy maintenance, I agree with your suggestion. I will adopt in next patch:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
#ifndef mfcr
#define mfcr(a) 0
#endif
Thx
--
Best Regards
Guo Ren