Skip to contentSkip to conversation

Remove ARCH_MSM* configs

PATCH Superseded Stephen Boyd 3 participants 16 messages Nov 25, 2015

Subsystems (5)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover Remove ARCH_MSM* configs

This patch series allows us to remove the ARCH_MSM* configs that live in mach-qcom/Kconfig. They're mostly proxy configs for user selectable clocksource configurations anyway. The first patch can go via Daniel, while the other two can go via Andy.

Stephen Boyd (3):
clocksource: defbool CLKSRC_QCOM=y on ARCH_QCOM and make it visible
ARM: qcom_defconfig: Enable HAVE_ARM_ARCH_TIMER
ARM: qcom: Drop ARCH_MSM* configs

 arch/arm/configs/qcom_defconfig |  1 +
 arch/arm/mach-qcom/Kconfig      | 16 ----------------
 drivers/clocksource/Kconfig     |  3 ++-
 3 files changed, 3 insertions(+), 17 deletions(-)
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#1 lore raw

PATCH 1/3 clocksource: defbool CLKSRC_QCOM=y on ARCH_QCOM and make it visible

We want to remove the ARCH_MSM* configs in mach-qcom/Kconfig because they are mostly proxy configs for selecting the right clocksource driver. Therefore, make CLKSRC_QCOM default to the value of ARCH_QCOM, but also make it visible if ARCH_QCOM=y so that we can turn it off when we don't want it.

---
 drivers/clocksource/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +2 -1
index b423785d6afc..7a5ffaa3e490 100644
@@ -279,9 +279,10 @@ config EM_TIMER_STI
 	  such as EMEV2 from former NEC Electronics.
 
 config CLKSRC_QCOM
-	bool "Qualcomm MSM timer" if COMPILE_TEST
+	bool "Qualcomm MSM timer" if ARCH_QCOM || COMPILE_TEST
 	depends on ARM
 	select CLKSRC_OF
+	defbool ARCH_QCOM
 	help
 	  This enables the clocksource and the per CPU clockevent driver for the
 	  Qualcomm SoCs.
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#2 lore raw

Re: [PATCH 1/3] clocksource: defbool CLKSRC_QCOM=y on ARCH_QCOM and make it visible

Quoted 17 lines · Stephen Boyd

We want to remove the ARCH_MSM* configs in mach-qcom/Kconfig because they are mostly proxy configs for selecting the right clocksource driver. Therefore, make CLKSRC_QCOM default to the value of ARCH_QCOM, but also make it visible if ARCH_QCOM=y so that we can turn it off when we don't want it.

---
 drivers/clocksource/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +0 -0
index b423785d6afc..7a5ffaa3e490 100644

drivers/clocksource/Kconfig config EM_TIMER_STI · line 285

Quoted 8 lines
drivers/clocksource/Kconfig +2 -1
@@ -279,9 +279,10 @@ config EM_TIMER_STI
 	  such as EMEV2 from former NEC Electronics.
 
 config CLKSRC_QCOM
-	bool "Qualcomm MSM timer" if COMPILE_TEST
+	bool "Qualcomm MSM timer" if ARCH_QCOM || COMPILE_TEST
 	depends on ARM
 	select CLKSRC_OF
+	defbool ARCH_QCOM

Urgh. This should be def_bool

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
#3 lore raw

Re: [PATCH 1/3] clocksource: defbool CLKSRC_QCOM=y on ARCH_QCOM and make it visible

Quoted 20 lines · On Tuesday 24 November 2015 18:07:20 Stephen Boyd wrote:
Quoted 19 lines · Stephen Boyd

We want to remove the ARCH_MSM* configs in mach-qcom/Kconfig because they are mostly proxy configs for selecting the right clocksource driver. Therefore, make CLKSRC_QCOM default to the value of ARCH_QCOM, but also make it visible if ARCH_QCOM=y so that we can turn it off when we don't want it.

---
 drivers/clocksource/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +0 -0
index b423785d6afc..7a5ffaa3e490 100644
@@ -279,9 +279,10 @@ config EM_TIMER_STI
        such as EMEV2 from former NEC Electronics.
 
Quoted 10 lines

drivers/clocksource/Kconfig config EM_TIMER_STI · line 285

Quoted 6 lines
drivers/clocksource/Kconfig +2 -1
 config CLKSRC_QCOM
-     bool "Qualcomm MSM timer" if COMPILE_TEST
+     bool "Qualcomm MSM timer" if ARCH_QCOM || COMPILE_TEST
      depends on ARM
      select CLKSRC_OF
+     defbool ARCH_QCOM

Urgh. This should be def_bool

With this fixed, the series looks good to me. If Daniel can Ack this, I'd suggest we take the series through arm-soc.

Arnd

#4 lore raw

Re: [PATCH 1/3] clocksource: defbool CLKSRC_QCOM=y on ARCH_QCOM and make it visible

In reply to Stephen Boyd
Quoted 5 lines · Stephen Boyd

We want to remove the ARCH_MSM* configs in mach-qcom/Kconfig because they are mostly proxy configs for selecting the right clocksource driver. Therefore, make CLKSRC_QCOM default to the value of ARCH_QCOM, but also make it visible if ARCH_QCOM=y so that we can turn it off when we don't want it.

I have been removing the ARCH dependencies in the Kconfig file.

Why do you have to turn it off manually ?

Quoted 23 lines
---
  drivers/clocksource/Kconfig | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +2 -1
index b423785d6afc..7a5ffaa3e490 100644
@@ -279,9 +279,10 @@ config EM_TIMER_STI
  	  such as EMEV2 from former NEC Electronics.
 
  config CLKSRC_QCOM
-	bool "Qualcomm MSM timer" if COMPILE_TEST
+	bool "Qualcomm MSM timer" if ARCH_QCOM || COMPILE_TEST
  	depends on ARM
  	select CLKSRC_OF
+	defbool ARCH_QCOM
  	help
  	  This enables the clocksource and the per CPU clockevent driver for the
  	  Qualcomm SoCs.
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
#5 lore raw

Re: [PATCH 1/3] clocksource: defbool CLKSRC_QCOM=y on ARCH_QCOM and make it visible

Quoted 10 lines · On Wednesday 25 November 2015 11:10:49 Daniel Lezcano wrote:
Quoted 5 lines · Stephen Boyd

We want to remove the ARCH_MSM* configs in mach-qcom/Kconfig because they are mostly proxy configs for selecting the right clocksource driver. Therefore, make CLKSRC_QCOM default to the value of ARCH_QCOM, but also make it visible if ARCH_QCOM=y so that we can turn it off when we don't want it.

I have been removing the ARCH dependencies in the Kconfig file.

Why do you have to turn it off manually ?

The background is that this is used only on some of the older MSM SoCs, while the newer ones use the arch timer.

We decided to remove the SoC-specific top-level options from mach-msm as they are becoming rather meaningless these days and just a burden to maintain at the rate that new variants get released, so being able to turn off this driver helps make the kernel slightly smaller if you are building a kernel for only the more recent models.

Arnd

#6 lore raw

Re: [PATCH 1/3] clocksource: defbool CLKSRC_QCOM=y on ARCH_QCOM and make it visible

Quoted 15 lines · Arnd Bergmann
Quoted 10 lines · On Wednesday 25 November 2015 11:10:49 Daniel Lezcano wrote:
Quoted 5 lines · Stephen Boyd

We want to remove the ARCH_MSM* configs in mach-qcom/Kconfig because they are mostly proxy configs for selecting the right clocksource driver. Therefore, make CLKSRC_QCOM default to the value of ARCH_QCOM, but also make it visible if ARCH_QCOM=y so that we can turn it off when we don't want it.

I have been removing the ARCH dependencies in the Kconfig file.

Why do you have to turn it off manually ?

The background is that this is used only on some of the older MSM SoCs, while the newer ones use the arch timer.

Quoted 6 lines

We decided to remove the SoC-specific top-level options from mach-msm as they are becoming rather meaningless these days and just a burden to maintain at the rate that new variants get released, so being able to turn off this driver helps make the kernel slightly smaller if you are building a kernel for only the more recent models.

Ok, thanks for the clarification.

I don't really like this approach even if it is correct because it breaks the current approach I am trying to make consistent across the drivers.

I would like to have the COMPILE_TEST option available for all the drivers and move this option under the menu config. This patch will prevent to do this code factoring.

On the other side, this option is supposed to have a slightly smaller kernel when it is not used. But when does it happen ? When ARCH_MSM8X60=n and ARCH_MSM8960=n. With this patchset, I don't see the ability to turn these SoCs off as the options are removed. So the associated code is not removed, right ?

So why allow to turn off the timer but disallow that for the entire SoC ?

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
#7 lore raw

Re: [PATCH 1/3] clocksource: defbool CLKSRC_QCOM=y on ARCH_QCOM and make it visible

Quoted 25 lines · On Wednesday 25 November 2015 13:37:53 Daniel Lezcano wrote:
Quoted 15 lines · Arnd Bergmann
Quoted 10 lines · On Wednesday 25 November 2015 11:10:49 Daniel Lezcano wrote:
Quoted 5 lines · Stephen Boyd

We want to remove the ARCH_MSM* configs in mach-qcom/Kconfig because they are mostly proxy configs for selecting the right clocksource driver. Therefore, make CLKSRC_QCOM default to the value of ARCH_QCOM, but also make it visible if ARCH_QCOM=y so that we can turn it off when we don't want it.

I have been removing the ARCH dependencies in the Kconfig file.

Why do you have to turn it off manually ?

The background is that this is used only on some of the older MSM SoCs, while the newer ones use the arch timer.

Quoted 6 lines

We decided to remove the SoC-specific top-level options from mach-msm as they are becoming rather meaningless these days and just a burden to maintain at the rate that new variants get released, so being able to turn off this driver helps make the kernel slightly smaller if you are building a kernel for only the more recent models.

Ok, thanks for the clarification.

Quoted 7 lines

I don't really like this approach even if it is correct because it breaks the current approach I am trying to make consistent across the drivers.

I would like to have the COMPILE_TEST option available for all the drivers and move this option under the menu config. This patch will prevent to do this code factoring.

How about moving the option to arch/arm/mach-qcom/Kconfig then?

We could have a user-selectable "allow use of qcom clocksource" option there, which would then select the driver.

Quoted 7 lines

On the other side, this option is supposed to have a slightly smaller kernel when it is not used. But when does it happen ? When ARCH_MSM8X60=n and ARCH_MSM8960=n. With this patchset, I don't see the ability to turn these SoCs off as the options are removed. So the associated code is not removed, right ?

So why allow to turn off the timer but disallow that for the entire SoC ?

The timer is the only code that is controlled by those two options at the moment, all the other differences between SoCs are already handled by enabling the respective device drivers.

Arnd

#8 lore raw

Re: [PATCH 1/3] clocksource: defbool CLKSRC_QCOM=y on ARCH_QCOM and make it visible

Quoted 30 lines · Arnd Bergmann
Quoted 29 lines · On Wednesday 25 November 2015 13:37:53 Daniel Lezcano wrote:
Quoted 15 lines · Arnd Bergmann
Quoted 10 lines · On Wednesday 25 November 2015 11:10:49 Daniel Lezcano wrote:
Quoted 5 lines · Stephen Boyd

We want to remove the ARCH_MSM* configs in mach-qcom/Kconfig because they are mostly proxy configs for selecting the right clocksource driver. Therefore, make CLKSRC_QCOM default to the value of ARCH_QCOM, but also make it visible if ARCH_QCOM=y so that we can turn it off when we don't want it.

I have been removing the ARCH dependencies in the Kconfig file.

Why do you have to turn it off manually ?

The background is that this is used only on some of the older MSM SoCs, while the newer ones use the arch timer.

Quoted 6 lines

We decided to remove the SoC-specific top-level options from mach-msm as they are becoming rather meaningless these days and just a burden to maintain at the rate that new variants get released, so being able to turn off this driver helps make the kernel slightly smaller if you are building a kernel for only the more recent models.

Ok, thanks for the clarification.

I don't really like this approach even if it is correct because it breaks the current approach I am trying to make consistent across the drivers.

Quoted 8 lines
Quoted 3 lines

I would like to have the COMPILE_TEST option available for all the drivers and move this option under the menu config. This patch will prevent to do this code factoring.

How about moving the option to arch/arm/mach-qcom/Kconfig then?

We could have a user-selectable "allow use of qcom clocksource" option there, which would then select the driver.

Yes, why not.

Quoted 11 lines
Quoted 7 lines

On the other side, this option is supposed to have a slightly smaller kernel when it is not used. But when does it happen ? When ARCH_MSM8X60=n and ARCH_MSM8960=n. With this patchset, I don't see the ability to turn these SoCs off as the options are removed. So the associated code is not removed, right ?

So why allow to turn off the timer but disallow that for the entire SoC ?

The timer is the only code that is controlled by those two options at the moment, all the other differences between SoCs are already handled by enabling the respective device drivers.

Ok, I see.

Thanks.

-- Daniel

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
#9 lore raw

PATCH 2/3 ARM: qcom_defconfig: Enable HAVE_ARM_ARCH_TIMER

In reply to Stephen Boyd

Enable this config in the defconfig so that we can delete the selection logic surrounding it that exists in mach-qcom/Kconfig.

---
 arch/arm/configs/qcom_defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/configs/qcom_defconfig +1 -0
index ee54a706e8a3..6f34da7afd75 100644
@@ -22,6 +22,7 @@ CONFIG_ARCH_MSM8X60=y
 CONFIG_ARCH_MSM8960=y
 CONFIG_ARCH_MSM8974=y
 CONFIG_SMP=y
+CONFIG_HAVE_ARM_ARCH_TIMER=y
 CONFIG_PREEMPT=y
 CONFIG_AEABI=y
 CONFIG_HIGHMEM=y
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#10 lore raw

PATCH 3/3 ARM: qcom: Drop ARCH_MSM* configs

In reply to Stephen Boyd

Drop these configs now that we select the clocksources we need via the defconfig.

---
 arch/arm/mach-qcom/Kconfig | 16 ----------------
 1 file changed, 16 deletions(-)
arch/arm/mach-qcom/Kconfig +0 -16
index 2256cd1e25d1..37572fd79c87 100644
@@ -7,19 +7,3 @@ menuconfig ARCH_QCOM
 	select QCOM_SCM if SMP
 	help
 	  Support for Qualcomm's devicetree based systems.
-
-if ARCH_QCOM
-
-config ARCH_MSM8X60
-	bool "Enable support for MSM8X60"
-	select CLKSRC_QCOM
-
-config ARCH_MSM8960
-	bool "Enable support for MSM8960"
-	select CLKSRC_QCOM
-
-config ARCH_MSM8974
-	bool "Enable support for MSM8974"
-	select HAVE_ARM_ARCH_TIMER
-
-endif
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#11 lore raw

Re: [PATCH 3/3] ARM: qcom: Drop ARCH_MSM* configs

Quoted 23 lines · Stephen Boyd

Drop these configs now that we select the clocksources we need via the defconfig.

---
  arch/arm/mach-qcom/Kconfig | 16 ----------------
  1 file changed, 16 deletions(-)
arch/arm/mach-qcom/Kconfig +0 -6
index 2256cd1e25d1..37572fd79c87 100644
@@ -7,19 +7,3 @@ menuconfig ARCH_QCOM
  	select QCOM_SCM if SMP
  	help
  	  Support for Qualcomm's devicetree based systems.
-
-if ARCH_QCOM
-
-config ARCH_MSM8X60
-	bool "Enable support for MSM8X60"
-	select CLKSRC_QCOM

arch/arm/mach-qcom/Kconfig menuconfig ARCH_QCOM · line 25

Quoted 10 lines
arch/arm/mach-qcom/Kconfig +0 -10
-
-config ARCH_MSM8960
-	bool "Enable support for MSM8960"
-	select CLKSRC_QCOM
-
-config ARCH_MSM8974
-	bool "Enable support for MSM8974"
-	select HAVE_ARM_ARCH_TIMER
-
-endif

What about:

textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000
textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000

in arch/arm/Makefile

and

CONFIG_ARCH_MSM8X60=y
CONFIG_ARCH_MSM8960=y
CONFIG_ARCH_MSM8974=y

in arch/arm/configs/qcom_defconfig and multi_v7_defconfig

?

(perhaps you already did the changes and I am not looking at the right branch).

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
#12 lore raw

Re: [PATCH 3/3] ARM: qcom: Drop ARCH_MSM* configs

Quoted 7 lines · On Wednesday 25 November 2015 13:27:55 Daniel Lezcano wrote:

What about:

textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000
textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000

in arch/arm/Makefile

Good point, we need to do something about these still.

Quoted 9 lines

and

CONFIG_ARCH_MSM8X60=y
CONFIG_ARCH_MSM8960=y
CONFIG_ARCH_MSM8974=y

in arch/arm/configs/qcom_defconfig and multi_v7_defconfig

?

These should be removed, but they are harmless.

Arnd

#13 lore raw

Re: [PATCH 3/3] ARM: qcom: Drop ARCH_MSM* configs

Quoted 11 lines · Arnd Bergmann
Quoted 7 lines · On Wednesday 25 November 2015 13:27:55 Daniel Lezcano wrote:

What about:

textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000
textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000

in arch/arm/Makefile

Good point, we need to do something about these still.

Yeah good catch! My brain must be shutting down due to the holiday coming up.

The nice thing is that CLKSRC_QCOM and this text offset stuff are always used on the same SoCs, so we should be able to make one config in mach-qcom/Kconfig that selects the qcom clksrc driver and adjusts the text offset. So is the suggestion to move CLKSRC_QCOM to mach-qcom/Kconfig, or to make a new config that selects it?

Quoted 11 lines
Quoted 9 lines

and

CONFIG_ARCH_MSM8X60=y
CONFIG_ARCH_MSM8960=y
CONFIG_ARCH_MSM8974=y

in arch/arm/configs/qcom_defconfig and multi_v7_defconfig

?

These should be removed, but they are harmless.

Yes I was planning to let those fall out of some defconfig update patch later on.

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
#14 lore raw

Re: [PATCH 3/3] ARM: qcom: Drop ARCH_MSM* configs

Quoted 16 lines · On Wednesday 25 November 2015 11:34:47 Stephen Boyd wrote:
Quoted 11 lines · Arnd Bergmann
Quoted 7 lines · On Wednesday 25 November 2015 13:27:55 Daniel Lezcano wrote:

What about:

textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000
textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000

in arch/arm/Makefile

Good point, we need to do something about these still.

Yeah good catch! My brain must be shutting down due to the holiday coming up.

Quoted 6 lines

The nice thing is that CLKSRC_QCOM and this text offset stuff are always used on the same SoCs, so we should be able to make one config in mach-qcom/Kconfig that selects the qcom clksrc driver and adjusts the text offset. So is the suggestion to move CLKSRC_QCOM to mach-qcom/Kconfig, or to make a new config that selects it?

I was thinking of a new option that selects it, which I think is more in line with what Daniel wants.

Arnd

#15 lore raw

Re: [PATCH 3/3] ARM: qcom: Drop ARCH_MSM* configs

Quoted 14 lines · Arnd Bergmann
Quoted 13 lines · On Wednesday 25 November 2015 11:34:47 Stephen Boyd wrote:
Quoted 9 lines · Arnd Bergmann
Quoted 6 lines · On Wednesday 25 November 2015 13:27:55 Daniel Lezcano wrote:

What about:

textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000
textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000

in arch/arm/Makefile

Good point, we need to do something about these still.

Yeah good catch! My brain must be shutting down due to the holiday coming up.

Quoted 10 lines
Quoted 6 lines

The nice thing is that CLKSRC_QCOM and this text offset stuff are always used on the same SoCs, so we should be able to make one config in mach-qcom/Kconfig that selects the qcom clksrc driver and adjusts the text offset. So is the suggestion to move CLKSRC_QCOM to mach-qcom/Kconfig, or to make a new config that selects it?

I was thinking of a new option that selects it, which I think is more in line with what Daniel wants.

Ok. Sounds good. Patch will follow soon after I boot test on all the affected devices.

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project