lib: cordic: add library module providing cordic angle calculation

The brcm80211 driver in the staging tree has a cordic function to
determine cosine and sine for a given angle. Feedback received from
John Linville suggested that these kind of functions should be made
available to others as a library function in the kernel tree. The
b43 driver also has a cordic angle calculation implemented.

Cc: linux-kernel@vger.kernel.org
Cc: linux-wireless@vger.kernel.org
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

Conflicts:
	lib/Kconfig
	lib/Makefile

Change-Id: I89f6a7203ddf5db03082adeeca2beda491d2ee52

Conflicts:
	lib/Makefile
 drivers/staging: Configurable android log buffer sizes

Purpose is reduce the buffer size accordingly and observe savings
in the total kernel static size, which is useful for
memory constrained devices.

Change-Id: I926ab85213c82924ec483327d5aa248372efc604
Signed-off-by: Bhargav Upperla <bhargavuln@codeaurora.org>
Signed-off-by: hurtsky <sabmar_com@msn.com>

Signed-off-by: amperific <amperific@gmail.com>
More power to Entropy regeneration.

Conflicts:

	drivers/char/random.c

Signed-off-by: amperific <amperific@gmail.com>
Revert "More power to Entropy regeneration."

This reverts commit 3b592de409da062948b224a372512dbb373bfb5f.
Bump up the Entropy generation threshold.

Hesitated in adding this commit as it may cause disrepancies.
However, After much research, this is feasible for tuna in a sense.

Signed-off-by: amperific <amperific@gmail.com>
Updated drivers/char/random.c to 3.14-rc7

No shit. Requires no explanation.

Signed-off-by: amperific <amperific@gmail.com>
Sync lib/hexdump.c with 3.12.y
Revert "Updated drivers/char/random.c to 3.14-rc7"

This reverts commit 6492f6c8ffb8c2aa0214ab5948d88ffbea80dd00.

Time for an explanation.

3.14's Random.c has a few added features that link itself to the workqueue indirectly.
Due to such an instance, the random update renders itself useless and worse than ASKP's
current Random.c file. Reverting it to search for a more efficient random.c for tuna.
memory_hotplug update
Defconfig: Updated

Signed-off-by: amperific <amperific@gmail.com>
ARM: be strict about FP exceptions in kernel mode

The support code in vfp_support_entry does not care whether the
exception that caused it to be invoked occurred in kernel mode or
in user mode. However, neither condition that could trigger this
exception (lazy restore and VFP bounce to support code) is
currently allowable in kernel mode.

In either case, print a message describing the condition before
letting the undefined instruction handler run its course and trigger
an oops.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel at linaro.org>
Acked-by: Nicolas Pitre <nico at linaro.org>
Signed-off-by: Paul Reioux <reioux@gmail.com>
jbd2: optimize jbd2_journal_force_commit

Current implementation of jbd2_journal_force_commit() is suboptimal because
result in empty and useless commits. But callers just want to force and wait
any unfinished commits. We already have jbd2_journal_force_commit_nested()
which does exactly what we want, except we are guaranteed that we do not hold
journal transaction open.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

Change-Id: I5c041a1898838e880714a913b5a915f105a8dfb9
ion: Switch map/unmap dma api to sg_tables

Switch these api's from scatterlists to sg_tables

Change-Id: I8b99e39633df009d472ce24704fa26af7bb50fa2
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Signed-off-by: Devaraj Rangasamy <dev@ti.com>
ion: Add reserve function to ion

Rather than requiring each platform call memblock_remove or reserve
from the board file, add this to ion

Change-Id: Ie418a692c13e9e0cfe93ecc83d253d3ce860fc83
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Signed-off-by: Devaraj Rangasamy <dev@ti.com>
gpu: ion: export needed functions for PVR SGX

Make ion symbols visible to kernel modules. The SGX DDK
in modular form requires these symbols to be exported.

The reason for the code movement of ion structs is due to
EXPORT_SYMBOL’s requirement that the storage size of all
function parameters is known. This is so that the kernel can
sanity-check the size of data structures at module load time.

Change-Id: I2b9efe285557268da3baf258af09b56917add920
Signed-off-by: Rogelio Garcia <rgarcia@ti.com>
Signed-off-by: amperific <amperific@gmail.com>
omap-ion: Fix build issue when CONFIG_PVR_SGX is defined

This was caused by wrong path to pvr header.

Change-Id: Id32ee97ecb6ac4dc0b3662781a28b9eb38208370
Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
omap_ion: Revert ion_share and ion_import for PVR fds

This patch removes uneeded ion_share and ion_import for
PVR file descriptors. These changes were introduced during
the migration to PVR kernel modules. The call to ion_import
was also adding an extra ref count to ion buffers which
prevented them from being freed from tiler when SGX was
finished with them.

Change-Id: If3bdab42e31db3d7ddbb619a37aa4c8afef1aa74
Signed-off-by: Tate Hornbeck <tate.hornbeck@ti.com>
gpu: ion: group heap allocations by id in the debugfs

Multiple ion heaps can have the same type.  These heaps will have
separate debugfs files, but any allocation for a heap with the same
type will be listed in them.

Change-Id: Iad2f660c539e151d62e76f8f99ecc9ad80b16dd5
Signed-off-by: Lajos Molnar <lajos@ti.com>
Singed-off-by: Dima Svetlov <svetlov@ti.com>
 gpu: ion: omap: Set correct heap for TILER allocations

OMAP has two TILER heaps, but all allocations are logged under
the first TILER heap, as ion_alloc only takes a heap type mask.
Correct the heap after ion_alloc, so the buffer is maintained
under the correct heap.

Change-Id: I7b4eb690a6cde6f07632f5254c91374c6088cb8a
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
ION: Added support for getting ion phys without client

In order to dereference the ion_handles passed from user side
to kernel, there should be support for api without client identity.
This patch adds this support.

Change-Id: I95d0d460c9e0ad202d14e7620b82e1fa9d48f746
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>