[PATCH RFC 2/2] Documentation: arm: define DT C-states bindings

Lorenzo Pieralisi lorenzo.pieralisi at arm.com
Wed Dec 4 11:31:41 EST 2013


On Wed, Dec 04, 2013 at 03:36:08PM +0000, Kumar Gala wrote:
> 
> On Dec 3, 2013, at 4:40 AM, Lorenzo Pieralisi <lorenzo.pieralisi at arm.com> wrote:
> 
> > On Mon, Dec 02, 2013 at 06:08:16PM +0000, Kumar Gala wrote:
> >> 
> >> On Dec 2, 2013, at 10:20 AM, Lorenzo Pieralisi <lorenzo.pieralisi at arm.com> wrote:
> >> 
> >>> ARM based platforms implement a variety of power management schemes that
> >>> allow processors to enter at run-time low-power states, aka C-states
> >>> in ACPI jargon. The parameters defining these C-states vary on a per-platform
> >>> basis forcing the OS to hardcode the state parameters in platform
> >>> specific static tables whose size grows as the number of platforms supported
> >>> in the kernel increases and hampers device drivers standardization.
> >>> 
> >>> Therefore, this patch aims at standardizing C-state device tree bindings for
> >>> ARM platforms. Bindings define C-state parameters inclusive of entry methods
> >>> and state latencies, to allow operating systems to retrieve the
> >>> configuration entries from the device tree and initialize the related
> >>> power management drivers, paving the way for common code in the kernel
> >>> to deal with power states and removing the need for static data in current
> >>> and previous kernel versions.
> >> 
> >> Where is this spec'd today in the kernel?
> > 
> > How can it be in the kernel given that these bindings have just been posted ?
> > I started coding the layer managing the C-states in the kernel, even
> > though I would avoid writing it and then restart from scratch if these
> > bindings are scrapped. Bindings should not depend on kernel code, it
> > is the other way around, right ?
> 
> I was guessing that there is existing code in the kernel that uses some platform data structures.  I was wondering what that code looked like today.

All C-states (struct cpuidle_driver.states) in drivers in drivers/cpuidle
are examples of static data that would disappear. But there is more to it.
Most of the information added by these bindings is implicit nowadays in the
kernel (cache levels to flush, peripheral state to save/restore); it works
today (but it is not optimized in some cases), it will not tomorrow given that
the complexity of systems is on the rise.

Lorenzo




More information about the linux-arm-kernel mailing list