Skip to contentSkip to conversation

input/joystick: use get_cycles on ARMv8

PATCH Applied Mark Brown 2 participants 3 messages Aug 11, 2014 – Aug 12, 2014

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 input/joystick: use get_cycles on ARMv8

From: Mark Brown <[email protected]>

As with ARM the ARMv8 architecture provides a cycle counter which can be used to provide a high resolution time for the joystick driver and silence the build warning that results from not having a precise timer on ARMv8, making allmodconfig and allyesconfig quieter.

---
 drivers/input/joystick/analog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/joystick/analog.c +1 -1
index 9135606c8649..ab0fdcd36e18 100644
@@ -158,7 +158,7 @@ static unsigned int get_time_pit(void)
 #define GET_TIME(x)	rdtscl(x)
 #define DELTA(x,y)	((y)-(x))
 #define TIME_NAME	"TSC"
-#elif defined(__alpha__) || defined(CONFIG_MN10300) || defined(CONFIG_ARM) || defined(CONFIG_TILE)
+#elif defined(__alpha__) || defined(CONFIG_MN10300) || defined(CONFIG_ARM) || defined(CONFIG_ARM64) || defined(CONFIG_TILE)
 #define GET_TIME(x)	do { x = get_cycles(); } while (0)
 #define DELTA(x,y)	((y)-(x))
 #define TIME_NAME	"get_cycles"
Signature · 1 line
2.0.1
maintainer Applied
#1 lore raw
Quoted 8 lines · Mark Brown

From: Mark Brown <[email protected]>

As with ARM the ARMv8 architecture provides a cycle counter which can be used to provide a high resolution time for the joystick driver and silence the build warning that results from not having a precise timer on ARMv8, making allmodconfig and allyesconfig quieter.

Applied, although I wonder if it is time to retire whole gamecon subsystem. I don't think there are many users left...

Quoted 20 lines
---
 drivers/input/joystick/analog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/joystick/analog.c +1 -1
index 9135606c8649..ab0fdcd36e18 100644
@@ -158,7 +158,7 @@ static unsigned int get_time_pit(void)
 #define GET_TIME(x)	rdtscl(x)
 #define DELTA(x,y)	((y)-(x))
 #define TIME_NAME	"TSC"
-#elif defined(__alpha__) || defined(CONFIG_MN10300) || defined(CONFIG_ARM) || defined(CONFIG_TILE)
+#elif defined(__alpha__) || defined(CONFIG_MN10300) || defined(CONFIG_ARM) || defined(CONFIG_ARM64) || defined(CONFIG_TILE)
 #define GET_TIME(x)	do { x = get_cycles(); } while (0)
 #define DELTA(x,y)	((y)-(x))
 #define TIME_NAME	"get_cycles"
Signature · 1 line
2.0.1
Signature · 1 line
Dmitry
author
#2 lore raw
Quoted 9 lines · Dmitry Torokhov
Quoted 4 lines · Mark Brown

As with ARM the ARMv8 architecture provides a cycle counter which can be used to provide a high resolution time for the joystick driver and silence the build warning that results from not having a precise timer on ARMv8, making allmodconfig and allyesconfig quieter.

Applied, although I wonder if it is time to retire whole gamecon subsystem. I don't think there are many users left...

OTOH it doesn't really do much harm either, the rate of updates seems pretty low. I was wondering about converting the warning to a runtime one - it'll probably be more likely to be seen by anyone who is using it and makes for less of these porting issues but I couldn't quite find the motivation.