[PATCH 13/22] kdrive/linux: Use shared NoopDDA to utilize code cache better

Pauli ext-pauli.nieminen at nokia.com
Wed Dec 29 11:27:25 PST 2010


From: Pauli Nieminen <ext-pauli.nieminen at nokia.com>

Calling function that is in code cache is order of magnitude faster. In
arm non-cached simple function takes about 1us while cached function
takes max 200ns.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen at nokia.com>
---
 hw/kdrive/linux/linux.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/hw/kdrive/linux/linux.c b/hw/kdrive/linux/linux.c
index 9863c14..10c5860 100644
--- a/hw/kdrive/linux/linux.c
+++ b/hw/kdrive/linux/linux.c
@@ -179,11 +179,6 @@ LinuxSetSwitchMode (int mode)
     }
 }
 
-static void
-LinuxApmBlock (pointer blockData, OSTimePtr pTimeout, pointer pReadmask)
-{
-}
-
 static Bool LinuxApmRunning;
 
 static void
@@ -258,7 +253,7 @@ LinuxEnable (void)
     {
 	LinuxApmRunning = TRUE;
 	fcntl (LinuxApmFd, F_SETFL, fcntl (LinuxApmFd, F_GETFL) | NOBLOCK);
-	RegisterBlockAndWakeupHandlers (LinuxApmBlock, LinuxApmWakeup, 0);
+	RegisterBlockAndWakeupHandlers ((BlockHandlerProcPtr)NoopDDA, LinuxApmWakeup, 0);
 	AddEnabledDevice (LinuxApmFd);
     }
 
@@ -294,7 +289,7 @@ LinuxDisable (void)
     enabled = FALSE;
     if (LinuxApmFd >= 0)
     {
-	RemoveBlockAndWakeupHandlers (LinuxApmBlock, LinuxApmWakeup, 0);
+	RemoveBlockAndWakeupHandlers ((BlockHandlerProcPtr)NoopDDA, LinuxApmWakeup, 0);
 	RemoveEnabledDevice (LinuxApmFd);
 	close (LinuxApmFd);
 	LinuxApmFd = -1;
-- 
1.7.0.4



More information about the xorg-devel mailing list