7 years agovirtio_balloon: fix handling of PAGE_SIZE != 4k
Michael S. Tsirkin [Thu, 12 Apr 2012 13:38:00 +0000]
virtio_balloon: fix handling of PAGE_SIZE != 4k

As reported by David Gibson, current code handles PAGE_SIZE != 4k
completely wrong which can lead to guest memory corruption errors:

- page_to_balloon_pfn is wrong: e.g. on system with 64K page size
 it gives the same pfn value for 16 different pages.

- we also need to convert back to linux pfns when we free.

- for each linux page we need to tell host about multiple balloon
  pages, but code only adds one pfn to the array.

This patch fixes all that, tested with a 64k ppc64 kernel.

Reported-by: David Gibson <david@gibson.dropbear.id.au>
Tested-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

7 years agovirtio_balloon: Fix endian bug
David Gibson [Thu, 12 Apr 2012 05:36:34 +0000]
virtio_balloon: Fix endian bug

Although virtio config space fields are usually in guest-native endian,
the spec for the virtio balloon device explicitly states that both fields
in its config space are little-endian.

However, the current virtio_balloon driver does not have a suitable endian
swap for the 'num_pages' field, although it does have one for the 'actual'
field.  This patch corrects the bug, adding sparse annotation while we're
at it.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

7 years agovirtio_blk: helper function to format disk names
Ren Mingxin [Tue, 10 Apr 2012 07:28:05 +0000]
virtio_blk: helper function to format disk names

The current virtio block's naming algorithm just supports 18278
(26^3 + 26^2 + 26) disks. If there are more virtio blocks,
there will be disks with the same name.

Based on commit 3e1a7ff8a0a7b948f2684930166954f9e8e776fe, add
a function "virtblk_name_format()" for virtio block to support mass
of disks naming.

Notes:
- Our naming scheme is ugly. We are stuck with it
  for virtio but don't use it for any new driver:
  new drivers should name their devices PREFIX%d
  where the sequence number can be allocated by ida
- sd_format_disk_name has exactly the same logic.
  Moving it to a central place was deferred over worries
  that this will make people keep using the legacy naming
  in new drivers.
  We kept code idential in case someone wants to deduplicate later.

Signed-off-by: Ren Mingxin <renmx@cn.fujitsu.com>
Acked-by: Asias He <asias@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

7 years agotools/virtio: fix up vhost/test module build
Zhi Yong Wu [Mon, 9 Apr 2012 07:42:13 +0000]
tools/virtio: fix up vhost/test module build

commit ea5d404655ba3b356d0c06d6a3c4f24112124522
broke build for the vhost test module used
by tools/virtio. Fix it up.

Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

7 years agoPCI: Retry BARs restoration for Type 0 headers only
Rafael J. Wysocki [Mon, 16 Apr 2012 21:07:50 +0000]
PCI: Retry BARs restoration for Type 0 headers only

Some shortcomings introduced into pci_restore_state() by commit
26f41062f28d ("PCI: check for pci bar restore completion and retry")
have been fixed by recent commit ebfc5b802fa76 ("PCI: Fix regression in
pci_restore_state(), v3"), but that commit treats all PCI devices as
those with Type 0 configuration headers.

That is not entirely correct, because Type 1 and Type 2 headers have
different layouts.  In particular, the area occupied by BARs in Type 0
config headers contains the secondary status register in Type 1 ones and
it doesn't make sense to retry the restoration of that register even if
the value read back from it after a write is not the same as the written
one (it very well may be different).

For this reason, make pci_restore_state() only retry the restoration
of BARs for Type 0 config headers.  This effectively makes it behave
as before commit 26f41062f28d for all header types except for Type 0.

Tested-by: Mikko Vinni <mmvinni@yahoo.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

7 years agoDocumentation: maintainer change
Randy Dunlap [Tue, 17 Apr 2012 02:21:39 +0000]
Documentation: maintainer change

I'm dropping off as Documentation/ maintainer.
Rob Landley has agreed to take it over.  Thanks, Rob.

I'll still be around reviewing patches and testing.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Rob Landley <rob@landley.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

7 years agoia64: fix futex_atomic_cmpxchg_inatomic()
Luck, Tony [Mon, 16 Apr 2012 23:28:01 +0000]
ia64: fix futex_atomic_cmpxchg_inatomic()

Michel Lespinasse cleaned up the futex calling conventions in commit
37a9d912b24f ("futex: Sanitize cmpxchg_futex_value_locked API").

But the ia64 implementation was subtly broken.  Gcc does not know that
register "r8" will be updated by the fault handler if the cmpxchg
instruction takes an exception.  So it feels safe in letting the
initialization of r8 slide to after the cmpxchg.  Result: we always
return 0 whether the user address faulted or not.

Fix by moving the initialization of r8 into the __asm__ code so gcc
won't move it.

Reported-by: <emeric.maschino@gmail.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42757
Tested-by: <emeric.maschino@gmail.com>
Acked-by: Michel Lespinasse <walken@google.com>
Cc: stable@vger.kernel.org # v2.6.39+
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

7 years agocheckpatch: revert --strict test for net/ and drivers/net block comment style
Joe Perches [Mon, 16 Apr 2012 19:35:11 +0000]
checkpatch: revert --strict test for net/ and drivers/net block comment style

Revert the --strict test for the old preferred block
comment style in drivers/net and net/

Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

7 years agogpio: tegra: fix duplicate code
Mayuresh Kulkarni [Tue, 24 Apr 2012 09:24:04 +0000]
gpio: tegra: fix duplicate code

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

7 years agoarm: tegra: harmony: guard pcie init by CONFIG_TEGRA_PCI
Mayuresh Kulkarni [Mon, 23 Apr 2012 12:50:42 +0000]
arm: tegra: harmony: guard pcie init by CONFIG_TEGRA_PCI

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

7 years agocpuidle: governor: menu: Initialize power usage to max
Prashant Gaikwad [Mon, 23 Apr 2012 12:41:58 +0000]
cpuidle: governor: menu: Initialize power usage to max

power_usage variable data type changed from unsigned int
to int. -1 for unsigned int is max whereas for int it is
less than 0. s->power_usage < power_usage always fails since
power usage specified for Tegra CPU states is greater
or equal to 0.

Bug 971668

Change-Id: If2197f1c973e5774c3c46e2c1ac6ec83051d4e19
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/98204
Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoarm: tegra: pm: Update cpuidle lp3 state function
Prashant Gaikwad [Mon, 23 Apr 2012 09:16:35 +0000]
arm: tegra: pm: Update cpuidle lp3 state function

Bug 971668

Change-Id: I83c3705c3f7425787db4388462dcd2574c177c7f
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/98165
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoARM: tegra: cardhu: set open drain type to be false for normal pin
Laxman Dewangan [Fri, 20 Apr 2012 15:20:16 +0000]
ARM: tegra: cardhu: set open drain type to be false for normal pin

When registering fixed regulator for gpio, setting the open drain
state to false for normal pin i.e. non-open drain pin.

This was side effect of the changes done for porting gpio
regulator to fixed regulator.

bug 970262

Change-Id: I1977e48b3461f8eb2aacadc28e4b53165ac4e1ec
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/97946
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

7 years agotegra: usb: otg: Clear only interrupt enabling bits in suspend
Joshua Cha [Mon, 23 Apr 2012 09:15:59 +0000]
tegra: usb: otg: Clear only interrupt enabling bits in suspend

In resuming from LP1, USB HOST is wrongly detected in Tegra2.
In that time, adb connection doesn't work also.
So clear only interrupt enabling bits to fix this problem.

Bug 960254
Bug 970012

Change-Id: I2f8e891ab2abcf8552526ff305d6f3a148076edd
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: http://git-master/r/96769
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

Conflicts:

drivers/usb/otg/tegra-otg.c

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

7 years agoARM: tegra: dma: Use no DMA interrupts if no callbacks
Chaitanya Bandi [Mon, 16 Apr 2012 11:42:02 +0000]
ARM: tegra: dma: Use no DMA interrupts if no callbacks

If there are no callbacks associated with the request,
dma interrupt is not enabled.

Bug 969125

Change-Id: Ifbf2a8d6c474187927ee38af03cb96e53e199b83
Signed-off-by: Chaitanya Bandi <bandik@nvidia.com>
Reviewed-on: http://git-master/r/96724
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

7 years agovideo: tegra: dc: update windows after set lut
Adam Cheney [Wed, 21 Mar 2012 01:07:12 +0000]
video: tegra: dc: update windows after set lut

TEGRA_DC_EXT_SET_LUT programmed the proper shadow registers
but did not copy the shadow registers to the active set.

Signed-off-by: Adam Cheney <acheney@nvidia.com>

bug 947281

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

7 years agoarm: tegra: enterprise: Correct sdmmc4 tap delay
Pavan Kunapuli [Thu, 19 Apr 2012 15:01:25 +0000]
arm: tegra: enterprise: Correct sdmmc4 tap delay

For SDMMC4 GMI interface, tap delay value of 0xF
is recommended by HW team.

Bug 911075

Change-Id: I2cdf90f34341cb8062dbded52ff1739c0c84cb0d
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-on: http://git-master/r/97668
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User

7 years agousb: otg: tegra: callback for otg plug/un-plug notificaton
Syed Rafiuddin [Thu, 19 Apr 2012 04:56:41 +0000]
usb: otg: tegra: callback for otg plug/un-plug notificaton

Addition of callback function to nofity the plug and
un-plug of OTG cable to charger driver.

Change-Id: I6b16d051cafe0799cffe8a05d1510da27e841f8b
Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-on: http://git-master/r/97514
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Chandler Zhang <chazhang@nvidia.com>
Tested-by: Chandler Zhang <chazhang@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agommc: tegra: Disable card and host clk separately
Pavan Kunapuli [Mon, 9 Apr 2012 14:01:50 +0000]
mmc: tegra: Disable card and host clk separately

Disable card clock before disabling internal clock to
ensure that there are no abnormal clock waveforms.

Bug 947058

Change-Id: I98a3f7f63b4380b62bead05f1018d3cddc0ac217
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-on: http://git-master/r/95396
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agommc: host: Disable SDIO card clock when idle
Pavan Kunapuli [Wed, 18 Apr 2012 13:32:38 +0000]
mmc: host: Disable SDIO card clock when idle

Disable SDIO card clock when there are no commands/
data transfers on the SD bus.

Bug 958954
Bug 955742
Bug 952344

Change-Id: I7390be0406f7e46c0eb88ede2ae6f904b2181306
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-on: http://git-master/r/95390
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agousb: ehci: tegra: Fence read in unmap urb
Krishna Yarlagadda [Wed, 11 Apr 2012 18:25:07 +0000]
usb: ehci: tegra: Fence read in unmap urb

There is a chance that we might read an TD request which
has just arrived after fence read in a interrupt handler.
Added fence read in unmap urb to avoid this issue.

Bug 964879

Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/95916
(cherry picked from commit 8d8415820014710052eef088ed2d579d0531cd52)

Change-Id: Ia682654a25c685cf3dd2e76c8b9ea30427a06d89
Reviewed-on: http://git-master/r/97507
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agoarm: tegra3: change min_rate for clocks
Amit Kamath [Mon, 23 Apr 2012 09:13:51 +0000]
arm: tegra3: change min_rate for clocks

Set minimum sclk,pclk and hclk rate same at 12Mhz for power optimization
bug 939415

Change-Id: I579eeca780357b02f65333ffea58301040943506
Signed-off-by: Amit Kamath <akamath@nvidia.com>
Reviewed-on: http://git-master/r/96922
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

Conflicts:

arch/arm/mach-tegra/tegra3_clocks.c

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

7 years agodrivers: resolve compilation time warnings
Sanjay Singh Rawat [Mon, 23 Apr 2012 07:49:44 +0000]
drivers: resolve compilation time warnings

bug 949219

Change-Id: I5942ba86bd1cbe1f1bd06a7c9f51a10d83e6cabb
Signed-off-by: Sanjay Singh Rawat <srawat@nvidia.com>
Reviewed-on: http://git-master/r/92819
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

Conflicts:

drivers/usb/host/ehci.h

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

7 years agoARM: tegra: remove T30 FPGA support
Juha Tukkinen [Mon, 23 Apr 2012 07:47:16 +0000]
ARM: tegra: remove T30 FPGA support

Remove T30 FPGA support as it will conflict with downstreaming mainline
way of using chipid and revision.

Change-Id: Ic1fd1107801de13c265c7dde8571e0537c43f4fd
Signed-off-by: Juha Tukkinen <jtukkinen@nvidia.com>
Reviewed-on: http://git-master/r/95872
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

Conflicts:

arch/arm/mach-tegra/tegra3_clocks.c

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

7 years agoASoC: resolve compilation time warnings
Sanjay Singh Rawat [Mon, 23 Apr 2012 07:40:16 +0000]
ASoC: resolve compilation time warnings

bug 949219

Change-Id: I52969e8dd1a5ed4dc76ac360ec08b0afb18cd4a5
Signed-off-by: Sanjay Singh Rawat <srawat@nvidia.com>
Reviewed-on: http://git-master/r/92833
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

Conflicts:

sound/soc/tegra/tegra_max98088.c

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

7 years agoarm: tegra: resolve compilation time warnings
Sanjay Singh Rawat [Mon, 23 Apr 2012 07:39:01 +0000]
arm: tegra: resolve compilation time warnings

Bug 949219

Change-Id: I875f8688a272c415ebf345b8f30e4afdf7551b29
Signed-off-by: Sanjay Singh Rawat <srawat@nvidia.com>
Reviewed-on: http://git-master/r/91523
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

Conflicts:

arch/arm/mach-tegra/common.c
arch/arm/mach-tegra/usb_phy.c

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

7 years agoARM: tegra: cardhu: pm299: enable 3v3 rail during boot
Laxman Dewangan [Mon, 16 Apr 2012 08:38:46 +0000]
ARM: tegra: cardhu: pm299: enable 3v3 rail during boot

Enabling the 3v3 voltage rail during boot.
bug 822562

Change-Id: I15318b0c30bae716f40985cbee06cd9eaff54ee3
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/96685
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

7 years agoi2c: tegra: support for I2C_M_NOSTART protocol mangling
Laxman Dewangan [Tue, 27 Mar 2012 13:27:11 +0000]
i2c: tegra: support for I2C_M_NOSTART protocol mangling

Adding support for protocol mangling I2C_M_NOSTART.

Change-Id: I6cc0c96b3c374d452ea886a0f983dc5d31c4575c
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/92573
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agoARM: tegra: usb: kai: pmu int not required
Krishna Yarlagadda [Fri, 13 Apr 2012 04:18:54 +0000]
ARM: tegra: usb: kai: pmu int not required

vbus int can be generated from pmu and directly from port
when host mode is reqruied, we use vbus int and pmu int
is not required as usb clock is not disabled.

Bug 961166

Change-Id: I96fde7daf052a7c5b8e94414e309b0be6354ec80
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/96338
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Chandler Zhang <chazhang@nvidia.com>
Tested-by: Chandler Zhang <chazhang@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

7 years agoarm: tegra: kai: addition of charger regulator
Chandler Zhang [Fri, 13 Apr 2012 07:57:51 +0000]
arm: tegra: kai: addition of charger regulator

Use SMB349 regulator instead of irq to controll USB1 VBUS

Bug 961166
Bug 966874

Change-Id: I68884444883277ef169f3eb066ea50d6d49b708d
Signed-off-by: Chandler Zhang <chazhang@nvidia.com>
Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-on: http://git-master/r/96441
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

7 years agopower: smb349: addition of regulator interface
Syed Rafiuddin [Fri, 13 Apr 2012 10:09:05 +0000]
power: smb349: addition of regulator interface

Addition of reglator interface to detect the usb cable
plug/unplug detection.

Bug 961166
Bug 966874

Change-Id: Ida297bc39df9aca8cffe60c29bc24f2d32819f56
Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Signed-off-by: Chandler Zhang <chazhang@nvidia.com>
Reviewed-on: http://git-master/r/96440
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

7 years agomfd: max8907c: Disable Hard Reset with Power key
Ashwini Ghuge [Tue, 17 Apr 2012 11:58:06 +0000]
mfd: max8907c: Disable Hard Reset with Power key

Disable Hard Reset on long press of power key.

Bug 893517

Change-Id: Ic328a04e917aa1bed6780e6f9a2f1c575f84fb68
Signed-off-by: Ashwini Ghuge <aghuge@nvidia.com>
Reviewed-on: http://git-master/r/96687
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agousb: gadget: fsl_udc: support udc driver without otg
Rakesh Bodla [Wed, 18 Apr 2012 04:16:16 +0000]
usb: gadget: fsl_udc: support udc driver without otg

Currently udc driver is dependent on otg driver.
Added irq work to make gadget driver work with
disabling otg driver.

Bug 962366

Change-Id: Id782d8003da12ace553b8b812fa410567c281b34
Reviewed-on: http://git-master/r/95106
Reviewed-by: Rakesh Bodla <rbodla@nvidia.com>
Tested-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

7 years agoarm: tegra: enterprise: disable dsi_csi_rail in LP0
Vinayak Pane [Sat, 14 Apr 2012 00:13:15 +0000]
arm: tegra: enterprise: disable dsi_csi_rail in LP0

AVDD_DSI_CSI is shared by modem and dsi. If DSI turns
off this rail then HSIC fails after wakeup from modem.
This patch provides a way to turn on this rail from
modem as well as from DSI. Create two virtual power rails
from avdd_csi_dsi to control it from both the drivers separately.
This is enterprise specific change as per the power rail layout.

Bug 920881

(cherry picked from commit ab52b51c59f776ae770d48a28a2744e2db2e5d2f)
Reviewed-on: http://git-master/r/85656

Change-Id: I2e9c04a8f4e8d6fd20584b4e75657c1cb6d5c8bd
Signed-off-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-on: http://git-master/r/89134
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Puneet Saxena <puneets@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agoARM: tegra: dma: Add API to get channel id
Chaitanya Bandi [Mon, 16 Apr 2012 10:38:35 +0000]
ARM: tegra: dma: Add API to get channel id

Added tegra_dma_get_channel_id API to determine the id
of a given channel.

Bug 969125

Change-Id: Ibad67d65c87dc267a4e6942557c02acbd0f6e938
Signed-off-by: Chaitanya Bandi <bandik@nvidia.com>
Reviewed-on: http://git-master/r/96714
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Sumit Bhattacharya <sumitb@nvidia.com>

7 years agoARM: tegra: cardhu:enable VDD2 when required
Laxman Dewangan [Fri, 13 Apr 2012 11:17:44 +0000]
ARM: tegra: cardhu:enable VDD2 when required

The VDD2 supply the power to three rails: 1.5V, LDO1 and LDO2.
LDO1 is used for PEX and LDO2 is used for SATA.
By default making the VDD2 off and enabling when
consumer requires.

Change-Id: I283f62277246214966e7635bc31b6eb066f9282b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/96451
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

7 years agotegra: fix typo in pre-power wifi code
Mursalin Akon [Mon, 16 Apr 2012 19:17:35 +0000]
tegra: fix typo in pre-power wifi code

fix typo in pre-power wifi code

Bug 956238

Change-Id: Iee794da508d39131e3166bba71b1c46c60d19a3b
Signed-off-by: Mursalin Akon <makon@nvidia.com>
Reviewed-on: http://git-master/r/96821
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Allen Martin <amartin@nvidia.com>

7 years agogpio: tegra: add valid configuration for Tegra30
Varun Wadekar [Sat, 21 Apr 2012 10:10:35 +0000]
gpio: tegra: add valid configuration for Tegra30

In case the "compatible" property is not populated, which can happen
when we load devices from board files, use a valid config struct for
Tegra30 instead of re-using the one written for Tegra20.

Bug 971673

Change-Id: I863e4eec8a860995b72f0a7ceeab25213dfa9bc7
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/98127
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Tested-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Tested-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>

7 years agogpio: tegra: fix bad merge
Varun Wadekar [Sat, 21 Apr 2012 10:08:35 +0000]
gpio: tegra: fix bad merge

fix 5c1e2c9dc684f26fcc78ff4ef15dc97ed0244303 so that we use the new
variables: tegra_gpio_upper_offset and tegra_gpio_bank_stride instead
of the previous hard-coded values.

Bug 971673

Change-Id: Ib085e63050e24a91f4d9d8321c3116d421efc46c
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/98126
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Tested-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Tested-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>

7 years agoInput: Use monotonic time for event time stamps.
Arve Hjønnevåg [Fri, 17 Oct 2008 22:28:08 +0000]
Input: Use monotonic time for event time stamps.

Since wall time can jump backwards, it cannot be used to determine if one
event occured before another or for how long a key was pressed.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: Id9e75ad5ef0e56ec6bc8b1f1594a71412317f93c
Reviewed-on: http://git-master/r/97840
Tested-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Tested-by: Prashant Gaikwad <pgaikwad@nvidia.com>

7 years agoRevert "Input: add infrastructure for selecting clockid for event time stamps"
Varun Wadekar [Fri, 20 Apr 2012 06:53:01 +0000]
Revert "Input: add infrastructure for selecting clockid for event time stamps"

This reverts commit a80b83b7b8456e9b475346c2e01d7e210883208c.

Conflicts:

include/linux/input.h

Change-Id: I66eaf70a5ca9d3c3b96c4e58a460abbab02916e9
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/97839
Tested-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Tested-by: Prashant Gaikwad <pgaikwad@nvidia.com>

7 years agommc: host: tegra: add suspend/resume handlers
Varun Wadekar [Thu, 19 Apr 2012 13:26:05 +0000]
mmc: host: tegra: add suspend/resume handlers

Previously we were using platform_{suspend|resume} handlers
instead, which did not allow the sdhci-tegra driver to
suspend/resume at the right time.

While we are at it, do some formatting changes too.

Change-Id: I6934859f10d5e51ab13b7dfb6bd6e155636e7ad7
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/97655
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com>

7 years agommc: host: sdhci-pltfm: Add suspend and resume hooks to sdhci platform
Varun Wadekar [Thu, 19 Apr 2012 13:16:40 +0000]
mmc: host: sdhci-pltfm: Add suspend and resume hooks to sdhci platform

Change-Id: I062fbe91d8af14366a92af1a27e9dab49869905c
Signed-off-by: Colin Cross <ccross@android.com>

Rebase-Id: R3eb206857e57a61e445a1dd6b7efdc63ab1e0dd5

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

7 years agoASoC: Tegra: update machine drivers
Ravindra Lokhande [Thu, 19 Apr 2012 15:21:10 +0000]
ASoC: Tegra: update machine drivers

For new kernel snd_soc_add_controls function is replaced with
snd_soc_add_card_controls. Also prototype is changed for set_bias_level
function. Updated tegra machine driver with these changes.

Change-Id: I01fa06bf03c5608acdc110d570aa01dde5ce1f52
Signed-off-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-on: http://git-master/r/97674
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Tested-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoarm: tegra: kai: Remove pinmux and gpio registration
Prashant Gaikwad [Thu, 19 Apr 2012 05:53:50 +0000]
arm: tegra: kai: Remove pinmux and gpio registration

Already done in tegra_kai_init.

Change-Id: Ibd534be1e8727374fb40f1e60d5eaf34adf4096c
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/97528
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agosecurity: Add config flag for Android specific caps
Preetham Chandru [Wed, 18 Apr 2012 13:57:16 +0000]
security: Add config flag for Android specific caps

Add CONFIG_ANDROID_PARANOID_NETWORK for Android specific capabilities

Change-Id: Ic9a44e4f754445fbf59a52e5aa75a2d8e3d0930f
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
Reviewed-on: http://git-master/r/97519
Reviewed-by: Sanjay Singh Rawat <srawat@nvidia.com>
Reviewed-by: Kiran Adduri <kadduri@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoRevert "EHCI: keep track of ports being resumed and indicate in hub_status_data"
Varun Wadekar [Thu, 19 Apr 2012 06:20:02 +0000]
Revert "EHCI: keep track of ports being resumed and indicate in hub_status_data"

This reverts commit fb8784626891796895d6ca081ae8cccce8e1fd2d since it
hangs the bootup process on Ventana.

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

7 years agosoc: tegra30: i2s: fix compilation errors with 3.4-rc3
Varun Wadekar [Wed, 18 Apr 2012 15:15:21 +0000]
soc: tegra30: i2s: fix compilation errors with 3.4-rc3

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

7 years agoLinux 3.4-rc3
Linus Torvalds [Mon, 16 Apr 2012 01:28:29 +0000]
Linux 3.4-rc3

7 years agoARM: 7386/1: jump_label: fixup for rename to static_key
Rabin Vincent [Sat, 14 Apr 2012 20:51:32 +0000]
ARM: 7386/1: jump_label: fixup for rename to static_key

c5905afb0 ("static keys: Introduce 'struct static_key'...") renamed
struct jump_label_key to struct static_key.  Fixup ARM for this to
eliminate these build warnings:

  include/linux/jump_label.h:113:2:
  warning: passing argument 1 of 'arch_static_branch' from incompatible pointer type
  include/asm/jump_label.h:17:82:
  note: expected 'struct jump_label_key *' but argument is of type 'struct static_key *'

Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

7 years agoARM: 7384/1: ThumbEE: Disable userspace TEEHBR access for !CONFIG_ARM_THUMBEE
Jonathan Austin [Thu, 12 Apr 2012 16:45:25 +0000]
ARM: 7384/1: ThumbEE: Disable userspace TEEHBR access for !CONFIG_ARM_THUMBEE

Currently when ThumbEE is not enabled (!CONFIG_ARM_THUMBEE) the ThumbEE
register states are not saved/restored at context switch. The default state
of the ThumbEE Ctrl register (TEECR) allows userspace accesses to the
ThumbEE Base Handler register (TEEHBR). This can cause unexpected behaviour
when people use ThumbEE on !CONFIG_ARM_THUMBEE kernels, as well as allowing
covert communication - eg between userspace tasks running inside chroot
jails.

This patch sets up TEECR in order to prevent user-space access to TEEHBR
when !CONFIG_ARM_THUMBEE. In this case, tasks are sent SIGILL if they try to
access TEEHBR.

Cc: stable@vger.kernel.org
Reviewed-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

7 years agoARM: 7382/1: mm: truncate memory banks to fit in 4GB space for classic MMU
Will Deacon [Thu, 12 Apr 2012 16:15:08 +0000]
ARM: 7382/1: mm: truncate memory banks to fit in 4GB space for classic MMU

If a bank of memory spanning the 4GB boundary is added on a !CONFIG_LPAE
kernel then we will hang early during boot since the memory bank will
have wrapped around to zero.

This patch truncates memory banks for !LPAE configurations when the end
address is not representable in 32 bits.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

7 years agoARM: 7359/2: smp_twd: Only wait for reprogramming on active cpus
Linus Walleij [Tue, 10 Apr 2012 11:37:42 +0000]
ARM: 7359/2: smp_twd: Only wait for reprogramming on active cpus

During booting of cpu1, there is a short window where cpu1
is online, but not active where cpu1 is occupied by waiting
to become active. If cpu0 then decides to schedule something
on cpu1 and wait for it to complete, before cpu0 has set
cpu1 active, we have a deadlock.

Typically it's this CPU frequency transition that happens at
this time, so let's just not wait for it to happen, it will
happen whenever the CPU eventually comes online instead.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@kernel.org
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-by: Rickard Andersson <rickard.andersson@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

7 years agoARM: 7383/1: nommu: populate vectors page from paging_init
Will Deacon [Thu, 12 Apr 2012 16:16:01 +0000]
ARM: 7383/1: nommu: populate vectors page from paging_init

Commit 94e5a85b ("ARM: earlier initialization of vectors page") made it
the responsibility of paging_init to initialise the vectors page.

This patch adds a call to early_trap_init for the !CONFIG_MMU case,
placing the vectors at CONFIG_VECTORS_BASE.

Cc: Jonathan Austin <jonathan.austin@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

7 years agoARM: 7381/1: nommu: fix typo in mm/Kconfig
Will Deacon [Thu, 12 Apr 2012 16:12:37 +0000]
ARM: 7381/1: nommu: fix typo in mm/Kconfig

The description for the CPU_HIGH_VECTOR Kconfig option for nommu builds
doesn't make any sense.

This patch fixes up the trivial grammatical error.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

7 years agoARM: 7380/1: DT: do not add a zero-sized memory property
Marc Zyngier [Wed, 11 Apr 2012 13:52:56 +0000]
ARM: 7380/1: DT: do not add a zero-sized memory property

Some bootloaders are broken enough to expose an ATAG_MEM with
a null size. Converting such tag to a memory node leads to
an unbootable system.

Skip over zero sized ATAG_MEM to avoid this situation.

Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

7 years agoARM: 7379/1: DT: fix atags_to_fdt() second call site
Marc Zyngier [Wed, 11 Apr 2012 13:52:55 +0000]
ARM: 7379/1: DT: fix atags_to_fdt() second call site

atags_to_fdt() returns 1 when it fails to find a valid FDT signature.
The CONFIG_ARM_ATAG_DTB_COMPAT code is supposed to retry with another
location, but only does so when the initial call doesn't fail.

Fix this by using the correct condition in the assembly code.

Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

7 years agoARM: 7366/3: amba: Remove AMBA level regulator support
Mark Brown [Fri, 13 Apr 2012 12:11:50 +0000]
ARM: 7366/3: amba: Remove AMBA level regulator support

The AMBA bus regulator support is being used to model on/off switches
for power domains which isn't terribly idiomatic for modern kernels with
the generic power domain code and creates integration problems on platforms
which don't use regulators for their power domains as it's hard to tell
the difference between a regulator that is needed but failed to be provided
and one that isn't supposed to be there (though DT does make that easier).

Platforms that wish to use the regulator API to manage their power domains
can indirect via the power domain interface.

This feature is only used with the vape supply of the db8500 PRCMU
driver which supplies the UARTs and MMC controllers, none of which have
support for managing vcore at runtime in mainline (only pl022 SPI
controller does).  Update that supply to have an always_on constraint
until the power domain support for the system is updated so that it is
enabled for these users, this is likely to have no impact on practical
systems as probably at least one of these devices will be active and
cause AMBA to hold the supply on anyway.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

7 years agoARM: 7377/1: vic: re-read status register before dispatching each IRQ handler
Will Deacon [Thu, 5 Apr 2012 18:42:10 +0000]
ARM: 7377/1: vic: re-read status register before dispatching each IRQ handler

handle_IRQ may briefly cause interrupts to be re-enabled during soft IRQ
processing on the exit path, leading to nested handling of VIC interrupts.

Since the current code does not re-read the VIC_IRQ_STATUS register, this
can lead to multiple invocations of the same interrupt handler and
spurious interrupts to be reported.

This patch changes the VIC interrupt dispatching code to re-read the
status register each time, avoiding duplicate invocations of the same
handler.

Acked-and-Tested-by: H Hartley Sweeten <hsweeten@visionengravers.com>

Reviewed-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

7 years agoARM: 7368/1: fault.c: correct how the tsk->[maj|min]_flt gets incremented
Kautuk Consul [Mon, 2 Apr 2012 17:19:49 +0000]
ARM: 7368/1: fault.c: correct how the tsk->[maj|min]_flt gets incremented

commit 8878a539ff19a43cf3729e7562cd528f490246ae was done by me
to make the page fault handler retryable as well as interruptible.

Due to this commit, there is a mistake in the way in which
tsk->[maj|min]_flt counter gets incremented for VM_FAULT_ERROR:
If VM_FAULT_ERROR is returned in the fault flags by handle_mm_fault,
then either maj_flt or min_flt will get incremented. This is wrong
as in the case of a VM_FAULT_ERROR we need to be skip ahead to the
error handling code in do_page_fault.

Added a check after the call to __do_page_fault() to check for
(fault & VM_FAULT_ERROR).

Signed-off-by: Kautuk Consul <consul.kautuk@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

7 years agox86-32: fix up strncpy_from_user() sign error
Linus Torvalds [Mon, 16 Apr 2012 00:23:00 +0000]
x86-32: fix up strncpy_from_user() sign error

The 'max' range needs to be unsigned, since the size of the user address
space is bigger than 2GB.

We know that 'count' is positive in 'long' (that is checked in the
caller), so we will truncate 'max' down to something that fits in a
signed long, but before we actually do that, that comparison needs to be
done in unsigned.

Bug introduced in commit 92ae03f2ef99 ("x86: merge 32/64-bit versions of
'strncpy_from_user()' and speed it up").  On x86-64 you can't trigger
this, since the user address space is much smaller than 63 bits, and on
x86-32 it works in practice, since you would seldom hit the strncpy
limits anyway.

I had actually tested the corner-cases, I had only tested them on
x86-64.  Besides, I had only worried about the case of a pointer *close*
to the end of the address space, rather than really far away from it ;)

This also changes the "we hit the user-specified maximum" to return
'res', for the trivial reason that gcc seems to generate better code
that way.  'res' and 'count' are the same in that case, so it really
doesn't matter which one we return.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

7 years agoPCI: Fix regression in pci_restore_state(), v3
Rafael J. Wysocki [Sun, 15 Apr 2012 19:40:40 +0000]
PCI: Fix regression in pci_restore_state(), v3

Commit 26f41062f28d ("PCI: check for pci bar restore completion and
retry") attempted to address problems with PCI BAR restoration on
systems where FLR had not been completed before pci_restore_state() was
called, but it did that in an utterly wrong way.

First off, instead of retrying the writes for the BAR registers only, it
did that for all of the PCI config space of the device, including the
status register (whose value after the write quite obviously need not be
the same as the written one).  Second, it added arbitrary delay to
pci_restore_state() even for systems where the PCI config space
restoration was successful at first attempt.  Finally, the mdelay(10) it
added to every iteration of the writing loop was way too much of a delay
for any reasonable device.

All of this actually caused resume failures for some devices on Mikko's
system.

To fix the regression, make pci_restore_state() only retry the writes
for BAR registers and only wait if the first read from the register
doesn't return the written value.  Additionaly, make it wait for 1 ms,
instead of 10 ms, after every failing attempt to write into config
space.

Reported-by: Mikko Vinni <mmvinni@yahoo.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

7 years agoARM: EXYNOS: Fix Kconfig dependencies for device tree enabled machine files
Sachin Kamat [Sat, 14 Apr 2012 14:53:51 +0000]
ARM: EXYNOS: Fix Kconfig dependencies for device tree enabled machine files

Add config dependency for Exynos4 and Exynos5 device tree enabled machine
files on config options ARCH_EXYNOS4 and ARCH_EXYNOS5 respectively.
Enabling machine support without proper ARCH support enabled is incorrect.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

7 years agoARM: EXYNOS: Remove broken config values for touchscren for NURI board
Marek Szyprowski [Tue, 10 Apr 2012 04:10:32 +0000]
ARM: EXYNOS: Remove broken config values for touchscren for NURI board

The atmel_mxt_ts driver has been extended to support more 'configuration
objects' in commit 81c88a711 ("Input: atmel_mxt_ts - update object list"),
what broke the configuration values for NURI board. These values are
optional anyway, so remove them to get the driver working correctly.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

7 years agoARM: EXYNOS: set fix xusbxti clock for NURI and Universal210 boards
Marek Szyprowski [Tue, 10 Apr 2012 04:10:32 +0000]
ARM: EXYNOS: set fix xusbxti clock for NURI and Universal210 boards

On some versions of NURI and UniversalC210 boards, camera clocks are
routed directly to xusbxti clock source. This patch sets the correct
value for this clock to let usb and camera sensors to work correctly and
avoid division by zero on driver's probe.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

7 years agoARM: EXYNOS: fix regulator name for NURI board
Marek Szyprowski [Tue, 10 Apr 2012 04:10:32 +0000]
ARM: EXYNOS: fix regulator name for NURI board

Regulator names should not contain slash to avoid issues with debugfs.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

7 years agoARM: SAMSUNG: make SAMSUNG_PM_DEBUG select DEBUG_LL
Maurus Cuelenaere [Sat, 14 Apr 2012 14:42:04 +0000]
ARM: SAMSUNG: make SAMSUNG_PM_DEBUG select DEBUG_LL

When selecting SAMSUNG_PM_DEBUG, it complains about a missing printascii()
function if you do not select DEBUG_LL, so make the former select the latter.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

7 years agoARM: EXYNOS: Add PDMA and MDMA physical base address defines
Thomas Abraham [Tue, 10 Apr 2012 15:37:59 +0000]
ARM: EXYNOS: Add PDMA and MDMA physical base address defines

Add PDMA and MDMA physical base address macros which is
require for EXYNOS5 of_dev_auxdata setup.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
[kgene.kim@samsung.com: changed dma channel fo mdma1]
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

7 years agoARM: S5PV210: Fix compiler warning in dma.c file
Sachin Kamat [Tue, 10 Apr 2012 15:31:48 +0000]
ARM: S5PV210: Fix compiler warning in dma.c file

Fixes the following warning:

warning: 'dma_dmamask' defined but not used [-Wunused-variable]

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

7 years agoARM: EXYNOS: Fix compile error in exynos5250-cpufreq.c
Jonghwan Choi [Fri, 6 Apr 2012 05:31:31 +0000]
ARM: EXYNOS: Fix compile error in exynos5250-cpufreq.c

This patch is omitted in v2 patch of Jaecheol Lee.

drivers/cpufreq/exynos5250-cpufreq.c: In function 'set_clkdiv':
drivers/cpufreq/exynos5250-cpufreq.c:144: error: 'EXYNOS5_CLKDIV_STATCPU0' undeclared (first use in this function)
drivers/cpufreq/exynos5250-cpufreq.c:144: error: (Each undeclared identifier is reported only once
drivers/cpufreq/exynos5250-cpufreq.c:144: error: for each function it appears in.)
drivers/cpufreq/exynos5250-cpufreq.c:150: error: 'EXYNOS5_CLKDIV_CPU1' undeclared (first use in this function)
drivers/cpufreq/exynos5250-cpufreq.c:152: error: 'EXYNOS5_CLKDIV_STATCPU1' undeclared (first use in this function)
drivers/cpufreq/exynos5250-cpufreq.c: In function 'set_apll':
drivers/cpufreq/exynos5250-cpufreq.c:166: error: 'EXYNOS5_CLKMUX_STATCPU' undeclared (first use in this function)
drivers/cpufreq/exynos5250-cpufreq.c:173: error: 'EXYNOS5_APLL_LOCK' undeclared (first use in this function)
drivers/cpufreq/exynos5250-cpufreq.c: In function 'exynos5250_cpufreq_init':
drivers/cpufreq/exynos5250-cpufreq.c:312: error: 'EXYNOS5_CLKDIV_CPU1' undeclared (first use in this function)

Cc: Jaecheol Lee <jc.lee@samsung.com>
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

7 years agoARM: EXYNOS: Add missing definition for IRQ_I2S0
Tushar Behera [Thu, 5 Apr 2012 23:08:25 +0000]
ARM: EXYNOS: Add missing definition for IRQ_I2S0

This fixes following build error when sound support is selected
on EXYNOS4 platform.

sound/soc/samsung/idma.c: In function ‘idma_close’:
sound/soc/samsung/idma.c:327:11: error: ‘IRQ_I2S0’ undeclared (first use in this function)

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

7 years agoARM: S5PV210: fix unused LDO supply field from wm8994_pdata
Kukjin Kim [Thu, 5 Apr 2012 22:48:25 +0000]
ARM: S5PV210: fix unused LDO supply field from wm8994_pdata

According to commit 719a4240("mfd: Remove unused LDO supply field
from WM8994 pdata"), the LDO supply field should be removed from
the initializer.

Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

7 years agoARM: OMAP: clock: cleanup CPUfreq leftovers, fix build errors
Kevin Hilman [Fri, 13 Apr 2012 20:52:15 +0000]
ARM: OMAP: clock: cleanup CPUfreq leftovers, fix build errors

Now that we have OPP layer, and OMAP CPUfreq driver is using it, we no
longer need/use the clock framework code for filling up CPUfreq
tables.  Remove it.

Removing this code also eliminates build errors when CPU_FREQ_TABLE
support is not enabled.

Thanks to Russell King for pointing out the parts I missed under
plat-omap in the original version and also pointing out the build
errors when CPUFREQ_TABLE support was not enabled.

Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Olof Johansson <olof@lixom.net>

7 years agoARM: dts: remove blank interrupt-parent properties
Rob Herring [Thu, 12 Apr 2012 15:17:28 +0000]
ARM: dts: remove blank interrupt-parent properties

These were incorrectly introduced and can cause problems for of_irq_init.

The correct way to define a root controller is no interrupt-parent set at
all or the interrupt-parent is set to the root controller itself when
inherited from a parent node.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Tested-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>

7 years agoARM: msm: Fix section mismatches in proc_comm.c
David Brown [Thu, 12 Apr 2012 18:36:50 +0000]
ARM: msm: Fix section mismatches in proc_comm.c

The change
    commit 4416e9eb0b4859b3d28016c5fd0a609bdcbc8a2a
    Author: Gregory Bean <gbean@codeaurora.org>
    Date:   Wed Jul 28 10:22:12 2010 -0700

        arm: msm: Fix section mismatch in smd.c.

fixes a section mismatch between the board file and the smd driver's
probe function, however, it misses the additional mismatches between
the probe function and some routines it calls.  Fix these up as well.

Signed-off-by: David Brown <davidb@codeaurora.org>

7 years agovideo: msm: Fix section mismatches in mddi.c
David Brown [Thu, 12 Apr 2012 18:36:50 +0000]
video: msm: Fix section mismatches in mddi.c

The change
    commit 461cbe77d0a4f887c33a3a95ea68a7daf23b4302
    Author: Gregory Bean <gbean@codeaurora.org>
    Date:   Wed Jul 28 10:22:13 2010 -0700

        video: msm: Fix section mismatch in mddi.c.

fixes a section mismatch between the board file and the driver's probe
function, however, it misses the additional mismatches between the
probe function and some routines it calls.  Fix these up as well.

Signed-off-by: David Brown <davidb@codeaurora.org>

7 years agoarm: msm: trout: fix compile failure
Daniel Walker [Thu, 12 Apr 2012 15:45:37 +0000]
arm: msm: trout: fix compile failure

Fixes the following warnings,

arch/arm/mach-msm/board-trout.c: In function 'trout_init':
arch/arm/mach-msm/board-trout.c:71: error: 'system_rev' undeclared (first use in this function)
arch/arm/mach-msm/board-trout.c:71: error: (Each undeclared identifier is reported only once
arch/arm/mach-msm/board-trout.c:71: error: for each function it appears in.)

and

arch/arm/mach-msm/board-trout-panel.c: In function 'trout_init_panel':
arch/arm/mach-msm/board-trout-panel.c:267: error: 'system_rev' undeclared (first use in this function)
arch/arm/mach-msm/board-trout-panel.c:267: error: (Each undeclared identifier is reported only once
arch/arm/mach-msm/board-trout-panel.c:267: error: for each function it appears in.)

This came in with the following commit 9f97da78bf018206fb623cd351d454af2f105fe0
which removes asm/system.h

Signed-off-by: Daniel Walker <dwalker@fifo99.com>
cc: David Howells <dhowells@redhat.com>
cc: Bryan Huntsman <bryanh@codeaurora.org>
cc: linux-arm-msm@vger.kernel.org
cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: David Brown <davidb@codeaurora.org>

7 years agoarm: msm: halibut: remove unneeded fixup
Daniel Walker [Thu, 12 Apr 2012 04:04:02 +0000]
arm: msm: halibut: remove unneeded fixup

This old fixup causes a build failure, so I remove it just like in
trout.

Signed-off-by: Daniel Walker <dwalker@fifo99.com>
Signed-off-by: David Brown <davidb@codeaurora.org>

7 years agoALSA: hda/realtek - Fix mem leak (and rid us of trailing whitespace).
Jesper Juhl [Thu, 12 Apr 2012 20:11:25 +0000]
ALSA: hda/realtek - Fix mem leak (and rid us of trailing whitespace).

In sound/pci/hda/patch_realtek.c::alc_auto_fill_dac_nids(), in the
'for (;;)' loop, if the 'badness' value returned from
fill_and_eval_dacs() is negative, then we'll return from the function
without freeing the memory we allocated for 'best_cfg', thus leaking.
Fix the leak by kfree()'ing the memory when badness is negative.

While I was there I also noticed some trailing whitespace in the
function that I removed (along with all other trailing whitespace in
the file) - it didn't seem worth-while to do that as two patches, so I
hope it's OK that I just did it all as one patch.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

7 years agoALSA: hda/realtek - Add quirk for Mac Pro 5,1 machines
Josh Boyer [Thu, 12 Apr 2012 17:55:36 +0000]
ALSA: hda/realtek - Add quirk for Mac Pro 5,1 machines

A user reported that setting model=imac24 used to allow sound to work on their
Mac Pro 5,1 machine.  Commit 5671087ffa "Move ALC885 macpro and imac24 models
to auto-parser" removed this model option.  All Mac machines are now explicitly
handled with a quirk and the auto-parser.  This adds a quirk for the device
found on the Mac Pro 5,1 machines.

This (partially) fixes https://bugzilla.redhat.com/show_bug.cgi?id=808559

[sorted the new entry in the ID number order by tiwai]

Reported-by: Gabriel Somlo <somlo@cmu.edu>
Signed-off-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

7 years agoALSA: hda/realtek - Add a fixup entry for Acer Aspire 8940G
Takashi Iwai [Thu, 12 Apr 2012 06:00:19 +0000]
ALSA: hda/realtek - Add a fixup entry for Acer Aspire 8940G

It's compatible with 8930G.
Using the same fixup gives the proper 5.1 sound back.

Reported-and-tested-by: Dany Martineau <dany.luc.martineau@gmail.com>
Cc: <stable@kernel.org> [v3.3+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>

7 years agoALSA: hda/realtek - Fix GPIO1 setup for Acer Aspire 4930 & co
Takashi Iwai [Wed, 11 Apr 2012 15:18:12 +0000]
ALSA: hda/realtek - Fix GPIO1 setup for Acer Aspire 4930 & co

Add GPIO1 setup explicitly for Acer Aspire 493x & co.
This could be set by alc_auto_init_amp(), but it's safer to set it
more explicitly in the fixup table.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

7 years agoALSA: hda/realtek - Add a few ALC882 model strings back
Takashi Iwai [Wed, 11 Apr 2012 12:03:41 +0000]
ALSA: hda/realtek - Add a few ALC882 model strings back

Since there are still many Acer models that might not be covered by
the current fixup table, let's add back a few typical model names so
that user can test the fixup without recompiling.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

7 years agoSCSI: Fix error handling when no ULD is attached
Martin K. Petersen [Sun, 15 Apr 2012 03:01:28 +0000]
SCSI: Fix error handling when no ULD is attached

Commit 18a4d0a22ed6 ("[SCSI] Handle disk devices which can not process
medium access commands") introduced a bug in which we would attempt to
dereference the scsi driver even when the device had no ULD attached.

Ensure that a driver is registered and make the driver accessor function
more resilient to errors during device discovery.

Reported-by: Elric Fu <elricfu1@gmail.com>
Reported-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

7 years agoperf kvm: Finding struct machine fails for PERF_RECORD_MMAP
Nikunj A. Dadhania [Mon, 9 Apr 2012 08:22:23 +0000]
perf kvm: Finding struct machine fails for PERF_RECORD_MMAP

Running 'perf kvm --host --guest --guestmount /tmp/guestmount record -a -g -- sleep 2'

Was resulting in a segfault. For event type PERF_RECORD_MMAP,
event->ip.pid is being used in perf_session__find_machine_for_cpumode,
which is not correct.

The event->ip.pid field happens to be 0 in this case and results in
returning a NULL machine object. Finally, access to self->pid in
machine__mmap_name, results in a segfault later.

For PERF_RECORD_MMAP type, pass event->mmap.pid.

Signed-off-by: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Tested-by: David Ahern <dsahern@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Cc: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/20120409081835.10576.22018.stgit@abhimanyu.in.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

7 years agoperf annotate: Validate addr in symbol__inc_addr_samples
Arnaldo Carvalho de Melo [Tue, 27 Mar 2012 15:55:57 +0000]
perf annotate: Validate addr in symbol__inc_addr_samples

This routine was checking only if the provided address was after
sym->end, not if it was before sym->start.

Fix that by checking for both and return in both cases -ERANGE, so that
tools can communicate this to the user properly, or if they chose so, to
abort.

This problem was reported previously but the fixes involved either doing
what was being done for the > end case, i.e. silently drop the sample,
returning 0, or aborting at this function, which is in a lib (or better,
is slated to be at some point) and shouldn't abort.

The 'report' tool already checks this value and uses pr_debug to warn
the user.

This patch makes the 'top' tool check it too and warn once per map where
such range problem takes place.

Reported-by: David Miller <davem@davemloft.net>
Reported-by: Sorin Dumitru <dumitru.sorin87@gmail.com>
Reported-by: Stephane Eranian <eranian@google.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/n/tip-lw8gs7p9i9nhldilo82tzpne@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

7 years agoperf hists browser: Fix NULL deref in hists browsing code
Jiri Olsa [Wed, 4 Apr 2012 20:21:31 +0000]
perf hists browser: Fix NULL deref in hists browsing code

If there's an event with no samples in data file, the perf report
command can segfault after entering the event details menu.

Following steps reproduce the issue:

 # ./perf record -e syscalls:sys_enter_kexec_load,syscalls:sys_enter_mmap ls
 # ./perf report
 # enter '0 syscalls:sys_enter_kexec_load' menu
 # pres ENTER twice

Above steps are valid assuming ls wont run kexec.. ;)

The check for sellection to be NULL is missing. The fix makes sure it's
being check. Above steps now endup with menu being displayed allowing
'Exit' as the only option.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1333570898-10505-2-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

7 years agoperf hists: Catch and handle out-of-date hist entry maps.
David Miller [Tue, 27 Mar 2012 07:14:18 +0000]
perf hists: Catch and handle out-of-date hist entry maps.

When a process exec()'s, all the maps are retired, but we keep the hist
entries around which hold references to those outdated maps.

If the same library gets mapped in for which we have hist entries, a new
map will be created.  But when we take a perf entry hit within that map,
we'll find the existing hist entry with the older map.

This causes symbol translations to be done incorrectly.  For example,
the perf entry processing will lookup the correct uptodate map entry and
use that to calculate the symbol and DSO relative address.  But later
when we update the histogram we'll translate the address using the
outdated map file instead leading to conditions such as out-of-range
offsets in symbol__inc_addr_samples().

Therefore, update the map of the hist_entry dynamically at lookup/
creation time.

Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: stable@kernel.org
Link: http://lkml.kernel.org/r/20120327.031418.1220315351537060808.davem@davemloft.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

7 years agoperf annotate: Fix hist decay
Arnaldo Carvalho de Melo [Thu, 5 Apr 2012 19:15:59 +0000]
perf annotate: Fix hist decay

We were only decaying the entries for the offsets that were associated
with an objdump line.

That way, when we accrued the whole instruction addr range, more than
100% was appearing in some cases in the live annotation TUI.

Fix it by not traversing the source code line at all, just iterate thru
the complete addr range decaying each one.

Reported-by: Mike Galbraith <mgalbraith@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-hcae5oxa22syjrnalsxz7s6n@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

7 years agoperf top: Add intel_idle to the skip list
Arnaldo Carvalho de Melo [Mon, 2 Apr 2012 14:16:24 +0000]
perf top: Add intel_idle to the skip list

TODO: Accrue the cycles in the skip_list to an idle total, and show this
on the 'top' UI, as suggested by Steven.

Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/n/tip-9nfecmgghgl5747rjxqpc28f@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

7 years agodo not export kernel's NULL #define to userspace
Lubos Lunak [Wed, 21 Mar 2012 13:08:24 +0000]
do not export kernel's NULL #define to userspace

GCC's NULL is actually __null, which allows detecting some questionable
NULL usage and warn about it.  Moreover each platform/compiler should
have its own stddef.h anyway (which is different from linux/stddef.h).

So there's no good reason to leak kernel's NULL to userspace and
override what the compiler provides.

Signed-off-by: Luboš Luňák <l.lunak@suse.cz>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

7 years agoirq_work: fix compile failure on tile from missing include
Chris Metcalf [Wed, 11 Apr 2012 16:21:39 +0000]
irq_work: fix compile failure on tile from missing include

Building with IRQ_WORK configured results in

kernel/irq_work.c: In function ‘irq_work_run’:
kernel/irq_work.c:110: error: implicit declaration of function ‘irqs_disabled’

The appropriate header just needs to be included.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

7 years agoia64: populate the cmpxchg header with appropriate code
Paul Gortmaker [Tue, 3 Apr 2012 17:51:35 +0000]
ia64: populate the cmpxchg header with appropriate code

commit 93f378883cecb9dcb2cf5b51d9d24175906659da

    "Fix ia64 build errors (fallout from system.h disintegration)"

introduced arch/ia64/include/asm/cmpxchg.h as a temporary
build fix and stated:

    "... leave the migration of xchg() and cmpxchg() to this new
     header file for a future patch."

Migrate the appropriate chunks from asm/intrinsics.h and fix
the whitespace issues in the migrated chunk.

Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: David Howells <dhowells@redhat.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

7 years agoalpha: fix build failures from system.h dismemberment
Paul Gortmaker [Mon, 2 Apr 2012 20:04:13 +0000]
alpha: fix build failures from system.h dismemberment

commit ec2212088c42ff7d1362629ec26dda4f3e8bdad3

    "Disintegrate asm/system.h for Alpha"

combined with commit b4816afa3986704d1404fc48e931da5135820472

    "Move the asm-generic/system.h xchg() implementation to asm-generic/cmpxchg.h"

introduced the concept of asm/cmpxchg.h but the alpha arch
never got one.  Fork the cmpxchg content out of the asm/atomic.h
file to create one.

Some minor whitespace fixups were done on the block of code that
created the new file.

Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

7 years agovideo:uvesafb: Fix oops that uvesafb try to execute NX-protected page
Wang YanQing [Sun, 1 Apr 2012 00:54:02 +0000]
video:uvesafb: Fix oops that uvesafb try to execute NX-protected page

This patch fix the oops below that catched in my machine

[   81.560602] uvesafb: NVIDIA Corporation, GT216 Board - 0696a290, Chip Rev   , OEM: NVIDIA, VBE v3.0
[   81.609384] uvesafb: protected mode interface info at c000:d350
[   81.609388] uvesafb: pmi: set display start = c00cd3b3, set palette = c00cd40e
[   81.609390] uvesafb: pmi: ports = 3b4 3b5 3ba 3c0 3c1 3c4 3c5 3c6 3c7 3c8 3c9 3cc 3ce 3cf 3d0 3d1 3d2 3d3 3d4 3d5 3da
[   81.614558] uvesafb: VBIOS/hardware doesn't support DDC transfers
[   81.614562] uvesafb: no monitor limits have been set, default refresh rate will be used
[   81.614994] uvesafb: scrolling: ypan using protected mode interface, yres_virtual=4915
[   81.744147] kernel tried to execute NX-protected page - exploit attempt? (uid: 0)
[   81.744153] BUG: unable to handle kernel paging request at c00cd3b3
[   81.744159] IP: [<c00cd3b3>] 0xc00cd3b2
[   81.744167] *pdpt = 00000000016d6001 *pde = 0000000001c7b067 *pte = 80000000000cd163
[   81.744171] Oops: 0011 [#1] SMP
[   81.744174] Modules linked in: uvesafb(+) cfbcopyarea cfbimgblt cfbfillrect
[   81.744178]
[   81.744181] Pid: 3497, comm: modprobe Not tainted 3.3.0-rc4NX+ #71 Acer            Aspire 4741                    /Aspire 4741
[   81.744185] EIP: 0060:[<c00cd3b3>] EFLAGS: 00010246 CPU: 0
[   81.744187] EIP is at 0xc00cd3b3
[   81.744189] EAX: 00004f07 EBX: 00000000 ECX: 00000000 EDX: 00000000
[   81.744191] ESI: f763f000 EDI: f763f6e8 EBP: f57f3a0c ESP: f57f3a00
[   81.744192]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[   81.744195] Process modprobe (pid: 3497, ti=f57f2000 task=f748c600 task.ti=f57f2000)
[   81.744196] Stack:
[   81.744197]  f82512c5 f759341c 00000000 f57f3a30 c124a9bc 00000001 00000001 000001e0
[   81.744202]  f8251280 f763f000 f7593400 00000000 f57f3a40 c12598dd f5c0c000 00000000
[   81.744206]  f57f3b10 c1255efe c125a21a 00000006 f763f09c 00000000 c1c6cb60 f7593400
[   81.744210] Call Trace:
[   81.744215]  [<f82512c5>] ? uvesafb_pan_display+0x45/0x60 [uvesafb]
[   81.744222]  [<c124a9bc>] fb_pan_display+0x10c/0x160
[   81.744226]  [<f8251280>] ? uvesafb_vbe_find_mode+0x180/0x180 [uvesafb]
[   81.744230]  [<c12598dd>] bit_update_start+0x1d/0x50
[   81.744232]  [<c1255efe>] fbcon_switch+0x39e/0x550
[   81.744235]  [<c125a21a>] ? bit_cursor+0x4ea/0x560
[   81.744240]  [<c129b6cb>] redraw_screen+0x12b/0x220
[   81.744245]  [<c128843b>] ? tty_do_resize+0x3b/0xc0
[   81.744247]  [<c129ef42>] vc_do_resize+0x3d2/0x3e0
[   81.744250]  [<c129efb4>] vc_resize+0x14/0x20
[   81.744253]  [<c12586bd>] fbcon_init+0x29d/0x500
[   81.744255]  [<c12984c4>] ? set_inverse_trans_unicode+0xe4/0x110
[   81.744258]  [<c129b378>] visual_init+0xb8/0x150
[   81.744261]  [<c129c16c>] bind_con_driver+0x16c/0x360
[   81.744264]  [<c129b47e>] ? register_con_driver+0x6e/0x190
[   81.744267]  [<c129c3a1>] take_over_console+0x41/0x50
[   81.744269]  [<c1257b7a>] fbcon_takeover+0x6a/0xd0
[   81.744272]  [<c12594b8>] fbcon_event_notify+0x758/0x790
[   81.744277]  [<c10929e2>] notifier_call_chain+0x42/0xb0
[   81.744280]  [<c1092d30>] __blocking_notifier_call_chain+0x60/0x90
[   81.744283]  [<c1092d7a>] blocking_notifier_call_chain+0x1a/0x20
[   81.744285]  [<c124a5a1>] fb_notifier_call_chain+0x11/0x20
[   81.744288]  [<c124b759>] register_framebuffer+0x1d9/0x2b0
[   81.744293]  [<c1061c73>] ? ioremap_wc+0x33/0x40
[   81.744298]  [<f82537c6>] uvesafb_probe+0xaba/0xc40 [uvesafb]
[   81.744302]  [<c12bb81f>] platform_drv_probe+0xf/0x20
[   81.744306]  [<c12ba558>] driver_probe_device+0x68/0x170
[   81.744309]  [<c12ba731>] __device_attach+0x41/0x50
[   81.744313]  [<c12b9088>] bus_for_each_drv+0x48/0x70
[   81.744316]  [<c12ba7f3>] device_attach+0x83/0xa0
[   81.744319]  [<c12ba6f0>] ? __driver_attach+0x90/0x90
[   81.744321]  [<c12b991f>] bus_probe_device+0x6f/0x90
[   81.744324]  [<c12b8a45>] device_add+0x5e5/0x680
[   81.744329]  [<c122a1a3>] ? kvasprintf+0x43/0x60
[   81.744332]  [<c121e6e4>] ? kobject_set_name_vargs+0x64/0x70
[   81.744335]  [<c121e6e4>] ? kobject_set_name_vargs+0x64/0x70
[   81.744339]  [<c12bbe9f>] platform_device_add+0xff/0x1b0
[   81.744343]  [<f8252906>] uvesafb_init+0x50/0x9b [uvesafb]
[   81.744346]  [<c100111f>] do_one_initcall+0x2f/0x170
[   81.744350]  [<f82528b6>] ? uvesafb_is_valid_mode+0x66/0x66 [uvesafb]
[   81.744355]  [<c10c6994>] sys_init_module+0xf4/0x1410
[   81.744359]  [<c1157fc0>] ? vfsmount_lock_local_unlock_cpu+0x30/0x30
[   81.744363]  [<c144cb10>] sysenter_do_call+0x12/0x36
[   81.744365] Code: f5 00 00 00 32 f6 66 8b da 66 d1 e3 66 ba d4 03 8a e3 b0 1c 66 ef b0 1e 66 ef 8a e7 b0 1d 66 ef b0 1f 66 ef e8 fa 00 00 00 61 c3 <60> e8 c8 00 00 00 66 8b f3 66 8b da 66 ba d4 03 b0 0c 8a e5 66
[   81.744388] EIP: [<c00cd3b3>] 0xc00cd3b3 SS:ESP 0068:f57f3a00
[   81.744391] CR2: 00000000c00cd3b3
[   81.744393] ---[ end trace 18b2c87c925b54d6 ]---

Signed-off-by: Wang YanQing <udknight@gmail.com>
Cc: Michal Januszewski <spock@gentoo.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: stable@vger.kernel.org

7 years agofbdev: fix au1*fb builds
Manuel Lauss [Sat, 24 Mar 2012 10:38:02 +0000]
fbdev: fix au1*fb builds

Commit 1c16697bf9d5b206cb0d2b905a54de5e077296be
("drivers/video/au*fb.c: use devm_ functions) introduced 2 build failures
in the au1100fb and au1200fb drivers, fix them.

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>

7 years agokyrofb: fix on x86_64
Ondrej Zary [Wed, 21 Mar 2012 22:36:50 +0000]
kyrofb: fix on x86_64

kyrofb is completely broken on x86_64 because the registers are defined as
unsigned long. Change them to u32 to make the driver work.
Tested with Hercules 3D Prophet 4000XT.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>

7 years agoBtrfs: use commit root when loading free space cache
Josef Bacik [Thu, 12 Apr 2012 20:03:57 +0000]
Btrfs: use commit root when loading free space cache

A user reported that booting his box up with btrfs root on 3.4 was way
slower than on 3.3 because I removed the ideal caching code.  It turns out
that we don't load the free space cache if we're in a commit for deadlock
reasons, but since we're reading the cache and it hasn't changed yet we are
safe reading the inode and free space item from the commit root, so do that
and remove all of the deadlock checks so we don't unnecessarily skip loading
the free space cache.  The user reported this fixed the slowness.  Thanks,

Tested-by: Calvin Walton <calvin.walton@kepstin.ca>
Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>

7 years agoBtrfs: fix use-after-free in __btrfs_end_transaction
Dave Jones [Thu, 12 Apr 2012 20:03:56 +0000]
Btrfs: fix use-after-free in __btrfs_end_transaction

49b25e0540904be0bf558b84475c69d72e4de66e introduced a use-after-free bug
that caused spurious -EIO's to be returned.

Do the check before we free the transaction.

Cc: David Sterba <dsterba@suse.cz>
Cc: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>

7 years agoBtrfs: check return value of bio_alloc() properly
Tsutomu Itoh [Thu, 12 Apr 2012 20:03:56 +0000]
Btrfs: check return value of bio_alloc() properly

bio_alloc() has the possibility of returning NULL.
So, it is necessary to check the return value.

Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>