mmc: sdio: fix SDIO suspend/resume regression

commit 1c8cf9c upstream.

Fix SDIO suspend/resume regression introduced by 4c2ef25 "mmc: fix
all hangs related to mmc/sd card insert/removal during suspend/resume":

  PM: Syncing filesystems ... done.
  Freezing user space processes ... (elapsed 0.01 seconds) done.
  Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
  Suspending console(s) (use no_console_suspend to debug)
  pm_op(): platform_pm_suspend+0x0/0x5c returns -38
  PM: Device pxa2xx-mci.0 failed to suspend: error -38
  PM: Some devices failed to suspend

4c2ef25 moved the card removal/insertion mechanism out of MMC's
suspend/resume path and into pm notifiers (mmc_pm_notify), and that
broke SDIO's expectation that mmc_suspend_host() will remove the card,
and squash the error, in case -ENOSYS is returned from the bus suspend
handler (mmc_sdio_suspend() in this case).

mmc_sdio_suspend() is using this whenever at least one of the card's SDIO
function drivers does not have suspend/resume handlers - in that case
it is agreed to force removal of the entire card.

This patch fixes this regression by trivially bringing back that part of
mmc_suspend_host(), which was removed by 4c2ef25.

Reported-and-tested-by: Sven Neumann <s.neumann@raumfeld.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Changed the wakelock code, after merge with new.
And some settings change. for net / bt
For now, disable the DEEP SLEEP addon in GOVS, lets see if no SOD now.
Replaced the lowmemorykiller from CM-KERNEL

Conflicts:

	arch/arm/configs/htcleo_defconfig
lowmemorykiller: Try to make the new memory management more swap frie.

.ndly

Add swapcache into the other_file; this will let the low memory killer fill all ram; but not try to need swap.

The hope is swap will be filled as cache is needed; but we will not require much swap for the application loading now; thus will not delay the user action.

In addition removed references to other_free as the calculation needed extra CPU and is only used in a debug message at this point in time.

Change-Id: I126732bebf6c7b3b2503e5b073f9d654d23f9c6d
Backport smartass from 2.6.38

And added functions to include/linux/kthread.h for future use.
Add new interactive governor
Smartassv2: more speed tweaks
Tune for Hyper and Ondemand
cpufreq: interactive: fix possible Division by zero.

The following dump was seen sometimes while resuming,
the only division by zero on this function can happen after
delta_time is reassigned, since at the start of the
function, there is jump that protects against values
less than 1000.

After that, If delta_time and delta_idle == 0,
we will hit a div 0

Division by zero in kernel.
Backtrace:
[<c0057184>] (dump_backtrace+0x0/0x110) from [<c05d5ecc>] (dump_stack+0x18/0x1c)
r6:010f3000 r5:c113dfb0 r4:c004afb0 r3:c6ff0000
[<c05d5eb4>] (dump_stack+0x0/0x1c) from [<c00572cc>] (__div0+0x1c/0x20)
[<c00572b0>] (__div0+0x0/0x20) from [<c02195d4>] (Ldiv0+0x8/0x10)
[<c03dfd64>] (cpufreq_interactive_timer+0x0/0x2c0) from [<c00a7efc>] (run_timer_softirq+0x154/0x260)
[<c00a7da8>] (run_timer_softirq+0x0/0x260) from [<c00a0c8c>] (__do_softirq+0xc8/0x194)
[<c00a0bc4>] (__do_softirq+0x0/0x194) from [<c00a1008>] (irq_exit+0xb4/0xb8)
[<c00a0f54>] (irq_exit+0x0/0xb8) from [<c00584b4>] (ipi_timer+0x44/0x48)
r4:c004a040 r3:00000001
[<c0058470>] (ipi_timer+0x0/0x48) from [<c004c3e4>] (do_local_timer+0x68/0x84)
r5:c004ae2c r4:c07991e8
[<c004c37c>] (do_local_timer+0x0/0x84) from [<c0052948>] (__irq_svc+0x48/0xe0)
rcu: performance fixes to TINY_PREEMPT_RCU callback checking

This commit tightens up checks in rcu_preempt_check_callbacks() to avoid
unnecessary special handling at rcu_read_unlock() time.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
cpufreq: use governors from Linux 3.0 - ondemand, conservative,
performance.
cpufreq: create new intellidemand governor

The new intellidemand governor is based on ondemand governor with
browser detect, screen off profile and limit max freq patched in
to save even more battery life while the device is in use with screen
on and off.
cpufreq: add improved interactive governor
interactive with a built in screen off
cpufreq: Fix input handler crash

When input handler is running on a CPU not in ondemand
governor, skip making CPU frequency changes.

CRs-Fixed: 299451
Signed-off-by: David Ng <dave@codeaurora.org>
(cherry picked from commit 88a65c7)

Change-Id: Ibf04b210aea62f5c53c0ba0482615f94cf29fc55
Signed-off-by: Sunil Joseph <sunilj@codeaurora.org>
modified by faux123
cpufreq: tweak interactive for HTC (stability)
cpufreq: interactive: decrease max frequency for screen off
cpufreq: intellidemand: lower screen off frequency values
ext4 performance patch from Eric Sandeen
interactive: increase max sleep frequency to 384Mhz