7 years agoARM: tegra: cardhu: fix 5650 power on sequence
Anton Kondratenko [Tue, 13 Dec 2011 03:06:17 +0000]
ARM: tegra: cardhu: fix 5650 power on sequence

Since front and back right camera are multiplexed,
back right camera needs to be selected on power on.

Bug 890780

Change-Id: I6c9ecb95c42b3faedfede98b7e7de7e778d720b6
Signed-off-by: Anton Kondratenko <akondratenko@nvidia.com>
Reviewed-on: http://git-master/r/69662
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>

7 years agonvavp: vid ucode firmware file fallback
Isaac Richards [Wed, 7 Dec 2011 20:44:19 +0000]
nvavp: vid ucode firmware file fallback

If loading the normal video ucode file fails, try an alternative.

Bug 912656

Change-Id: I5de9af222e46dcec21f821e78ea115800cbf4805
Signed-off-by: Isaac Richards <irichards@nvidia.com>
Reviewed-on: http://git-master/r/68755
Reviewed-by: Gajanan Bhat <gbhat@nvidia.com>
Reviewed-by: Mohan Nimaje <mnimaje@nvidia.com>
Reviewed-by: Mandar Potdar <mpotdar@nvidia.com>
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>

7 years agotegra: NOR: Pass timing register value from platfom data
Manoj Chourasia [Thu, 1 Dec 2011 17:37:25 +0000]
tegra: NOR: Pass timing register value from platfom data

Get timing register value from platform data
instead of timing structure.

Fix NOR device registration using tegra_nor_device.

Signed-off-by: Manoj Chourasia <mchouraia@nvidia.com>

Reviewed-on: http://git-master/r/56889
(cherry picked from commit f77e726ec89d09ba3174a395d9f98c1b02a83c58)

Change-Id: Ie5ea216a770c998dd2ce578f206f83bcbd248fd2
Reviewed-on: http://git-master/r/67710
Tested-by: Manoj Chourasia <mchourasia@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agoasoc: max98088: shutdown codec in bias off state
Chandrakanth Gorantla [Fri, 11 Nov 2011 16:09:17 +0000]
asoc: max98088: shutdown codec in bias off state

set global shutdown bit to zero so that codec will shutdown in
bias off case

bug 899662

Change-Id: I86cf5d9567463166fc3ee0585083faba35dac301
Signed-off-by: Chandrakanth Gorantla <cgorantla@nvidia.com>
Reviewed-on: http://git-master/r/63858
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Scott Peterson <speterson@nvidia.com>

7 years agotegra: nor: Add NOR mapping driver.
Manoj Chourasia [Thu, 3 Nov 2011 14:04:07 +0000]
tegra: nor: Add NOR mapping driver.

This patch adds NOR mapping driver for tegra2 and tegra3.

Signed-off-by: Manoj Chourasia<mchourasia@nvidia.com>

Change-Id: Ie773d024a49977e356d4a9d605910ca30f22a3f3
Reviewed-on: http://git-master/r/43566
Reviewed-on: http://git-master/r/62149
Tested-by: Manoj Chourasia <mchourasia@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>

7 years agovideo: tegra: nvmap: Skip CPA for carverout.
Krishna Reddy [Mon, 12 Dec 2011 21:44:42 +0000]
video: tegra: nvmap: Skip CPA for carverout.

Skip page table attribute update for carveout.
Bug 914347

Change-Id: I6a1deeadade17703e831268dc58360ebc35af915
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/69539
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

7 years agoarm: mm: convert cpa_lock to mutex.
Krishna Reddy [Mon, 12 Dec 2011 19:58:06 +0000]
arm: mm: convert cpa_lock to mutex.

convert cpa lock to mutex from spin lock.
This is needed as page allocs, which can sleep, are happening
inside the spinlock.
Bug 913652

Change-Id: I8a31e31c2ca8f7631ec626a82a74509494f47219
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/69517
Reviewed-by: Automatic_Commit_Validation_User

7 years agomedia: video: ov5650: optimize i2c write table seq
Charlie Huang [Mon, 5 Dec 2011 23:51:51 +0000]
media: video: ov5650: optimize i2c write table seq

Combines i2c cmds that have sequential addresses into one bulk i2c write
cmd. This will save the overheads of slave addr + offset and the latency
time.

bug 816814

Change-Id: I7b3808e8af17dd805452672e4386033d8383fb91
Signed-off-by: Charlie Huang <chahuang@nvidia.com>
Reviewed-on: http://git-master/r/68326
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agoARM: tegra: config: Enable camera sensor devices
Amit Pandya [Tue, 4 Oct 2011 12:47:34 +0000]
ARM: tegra: config: Enable camera sensor devices

Add kernel config flags in "tegra_defconfig" & "tegra3_defconfig" to enable
camera sensor,focuser & torch devices.
This is to enable Camera capture on L4T with T20 Ventana & T30 Cardhu.

Bug 869132 & 880107

Change-Id: Ib81908881c8936e7b3dd7ebdcfd9bba006aa343f
Cherry-picked From : f09adb0d15f0991d0e7116f7a1092339bf92f9e9
Reviewed-on: http://git-master/r/55977
Signed-off-by: Amit Pandya <apandya@nvidia.com>
Reviewed-on: http://git-master/r/68165
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agovideo: tegra: host: Implement MPE context switch
Terje Bergstrom [Wed, 10 Aug 2011 06:06:41 +0000]
video: tegra: host: Implement MPE context switch

Implement context switching for MPE. This allows doing multiple video
encodings at the same time.

Context switching relies on wait base being in sync with sync point. As
MPE user land does not use wait bases, the patch also enables automatic
wait base syncing.

This patch does not enable the context save/restore.

Bug 827192

Change-Id: I510c02fb6d02ffbc1b9537d33474d46022b6cf59
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/66881
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agoARM: tegra: iovmm: Remove homebrew macro iovmprint()
Hiroshi DOYU [Mon, 21 Nov 2011 12:17:09 +0000]
ARM: tegra: iovmm: Remove homebrew macro iovmprint()

iovmprint() doesn't do much. Use standard snprintf() directly

Change-Id: I437dc6767e9984ad72c2d4adbb7b389b3f32d10f
Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Reviewed-on: http://git-master/r/66370
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agoARM: tegra: smmu: Use BUILD_BUG_ON for build time check
Hiroshi DOYU [Mon, 21 Nov 2011 13:46:00 +0000]
ARM: tegra: smmu: Use BUILD_BUG_ON for build time check

Those checks can be done at build time.

Change-Id: Ibe1bb540c5675452d5a11b34d8ff7e19d1b4bc51
Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Reviewed-on: http://git-master/r/66367
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agoARM: tegra: gart: Remove unnecessary spin_lock
Hiroshi DOYU [Mon, 21 Nov 2011 13:16:54 +0000]
ARM: tegra: gart: Remove unnecessary spin_lock

Nothing else should be using the device until after the probe function
returns 0.

Change-Id: If676ca004ec8fd87a4fe9472d792a676b83de7cc
Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Reviewed-on: http://git-master/r/66363
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agovideo: tegra: host: Prevent suspend if module is busy
Terje Bergstrom [Mon, 12 Dec 2011 11:04:54 +0000]
video: tegra: host: Prevent suspend if module is busy

MPE is kept artificially busy if a channel is open. This is done to
prevent power management during an encoding process.

This patch prevents system suspend if any module is busy.

Bug 911477

Change-Id: I943a7e29e473ac33e680281fcdce74618567facb
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/69457
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agoARM: tegra: config: enable KEYBOARD_GPIO for linux build
Bill Huang [Mon, 12 Dec 2011 10:58:50 +0000]
ARM: tegra: config: enable KEYBOARD_GPIO for linux build

enable CONFIG_KEYBOARD_GPIO in tegra_defconfig
enable CONFIG_KEYBOARD_GPIO in tegra3_defconfig

bug 910846

Signed-off-by: Bill Huang <bilhuang@nvidia.com>
Change-Id: Idcb87128736f8576be738ca45bbae9ea98e40510
Reviewed-on: http://git-master/r/69706
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agoARM: tegra: config: enable LCD & backlight for linux build
Bill Huang [Mon, 12 Dec 2011 10:33:00 +0000]
ARM: tegra: config: enable LCD & backlight for linux build

Enable backlight pwm control in tegra_defconfig

bug 910846

Signed-off-by: Bill Huang <bilhuang@nvidia.com>
Change-Id: Ieb24bbde8553bbac39d0858e2db8cbbd87d81122
Reviewed-on: http://git-master/r/69705
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agoASoC: Tegra: Fix compiler warnings
Sumit Bhattacharya [Thu, 8 Dec 2011 10:56:59 +0000]
ASoC: Tegra: Fix compiler warnings

Bug 912637

Change-Id: I05e2d3dcb903bf9d011f9b108a8f65f25ee1d3b5
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/68956
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agovideo: tegra: host: Write cmdbufs after relocs
Terje Bergstrom [Thu, 24 Nov 2011 08:17:27 +0000]
video: tegra: host: Write cmdbufs after relocs

Write cmdbuf stream to ftrace after the relocations have been done. This
way we can get the actual addresses referred to in the stream.

Change-Id: I7917abda19696198086f051e995288317491aacf
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/67096
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

7 years agoARM: tegra: clock: Use Tegra3 PLL lock indicators
Alex Frid [Thu, 8 Dec 2011 05:35:38 +0000]
ARM: tegra: clock: Use Tegra3 PLL lock indicators

Bug 873599

Change-Id: Ice84a63d90d39105e53505282fe126e56c4749db
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/68897
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Gerrit_Virtual_Submit
Reviewed-by: Bo Yan <byan@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>

7 years agoARM: tegra: dvfs: Add DVFS rails statistic
Alex Frid [Sun, 20 Nov 2011 01:28:31 +0000]
ARM: tegra: dvfs: Add DVFS rails statistic

On Tegra3: complete account of in- and out-of-bound rails control.
On Tegra2: out-of-bound vdd_cpu control in LP2 state is not accounted.

Change-Id: Ib68cbbfe3e4f965e758aca17a0ba30277d530347
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/67340
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

7 years agoarch: arm: config: disabling pcie in defconfig
Jay Agarwal [Mon, 5 Dec 2011 12:09:26 +0000]
arch: arm: config: disabling pcie in defconfig

Pcie powermanagement issues are yet to be resolved,
so modifying the defconfig to not to enable the
driver by default

bug: 878874

Change-Id: Ie8787342b1ccf9e22486129633d15d566d50e4e0
Signed-off-by: Krishna Kishore <kthota@nvidia.com>
Reviewed-on: http://git-master/r/64772
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>

7 years agoARM: tegra: Update tegra_ioremap for PCIE.
Jay Agarwal [Wed, 30 Nov 2011 08:19:28 +0000]
ARM: tegra: Update tegra_ioremap for PCIE.

Update tegra_ioremap for PCIE address mapping.
Bug 637871

Reviewed-on: http://git-master/r/35253
(cherry picked from commit b04ab5d338b31b21af0db5983839368a6ec4f327)

Change-Id: Ib4d631b311f077b61f3a31cd63a4d09ee393db7e
Signed-off-by: Jay Agarwal <jagarwal@nvidia.com>
Reviewed-on: http://git-master/r/66924
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>

7 years agoregulator: tps80031: Set selector in __tps80031_ldo_set_voltage
Antti P Miettinen [Thu, 3 Nov 2011 08:39:22 +0000]
regulator: tps80031: Set selector in __tps80031_ldo_set_voltage

Set selector also in __tps80031_ldo_set_voltage().

Bug 886170

Change-Id: I17dab9cdfa6397dbdf9dba0232e4f8de0cf364f0
Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
Reviewed-on: http://git-master/r/62147
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>

7 years agoarm: tegra: cardhu: pcie support for cardhu bsp
Jay Agarwal [Mon, 5 Dec 2011 08:55:38 +0000]
arm: tegra: cardhu: pcie support for cardhu bsp

Enabling PCIE support in cardhu board.
Fixes bug: 637871

Reviewed-on: http://git-master/r/34474
(cherry picked from commit bde3e58d998b6e76934152219b8803327cea2fad)

Change-Id: I18c548b458ad3d17ec07d2ec5b16fd83897b44b1
Signed-off-by: Krishna Kishore <kthota@nvidia.com>
Reviewed-on: http://git-master/r/62072
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>

7 years agoarm: tegra: pcie: enabling MSI support for pcie
Krishna Kishore [Tue, 30 Aug 2011 08:36:51 +0000]
arm: tegra: pcie: enabling MSI support for pcie

MSI style interrupt support is being added to
pcie driver

Fixes bug: 637871

Reviewed-on: http://git-master/r/47330
(cherry picked from commit de7fd8768b32da66eaf4eaf58473c65f7a76808d)

Change-Id: I105db7d08b545e75832f12433d8c2d233444294a
Signed-off-by: Krishna Kishore <kthota@nvidia.com>
Reviewed-on: http://git-master/r/62066
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>

7 years agoarm: tegra: pcie: Adding tegra3 support for pcie
Jay Agarwal [Mon, 5 Dec 2011 08:43:01 +0000]
arm: tegra: pcie: Adding tegra3 support for pcie

Added support for tegra3 to pcie driver

Fixes bug: 637871

Reviewed-on: http://git-master/r/44989
(cherry picked from commit 9bbfb4189474ede7f16a20b564ac7da2a93f6750)

Change-Id: Ic0bb5b8d3098030baee5d8db6ca043df71db5a8e
Signed-off-by: Krishna Kishore <kthota@nvidia.com>
Reviewed-on: http://git-master/r/62059
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>

7 years agoarm: tegra: enterprise: Add audio support for E1197 board.
Raj Jayaraman [Mon, 5 Dec 2011 22:01:14 +0000]
arm: tegra: enterprise: Add audio support for E1197 board.

Add audio and modem voice call support for E1197 board.

Bug 906348

Change-Id: Idb0d6263233c7aaebd1134b0c1e71560b6439079
Signed-off-by: Raj Jayaraman <rjayaraman@nvidia.com>
Reviewed-on: http://git-master/r/68282
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>

7 years agoarm: tegra: Invalidate TLB/BTAC afer enabling coherency
Prashant Gaikwad [Thu, 1 Dec 2011 04:47:51 +0000]
arm: tegra: Invalidate TLB/BTAC afer enabling coherency

Change-Id: Idaf841e245f3bccaae77375bb839e8c00bbc7542
Reviewed-on: http://git-master/r/67592
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>

7 years agoARM: tegra: config: enable MMC_UNSAFE_RESUME for linux build
Bill Huang [Fri, 9 Dec 2011 05:45:23 +0000]
ARM: tegra: config: enable MMC_UNSAFE_RESUME for linux build

Bug 909788

Signed-off-by: Bill Huang <bilhuang@nvidia.com>
Change-Id: I903c26b1d3864ce91b4c519ff1af17993a79f248
Reviewed-on: http://git-master/r/69139
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

7 years agoasoc: tegra: init cache values for i2s register
Ken Chang [Fri, 9 Dec 2011 00:05:51 +0000]
asoc: tegra: init cache values for i2s register

init i2s->reg_cache[] by reading i2s regs in probe function.

bug 911332

Change-Id: I58711b5b8a1866878e9de02144396883df6ff3da
Signed-off-by: Ken Chang <kenc@nvidia.com>
Reviewed-on: http://git-master/r/69081
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>

7 years agocrypto: tegra-aes: store keys in individual requests
Varun Wadekar [Thu, 7 Jul 2011 11:20:04 +0000]
crypto: tegra-aes: store keys in individual requests

store the keys in the individual request context structure,
since there is no other way to manage keys across different
crypto operations. also retry requests thrice in case of
errors

Reviewed-on: http://git-master/r/40008
(cherry picked from commit 5437e3230679fbc6e342f7e6787e3cc1692e5df6)

Change-Id: Iba23e20371661c8732995d13774cf3dbba6e24b4
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoarm: tegra: Restore L2 Aux control reg after LP2 exit.
Krishna Reddy [Mon, 5 Dec 2011 20:57:07 +0000]
arm: tegra: Restore L2 Aux control reg after LP2 exit.

Bug 908229

Change-Id: I0ce5955e62a66d806ff8937342e8f80940725f39
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/68270
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Donghan Ryu <dryu@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agoarm: tegra: irq: PMC WAKE2 level configuration
Bitan Biswas [Thu, 8 Dec 2011 07:03:15 +0000]
arm: tegra: irq: PMC WAKE2 level configuration

Wake level was not getting programmed for wake sources beyond WAKE31.
Previous expression was using 32-bit operation. Changing constant 1
to 1ull corrects the calculation.

bug 907980

Change-Id: Ie2e5f9a7dd4024db9d96859251169027570540f0
Reviewed-on: http://git-master/r/68907
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agoarm: tegra: defconfig: Enable TEGRA_NVHDCP
Jon Mayo [Wed, 7 Dec 2011 20:09:34 +0000]
arm: tegra: defconfig: Enable TEGRA_NVHDCP

Enable CONFIG_TEGRA_NVHDCP

Bug 912422

Change-Id: I43e27094eca00a445340b62644e76d664d8e65ab
Signed-off-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-on: http://git-master/r/68743
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agovideo: tegra: dc: Move DSI clock configuration to DC.
Kevin Huang [Wed, 16 Nov 2011 23:49:37 +0000]
video: tegra: dc: Move DSI clock configuration to DC.

We'd better place clock set-up in dc as HDMI. It makes code cleaner.
Also eliminate a false warning.

Bug 902786
Bug 850852

Signed-off-by: Kevin Huang <kevinh@nvidia.com>
Reviewed-on: http://git-master/r/65024
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
(cherry picked from commit e570e8dd45a66f11f0fc432f5919c5a036e34ba0)

Change-Id: I90d73602048e2b3c706550128ba04665c307da22
Reviewed-on: http://git-master/r/68863
Reviewed-by: Kevin Huang (Eng-SW) <kevinh@nvidia.com>
Tested-by: Kevin Huang (Eng-SW) <kevinh@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>

7 years agoarm: tegra: Fix build break when PM_SLEEP is not selected
Scott Williams [Wed, 7 Dec 2011 20:29:15 +0000]
arm: tegra: Fix build break when PM_SLEEP is not selected

Fix the build break when PM_SLEEP is not select that was
introduced by the restructuring of the reset handler code
for Trusted Foundations support.

Change-Id: I039d84f9244be52dd0a6a3b50d78d7189acb2ea8
Reviewed-on: http://git-master/r/68753
Tested-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Chris Johnson <cwj@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>

7 years agonvmap_mru: fix off-by-one
Colin Patrick McCabe [Wed, 7 Dec 2011 20:16:55 +0000]
nvmap_mru: fix off-by-one

Change-Id: I1b8fa9d950dc2e8260363593ec0e41f70d275fac
Signed-off-by: Colin Patrick McCabe <cmccabe@nvidia.com>
Reviewed-on: http://git-master/r/68745
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>

7 years agovideo: tegra: nvmap: Update page attributes as per request.
Krishna Reddy [Tue, 30 Aug 2011 17:15:44 +0000]
video: tegra: nvmap: Update page attributes as per request.

After allocating pages, Update page attributes in kernel
page table as per mem type requested.
Bug 865816

Reviewed-on: http://git-master/r/56334
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>
(cherry picked from commit bea4d449f4ff7090e0c2797693d2348f4586d8f6)

Reviewed-on: http://git-master/r/62720
Tested-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Hiro Sugawara <hsugawara@nvidia.com>
Reviewed-by: Kaz Fukuoka <kfukuoka@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
(cherry picked from commit 975fb95585543124de282faa4481433b147f61c6)

Change-Id: Iee71f8b37c405731314a1441cdb30ca848b41399
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/68744
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

7 years agonvmap_dev: fix BUG_ON of unsigned number
Colin Patrick McCabe [Wed, 7 Dec 2011 20:08:11 +0000]
nvmap_dev: fix BUG_ON of unsigned number

Change-Id: Ic5f70fe468651dab331059feda438d6e8871ef8a
Signed-off-by: Colin Patrick McCabe <cmccabe@nvidia.com>
Reviewed-on: http://git-master/r/68741
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>

7 years agonet: wireless: bcm4329: Fix build with gcc-4.6.1
Stephen Warren [Wed, 12 Oct 2011 18:46:20 +0000]
net: wireless: bcm4329: Fix build with gcc-4.6.1

Add a couple -Wno-error options when building with the new toolchain;
it's stricter. These can be removed once the code is fixed not to
cause warnings (see bug 888158).

Bug 830289

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Matt Pedro <mapedro@nvidia.com>
(cherry picked from commit 4a2bbb6dc6ab70a8e562d8db4d6016c28c290ce0)

Change-Id: I9944bf4a5fac005fed5ff5d92c38c5be32ea6f55
Reviewed-on: http://git-master/r/68740
Tested-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Allen Martin <amartin@nvidia.com>

7 years agoRevert "ARM: tegra: power: Use peek ahead timers not event notification"
Prashant Gaikwad [Tue, 6 Dec 2011 11:57:44 +0000]
Revert "ARM: tegra: power: Use peek ahead timers not event notification"

This reverts commit 3f5e640849383b1d5ed551aa84e0a89578519f09.

Change-Id: I5af3fab193204d121a0ea4a939d6e950d2c4a633
Reviewed-on: http://git-master/r/68680
Reviewed-by: Andy Park <andyp@nvidia.com>
Tested-by: Andy Park <andyp@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>

7 years agotegra: HDMI: add underscan capability exposure via sysfs
Victor Ryabukhin [Wed, 7 Dec 2011 06:16:47 +0000]
tegra: HDMI: add underscan capability exposure via sysfs

TVs/monitors which do not support underscan will crop HDMI picture.
Underscan information might be needed in userspace to adjust HDMI
resolution so that the picture will be shown correctly on such devices.

Bug 911580
Bug 912187

Change-Id: I1eec810d860e13dafef895cb85b32fd8187a4e02
Signed-off-by: Victor Ryabukhin <vryabukhin@nvidia.com>
Reviewed-on: http://git-master/r/68616
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agoARM: defconfig: Enable CAIF support.
Raj Jayaraman [Wed, 7 Dec 2011 01:09:19 +0000]
ARM: defconfig: Enable CAIF support.

Bug 886459

(cherry picked from commit 80b35eff76334a1a62192aa99c9d5dcb8c1ba76b)

Change-Id: I7f7914eeff30001ce6c56ecd26d1c61e6e981df1
Signed-off-by: Raj Jayaraman <rjayaraman@nvidia.com>
Reviewed-on: http://git-master/r/68559
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agomisc: tegra-baseband: Control M7400 service pin.
Raj Jayaraman [Wed, 23 Nov 2011 01:49:08 +0000]
misc: tegra-baseband: Control M7400 service pin.

M7400 service pin should be held high by a pullup internal to it
for flashless mode. This is not working. As a fix, drive the signal
high from AP.

Bug 886459

(cherry picked from commit 1516ce643ca9c6e52540023342c27791b8a69867)

Change-Id: I8a5ba9be6bcaf9119f5b81fe30de20cb8dc412d0
Signed-off-by: Raj Jayaraman <rjayaraman@nvidia.com>
Reviewed-on: http://git-master/r/68505
Reviewed-by: Steve Lin <stlin@nvidia.com>

7 years agomedia: video: tegra: sh532u focuser driver
Erik Lilliebjerg [Tue, 6 Dec 2011 14:30:42 +0000]
media: video: tegra: sh532u focuser driver

Adding default calibration data for the cases where no focuser
EPROM data exists.

Bug 909087

Change-Id: I303e8dd3883f93c1ebca1dd00c6726b0afc099d2
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/68466
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

7 years agoarm: tegra: enterprise: Add support for M7400 modem.
Raj Jayaraman [Fri, 14 Oct 2011 20:50:36 +0000]
arm: tegra: enterprise: Add support for M7400 modem.

Bug 878736
Bug 886459

(cherry picked from commit b840e235505829d7e11f2a984fb39d34bfb8f8d9)
Signed-off-by: Raj Jayaraman <rjayaraman@nvidia.com>

Change-Id: I08e48d03eced6e24f2b005d6f6a73cd4fec5c368
Reviewed-on: http://git-master/r/68295
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agoARM: tegra: whistler: remove baseband init when there is no modem
Varun Wadekar [Thu, 15 Dec 2011 06:21:03 +0000]
ARM: tegra: whistler: remove baseband init when there is no modem

When personnality/odmdata is not set to 0x2 (no i450 baseband) baseband init
is called. Side effect is loss of console on UARTA and LP0 failure.

Bug 912378
Bug 913070
Bug 907350

Signed-off-by: Martin Chabot <mchabot@nvidia.com>
Reviewed-on: http://git-master/r/68980
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

Conflicts:

arch/arm/mach-tegra/board-whistler.c

Change-Id: Iab96d89b3741ae4535ce3d3eccb8ba31d13a85ff
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agomisc: tegra-baseband: Add support for M7400 modem.
Raj Jayaraman [Fri, 14 Oct 2011 20:32:31 +0000]
misc: tegra-baseband: Add support for M7400 modem.

Bug 878736
Bug 886459

(cherry picked from commit 6f6a3b6759f95b833a3c98ee45015592f388b161)
Signed-off-by: Raj Jayaraman <rjayaraman@nvidia.com>

Change-Id: Ieb5e9313ad9d6a32a813dadd911f448d8b334b42
Reviewed-on: http://git-master/r/68289
Reviewed-by: Rajkumar Jayaraman <rjayaraman@nvidia.com>
Tested-by: Rajkumar Jayaraman <rjayaraman@nvidia.com>
Reviewed-by: Steve Lin <stlin@nvidia.com>

7 years agoarm: tegra: enterprise: Power down CEC and CLK_32K_OUT/BLINK pads
Daniel Solomon [Wed, 9 Nov 2011 23:31:26 +0000]
arm: tegra: enterprise: Power down CEC and CLK_32K_OUT/BLINK pads

- Disabling HDMI CEC, which is generally not supported by T30.
- Clear APBDEV_PMC_DPD_PADS_ORIDE_0_BLINK at boot time
- Pull down CLK_32K_OUT/BLINK

Bug 898597

Cherry-picked From: http://git-master/r/#change,63408
Signed-off-by: Daniel Solomon <daniels@nvidia.com>

Change-Id: Ic6e6a5ddf16adf9e8f5a847a31ce7c902e3df9bc
Reviewed-on: http://git-master/r/68558
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agovideo: tegra: host: Return EBUSY when mutex busy
Terje Bergstrom [Mon, 28 Nov 2011 06:33:50 +0000]
video: tegra: host: Return EBUSY when mutex busy

ERESTARTSYS can be used only when there is a signal pending to cause a
system call restart. In other cases, we must return a proper error
number to use space.

Change-Id: I018b051ec4cb63a0509762c39b47cc4420a21baa
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/68178
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

7 years agovideo: tegra: host: Use polling in nvhost_cdma_flush()
Terje Bergstrom [Fri, 2 Dec 2011 12:27:56 +0000]
video: tegra: host: Use polling in nvhost_cdma_flush()

nvhost_cdma_flush() waits for channel to become empty before returning.
If there is already another process waiting for semaphore,
nvhost_cdma_flush() needs to use polling.

Change-Id: Ic0c3d7adc68b3ed93056ec73c16f685d6f1ba15e
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/68163
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

7 years agovideo: tegra: host: Fix race in suspend/resume
Terje Bergstrom [Sat, 3 Dec 2011 17:15:24 +0000]
video: tegra: host: Fix race in suspend/resume

Implement proper mutex locking for nvhost_module_suspend(). At the same
time the ordering of suspend is changed to first suspend clients and
then host1x. This simplifies the power management code, and makes
nvhost_resume() a no-op.

Bug 906607

Change-Id: I60048773944369f73094140fb16682638966c731
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/68084
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agoASoC: Tegra WM8753 machine: Disable regulator when not in use
Sumit Bhattacharya [Wed, 7 Dec 2011 15:00:34 +0000]
ASoC: Tegra WM8753 machine: Disable regulator when not in use

On whistler audio regulator used to remain enabled always independent
of whether audio playback/capture is going on or not. Only enable
audio regulator when any playback/capture is going on using audio
codec.

Change-Id: Ifb8bf722434306a429aa08345215efde75c8ab38
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/68695
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>

7 years agoASoC: Tegra: return accurate pcm pointer position
Sumit Bhattacharya [Wed, 7 Dec 2011 14:50:43 +0000]
ASoC: Tegra: return accurate pcm pointer position

Use DMA driver tegra_dma_get_transfer_count api to get current DMA
position and use it to return accurate PCM poiter position.

Change-Id: I28906a1f2dd47dd91f03b8a79f53196752be6083
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/68692
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>

7 years agotegra: fb: HDMI monitor spec. not correct via "mode" device.
Andre Sihera [Fri, 15 Jul 2011 11:06:06 +0000]
tegra: fb: HDMI monitor spec. not correct via "mode" device.

When monitor is auto-detected on HDMI port, a special structure
is initialised to hold the video mode properties for the plugged-
in monitor. From this the display string is generated for displa
via the "mode" character device under /sys.

When the monitor is disconnected, the structures associated with
the monitor tself are cleared, but the pointer to the video mode
properties structure was left initialised and so pointed into thin
air, which resulted in garbage appearing on the "mode" device.

Added explicit deinitialisation code to reset pointer to video
mode properties so "cat mode" within /sys yields an empty string
when the HDMI monitor is unplugged.

Bug 849877

Reviewed-on: http://git-master/r/41205
(cherry picked from commit 8cecf2d7fbdf4d00945f3dd13bfe00161d4231d5)

Change-Id: Ibf3f070fa7904e8a01966d2886bbe07e9b69a607
Reviewed-on: http://git-master/r/68588
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>

7 years agokernel: sound: soc: Enable voice call dai link
Vinod G [Wed, 7 Dec 2011 02:21:16 +0000]
kernel: sound: soc: Enable voice call dai link

Enabling the dai link for voice call devices.

Change-Id: Ie89ae4cbc1ae987c56776706c5e4cf1bbd6c8f18
Reviewed-on: http://git-master/r/68575
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Tested-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>

7 years agokernel: arm: tegra: Enable baseband device.
Vinod G [Wed, 7 Dec 2011 02:15:08 +0000]
kernel: arm: tegra: Enable baseband device.

Add bandband device needed for voice call connection.

Change-Id: I01c068d13dbb42d0689c3caa4f4c9a69dad2cb3a
Reviewed-on: http://git-master/r/68574
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>

7 years agoarm: tegra: defconfig: remove CONFIG_USB_EHCI_ONOFF_FEATURE
Seshendra Gadagottu [Tue, 6 Dec 2011 05:04:24 +0000]
arm: tegra: defconfig: remove CONFIG_USB_EHCI_ONOFF_FEATURE

CONFIG_USB_EHCI_ONOFF_FEATURE is removed. Dynamic add/removel of
hcd driver can be used instead of this feature.

BUG 787720

Change-Id: I325d870b0d2242b97273eff40cfb228d5c965682
Reviewed-on: http://git-master/r/68394
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>

7 years agousb: host: tegra: CONFIG_USB_EHCI_ONOFF_FEATURE deprecated
Seshendra Gadagottu [Tue, 6 Dec 2011 04:50:58 +0000]
usb: host: tegra: CONFIG_USB_EHCI_ONOFF_FEATURE deprecated

CONFIG_USB_EHCI_ONOFF_FEATURE is removed. Dynamic add/removel of
hcd driver can be used instead of above feature.

BUG 787720

Reviewed-on: http://git-master/r/65105
(cherry picked from commit a07377e01cd0a67f04cb74345e5a372bfc0059fb)

Change-Id: I185c08d09440cf683afc5eb1dc3f0dff5f93d25b
Reviewed-on: http://git-master/r/68393
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>

7 years agoarm: tegra: enterprise: register/unregister functions for hsic
Seshendra Gadagottu [Tue, 6 Dec 2011 04:07:15 +0000]
arm: tegra: enterprise: register/unregister functions for hsic

Added functions for register and unregister usb hsic device with
kernel. Updated xmm platform data with these function pointers.

BUG 787270

Reviewed-on: http://git-master/r/65092
(cherry picked from commit 7655d416cfef35bd68c9b0daf16253b4f4e013c6)

Change-Id: Ie3c5478164a4ee1a5b2e00e39827bb005d30a904
Reviewed-on: http://git-master/r/68392
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>

7 years agoarm: tegra: irq: any polarity lp0 wake change
Bitan Biswas [Wed, 7 Dec 2011 16:39:02 +0000]
arm: tegra: irq: any polarity lp0 wake change

False lp0 wakeup due to wake sources configured as any polarity was
traced to an earlier change. Reverting the change.

bug 906073
bug 909193

Change-Id: I1b2d8ecb265e9a57b5d2514f86853bd59481b58a
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/68700
Reviewed-by: Mallikarjun Kasoju <mkasoju@nvidia.com>

7 years agoASoC: Tegra: Acquire wake_lock during playback capture
Sumit Bhattacharya [Wed, 7 Dec 2011 12:28:14 +0000]
ASoC: Tegra: Acquire wake_lock during playback capture

Acquire wake_lock from alsa kernel when pcm playback/capture
starts and hold it until playack/capture ends. It is needed
to prevent device from going into suspend state in middle
of audio playback.

Change-Id: I71e5fae0268f73a3e57f8d886c1b228d46899ea4
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/68671
Reviewed-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>

7 years agoASoC: WM8903: Disable irq before suspend
Sumit Bhattacharya [Wed, 7 Dec 2011 11:45:53 +0000]
ASoC: WM8903: Disable irq before suspend

When codec enters suspend mic bias gets turned off. As a result if a
mic is already plugged in a mic removal event gets triggered. Once
codec driver gets mic removal interrupt it sleeps for the duration
of debounce time which causes kernel power manager to abort suspend.

To avoid this scenario disable mic detect IRQ before powering off
codec and enable the same during resume.

Change-Id: Ic3c90d73c9f2742b6771f7e3fe0e3fb1f59e1cd9
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/68662
Reviewed-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>

7 years agoarm: tegra: comms: dynamic loading of hcd driver
Seshendra Gadagottu [Thu, 17 Nov 2011 06:05:08 +0000]
arm: tegra: comms: dynamic loading of hcd driver

ehci on/off mechanism is replaced with dynamic
add/removel of ehci-hcd driver.

BUG 787270

Reviewed-on: http://git-master/r/65091
(cherry picked from commit 50381a027547354140d599876f452ff6a304e330)

Change-Id: Ic9827c23fdbf367b87bb4ba153b65e7c867576d3
Reviewed-on: http://git-master/r/68391
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

7 years agousb : tegra : reduce the EMC clock for USB
Hyungwoo Yang [Tue, 27 Sep 2011 00:01:45 +0000]
usb : tegra : reduce the EMC clock for USB

This change reduces the EMC clock required by USB host/gadget from 150Mhz to 100Mhz.

Bug ID : 817811

Reviewed-on: http://git-master/r/54571
(cherry picked from commit 6b208d6dae6844410b9cc29c30664ce7df44e989)

Change-Id: I0d227121b7d212f44db82348ea66b2798150f387
Signed-off-by: Hyungwoo Yang <hyungwooy@nvidia.com>
Reviewed-on: http://git-master/r/68072
Reviewed-by: Luke Huang <lhuang@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

7 years agoregulator: fan53555: Adding driver
Jake Park [Fri, 2 Dec 2011 02:11:31 +0000]
regulator: fan53555: Adding driver

Adding regulator driver for the device FAN53555.

Bug 892117

Change-Id: I895094d3e0aaeb85cfd33f1bc16008c66961b403
Reviewed-on: http://git-master/r/67862
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Jake Park <jakep@nvidia.com>

7 years agoMerge branch 'linux-3.1.5' into android-tegra-nv-3.1
Varun Wadekar [Wed, 14 Dec 2011 10:03:34 +0000]
Merge branch 'linux-3.1.5' into android-tegra-nv-3.1

Conflicts:
arch/arm/Kconfig

Change-Id: If8aaaf3efcbbf6c9017b38efb6d76ef933f147fa
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoarm: tegra: pm: preserve r4 - r11 across a suspend
Varun Wadekar [Tue, 6 Dec 2011 12:00:03 +0000]
arm: tegra: pm: preserve r4 - r11 across a suspend

Make cpu_suspend()..return function preserve r4 to r11 across a suspend
cycle.  This is in preparation of relieving platform support code from
this task.

Original commit: 5fa94c812c0001ac7c3d8868e956ec514734a352

Bug 911002

Change-Id: If33c32ba7de449288eac8f83cb0898ba77a46333
Acked-by: Frank Hofmann <frank.hofmann@tomtom.com>
Tested-by: Kevin Hilman <khilman@ti.com>
Acked-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoarm: tegra: pm: move return address (for cpu_resume) to top of stack
Varun Wadekar [Tue, 6 Dec 2011 11:47:07 +0000]
arm: tegra: pm: move return address (for cpu_resume) to top of stack

Move the return address for cpu_resume to the top of stack so that
cpu_resume looks more like a normal function.

Original commit: 2fefbcd58590cf33189c6178098e12b31b994b5f

Bug 911002

Change-Id: I275930306a3b4ecb551a32da5f9f26dba53459ec
Acked-by: Frank Hofmann <frank.hofmann@tomtom.com>
Tested-by: Kevin Hilman <khilman@ti.com>
Acked-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoRevert "ARM: pm: move cpu_init() call into core code"
Varun Wadekar [Wed, 7 Dec 2011 10:36:47 +0000]
Revert "ARM: pm: move cpu_init() call into core code"

This reverts commit 14cd8fd574bce1cfbe510ccb1f73c7c1024d770f.

Conflicts:

arch/arm/kernel/sleep.S

Bug 911002

Change-Id: I814e25bb8c4ae5b5351fd2bec58d57c9d86ef429
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/68652
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>

7 years agoLinux 3.1.5
Greg Kroah-Hartman [Fri, 9 Dec 2011 16:57:05 +0000]
Linux 3.1.5

7 years agosch_red: fix red_change
Eric Dumazet [Thu, 1 Dec 2011 11:06:34 +0000]
sch_red: fix red_change

[ Upstream commit 1ee5fa1e9970a16036e37c7b9d5ce81c778252fc ]

Le mercredi 30 novembre 2011 à 14:36 -0800, Stephen Hemminger a écrit :

> (Almost) nobody uses RED because they can't figure it out.
> According to Wikipedia, VJ says that:
>  "there are not one, but two bugs in classic RED."

RED is useful for high throughput routers, I doubt many linux machines
act as such devices.

I was considering adding Adaptative RED (Sally Floyd, Ramakrishna
Gummadi, Scott Shender), August 2001

In this version, maxp is dynamic (from 1% to 50%), and user only have to
setup min_th (target average queue size)
(max_th and wq (burst in linux RED) are automatically setup)

By the way it seems we have a small bug in red_change()

if (skb_queue_empty(&sch->q))
red_end_of_idle_period(&q->parms);

First, if queue is empty, we should call
red_start_of_idle_period(&q->parms);

Second, since we dont use anymore sch->q, but q->qdisc, the test is
meaningless.

Oh well...

[PATCH] sch_red: fix red_change()

Now RED is classful, we must check q->qdisc->q.qlen, and if queue is empty,
we start an idle period, not end it.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agosch_red: fix red_calc_qavg_from_idle_time
Eric Dumazet [Wed, 30 Nov 2011 12:10:53 +0000]
sch_red: fix red_calc_qavg_from_idle_time

[ Upstream commit ea6a5d3b97b768561db6358f15e4c84ced0f4f7e ]

Since commit a4a710c4a7490587 (pkt_sched: Change PSCHED_SHIFT from 10 to
6) it seems RED/GRED are broken.

red_calc_qavg_from_idle_time() computes a delay in us units, but this
delay is now 16 times bigger than real delay, so the final qavg result
smaller than expected.

Use standard kernel time services since there is no need to obfuscate
them.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoipv4: make sure RTO_ONLINK is saved in routing cache
Julian Anastasov [Fri, 2 Dec 2011 11:39:42 +0000]
ipv4: make sure RTO_ONLINK is saved in routing cache

[ Upstream commit f61759e6b831a55b89e584b198c3da325e2bc379 ]

__mkroute_output fails to work with the original tos
and uses value with stripped RTO_ONLINK bit. Make sure we put
the original TOS bits into rt_key_tos because it used to match
cached route.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoipv4: Perform peer validation on cached route lookup.
David S. Miller [Thu, 1 Dec 2011 18:38:59 +0000]
ipv4: Perform peer validation on cached route lookup.

[ Upstream commit efbc368dcc6426d5430b9b8eeda944cf2cb74b8c,
  incorporating a follow-on change to prevent an OOPS ]

Otherwise we won't notice the peer GENID change.

Reported-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoinet: add a redirect generation id in inetpeer
Eric Dumazet [Sat, 26 Nov 2011 12:13:44 +0000]
inet: add a redirect generation id in inetpeer

[ Upstream commit de68dca1816660b0d3ac89fa59ffb410007a143f ]

Now inetpeer is the place where we cache redirect information for ipv4
destinations, we must be able to invalidate informations when a route is
added/removed on host.

As inetpeer is not yet namespace aware, this patch adds a shared
redirect_genid, and a per inetpeer redirect_genid. This might be changed
later if inetpeer becomes ns aware.

Cache information for one inerpeer is valid as long as its
redirect_genid has the same value than global redirect_genid.

Reported-by: Arkadiusz Miśkiewicz <a.miskiewicz@gmail.com>
Tested-by: Arkadiusz Miśkiewicz <a.miskiewicz@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoipv4: fix redirect handling
Eric Dumazet [Fri, 18 Nov 2011 20:24:32 +0000]
ipv4: fix redirect handling

[ Upstream commit 9cc20b268a5a14f5e57b8ad405a83513ab0d78dc ]

commit f39925dbde77 (ipv4: Cache learned redirect information in
inetpeer.) introduced a regression in ICMP redirect handling.

It assumed ipv4_dst_check() would be called because all possible routes
were attached to the inetpeer we modify in ip_rt_redirect(), but thats
not true.

commit 7cc9150ebe (route: fix ICMP redirect validation) tried to fix
this but solution was not complete. (It fixed only one route)

So we must lookup existing routes (including different TOS values) and
call check_peer_redir() on them.

Reported-by: Ivan Zahariev <famzah@icdsoft.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Flavio Leitner <fbl@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoroute: fix ICMP redirect validation
Flavio Leitner [Mon, 24 Oct 2011 06:56:38 +0000]
route: fix ICMP redirect validation

[ Upstream commit 7cc9150ebe8ec06cafea9f1c10d92ddacf88d8ae ]

The commit f39925dbde7788cfb96419c0f092b086aa325c0f
(ipv4: Cache learned redirect information in inetpeer.)
removed some ICMP packet validations which are required by
RFC 1122, section 3.2.2.2:
...
  A Redirect message SHOULD be silently discarded if the new
  gateway address it specifies is not on the same connected
  (sub-) net through which the Redirect arrived [INTRO:2,
  Appendix A], or if the source of the Redirect is not the
  current first-hop gateway for the specified destination (see
  Section 3.3.1).

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoipv4: avoid useless call of the function check_peer_pmtu
Gao feng [Wed, 19 Oct 2011 15:34:09 +0000]
ipv4: avoid useless call of the function check_peer_pmtu

[ Upstream commit 59445b6b1f90b97c4e28062b96306bacfa4fb170 ]

In func ipv4_dst_check,check_peer_pmtu should be called only when peer is updated.
So,if the peer is not updated in ip_rt_frag_needed,we can not inc __rt_peer_genid.

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agosch_teql: fix lockdep splat
Eric Dumazet [Wed, 30 Nov 2011 04:08:58 +0000]
sch_teql: fix lockdep splat

[ Upstream commit f7e57044eeb1841847c24aa06766c8290c202583 ]

We need rcu_read_lock() protection before using dst_get_neighbour(), and
we must cache its value (pass it to __teql_resolve())

teql_master_xmit() is called under rcu_read_lock_bh() protection, its
not enough.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoqeth: l3 fix rcu splat in xmit
Frank Blaschka [Tue, 15 Nov 2011 02:31:15 +0000]
qeth: l3 fix rcu splat in xmit

[ Upstream commit 1d36cb479f204a0fedc1a3e7ce7b32c0a2c48769 ]

when use dst_get_neighbour to get neighbour, we need
rcu_read_lock to protect, since dst_get_neighbour uses
rcu_dereference.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoipv4: fix lockdep splat in rt_cache_seq_show
Eric Dumazet [Tue, 29 Nov 2011 20:05:55 +0000]
ipv4: fix lockdep splat in rt_cache_seq_show

[ Upstream commit 218fa90f072e4aeff9003d57e390857f4f35513e ]

After commit f2c31e32b378 (fix NULL dereferences in check_peer_redir()),
dst_get_neighbour() should be guarded by rcu_read_lock() /
rcu_read_unlock() section.

Reported-by: Miles Lane <miles.lane@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoipv4: fix for ip_options_rcv_srr() daddr update.
Li Wei [Tue, 8 Nov 2011 21:39:28 +0000]
ipv4: fix for ip_options_rcv_srr() daddr update.

[ Upstream commit b12f62efb8ec0b9523bdb6c2d412c07193086de9 ]

When opt->srr_is_hit is set skb_rtable(skb) has been updated for
'nexthop' and iph->daddr should always equals to skb_rtable->rt_dst
holds, We need update iph->daddr either.

Signed-off-by: Li Wei <lw@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoah: Read nexthdr value before overwriting it in ahash input callback.
Nick Bowler [Tue, 8 Nov 2011 12:12:45 +0000]
ah: Read nexthdr value before overwriting it in ahash input callback.

[ Upstream commit b7ea81a58adc123a4e980cb0eff9eb5c144b5dc7 ]

The AH4/6 ahash input callbacks read out the nexthdr field from the AH
header *after* they overwrite that header.  This is obviously not going
to end well.  Fix it up.

Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoah: Correctly pass error codes in ahash output callback.
Nick Bowler [Tue, 8 Nov 2011 12:12:44 +0000]
ah: Correctly pass error codes in ahash output callback.

[ Upstream commit 069294e813ed5f27f82613b027609bcda5f1b914 ]

The AH4/6 ahash output callbacks pass nexthdr to xfrm_output_resume
instead of the error code.  This appears to be a copy+paste error from
the input case, where nexthdr is expected.  This causes the driver to
continuously add AH headers to the datagram until either an allocation
fails and the packet is dropped or the ahash driver hits a synchronous
fallback and the resulting monstrosity is transmitted.

Correct this issue by simply passing the error code unadulterated.

Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoclockevents: Set noop handler in clockevents_exchange_device()
Thomas Gleixner [Fri, 2 Dec 2011 15:02:45 +0000]
clockevents: Set noop handler in clockevents_exchange_device()

commit de28f25e8244c7353abed8de0c7792f5f883588c upstream.

If a device is shutdown, then there might be a pending interrupt,
which will be processed after we reenable interrupts, which causes the
original handler to be run. If the old handler is the (broadcast)
periodic handler the shutdown state might hang the kernel completely.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoclocksource: Fix bug with max_deferment margin calculation
Yang Honggang (Joseph) [Fri, 2 Dec 2011 03:22:41 +0000]
clocksource: Fix bug with max_deferment margin calculation

commit b1f919664d04a8d0ba29cb76673c7ca3325a2006 upstream.

In order to leave a margin of 12.5% we should >> 3 not >> 5.

Signed-off-by: Yang Honggang (Joseph) <eagle.rtlinux@gmail.com>
[jstultz: Modified commit subject]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agooprofile: Fix crash when unloading module (hr timer mode)
Robert Richter [Fri, 7 Oct 2011 14:31:46 +0000]
oprofile: Fix crash when unloading module (hr timer mode)

commit 87121ca504fd1d963a66b3fb0c72054b0fd9a177 upstream.

Oprofile may crash in a KVM guest while unlaoding modules. This
happens if oprofile_arch_init() fails and oprofile switches to the hr
timer mode as a fallback. In this case oprofile_arch_exit() is called,
but it never was initialized properly which causes the crash. This
patch fixes this.

oprofile: using timer interrupt.
BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
IP: [<ffffffff8123c226>] unregister_syscore_ops+0x41/0x58
PGD 41da3f067 PUD 41d80e067 PMD 0
Oops: 0002 [#1] PREEMPT SMP
CPU 5
Modules linked in: oprofile(-)

Pid: 2382, comm: modprobe Not tainted 3.1.0-rc7-00018-g709a39d #18 Advanced Micro Device Anaheim/Anaheim
RIP: 0010:[<ffffffff8123c226>]  [<ffffffff8123c226>] unregister_syscore_ops+0x41/0x58
RSP: 0018:ffff88041de1de98  EFLAGS: 00010296
RAX: 0000000000000000 RBX: ffffffffa00060e0 RCX: dead000000200200
RDX: 0000000000000000 RSI: dead000000100100 RDI: ffffffff8178c620
RBP: ffff88041de1dea8 R08: 0000000000000001 R09: 0000000000000082
R10: 0000000000000000 R11: ffff88041de1dde8 R12: 0000000000000080
R13: fffffffffffffff5 R14: 0000000000000001 R15: 0000000000610210
FS:  00007f9ae5bef700(0000) GS:ffff88042fd40000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000008 CR3: 000000041ca44000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process modprobe (pid: 2382, threadinfo ffff88041de1c000, task ffff88042db6d040)
Stack:
 ffff88041de1deb8 ffffffffa0006770 ffff88041de1deb8 ffffffffa000251e
 ffff88041de1dec8 ffffffffa00022c2 ffff88041de1ded8 ffffffffa0004993
 ffff88041de1df78 ffffffff81073115 656c69666f72706f 0000000000610200
Call Trace:
 [<ffffffffa000251e>] op_nmi_exit+0x15/0x17 [oprofile]
 [<ffffffffa00022c2>] oprofile_arch_exit+0xe/0x10 [oprofile]
 [<ffffffffa0004993>] oprofile_exit+0x13/0x15 [oprofile]
 [<ffffffff81073115>] sys_delete_module+0x1c3/0x22f
 [<ffffffff811bf09e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
 [<ffffffff8148070b>] system_call_fastpath+0x16/0x1b
Code: 20 c6 78 81 e8 c5 cc 23 00 48 8b 13 48 8b 43 08 48 be 00 01 10 00 00 00 ad de 48 b9 00 02 20 00 00 00 ad de 48 c7 c7 20 c6 78 81
 89 42 08 48 89 10 48 89 33 48 89 4b 08 e8 a6 c0 23 00 5a 5b
RIP  [<ffffffff8123c226>] unregister_syscore_ops+0x41/0x58
 RSP <ffff88041de1de98>
CR2: 0000000000000008
---[ end trace 06d4e95b6aa3b437 ]---

Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agojump_label: jump_label_inc may return before the code is patched
Gleb Natapov [Tue, 18 Oct 2011 17:55:51 +0000]
jump_label: jump_label_inc may return before the code is patched

commit bbbf7af4bf8fc69bc751818cf30521080fa47dcb upstream.

If cpu A calls jump_label_inc() just after atomic_add_return() is
called by cpu B, atomic_inc_not_zero() will return value greater then
zero and jump_label_inc() will return to a caller before jump_label_update()
finishes its job on cpu B.

Link: http://lkml.kernel.org/r/20111018175551.GH17571@redhat.com

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoperf: Fix parsing of __print_flags() in TP_printk()
Steven Rostedt [Fri, 4 Nov 2011 20:32:25 +0000]
perf: Fix parsing of __print_flags() in TP_printk()

commit d06c27b22aa66e48e32f03f9387328a9af9b0625 upstream.

A update is made to the sched:sched_switch event that adds some
logic to the first parameter of the __print_flags() that shows the
state of tasks. This change cause perf to fail parsing the flags.

A simple fix is needed to have the parser be able to process ops
within the argument.

Reported-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agotick-broadcast: Stop active broadcast device when replacing it
Thomas Gleixner [Fri, 2 Dec 2011 11:34:16 +0000]
tick-broadcast: Stop active broadcast device when replacing it

commit c1be84309c58b1e7c6d626e28fba41a22b364c3d upstream.

When a better rated broadcast device is installed, then the current
active device is not disabled, which results in two running broadcast
devices.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agotracing: fix event_subsystem ref counting
Ilya Dryomov [Mon, 31 Oct 2011 09:07:42 +0000]
tracing: fix event_subsystem ref counting

commit cb59974742aea24adf6637eb0c4b8e7b48bca6fb upstream.

Fix a bug introduced by e9dbfae5, which prevents event_subsystem from
ever being released.

Ref_count was added to keep track of subsystem users, not for counting
events.  Subsystem is created with ref_count = 1, so there is no need to
increment it for every event, we have nr_events for that.  Fix this by
touching ref_count only when we actually have a new user -
subsystem_open().

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Link: http://lkml.kernel.org/r/1320052062-7846-1-git-send-email-idryomov@gmail.com
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agortc: Fix some bugs that allowed accumulating time drift in suspend/resume
Arve Hjønnevåg [Wed, 23 Nov 2011 02:24:51 +0000]
rtc: Fix some bugs that allowed accumulating time drift in suspend/resume

commit 6a8943d9ec2567572fca25cf69ad45844d0141a3 upstream.

The current code checks if abs(delta_delta.tv_sec) is greater or
equal to two before it discards the old delta value, but this can
trigger at close to -1 seconds since -1.000000001 seconds is stored
as tv_sec -2 and tv_nsec 999999999 in a normalized timespec.

rtc_resume had an early return check if the rtc value had not changed
since rtc_suspend. This effectivly stops time for the duration of the
short sleep. Check if sleep_time is positive after all the adjustments
have been applied instead since this allows the old_system adjustment
in rtc_suspend to have an effect even for short sleep cycles.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agortc: Disable the alarm in the hardware
Rabin Vincent [Tue, 22 Nov 2011 10:03:14 +0000]
rtc: Disable the alarm in the hardware

commit c0afabd3d553c521e003779c127143ffde55a16f upstream.

Currently, the RTC code does not disable the alarm in the hardware.

This means that after a sequence such as the one below (the files are in the
RTC sysfs), the box will boot up after 2 minutes even though we've
asked for the alarm to be turned off.

# echo $((`cat since_epoch`)+120) > wakealarm
# echo 0 > wakealarm
# poweroff

Fix this by disabling the alarm when there are no timers to run.

Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agotrace_events_filter: Use rcu_assign_pointer() when setting ftrace_event_call->filter
Tejun Heo [Wed, 23 Nov 2011 16:49:49 +0000]
trace_events_filter: Use rcu_assign_pointer() when setting ftrace_event_call->filter

commit d3d9acf646679c1981032b0985b386d12fccc60c upstream.

ftrace_event_call->filter is sched RCU protected but didn't use
rcu_assign_pointer().  Use it.

TODO: Add proper __rcu annotation to call->filter and all its users.

-v2: Use RCU_INIT_POINTER() for %NULL clearing as suggested by Eric.

Link: http://lkml.kernel.org/r/20111123164949.GA29639@google.com

Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoftrace: Remove force undef config value left for testing
Steven Rostedt [Fri, 4 Nov 2011 14:45:23 +0000]
ftrace: Remove force undef config value left for testing

commit c7c6ec8becaf742b223c7b491f4893014be23a07 upstream.

A forced undef of a config value was used for testing and was
accidently left in during the final commit. This causes x86 to
run slower than needed while running function tracing as well
as causes the function graph selftest to fail when DYNMAIC_FTRACE
is not set. This is because the code in MCOUNT expects the ftrace
code to be processed with the config value set that happened to
be forced not set.

The forced config option was left in by:
    commit 6331c28c962561aee59e5a493b7556a4bb585957
    ftrace: Fix dynamic selftest failure on some archs

Link: http://lkml.kernel.org/r/20111102150255.GA6973@debian

Reported-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoiwlagn: fix HW crypto for TX-only keys
Johannes Berg [Fri, 2 Dec 2011 16:19:17 +0000]
iwlagn: fix HW crypto for TX-only keys

commit 274b89ca3b006926cb9b45d78ab5906f4c0fc0aa upstream.

Group keys in IBSS or AP mode are not programmed
into the device since we give the key to it with
every TX packet. However, we do need mac80211 to
create the MMIC & PN in all cases. Move the code
around to set the key flags all the time. We set
them even when the key is removed again but that
is obviously harmless.

Reported-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoiwlwifi: do not re-configure HT40 after associated
Wey-Yi Guy [Fri, 2 Dec 2011 16:19:18 +0000]
iwlwifi: do not re-configure HT40 after associated

commit 34a5b4b6af104cf18eb50748509528b9bdbc4036 upstream.

The ht40 setting should not change after association unless channel switch

This fix a problem we are seeing which cause uCode assert because driver
sending invalid information and make uCode confuse

Here is the firmware assert message:
kernel: iwlagn 0000:03:00.0: Microcode SW error detected.  Restarting 0x82000000.
kernel: iwlagn 0000:03:00.0: Loaded firmware version: 17.168.5.3 build 42301
kernel: iwlagn 0000:03:00.0: Start IWL Error Log Dump:
kernel: iwlagn 0000:03:00.0: Status: 0x000512E4, count: 6
kernel: iwlagn 0000:03:00.0: 0x00002078 | ADVANCED_SYSASSERT
kernel: iwlagn 0000:03:00.0: 0x00009514 | uPc
kernel: iwlagn 0000:03:00.0: 0x00009496 | branchlink1
kernel: iwlagn 0000:03:00.0: 0x00009496 | branchlink2
kernel: iwlagn 0000:03:00.0: 0x0000D1F2 | interruptlink1
kernel: iwlagn 0000:03:00.0: 0x00000000 | interruptlink2
kernel: iwlagn 0000:03:00.0: 0x01008035 | data1
kernel: iwlagn 0000:03:00.0: 0x0000C90F | data2
kernel: iwlagn 0000:03:00.0: 0x000005A7 | line
kernel: iwlagn 0000:03:00.0: 0x5080B520 | beacon time
kernel: iwlagn 0000:03:00.0: 0xCC515AE0 | tsf low
kernel: iwlagn 0000:03:00.0: 0x00000003 | tsf hi
kernel: iwlagn 0000:03:00.0: 0x00000000 | time gp1
kernel: iwlagn 0000:03:00.0: 0x29703BF0 | time gp2
kernel: iwlagn 0000:03:00.0: 0x00000000 | time gp3
kernel: iwlagn 0000:03:00.0: 0x000111A8 | uCode version
kernel: iwlagn 0000:03:00.0: 0x000000B0 | hw version
kernel: iwlagn 0000:03:00.0: 0x00480303 | board version
kernel: iwlagn 0000:03:00.0: 0x09E8004E | hcmd
kernel: iwlagn 0000:03:00.0: CSR values:
kernel: iwlagn 0000:03:00.0: (2nd byte of CSR_INT_COALESCING is CSR_INT_PERIODIC_REG)
kernel: iwlagn 0000:03:00.0:        CSR_HW_IF_CONFIG_REG: 0X00480303
kernel: iwlagn 0000:03:00.0:          CSR_INT_COALESCING: 0X0000ff40
kernel: iwlagn 0000:03:00.0:                     CSR_INT: 0X00000000
kernel: iwlagn 0000:03:00.0:                CSR_INT_MASK: 0X00000000
kernel: iwlagn 0000:03:00.0:           CSR_FH_INT_STATUS: 0X00000000
kernel: iwlagn 0000:03:00.0:                 CSR_GPIO_IN: 0X00000030
kernel: iwlagn 0000:03:00.0:                   CSR_RESET: 0X00000000
kernel: iwlagn 0000:03:00.0:                CSR_GP_CNTRL: 0X080403c5
kernel: iwlagn 0000:03:00.0:                  CSR_HW_REV: 0X000000b0
kernel: iwlagn 0000:03:00.0:              CSR_EEPROM_REG: 0X07d60ffd
kernel: iwlagn 0000:03:00.0:               CSR_EEPROM_GP: 0X90000001
kernel: iwlagn 0000:03:00.0:              CSR_OTP_GP_REG: 0X00030001
kernel: iwlagn 0000:03:00.0:                 CSR_GIO_REG: 0X00080044
kernel: iwlagn 0000:03:00.0:            CSR_GP_UCODE_REG: 0X000093bb
kernel: iwlagn 0000:03:00.0:           CSR_GP_DRIVER_REG: 0X00000000
kernel: iwlagn 0000:03:00.0:           CSR_UCODE_DRV_GP1: 0X00000000
kernel: iwlagn 0000:03:00.0:           CSR_UCODE_DRV_GP2: 0X00000000
kernel: iwlagn 0000:03:00.0:                 CSR_LED_REG: 0X00000078
kernel: iwlagn 0000:03:00.0:        CSR_DRAM_INT_TBL_REG: 0X88214dd2
kernel: iwlagn 0000:03:00.0:        CSR_GIO_CHICKEN_BITS: 0X27800200
kernel: iwlagn 0000:03:00.0:             CSR_ANA_PLL_CFG: 0X00000000
kernel: iwlagn 0000:03:00.0:           CSR_HW_REV_WA_REG: 0X0001001a
kernel: iwlagn 0000:03:00.0:        CSR_DBG_HPET_MEM_REG: 0Xffff0010
kernel: iwlagn 0000:03:00.0: FH register values:
kernel: iwlagn 0000:03:00.0:         FH_RSCSR_CHNL0_STTS_WPTR_REG: 0X21316d00
kernel: iwlagn 0000:03:00.0:        FH_RSCSR_CHNL0_RBDCB_BASE_REG: 0X021479c0
kernel: iwlagn 0000:03:00.0:                  FH_RSCSR_CHNL0_WPTR: 0X00000060
kernel: iwlagn 0000:03:00.0:         FH_MEM_RCSR_CHNL0_CONFIG_REG: 0X80819104
kernel: iwlagn 0000:03:00.0:          FH_MEM_RSSR_SHARED_CTRL_REG: 0X000000fc
kernel: iwlagn 0000:03:00.0:            FH_MEM_RSSR_RX_STATUS_REG: 0X07030000
kernel: iwlagn 0000:03:00.0:    FH_MEM_RSSR_RX_ENABLE_ERR_IRQ2DRV: 0X00000000
kernel: iwlagn 0000:03:00.0:                FH_TSSR_TX_STATUS_REG: 0X07ff0001
kernel: iwlagn 0000:03:00.0:                 FH_TSSR_TX_ERROR_REG: 0X00000000
kernel: iwlagn 0000:03:00.0: Start IWL Event Log Dump: display last 20 entries
kernel: ------------[ cut here ]------------
WARNING: at net/mac80211/util.c:1208 ieee80211_reconfig+0x1f1/0x407()
kernel: Hardware name: 4290W4H
kernel: Pid: 1896, comm: kworker/0:0 Not tainted 3.1.0 #2
kernel: Call Trace:
kernel:  [<ffffffff81036558>] ? warn_slowpath_common+0x73/0x87
kernel:  [<ffffffff813b8966>] ? ieee80211_reconfig+0x1f1/0x407
kernel:  [<ffffffff8139e8dc>] ? ieee80211_recalc_smps_work+0x32/0x32
kernel:  [<ffffffff8139e95a>] ? ieee80211_restart_work+0x7e/0x87
kernel:  [<ffffffff810472fa>] ? process_one_work+0x1c8/0x2e3
kernel:  [<ffffffff810480c9>] ? worker_thread+0x17a/0x23a
kernel:  [<ffffffff81047f4f>] ? manage_workers.clone.18+0x15b/0x15b
kernel:  [<ffffffff81047f4f>] ? manage_workers.clone.18+0x15b/0x15b
kernel:  [<ffffffff8104ba97>] ? kthread+0x7a/0x82
kernel:  [<ffffffff813d21b4>] ? kernel_thread_helper+0x4/0x10
kernel:  [<ffffffff8104ba1d>] ? kthread_flush_work_fn+0x11/0x11
kernel:  [<ffffffff813d21b0>] ? gs_change+0xb/0xb

Reported-by: Udo Steinberg <udo@hypervisor.org>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agoslab, lockdep: Fix silly bug
Peter Zijlstra [Mon, 28 Nov 2011 20:12:40 +0000]
slab, lockdep: Fix silly bug

commit 52cef189165d74a5d6030184a8e05595194c69ca upstream.

Commit 30765b92 ("slab, lockdep: Annotate the locks before using
them") moves the init_lock_keys() call from after g_cpucache_up =
FULL, to before it. And overlooks the fact that init_node_lock_keys()
tests for it and ignores everything !FULL.

Introduce a LATE stage and change the lockdep test to be <LATE.

Acked-by: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

7 years agogenirq: Fix race condition when stopping the irq thread
Ido Yariv [Thu, 1 Dec 2011 11:55:08 +0000]
genirq: Fix race condition when stopping the irq thread

commit 550acb19269d65f32e9ac4ddb26c2b2070e37f1c upstream.

In irq_wait_for_interrupt(), the should_stop member is verified before
setting the task's state to TASK_INTERRUPTIBLE and calling schedule().
In case kthread_stop sets should_stop and wakes up the process after
should_stop is checked by the irq thread but before the task's state
is changed, the irq thread might never exit:

kthread_stop                    irq_wait_for_interrupt
------------                    ----------------------

                                 ...
...                              while (!kthread_should_stop()) {
kthread->should_stop = 1;
wake_up_process(k);
wait_for_completion(&kthread->exited);
...
                                     set_current_state(TASK_INTERRUPTIBLE);

                                     ...

                                     schedule();
                                 }

Fix this by checking if the thread should stop after modifying the
task's state.

[ tglx: Simplified it a bit ]

Signed-off-by: Ido Yariv <ido@wizery.com>
Link: http://lkml.kernel.org/r/1322740508-22640-1-git-send-email-ido@wizery.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>