Commit Graph
89 Commits
Author SHA1 Message Date
Steve Muckle 39414b4b9a sched: fix race between try_to_wake_up() and move_task()
Until a task's state has been seen as interruptible/uninterruptible
and it is no longer on_cpu, it is possible that the task may move
to another CPU (load balancing may cause this). Here is an example
where the race condition results in incorrect operation:

- cpu 0 calls put_prev_task on task A, task A's state is TASK_RUNNING
- cpu 0 runs task B, which attempts to wake up A
- cpu 0 begins try_to_wake_up(), recording src_cpu for task A as cpu 0
- cpu 1 then pulls task A (perhaps due to idle balance)
- cpu 1 runs task A, which then sleeps, becoming INTERRUPTIBLE
- cpu 0 continues in try_to_wake_up(), thinking task A's previous
  cpu is 0, where it is actually 1
- if select_task_rq returns cpu 0, task A will be woken up on cpu 0
  without properly updating its cpu to 0 in set_task_cpu()

CRs-Fixed: 665958
Change-Id: Icee004cb320bd8edfc772d9f74e670a9d4978a99
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2014-07-30 14:10:13 -07:00
Steve Muckle 8264ed2d87 tracing/sched: add load balancer tracepoint
When doing performance analysis it can be useful to see exactly
what is going on with the load balancer - when it runs and why
exactly it may not be redistributing load.

This additional tracepoint will show the idle context of the
load balance operation (idle, not idle, newly idle), various
values from the load balancing operation, the final result,
and the new balance interval.

Change-Id: I9e5c97ae3878bea44e60d189ff3cec2275f2c75e
CRs-Fixed: 583754
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-12-02 13:03:24 -08:00
Steve Muckle 04ca28640c tracing/sched: add load balancer tracepoint
When doing performance analysis it can be useful to see exactly
what is going on with the load balancer - when it runs and why
exactly it may not be redistributing load.

This additional tracepoint will show the idle context of the
load balance operation (idle, not idle, newly idle), various
values from the load balancing operation, the final result,
and the new balance interval.

Change-Id: I9e5c97ae3878bea44e60d189ff3cec2275f2c75e
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-11-21 12:42:25 -08:00
Steve Muckle 4c7b6d4477 sched: change WARN_ON_ONCE to WARN_ON in try_to_wake_up_local()
The WARN_ON_ONCE() calls at the beginning of try_to_wake_up_local()
were recently converted from BUG_ON() calls. If these hit it indicates
something is wrong and that may contribute to other system instability.
To eliminate the risk of an instance of one of these errors going
un-noticed because there was an earlier instance that occured long ago,
change to WARN_ON(). If there ever is a flood of these there are bigger
problems.

Change-Id: I392832e2b6ec24b3569b001b1af9ecd4ed6828e7
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-09-06 09:58:02 -07:00
Steve Muckle 538cfc1e02 cpufreq: ondemand: change freq sync code to use per-CPU kthreads
The migration notifier may run in a context where it is not safe to
enqueue a work item. For example:

(__queue_work+0x1f4/0x40c)
(queue_work_on+0x34/0x44)
(dbs_migration_notify+0x2c/0x40)
(notifier_call_chain+0x38/0x68)
(__atomic_notifier_call_chain+0x34/0x44)
(atomic_notifier_call_chain+0x14/0x18)
(try_to_wake_up+0x350/0x36c)
(autoremove_wake_function+0xc/0x34)
(__wake_up_common+0x48/0x7c)
(__wake_up+0x3c/0x50)
(trustee_thread+0x1d0/0x528)
(kthread+0x80/0x8c)

The trustee code already takes a lock internal to the workqueue
implementation and is not expecting a wake up to come around and
enter the workqueue code again, where the same lock will be needed.

Instead of relying on a workqueue, use a per-CPU kthread to do
the frequency syncing.

Change-Id: I7555ee40867792fa8ec4ea8f9a6309323775e797
CRs-Fixed: 501099
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-06-19 16:50:00 -07:00
Steve Muckle 6f2e5b8e2b defconfig: automatic update
This change updates the defconfigs to match recent changes in the
Kconfig files. Committing these changes now prevents them from
showing up in future defconfig commits as unrelated diffs.

Change-Id: I666db03aec513aa21c651b068b797c705f8c2c43
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-06-11 10:53:19 -07:00
Steve Muckle 00292ad78e sched: remove migration notification from RT class
Commit 88a7e37d26 (sched: provide per cpu-cgroup option to
notify on migrations) added a notifier call when a task is moved
to a different CPU. Unfortunately the two call sites in the RT
sched class where this occurs happens with a runqueue lock held.
This can result in a deadlock if the notifier call attempts to do
something like wake up a task.

Fortunately the benefit of 88a7e37d26 comes mainly from notifying
on migration of non-RT tasks, so we can simply ignore the movements
of RT tasks.

CRs-Fixed: 491370
Change-Id: I8849d826bf1eeaf85a6f6ad872acb475247c5926
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-05-24 09:23:45 -07:00
Steve Muckle 378b6f1ad8 msm: dcvs: fail gracefully if TZ does not support dcvs
If dcvs attempts to initialize on a system where TZ does not support
dcvs, it will eventually cause a crash. Prevent this by disabling
dcvs if TZ does not successfully initialize its part of dcvs.

Change-Id: Ic9cd361243c03c3832133614c4847a2815b0bbb4
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-05-09 12:57:00 -07:00
Steve Muckle 88a7e37d26 sched: provide per cpu-cgroup option to notify on migrations
On systems where CPUs may run asynchronously, task migrations
between CPUs running at grossly different speeds can cause
problems.

This change provides a mechanism to notify a subsystem
in the kernel if a task in a particular cgroup migrates to a
different CPU. Other subsystems (such as cpufreq) may then
register for this notifier to take appropriate action when
such a task is migrated.

The cgroup attribute to set for this behavior is
"notify_on_migrate" .

Change-Id: Ie1868249e53ef901b89c837fdc33b0ad0c0a4590
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-04-25 09:10:32 -07:00
Steve Muckle 90c3e0581e defconfig: remove msm7630 defconfigs
The msm7630 target is no longer supported.

Change-Id: Idd1c1e9e6483105f8c816306d435e2acd0c64dff
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-03-27 09:47:42 -07:00
Steve Muckle a01d391b33 defconfig: automatic update
This change updates the defconfigs to match recent changes in the
Kconfig files. Committing these changes now prevents them from
showing up in future defconfig commits as unrelated diffs.

Change-Id: I101f144d2ff3620e7dd5480ac54c9eec0e588b91
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-03-25 13:22:06 -07:00
Steve Muckle e153354f9c Revert "input: atmel_mxt_ts: Allow bootloader address to be set"
This reverts commit 71b8f029e7,
which causes touchscreen to not function on 8974 mtp devices.
2013-02-14 10:51:39 -08:00
Steve Muckle 0ab6ad1a0a defconfig: msm8974: automatic update
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-02-14 10:49:48 -08:00
Steve Muckle 812540a9ba camera: fix up include paths for msm camera_v1
When the msm camera_v1 driver was relocated recently, the
include paths in Makefiles were not updated, resulting in it
no longer compiling.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-02-14 10:49:40 -08:00
Steve Muckle 1c51a83280 defconfig: msm8974: automatic defconfig update
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-02-14 10:49:38 -08:00
Steve Muckle 3938532a47 dvb: move msm dvb driver to drivers/media/platform/msm
In newer versions of the Linux kernel a new location has been
created for platform-specific media drivers. To prepare for this
change, move the msm dvb driver to a location compatible with
the future directory structure.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-02-14 10:49:38 -08:00
Steve Muckle e1f4871082 vcap: move msm vcap driver to drivers/media/platform/msm
In newer versions of the Linux kernel the drivers/media/video directory
has been removed. To prepare for this change, move the msm vcap
driver to a location compatible with the future directory structure.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-02-14 10:49:37 -08:00
Steve Muckle 6974847059 defconfig: msm8974: automatic update
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-02-14 10:49:37 -08:00
Steve Muckle fb1e1850d2 wfd: move msm wfd driver to drivers/media/platform/msm
In newer versions of the Linux kernel the drivers/media/video directory
has been removed. To prepare for this change, move the msm wfd
driver to a location compatible with the future directory structure.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-02-14 10:49:37 -08:00
Steve Muckle 63e11404f8 vidc: move msm_vidc driver to drivers/media/platform/msm
In newer versions of the Linux kernel the drivers/media/video directory
has been removed. To prepare for this change, move the msm vidc
driver to a location compatible with the future directory structure.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-02-14 10:49:36 -08:00
Steve Muckle d217ef38f9 defconfig: msm8974: automatic update
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-02-14 10:49:36 -08:00
Steve Muckle 0efcbc94c0 camera: move msm camera drivers to drivers/media/platform
In newer versions of the Linux kernel the drivers/media/video directory
has been removed. To prepare for this change, move the msm camera
drivers to a location compatible with the future directory structure.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-02-14 10:49:36 -08:00
Steve Muckle 2ba60def7e defconfig: msm8974: re-enable NETFILTER_XT_MATCH_QTAGUID
This option was recently disabled due to it crashing the 3.7
kernel. The xt_qtaguid module has been fixed to work with 3.7,
so the option can be re-enabled.

Change-Id: Ib9f50c041ad006bb4481364648e8e00789c18768
CRs-Fixed: 446007
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-02-14 10:49:23 -08:00
Steve Muckle 16e940bc5e netfilter: xt_qtaguid: do not look at TCP_TIME_WAIT socket
It is possible that skb->sk may be a TCP_TIME_WAIT socket,
in which case many of the fields will not be valid. Thanks
to Eric Dumazet <edumazet@google.com> for pointing out this
issue and the fix.

http://article.gmane.org/gmane.linux.ports.arm.msm/3400

Change-Id: I1fa955df16f8919ec243d55e6131efb335a7871c
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-02-14 10:49:23 -08:00
Steve Muckle 4d805d48ad arm: fix up update_vsyscall for 3.7
The prototype of update_vsyscall has changed for 3.7.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Change-Id: I2ea2a5dd6197537de6d56325ec5343d8a54d4366
2013-02-14 10:48:50 -08:00
Steve Muckle fbfe6af52c defconfig: msm8974: disable NETFILTER_XT_MATCH_QTAGUID
The xt_qtaguid module does not yet work properly with kernel 3.7
and will crash the kernel.

Change-Id: I36e4c8ee9f17ad8b3b5a91b2e4763ac4ec4121f7
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-02-14 10:48:28 -08:00
Steve Muckle 728f14d686 netfilter: fix ipv6_find_hdr usage
The semantics of the offset parameter of ipv6_find_hdr
changed recently and it is now an in/out. It is therefore
incorrect to pass it in uninitialized.

Change-Id: I47c1dbd856d89b0369fe4a5a8dab15e776da78d8
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-02-14 10:48:25 -08:00
Steve Muckle 7207f0feee Update copyright to The Linux Foundation
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-02-14 10:48:21 -08:00
Steve Muckle 8ef871ee75 defconfig: enable CONFIG_DEBUG_PREEMPT for msm8910, msm8974
CONFIG_DEBUG_PREEMPT will assist in uncovering unsafe uses
of smp_processor_id and preemption count underflows.

Change-Id: I705145196b16ea3f14ea75bcbef691643675c2cc
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-12-19 16:07:47 -08:00
Steve Muckle 86c9b54bec defconfig: enable RCU_FAST_NO_HZ for SMP msm targets
RCU_FAST_NO_HZ has been shown to improve power consumption
thanks to CPUs entering nohz idle mode more quickly.

The 7627a and 8660 configurations are omitted until they
can be properly tested with RCU_FAST_NO_HZ.

Change-Id: I4d578ba0496fa46917aa2544fe5314a6d29826fc
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-12-17 11:33:29 -08:00
Steve Muckle 32fc3c919d defconfig: automatic update
Update msm defconfigs to match Kconfig files so future defconfig
modifications do not have unrelated changes in them.

Change-Id: If77f1f7d240899a6756e9debf52301422c38e3b7
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-12-14 14:30:06 -08:00
Steve Muckle 7419749fb6 msm: dcvs: enable/disable power collapse on CPU 0 only
Idle power collapse is not currently used on secondary cores
with DCVS, so it should not be manipulated after boot by DCVS.

Change-Id: I570bd4810d0d8e1673c52538fb81324bdc82ec8a
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-12-11 11:27:18 -08:00
Steve Muckle 1b82c72e23 msm: dcvs: check power collapse state after updating params
The dcvs params are updated when the number of online cores change.
When this happens, the low power modes of each CPU need to be
enabled or disabled depending on how fast they are running and what
the new power collapse frequency thresholds are.

Change-Id: I2341682918822549059e4a8ba6a6d35323f227d2
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-12-11 11:27:18 -08:00
Steve Muckle e8c6d61525 msm: dcvs: add ss_no_corr_below_freq parameter
The busy/idle behavior of different cores can be correlated by
DCVS when determining what frequency to run cores at. However,
this is not desirable below a certain frequency. Add a parameter
to establish what this frequency is. The parameter is configurable
in userspace via sysfs.

The ss_iobusy_conv parameter is currently unused, so it is
being replaced with ss_no_corr_below_freq.

Change-Id: Icd9540d9b2a4881c7a24d33e120b3bc817f7f12f
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-12-11 11:26:52 -08:00
Steve Muckle f5d5d54a8c msm: mpdecision: make runqueue divisor configurable via sysfs
The runqueue divisor controls how sensitive mpdecision is to
changes in runqueue depth - if the runqueue divisor is increased,
updates to TZ are made less frequently. It is desirable to be able
to easily change this parameter from userspace.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Change-Id: Ia573748dadd7f5eb9cc2686c99fef40b8acbdae2
2012-12-10 13:44:46 -08:00
Steve Muckle ea58445eba msm: mpdecision: update dcvs algo params at initialization
By skipping the update of dcvs algo params when mpdecision first
starts, there's a small window where dcvs may run with the incorrect
parameters, depending on how many CPUs are online.

Change-Id: I44094a9abb5e801b0869fb8b796a62eb4d0c49be
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-12-04 14:05:09 -08:00
Steve Muckle 94102b6535 defconfig: turn on SCHED_MC for some MSM targets
Currently CPUs that have entered nohz idle mode are not being woken
up to perform load balancing. Turning on SCHED_MC will fix that, and
will also cause CPUs to show up at the correct level of scheduling
domain (MC).

SCHED_MC would normally also cause SD_SHARE_PACKAGE_RESOURCES to be
turned on at the MC level as well, causing a task to be migrated to
an idle CPU when the task is woken up. Previous modifications to
SD_SHARE_PACKAGE_RESOURCES however have restricted its effect
to tasks that have the PF_WAKE_ON_IDLE flag set.

Certain target configurations (msm7627a*, msm8660*) are being left
out until they are verified with SCHED_MC.

Change-Id: I55652d8485d553c290c4423959dcce5f04576a86
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-12-03 14:16:36 -08:00
Steve Muckle 81599d50a0 msm: dcvs: set gpu actual freq when setting gpu floor
If actual_freq of gpu is not updated when a gpu floor
is set, TZ is unaware of the gpu frequency change and
computations are based on an incorrect value. By setting
actual_freq, TZ is notified of the new gpu frequency at
the next idle exit.

Change-Id: Ifc69996ef309ed4f8a5d46a2048757e57dd1a8ec
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-11-28 18:05:43 -08:00
Steve Muckle 8104d6dde8 msm: dcvs: add sysfs parameter for active and leakage offsets
The active and leakage energy offsets for each frequency are
best left configurable from userspace to make tuning easier.

Change-Id: I435a30d46cc02861dd7e8371b21d0433c0aa6a28
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-11-28 18:05:37 -08:00
Steve Muckle c48381e233 msm: dcvs: set algo params according to number of online CPUs
It is desirable for performance reasons to be able to run dcvs
with different algorithm parameters depending on the number of
CPUs that are online. The algorithm parameters are already replicated
per-CPU, but all CPUs operate in DCVS with the same parameters at
any given time.

These per-CPU parameters now correspond to the total number of CPUs
online. For example, if 2 CPUs are online, the algorithm parameters
for CPU2 are used.

Change-Id: If308a2fa949ac669823e759e0fd8e2cdbf6e4c03
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-11-22 08:32:20 -08:00
Steve Muckle 749f301c94 msm: dcvs: set gpu frequency floor when multiple CPUs online
Performance is enhanced if the GPU frequency is floored at its
maximum nominal frequency when multiple CPUs are online.

Change-Id: Ib6bfd5007d660064844876b06f552f4d8c84865c
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-11-21 14:33:48 -08:00
Steve Muckle 77c66a3c6c msm: dcvs: do not run gpu set_floor_frequency callbacks after stop_sink
Once a gpu calls stop_sink and is no longer participating in dcvs, we
should not call set_floor_frequency callbacks for that gpu.

Change-Id: I3cde82dc9975bcb37f065ea7ab8eb88a8f7fc933
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-11-19 16:38:55 -08:00
Steve Muckle 016af00bf6 msm: dcvs: drop pending frequency update on stop sink
If there is a pending frequency update when a core stops
acting as a dcvs sink, it should just be dropped, rather
than trying to honor that last frequency request.

Change-Id: Iac30cc7e06a8a70eecc4da712fdf160b788a7c2c
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-11-19 15:46:39 -08:00
Steve Muckle 4eb5d7cf22 msm: dcvs: start and stop temp updates with core sink
Temperature updates should not be sent continuously just
because a core has registered with dcvs. Instead, start
and stop the updates when the core starts and stops as a
dcvs frequency sink.

Change-Id: If7721f523eb44026c421dd7ec4fa3975bc65cd09
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-11-14 14:36:07 -08:00
Steve Muckle 9c0aa035f7 msm: mpdecision: wait at least 100ms between cpu hotremoves
To avoid spending a lot of time at once in the cpu hotremove
path, do not perform multiple hotremoves back to back.

Change-Id: I78a643f73718e4e08786193c71bbe2237aa790d2
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-11-14 14:33:50 -08:00
Steve Muckle 682c7a01c1 msm: dcvs: gpu minimum frequency levels
System performance is enhanced if the gpu frequency is given a
minimum corresponding to various frequency levels of CPU 0.

Change-Id: Iba168d708524fc8ef164428bb5f4e0631a499342
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-11-14 14:33:50 -08:00
Steve Muckle f9a8749b17 msm: dcvs: create cpu freq table dynamically
CPU frequencies can differ between different revisions, so create
the table of cpu frequencies dynamically based on data from
acpuclock rather than using a fixed table.

Some of the data in the table comes from sync points that will be
implemented between CPU and GPU frequencies. The sync points are
defined here, but the sync implementation itself will come in a
subsequent commit.

Change-Id: I24cf17b199df1e5d064c1894b269e49118b39ac7
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-11-14 14:33:49 -08:00
Steve Muckle 9d5b38dc00 sched: add sysctl for controlling task migrations on wake
The PF_WAKE_UP_IDLE per-task flag made it impossible to enable
the old behavior of SD_SHARE_PKG_RESOURCES, where every task
migrates to an idle CPU on wakeup.

The sched_wake_to_idle sysctl value, when made nonzero, will cause
all tasks to migrate to an idle CPU if one is available when the
task is woken up. This is regardless of how PF_WAKE_UP_IDLE is
configured for tasks in the system. Similar to PF_WAKE_UP_IDLE,
the SD_SHARE_PKG_RESOURCES scheduler domain flag must be enabled
for the sysctl value to have an effect.

Change-Id: I23bed846d26502c7aed600bfcf1c13053a7e5f61
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-11-09 14:47:28 -08:00
Steve Muckle 8862f41f1c msm: dcvs: run dcvs, mpdecision threads at default priority
It is not necessary to run these threads at a realtime
priority level.

Change-Id: I8c6492f22e803811db5757c51beeeb81f93f32b6
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-11-09 11:39:27 -08:00
Steve Muckle 2f6db34b32 msm: dcvs: add frequency transient control to sysfs
It is useful to be able to toggle at runtime whether
particular DCVS points are used as transient levels. This
adds a sysfs node per core which when read returns a list
of the currently enabled DCVS transient levels. Writing
the frequency of a DCVS transient level toggles whether it
is enabled or not.

Change-Id: I69ebb6974e97efa832798047259b9acdfd08aa7c
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-10-18 13:50:39 -07:00
Steve Muckle c430681cc2 msm: mpdecision: do not print warning on hotplug times
Hotplug times are tracked elsewhere, and excessive logging
(especially in SCHED_FIFO context) can cause problems for
system responsiveness.

Change-Id: I82ba0cdff71e04af8c7ab4ef2a1cfe9306075ee3
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-10-09 14:46:56 -07:00
Steve Muckle b162e2b79d msm: dcvs: allow re-registration of cores
If a core has already been registered with dcvs, just
return the previous dcvs core id if it is registered
again.

Change-Id: Ida34a2145c21b17f39499eb81dfd4ccd17f6e56d
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-10-09 13:55:50 -07:00
Steve Muckle dc6384ce8b topology: enable SD_SHARE_PKG_RESOURCES at CPU level
Enabling this feature will allow the use of
PF_WAKE_ON_IDLE, a per task flag that causes that task,
or tasks woken by that task, to wake on an idle CPU if
there is one available. Note that due to the PF_WAKE_ON_IDLE
feature this will not cause a change in behavior for tasks
that do not have the PF_WAKE_ON_IDLE flag set.

Change-Id: I9c222802f7e0e7e181ddd80b7a30297b94f6eaed
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-09-12 15:33:09 -07:00
Steve Muckle 500988016c sched: add PF_WAKE_UP_IDLE
Certain workloads may benefit from the SD_SHARE_PKG_RESOURCES behavior
of waking their tasks up on idle CPUs. The feature has too much of a
negative impact on other workloads however to apply globally. The
PF_WAKE_UP_IDLE flag tells the scheduler to wake up tasks that have this
flag set, or tasks woken by tasks with this flag set, on an idle CPU
if one is available.

Change-Id: I20b28faf35029f9395e9d9f5ddd57ce2de795039
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-09-10 14:10:53 -07:00
Steve Muckle ecfe4c0ee6 defconfig: automatic update
Updating the defconfig files to match the Kconfigs is necessary
to prevent unrelated changes showing up in future defconfig
patches.

Change-Id: I75faf31f3160e5ae2a40df02b2c00c43f99ebff6
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-07-25 13:17:39 -07:00
Steve Muckle 537e445794 radio-tavarua: compilation fix for gcc 4.6
The use of gcc 4.6 triggers a compilation warning regarding
possible uninitialized use of a variable.

Change-Id: I498ca7af5af88d91696c8d322ddc81795f961f31
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-06-25 17:38:29 -07:00
Steve Muckle 6dff95711c msm: compilation fixes for gcc 4.6
These changes are required to compile successfully with
gcc version 4.6.

Change-Id: I79ec71e62748069da754e918f8497d28c1ff33ae
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-06-25 17:37:50 -07:00
Steve Muckle 40f0c3c7c5 checkpatch: add new message type string
Many messsages are missing the new message type parameter, which
causes warning messages and a lack of the line number from the
offending line in the patch.

Change-Id: I69f2283c3dc27edd66fd2676c8be45664699dba6
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-06-13 15:47:32 -07:00
Steve Muckle b1b2ea1ff1 defconfig: automatic update
Bringing the defconfigs up to date with the Kconfig files prevents
defunct options from appearing to be on or from unrelated changes
showing up in future defconfig patches.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Change-Id: Icd42aa5a6cb2754e9ddcf6114dfd626d4a8580c8
2012-06-13 09:40:47 -07:00
Steve Muckle 75c34ca1b4 Merge remote branch 'origin/msm-3.0' into msm-3.4
* origin/msm-3.0: (87 commits)
  Revert "msm: kgsl: Add VBIF error detection"
  tspp: 8960: adding TSPP driver for 8960
  board-8960: Merge secure and non secure firmware heaps.
  msm: msm_dsps: Move to the new clk_prepare/unprepare API.
  diag: Protect SMD channel from getting NULL value
  camera: Mercury hardware JPEG decoder driver support.
  msm: 8064-regulator: Remove 5V FRC gpio external regulator
  diag: Respond to Get Subsystem Mask request
  Revert "msm_fb: display: Attach and detach MDP IOMMU on suspend/resume"
  Revert "msm_fb: display: Add MDP IOMMU detach support for DTV"
  msm: rpm-8930: Fix incorrect RPM enumeration and DMM
  msm: board-8930: Configure GPU turbo clock to 400MHz
  usb: mdm_bridge: Fix bug in handling error condition
  msm: vidc: Invalidate the cache before processing metadata.
  video: msm: wfd: Add turbo mode support
  tty: n_smux: Add Dedicated Power Control Queue
  defconfig: msm-copper: Enable SPI ethernet support
  msm: acpuclock-8960: Add PVS support on 8064
  ASoC: mdm9615: Set correct GPIOs for AUX PCM
  msm: 9615: Add auxpcm support over secondary audio interface
  ...

Conflicts:
	arch/arm/configs/msm-copper_defconfig
	drivers/char/diag/diagchar_core.c
	drivers/char/diag/diagfwd_hsic.h
	drivers/media/video/msm/msm_camera.c
	drivers/media/video/msm/msm_mctl.c
	drivers/mfd/Kconfig
	drivers/mfd/Makefile
	drivers/mfd/wcd9xxx-slimslave.c
	drivers/spmi/spmi.c
	drivers/tty/n_smux.c
	drivers/usb/otg/msm_otg.c
	sound/soc/msm/msm-pcm-routing.h

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Change-Id: I49d4ceff17714a7ba51243de63f27b7e78647bda
2012-06-12 14:28:21 -07:00
Steve Muckle f066380a08 Merge commit 'AU_LINUX_ANDROID_ICS.04.00.04.00.130' into msm-3.4
* commit 'AU_LINUX_ANDROID_ICS.04.00.04.00.130': (39 commits)
  msm: vidc: Add support for DIVX 4/5/6
  msm_fb: display: Set the minimal sleep time for DSI PHY Initialisation
  board: 8930: add debounce interval for gpio-keys
  regulator: Extend of_get_regulator_init_data to support non-DT consumers
  regulator: pm8xxx-regulator: Add slew_rate platform data parameter
  crypto: Fix initialization of array variable.
  arm: free all .init memory when CONFIG_STRICT_MEMORY_RWX is set
  msm: clock-copper: Remove block reset ability from most clocks
  msm: clock-local2: Fix local_vote_clk_reset to use right to_*_clk macro
  EHCI: HSIC: Add support for suspend, resume and URB logging
  arm/dt: msm-pm8941: Change boost regulator register address to 0xA000
  msm: camera: Move server code into seperate file.
  msm: camera: Close camera gracefully in case of userspace crash
  media: dvb: mpq: Support getting decoder's buffer status
  Bluetooth: Wait for wcnss to be ready after SSR
  msm: msm_sdcc: Add device tree support for SDCC controllers
  msm: display: Change DSI escape clock to byte clock
  msm: clock-8960: Change source of DSI escape clock to byte clock
  ASOC: msm: Enable mpq8064 machine driver.
  EHCI: HSIC: Set the interrupt threshold control value to 8ms
  ...

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-06-07 11:14:52 -07:00
Steve Muckle e847911515 compress: change header include path
Compatibility with userspace compilation is improved if
compress_params.h is included from the same directory,
rather than relying on search paths.

Change-Id: I0368ccc0b7d0b7727c62ed9aa389c7600cdad9ef
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-06-06 19:01:37 -07:00
Steve Muckle d599fdaaae msm: timer: do not always clear msm_active_clock
If a timer is being shutdown and it is not the active
clock, the msm_active_clock for that CPU should not be
cleared.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-06-06 19:01:37 -07:00
Steve Muckle 8299cd2af5 wakelock: remove idle wakelock type
Idle wakelocks are no longer supported. Instead, targets should
use pm_qos, which is the proper framework for establishing a
latency requirement.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-06-06 19:01:30 -07:00
Steve Muckle dc0eed4422 freezer: comment out might_sleep()
Currently on ARM signal handling here must happen with
interrupts disabled so this might_sleep will cause a
continuous stream of warnings. It is a known issue
upstream.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-06-06 18:52:39 -07:00
Steve Muckle 0de33d06dd mmc: core: merge resolution
Miscellaneous merge resolutions in mmc.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-06-06 18:50:59 -07:00
Steve Muckle f132c6cf77 Merge commit 'AU_LINUX_ANDROID_ICS.04.00.04.00.126' into msm-3.4
AU_LINUX_ANDROID_ICS.04.00.04.00.126 from msm-3.0.
First parent is from google/android-3.4.

* commit 'AU_LINUX_ANDROID_ICS.04.00.04.00.126': (8712 commits)
  PRNG: Device tree entry for qrng device.
  vidc:1080p: Set video core timeout value for Thumbnail mode
  msm: sps: improve the debugging support in SPS driver
  board-8064 msm: Overlap secure and non secure video firmware heaps.
  msm: clock: Add handoff ops for 7x30 and copper XO clocks
  msm_fb: display: Wait for external vsync before DTV IOMMU unmap
  msm: Fix ciruclar dependency in debug UART settings
  msm: gdsc: Add GDSC regulator driver for msm-copper
  defconfig: Enable Mobicore Driver.
  mobicore: Add mobicore driver.
  mobicore: rename variable to lower case.
  mobicore: rename folder.
  mobicore: add makefiles
  mobicore: initial import of kernel driver
  ASoC: msm: Add SLIMBUS_2_RX CPU DAI
  board-8064-gpio: Update FUNC for EPM SPI CS
  msm_fb: display: Remove chicken bit config during video playback
  mmc: msm_sdcc: enable the sanitize capability
  msm-fb: display: lm2 writeback support on mpq platfroms
  msm_fb: display: Disable LVDS phy & pll during panel off
  ...

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-06-06 18:45:28 -07:00
Steve Muckle 405abc9006 defconfig: automatic update
Update the defconfigs so that they match current Kconfig rules.

Change-Id: Ifebeecea1959d91c3ea71947a64f96da804dd734
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-04-09 15:05:12 -07:00
Steve Muckle 730ad7abaa msm: pm: clean msm_pm_pc_pgd in the cache after writing
Since a CPU will read the msm_pm_pc_pgd value as it comes
up from power collapse when caches are disabled, it needs
to be guaranteed that the value has been written to memory
before any CPU power collapses.

Change-Id: I7f6358a001255f9bac99a6378532c96fd460f82b
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-04-08 14:52:49 +05:30
Steve Muckle c25a936123 msm: pm: clean boot vector in outer cache after writing
The boot vector will need to be cleaned in the outer cache
after being written to ensure that it can be read by a CPU
which is waking up from power collapse. Calling
v7_flush_dcache_all is not sufficient on targets which
have an outer cache.

There is currently no requirement for the boot vector write to
happen in an assembly environment, and moving it to C makes
cleaning the outer cache easier.

Change-Id: I64c2577c9159adf25b26995a7e3ac0285d01d0d6
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-04-08 14:51:28 +05:30
Steve Muckle fcece057c3 msm: pm: save registers to noncached area before pc
The power collapse path is simplified if a noncached area is
used for the purpose of saving register state prior to power
collapsing. This is especially beneficial in the case of targets
with an outer cache, where the process of cleaning the register
state would require complex operations.

Change-Id: I9edac28e4091548e2843fc87c89e3451df2b6ae9
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-04-08 14:50:17 +05:30
Steve Muckle c1421e3f22 msm: idle-v7: do not clean and invalidate after warm boot
The boot chain will already have invalidated any caches which
contain invalid data due to powering the caches on, so it is not
necessary to do that operation here. This call is also incorrect
because it is being done after caches are already enabled.

Change-Id: I1402f08712f45cb4598bcbc470b89637c1952056
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-03-26 11:05:06 -07:00
Steve Muckle 82440737ee init: apply SCHED_FIFO to kthreadd
Hotplug (cpu_up) latency currently suffers because the system
must wait for kthreadd to spawn certain kthreads (such as the
migration and workqueue kthreads) and for them to run for
the first time. Setting SCHED_FIFO will cause kthreadd to run
immediately. The newly created kthreads will inherit the scheduler
policy and run immediately also.

The scheduling policy of newly created kthreads is already set
back to SCHED_NORMAL in kthread_create_on_node, so nothing needs
to be done to restore normal scheduling behavior for the kthreads
once spawned.

Change-Id: I236ceb29845cf58ea1ea886fc3210ccaab2dd792
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-03-19 17:32:55 -07:00
Steve Muckle 099aa69b9c kernel: reduce sleep duration in wait_task_inactive
Sleeping for an entire tick adds unnecessary latency to
hotplugging a cpu (cpu_up).

Change-Id: Iab323a79f4048bc9101ecfd368e0f275827ed4ab
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-03-19 17:32:55 -07:00
Steve Muckle 336a3ae625 checkpatch: recognize only specific tags when ending commit text
There are some very frequently used tags that checkpatch can look
for as an ending to the commit text rather than using a pattern,
which can generate false positives in the "no commit text" rule.

Change-Id: I5b4400017b8273bcd9f5a59b3e28965c0062bef4
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-03-09 13:44:50 -08:00
Steve Muckle d3b3b64c90 checkpatch: require commit text
Commit text is almost always necessary to explain why a change is
needed. Exceptions are rare enough that these can be granted through
manual checkpatch overrides.

Change-Id: I926b2276f717940c2fec77a6709fa3088b1bf0c3
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-03-06 10:03:26 -08:00
Steve Muckle 4e3a631fe7 defconfig: automatic update
Update defconfigs to match current defaults so that further
defconfig commits do not contain unrelated changes.

Change-Id: I6f9583d92b916623f8b96d3428b6e67de25b1030
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-03-03 09:38:26 -08:00
Steve Muckle 67bb3329eb defconfig: automatic update
Change-Id: Ibb3e87bd202c9f93048c1a105d5eab02992d6e45
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2012-01-03 11:31:17 -08:00
Steve Muckle ee34012697 defconfig: automatic update
Change-Id: Ic9ef3fe8dea9ff659f159220bf79b6f0ed8daed8
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2011-12-16 15:34:14 -08:00
Steve Muckle 479f649202 defconfig: automatic update
Change-Id: I154c81ad40ac01daf1c2d62c84371f394cc20ab7
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2011-12-06 11:09:08 -07:00
Steve Muckle 3e042dff0f msm: kgsl: create singlethread wq instead of per-cpu wq
There doesn't seem to be a need for a per-CPU workqueue - kgsl can
make do with a singlethread workqueue which consumes less resources
and does not pin work to specific CPUs.

Change-Id: I6f9bd368434797a05497be88c24a5b1645d2f221
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2011-11-29 08:53:41 -08:00
Steve Muckle 57bbf1cc8c msm: MSM8X60 simulator board support
Board configuration for MSM8X60 simulation.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-10-08 15:12:48 -07:00
Steve Muckle 49b76f718d msm: add msm8x60_surf machine
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-10-08 15:12:47 -07:00
Steve Muckle 9161d303af msm: 8x60: gic initialization fixup for RUMI
On RUMI platform STIs are not enabled by default, contrary to the
GIC spec. The bits for STIs in the enable/enable clear registers
are also RW instead of RO. STIs need to be enabled at initialization
time.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-10-08 15:12:40 -07:00
Steve Muckle f880c5649e msm: irq: rename existing entry-macro to entry-macro-vic
The existing MSM irq entry macro is specific to a VIC
implementation. Renaming this makes room for irq support based on
other interrupt controllers.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-10-08 15:12:38 -07:00
Steve Muckle a55df6edcf msm: MSM8X60 RUMI3 board support
Board configuration for MSM8X60 emulation on RUMI3.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-10-08 15:12:37 -07:00
Steve Muckle ed1f31b4b7 msm: initial irq definitions for MSM8X60
IRQ assignments are different for MSM8X60 than other existing MSMs.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-10-08 15:12:34 -07:00
Steve Muckle 6cf6dfefe1 msm: io: MSM8X60 io support
MSM8X60 has different IO mappings than previous MSMs.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-10-08 15:12:33 -07:00
Steve Muckle c8aabaeb52 msm: create config option for proc-comm
Some builds may not support the proc-comm interface with
the baseband processor.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-10-08 15:12:32 -07:00