arm: Accomodate function name changes in newer linux kernels
authorEric Van Hensbergen <Eric.VanHensbergen@ARM.com>
Thu, 17 Oct 2013 15:20:45 +0000 (10:20 -0500)
committerEric Van Hensbergen <Eric.VanHensbergen@ARM.com>
Thu, 17 Oct 2013 15:20:45 +0000 (10:20 -0500)
src/arch/arm/linux/system.cc

index e714cc9134a721358a7c5ee52da6c948b8cafe64..bc7fd2cb6754be017094a13ef58a34664e821afc 100644 (file)
@@ -80,13 +80,20 @@ LinuxArmSystem::LinuxArmSystem(Params *p)
     }
 
     // With ARM udelay() is #defined to __udelay
-    uDelaySkipEvent = addKernelFuncEventOrPanic<UDelayEvent>(
-        "__udelay", "__udelay", 1000, 0);
+    // newer kernels use __loop_udelay and __loop_const_udelay symbols
+    uDelaySkipEvent = addKernelFuncEvent<UDelayEvent>(
+        "__loop_udelay", "__udelay", 1000, 0);
+    if(!uDelaySkipEvent)
+        uDelaySkipEvent = addKernelFuncEventOrPanic<UDelayEvent>(
+         "__udelay", "__udelay", 1000, 0);
 
     // constant arguments to udelay() have some precomputation done ahead of
     // time. Constant comes from code.
-    constUDelaySkipEvent = addKernelFuncEventOrPanic<UDelayEvent>(
-        "__const_udelay", "__const_udelay", 1000, 107374);
+    constUDelaySkipEvent = addKernelFuncEvent<UDelayEvent>(
+        "__loop_const_udelay", "__const_udelay", 1000, 107374);
+    if(!constUDelaySkipEvent)
+        constUDelaySkipEvent = addKernelFuncEventOrPanic<UDelayEvent>(
+         "__const_udelay", "__const_udelay", 1000, 107374);
 
     secDataPtrAddr = 0;
     secDataAddr = 0;