<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/acpi, branch v3.2-rc5</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>pstore: pass allocated memory region back to caller</title>
<updated>2011-11-17T20:58:07+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2011-11-17T20:58:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f6f8285132907757ef84ef8dae0a1244b8cde6ac'/>
<id>f6f8285132907757ef84ef8dae0a1244b8cde6ac</id>
<content type='text'>
The buf_lock cannot be held while populating the inodes, so make the backend
pass forward an allocated and filled buffer instead. This solves the following
backtrace. The effect is that "buf" is only ever used to notify the backends
that something was written to it, and shouldn't be used in the read path.

To replace the buf_lock during the read path, isolate the open/read/close
loop with a separate mutex to maintain serialized access to the backend.

Note that is is up to the pstore backend to cope if the (*write)() path is
called in the middle of the read path.

[   59.691019] BUG: sleeping function called from invalid context at .../mm/slub.c:847
[   59.691019] in_atomic(): 0, irqs_disabled(): 1, pid: 1819, name: mount
[   59.691019] Pid: 1819, comm: mount Not tainted 3.0.8 #1
[   59.691019] Call Trace:
[   59.691019]  [&lt;810252d5&gt;] __might_sleep+0xc3/0xca
[   59.691019]  [&lt;810a26e6&gt;] kmem_cache_alloc+0x32/0xf3
[   59.691019]  [&lt;810b53ac&gt;] ? __d_lookup_rcu+0x6f/0xf4
[   59.691019]  [&lt;810b68b1&gt;] alloc_inode+0x2a/0x64
[   59.691019]  [&lt;810b6903&gt;] new_inode+0x18/0x43
[   59.691019]  [&lt;81142447&gt;] pstore_get_inode.isra.1+0x11/0x98
[   59.691019]  [&lt;81142623&gt;] pstore_mkfile+0xae/0x26f
[   59.691019]  [&lt;810a2a66&gt;] ? kmem_cache_free+0x19/0xb1
[   59.691019]  [&lt;8116c821&gt;] ? ida_get_new_above+0x140/0x158
[   59.691019]  [&lt;811708ea&gt;] ? __init_rwsem+0x1e/0x2c
[   59.691019]  [&lt;810b67e8&gt;] ? inode_init_always+0x111/0x1b0
[   59.691019]  [&lt;8102127e&gt;] ? should_resched+0xd/0x27
[   59.691019]  [&lt;8137977f&gt;] ? _cond_resched+0xd/0x21
[   59.691019]  [&lt;81142abf&gt;] pstore_get_records+0x52/0xa7
[   59.691019]  [&lt;8114254b&gt;] pstore_fill_super+0x7d/0x91
[   59.691019]  [&lt;810a7ff5&gt;] mount_single+0x46/0x82
[   59.691019]  [&lt;8114231a&gt;] pstore_mount+0x15/0x17
[   59.691019]  [&lt;811424ce&gt;] ? pstore_get_inode.isra.1+0x98/0x98
[   59.691019]  [&lt;810a8199&gt;] mount_fs+0x5a/0x12d
[   59.691019]  [&lt;810b9174&gt;] ? alloc_vfsmnt+0xa4/0x14a
[   59.691019]  [&lt;810b9474&gt;] vfs_kern_mount+0x4f/0x7d
[   59.691019]  [&lt;810b9d7e&gt;] do_kern_mount+0x34/0xb2
[   59.691019]  [&lt;810bb15f&gt;] do_mount+0x5fc/0x64a
[   59.691019]  [&lt;810912fb&gt;] ? strndup_user+0x2e/0x3f
[   59.691019]  [&lt;810bb3cb&gt;] sys_mount+0x66/0x99
[   59.691019]  [&lt;8137b537&gt;] sysenter_do_call+0x12/0x26

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The buf_lock cannot be held while populating the inodes, so make the backend
pass forward an allocated and filled buffer instead. This solves the following
backtrace. The effect is that "buf" is only ever used to notify the backends
that something was written to it, and shouldn't be used in the read path.

To replace the buf_lock during the read path, isolate the open/read/close
loop with a separate mutex to maintain serialized access to the backend.

Note that is is up to the pstore backend to cope if the (*write)() path is
called in the middle of the read path.

[   59.691019] BUG: sleeping function called from invalid context at .../mm/slub.c:847
[   59.691019] in_atomic(): 0, irqs_disabled(): 1, pid: 1819, name: mount
[   59.691019] Pid: 1819, comm: mount Not tainted 3.0.8 #1
[   59.691019] Call Trace:
[   59.691019]  [&lt;810252d5&gt;] __might_sleep+0xc3/0xca
[   59.691019]  [&lt;810a26e6&gt;] kmem_cache_alloc+0x32/0xf3
[   59.691019]  [&lt;810b53ac&gt;] ? __d_lookup_rcu+0x6f/0xf4
[   59.691019]  [&lt;810b68b1&gt;] alloc_inode+0x2a/0x64
[   59.691019]  [&lt;810b6903&gt;] new_inode+0x18/0x43
[   59.691019]  [&lt;81142447&gt;] pstore_get_inode.isra.1+0x11/0x98
[   59.691019]  [&lt;81142623&gt;] pstore_mkfile+0xae/0x26f
[   59.691019]  [&lt;810a2a66&gt;] ? kmem_cache_free+0x19/0xb1
[   59.691019]  [&lt;8116c821&gt;] ? ida_get_new_above+0x140/0x158
[   59.691019]  [&lt;811708ea&gt;] ? __init_rwsem+0x1e/0x2c
[   59.691019]  [&lt;810b67e8&gt;] ? inode_init_always+0x111/0x1b0
[   59.691019]  [&lt;8102127e&gt;] ? should_resched+0xd/0x27
[   59.691019]  [&lt;8137977f&gt;] ? _cond_resched+0xd/0x21
[   59.691019]  [&lt;81142abf&gt;] pstore_get_records+0x52/0xa7
[   59.691019]  [&lt;8114254b&gt;] pstore_fill_super+0x7d/0x91
[   59.691019]  [&lt;810a7ff5&gt;] mount_single+0x46/0x82
[   59.691019]  [&lt;8114231a&gt;] pstore_mount+0x15/0x17
[   59.691019]  [&lt;811424ce&gt;] ? pstore_get_inode.isra.1+0x98/0x98
[   59.691019]  [&lt;810a8199&gt;] mount_fs+0x5a/0x12d
[   59.691019]  [&lt;810b9174&gt;] ? alloc_vfsmnt+0xa4/0x14a
[   59.691019]  [&lt;810b9474&gt;] vfs_kern_mount+0x4f/0x7d
[   59.691019]  [&lt;810b9d7e&gt;] do_kern_mount+0x34/0xb2
[   59.691019]  [&lt;810bb15f&gt;] do_mount+0x5fc/0x64a
[   59.691019]  [&lt;810912fb&gt;] ? strndup_user+0x2e/0x3f
[   59.691019]  [&lt;810bb3cb&gt;] sys_mount+0x66/0x99
[   59.691019]  [&lt;8137b537&gt;] sysenter_do_call+0x12/0x26

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI / cpuidle: Remove acpi_idle_suspend (to fix suspend regression)</title>
<updated>2011-11-12T23:30:14+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2011-11-12T22:17:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3439a8da16bcad6b0982ece938c9f8299bb53584'/>
<id>3439a8da16bcad6b0982ece938c9f8299bb53584</id>
<content type='text'>
After commit e978aa7d7d57 ("cpuidle: Move dev-&gt;last_residency update to
driver enter routine; remove dev-&gt;last_state") setting acpi_idle_suspend
to 1 by acpi_processor_suspend() causes the ACPI cpuidle routines to
return error codes continuously, which in turn causes cpuidle to lock up
(hard).

However, acpi_idle_suspend doesn't appear to be useful for any
particular purpose (it's racy and doesn't really provide any real
protection), so it can be removed, which makes the problem go away.

Reported-and-tested-by: Tomas M. &lt;tmezzadra@gmail.com&gt;
Reported-and-tested-by: Ferenc Wagner &lt;wferi@niif.hu&gt;
Tested-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After commit e978aa7d7d57 ("cpuidle: Move dev-&gt;last_residency update to
driver enter routine; remove dev-&gt;last_state") setting acpi_idle_suspend
to 1 by acpi_processor_suspend() causes the ACPI cpuidle routines to
return error codes continuously, which in turn causes cpuidle to lock up
(hard).

However, acpi_idle_suspend doesn't appear to be useful for any
particular purpose (it's racy and doesn't really provide any real
protection), so it can be removed, which makes the problem go away.

Reported-and-tested-by: Tomas M. &lt;tmezzadra@gmail.com&gt;
Reported-and-tested-by: Ferenc Wagner &lt;wferi@niif.hu&gt;
Tested-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux</title>
<updated>2011-11-07T18:13:52+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-11-07T18:13:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3c00303206c3a1ccd86579efdc90bc35f140962e'/>
<id>3c00303206c3a1ccd86579efdc90bc35f140962e</id>
<content type='text'>
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
  cpuidle: Single/Global registration of idle states
  cpuidle: Split cpuidle_state structure and move per-cpu statistics fields
  cpuidle: Remove CPUIDLE_FLAG_IGNORE and dev-&gt;prepare()
  cpuidle: Move dev-&gt;last_residency update to driver enter routine; remove dev-&gt;last_state
  ACPI: Fix CONFIG_ACPI_DOCK=n compiler warning
  ACPI: Export FADT pm_profile integer value to userspace
  thermal: Prevent polling from happening during system suspend
  ACPI: Drop ACPI_NO_HARDWARE_INIT
  ACPI atomicio: Convert width in bits to bytes in __acpi_ioremap_fast()
  PNPACPI: Simplify disabled resource registration
  ACPI: Fix possible recursive locking in hwregs.c
  ACPI: use kstrdup()
  mrst pmu: update comment
  tools/power turbostat: less verbose debugging
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
  cpuidle: Single/Global registration of idle states
  cpuidle: Split cpuidle_state structure and move per-cpu statistics fields
  cpuidle: Remove CPUIDLE_FLAG_IGNORE and dev-&gt;prepare()
  cpuidle: Move dev-&gt;last_residency update to driver enter routine; remove dev-&gt;last_state
  ACPI: Fix CONFIG_ACPI_DOCK=n compiler warning
  ACPI: Export FADT pm_profile integer value to userspace
  thermal: Prevent polling from happening during system suspend
  ACPI: Drop ACPI_NO_HARDWARE_INIT
  ACPI atomicio: Convert width in bits to bytes in __acpi_ioremap_fast()
  PNPACPI: Simplify disabled resource registration
  ACPI: Fix possible recursive locking in hwregs.c
  ACPI: use kstrdup()
  mrst pmu: update comment
  tools/power turbostat: less verbose debugging
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux</title>
<updated>2011-11-07T03:44:47+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-11-07T03:44:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=32aaeffbd4a7457bf2f7448b33b5946ff2a960eb'/>
<id>32aaeffbd4a7457bf2f7448b33b5946ff2a960eb</id>
<content type='text'>
* 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
  Revert "tracing: Include module.h in define_trace.h"
  irq: don't put module.h into irq.h for tracking irqgen modules.
  bluetooth: macroize two small inlines to avoid module.h
  ip_vs.h: fix implicit use of module_get/module_put from module.h
  nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
  include: replace linux/module.h with "struct module" wherever possible
  include: convert various register fcns to macros to avoid include chaining
  crypto.h: remove unused crypto_tfm_alg_modname() inline
  uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
  pm_runtime.h: explicitly requires notifier.h
  linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
  miscdevice.h: fix up implicit use of lists and types
  stop_machine.h: fix implicit use of smp.h for smp_processor_id
  of: fix implicit use of errno.h in include/linux/of.h
  of_platform.h: delete needless include &lt;linux/module.h&gt;
  acpi: remove module.h include from platform/aclinux.h
  miscdevice.h: delete unnecessary inclusion of module.h
  device_cgroup.h: delete needless include &lt;linux/module.h&gt;
  net: sch_generic remove redundant use of &lt;linux/module.h&gt;
  net: inet_timewait_sock doesnt need &lt;linux/module.h&gt;
  ...

Fix up trivial conflicts (other header files, and  removal of the ab3550 mfd driver) in
 - drivers/media/dvb/frontends/dibx000_common.c
 - drivers/media/video/{mt9m111.c,ov6650.c}
 - drivers/mfd/ab3550-core.c
 - include/linux/dmaengine.h
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
  Revert "tracing: Include module.h in define_trace.h"
  irq: don't put module.h into irq.h for tracking irqgen modules.
  bluetooth: macroize two small inlines to avoid module.h
  ip_vs.h: fix implicit use of module_get/module_put from module.h
  nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
  include: replace linux/module.h with "struct module" wherever possible
  include: convert various register fcns to macros to avoid include chaining
  crypto.h: remove unused crypto_tfm_alg_modname() inline
  uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
  pm_runtime.h: explicitly requires notifier.h
  linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
  miscdevice.h: fix up implicit use of lists and types
  stop_machine.h: fix implicit use of smp.h for smp_processor_id
  of: fix implicit use of errno.h in include/linux/of.h
  of_platform.h: delete needless include &lt;linux/module.h&gt;
  acpi: remove module.h include from platform/aclinux.h
  miscdevice.h: delete unnecessary inclusion of module.h
  device_cgroup.h: delete needless include &lt;linux/module.h&gt;
  net: sch_generic remove redundant use of &lt;linux/module.h&gt;
  net: inet_timewait_sock doesnt need &lt;linux/module.h&gt;
  ...

Fix up trivial conflicts (other header files, and  removal of the ab3550 mfd driver) in
 - drivers/media/dvb/frontends/dibx000_common.c
 - drivers/media/video/{mt9m111.c,ov6650.c}
 - drivers/mfd/ab3550-core.c
 - include/linux/dmaengine.h
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branches 'acpi', 'idle', 'mrst-pmu' and 'pm-tools' into next</title>
<updated>2011-11-07T03:14:50+00:00</updated>
<author>
<name>Len Brown</name>
<email>len.brown@intel.com</email>
</author>
<published>2011-11-07T03:14:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=efb90582c575084723cc14302c1300cb26c7e01f'/>
<id>efb90582c575084723cc14302c1300cb26c7e01f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branches 'atomic-io', 'lockdep', 'misc', 'pm-profile' and 'pnp-cleanup' into acpi</title>
<updated>2011-11-07T03:10:14+00:00</updated>
<author>
<name>Len Brown</name>
<email>len.brown@intel.com</email>
</author>
<published>2011-11-07T03:10:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e751b759e82629798c4a5e4a87eb3a30c0510154'/>
<id>e751b759e82629798c4a5e4a87eb3a30c0510154</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>cpuidle: Single/Global registration of idle states</title>
<updated>2011-11-07T02:13:58+00:00</updated>
<author>
<name>Deepthi Dharwar</name>
<email>deepthi@linux.vnet.ibm.com</email>
</author>
<published>2011-10-28T10:50:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=46bcfad7a819bd17ac4e831b04405152d59784ab'/>
<id>46bcfad7a819bd17ac4e831b04405152d59784ab</id>
<content type='text'>
This patch makes the cpuidle_states structure global (single copy)
instead of per-cpu. The statistics needed on per-cpu basis
by the governor are kept per-cpu. This simplifies the cpuidle
subsystem as state registration is done by single cpu only.
Having single copy of cpuidle_states saves memory. Rare case
of asymmetric C-states can be handled within the cpuidle driver
and architectures such as POWER do not have asymmetric C-states.

Having single/global registration of all the idle states,
dynamic C-state transitions on x86 are handled by
the boot cpu. Here, the boot cpu  would disable all the devices,
re-populate the states and later enable all the devices,
irrespective of the cpu that would receive the notification first.

Reference:
https://lkml.org/lkml/2011/4/25/83

Signed-off-by: Deepthi Dharwar &lt;deepthi@linux.vnet.ibm.com&gt;
Signed-off-by: Trinabh Gupta &lt;g.trinabh@gmail.com&gt;
Tested-by: Jean Pihet &lt;j-pihet@ti.com&gt;
Reviewed-by: Kevin Hilman &lt;khilman@ti.com&gt;
Acked-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Acked-by: Kevin Hilman &lt;khilman@ti.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch makes the cpuidle_states structure global (single copy)
instead of per-cpu. The statistics needed on per-cpu basis
by the governor are kept per-cpu. This simplifies the cpuidle
subsystem as state registration is done by single cpu only.
Having single copy of cpuidle_states saves memory. Rare case
of asymmetric C-states can be handled within the cpuidle driver
and architectures such as POWER do not have asymmetric C-states.

Having single/global registration of all the idle states,
dynamic C-state transitions on x86 are handled by
the boot cpu. Here, the boot cpu  would disable all the devices,
re-populate the states and later enable all the devices,
irrespective of the cpu that would receive the notification first.

Reference:
https://lkml.org/lkml/2011/4/25/83

Signed-off-by: Deepthi Dharwar &lt;deepthi@linux.vnet.ibm.com&gt;
Signed-off-by: Trinabh Gupta &lt;g.trinabh@gmail.com&gt;
Tested-by: Jean Pihet &lt;j-pihet@ti.com&gt;
Reviewed-by: Kevin Hilman &lt;khilman@ti.com&gt;
Acked-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Acked-by: Kevin Hilman &lt;khilman@ti.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cpuidle: Split cpuidle_state structure and move per-cpu statistics fields</title>
<updated>2011-11-07T02:13:49+00:00</updated>
<author>
<name>Deepthi Dharwar</name>
<email>deepthi@linux.vnet.ibm.com</email>
</author>
<published>2011-10-28T10:50:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4202735e8ab6ecfb0381631a0d0b58fefe0bd4e2'/>
<id>4202735e8ab6ecfb0381631a0d0b58fefe0bd4e2</id>
<content type='text'>
This is the first step towards global registration of cpuidle
states. The statistics used primarily by the governor are per-cpu
and have to be split from rest of the fields inside cpuidle_state,
which would be made global i.e. single copy. The driver_data field
is also per-cpu and moved.

Signed-off-by: Deepthi Dharwar &lt;deepthi@linux.vnet.ibm.com&gt;
Signed-off-by: Trinabh Gupta &lt;g.trinabh@gmail.com&gt;
Tested-by: Jean Pihet &lt;j-pihet@ti.com&gt;
Reviewed-by: Kevin Hilman &lt;khilman@ti.com&gt;
Acked-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Acked-by: Kevin Hilman &lt;khilman@ti.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the first step towards global registration of cpuidle
states. The statistics used primarily by the governor are per-cpu
and have to be split from rest of the fields inside cpuidle_state,
which would be made global i.e. single copy. The driver_data field
is also per-cpu and moved.

Signed-off-by: Deepthi Dharwar &lt;deepthi@linux.vnet.ibm.com&gt;
Signed-off-by: Trinabh Gupta &lt;g.trinabh@gmail.com&gt;
Tested-by: Jean Pihet &lt;j-pihet@ti.com&gt;
Reviewed-by: Kevin Hilman &lt;khilman@ti.com&gt;
Acked-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Acked-by: Kevin Hilman &lt;khilman@ti.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cpuidle: Move dev-&gt;last_residency update to driver enter routine; remove dev-&gt;last_state</title>
<updated>2011-11-07T02:13:30+00:00</updated>
<author>
<name>Deepthi Dharwar</name>
<email>deepthi@linux.vnet.ibm.com</email>
</author>
<published>2011-10-28T10:50:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e978aa7d7d57d04eb5f88a7507c4fb98577def77'/>
<id>e978aa7d7d57d04eb5f88a7507c4fb98577def77</id>
<content type='text'>
Cpuidle governor only suggests the state to enter using the
governor-&gt;select() interface, but allows the low level driver to
override the recommended state. The actual entered state
may be different because of software or hardware demotion. Software
demotion is done by the back-end cpuidle driver and can be accounted
correctly. Current cpuidle code uses last_state field to capture the
actual state entered and based on that updates the statistics for the
state entered.

Ideally the driver enter routine should update the counters,
and it should return the state actually entered rather than the time
spent there. The generic cpuidle code should simply handle where
the counters live in the sysfs namespace, not updating the counters.

Reference:
https://lkml.org/lkml/2011/3/25/52

Signed-off-by: Deepthi Dharwar &lt;deepthi@linux.vnet.ibm.com&gt;
Signed-off-by: Trinabh Gupta &lt;g.trinabh@gmail.com&gt;
Tested-by: Jean Pihet &lt;j-pihet@ti.com&gt;
Reviewed-by: Kevin Hilman &lt;khilman@ti.com&gt;
Acked-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Acked-by: Kevin Hilman &lt;khilman@ti.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cpuidle governor only suggests the state to enter using the
governor-&gt;select() interface, but allows the low level driver to
override the recommended state. The actual entered state
may be different because of software or hardware demotion. Software
demotion is done by the back-end cpuidle driver and can be accounted
correctly. Current cpuidle code uses last_state field to capture the
actual state entered and based on that updates the statistics for the
state entered.

Ideally the driver enter routine should update the counters,
and it should return the state actually entered rather than the time
spent there. The generic cpuidle code should simply handle where
the counters live in the sysfs namespace, not updating the counters.

Reference:
https://lkml.org/lkml/2011/3/25/52

Signed-off-by: Deepthi Dharwar &lt;deepthi@linux.vnet.ibm.com&gt;
Signed-off-by: Trinabh Gupta &lt;g.trinabh@gmail.com&gt;
Tested-by: Jean Pihet &lt;j-pihet@ti.com&gt;
Reviewed-by: Kevin Hilman &lt;khilman@ti.com&gt;
Acked-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Acked-by: Kevin Hilman &lt;khilman@ti.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI: Export FADT pm_profile integer value to userspace</title>
<updated>2011-11-07T01:48:42+00:00</updated>
<author>
<name>Thomas Renninger</name>
<email>trenn@suse.de</email>
</author>
<published>2011-11-04T02:33:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=362b646062b2073bd5c38efb42171d86e4f717e6'/>
<id>362b646062b2073bd5c38efb42171d86e4f717e6</id>
<content type='text'>
There are a lot userspace approaches to detect the usage of the
platform (laptop, workstation, server, ...) and adjust kernel tunables
accordingly (io/process scheduler, power management, ...).

These approaches need constant maintaining and are ugly to implement
(detect PCMCIA controller -&gt; laptop,
does not work on recent systems anymore, ...)
On ACPI systems there is an easy and reliable way (if implemented
in BIOS and most recent platforms have this value set).
-&gt; export it to userspace.

Signed-off-by: Thomas Renninger &lt;trenn@suse.de&gt;
Acked-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are a lot userspace approaches to detect the usage of the
platform (laptop, workstation, server, ...) and adjust kernel tunables
accordingly (io/process scheduler, power management, ...).

These approaches need constant maintaining and are ugly to implement
(detect PCMCIA controller -&gt; laptop,
does not work on recent systems anymore, ...)
On ACPI systems there is an easy and reliable way (if implemented
in BIOS and most recent platforms have this value set).
-&gt; export it to userspace.

Signed-off-by: Thomas Renninger &lt;trenn@suse.de&gt;
Acked-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
