Skip to contentSkip to conversation

powerpc: Don't expose clock vDSO functions when CPU has no timebase

PATCH New Benjamin Herrenschmidt 1 participant 1 message Sep 19, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 powerpc: Don't expose clock vDSO functions when CPU has no timebase

We forgot to remove the clock_gettime, clock_getres and get_tbfreq vDSO calls on CPUs that have no timebase such as 601 or 403 (old CPUs that have different mechanisms and for which the vDSO code will not work properly).

---

 arch/powerpc/kernel/vdso.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/powerpc/kernel/vdso.c +12 -0
Index: linux-work/arch/powerpc/kernel/vdso.c
===================================================================
@@ -98,6 +98,18 @@ static struct vdso_patch_def vdso_patche
 		CPU_FTR_USE_TB, 0,
 		"__kernel_gettimeofday", NULL
 	},
+	{
+		CPU_FTR_USE_TB, 0,
+		"__kernel_clock_gettime", NULL
+	},
+	{
+		CPU_FTR_USE_TB, 0,
+		"__kernel_clock_getres", NULL
+	},
+	{
+		CPU_FTR_USE_TB, 0,
+		"__kernel_get_tbfreq", NULL
+	},
 };
 
 /*