Skip to contentSkip to conversation

trivial fixes relating to !CONFIG_OF

PATCH RESEND New Jonathan Austin 2 participants 7 messages Aug 14, 2013 – Aug 15, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover trivial fixes relating to !CONFIG_OF

This series contains 3 trivial fixes picked up along the path of building kernels without CONFIG_OF enabled. They're things likely to break randconfig builds, etc, if not fixed up.

[I'm resending these including the clocksource maintainers as suggested by Daniel Lezcano]

Jonathan Austin (3):
PSCI: add missing dependency on CONFIG_OF for PSCI.
clocksource: Add missing dependency on CONFIG_OF for ARM_ARCH_TIMER
ARM: arch_timer: Add missing include for of_* functions

 arch/arm/Kconfig                     |    1 +
 drivers/clocksource/Kconfig          |    3 ++-
 drivers/clocksource/arm_arch_timer.c |    1 +
 3 files changed, 4 insertions(+), 1 deletion(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH RESEND 1/3 PSCI: add missing dependency on CONFIG_OF for PSCI.

The PSCI initialisation depends on data found in the DT. Without this the including PSCI support makes little sense, and furthermore the of_* stub functions aren't broad enough to ensure that this builds without CONFIG_OF.

As there is little enthusiasm for extending these stubs without useful use-cases (of which this is *not* an example) this patch prevents building of PSCI without CONFIG_OF.

---
 arch/arm/Kconfig |    1 +
 1 file changed, 1 insertion(+)
arch/arm/Kconfig +1 -0
index ba412e0..972ec25 100644
@@ -1577,6 +1577,7 @@ config HOTPLUG_CPU
 config ARM_PSCI
 	bool "Support for the ARM Power State Coordination Interface (PSCI)"
 	depends on CPU_V7
+	depends on CONFIG_OF
 	help
 	  Say Y here if you want Linux to communicate with system firmware
 	  implementing the PSCI specification for CPU-centric power
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH RESEND 1/3 PSCI: add missing dependency on CONFIG_OF for PSCI.

Hello.

Quoted 18 lines · Jonathan Austin

The PSCI initialisation depends on data found in the DT. Without this the including PSCI support makes little sense, and furthermore the of_* stub functions aren't broad enough to ensure that this builds without CONFIG_OF.

As there is little enthusiasm for extending these stubs without useful use-cases (of which this is *not* an example) this patch prevents building of PSCI without CONFIG_OF.

---
  arch/arm/Kconfig |    1 +
  1 file changed, 1 insertion(+)
arch/arm/Kconfig +0 -0
index ba412e0..972ec25 100644

arch/arm/Kconfig config HOTPLUG_CPU · line 1580

Quoted 4 lines
arch/arm/Kconfig +1 -0
@@ -1577,6 +1577,7 @@ config HOTPLUG_CPU
  config ARM_PSCI
  	bool "Support for the ARM Power State Coordination Interface (PSCI)"
  	depends on CPU_V7
+	depends on CONFIG_OF

I think you meant just OF. :-)

WBR, Sergei

#3 lore raw

PATCH RESEND 1/3 PSCI: add missing dependency on CONFIG_OF for PSCI.

Hi Sergei,

Quoted 17 lines · Sergei Shtylyov

Hello.

Quoted 12 lines · Jonathan Austin

The PSCI initialisation depends on data found in the DT. Without this the including PSCI support makes little sense, and furthermore the of_* stub functions aren't broad enough to ensure that this builds without CONFIG_OF.

As there is little enthusiasm for extending these stubs without useful use-cases (of which this is *not* an example) this patch prevents building of PSCI without CONFIG_OF.

---
   arch/arm/Kconfig |    1 +
   1 file changed, 1 insertion(+)
Quoted 12 lines

arch/arm/Kconfig config HOTPLUG_CPU · line 1580

Quoted 9 lines
arch/arm/Kconfig +1 -0
index ba412e0..972ec25 100644
@@ -1577,6 +1577,7 @@ config HOTPLUG_CPU
   config ARM_PSCI
   	bool "Support for the ARM Power State Coordination Interface (PSCI)"
   	depends on CPU_V7
+	depends on CONFIG_OF

I think you meant just OF. :-)

Yikes, sure did.

Thanks.
Jonny

Quoted 3 lines

WBR, Sergei

#4 lore raw

PATCH RESEND 1/3 PSCI: add missing dependency on CONFIG_OF for PSCI.

In reply to Jonathan Austin
Quoted 19 lines · Jonathan Austin

The PSCI initialisation depends on data found in the DT. Without this the including PSCI support makes little sense, and furthermore the of_* stub functions aren't broad enough to ensure that this builds without CONFIG_OF.

As there is little enthusiasm for extending these stubs without useful use-cases (of which this is *not* an example) this patch prevents building of PSCI without CONFIG_OF.

---
  arch/arm/Kconfig |    1 +
  1 file changed, 1 insertion(+)
arch/arm/Kconfig +0 -0
index ba412e0..972ec25 100644

arch/arm/Kconfig config HOTPLUG_CPU · line 1583

Quoted 7 lines
arch/arm/Kconfig +1 -0
@@ -1577,6 +1577,7 @@ config HOTPLUG_CPU
  config ARM_PSCI
      bool "Support for the ARM Power State Coordination Interface (PSCI)"
      depends on CPU_V7
+     depends on CONFIG_OF
      help
        Say Y here if you want Linux to communicate with system firmware
        implementing the PSCI specification for CPU-centric power

As Sergei pointed out, this should just be OF not CONFIG_OF....

------8<-------

arch/arm/Kconfig +1 -0
index 43594d5..f004de7 100644
@@ -1577,6 +1577,7 @@ config HOTPLUG_CPU
 config ARM_PSCI
        bool "Support for the ARM Power State Coordination Interface (PSCI)"
        depends on CPU_V7
+       depends on OF
        help
          Say Y here if you want Linux to communicate with system firmware
          implementing the PSCI specification for CPU-centric power

---->8---------------

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2557590 ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2548782

#5 lore raw

PATCH RESEND 2/3 clocksource: Add missing dependency on CONFIG_OF for ARM_ARCH_TIMER

In reply to Jonathan Austin

Initialisation of the ARM Arch timer requires data from the DT. There is no fallback initialisation method and hence selecting ARM_ARCH_TIMER without OF makes little sense.

Furthermore, doing so causes a build error because the of_* stubs for !CONFIG_OF do not extend to all of the functions being used by this driver, and will not be extended unless there are valid use-cases for them to be (this is not a valid case).

---
 drivers/clocksource/Kconfig |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +2 -1
index b7b9b04..4348902 100644
@@ -72,7 +72,8 @@ config CLKSRC_DBX500_PRCMU_SCHED_CLOCK
 
 config ARM_ARCH_TIMER
 	bool
-	select CLKSRC_OF if OF
+	depends on OF
+	select CLKSRC_OF
 
 config ARM_GLOBAL_TIMER
 	bool
Signature · 1 line
1.7.9.5
#6 lore raw

PATCH RESEND 3/3 ARM: arch_timer: Add missing include for of_* functions

In reply to Jonathan Austin

The arch timer code uses a bunch of of_* functions that are defined in linux/of.h. Currently this header is not included and the functions are available elsewise. This fixes that for correctness.

---
 drivers/clocksource/arm_arch_timer.c |    1 +
 1 file changed, 1 insertion(+)
drivers/clocksource/arm_arch_timer.c +1 -0
index ffadd83..857a196 100644
@@ -15,6 +15,7 @@
 #include <linux/cpu.h>
 #include <linux/clockchips.h>
 #include <linux/interrupt.h>
+#include <linux/of.h>
 #include <linux/of_irq.h>
 #include <linux/io.h>
 
Signature · 1 line
1.7.9.5