dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

311769 Commits

Author SHA1 Message Date
Michael Neuling 4404a9f98f powerpc/pasemi: Move lbz/stbciz to ppc-opcode.h
move lbz/stbciz to ppc-opcode.h.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-07-10 19:18:00 +10:00
Michael Neuling 9a13a524ba powerpc: Convert to %r for all GPR usage
Now all the fixes are in place, let's rock-n-roll!

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-07-10 19:17:58 +10:00
Michael Neuling c75df6f96c powerpc: Fix usage of register macros getting ready for %r0 change
Anything that uses a constructed instruction (ie. from ppc-opcode.h),
need to use the new R0 macro, as %r0 is not going to work.

Also convert usages of macros where we are just determining an offset
(usually for a load/store), like:
	std	r14,STK_REG(r14)(r1)
Can't use STK_REG(r14) as %r14 doesn't work in the STK_REG macro since
it's just calculating an offset.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-07-10 19:17:55 +10:00
Michael Neuling 564aa5cfd3 powerpc: Modify macro ready for %r0 register change
The assembler doesn't take %r0 register arguments in braces, so remove them.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-07-10 19:17:52 +10:00
Michael Neuling 82fff310f1 powerpc: Add defines for R0-R31
We are going to use these later and convert r0 to %r0 etc.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-07-10 19:17:50 +10:00
Benjamin Herrenschmidt 50bba07d6a Merge branch 'merge' into next
We want to bring in the latest IRQ fixes
2012-07-10 19:16:43 +10:00
Benjamin Herrenschmidt 50fb31cfed tty/hvc_opal: Fix debug function name
udbg_init_debug_opal() should be udbg_init_debug_opal_raw() as
the caller in arch/powerpc/kernel/udbg.c expects

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-07-10 19:16:25 +10:00
Benjamin Herrenschmidt aa709f3bc9 powerpc/numa: Avoid stupid uninitialized warning from gcc
Newer gcc are being a bit blind here (it's pretty obvious we don't
reach the code path using the array if we haven't initialized the
pointer) but none of that is performance critical so let's just
silence it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-07-10 19:16:23 +10:00
Benjamin Herrenschmidt 21b2de3412 powerpc: Fix build of some debug irq code
There was a typo, checking for CONFIG_TRACE_IRQFLAG instead of
CONFIG_TRACE_IRQFLAGS causing some useful debug code to not be
built

This in turns causes a build error on BookE 64-bit due to incorrect
semicolons at the end of a couple of macros, so let's fix that too

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: stable@vger.kernel.org [v3.4]
2012-07-10 19:16:20 +10:00
Benjamin Herrenschmidt be2cf20a5a powerpc: More fixes for lazy IRQ vs. idle
Looks like we still have issues with pSeries and Cell idle code
vs. the lazy irq state. In fact, the reset fixes that went upstream
are exposing the problem more by causing BUG_ON() to trigger (which
this patch turns into a WARN_ON instead).

We need to be careful when using a variant of low power state that
has the side effect of turning interrupts back on, to properly set
all the SW & lazy state to look as if everything is enabled before
we enter the low power state with MSR:EE off as we will return with
MSR:EE on. If not, we have a discrepancy of state which can cause
things to go very wrong later on.

This patch moves the logic into a helper and uses it from the
pseries and cell idle code. The power4/970 idle code already got
things right (in assembly even !) so I'm not touching it. The power7
"bare metal" idle code is subtly different and correct. Remains PA6T
and some hypervisor based Cell platforms which have questionable
code in there, but they are mostly dead platforms so I'll fix them
when I manage to get final answers from the respective maintainers
about how the low power state actually works on them.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: stable@vger.kernel.org [v3.4]
2012-07-10 19:16:07 +10:00
Linus Torvalds 2437fccfbf regulator: Fix for 3.5
A smallish fix for a lock dependency issue which affects a bunch of
 Qualcomm boards that do unusually complicated things with their
 regulators, the API is unlikely to be called by any other system.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJP9yyGAAoJEBus8iNuMP3dI24P/RXFIHH1dYck49uQ17moYDY+
 vQBM7amuu23Q9MJxU5rGWaqwxXR8qT3iT76BlL9bt8u91GM4tDrccLRW09+GJXNZ
 1tpFK96iOaH9ju/+FMc0nR9P385YqxRh91ZWDfyAqectBU8nFAtcl+7BakuR/9j/
 2XbftG3T555EylCfwAaw1ikOALxE47ALgKa/Hglu8RDZTQSaWWZb2o20PTXfrkUk
 Mt1Pzs9PMfmgE7VUC6Q04vEydX47L8/iwywanzcbMTKw00d3o5WXTwNqDzcPWGZv
 S9pSGQaZ10JVMO7eu4337fsfIuhUEU0Ilbaow1eLi1RymgDFIamr0SUKcpC1sPDF
 O95l1GZmEwiyDJITL4K1Ssf5TZCKmR9eMh9e1iPmOrtpK4tGHxwqO5+OHmfncISp
 g4x4G7o+aK5M9c3+9r3G7S1ZrV4LAcFLVxN9LHo0PLIG/lT7tl8e6dAlWZjKSRIC
 w18lJ7mdOCXgJqOt4UzIRbWpI0pZaXt0tk1mfU+/vfzhl9C5AVMVNGqgaiafHWGG
 Kh01vjjSIGhfE3k83eOGlkYpTGvFsZBMVUMHif8hRfrBjiHj7RnvAfXqV0ULpa50
 v0huqrPwB+384c2V6K1f6IbpyLXZQ10h4HwctxprKbO+cZZ5oYlxLlu8tkJFvNMD
 QxLC8aDIumuprilMgryd
 =x509
 -----END PGP SIGNATURE-----

Merge tag 'regulator-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fix from Mark Brown:
 "A smallish fix for a lock dependency issue which affects a bunch of
  Qualcomm boards that do unusually complicated things with their
  regulators, the API is unlikely to be called by any other system."

* tag 'regulator-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: Fix recursive mutex lockdep warning
2012-07-09 13:43:02 -07:00
Hans de Goede 6c6ee53c55 gspca_sn9c20x: Fix NULL pointer dereference
Don't call v4l2_ctrl_g_ctrl on ctrls which the model cam in question
does not have.

Reported-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
[ Taken directly, since Mauro is on vacation ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-09 13:42:29 -07:00
Linus Torvalds c5e43b83b0 Theoretical fix, which greatly simplifies upcoming balloon patches which will go in via some vm tree.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJP+hnqAAoJENkgDmzRrbjxkpcP/jl53FUc6M8L9djVSu/5EIxV
 2uLCoGL7kPq2f168VJ4002f1Fa5Irld9h7A4qlqxn8sE/5OGTEvSGnw3/rkoeMeB
 NLjZAFCre+qN0kWFFeZN76TlTGIJpudjsw4EE5fV8CSEbjSRt4SzQ1r8euRKGc0m
 1mqp5rCeUAPrDhRuEyqcqKU36CjDDnNukz1Q1tADgTJ6Q0T8yBZkDqPOIpNy6LCv
 YfazFiZDox7Wx7abPGJga4mIz1OyUR6l4vD8trJHrUaWlirLZE51+Lf69tAXP+Az
 lxvCyiXVTuNuj/TI8FOejWdixmMW3GczeSn7KCzbke1GbUfne1DBfxDImdJg6VbG
 AhQHUqvJAWHuohS5mnJpFCQZIrfkScyXC0gVm+g/dIJTf+4jqirk4DZyHZecznt1
 T5FdleRqO2ws0BMxeD3r/d/q5aUR0ryS08CLzFLP0GDcFgU6wANM87G1Q4IahZ7A
 gUjQ82piy1zzYML3/4r4qPTWAk1BGCYB6yfSVlCSwwhp+U5qER7cvrTugm4/eA6g
 4QkDUlGcwGryN6/VSNIoT6ymIB5SpFgOuAcF011MKl9OMUnOyshsiLz3GuTEGYim
 GZmcJsFnV9rbGTQ2DjYw8fny+DB4wwOTkHjdwVGfKBII3nY4Puc8bzaShqbDj+nH
 G1VIKLiZPmRVgm4cc5jC
 =vMWl
 -----END PGP SIGNATURE-----

Merge tag 'virtio-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus

Pull minor virtio-balloon fix from Rusty Russell:
 "Theoretical fix, which greatly simplifies upcoming balloon patches
  which will go in via some vm tree."

* tag 'virtio-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  virtio-balloon: fix add/get API use
2012-07-09 13:39:56 -07:00
Linus Torvalds 6f5410b688 Fixing two (somewhat rare) endpoint-related race issues, both of which
were reported by Fernando Guzman Lugo.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJP+dsKAAoJELLolMlTRIoMOTEQAK2WOgW4ygXDOfhwZCj4ooXG
 Mk9PUQlEBfEufvKmK/Oh3xDVeP0i4+3BeWZ4Kgmas689SJc+LIbLSS0HtARcYF1+
 ZTEj7Gnax3P3tD6GxwU5bf+jrirCbr5sSeDa7p5jh017zVsZ5MVYOYvWXKQtYAZg
 hi6m2AqOUfkI3yOnWRbNMds+x3TTwpLC/3mT9mcFiJ/3L9SGx22SVfkRIa8tstjg
 i0eJDTu9cbHHZ7wtuGQoVZDO5kHLi7dPKnFTiFat8dklaSNMzNBrs5Tl4DT0XA3s
 tzb+BrnkddL2L36cC0XIyV1L/tQCdtAWLRFx5SDfpXKNQcYpqlMAteaAXdhf4Tjl
 kJapLhGeTVRSED6TvYX9XMFbi4U8PBSBvHd4VMryN1jGcmslE3UYCPIoqOL/aIZP
 dc9POY6JM9r/pMlzhQ6VUmTiecCVeCJyCh8x8r1wj7V1mC1nCxDskxObibHFjRPk
 4xdmke0+UR3fn4/aA/PRZbiy3kpT84lK9SoPlzUKLLBMzJ3KMLl5Dug2+Y8Aeutn
 gBxt9x+FA4UgmS62St97Cu7qbzWvAbpl95rFD4aIANMNxU9OkcjgWaB7aJzr8WWt
 j8Z2OkT0WW4ka60sGj0YxAEDlKhxC8f1lzD5tuJgmVFEbXhNTZaw+GG/ZwIqb5bq
 g7KQY8FnGDETO9Tew1QQ
 =nbt8
 -----END PGP SIGNATURE-----

Merge tag 'rpmsg-3.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/rpmsg

Pull rpmsg fixes from Ohad Ben-Cohen:
 "Fixing two (somewhat rare) endpoint-related race issues, both of which
  were reported by Fernando Guzman Lugo."

* tag 'rpmsg-3.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/rpmsg:
  rpmsg: make sure inflight messages don't invoke just-removed callbacks
  rpmsg: avoid premature deallocation of endpoints
2012-07-09 13:24:00 -07:00
Linus Torvalds 84836bf973 Two build-related remoteproc fixes for 3.5.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJP+dhzAAoJELLolMlTRIoMCLoP/3k+YQ2KjIjIF76v1jS2iJC1
 CgROumUrT+FFo6MCHBAl5TgY/d5uBouKpbMqUp+F3a0mDplh7V8//VAVvLbniKfL
 BWrSZrhy64z7DPz7ad2Dm0q70CaNa8SBegQT8vR8EvE/Oja57+doZXlFJJZolMly
 bC/QLEmCDHZFIkOZ2cR6Gr1Tai+FgeYBySM6YdfA4xjDcof4JzJyaw1F/hnQIt1z
 0o8mtEKUCGyHjn2YxNJna5s3u3rYJYUxFzaxfsBIQNhh12XKAoU1lrNZ9U881rHV
 +kaZ7o5lY0lWwJihGFifZEF5SQemCp+6/wPspKEteMrSGnceDJGKrkBPQT7zokaH
 J3i5wcJ1XlvxqzdhgaBVKWLR72IHWlGz9VuTaarmp9A7N0O65L7NH57VzkS1AKrv
 EhD+zrRQxA107n8kvyCUSC/9dPZVe4+r4UVMhUcTTdel0e5x6TILg+hAkpL4hkWe
 MEXg8++pavAuyxuK/8rjGphMreRaBeyvbtd+rNtQ06CUi+viJE3bLLT5SS5WEQuY
 UfzgapAoJ1sbnjVLECLjhfRrkf7We6QMiUFNYvZPV6/vqmjK24qj0REUPLYyoZvh
 4XPqKOZoFT+kINIINoLhWdHbKXOkIcS+lnq6Ne5ilNv/pz/SE5ybUl63+X6UrKhQ
 vxGVY/Yl6BjEHAmmLoU+
 =jzGC
 -----END PGP SIGNATURE-----

Merge tag 'remoteproc-3.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc

Pull remoteproc fixes from Ohad Ben-Cohen:
 "Two build-related remoteproc fixes for 3.5."

* tag 'remoteproc-3.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc:
  remoteproc: fix missing CONFIG_FW_LOADER configurations
  remoteproc/omap: fix randconfig unmet direct dependencies
2012-07-09 13:23:21 -07:00
Linus Torvalds 17cda2082d A single hwspinlock core fix for multiple hwspinlock devices scenarios,
from Shinya Kuribayashi.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJP+ZcQAAoJELLolMlTRIoMUP8P/iRgrwLmfsUN/w+/PAv8rRCP
 aprvEamj+Jq6DiA63C3Fg6j03mN4ADIzjanqupttMEJekKXyW2mJh2WzDdi5qQ39
 pWBhp8wBl0vIdZXOEpOc3baE82XQFTgv4iTxFmcjXCDRoaOlLJqNGpehs5h4yvRK
 +QoiBfucmoa7atKkOoQxlZQyUZvkuxcSnpZSd4m39ylrk4LTQHoXJ1+6OrBKFeGV
 wzHTO9kGdPdAkpW73TatBMsu2unzLAAO1ImP2ETKL/JlqG8W5NhLZwrEbtq5JKtr
 nUyskUp3xdZYcevXOzZNwTp6uRcdoUUEh3OzT+xEGpoh8V5lU5NSSFOCaR4UQrm+
 lyz1HePAc9nNG7MErpcLu4WSY5xPqukAk3ML07t2zRgzMp/8BUHKDT0n43HJchSO
 JXKz9k0x21hE+uGfyi0euC1dnJpiZxFVIsn5m7YP/WeQdyKpO4EKOi1N7LGWALUh
 s6rE7czWfpXxHfBwXpWpqIVZQsFG8KN19XAe3uEXDZVBMJwFUiJcQxBPJn7nE9Tl
 wQNeD7Lj1It4AyL8zSTRVpLjwXWbzG2LrLx5VhPDgLNGGnoFAmMb+2O6oFutCHwM
 T+zJH7il9IroSArMGDZaGWRc/+EDWTqEBBwm/JFAyAzWw/SIxkJhfdl6IrJ9cMtw
 AvW/7lYyE3EbUfZOR4sX
 =dKmT
 -----END PGP SIGNATURE-----

Merge tag 'hwspinlock-3.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock

Pull hwspinlock fix from Ohad Ben-Cohen:
 "A single hwspinlock core fix for multiple hwspinlock devices
  scenarios, from Shinya Kuribayashi."

* tag 'hwspinlock-3.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock:
  hwspinlock/core: use global ID to register hwspinlocks on multiple devices
2012-07-09 13:22:40 -07:00
Linus Torvalds 17fae1cdea IOMMU fixes for Linux v3.5-rc5
The patches fix several issues in the AMD IOMMU driver, the NVidia SMMU
 driver, and the DMA debug code. The most important fix for the AMD IOMMU
 solves a problem with SR-IOV devices where virtual functions did not
 work with IOMMU enabled. The NVidia SMMU patch fixes a possible sleep
 while spin-lock situation (queued the small fix for v3.5, a better but
 more intrusive fix is coming for v3.6). The DMA debug patches fix a
 possible data corruption issue due to bool vs. u32 usage.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJP8YJLAAoJECvwRC2XARrjv74QAJKyaUoXbhqst84RU1owiFcz
 A2oUC/DwqEGJD3VrixcY6Ih/2SXYuHd+Cpjd2Q8Eyc2gq66aXy7DTm/Rp+TeMxFD
 M65ZZzbbrVeU2Ym7apNeKe3AzaspVRLKThirbCK5/cMuM6l0Dmh6+X/O1iqnagju
 OLsd+rk8eMRPF7N2dFdG28OwI/rdWkkFj1apdo4BwavPjDP06C7pqd9/sbxtDc55
 u7Yxsw456U7N/aimBKn24EeXo8NmT58W+NsNMxMqrF3sJ/gzJCotnYTR/ijZCz5w
 jv1JQlhNSL+tD2F7yQMXLmhvK72UvFPrMiRK/mSgDnQUoSxxiuKDRQ+TnDardhdC
 YMTj6488cnMqjmPIlkz41Wfu7knMDZVT8yUdfBy9nWEQYe6ALfLwVWwDSZzkA4SA
 Dl0VyryIZMqeJbuCbPO5mR0Lh2WzBEapHSpoo30bz7E0n+F7Uw47XVSWfkiGEbfv
 z41oKmqEK6xD1Kl/71gzwlADMRwkIrX+qDWuOTTRuHJVhb58Kwg3/P05hTAe6E3b
 BDXROOiCO9GiNuecH0QbdBQNOEFsCdIqpqzUMaGzUOQHHP1w6Y8dMn3TZnabX5wO
 0mZWH1tzBmIPkI4G5V9h3UaurqJT0ZdsAehyjBtvACBOn8TUyricbvHF/imVS4T1
 zzHcTVEFLV4ocSpG3ZsY
 =1jsG
 -----END PGP SIGNATURE-----

Merge tag 'iommu-fixes-v3.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull IOMMU fixes from Joerg Roedel:
 "The patches fix several issues in the AMD IOMMU driver, the NVidia
  SMMU driver, and the DMA debug code.

  The most important fix for the AMD IOMMU solves a problem with SR-IOV
  devices where virtual functions did not work with IOMMU enabled.  The
  NVidia SMMU patch fixes a possible sleep while spin-lock situation
  (queued the small fix for v3.5, a better but more intrusive fix is
  coming for v3.6).  The DMA debug patches fix a possible data
  corruption issue due to bool vs u32 usage."

* tag 'iommu-fixes-v3.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/amd: fix type bug in flush code
  dma-debug: debugfs_create_bool() takes a u32 pointer
  iommu/tegra: smmu: Fix unsleepable memory allocation
  iommu/amd: Initialize dma_ops for hotplug and sriov devices
  iommu/amd: Fix missing iommu_shutdown initialization in passthrough mode
2012-07-09 10:57:21 -07:00
Michael S. Tsirkin 9c378abc5c virtio-balloon: fix add/get API use
Since ee7cd8981e 'virtio: expose added
descriptors immediately.', in virtio balloon virtqueue_get_buf might
now run concurrently with virtqueue_kick.  I audited both and this
seems safe in practice but this is not guaranteed by the API.
Additionally, a spurious interrupt might in theory make
virtqueue_get_buf run in parallel with virtqueue_add_buf, which is
racy.

While we might try to protect against spurious callbacks it's
easier to fix the driver: balloon seems to be the only one
(mis)using the API like this, so let's just fix balloon.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (removed unused var)
2012-07-09 09:07:22 +09:30
Linus Torvalds 8c84bf4166 Merge branch 'for-3.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup fixes from Tejun Heo:
 "The previous cgroup pull request contained a patch to fix a race
  condition during cgroup hierarchy umount.  Unfortunately, while the
  patch reduced the race window such that the test case I and Sasha were
  using didn't trigger it anymore, it wasn't complete - Shyju and Li
  could reliably trigger the race condition using a different test case.

  The problem wasn't the gap between dentry deletion and release which
  the previous patch tried to fix.  The window was between the last
  dput() of a root's child and the resulting dput() of the root.  For
  cgroup dentries, the deletion and release always happen synchronously.
  As this releases the s_active ref, the refcnt of the root dentry,
  which doesn't hold s_active, stays above zero without the
  corresponding s_active.  If umount was in progress, the last
  deactivate_super() proceeds to destory the superblock and triggers
  BUG() on the non-zero root dentry refcnt after shrinking.

  This issue surfaced because cgroup dentries are now allowed to linger
  after rmdir(2) since 3.5-rc1.  Before, rmdir synchronously drained the
  dentry refcnt and the s_active acquired by rmdir from vfs layer
  protected the whole thing.  After 3.5-rc1, cgroup may internally hold
  and put dentry refs after rmdir finishes and the delayed dput()
  doesn't have surrounding s_active ref exposing this issue.

  This pull request contains two patches - one reverting the previous
  incorrect fix and the other adding the surrounding s_active ref around
  the delayed dput().

  This is quite late in the release cycle but the change is on the safer
  side and fixes the test cases reliably, so I don't think it's too
  crazy."

* 'for-3.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
  cgroup: fix cgroup hierarchy umount race
  Revert "cgroup: superblock can't be released with active dentries"
2012-07-08 09:09:27 -07:00
Linus Torvalds bd0a521e88 Linux 3.5-rc6 2012-07-07 17:23:56 -07:00
Linus Torvalds a0127afbed Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull security docs update from James Morris.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
  security: Minor improvements to no_new_privs documentation
2012-07-07 17:21:59 -07:00
Linus Torvalds 332a2e1244 vfs: make O_PATH file descriptors usable for 'fchdir()'
We already use them for openat() and friends, but fchdir() also wants to
be able to use O_PATH file descriptors.  This should make it comparable
to the O_SEARCH of Solaris.  In particular, O_PATH allows you to access
(not-quite-open) a directory you don't have read persmission to, only
execute permission.

Noticed during development of multithread support for ksh93.

Reported-by: ольга крыжановская <olga.kryzhanovska@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: stable@kernel.org    # O_PATH introduced in 3.0+
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-07 17:19:02 -07:00
Tejun Heo 5db9a4d99b cgroup: fix cgroup hierarchy umount race
48ddbe1946 "cgroup: make css->refcnt clearing on cgroup removal
optional" allowed a css to linger after the associated cgroup is
removed.  As a css holds a reference on the cgroup's dentry, it means
that cgroup dentries may linger for a while.

Destroying a superblock which has dentries with positive refcnts is a
critical bug and triggers BUG() in vfs code.  As each cgroup dentry
holds an s_active reference, any lingering cgroup has both its dentry
and the superblock pinned and thus preventing premature release of
superblock.

Unfortunately, after 48ddbe1946, there's a small window while
releasing a cgroup which is directly under the root of the hierarchy.
When a cgroup directory is released, vfs layer first deletes the
corresponding dentry and then invokes dput() on the parent, which may
recurse further, so when a cgroup directly below root cgroup is
released, the cgroup is first destroyed - which releases the s_active
it was holding - and then the dentry for the root cgroup is dput().

This creates a window where the root dentry's refcnt isn't zero but
superblock's s_active is.  If umount happens before or during this
window, vfs will see the root dentry with non-zero refcnt and trigger
BUG().

Before 48ddbe1946, this problem didn't exist because the last dentry
reference was guaranteed to be put synchronously from rmdir(2)
invocation which holds s_active around the whole process.

Fix it by holding an extra superblock->s_active reference across
dput() from css release, which is the dput() path added by 48ddbe1946
and the only one which doesn't hold an extra s_active ref across the
final cgroup dput().

Signed-off-by: Tejun Heo <tj@kernel.org>
LKML-Reference: <4FEEA5CB.8070809@huawei.com>
Reported-by: shyju pv <shyju.pv@huawei.com>
Tested-by: shyju pv <shyju.pv@huawei.com>
Cc: Sasha Levin <levinsasha928@gmail.com>
Acked-by: Li Zefan <lizefan@huawei.com>
2012-07-07 16:08:18 -07:00
Tejun Heo 7db5b3ca0e Revert "cgroup: superblock can't be released with active dentries"
This reverts commit fa980ca87d.  The
commit was an attempt to fix a race condition where a cgroup hierarchy
may be unmounted with positive dentry reference on root cgroup.  While
the commit made the race condition slightly more difficult to trigger,
the race was still there and could be reliably triggered using a
different test case.

Revert the incorrect fix.  The next commit will describe the race and
fix it correctly.

Signed-off-by: Tejun Heo <tj@kernel.org>
LKML-Reference: <4FEEA5CB.8070809@huawei.com>
Reported-by: shyju pv <shyju.pv@huawei.com>
Cc: Sasha Levin <levinsasha928@gmail.com>
Acked-by: Li Zefan <lizefan@huawei.com>
2012-07-07 15:55:47 -07:00
Shinya Kuribayashi 476a7eeb60 hwspinlock/core: use global ID to register hwspinlocks on multiple devices
Commit 300bab9770 (hwspinlock/core: register a bank of hwspinlocks in a
single API call, 2011-09-06) introduced 'hwspin_lock_register_single()'
to register numerous (a bank of) hwspinlock instances in a single API,
'hwspin_lock_register()'.

At which time, 'hwspin_lock_register()' accidentally passes 'local IDs'
to 'hwspin_lock_register_single()', despite that ..._single() requires
'global IDs' to register hwspinlocks.

We have to convert into global IDs by supplying the missing 'base_id'.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
[ohad: fix error path of hwspin_lock_register, too]
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
2012-07-07 22:35:30 +03:00
Linus Torvalds cd6407fe22 Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM fixes from Russell King:
 "Last merge window, we had some updates from Al cleaning up the signal
  restart handling.  These have caused some problems on ARM, and while
  Al has some fixes, we have some concerns with Al's patches but we've
  been unsuccesful with discussing this.

  We have got to the point where we need to do something, and we've
  decided that the best solution is to revert the appropriate commits
  until Al is able to reply to us.

  Also included here are four patches to fix warnings that I've noticed
  in my build system, and one fix for kprobes test code."

* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
  ARM: fix warning caused by wrongly typed arm_dma_limit
  ARM: fix warnings about atomic64_read
  ARM: 7440/1: kprobes: only test 'sub pc, pc, #1b-2b+8-2' on ARMv6
  ARM: 7441/1: perf: return -EOPNOTSUPP if requested mode exclusion is unavailable
  ARM: 7443/1: Revert "new way of handling ERESTART_RESTARTBLOCK"
  ARM: 7442/1: Revert "remove unused restart trampoline"
  ARM: fix set_domain() macro
  ARM: fix mach-versatile/pci.c warning
2012-07-07 11:20:59 -07:00
Andy Lutomirski c540521bba security: Minor improvements to no_new_privs documentation
The documentation didn't actually mention how to enable no_new_privs.
This also adds a note about possible interactions between
no_new_privs and LSMs (i.e. why teaching systemd to set no_new_privs
is not necessarily a good idea), and it references the new docs
from include/linux/prctl.h.

Suggested-by: Rob Landley <rob@landley.net>
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: James Morris <james.l.morris@oracle.com>
2012-07-08 00:25:48 +10:00
Linus Torvalds 26c439d400 Fixes an incorrect access mode check when preparing to open a file in the lower
filesystem. This isn't an urgent fix, but it is simple and the check was
 obviously incorrect.
 
 Also fixes a couple important bugs in the eCryptfs miscdev interface. These
 changes are low risk due to the small number of users that use the miscdev
 interface. I was able to keep the changes minimal and I have some cleaner, more
 complete changes queued up for the next merge window that will build on these
 patches.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABCgAGBQJP92LsAAoJENaSAD2qAscKCWkP/3BWpv0AS0fnrZPniXv/+vjf
 gdV4NcQhE/86VsQ7CtZS7jqfSVTzm+YTta9BTKj6jWZuGUZGcjXsZdyMpleBZukh
 TvRSW3HKCRtC8XNHzle3YUukD1o465nMEiCUQOYcWjAa3in7cZTiFU+3S2Unn5UF
 yh2Slfzjxkl2EUHEbcBiBayzaMH2gqwAvRR4sjM0P175m/jjDF6pDGT5vc0skvcP
 kLzFr/3Ia9BW1nU0yblTtSNcHzYV8GTJVEpj1NR7q59x2gVJubF6hBDtbZdaaGK0
 rYlKV+w9mRwzUCuVdb4zPCa9EGrbqH4gYvIWsCW+R0zoK57rfIRolQVYEglGE2TU
 K3HHL6UOsPASZCQqhi+K+tCmYtZaCfeMhDRgxyDOaxS4rQ6dy+XO6f9zM30qw1UB
 QHeVEQl7bM0IpByCcjVbuNJT4zTlW7xmsLm/pbGv60UBdZpqaUZptEBEpgUFjq30
 shgNLlHHWvelhf52gbff+ytCHf+IDVPT/Q2aGjhC2fgqWiQno44vR88gtMQz6b7g
 4yEL7t0TqBB9jCBu/ikTITGpRH5S149e3oYGm2P/+YYZUGlw0Gf9N6TBkctJFSg/
 /vk6aobMnjfxmeM80xOKey5Y1zDis660sgt1hX8NVAuo4hp7VQfWGhEZ8lYqzCzP
 aJci4ZXaDzwXx6UCC5w2
 =TEei
 -----END PGP SIGNATURE-----

Merge tag 'ecryptfs-3.5-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs

Pull eCryptfs fixes from Tyler Hicks:
 "Fixes an incorrect access mode check when preparing to open a file in
  the lower filesystem.  This isn't an urgent fix, but it is simple and
  the check was obviously incorrect.

  Also fixes a couple important bugs in the eCryptfs miscdev interface.
  These changes are low risk due to the small number of users that use
  the miscdev interface.  I was able to keep the changes minimal and I
  have some cleaner, more complete changes queued up for the next merge
  window that will build on these patches."

* tag 'ecryptfs-3.5-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
  eCryptfs: Gracefully refuse miscdev file ops on inherited/passed files
  eCryptfs: Fix lockdep warning in miscdev operations
  eCryptfs: Properly check for O_RDONLY flag before doing privileged open
2012-07-06 15:32:18 -07:00
Linus Torvalds c8912f2be3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull target fixes from Nicholas Bellinger:
 "Two minor target fixes.  There is really nothing exciting and/or
  controversial this time around.

  There's one fix from MDR for a RCU debug warning message within tcm_fc
  code (CC'ed to stable), and a small AC fix for qla_target.c based upon
  a recent Coverity static report.

  Also, there is one other outstanding virtio-scsi LUN scanning bugfix
  that has been uncovered with the in-flight tcm_vhost driver over the
  last days, and that needs to make it into 3.5 final too.  This patch
  has been posted to linux-scsi again here:

    http://marc.info/?l=linux-scsi&m=134160609212542&w=2

  and I've asked James to include it in his next PULL request."

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  qla2xxx: print the right array elements in qlt_async_event
  tcm_fc: Resolve suspicious RCU usage warnings
2012-07-06 13:59:50 -07:00
Tyler Hicks 8dc6780587 eCryptfs: Gracefully refuse miscdev file ops on inherited/passed files
File operations on /dev/ecryptfs would BUG() when the operations were
performed by processes other than the process that originally opened the
file. This could happen with open files inherited after fork() or file
descriptors passed through IPC mechanisms. Rather than calling BUG(), an
error code can be safely returned in most situations.

In ecryptfs_miscdev_release(), eCryptfs still needs to handle the
release even if the last file reference is being held by a process that
didn't originally open the file. ecryptfs_find_daemon_by_euid() will not
be successful, so a pointer to the daemon is stored in the file's
private_data. The private_data pointer is initialized when the miscdev
file is opened and only used when the file is released.

https://launchpad.net/bugs/994247

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Reported-by: Sasha Levin <levinsasha928@gmail.com>
Tested-by: Sasha Levin <levinsasha928@gmail.com>
2012-07-06 15:51:12 -05:00
Alan Cox 4f1d0f1971 qla2xxx: print the right array elements in qlt_async_event
Based upon Alan's patch from Coverity scan id 793583, these debug
messages in qlt_async_event() should be starting from byte 0, which is
always the Asynchronous Event Status Code from the parent switch statement.

Also, rename reason_code -> login_code following the language used in
2500 FW spec for Port Database Changed (0x8014) -> Port Database Changed
Event Mailbox Register for mailbox[2].

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: Chad Dupuis <chad.dupuis@qlogic.com>
Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2012-07-06 13:09:23 -07:00
Mark Rustad 863555be0c tcm_fc: Resolve suspicious RCU usage warnings
Use rcu_dereference_protected to tell rcu that the ft_lport_lock
is held during ft_lport_create. This resolved "suspicious RCU usage"
warnings when debugging options are turned on.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2012-07-06 12:52:09 -07:00
Linus Torvalds af9b9a53fa Two MTD fixes for 3.5:
- Fix a logic error in OLPC CAFÉ NAND ready() function.
 - Fix regression due to bitflip handling changes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iEYEABECAAYFAk/265wACgkQdwG7hYl686MWGgCfdnxPKE/cJnjVm5wxlp+hTBLv
 tbsAn3hpmrXhZNYNhQ+U34RDpw8V7SYc
 =IEqd
 -----END PGP SIGNATURE-----

Merge tag 'for-linus-20120706' of git://git.infradead.org/linux-mtd

Pull two MTD fixes from David Woodhouse:
 - Fix a logic error in OLPC CAFÉ NAND ready() function.
 - Fix regression due to bitflip handling changes.

* tag 'for-linus-20120706' of git://git.infradead.org/linux-mtd:
  mtd: cafe_nand: fix an & vs | mistake
  mtd: nand: initialize bitflip_threshold prior to BBT scanning
2012-07-06 10:34:48 -07:00
Andy Lutomirski 9ab4233dd0 mm: Hold a file reference in madvise_remove
Otherwise the code races with munmap (causing a use-after-free
of the vma) or with close (causing a use-after-free of the struct
file).

The bug was introduced by commit 90ed52ebe4 ("[PATCH] holepunch: fix
mmap_sem i_mutex deadlock")

Cc: Hugh Dickins <hugh@veritas.com>
Cc: Miklos Szeredi <mszeredi@suse.cz>
Cc: Badari Pulavarty <pbadari@us.ibm.com>
Cc: Nick Piggin <npiggin@suse.de>
Cc: stable@vger.kernel.org
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-06 10:34:38 -07:00
Linus Torvalds 1b7fa4c271 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2
Pull ocfs2 fixes from Joel Becker.

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2:
  aio: make kiocb->private NUll in init_sync_kiocb()
  ocfs2: Fix bogus error message from ocfs2_global_read_info
  ocfs2: for SEEK_DATA/SEEK_HOLE, return internal error unchanged if ocfs2_get_clusters_nocache() or ocfs2_inode_lock() call failed.
  ocfs2: use spinlock irqsave for downconvert lock.patch
  ocfs2: Misplaced parens in unlikley
  ocfs2: clear unaligned io flag when dio fails
2012-07-06 10:04:39 -07:00
Linus Torvalds 064ea1ae80 Merge git://git.samba.org/sfrench/cifs-2.6
Pull cifs fixes from Steve French.

* git://git.samba.org/sfrench/cifs-2.6:
  cifs: when server doesn't set CAP_LARGE_READ_X, cap default rsize at MaxBufferSize
  cifs: fix parsing of password mount option
2012-07-06 10:02:12 -07:00
Linus Torvalds 1b74a8684e Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input layer fixes from Dmitry Torokhov:
 "Two fixes for regressions in Wacom driver and fixes for drivers using
  threaded IRQ framework without specifying IRQF_ONESHOT."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: request threaded-only IRQs with IRQF_ONESHOT
  Input: wacom - don't retrieve touch_max when it is predefined
  Input: wacom - fix retrieving touch_max bug
  Input: fix input.h kernel-doc warning
2012-07-06 09:50:39 -07:00
Dan Carpenter 48f8b64129 mtd: cafe_nand: fix an & vs | mistake
The intent here was clearly to set result to true if the 0x40000000 flag
was set.  But instead there was a | vs & typo and we always set result
to true.

Artem: check the spec at
wiki.laptop.org/images/5/5c/88ALP01_Datasheet_July_2007.pdf
and this fix looks correct.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 14:27:13 +01:00
Linus Torvalds c4aed353b1 ARM: SoC fixes for 3.5-rc
Small fixes on multiple ARM platforms
 * A build regression from a previous fix on dove and mv78xx0
 * Two fixes for recently (3.5-rc1) changed mmp/pxa code
 * multiple omap2+ bug fixes
 * two trivial fixes for i.MX
 * one v3.5 regression for mxs
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIVAwUAT/WKiWCrR//JCVInAQKFwQ//bMvE74cp5iN2cMv6vvWWt8YOFdMQx5T8
 PSfyo7YINR1drH7XY3IaosY2DdDafQq5PeuRZl7vs2YqNlwEvV/lJf4PrQTCXNUi
 yR/4khcgRIqgvnaXUArn4UoTtM6zEUcFUaP5x6HgEdBPYjYR+Kwdg40YTCz9eK92
 sJSW44xKxS3EMLxV1AXU2a+B+N5fbDC8/jw0pa7vT2u2GXLsxjmP5eDgtfwCJ+5S
 Y2wYOEZJJVfSnRhazZimRbvr0bDvL5QmKZ7ZM/ieNmiusK8lqOChVmdJiywBZeuu
 TZZhMYHBMXNBxfSOM5ncz0r2Z09PovHpUSJ2K1k+1sXmOBafvmHUvX6SElj/QFvv
 365ti+UlmMg/3AiR9yVM27OSbEazdc/cbREFWTkLVEVK9smfh1zK3xtuarTkKiUz
 6S8jp51u7yZO++qE1G1lBpS9axvMxpOhv7BgdpcFBuwI2pcBj8ocBtHDijJd5724
 cTNT7hx/MBZAhVERzg5aHHQDqU28qa2uuXxvVUn/vWL478JcaL1IG2uvSw6IwNkV
 Glrk2lZjBobwLinUKtLzwDcj25ethFq7ENJBy7hk3b4Mm+BrDZcHL4cyGcVrKhQG
 9QA7dZ6PzXnNldlob7xR6V8tTus99EAK3Kie/5RMXvK9KevoUhLkSiVWJmRz46Dk
 sQdcisH5GzM=
 =2Ynd
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Arnd Bergmann:
 "Small fixes on multiple ARM platforms
   - A build regression from a previous fix on dove and mv78xx0
   - Two fixes for recently (3.5-rc1) changed mmp/pxa code
   - multiple omap2+ bug fixes
   - two trivial fixes for i.MX
   - one v3.5 regression for mxs"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: apx4devkit: fix FEC enabling PHY clock
  ARM: OMAP2+: hwmod data: Fix wrong McBSP clock alias on OMAP4
  ARM: OMAP4: hwmod data: temporarily comment out data for the usb_host_fs and aess IP blocks
  ARM: Orion: Fix WDT compile for Dove and MV78xx0
  ARM: mmp: remove mach/gpio-pxa.h
  ARM: imx: assert SCC gate stays enabled
  ARM: OMAP4: TWL6030: ensure sys_nirq1 is mux'd and wakeup enabled
  ARM: OMAP2: Overo: init I2C before MMC to fix MMC suspend/resume failure
  ARM: imx27_visstrim_m10: Do not include <asm/system.h>
  ARM: pxa: hx4700: Fix basic suspend/resume
2012-07-05 13:20:02 -07:00
Linus Torvalds 6bc51545da Merge git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull KVM fix from Marcelo Tosatti:
 "Memory leak and oops on the x86 mmu code, and sanitization of the
  KVM_IRQFD ioctl."

* git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: MMU: fix shrinking page from the empty mmu
  KVM: fix fault page leak
  KVM: Sanitize KVM_IRQFD flags
  KVM: Add missing KVM_IRQFD API documentation
  KVM: Pass kvm_irqfd to functions
2012-07-05 13:16:21 -07:00
Linus Torvalds 24eee627eb Merge branch 'fixes-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
Pull leds fix from Bryan Wu:
 "Fix for heartbeat led trigger driver"

* 'fixes-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
  leds: heartbeat: fix bug on panic
2012-07-05 13:09:37 -07:00
Linus Torvalds 5eecb9cc90 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs updates from Chris Mason:
 "I held off on my rc5 pull because I hit an oops during log recovery
  after a crash.  I wanted to make sure it wasn't a regression because
  we have some logging fixes in here.

  It turns out that a commit during the merge window just made it much
  more likely to trigger directory logging instead of full commits,
  which exposed an old bug.

  The new backref walking code got some additional fixes.  This should
  be the final set of them.

  Josef fixed up a corner where our O_DIRECT writes and buffered reads
  could expose old file contents (not stale, just not the most recent).
  He and Liu Bo fixed crashes during tree log recover as well.

  Ilya fixed errors while we resume disk balancing operations on
  readonly mounts."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: run delayed directory updates during log replay
  Btrfs: hold a ref on the inode during writepages
  Btrfs: fix tree log remove space corner case
  Btrfs: fix wrong check during log recovery
  Btrfs: use _IOR for BTRFS_IOC_SUBVOL_GETFLAGS
  Btrfs: resume balance on rw (re)mounts properly
  Btrfs: restore restriper state on all mounts
  Btrfs: fix dio write vs buffered read race
  Btrfs: don't count I/O statistic read errors for missing devices
  Btrfs: resolve tree mod log locking issue in btrfs_next_leaf
  Btrfs: fix tree mod log rewind of ADD operations
  Btrfs: leave critical region in btrfs_find_all_roots as soon as possible
  Btrfs: always put insert_ptr modifications into the tree mod log
  Btrfs: fix tree mod log for root replacements at leaf level
  Btrfs: support root level changes in __resolve_indirect_ref
  Btrfs: avoid waiting for delayed refs when we must not
2012-07-05 13:06:25 -07:00
Linus Torvalds 62ad64498a Merge branch 'fixes-for-grant' of git://sources.calxeda.com/kernel/linux
Pull DT fixes from Rob Herring:
 "Mainly some documentation updates and 2 fixes:

   - An export symbol fix for of_platform_populate from Stephen W.
   - A fix for the order compatible entries are matched to ensure the
     first compatible string is matched when there are multiple matches."

Normally these would go through Grant Likely (thus the "fixes-for-grant"
branch name), but Grant is in the middle of moving to Scotland, and is
practically offline until sometime in August. So pull directly from Rob.

* 'fixes-for-grant' of git://sources.calxeda.com/kernel/linux:
  of: match by compatible property first
  dt: mc13xxx.txt: Fix gpio number assignment
  dt: fsl-fec.txt: Fix gpio number assignment
  dt: fsl-mma8450.txt: Add missing 'reg' description
  dt: fsl-imx-esdhc.txt: Fix gpio number assignment
  dt: fsl-imx-cspi.txt: Fix comment about GPIOs used for chip selects
  of: Add Avionic Design vendor prefix
  of: export of_platform_populate()
2012-07-05 11:53:47 -07:00
Russell King 09b2ad13da ARM: fix warning caused by wrongly typed arm_dma_limit
arch/arm/mm/init.c: In function 'arm_memblock_init':
arch/arm/mm/init.c:380: warning: comparison of distinct pointer types lacks a cast

by fixing the typecast in its definition when DMA_ZONE is disabled.
This was missed in 4986e5c7c (ARM: mm: fix type of the arm_dma_limit
global variable).

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-07-05 13:11:31 +01:00
Russell King b89d607b59 ARM: fix warnings about atomic64_read
Fix:
net/netfilter/xt_connbytes.c: In function 'connbytes_mt':
net/netfilter/xt_connbytes.c:43: warning: passing argument 1 of 'atomic64_read' discards qualifiers from pointer target type
...

by adding the missing const.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-07-05 13:06:32 +01:00
Rabin Vincent f8b435bb91 ARM: 7440/1: kprobes: only test 'sub pc, pc, #1b-2b+8-2' on ARMv6
'sub pc, pc, #1b-2b+8-2' results in address<1:0> == '10'.

sub pc, pc, #const (== ADR pc, #const) performs an interworking branch
(BXWritePC()) on ARMv7+ and a simple branch (BranchWritePC()) on earlier
versions.

In ARM state, BXWritePC() is UNPREDICTABLE when address<1:0> == '10'.

In ARM state on ARMv6+, BranchWritePC() ignores address<1:0>.  Before
ARMv6, BranchWritePC() is UNPREDICTABLE if address<1:0> != '00'

So the instruction is UNPREDICTABLE both before and after v6.

Acked-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-07-05 12:57:16 +01:00
Arnd Bergmann e15ebe05cc PM related fixes for omaps mostly to get suspend/resume
working again.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJP9VYqAAoJEBvUPslcq6VzwCIP/1/0vqJgr4rSayTXnhxGaRkb
 rPCFORJySrY7de1bVuVFpo3IfRV1jTDTcCYNSIRaV3Ph1OIKM/W+WFddzRRJ4OFP
 E4NmBC8bPg875SES0lUkX6KmsLCR5W+LYFh2j+2qrESmrE95MRLgnuYXyezNoF1m
 2L27J+PbkIZpjXq+jXRZT6wzYk3+cPwCV7oNYWoH7YKHSAqa6h3ywW+7+urMdwap
 W9tnmb3mwgTGSQv5ThrP1BS3l2xFkTVW3xyMSeIeFGvp3gK/tAAgMhLhkCVjGilX
 amOCmEX7SupZNwWuIEnbnDxxhlr5gSowGN4xDetkppZ10K18fVWia6y61Ls6AE7V
 8ZXL7/YaJ5OTkznWs1NmVDZ7dJRtlIMD4MFzYdMXWthl9af30vojpgZs7/Ikiu2G
 1xEUTYMZzyb77IvbbR3oeMF1WRfmcW/B0b16MFpgqdV4Awaj63IHHwIzhWgL41XP
 1xIr9RZtnjE1859UJIETanUc4L+0fqpl6brUIO5pNoS9VEbCyADzBicmZxk0JRmx
 JugrNt7Z53qlWbd17umg0oiWCmAOK2DTI9ZHzn/A/w+ksQPvGwiGUzFpPniZ+g5t
 3jz/CXQ5Au4OWb23EFNrL5/2kqxSU6hTxxtQJF+5MDuiHltsAl8/IGQQs5X6zl3v
 TnSl8nZVvWzFLxotsLW8
 =9LmJ
 -----END PGP SIGNATURE-----

Merge tag 'omap-fixes-for-v3.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

PM related fixes for omaps mostly to get suspend/resume
working again.

* tag 'omap-fixes-for-v3.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: hwmod data: Fix wrong McBSP clock alias on OMAP4
  ARM: OMAP4: hwmod data: temporarily comment out data for the usb_host_fs and aess IP blocks
  ARM: OMAP4: TWL6030: ensure sys_nirq1 is mux'd and wakeup enabled
  ARM: OMAP2: Overo: init I2C before MMC to fix MMC suspend/resume failure

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-07-05 12:16:13 +02:00
Arnd Bergmann 8d111444bd Merge branch 'mxs/fixes-for-3.5' of git://git.linaro.org/people/shawnguo/linux-2.6 into fixes
* 'mxs/fixes-for-3.5' of git://git.linaro.org/people/shawnguo/linux-2.6:
  ARM: apx4devkit: fix FEC enabling PHY clock

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-07-05 11:06:36 +02:00
Will Deacon fdeb8e35fd ARM: 7441/1: perf: return -EOPNOTSUPP if requested mode exclusion is unavailable
We currently return -EPERM if the user requests mode exclusion that is
not supported by the CPU. This looks pretty confusing from userspace
and is inconsistent with other architectures (ppc, x86).

This patch returns -EOPNOTSUPP instead.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-07-05 09:50:56 +01:00
Will Deacon 433e2f307b ARM: 7443/1: Revert "new way of handling ERESTART_RESTARTBLOCK"
This reverts commit 6b5c8045ec.

Conflicts:

	arch/arm/kernel/ptrace.c

The new syscall restarting code can lead to problems if we take an
interrupt in userspace just before restarting the svc instruction. If
a signal is delivered when returning from the interrupt, the
TIF_SYSCALL_RESTARTSYS will remain set and cause any syscalls executed
from the signal handler to be treated as a restart of the previously
interrupted system call. This includes the final sigreturn call, meaning
that we may fail to exit from the signal context. Furthermore, if a
system call made from the signal handler requires a restart via the
restart_block, it is possible to clear the thread flag and fail to
restart the originally interrupted system call.

The right solution to this problem is to perform the restarting in the
kernel, avoiding the possibility of handling a further signal before the
restart is complete. Since we're almost at -rc6, let's revert the new
method for now and aim for in-kernel restarting at a later date.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-07-05 09:50:56 +01:00