[RFC patch 02/11] cpuidle / arm : a single cpuidle driver

Andrew Lunn andrew at lunn.ch
Tue Mar 26 07:17:29 EDT 2013


> > All above code is completly generic and I would rather create
> > some thing like "drivers/cpuidle/generic-idle.c" where it can
> > handle all the registration stuff for all arch's rather than
> > just ARM. There is nothing ARM specific in above code IMHO.
> 
> Yes, it seems generic but it won't be.

It very much sounds like you are going in the wrong direction.  You
should be moving towards generic code, not away from generic code.

Yes, you at some point will need ARM specific code, but that should be
a minor part and can be placed somewhere else, and called by a
function pointer, or the generic code can be in a library and called
from the ARM specific code, etc.

     Andrew





More information about the linux-arm-kernel mailing list