]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] i386 apm.c optimization
authorAndreas Mohr <andi@rhlx01.fht-esslingen.de>
Fri, 23 Jun 2006 09:04:17 +0000 (02:04 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 23 Jun 2006 14:42:56 +0000 (07:42 -0700)
commit1e984b946bc692a0b94fee0271da394628c3748b
tree4cd80cf123aa220e5c1c3c534bf09fa8d001ad28
parent2c1675c583c1559bbcc737c708d8ebcac265cbc4
[PATCH] i386 apm.c optimization

- avoid expensive modulo (integer division) which happened
  since APM_MAX_EVENTS is 20 (non-power-of-2)
- kill compiler warnings by initializing two variables
- add __read_mostly to some important static variables that are read often
  (by idle loop etc.)
- constify several structures

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/kernel/apm.c