hashtable: introduce a small and naive hashtable

This hashtable implementation is using hlist buckets to provide a simple
hashtable to prevent it from getting reimplemented all over the kernel.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
[ Merging this now, so that subsystems can start applying Sasha's
  patches that use this   - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
block,elevator: use new hashtable implementation

Switch elevator to use the new hashtable implementation. This reduces the
amount of generic unrelated code in the elevator.

This also removes the dymanic allocation of the hash table. The size of the table is
constant so there's no point in paying the price of an extra dereference when accessing
it.

This patch depends on d9b482c ("hashtable: introduce a small and naive
hashtable") which was merged in v3.6.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug: squash commits from mako's kernel.

Just basic cleanups and removal of redundant code.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug.c: protect the cpu online/offline with some mutexes so that the watchdog doesn't trigger and the device reboots. Also export sample_timer to the userspace so that the users can control how often they want the hotplug decision work to check for load changes.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
tegra3: return to stock freq values on the available freqs.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
lib/string & lib/memcpy: use GNU implementation.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
lib/lzo: Rename lzo1x_decompress.c to lzo1x_decompress_safe.c

Rename the source file to match the function name and thereby
also make room for a possible future even slightly faster
"non-safe" decompressor version.

Signed-off-by: Markus F.X.J. Oberhumer <markus@oberhumer.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
lib/lzo: Update LZO compression to current upstream version

This commit updates the kernel LZO code to the current upsteam version
which features a significant speed improvement - benchmarking the Calgary
and Silesia test corpora typically shows a doubled performance in
both compression and decompression on modern i386/x86_64/powerpc machines.

Signed-off-by: Markus F.X.J. Oberhumer <markus@oberhumer.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
ARM: 7583/1: decompressor: Enable unaligned memory access for v6 and above

Modern GCC can generate code which makes use of the CPU's native
unaligned memory access capabilities.  This is useful for the C
decompressor implementations used for unpacking compressed kernels.

This patch disables alignment faults and enables the v6 unaligned
access model on CPUs which support these features (i.e., v6 and
later), allowing full unaligned access support for C code in the
decompressor.

The decompressor C code must not be built to assume that unaligned
access works if support for v5 or older platforms is included in
the kernel.

For correct code generation, C decompressor code must always use
the get_unaligned and put_unaligned accessors when dealing with
unaligned pointers, regardless of this patch.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Enable UNALIGNED_ACCESS for the new LZO algorithm to use. LZO decrompression is used on QCACHE so we benefit a little from the new and improved LZO code.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
lib/lzo: huge LZO decompression speedup on ARM by using unaligned access

Signed-off-by: Markus F.X.J. Oberhumer <markus@oberhumer.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Force the kernel to follow the UNALIGNED code path.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Staging: android: binder: Fix memory leak on thread/process exit

If a thread or process exited while a reply, one-way transaction or
death notification was pending, the struct holding the pending work
was leaked.

Change-Id: I2eaafaba1c0ecda3ec0872d449dc16d0721c21e7
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug: return to original code from thalamus. In addition made a change to the ringbuffer and decreased the multiplication of MIN_SAMPLING_TIME with the online_cpus.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
cpufreq: some UV fixes.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>