Skip to contentSkip to conversation

Makefile: Change COUNTER_FREQ to 100 MHz

PATCH In review Peter Hoyes 2 participants 4 messages Feb 15, 2022 – Jan 30, 2023 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: Change COUNTER_FREQ to 100 MHz

From: Peter Hoyes <[email protected]>

Older Arm Fast Models (AEM < RevC) had a base frequency of 24 MHz. but the RevC base models use 100 MHz. There is not a robust method of determining the configured base frequency at runtime, so update COUNTER_FREQ to be 100 MHz.

---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile.am +1 -1
index 08e304a..6ebece2 100644
@@ -13,7 +13,7 @@ SCRIPT_DIR	:= $(top_srcdir)/scripts
 PHYS_OFFSET	:= $(shell perl -I $(SCRIPT_DIR) $(SCRIPT_DIR)/findmem.pl $(KERNEL_DTB))
 UART_BASE	:= $(shell perl -I $(SCRIPT_DIR) $(SCRIPT_DIR)/findbase.pl $(KERNEL_DTB) 0 'arm,pl011')
 SYSREGS_BASE	:= $(shell perl -I $(SCRIPT_DIR) $(SCRIPT_DIR)/findbase.pl $(KERNEL_DTB) 0 'arm,vexpress-sysreg' 2> /dev/null)
-COUNTER_FREQ	:= 24000000
+COUNTER_FREQ	:= 100000000
 
 CPU_IDS		:= $(shell perl -I $(SCRIPT_DIR) $(SCRIPT_DIR)/findcpuids.pl $(KERNEL_DTB))
 NR_CPUS         := $(shell echo $(CPU_IDS) | tr ',' ' ' | wc -w)
Signature · 7 lines
2.25.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw
Quoted 6 lines · Peter Hoyes

From: Peter Hoyes <[email protected]>

Older Arm Fast Models (AEM < RevC) had a base frequency of 24 MHz. but the RevC base models use 100 MHz. There is not a robust method of determining the configured base frequency at runtime, so update COUNTER_FREQ to be 100 MHz.

This looks right to me; if no-one shouts in the next day or two I'll apply this.

In future, if we need this to be configurable, I reckon we can either add a specific option for this or a more general "platform" option which can also know about other things which aren't in the DTB.

Thanks,
Mark.

Quoted 22 lines
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile.am +1 -1
index 08e304a..6ebece2 100644
@@ -13,7 +13,7 @@ SCRIPT_DIR	:= $(top_srcdir)/scripts
 PHYS_OFFSET	:= $(shell perl -I $(SCRIPT_DIR) $(SCRIPT_DIR)/findmem.pl $(KERNEL_DTB))
 UART_BASE	:= $(shell perl -I $(SCRIPT_DIR) $(SCRIPT_DIR)/findbase.pl $(KERNEL_DTB) 0 'arm,pl011')
 SYSREGS_BASE	:= $(shell perl -I $(SCRIPT_DIR) $(SCRIPT_DIR)/findbase.pl $(KERNEL_DTB) 0 'arm,vexpress-sysreg' 2> /dev/null)
-COUNTER_FREQ	:= 24000000
+COUNTER_FREQ	:= 100000000
 
 CPU_IDS		:= $(shell perl -I $(SCRIPT_DIR) $(SCRIPT_DIR)/findcpuids.pl $(KERNEL_DTB))
 NR_CPUS         := $(shell echo $(CPU_IDS) | tr ',' ' ' | wc -w)
Signature · 1 line
2.25.1

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#2 lore raw
Quoted 10 lines · Mark Rutland
Quoted 6 lines · Peter Hoyes

From: Peter Hoyes <[email protected]>

Older Arm Fast Models (AEM < RevC) had a base frequency of 24 MHz. but the RevC base models use 100 MHz. There is not a robust method of determining the configured base frequency at runtime, so update COUNTER_FREQ to be 100 MHz.

This looks right to me; if no-one shouts in the next day or two I'll apply this.

Quoted 6 lines

In future, if we need this to be configurable, I reckon we can either add a specific option for this or a more general "platform" option which can also know about other things which aren't in the DTB.

Thanks,
Mark.

I don't think there have been any further comments - would it be possible to apply this?

Peter

Quoted 16 lines
Quoted 16 lines
---
  Makefile.am | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Makefile.am +1 -1
index 08e304a..6ebece2 100644
@@ -13,7 +13,7 @@ SCRIPT_DIR	:= $(top_srcdir)/scripts
  PHYS_OFFSET	:= $(shell perl -I $(SCRIPT_DIR) $(SCRIPT_DIR)/findmem.pl $(KERNEL_DTB))
  UART_BASE	:= $(shell perl -I $(SCRIPT_DIR) $(SCRIPT_DIR)/findbase.pl $(KERNEL_DTB) 0 'arm,pl011')
  SYSREGS_BASE	:= $(shell perl -I $(SCRIPT_DIR) $(SCRIPT_DIR)/findbase.pl $(KERNEL_DTB) 0 'arm,vexpress-sysreg' 2> /dev/null)
-COUNTER_FREQ	:= 24000000
+COUNTER_FREQ	:= 100000000
 
Quoted 5 lines
Quoted 5 lines
Makefile.am +0 -0
  CPU_IDS		:= $(shell perl -I $(SCRIPT_DIR) $(SCRIPT_DIR)/findcpuids.pl $(KERNEL_DTB))
  NR_CPUS         := $(shell echo $(CPU_IDS) | tr ',' ' ' | wc -w)
Signature · 1 line
2.25.1

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#3 lore raw

Hi Peter,

Quoted 15 lines · Peter Hoyes
Quoted 14 lines · Mark Rutland
Quoted 6 lines · Peter Hoyes

From: Peter Hoyes <[email protected]>

Older Arm Fast Models (AEM < RevC) had a base frequency of 24 MHz. but the RevC base models use 100 MHz. There is not a robust method of determining the configured base frequency at runtime, so update COUNTER_FREQ to be 100 MHz.

This looks right to me; if no-one shouts in the next day or two I'll apply this.

In future, if we need this to be configurable, I reckon we can either add a specific option for this or a more general "platform" option which can also know about other things which aren't in the DTB.

Quoted 5 lines
Quoted 2 lines

Thanks,
Mark.

I don't think there have been any further comments - would it be possible to apply this?

Apologies for the extremely long delay; I've applied this and pushed it out now.

Thanks,
Mark.

Quoted 7 lines

Peter

Quoted 5 lines
Quoted 5 lines
---
  Makefile.am | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines
Quoted 7 lines
Quoted 7 lines
Makefile.am +0 -0
index 08e304a..6ebece2 100644
@@ -13,7 +13,7 @@ SCRIPT_DIR	:= $(top_srcdir)/scripts
  PHYS_OFFSET	:= $(shell perl -I $(SCRIPT_DIR) $(SCRIPT_DIR)/findmem.pl $(KERNEL_DTB))
  UART_BASE	:= $(shell perl -I $(SCRIPT_DIR) $(SCRIPT_DIR)/findbase.pl $(KERNEL_DTB) 0 'arm,pl011')
Quoted 8 lines
Quoted 8 lines
Makefile.am +1 -1
  SYSREGS_BASE	:= $(shell perl -I $(SCRIPT_DIR) $(SCRIPT_DIR)/findbase.pl $(KERNEL_DTB) 0 'arm,vexpress-sysreg' 2> /dev/null)
-COUNTER_FREQ	:= 24000000
+COUNTER_FREQ	:= 100000000
  CPU_IDS		:= $(shell perl -I $(SCRIPT_DIR) $(SCRIPT_DIR)/findcpuids.pl $(KERNEL_DTB))
  NR_CPUS         := $(shell echo $(CPU_IDS) | tr ',' ' ' | wc -w)
Signature · 1 line
2.25.1

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel