android_kernel_samsung_msm8976/include
Lina Iyer 1d5b600b50 irq: Allow multiple clients to register for irq affinity notification
PM QoS and other idle frameworks can do a better job of addressing power
and performance requirements for a cpu, knowing the IRQs that are
affine to that cpu. If a performance request is placed against serving
the IRQ faster and if the IRQ is affine to a set of cpus, then setting
the performance requirements only on those cpus help save power on the
rest of the cpus. PM QoS framework is one such framework interested in
knowing the smp_affinity of an IRQ and the change notificiation in this
regard. QoS requests for the CPU_DMA_LATENCY constraint currently apply
to all cpus, but when attached to an IRQ, can be applied only to the set
of cpus that IRQ's smp_affinity is set to. This allows other cpus to
enter deeper sleep states to save power. More than one framework/driver
can be interested in such information.

The current implementation allows only a single notification callback
whenever the IRQ's SMP affinity is changed. Adding a second notification
punts the existing notifier function out of registration.  Add a list of
notifiers, allowing multiple clients to register for irq affinity
notifications.

The kref object associated with the struct irq_affinity_notify was used
to prevent the notifier object from being released if there is a pending
notification. It was incremented before the work item was scheduled and
was decremented when the notification was completed. If the kref count
was zero at the end of it, the release function gets a callback allowing
the module to release the irq_affinity_notify memory. This works well
for a single notification. When multiple clients are registered, no
single kref object can be used. Hence, the work function when scheduled,
will increase the kref count using the kref_get_unless_zero(), so if the
module had already unregistered the irq_affinity_notify object while the
work function was scheduled, it will not be notified.

Change-Id: If2e38ce8d7c43459ba1604d5b4798d1bad966997
Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
Patch-mainline: linux-pm @ Wed, 27 Aug 2014 13:18:28
https://lkml.org/lkml/2014/8/27/609
[mnalajal@codeaurora.org: resolve NON SMP target compilation issues]
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
2014-11-09 15:17:27 -08:00
..
acpi
asm-generic
clocksource
crypto
drm
dt-bindings Merge "msm: clocks: Add new clocks header file for msmtellurium" 2014-11-03 02:34:49 -08:00
keys
kvm
linux irq: Allow multiple clients to register for irq affinity notification 2014-11-09 15:17:27 -08:00
math-emu
media Merge "msm: camera: sensor: compat support for i2c seq array" 2014-11-03 02:34:45 -08:00
memory
misc
net Merge "cnss: Dynamically allocate ramdump memory" 2014-10-26 08:13:39 -07:00
pcmcia
ras
rdma
rxrpc
scsi UAPI: scsi: move ioctl related information 2014-10-14 19:05:39 -07:00
soc/qcom soc: cpu_pwr_ctl: Add support to configure cpu retention ldo 2014-11-03 14:07:19 -08:00
sound ASoC: msm: qdsp6v2: Add support for mute/latency on passthrough stream 2014-10-23 16:35:09 -07:00
target
trace soc: qcom: Add a msm_performance module 2014-10-30 17:19:06 -07:00
uapi Merge "msm: mdss: hdmi: fix supported parameter in resolution details" 2014-10-29 13:08:41 -07:00
video
xen
Kbuild