Revert "Add /proc/<pid>/totmaps"

This reverts commit 95c609a6deababa5407157560f509058b59e44af.

BUG=chromium:258160
TEST=none

Change-Id: Ib7bdd5f8c8fae47f7bcb69fffd7009e2e7c49210
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/62216
Reviewed-by: Kees Cook <keescook@chromium.org>
CHROMIUM: mm: implement /proc/<pid>/totmaps

This is based on earlier work by Thiago Goncales. It implements a new
per process proc file which summarizes the contents of the smaps file
but doesn't display any addresses.  It gives more detailed information
than statm like the PSS (proprotional set size).  It differs from the
original implementation in that it doesn't use the full blown set of
seq operations, uses a different termination condition, and doesn't
displayed "Locked" as that was broken on the original implemenation.

BUG=chromium:258160
TEST=manual, cat /proc/self/totmaps and verify information is present

Change-Id: I6f631162709efc075897f366dc11a76abfa09cd1
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/62217
UPSTREAM: ARM: tegra: Fix build error w/ ARCH_TEGRA_114_SOC w/o ARCH_TEGRA_3x_SOC

This patch fixes the build error when ARCH_TEGRA_114_SOC is enabled
and ARCH_TEGRA_3x_SOC is disabled.

This provides Tegra114 with its own tegra114_init_early() instead of
making use of tegra30_init_early() so that T114 build doesn't depend
on T3x anymore.

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Andrew Chew <achew@nvidia.com>
(cherry picked from commit d2ffb918f74bf6f596209491babde9df0c7fb4b8)
Change-Id: I3fc3787eb8b78cbc15965c22e6fb62e8fdca6e62
Reviewed-on: https://gerrit.chromium.org/gerrit/61771
Reviewed-by: Rhyland Klein <rklein@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Commit-Queue: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: ARM: tegra: Unify tegra{20,30,114}_init_early()

Refactored tegra{20,30,114}_init_early() so that we have the unified
tegra_init_early().

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Andrew Chew <achew@nvidia.com>
(cherry picked from commit 86b6f1209a5113050bb04731e3300ce770d741c5)
Change-Id: If0d2331fec8d95a4ac6ac6f09babf160a7eb2bc7
Reviewed-on: https://gerrit.chromium.org/gerrit/61772
Reviewed-by: Rhyland Klein <rklein@nvidia.com>
Commit-Queue: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: ARM: tegra: Rename board-dt-tegra20.c to tegra.c

This is the preparation to unify "board-dt-tegra{20,30,114}.c" to a
single file "tegra.c".

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Andrew Chew <achew@nvidia.com>
(cherry picked from commit 2192a720a3b1dede5fd2b62495b0ca774817185f)
Change-Id: I4e21922d31d0f347ea7d95b9247f0a1815848975
Reviewed-on: https://gerrit.chromium.org/gerrit/61773
Reviewed-by: Rhyland Klein <rklein@nvidia.com>
Commit-Queue: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: ARM: tegra: Unify Device tree board files

Unify board-dt-tegra{30,114} to the Tegra20 DT board file, "tegra.c".

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Andrew Chew <achew@nvidia.com>
(cherry picked from commit 306c9ca9c1978e3f0cadba977c5f76dbc8e1c485)
Change-Id: I581871f2e6a74fd64baac42748902707f22b3786
Reviewed-on: https://gerrit.chromium.org/gerrit/61774
Reviewed-by: Rhyland Klein <rklein@nvidia.com>
Commit-Queue: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: ARM: tegra: expose chip ID and revision

Expose Tegra chip ID and revision in /sys/devices/soc for user mode
usage

Signed-off-by: Danny Huang <dahuang@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
(cherry picked from commit d591fdf8e23ef2abf57bdfbc4b596bf1a43d15b4)
[rklein fixed merge conflict since the patch:
"i2c: tegra: assume CONFIG_OF, remove platform data" was merged before
this, while it was merged after upstream.]
Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Andrew Chew <achew@nvidia.com>
Change-Id: Ibeb03ec184c50ac5eb246fb298899b1f9c191f8e
Reviewed-on: https://gerrit.chromium.org/gerrit/61775
Commit-Queue: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: clk: tegra: Fix "defer application of init table"

The patch titled "clk: tegra: defer application of init table" was
misapplied, and dropped an essential change.  The patch was applied
correctly to linux-next, however.

When this patch was merged into the NVIDIA topic branches, it was split
into 2 parts (to avoid merge conflicts). However, when this patch was
merged, only 1/2 of it was merged. This is the remaining half.

Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Andrew Chew <achew@nvidia.com>
Change-Id: Ifbf4929ab33a72be45ef6efae8bf4c2aef12e0d3
Reviewed-on: https://gerrit.chromium.org/gerrit/61776
Commit-Queue: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
CHROMIUM: ARM: dt: tegra114: Add new board, Venice

Add a new evaluation board, Venice for Tegra 114 family.

Signed-off-by: Andrew Chew <achew@nvidia.com>
Change-Id: Ie2898b30f7640c43c827d6448827f68eb4d3a44f
Reviewed-on: https://gerrit.chromium.org/gerrit/61777
Reviewed-by: Rhyland Klein <rklein@nvidia.com>
Commit-Queue: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: usbnet: handle link change

The link change is detected via the interrupt pipe, and bulk
pipes are responsible for transfering packets, so it is reasonable
to stop bulk transfer after link is reported as off.

Two adavantages may be obtained with stopping bulk transfer
after link becomes off:

- USB bus bandwidth is saved(USB bus is shared bus except for
USB3.0), for example, lots of 'IN' token packets and 'NYET'
handshake packets is transfered on 2.0 bus.

- probabaly power might be saved for usb host controller since
cancelling bulk transfer may disable the asynchronous schedule of
host controller.

With this patch, when link becomes off, about ~10% performance
boost can be found on bulk transfer of anther usb device which
is attached to same bus with the usbnet device, see below
test on next-20130410:

- read from usb mass storage(Sandisk Extreme USB 3.0) on pandaboard
with below command after unplugging ethernet cable:

	dd if=/dev/sda iflag=direct of=/dev/null bs=1M count=800

- without the patch
1, 838860800 bytes (839 MB) copied, 36.2216 s, 23.2 MB/s
2, 838860800 bytes (839 MB) copied, 35.8368 s, 23.4 MB/s
3, 838860800 bytes (839 MB) copied, 35.823 s, 23.4 MB/s
4, 838860800 bytes (839 MB) copied, 35.937 s, 23.3 MB/s
5, 838860800 bytes (839 MB) copied, 35.7365 s, 23.5 MB/s
average: 23.6MB/s

- with the patch
1, 838860800 bytes (839 MB) copied, 32.3817 s, 25.9 MB/s
2, 838860800 bytes (839 MB) copied, 31.7389 s, 26.4 MB/s
3, 838860800 bytes (839 MB) copied, 32.438 s, 25.9 MB/s
4, 838860800 bytes (839 MB) copied, 32.5492 s, 25.8 MB/s
5, 838860800 bytes (839 MB) copied, 31.6178 s, 26.5 MB/s
average: 26.1MB/s

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Added usbnet_link_change() prototype to usbnet.h.

BUG=chromium:246500
TEST=build, install, plug in device, check link works
[ kernel.org linux-2.6 git tree SHA1:
     4b49f58fff00e6e9b24eaa31d4c6324393d76b0a ]

Change-Id: I7b3e7a34aae3ec3508a66db9aa9170f7d0ce1282
Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/62232
Reviewed-by: Julius Werner <jwerner@chromium.org>
mmc: dw_mmc: recover from Start Bit Error

During a 4-bit or 8-bit read-data transfer, if data line does
not have a start bit, the data path signals a data start bit error to
the BIU and waits for a data timeout, after which it signals that the
data transfer is done. This patch sets the Data transfer done signals
once SBE interrupt reported.
Also this patch reset the DMA once the error is generated, to bring the DMA
to the default state.

This patch also makes the error reporting more verbose.

BUG=chrome-os-partner:20866
TEST=build and booted on peach, with HS200 mode enabled, not seeing the
     board hangs, also HS200 mode recover and function normally.
     Run multiple reboot and no hang seen.
     I can see the Start Bit Error oocured and system is able to recover
     from it.
TEST=manual, can see now correct error being reported
     by kernel.
     /wo this patch, even for Start Bit Error, log was showing as a DATA
     FIFO error
     /w this CL, below error reported
     [    4.700880] mmc_host mmc0: Bus speed (slot 0) = 200000000Hz
     (slot req 200000000Hz, actual 200000000HZ div = 0)
     [    4.710305] dwmmc_exynos 12200000.dwmmc0: Start bit error
     (status=00002000)

Change-Id: Ic11849eb98750c4a20e68c5bb4b3cda648c0d604
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/62318
CHROMIUM: panic: call panic handlers before kmsg_dump

Since the panic handlers may produce additional information for the
kernel log, it should be reported as part of the panic output saved by
kmsg_dump(). Without this, stuff like the kASLR offset is not visible
in pstore, and therefore not visible to crash reporters.

BUG=chromium:23031
TEST=manual crashing of a kASLR kernel shows offset in crash reports.

Change-Id: I1fce3783adf65f3ce87e8b2addb792e7050adcbc
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/62431
Reviewed-by: Grant Grundler <grundler@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Revert "HACK: clk: exynos5420: Add IGNORE_UNUSED to smmu_fimd1m1"

This reverts commit b81fda6735c8a0653dba14ead230fb41691e6019.

That was just a hack to keep old silicon working.  We no longer need
it.

BUG=chrome-os-partner:20674
TEST=Pit rev3 boots

Change-Id: Icab69060328323c401443dc87fc808636ff5d81b
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/62606
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
UPSTREAM: usbnet: apply usbnet_link_change

Use usbnet_link_change to handle link change centrally.

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

BUG=chromium:246500
TEST=build, install, plug USB 3.0 device, check link works

[ kernel.org linux-2.6 SHA1: 0162c55463057196346e7b53f83b5b53a47a32cc ]

Change-Id: Ia5ff46b726703d60e6c042fb949742220b2fdce4
Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/62400
Reviewed-by: Julius Werner <jwerner@chromium.org>
ARM: exynos5420: ASV: Add table for EVT1 for ARM and KFC

Adds ASV values for EVT1 hardware based on the DVFS table
version 1.22.

BUG=chrome-os-partner:20642
TEST=Boot on Peach EVT1 and check cpufreq working.
Verify the values by enabling debug in the ASV.

Signed-off-by: Arjun.K.V <arjun.kv@samsung.com>
Change-Id: I60e37a503a1246680d5e9223c3ba68b309320ff2
Reviewed-on: https://gerrit.chromium.org/gerrit/60651
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
Commit-Queue: Andrew Bresticker <abrestic@chromium.org>
Tested-by: Andrew Bresticker <abrestic@chromium.org>
ARM: exynos5420: ASV: Add ASV support for G3D and INT

Adds ASV support for G3D and INT rails on EVT1 rev based
on DVFS version 1.22.

BUG=chrome-os-partner:20642
TEST=Boot on Peach EVT1 and check that GPU DVFS, Devfreq
and CPUFREQ are working.
Verify the ASV values by enabling debug in ASV.

Change-Id: I1b968b8ed39102003adf00453c8c33147570f1a9
Signed-off-by: Arjun.K.V <arjun.kv@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/60759
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
Commit-Queue: Andrew Bresticker <abrestic@chromium.org>
Tested-by: Andrew Bresticker <abrestic@chromium.org>
PM: exynos5420: ASV: Enable ASV support for INT

Adds support to read ASV values in Devfreq on EVT1 rev.

BUG=chrome-os-partner:20642
TEST=Boot on Peach EVT1 and check that Devfreq is working.
Verify the ASV values by enabling debug in ASV.
Check voltage on INT rail and see that it matches with
the read ASV value.

Change-Id: Ibde7c861b23ba950401d073c548f560fbe97bd3b
Signed-off-by: Arjun.K.V <arjun.kv@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/60760
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
Commit-Queue: Andrew Bresticker <abrestic@chromium.org>
Tested-by: Andrew Bresticker <abrestic@chromium.org>
clk: exynos5420: Change PLL table for VPLL

Changes PLL values for EVT1 hardware based on the DVFS table version 1.22

BUG=chrome-os-partner:20642, chrome-os-partner:19977
TEST=Boot on Peach EVT1 and verified g3d dvfs working

Change-Id: Ie3449869e2d59e189b17fbe2e09130ff2dee6296
Signed-off-by: Akshu Agrawal <akshu.a@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/60761
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
Commit-Queue: Andrew Bresticker <abrestic@chromium.org>
Tested-by: Andrew Bresticker <abrestic@chromium.org>
cpufreq: exynos5420: Enable 1.8GHz for A15 cores

Enable till 1.8GHz for A15 cores and 1.3GHz for A7s.
A15 - 700MHz till 1.8GHz
A7 - 200MHz till 1.3GHz

BUG=chrome-os-partner:20514
TEST=Boot on EVT1 and see A15s going upto 1.8GHz
and A7s upto 1.3GHz.
Signed-off-by: Arjun.K.V <arjun.kv@samsung.com>

Change-Id: I8ba22ad57c7a9daa9f343d123ef64a2b4325353f
Reviewed-on: https://gerrit.chromium.org/gerrit/62107
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
Commit-Queue: Andrew Bresticker <abrestic@chromium.org>
Tested-by: Andrew Bresticker <abrestic@chromium.org>
drm/exynos: Include linux/fb.h in exynos_drm.h

This patch includes linux/fb.h in exynos_drm.h so that fb_videomode is a
complete type.

BUG=None
TEST=Compiles

Change-Id: If7a619d1b04b3829273528438b17f901ef28dd01
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/62532
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Stéphane Marchesin <marcheu@chromium.org>