summaryrefslogtreecommitdiff
path: root/target/linux
diff options
context:
space:
mode:
authorjogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73>2014-04-05 18:32:34 +0000
committerjogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73>2014-04-05 18:32:34 +0000
commit334e428e11715f4962fdbe52b4182bb0273ad41c (patch)
tree48e36b09acebbabb979c69f0fff726c32c2aafcd /target/linux
parenta5dded6dadc2d5216ffe0545be62148afef305b1 (diff)
brcm63xx: sync mips counters during bringup of cpus
Fixes gettimeofday returning different values depending on which cpu it is called. Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40387 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/brcm63xx/config-3.101
-rw-r--r--target/linux/brcm63xx/config-3.141
-rw-r--r--target/linux/brcm63xx/patches-3.10/101-MIPS-BCM63XX-sync-mips-counter-during-cpu-bringup.patch27
-rw-r--r--target/linux/brcm63xx/patches-3.14/101-MIPS-BCM63XX-sync-mips-counter-during-cpu-bringup.patch27
4 files changed, 56 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/config-3.10 b/target/linux/brcm63xx/config-3.10
index ab022aec77..725a827a10 100644
--- a/target/linux/brcm63xx/config-3.10
+++ b/target/linux/brcm63xx/config-3.10
@@ -172,6 +172,7 @@ CONFIG_SSB_PCIHOST_POSSIBLE=y
CONFIG_SSB_SPROM=y
CONFIG_SWAP_IO_SPACE=y
CONFIG_SWCONFIG=y
+CONFIG_SYNC_R4K=y
CONFIG_SYS_HAS_CPU_BMIPS=y
CONFIG_SYS_HAS_CPU_BMIPS32_3300=y
CONFIG_SYS_HAS_CPU_BMIPS4350=y
diff --git a/target/linux/brcm63xx/config-3.14 b/target/linux/brcm63xx/config-3.14
index 2ab663ef15..9a044ec743 100644
--- a/target/linux/brcm63xx/config-3.14
+++ b/target/linux/brcm63xx/config-3.14
@@ -181,6 +181,7 @@ CONFIG_SSB_PCIHOST_POSSIBLE=y
CONFIG_SSB_SPROM=y
CONFIG_SWAP_IO_SPACE=y
CONFIG_SWCONFIG=y
+CONFIG_SYNC_R4K=y
CONFIG_SYS_HAS_CPU_BMIPS=y
CONFIG_SYS_HAS_CPU_BMIPS32_3300=y
CONFIG_SYS_HAS_CPU_BMIPS4350=y
diff --git a/target/linux/brcm63xx/patches-3.10/101-MIPS-BCM63XX-sync-mips-counter-during-cpu-bringup.patch b/target/linux/brcm63xx/patches-3.10/101-MIPS-BCM63XX-sync-mips-counter-during-cpu-bringup.patch
new file mode 100644
index 0000000000..21fffb38b0
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.10/101-MIPS-BCM63XX-sync-mips-counter-during-cpu-bringup.patch
@@ -0,0 +1,27 @@
+From 23c21090f49a64b532755542a71e9aa3e4fc84d9 Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jogo@openwrt.org>
+Date: Sat, 5 Apr 2014 20:07:25 +0200
+Subject: [PATCH] MIPS: BCM63XX: sync mips counter during cpu bringup
+
+We are using the mips counters as the clock source, so we need to ensure
+they are synced, else e.g. gettimeofday will return different values
+depending on which core it was run.
+
+Observed difference was about 8 seconds, causing ~8 seconds ping or time
+running backwards for some programs.
+
+Signed-off-by: Jonas Gorski <jogo@openwrt.org>
+---
+ arch/mips/Kconfig | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/mips/Kconfig
++++ b/arch/mips/Kconfig
+@@ -127,6 +127,7 @@ config BCM63XX
+ select BOOT_RAW
+ select CEVT_R4K
+ select CSRC_R4K
++ select SYNC_R4K
+ select DMA_NONCOHERENT
+ select IRQ_CPU
+ select NR_CPUS_DEFAULT_2
diff --git a/target/linux/brcm63xx/patches-3.14/101-MIPS-BCM63XX-sync-mips-counter-during-cpu-bringup.patch b/target/linux/brcm63xx/patches-3.14/101-MIPS-BCM63XX-sync-mips-counter-during-cpu-bringup.patch
new file mode 100644
index 0000000000..f303c6173b
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.14/101-MIPS-BCM63XX-sync-mips-counter-during-cpu-bringup.patch
@@ -0,0 +1,27 @@
+From 23c21090f49a64b532755542a71e9aa3e4fc84d9 Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jogo@openwrt.org>
+Date: Sat, 5 Apr 2014 20:07:25 +0200
+Subject: [PATCH] MIPS: BCM63XX: sync mips counter during cpu bringup
+
+We are using the mips counters as the clock source, so we need to ensure
+they are synced, else e.g. gettimeofday will return different values
+depending on which core it was run.
+
+Observed difference was about 8 seconds, causing ~8 seconds ping or time
+running backwards for some programs.
+
+Signed-off-by: Jonas Gorski <jogo@openwrt.org>
+---
+ arch/mips/Kconfig | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/mips/Kconfig
++++ b/arch/mips/Kconfig
+@@ -132,6 +132,7 @@ config BCM63XX
+ select BOOT_RAW
+ select CEVT_R4K
+ select CSRC_R4K
++ select SYNC_R4K
+ select DMA_NONCOHERENT
+ select IRQ_CPU
+ select SYS_SUPPORTS_32BIT_KERNEL