Attempt to fix for reboots when returning from deep sleep. A variation of it worked fine for a whole day,
  but this will have to be further tested.
Further fixes, using nvidia changes as a base. Not heavily tested yet.
Revert "Further fixes, using nvidia changes as a base. Not heavily tested yet."

This reverts commit 09de29779a5f3be0b2eed971f196b9ade2ba8a47.
Reduced the atrix-specific amount of free ram to free beforehand. Seems that having that too high causes lags too.
Another attempt to fix reboots. It is being tested with a raise on clock, will try to revert that bit later as that would save a little power. (uncommited clock settings)
added more debugs
shut up gcc
Allocate tegra_ram_console before tegra_reserve. Seems to make a difference on random reboots when on bluetooth.
Change sbc1 upper limit to 208Mhz, based on newer nvidia sources that recommends 8x the clock for spi as a slave.

I think they got it wrong anyway: the problem seems to be that the spi_tegra_slave code tries to dynamically reprogram
the spi clock, by poking around on clock parents and trying to select the one with the lesser offset from the
"ideal" clock. This also includes lower clocks, having the default 104mhz overriden to run at 100mhz instead,
clearly disregarding nvidia's own clain that you must always run the spi slave clock at least at 4x the maximum
spi clock presented by the other chip (the master).

If the modem is effectively using 26Mhz, that could lead to instabilities.
I'll try to lower clocks later and test this assumption. As the clocks are enabled/disabled on demand, this shouldn't
steal any battery anyway;

Will try the phone for a few days before making assumptions that this higher clock solves the spi problems.

Also, I'm not sure if the code for dealing with bad transfers (that could happen anyway) is robust enough to a void
modem drops, if they ever happen. Perhaps rewriting the whole thing should help.

If the exchanged packets between the modem and host are always small, we can switch to a synchronous spi transaction
instead of dma and recovery.
arm/crypto: Add optimized AES and SHA1 routines

Add assembler versions of AES and SHA1 for ARM platforms.  This has provided
up to a 50% improvement in IPsec/TCP throughout for tunnels using AES128/SHA1.

Platform   CPU SPeed    Endian   Before (bps)   After (bps)   Improvement

IXP425      533 MHz      big     11217042        15566294        ~38%
KS8695      166 MHz     little    3828549         5795373        ~51%

Signed-off-by: David McCullough <ucdevel@gmail.com>
Revert "uncap sdhci max block size for tegra2"

This reverts commit 4f91c3b4a6a002e902de58db44bf7b15015c628f.

Seems to cause problem with android usb gadged when copying large files to external sd card.
ARM: entry: no need to increase preempt count for IRQ handlers

X-Git-Tag: v3.1-rc1~258^2~1^3~16
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=1613cc1119ecdb1bdb950da53065e615e4c4b8db

irq_enter() and irq_exit() already take care of the preempt_count
handling for interrupts, which increment and decrement the hardirq
bits of the preempt count.  So we can remove the preempt count handing
in our IRQ entry/exit assembly, like x86 did some 9 years ago.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Conflicts:

	arch/arm/kernel/entry-armv.S
lib/string: use glibc version the performance of memcpy and memmove of the general version is very inefficient, this patch improved them.

Signed-off-by: Miao Xie <miaox*******>
Optimized ARM RWSEM algorithm

RWSEM implementation for ARM using atomic functions.
Heavily based on arch/sh/include/asm/rwsem.h

Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
lib/memcopy: use glibc version the kernel's memcpy and memmove is very inefficient. But the glibc version is quite fast, in some cases it is 10 times faster than the kernel version. So I introduce some memory copy macros and functions of the glibc to improve the kernel version's performance.

The strategy of the memory functions is:
1. Copy bytes until the destination pointer is aligned.
2. Copy words in unrolled loops.  If the source and destination are not
   aligned in the same way, use word memory operations, but shift and merge
   two read words before writing.
3. Copy the few remaining bytes.

Signed-off-by: Miao Xie <miaox*******>
Make vfs_cache_pressure configurable
sched: don't call task_group() many times in set_task_rq()

It improves perfomance, especially if autogroup enabled.

The size of set_task_rq() was 0x180 and now it is 0xa0.

Signed-off-by: Andrew Vagin <avagin@openvz.org>
-O3 compilation fixups

Conflicts:

	fs/namei.c
Enable passing -pipe to gcc
Set read-ahead to 1040kb for default. This can be changed in userspace on a per-block-device basis.