Leela Krishna Amudala [Wed, 2 May 2012 10:02:21 +0000 (15:32 +0530)]
media: gscaler: Add new driver for general scaler
This patch add support gscaler device which is a new device
for scaling and color space conversion on EXYNOS5 SoCs.
This device supports the followings as key feature.
1) Input image format
- RGB888/565, YUV422 1P/2P, YUV420 2P/3P, TILE
2) Output image format
- RGB888/565, YUV422 1P/2P, YUV420 2P/3P, YUV444
3) Input rotation
- 0/90/180/270 degree, X/Y Flip
4) Scale ratio
- 1/16 scale down to 8 scale up
5) CSC
- RGB to YUV / YUV to RGB
6) Size
- 2048 x 2048 for tile or rotation
- 4800 x 3344 other case
Change-Id: Ic3caf7b0e35fa43e14b85f878635160ccbe60f23
Signed-off-by: Hynwoong Kim <khw0178.kim@xxxxxxxxxxx>
Signed-off-by: Sungchun Kang <sungchun.kang@xxxxxxxxxxx>
Banajit Goswami [Sun, 6 May 2012 15:52:11 +0000 (00:52 +0900)]
UPSTREAM: media: media-dev: Add media devices for EXYNOS5
Since the EXYNOS5 SoCs have various multimedia IPs
such as Gscaler, FIMC-LITE, and MIXER, and so on.
Additionally, media controller interface is needed
to configure connection between them and to control each IPs.
This patch adds support media device for EXYNOS5 SoCs.
Actually, there are three media devices such as below
diagram which are using media control framework.
Since they are not belong to one hardware block, we
need to manage it for connecting with each devices.
Follwing is detailed list of them:
* Gscaler: general scaler
Support memory to memory interface
Support output interface from memory to display device(LCD, TV)
Support capture interface from device(FIMC-LITE, FIMD) to memory
* MIPI-CSIS
Support interconnection(subdev interface) between devices
* FIMC-LITE
Support capture interface from device(Sensor, MIPI-CSIS) to memory
Support interconnection(subdev interface) between devices
* MIXER
Support output interface from memory to device(HDMI)
Support interconnection(subdev interface) between devices
* FIMD
Support framebuffer interface
Support subdev interface to display frames sent from Gscaler
* Rotator
Support memory to memory interface
* m2m-scaler
Support only memory to memory interface
* And so on...
1) media 0
LCD Output path consists of Gscaler and FIMD(display controller).
+----------------+ +------+
| Gscaler-output | --> | FIMD | --> LCD
+----------------+ +------+
HDMI Output path consists of Gscaler, Mixer and HDMI.
+----------------+ +-------+ +------+
| Gscaler-output | --> | MIXER | --> | HDMI | --> TV
+----------------+ +-------+ +------+
+--------+ +-----------+ +-----------+ +-----------------+
2) media 1
Camera Capture path consists of MIPI-CSIS, FIMC-LITE and Gscaler
+--------+ +-----------+ +-----------------+
| Sensor | --> | FIMC-LITE | --> | Gscaler-capture |
+--------+ +-----------+ +-----------------+
+--------+ +-----------+ +-----------+ +-----------------+
| Sensor | --> | MIPI-CSIS | --> | FIMC-LITE | --> | Gscaler-capture |
+--------+ +-----------+ +-----------+ +-----------------+
Signed-off-by: Sungchun Kang <sungchun.kang@samsung.com>
Subash Patel [Fri, 15 Jun 2012 23:44:21 +0000 (16:44 -0700)]
Media: exynos/mfc: revert VIDIOC_EXPBUF support in MFC decoder
VIDIOC_EXPBUF support which was added in the earlier commits was
hard-coded to the OUTPUT queue. In the new videobuf2 exporter
patch-set this support has been provided. Hence this commit will
revert this change from the decoder.
Change-Id: I32e4eb360c6695cb28c139cd609e79e14c98d29a
Signed-off-by: Subash Patel <subash.rp@samsung.com>
Arun Mankuzhi [Tue, 5 Jun 2012 06:52:03 +0000 (23:52 -0700)]
TEMP s5p-mfc: Hack to leave unconsumed mfc input data
This patch removes the code, which is needed to manage
unconsumed bits of mfc input data. This is only done to
temporarily allow non-h264 streams to playback till end
without running out of capture buffers. These capture buffers
were not dequeued by application otherwise.
BUG=None
TEST=mpeg4 files playback is tested
Change-Id: Ia4687a58221b98f99e6bcc0769d668f1c9657f72
Signed-off-by: Kiran AVND <avnd.kiran@samsung.com>
Reviewed-on: https://gerrit-int.chromium.org/19657
Reviewed-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Tested-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-by: Pawel Osciak <posciak@google.com>
Reviewed-by: Sunil M <sunilm.samsung@gmail.com>
Reviewed-by: Prashanth Godrehal <prashanth.g@samsung.com>
Commit-Ready: Prashanth Godrehal <prashanth.g@samsung.com>
Reviewed-by: Bibhuti Bhusan Panigrahi <bibhuti.p@samsung.com>
Tested-by: Bibhuti Bhusan Panigrahi <bibhuti.p@samsung.com>
Naveen krishna Chatradhi [Wed, 6 Jun 2012 05:03:35 +0000 (22:03 -0700)]
TEMP: s5p-mfc: Set display delay to 0x8
HACK: Application should be able to set the DISPLAY_DELAY using the
s_ctrl IOCTL. But, the s_ctrl path is not working in the driver
right now. This needs to be fixed.
BUG=None
TEST=H264 videos runs fine with UTC Secomx
Change-Id: Ife47b5ade29105981bf2b20af92419e3e54528ae
Signed-off-by: Naveen krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-on: https://gerrit-int.chromium.org/19656
Reviewed-by: Sunil M <sunilm.samsung@gmail.com>
Reviewed-by: Pawel Osciak <posciak@google.com>
Reviewed-by: Prashanth Godrehal <prashanth.g@samsung.com>
Shirish S [Thu, 7 Jun 2012 14:54:29 +0000 (20:24 +0530)]
HACK: Media: Mixer: Add Xrandr clone logic
The base address register of mixer group is populated only if
the address provided is not NULL.
The Mixer GRP0 is always enabled.
Change-Id: I63b911e147cdf7e358f52dd240782c6e98535bae
Signed-off-by: Shirish S <s.shirish@samsung.com>
Abhilash Kesavan [Tue, 29 May 2012 23:50:57 +0000 (05:20 +0530)]
media: tv: Switch to i2c8 for HDMI-PHY on Exynos
Exynos5 has 8 i2c channels and a dedicated internal one for the
HDMI-PHY. We setup the HDMI-PHY with an i2c8 alias as it would
remain constant across boards irrespective of usage of other channels.
Modify the hdmi_driver_data to select the HDMI-PHY bus as 8 to match
this.
BUG=None
TEST=Only build tested, no h/w at the moment; The HDMI-PHY initialization
errors should go away.
Change-Id: I3c7482d83a3641902cabf091d94a925d666db9ec
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit-int.chromium.org/18568
Reviewed-by: Doug Anderson <dianders@google.com>
Tested-by: Doug Anderson <dianders@google.com>
Commit-Ready: Olof Johansson <olofj@google.com>
Abhilash Kesavan [Fri, 18 May 2012 19:19:06 +0000 (12:19 -0700)]
media: tvout: Fix compilation error on enabling HDMI-CEC on exynos5
Change the name of HDMI PHY control register and include the appropriate
headers to fix build break on enabling HDMI-CEC.
BUG=chrome-os-partner:9695
TEST=build tested
Change-Id: I5fdd342f389c22605def151bdf18c3f8a83bf6c4
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Reviewed-on: https://gerrit-int.chromium.org/17863
Reviewed-by: Prashanth Godrehal <prashanth.g@samsung.com>
Reviewed-by: Sean Paul <seanpaul@google.com>
Reviewed-by: Olof Johansson <olofj@google.com>
Tested-by: Doug Anderson <dianders@google.com>
Commit-Ready: Doug Anderson <dianders@google.com>
Abhilash Kesavan [Tue, 29 May 2012 09:27:10 +0000 (14:57 +0530)]
arm: exynos: Add missing register definitions for HDMI-CEC
Add missing register definitions for HDMI-CEC on Exynos.
BUG=chrome-os-partner:9695
TEST=build and boot on SMDK
Change-Id: I68639d3c48cc35a871c62ed59c6edd3f96c6d461
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Reviewed-on: https://gerrit-int.chromium.org/17862
Reviewed-by: Sean Paul <seanpaul@google.com>
Reviewed-by: Prashanth Godrehal <prashanth.g@samsung.com>
Tested-by: Doug Anderson <dianders@google.com>
Commit-Ready: Doug Anderson <dianders@google.com>
Abhilash Kesavan [Tue, 15 May 2012 23:17:08 +0000 (16:17 -0700)]
tv: hdmi: Fix build warning in hdmi driver
Fix the following build warning in exynos' hdmi driver:
drivers/media/video/exynos/tv/hdmi_drv.c:61:3: warning: initialization makes
pointer from integer without a cast [enabled by default]
drivers/media/video/exynos/tv/hdmi_drv.c:61:3: warning: (near initialization
for 'exynos_hdmi_match[0].data') [enabled by default]
BUG=chrome-os-partner:9696
TEST=build and boot on SMDK
Change-Id: I92c9e1d52520a6fe262730c70885b2200e0e8312
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit-int.chromium.org/17825
Commit-Ready: Doug Anderson <dianders@google.com>
Reviewed-by: Doug Anderson <dianders@google.com>
Tested-by: Doug Anderson <dianders@google.com>
Abhilash Kesavan [Tue, 15 May 2012 23:19:55 +0000 (16:19 -0700)]
tv: mixer: Fix build warning in mixer-videobuf2 interface layer
Fix the following build warnings in exynos' mixer-vb2 interface:
drivers/media/video/exynos/tv/mixer_vb2.c:95:2: warning: initialization from
incompatible pointer type [enabled by default]
drivers/media/video/exynos/tv/mixer_vb2.c:95:2: warning: (near initialization
for 'mxr_vb2_sdvmm.resume') [enabled by default]
drivers/media/video/exynos/tv/mixer_vb2.c:97:2: warning: initialization from
incompatible pointer type [enabled by default]
drivers/media/video/exynos/tv/mixer_vb2.c:97:2: warning: (near initialization
for 'mxr_vb2_sdvmm.cache_flush') [enabled by default]
BUG=chrome-os-partner:9696
TEST=build and boot on SMDK
Change-Id: I9fe51b2cb3e6516d0328c4b36cd442f58ed3d706
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit-int.chromium.org/17826
Reviewed-by: Prashanth Godrehal <prashanth.g@samsung.com>
Commit-Ready: Olof Johansson <olofj@google.com>
Reviewed-by: Olof Johansson <olofj@google.com>
Tested-by: Olof Johansson <olofj@google.com>
Abhilash Kesavan [Tue, 15 May 2012 23:28:00 +0000 (16:28 -0700)]
tv: mixer: Fix build warning due to possible uninitialized usage
Fix the following build error in exynos' mixer driver:
drivers/media/video/exynos/tv/mixer_drv.c: In function 'mxr_s_stream':
drivers/media/video/exynos/tv/mixer_drv.c:281:9: warning: 'hdmi_sd' may be
used uninitialized in this function [-Wmaybe-uninitialized]
drivers/media/video/exynos/tv/mixer_drv.c:217:22: note: 'hdmi_sd' was
declared here
BUG=chrome-os-partner:9696
TEST=build and boot on SMDK
Change-Id: If22eac90c5a1906aab7c6a7647f4db4b721f5dde
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit-int.chromium.org/17828
Reviewed-by: Prashanth Godrehal <prashanth.g@samsung.com>
Commit-Ready: Olof Johansson <olofj@google.com>
Reviewed-by: Olof Johansson <olofj@google.com>
Tested-by: Olof Johansson <olofj@google.com>
Abhilash Kesavan [Tue, 15 May 2012 23:25:39 +0000 (16:25 -0700)]
tv: mixer: Fix build warning due to possible uninitialized usage
Fix the following build error in exynos' mixer driver:
drivers/media/video/exynos/tv/mixer_drv.c: In function 'mxr_apply_format.isra.9':
drivers/media/video/exynos/tv/mixer_drv.c:784:36: warning: 'fourcc' may be used
uninitialized in this function [-Wmaybe-uninitialized]
drivers/media/video/exynos/tv/mixer_drv.c:764:6: note: 'fourcc' was declared here
BUG=chrome-os-partner:9696
TEST=build and boot on SMDK
Change-Id: I8b0b217077c7372c5ce7953d467ffe15b8b0cb35
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit-int.chromium.org/17827
Commit-Ready: Olof Johansson <olofj@google.com>
Reviewed-by: Olof Johansson <olofj@google.com>
Tested-by: Olof Johansson <olofj@google.com>
Prathyush K [Fri, 1 Jun 2012 17:14:04 +0000 (22:44 +0530)]
ARM: EXYNOS: MFC: Add IOMMU mapping to MFC probe
IOMMU mapping is created for mfc device during probe. This
requires the sysmmu_l and sysmmu_r property be set in the DTS
file. First, the sysmmu device nodes are found and then the
sysmmu platform devices are retrieved. A IOMMU mapping is then created
for mfc_l and mfc_r devices.
Change-Id: Ic035c4fa8a61aed654e3136acd8e18d8496de0c2
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Kiran [Tue, 29 May 2012 22:12:14 +0000 (15:12 -0700)]
s5p-mfc: Update the codec_type list in the header
Also removes the codec_type hardcoding in cmd_v6.c
Change-Id: I85fd237cb285f6e0d956a3e80012b7e3a87783e5
Signed-off-by: Kiran <avnd.kiran@samsung.com>
Kiran [Thu, 31 May 2012 06:32:36 +0000 (23:32 -0700)]
s5p-mfc: MFC v6 requires MV buffer reg update
Patch does the following:
1) scratch buffer size for h264
2) mv buffer addresses update based on mv count
dpb buffer addresses update based on dpb count
Change-Id: Ie268e9daed4b7d7f514eaa321a543c068223ec7f
Signed-off-by: Kiran <avnd.kiran@samsung.com>
Kiran [Thu, 31 May 2012 06:23:33 +0000 (23:23 -0700)]
s5p-mfc: split error condition check
To be merged into the mfc-v6 mainline patch
Change-Id: Ie1d9b8483bc385b37ab3cbb19218f1cfe3ec5740
Signed-off-by: Kiran <avnd.kiran@samsung.com>
Kiran AVND [Fri, 25 May 2012 10:12:12 +0000 (11:12 +0100)]
Media: Exynos: MFC fixes to support OMX
This commit adds the extensions for the display control to support
the OMX
Change-Id: If7eef341c02faa3a5248c93dbf343f3056cc0161
Signed-off-by: Kiran AVND <avnd.kiran@samsung.com>
Naveen Krishna Chatradhi [Wed, 23 May 2012 09:21:26 +0000 (10:21 +0100)]
MFC: update MFC v4l2 driver to support MFC6.x
Multi Format Codec 6.x is a hardware video coding acceleration
module fount in new Exynos5 SoC series.
It is capable of handling a range of video codecs and this driver
provides a V4L2 interface for video decoding and encoding.
Change-Id: I69854c51ef20599add4e17b5d4df338785b5432f
Signed-off-by: Jeongtae Park <jtp.park@xxxxxxxxxxx>
Singed-off-by: Janghyuck Kim <janghyuck.kim@xxxxxxxxxxx>
Singed-off-by: Jaeryul Oh <jaeryul.oh@xxxxxxxxxxx>
Cc: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Cc: Kamil Debski <k.debski@xxxxxxxxxxx>
Prathyush K [Sun, 3 Jun 2012 12:16:06 +0000 (17:46 +0530)]
ARM: EXYNOS: MIXER: Add IOMMU mapping to MIXER probe
IOMMU mapping is created for mixer device during probe. This
requires the sysmmu property be set in the DTS file. First, the
sysmmu device node is found and then the sysmmu platform
device is retrieved. A IOMMU mapping is then created.
Change-Id: Ib1a23560a588cf1454abd660d773e49107ff95e2
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Shirish S [Mon, 4 Jun 2012 10:23:26 +0000 (03:23 -0700)]
include: v4l: Add exynos5 hdmi related macros
Adds new macros of formats and HPD status macro
Change-Id: I5038cdfaf2c566750b333c74f79b3a435305b0da
Signed-off-by: Shirish S <s.shirish@samsung.com>
Shirish S [Thu, 10 May 2012 10:35:33 +0000 (16:05 +0530)]
v4l2-common: Add modes supported by exynos5 hdmi
Adds modes/dv_presets that are recognised by exynos5 hdmi
Signed-off-by: Shirish S <s.shirish@samsung.com>
Naveen Krishna Chatradhi [Fri, 4 May 2012 10:00:47 +0000 (15:30 +0530)]
media: video: Add videobuf2-fb support
videobuf2-fb is needed by exynos/tv or HDMI driver
Change-Id: I1a7f97dc81a516886fabf0f2583fe3d53f28acf9
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Leela Krishna Amudala [Wed, 20 Jun 2012 10:26:53 +0000 (03:26 -0700)]
Add V4L2_CID macros for TV mixer controls
This patch adds supporting macros for TV mixer controls.
Change-Id: Ic493104f42017a050a2c9c152713d75c5dcca251
Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
Shirish S [Wed, 20 Jun 2012 09:41:57 +0000 (02:41 -0700)]
v4l: exynos/tv: Add TV/HDMI/Mixer driver
This patch adds non-mainlined Exynos5 HDMI driver.
Change-Id: Ieb0c0b29fa2b9ba61249ae9d83feeda9025ffd48
Signed-off-by: Shirish S <s.shirish@samsung.com>
Shirish S [Mon, 4 Jun 2012 10:51:52 +0000 (03:51 -0700)]
media: g2d: Fix compilation error
This patch fixes a compilation error in the mainline G2D driver.
'find_fmt' is now made a static function.
Change-Id: Ic675e4e151df87dbe0dfb5e94459d028b291bc3f
Signed-off-by: Shirish S <s.shirish@samsung.com>
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Thomas Abraham [Wed, 2 May 2012 04:15:19 +0000 (21:15 -0700)]
UPSTREAM: ARM: dts: Add nodes for dw_mmc controllers for Samsung Exynos5250 platforms
Add device nodes for the four instances of dw_mmc controllers in Exynos5250
and enable instance 0 and 2 for the smdk5250 board.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Thomas Abraham [Tue, 1 May 2012 16:55:15 +0000 (09:55 -0700)]
UPSTREAM: ARM: Exynos5: Add AUXDATA support for MSHC controllers
Add entries if MSHC controllers in AUXDATA table for correct device name
initialization.
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Thomas Abraham [Tue, 1 May 2012 16:18:29 +0000 (09:18 -0700)]
UPSTREAM: ARM: Samsung: Add support for MSHC controller clocks
Add clock instances for bus interface unit clock and card interface unit
clock of the all four MSHC controller instances.
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Thomas Abraham [Tue, 1 May 2012 16:53:27 +0000 (09:53 -0700)]
UPSTREAM: mmc: dw_mmc: add samsung exynos5250 specific extentions
The instantiation of the Synopsis Designware controller on Exynos5250
include extension for SDR and DDR specific tx/rx phase shift timing
and CIU internal divider. In addition to that, the option to skip the
command hold stage is also introduced. Add support for these Exynos5250
specfic extenstions.
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Thomas Abraham [Fri, 4 May 2012 21:18:44 +0000 (14:18 -0700)]
UPSTREAM: mmc: dw_mmc: add device tree support
Add device tree based discovery support.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Thomas Abraham [Wed, 2 May 2012 03:33:44 +0000 (20:33 -0700)]
UPSTREAM: mmc: dw_mmc: add quirk to indicate missing write protect line
If the write protect pad of the controller is not connected to the write
protect pin of the slot, the driver should be notified of this condition
so that incorrect check for write protection by reading the WRTORT
register can avoided. The get_ro platform callback can be used for in
such cases, but with device tree support enabled, such platform callbacks
cannot be supported.
Add a new quirk for notifying the driver about the missing write protect
line so the driver can assume that the card write protection is disabled.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Thomas Abraham [Tue, 1 May 2012 04:48:46 +0000 (21:48 -0700)]
UPSTREAM: mmc: dw_mmc: lookup for optional biu and ciu clocks
Some platforms allow for clock gating and control of bus interface unit clock
and card interface unit clock. Add support for clock lookup of optional biu
and ciu clocks for clock gating and clock speed determination.
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Thomas Abraham [Tue, 1 May 2012 21:39:13 +0000 (14:39 -0700)]
UPSTREAM: mmc: dw_mmc: make multiple instances of dw_mci_card_workqueue
The variable 'dw_mci_card_workqueue' is a global variable shared between
multiple instances of the dw_mmc host controller. Due to this, data
corruption has been noticed when multiple instances of dw_mmc controllers
are actively reading/writing the media. Fix this by adding a instance
of 'struct workqueue_struct' for each host instance and removing the
global 'dw_mci_card_workqueue' instance.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Thomas Abraham [Mon, 30 Apr 2012 17:53:40 +0000 (10:53 -0700)]
UPSTREAM: ARM: Exynos5: Add SROMC bank initialization for LAN9215 controller
Add SROMC bank initialization support for LAN9215 ethernet controllers.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Thomas Abraham [Mon, 30 Apr 2012 17:48:17 +0000 (10:48 -0700)]
UPSTREAM: ARM: Exynos5: Add AUXDATA for i2c controllers
Use AUXDATA to set the device names for controller instances discovered
from device tree.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Thomas Abraham [Mon, 30 Apr 2012 18:37:48 +0000 (11:37 -0700)]
UPSTREAM: ARM: Exynos5: Add combiner, wakeup interrupt controller and ethernet nodes
And interrupt combiner, external interrupt wakeup interrupt controller
and smsc9215 lan controller nodes.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Thomas Abraham [Tue, 24 Apr 2012 21:34:58 +0000 (14:34 -0700)]
UPSTREAM: ARM: dts: Update device tree source files for EXYNOS5250
Updated EXYNOS5 device tree source files to reflect changes in rev1
of EXYNOS5 SoC. This includes new additions to the EXYNOS5 dtsi and
SMDK5250 dts files and few minor fixes.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Thomas Abraham [Mon, 30 Apr 2012 17:42:22 +0000 (10:42 -0700)]
UPSTREAM: ARM: Exynos: Add device tree support for gpio wakeup interrupt controller
Add device tree support for gpio wakeup source interrupt controller
for Exynos platforms.
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Thomas Abraham [Wed, 21 Mar 2012 01:59:24 +0000 (07:29 +0530)]
UPSTREAM: ARM: Exynos: Remove arch_initcall for wakeup interrupt initialization
The of_irq_init function would be setup to invoke the exynos4_init_irq_eint
function when booting using device tree. The arch_initcall for
exynos4_init_irq_eint would duplicate its invocation in that case. Hence,
arch_initcall for exynos4_init_irq_eint is removed and this function is invoked
from the exynos4_init_irq for non-dt case.
Moreover, with single kernel image build, the exynos4_init_irq_eint has no checks
to ensure that it is running on a exynos4 platform. So it would be appropriate
to invoke it from exynos4_init_irq.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Thomas Abraham [Tue, 20 Mar 2012 19:10:51 +0000 (00:40 +0530)]
UPSTREAM: ARM: Exynos: Add irq_domain support for gpio wakeup interrupts
Add a irq_domain for all the 32 gpio external wakeup interrupt sources.
Since there are users of fixed linux irq numbers of the external wakeup
interrupts, the legacy mapping is used for the irq domain. The fixups
required to use irq domain based interrupt mapping is also included.
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Thomas Abraham [Tue, 20 Mar 2012 18:28:01 +0000 (23:58 +0530)]
UPSTREAM: ARM: Exynos: Simplify the wakeup interrupt setup code
Simplify the wakeup interrupt setup code in order to add irq domain
and device tree support.
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Thomas Abraham [Fri, 27 Apr 2012 17:40:34 +0000 (10:40 -0700)]
UPSTREAM: ARM: Exynos: Add device tree support for interrupt combiner
Add device tree based instantiation of the interrupt combiner controller.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Thomas Abraham [Tue, 20 Mar 2012 07:35:04 +0000 (13:05 +0530)]
UPSTREAM: ARM: Exynos: Add irq_domain support for interrupt combiner
Add irq_domain support for hardware interrupts of the interrupt combiner.
The hardware interrupts of all the instances of the combiner are grouped
in a single irq_domain.
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Thomas Abraham [Fri, 27 Apr 2012 19:06:37 +0000 (12:06 -0700)]
UPSTREAM: of/irq: add retry support for interrupt controller tree initialization
Allow a interrupt-controller initializtion call to report -EAGAIN to notify
that its initializtion has not been completed since one or more of its
interrupt-parent has not yet been initialized.
Suggested-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Thomas Abraham [Mon, 30 Apr 2012 17:22:47 +0000 (10:22 -0700)]
UPSTREAM: of/irq: fix interrupt parent lookup procedure
The interrupt parent lookup fails for a node that is a interrupt-controller
but does not have an explict interrupt-parent property and instead inherits
this property from the root node.
Consider the nodes listed below.
/ {
interrupt-parent = <&intc_level1>;
intc_level1: interrupt-controller@xxx {
interrupt-controller;
#interrupt-cells = <3>;
<rest of the properties here>;
};
intc_level2: interrupt-controller@yyy {
interrupt-controller;
#interrupt-cells = <2>;
<rest of the properties here>;
};
};
The interrupt parent lookup for interrupt-controller@yyy fails. It inherits
the interrupt-parent property from the root node and the root node ('/')
specifies a 'interrupt-parent' property which represents the default interrupt
root controller. But, the property '#interrupt-cells' might not be specified
in the root node.
In case a interrupt controller node does not include a 'interrupt-parent'
property but inherits that property from the root node, the check for
'interrupt-cells' property in the root node fails. Fix this removing the
check for 'interrupt-cells' property.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Thomas Abraham [Mon, 30 Apr 2012 17:10:12 +0000 (10:10 -0700)]
UPSTREAM: ARM: Exynos: Remove a new bus_type instance for Exynos5
A seperate bus_type instance is not required for Exynos5. The existing bus_type
instance used with Exynos4 is sufficient for both Exynos4 and Exynos5. This
also solves issue of uninitialized usage of exynos4_subsys in Exynos4 power
management code that is reused for Exynos5 also. In addition to that, the
existing exynos4_subsys bus_type is renamed to exynos_subsys to indicate that
it is reused on both Exynos4 and Exynos5 platforms.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Kukjin Kim [Tue, 24 Apr 2012 22:33:32 +0000 (15:33 -0700)]
UPSTREAM: ARM: EXYNOS: update irqs for EXYNOS5250 evt1
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Kisoo Yu [Tue, 24 Apr 2012 21:54:15 +0000 (14:54 -0700)]
UPSTREAM: ARM: EXYNOS: Add pre-divider and fout mux clocks for bpll and mpll
The fout clock of BPLL and MPLL have a selectable source in rev1 of
EXYNOS5. The clock options are a fixed divided by 2 clock and the
output of the PLL itself. Add support for these new clock instances.
Signed-off-by: Kisoo Yu <ksoo.yu@samsung.com>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
[kgene.kim@samsung.com: temporary apply this because I
don't want to add pll stuff in each clock not commonly]
Temporary-Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Sangsu Park [Tue, 24 Apr 2012 21:44:58 +0000 (14:44 -0700)]
UPSTREAM: ARM: EXYNOS: add GPC4 bank instance
Add GPC4 bank instance which is included in rev1 of EXYNOS5.
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Sangsu Park <sangsu4u.park@samsung.com>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
[kgene.kim@samsung.com: re-worked on top of v3.4-rc3]
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Changhwan Youn [Tue, 24 Apr 2012 21:33:14 +0000 (14:33 -0700)]
UPSTREAM: ARM: EXYNOS: Redefine IRQ_MCT_L0,1 definition
Redefine IRQ_MCT_L0,1 irq definition as it is changed in rev1 of EXYNOS5.
Signed-off-by: Changhwan Youn <chaos.youn@samsung.com>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Changhwan Youn [Tue, 24 Apr 2012 21:31:11 +0000 (14:31 -0700)]
UPSTREAM: ARM: EXYNOS: Modify the GIC physical address for static io-mapping
Adapt to changes in GIC physical address in rev1 of EXYNOS5.
Signed-off-by: Changhwan Youn <chaos.youn@samsung.com>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Boojin Kim [Mon, 30 Apr 2012 16:56:56 +0000 (09:56 -0700)]
UPSTREAM: ARM: EXYNOS: Support DMA for EXYNOS5250 SoC
mach-exynos/dma.c is updated to support both exynos4 and exynos5.
Signed-off-by: Boojin Kim <boojin.kim@samsung.com>
[kgene.kim@samsung.com: re-worked on top of v3.4-rc3]
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Thomas Abraham [Tue, 24 Apr 2012 21:03:05 +0000 (14:03 -0700)]
UPSTREAM: ARM: EXYNOS: Add watchdog timer clock instance
Add watchdog timer clock instance for EXYNOS5 watchdog controller.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Linus Torvalds [Sun, 20 May 2012 22:29:13 +0000 (15:29 -0700)]
Linux 3.4
Linus Torvalds [Sat, 19 May 2012 22:30:15 +0000 (15:30 -0700)]
Merge tag 'parisc-fixes' of git://git./linux/kernel/git/jejb/parisc-2.6
Pull PA-RISC fixes from James Bottomley:
"This is a set of three bug fixes that gets parisc running again on
systems with PA1.1 processors.
Two fix regressions introduced in 2.6.39 and one fixes a prefetch bug
that only affects PA7300LC processors. We also have another pending
fix to do with the sectional arrangement of vmlinux.lds, but there's a
query on it during testing on one particular system type, so I'll hold
off sending it in for now."
* tag 'parisc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6:
[PARISC] fix panic on prefetch(NULL) on PA7300LC
[PARISC] fix crash in flush_icache_page_asm on PA1.1
[PARISC] fix PA1.1 oops on boot
Linus Torvalds [Sat, 19 May 2012 22:28:22 +0000 (15:28 -0700)]
Merge branch 'x86/ld-fix' of git://git./linux/kernel/git/tip/tip
Pull x86 linker bug workarounds from Peter Anvin.
GNU ld-2.22.52.0.[12] (*) has an unfortunate bug where it incorrectly
turns certain relocation entries absolute. Section-relative symbols
that are part of otherwise empty sections are silently changed them to
absolute. We rely on section-relative symbols staying section-relative,
and actually have several sections in the linker script solely for this
purpose.
See for example
http://sourceware.org/bugzilla/show_bug.cgi?id=14052
We could just black-list the buggy linker, but it appears that it got
shipped in at least F17, and possibly other distros too, so it's sadly
not some rare unusual case.
This backports the workaround from the x86/trampoline branch, and as
Peter says: "This is not a minimal fix, not at all, but it is a tested
code base."
* 'x86/ld-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86, relocs: When printing an error, say relative or absolute
x86, relocs: Workaround for binutils 2.22.52.0.1 section bug
x86, realmode: 16-bit real-mode code support for relocs tool
(*) That's a manly release numbering system. Stupid, sure. But manly.
Linus Torvalds [Sat, 19 May 2012 17:12:17 +0000 (10:12 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block layer fixes from Jens Axboe:
"A few small, but important fixes. Most of them are marked for stable
as well
- Fix failure to release a semaphore on error path in mtip32xx.
- Fix crashable condition in bio_get_nr_vecs().
- Don't mark end-of-disk buffers as mapped, limit it to i_size.
- Fix for build problem with CONFIG_BLOCK=n on arm at least.
- Fix for a buffer overlow on UUID partition printing.
- Trivial removal of unused variables in dac960."
* 'for-linus' of git://git.kernel.dk/linux-block:
block: fix buffer overflow when printing partition UUIDs
Fix blkdev.h build errors when BLOCK=n
bio allocation failure due to bio_get_nr_vecs()
block: don't mark buffers beyond end of disk as mapped
mtip32xx: release the semaphore on an error path
dac960: Remove unused variables from DAC960_CreateProcEntries()
Linus Torvalds [Sat, 19 May 2012 17:10:59 +0000 (10:10 -0700)]
Merge git://git./linux/kernel/git/davem/net
Pull one more networking bug-fix from David Miller:
"One last straggler.
Eric Dumazet's pktgen unload oops fix was not entirely complete, but
all the cases should be handled properly now.... fingers crossed."
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
pktgen: fix module unload for good
Hugh Dickins [Fri, 18 May 2012 18:28:34 +0000 (11:28 -0700)]
memcg,thp: fix res_counter:96 regression
Occasionally, testing memcg's move_charge_at_immigrate on rc7 shows
a flurry of hundreds of warnings at kernel/res_counter.c:96, where
res_counter_uncharge_locked() does WARN_ON(counter->usage < val).
The first trace of each flurry implicates __mem_cgroup_cancel_charge()
of mc.precharge, and an audit of mc.precharge handling points to
mem_cgroup_move_charge_pte_range()'s THP handling in commit
12724850e806
("memcg: avoid THP split in task migration").
Checking !mc.precharge is good everywhere else, when a single page is to
be charged; but here the "mc.precharge -= HPAGE_PMD_NR" likely to
follow, is liable to result in underflow (a lot can change since the
precharge was estimated).
Simply check against HPAGE_PMD_NR: there's probably a better
alternative, trying precharge for more, splitting if unsuccessful; but
this one-liner is safer for now - no kernel/res_counter.c:96 warnings
seen in 26 hours.
Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
H. Peter Anvin [Fri, 18 May 2012 16:52:01 +0000 (09:52 -0700)]
x86, relocs: When printing an error, say relative or absolute
When the relocs tool throws an error, let the error message say if it
is an absolute or relative symbol. This should make it a lot more
clear what action the programmer needs to take and should help us find
the reason if additional symbol bugs show up.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: <stable@vger.kernel.org>
H. Peter Anvin [Fri, 18 May 2012 07:24:09 +0000 (00:24 -0700)]
x86, relocs: Workaround for binutils 2.22.52.0.1 section bug
GNU ld 2.22.52.0.1 has a bug that it blindly changes symbols from
section-relative to absolute if they are in a section of zero length.
This turns the symbols __init_begin and __init_end into absolute
symbols. Let the relocs program know that those should be treated as
relative symbols.
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: H.J. Lu <hjl.tools@gmail.com>
Cc: <stable@vger.kernel.org>
Cc: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
H. Peter Anvin [Tue, 8 May 2012 18:22:24 +0000 (21:22 +0300)]
x86, realmode: 16-bit real-mode code support for relocs tool
A new option is added to the relocs tool called '--realmode'.
This option causes the generation of 16-bit segment relocations
and 32-bit linear relocations for the real-mode code. When
the real-mode code is moved to the low-memory during kernel
initialization, these relocation entries can be used to
relocate the code properly.
In the assembly code 16-bit segment relocations must be relative
to the 'real_mode_seg' absolute symbol. Linear relocations must be
relative to a symbol prefixed with 'pa_'.
16-bit segment relocation is used to load cs:ip in 16-bit code.
Linear relocations are used in the 32-bit code for relocatable
data references. They are declared in the linker script of the
real-mode code.
The relocs tool is moved to arch/x86/tools/relocs.c, and added new
target archscripts that can be used to build scripts needed building
an architecture. be compiled before building the arch/x86 tree.
[ hpa: accelerating this because it detects invalid absolute
relocations, a serious bug in binutils 2.22.52.0.x which currently
produces bad kernels. ]
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Link: http://lkml.kernel.org/r/1336501366-28617-2-git-send-email-jarkko.sakkinen@intel.com
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: <stable@vger.kernel.org>
Linus Torvalds [Sat, 19 May 2012 01:22:45 +0000 (18:22 -0700)]
Merge tag 'dm-3.4-fixes-2' of git://git./linux/kernel/git/agk/linux-dm
Pull a dm fix from Alasdair G Kergon:
"A fix to the thin provisioning userspace interface."
* tag 'dm-3.4-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm:
dm thin: fix table output when pool target disables discard passdown internally
Mike Snitzer [Sat, 19 May 2012 00:01:01 +0000 (01:01 +0100)]
dm thin: fix table output when pool target disables discard passdown internally
When the thin pool target clears the discard_passdown parameter
internally, it incorrectly changes the table line reported to userspace.
This breaks dumb string comparisons on these table lines in generic
userspace device-mapper library code and leads to tables being reloaded
repeatedly when nothing is actually meant to be changing.
This patch corrects this by no longer changing the table line when
discard passdown was disabled.
We can still tell when discard passdown is overridden by looking for the
message "Discard unsupported by data device (sdX): Disabling discard passdown."
This automatic detection is also moved from the 'load' to the 'resume'
so that it is re-evaluated should the properties of underlying devices
change.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Acked-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Linus Torvalds [Fri, 18 May 2012 23:19:59 +0000 (16:19 -0700)]
Merge tag 'md-3.4-fixes' of git://neil.brown.name/md
Pull one more md bugfix from NeilBrown:
"Fix bug in recent fix to RAID10.
Without this patch, recovery will crash"
* tag 'md-3.4-fixes' of git://neil.brown.name/md:
md/raid10: fix transcription error in calc_sectors conversion.
Linus Torvalds [Fri, 18 May 2012 23:16:42 +0000 (16:16 -0700)]
Merge branch 'stable' of git://git./linux/kernel/git/cmetcalf/linux-tile
Pull tile tree bugfix from Chris Metcalf:
"This fixes a security vulnerability (and correctness bug) in tilegx"
* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
tilegx: enable SYSCALL_WRAPPERS support
NeilBrown [Fri, 18 May 2012 23:01:13 +0000 (09:01 +1000)]
md/raid10: fix transcription error in calc_sectors conversion.
The old code was
sector_div(stride, fc);
the new code was
sector_dir(size, conf->near_copies);
'size' is right (the stride various wasn't really needed), but
'fc' means 'far_copies', and that is an important difference.
Signed-off-by: NeilBrown <neilb@suse.de>
Linus Torvalds [Fri, 18 May 2012 22:56:25 +0000 (15:56 -0700)]
Merge branch 'akpm' (Andrew's patch-bomb)
Merge misc fixes from Andrew Morton.
* emailed from Andrew Morton <akpm@linux-foundation.org>: (4 patches)
frv: delete incorrect task prototypes causing compile fail
slub: missing test for partial pages flush work in flush_all()
fs, proc: fix ABBA deadlock in case of execution attempt of map_files/ entries
drivers/rtc/rtc-pl031.c: configure correct wday for 2000-01-01
Linus Torvalds [Fri, 18 May 2012 18:32:15 +0000 (11:32 -0700)]
proc: move fd symlink i_mode calculations into tid_fd_revalidate()
Instead of doing the i_mode calculations at proc_fd_instantiate() time,
move them into tid_fd_revalidate(), which is where the other inode state
(notably uid/gid information) is updated too.
Otherwise we'll end up with stale i_mode information if an fd is re-used
while the dentry still hangs around. Not that anything really *cares*
(symlink permissions don't really matter), but Tetsuo Handa noticed that
the owner read/write bits don't always match the state of the
readability of the file descriptor, and we _used_ to get this right a
long time ago in a galaxy far, far away.
Besides, aside from fixing an ugly detail (that has apparently been this
way since commit
61a28784028e: "proc: Remove the hard coded inode
numbers" in 2006), this removes more lines of code than it adds. And it
just makes sense to update i_mode in the same place we update i_uid/gid.
Al Viro correctly points out that we could just do the inode fill in the
inode iops ->getattr() function instead. However, that does require
somewhat slightly more invasive changes, and adds yet *another* lookup
of the file descriptor. We need to do the revalidate() for other
reasons anyway, and have the file descriptor handy, so we might as well
fill in the information at this point.
Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Eric Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Dumazet [Thu, 17 May 2012 23:52:26 +0000 (23:52 +0000)]
pktgen: fix module unload for good
commit
c57b5468406 (pktgen: fix crash at module unload) did a very poor
job with list primitives.
1) list_splice() arguments were in the wrong order
2) list_splice(list, head) has undefined behavior if head is not
initialized.
3) We should use the list_splice_init() variant to clear pktgen_threads
list.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Chris Metcalf [Fri, 18 May 2012 17:33:24 +0000 (13:33 -0400)]
tilegx: enable SYSCALL_WRAPPERS support
Some discussion with the glibc mailing lists revealed that this was
necessary for 64-bit platforms with MIPS-like sign-extension rules
for 32-bit values. The original symptom was that passing (uid_t)-1 to
setreuid() was failing in programs linked -pthread because of the "setxid"
mechanism for passing setxid-type function arguments to the syscall code.
SYSCALL_WRAPPERS handles ensuring that all syscall arguments end up with
proper sign-extension and is thus the appropriate fix for this problem.
On other platforms (s390, powerpc, sparc64, and mips) this was fixed
in 2.6.28.6. The general issue is tracked as CVE-2009-0029.
Cc: <stable@vger.kernel.org>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Linus Torvalds [Fri, 18 May 2012 16:42:20 +0000 (09:42 -0700)]
Merge tag 'linus-mce-fix' of git://git./linux/kernel/git/ras/ras
Pull a machine check recovery fix from Tony Luck.
I really don't like how the MCE code does some of the things it does,
but this does seem to be an improvement.
* tag 'linus-mce-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
x86/mce: Only restart instruction after machine check recovery if it is safe
Paul Gortmaker [Fri, 18 May 2012 00:03:26 +0000 (17:03 -0700)]
frv: delete incorrect task prototypes causing compile fail
Commit
41101809a865 ("fork: Provide weak arch_release_[task_struct|
thread_info] functions") in -tip highlights a problem in the frv arch,
where it has needles prototypes for alloc_task_struct_node and
free_task_struct. This now shows up as:
kernel/fork.c:120:66: error: static declaration of 'alloc_task_struct_node' follows non-static declaration
kernel/fork.c:127:51: error: static declaration of 'free_task_struct' follows non-static declaration
since that commit turned them into real functions. Since arch/frv does
does not define define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR (i.e. it just
uses the generic ones) it shouldn't list these at all.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
majianpeng [Fri, 18 May 2012 00:03:26 +0000 (17:03 -0700)]
slub: missing test for partial pages flush work in flush_all()
I found some kernel messages such as:
SLUB raid5-md127: kmem_cache_destroy called for cache that still has objects.
Pid: 6143, comm: mdadm Tainted: G O 3.4.0-rc6+ #75
Call Trace:
kmem_cache_destroy+0x328/0x400
free_conf+0x2d/0xf0 [raid456]
stop+0x41/0x60 [raid456]
md_stop+0x1a/0x60 [md_mod]
do_md_stop+0x74/0x470 [md_mod]
md_ioctl+0xff/0x11f0 [md_mod]
blkdev_ioctl+0xd8/0x7a0
block_ioctl+0x3b/0x40
do_vfs_ioctl+0x96/0x560
sys_ioctl+0x91/0xa0
system_call_fastpath+0x16/0x1b
Then using kmemleak I found these messages:
unreferenced object 0xffff8800b6db7380 (size 112):
comm "mdadm", pid 5783, jiffies
4294810749 (age 90.589s)
hex dump (first 32 bytes):
01 01 db b6 ad 4e ad de ff ff ff ff ff ff ff ff .....N..........
ff ff ff ff ff ff ff ff 98 40 4a 82 ff ff ff ff .........@J.....
backtrace:
kmemleak_alloc+0x21/0x50
kmem_cache_alloc+0xeb/0x1b0
kmem_cache_open+0x2f1/0x430
kmem_cache_create+0x158/0x320
setup_conf+0x649/0x770 [raid456]
run+0x68b/0x840 [raid456]
md_run+0x529/0x940 [md_mod]
do_md_run+0x18/0xc0 [md_mod]
md_ioctl+0xba8/0x11f0 [md_mod]
blkdev_ioctl+0xd8/0x7a0
block_ioctl+0x3b/0x40
do_vfs_ioctl+0x96/0x560
sys_ioctl+0x91/0xa0
system_call_fastpath+0x16/0x1b
This bug was introduced by commit
a8364d5555b ("slub: only IPI CPUs that
have per cpu obj to flush"), which did not include checks for per cpu
partial pages being present on a cpu.
Signed-off-by: majianpeng <majianpeng@gmail.com>
Cc: Gilad Ben-Yossef <gilad@benyossef.com>
Acked-by: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Tested-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cyrill Gorcunov [Fri, 18 May 2012 00:03:25 +0000 (17:03 -0700)]
fs, proc: fix ABBA deadlock in case of execution attempt of map_files/ entries
map_files/ entries are never supposed to be executed, still curious
minds might try to run them, which leads to the following deadlock
======================================================
[ INFO: possible circular locking dependency detected ]
3.4.0-rc4-24406-g841e6a6 #121 Not tainted
-------------------------------------------------------
bash/1556 is trying to acquire lock:
(&sb->s_type->i_mutex_key#8){+.+.+.}, at: do_lookup+0x267/0x2b1
but task is already holding lock:
(&sig->cred_guard_mutex){+.+.+.}, at: prepare_bprm_creds+0x2d/0x69
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (&sig->cred_guard_mutex){+.+.+.}:
validate_chain+0x444/0x4f4
__lock_acquire+0x387/0x3f8
lock_acquire+0x12b/0x158
__mutex_lock_common+0x56/0x3a9
mutex_lock_killable_nested+0x40/0x45
lock_trace+0x24/0x59
proc_map_files_lookup+0x5a/0x165
__lookup_hash+0x52/0x73
do_lookup+0x276/0x2b1
walk_component+0x3d/0x114
do_last+0xfc/0x540
path_openat+0xd3/0x306
do_filp_open+0x3d/0x89
do_sys_open+0x74/0x106
sys_open+0x21/0x23
tracesys+0xdd/0xe2
-> #0 (&sb->s_type->i_mutex_key#8){+.+.+.}:
check_prev_add+0x6a/0x1ef
validate_chain+0x444/0x4f4
__lock_acquire+0x387/0x3f8
lock_acquire+0x12b/0x158
__mutex_lock_common+0x56/0x3a9
mutex_lock_nested+0x40/0x45
do_lookup+0x267/0x2b1
walk_component+0x3d/0x114
link_path_walk+0x1f9/0x48f
path_openat+0xb6/0x306
do_filp_open+0x3d/0x89
open_exec+0x25/0xa0
do_execve_common+0xea/0x2f9
do_execve+0x43/0x45
sys_execve+0x43/0x5a
stub_execve+0x6c/0xc0
This is because prepare_bprm_creds grabs task->signal->cred_guard_mutex
and when do_lookup happens we try to grab task->signal->cred_guard_mutex
again in lock_trace.
Fix it using plain ptrace_may_access() helper in proc_map_files_lookup()
and in proc_map_files_readdir() instead of lock_trace(), the caller must
be CAP_SYS_ADMIN granted anyway.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Reported-by: Sasha Levin <levinsasha928@gmail.com>
Cc: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: Dave Jones <davej@redhat.com>
Cc: Vasiliy Kulikov <segoon@openwall.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Rajkumar Kasirajan [Fri, 18 May 2012 00:03:24 +0000 (17:03 -0700)]
drivers/rtc/rtc-pl031.c: configure correct wday for 2000-01-01
The reset date of the ST Micro version of PL031 is 2000-01-01. The
correct weekday for 2000-01-01 is saturday, but pl031 is initialized to
sunday. This may lead to alarm malfunction, so configure the correct
wday if RTC_DR indicates reset.
Signed-off-by: Rajkumar Kasirajan <rajkumar.kasirajan@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Mattias Wallin <mattias.wallin@stericsson.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Thu, 17 May 2012 23:52:29 +0000 (16:52 -0700)]
Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM fixes from Russell King:
"Small set of fixes again."
* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
ARM: 7419/1: vfp: fix VFP flushing regression on sigreturn path
ARM: 7418/1: LPAE: fix access flag setup in mem_type_table
ARM: prevent VM_GROWSDOWN mmaps extending below FIRST_USER_ADDRESS
ARM: 7417/1: vfp: ensure preemption is disabled when enabling VFP access
Linus Torvalds [Thu, 17 May 2012 23:30:26 +0000 (16:30 -0700)]
Merge git://git./linux/kernel/git/davem/net
Pull two networking fixes from David S. Miller:
1) Thanks to Willy Tarreau and Eric Dumazet, we've unlocked a bug that's
been present in do_tcp_sendpages() since that function was written in
2002.
When we block to wait for memory we have to unconditionally try and
push out pending TCP data, otherwise we can block for an unreasonably
long amount of time.
2) Fix deadlock in e1000, fixes kernel bugzilla 43132
From Tushar Dave.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
e1000: Prevent reset task killing itself.
tcp: do_tcp_sendpages() must try to push data out on oom conditions
Rafael J. Wysocki [Thu, 17 May 2012 22:39:35 +0000 (00:39 +0200)]
ACPI / PCI / PM: Fix device PM regression related to D3hot/D3cold
Commit
1cc0c998fdf2 ("ACPI: Fix D3hot v D3cold confusion") introduced a
bug in __acpi_bus_set_power() and changed the behavior of
acpi_pci_set_power_state() in such a way that it generally doesn't work
as expected if PCI_D3hot is passed to it as the second argument.
First off, if ACPI_STATE_D3 (equal to ACPI_STATE_D3_COLD) is passed to
__acpi_bus_set_power() and the explicit_set flag is set for the D3cold
state, the function will try to execute AML method called "_PS4", which
doesn't exist.
Fix this by adding a check to ensure that the name of the AML method
to execute for transitions to ACPI_STATE_D3_COLD is correct in
__acpi_bus_set_power(). Also make sure that the explicit_set flag
for ACPI_STATE_D3_COLD will be set if _PS3 is present and modify
acpi_power_transition() to avoid accessing power resources for
ACPI_STATE_D3_COLD, because they don't exist.
Second, if PCI_D3hot is passed to acpi_pci_set_power_state() as the
target state, the function will request a transition to
ACPI_STATE_D3_HOT instead of ACPI_STATE_D3. However,
ACPI_STATE_D3_HOT is now only marked as supported if the _PR3 AML
method is defined for the given device, which is rare. This causes
problems to happen on systems where devices were successfully put
into ACPI D3 by pci_set_power_state(PCI_D3hot) which doesn't work
now. In particular, some unused graphics adapters are not turned
off as a result.
To fix this issue restore the old behavior of
acpi_pci_set_power_state(), which is to request a transition to
ACPI_STATE_D3 (equal to ACPI_STATE_D3_COLD) if either PCI_D3hot or
PCI_D3cold is passed to it as the argument.
This approach is not ideal, because generally power should not
be removed from devices if PCI_D3hot is the target power state,
but since this behavior is relied on, we have no choice but to
restore it at the moment and spend more time on designing a
better solution in the future.
References: https://bugzilla.kernel.org/show_bug.cgi?id=43228
Reported-by: rocko <rockorequin@hotmail.com>
Reported-by: Cristian RodrÃguez <crrodriguez@opensuse.org>
Reported-and-tested-by: Peter <lekensteyn@gmail.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tushar Dave [Thu, 17 May 2012 01:04:50 +0000 (01:04 +0000)]
e1000: Prevent reset task killing itself.
Killing reset task while adapter is resetting causes deadlock.
Only kill reset task if adapter is not resetting.
Ref bug #43132 on bugzilla.kernel.org
CC: stable@vger.kernel.org
Signed-off-by: Tushar Dave <tushar.n.dave@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Willy Tarreau [Thu, 17 May 2012 11:14:14 +0000 (11:14 +0000)]
tcp: do_tcp_sendpages() must try to push data out on oom conditions
Since recent changes on TCP splicing (starting with commits
2f533844
"tcp: allow splice() to build full TSO packets" and
35f9c09f "tcp:
tcp_sendpages() should call tcp_push() once"), I started seeing
massive stalls when forwarding traffic between two sockets using
splice() when pipe buffers were larger than socket buffers.
Latest changes (net: netdev_alloc_skb() use build_skb()) made the
problem even more apparent.
The reason seems to be that if do_tcp_sendpages() fails on out of memory
condition without being able to send at least one byte, tcp_push() is not
called and the buffers cannot be flushed.
After applying the attached patch, I cannot reproduce the stalls at all
and the data rate it perfectly stable and steady under any condition
which previously caused the problem to be permanent.
The issue seems to have been there since before the kernel migrated to
git, which makes me think that the stalls I occasionally experienced
with tux during stress-tests years ago were probably related to the
same issue.
This issue was first encountered on 3.0.31 and 3.2.17, so please backport
to -stable.
Signed-off-by: Willy Tarreau <w@1wt.eu>
Acked-by: Eric Dumazet <edumazet@google.com>
Cc: <stable@vger.kernel.org>
Linus Torvalds [Thu, 17 May 2012 20:25:17 +0000 (13:25 -0700)]
Merge branch '3.4-urgent' of git://git./linux/kernel/git/nab/target-pending
Pull two more target-core updates from Nicholas Bellinger:
"The first patch addresses a SPC-2 reservations RELEASE bug in a
special (iscsi specific) multi-ISID setup case that was allowing the
same initiator to be able to incorrect release it's own reservation on
a different SCSI path with enforce_pr_isid=1 operation. This bug was
caught by Bernhard Kohl.
The second patch is to address a bug with FILEIO backends where the
incorrect number of blocks for READ_CAPACITY was being reported after
an underlying device-mapper block_device size change. This patch uses
now i_size_read() in fd_get_blocks() for FILEIO backends with an
underlying block_device, instead of trying to determine this value at
setup time during fd_create_virtdevice(). (hch CC'ed)
Both are CC'ed to stable."
* '3.4-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
target: Fix bug in handling of FILEIO + block_device resize ops
target: Fix SPC-2 RELEASE bug for multi-session iSCSI client setups
Nicholas Bellinger [Wed, 16 May 2012 23:05:26 +0000 (16:05 -0700)]
target: Fix bug in handling of FILEIO + block_device resize ops
This patch fixes a bug in the handling of FILEIO w/ underlying block_device
resize operations where the original fd_dev->fd_dev_size was incorrectly being
used in fd_get_blocks() for READ_CAPACITY response payloads.
This patch avoids using fd_dev->fd_dev_size for FILEIO devices with
an underlying block_device, and instead changes fd_get_blocks() to
get the sector count directly from i_size_read() as recommended by hch.
Reported-by: Christoph Hellwig <hch@lst.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Linus Torvalds [Thu, 17 May 2012 16:57:13 +0000 (09:57 -0700)]
Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Pull slave-dmaengine fixes fromVinod Koul:
"fixes of cylic dma usages in slave dma drivers"
* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
dmaengine: fix cyclic dma usage
dmaengine: pl330: dont complete descriptor for cyclic dma
Linus Torvalds [Thu, 17 May 2012 16:55:58 +0000 (09:55 -0700)]
Merge tag 'for_linus' of git://git./linux/kernel/git/mst/vhost
Pull last minute virtio fixes from Michael S. Tsirkin:
"Here are a couple of last minute virtio fixes for 3.4. Hope it's not
too late yes - I might have tried too hard to make sure the fix is
well tested.
Fixes are by Amit and myself. One fixes module removal and one
suspend of a VM, the last one the handling of out of memory condition.
They are thus very low risk as most people never hit these paths, but
do fix very annoying problems for people that do use the feature.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>"
* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
virtio_net: invoke softirqs after __napi_schedule
virtio: balloon: let host know of updated balloon size before module removal
virtio: console: tell host of open ports after resume from s3/s4
Linus Torvalds [Thu, 17 May 2012 16:46:07 +0000 (09:46 -0700)]
Merge tag 'fixes-for-linus' of git://git./linux/kernel/git/arm/arm-soc
Pull ARM: SoC fixes from Olof Johansson:
"I will stop trying to predict when we're done with fixes for a
release.
Here's another small batch of three patches for arm-soc:
- A fix for a boot time WARN_ON() due to irq domain conversion on
PRIMA2
- Fix for a regression in Tegra SMP spinup code due to swapped
register offsets
- Fixed config dependency for mv_cesa crypto driver to avoid build
breakage"
* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
ARM: PRIMA2: fix irq domain size and IRQ mask of internal interrupt controller
crypto: mv_cesa requires on CRYPTO_HASH to build
ARM: tegra: Fix flow controller accesses
Linus Torvalds [Thu, 17 May 2012 16:44:35 +0000 (09:44 -0700)]
Merge tag 'md-3.4-fixes' of git://neil.brown.name/md
Pull two md fixes from NeilBrown:
"One fixes a bug in the new raid10 resize code so is relevant to 3.4
only.
The other fixes a bug in the use of md by dm-raid, so is relevant to
any kernel with dm-raid support"
* tag 'md-3.4-fixes' of git://neil.brown.name/md:
MD: Add del_timer_sync to mddev_suspend (fix nasty panic)
md/raid10: set dev_sectors properly when resizing devices in array.
Linus Torvalds [Thu, 17 May 2012 16:35:17 +0000 (09:35 -0700)]
Merge branches 'perf-urgent-for-linus', 'x86-urgent-for-linus' and 'sched-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
Pull perf, x86 and scheduler updates from Ingo Molnar.
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
tracing: Do not enable function event with enable
perf stat: handle ENXIO error for perf_event_open
perf: Turn off compiler warnings for flex and bison generated files
perf stat: Fix case where guest/host monitoring is not supported by kernel
perf build-id: Fix filename size calculation
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86, kvm: KVM paravirt kernels don't check for CPUID being unavailable
x86: Fix section annotation of acpi_map_cpu2node()
x86/microcode: Ensure that module is only loaded on supported Intel CPUs
* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched: Fix KVM and ia64 boot crash due to sched_groups circular linked list assumption
Will Deacon [Tue, 15 May 2012 14:51:54 +0000 (15:51 +0100)]
ARM: 7419/1: vfp: fix VFP flushing regression on sigreturn path
Commit
ff9a184c ("ARM: 7400/1: vfp: clear fpscr length and stride bits
on entry to sig handler") flushes the VFP state prior to entering a
signal handler so that a VFP operation inside the handler will trap and
force a restore of ABI-compliant registers. Reflushing and disabling VFP
on the sigreturn path is predicated on the saved thread state indicating
that VFP was used by the handler -- however for SMP platforms this is
only set on context-switch, making the check unreliable and causing VFP
register corruption in userspace since the register values are not
necessarily those restored from the sigframe.
This patch unconditionally flushes the VFP state after a signal handler.
Since we already perform the flush before the handler and the flushing
itself happens lazily, the redundant flush when VFP is not used by the
handler is essentially a nop.
Reported-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Vitaly Andrianov [Tue, 15 May 2012 14:01:16 +0000 (15:01 +0100)]
ARM: 7418/1: LPAE: fix access flag setup in mem_type_table
A zero value for prot_sect in the memory types table implies that
section mappings should never be created for the memory type in question.
This is checked for in alloc_init_section().
With LPAE, we set a bit to mask access flag faults for kernel mappings.
This breaks the aforementioned (!prot_sect) check in alloc_init_section().
This patch fixes this bug by first checking for a non-zero
prot_sect before setting the PMD_SECT_AF flag.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Michael S. Tsirkin [Wed, 16 May 2012 07:57:12 +0000 (10:57 +0300)]
virtio_net: invoke softirqs after __napi_schedule
__napi_schedule might raise softirq but nothing
causes do_softirq to trigger, so it does not in fact
run. As a result,
the error message "NOHZ: local_softirq_pending 08"
sometimes occurs during boot of a KVM guest when the network service is
started and we are oom:
...
Bringing up loopback interface: [ OK ]
Bringing up interface eth0:
Determining IP information for eth0...NOHZ: local_softirq_pending 08
done.
[ OK ]
...
Further, receive queue processing might get delayed
indefinitely until some interrupt triggers:
virtio_net expected napi to be run immediately.
One way to cause do_softirq to be executed is by
invoking local_bh_enable(). As __napi_schedule is
normally called from bh or irq context, this
seems to make sense: disable bh before __napi_schedule
and enable afterwards.
In fact it's a very complicated way of calling do_softirq(),
and works since this function is only used when we are not
in interrupt context. It's not hot at all, in any ideal scenario.
Reported-by: Ulrich Obergfell <uobergfe@redhat.com>
Tested-by: Ulrich Obergfell <uobergfe@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Amit Shah [Thu, 26 Apr 2012 19:15:56 +0000 (00:45 +0530)]
virtio: balloon: let host know of updated balloon size before module removal
When the balloon module is removed, we deflate the balloon, reclaiming
all the pages that were given to the host. However, we don't update the
config values for the new balloon size, resulting in the host showing
outdated balloon values.
The size update is done after each leak and fill operation, only the
module removal case was left out.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Amit Shah [Wed, 25 Apr 2012 09:10:39 +0000 (14:40 +0530)]
virtio: console: tell host of open ports after resume from s3/s4
If a port was open before going into one of the sleep states, the port
can continue normal operation after restore. However, the host has to
be told that the guest side of the connection is open to restore
pre-suspend state.
This wasn't noticed so far due to a bug in qemu that was fixed recently
(which marked the guest-side connection as always open).
CC: stable@vger.kernel.org # Only for 3.3
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Barry Song [Thu, 17 May 2012 03:28:55 +0000 (11:28 +0800)]
ARM: PRIMA2: fix irq domain size and IRQ mask of internal interrupt controller
the old codes will cause 3.4 kernel warning as irq domain size is wrong:
------------[ cut here ]------------
WARNING: at kernel/irq/irqdomain.c:74 irq_domain_legacy_revmap+0x24/0x48()
Modules linked in:
[<
c0013f50>] (unwind_backtrace+0x0/0xf8) from [<
c001e7d8>] (warn_slowpath_common+0x54/0x64)
[<
c001e7d8>] (warn_slowpath_common+0x54/0x64) from [<
c001e804>] (warn_slowpath_null+0x1c/0x24)
[<
c001e804>] (warn_slowpath_null+0x1c/0x24) from [<
c005c3c4>] (irq_domain_legacy_revmap+0x24/0x48)
[<
c005c3c4>] (irq_domain_legacy_revmap+0x24/0x48) from [<
c005c704>] (irq_create_mapping+0x20/0x120)
[<
c005c704>] (irq_create_mapping+0x20/0x120) from [<
c005c880>] (irq_create_of_mapping+0x7c/0xf0)
[<
c005c880>] (irq_create_of_mapping+0x7c/0xf0) from [<
c01a6c48>] (irq_of_parse_and_map+0x2c/0x34)
[<
c01a6c48>] (irq_of_parse_and_map+0x2c/0x34) from [<
c01a6c68>] (of_irq_to_resource+0x18/0x74)
[<
c01a6c68>] (of_irq_to_resource+0x18/0x74) from [<
c01a6ce8>] (of_irq_count+0x24/0x34)
[<
c01a6ce8>] (of_irq_count+0x24/0x34) from [<
c01a7220>] (of_device_alloc+0x58/0x158)
[<
c01a7220>] (of_device_alloc+0x58/0x158) from [<
c01a735c>] (of_platform_device_create_pdata+0x3c/0x80)
[<
c01a735c>] (of_platform_device_create_pdata+0x3c/0x80) from [<
c01a7468>] (of_platform_bus_create+0xc8/0x190)
[<
c01a7468>] (of_platform_bus_create+0xc8/0x190) from [<
c01a74cc>] (of_platform_bus_create+0x12c/0x190)
---[ end trace
1b75b31a2719ed32 ]---
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Jonathan Brassow [Wed, 16 May 2012 09:06:14 +0000 (04:06 -0500)]
MD: Add del_timer_sync to mddev_suspend (fix nasty panic)
Use del_timer_sync to remove timer before mddev_suspend finishes.
We don't want a timer going off after an mddev_suspend is called. This is
especially true with device-mapper, since it can call the destructor function
immediately following a suspend. This results in the removal (kfree) of the
structures upon which the timer depends - resulting in a very ugly panic.
Therefore, we add a del_timer_sync to mddev_suspend to prevent this.
Cc: stable@vger.kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
NeilBrown [Thu, 17 May 2012 00:08:45 +0000 (10:08 +1000)]
md/raid10: set dev_sectors properly when resizing devices in array.
raid10 stores dev_sectors in 'conf' separately from the one in
'mddev' because it can have a very significant effect on block
addressing and so need to be updated carefully.
However raid10_resize isn't updating it at all!
To update it correctly, we need to make sure it is a proper
multiple of the chunksize taking various details of the layout
in to account.
This calculation is currently done in setup_conf. So split it
out from there and call it from raid10_resize as well.
Then set conf->dev_sectors properly.
Signed-off-by: NeilBrown <neilb@suse.de>
Linus Torvalds [Wed, 16 May 2012 21:30:51 +0000 (14:30 -0700)]
Merge git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull kvm powerpc fixes from Marcelo Tosatti:
"Urgent KVM PPC updates, quoting Alexander Graf:
There are a few bugs in 3.4 that really should be fixed before
people can be all happy and fuzzy about KVM on PowerPC. These fixes
are:
* fix POWER7 bare metal with PR=y
* fix deadlock on HV=y book3s_64 mode in low memory cases
* fix invalid MMU scope of PR=y mode on book3s_64, possibly eading
to memory corruption"
* git://git.kernel.org/pub/scm/virt/kvm/kvm:
KVM: PPC: Book3S HV: Fix bug leading to deadlock in guest HPT updates
powerpc/kvm: Fix VSID usage in 64-bit "PR" KVM
KVM: PPC: Book3S: PR: Fix hsrr code
KVM: PPC: Fix PR KVM on POWER7 bare metal
KVM: PPC: Book3S: PR: Handle EMUL_ASSIST
Linus Torvalds [Wed, 16 May 2012 21:29:45 +0000 (14:29 -0700)]
Merge tag 'sound-3.4' of git://git./linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"A few last-minute regression fixes for 3.4 final kernel. All trivial,
and Cc'ed to stable kernel."
* tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ASoC: wm8994: Fix AIF2ADC power down
ALSA: hda/idt - Fix power-map for speaker-pins with some HP laptops
ASoC: cs42l73: Sync digital mixer kcontrols to allow for 0dB
Linus Torvalds [Wed, 16 May 2012 21:26:05 +0000 (14:26 -0700)]
Merge tag 'rproc-for-linus' of git://git./linux/kernel/git/ohad/remoteproc
Pull remoteproc fix from Ohad Ben-Cohen:
"Fix a nasty off-by-one remoteproc bug which leaks memory when a remote
processor is shut down and, on certain circumstances, can indirectly
prevent it from being reloaded."
* tag 'rproc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc:
remoteproc: fix off-by-one bug in __rproc_free_vrings