]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/log
can-eth-gw-linux.git
11 years agoARM: tegra: enable data prefetch on L2
Joseph Lo [Fri, 9 Nov 2012 21:40:41 +0000 (14:40 -0700)]
ARM: tegra: enable data prefetch on L2

Enable the data prefetch on L2. The bit28 in aux ctrl register.

Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Peter De Schrijver <pdeschrijver@nvidia.com>
11 years agoipv6: send unsolicited neighbour advertisements to all-nodes
Hannes Frederic Sowa [Tue, 6 Nov 2012 16:18:41 +0000 (16:18 +0000)]
ipv6: send unsolicited neighbour advertisements to all-nodes

As documented in RFC4861 (Neighbor Discovery for IP version 6) 7.2.6.,
unsolicited neighbour advertisements should be sent to the all-nodes
multicast address.

Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Fri, 9 Nov 2012 20:35:51 +0000 (21:35 +0100)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes (again) from Dave Airlie:
 "dropped the ball on a vmware patch, so two more fixes for vmwgfx are
  here, one for hibernate issue, one for a BUG trigger."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/vmwgfx: Fix a case where the code would BUG when trying to pin GMR memory
  drm/vmwgfx: Fix hibernation device reset

11 years agoMerge tag '3.7-pci-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Linus Torvalds [Fri, 9 Nov 2012 20:33:53 +0000 (21:33 +0100)]
Merge tag '3.7-pci-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI fixes from Bjorn Helgaas:
 "Power management:
    - PCI/PM: Fix proc config reg access for D3cold and bridge
      suspending
    - PCI/PM: Resume device before shutdown
    - PCI/PM: Fix deadlock when unbinding device if parent in D3cold
  Hotplug:
    -  PCI/portdrv: Don't create hotplug slots unless port supports
       hotplug"

* tag '3.7-pci-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI/portdrv: Don't create hotplug slots unless port supports hotplug
  PCI/PM: Fix proc config reg access for D3cold and bridge suspending
  PCI/PM: Resume device before shutdown
  PCI/PM: Fix deadlock when unbinding device if parent in D3cold

11 years agoMerge tag 'mmc-fixes-for-3.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 9 Nov 2012 20:32:33 +0000 (21:32 +0100)]
Merge tag 'mmc-fixes-for-3.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc

Pull MMC fixes from Chris Ball:
 - sdhci: fix a NULL dereference at resume-time, seen on OLPC XO-4
 - sdhci: fix against 3.7-rc1 for UHS modes without a vqmmc regulator
 - sdhci-of-esdhc: disable CMD23 on boards where it's broken
 - sdhci-s3c: fix against 3.7-rc1 for card detection with runtime PM
 - dw_mmc, omap_hsmmc: fix potential NULL derefs, compiler warnings

* tag 'mmc-fixes-for-3.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
  mmc: sdhci-s3c: fix the card detection in runtime-pm
  mmc: sdhci-s3c: use clk_prepare_enable and clk_disable_unprepare
  mmc: dw_mmc: constify dw_mci_idmac_ops in exynos back-end
  mmc: dw_mmc: fix modular build for exynos back-end
  mmc: sdhci: fix NULL dereference in sdhci_request() tuning
  mmc: sdhci: fix IS_ERR() checking of regulator_get()
  mmc: fix sdhci-dove probe/removal
  mmc: sh_mmcif: fix use after free
  mmc: sdhci-pci: fix 'Invalid iomem size' error message condition
  mmc: mxcmmc: Fix MODULE_ALIAS
  mmc: omap_hsmmc: fix NULL pointer dereference for dt boot
  mmc: omap_hsmmc: fix host reference after mmc_free_host
  mmc: dw_mmc: fix multiple drv_data NULL dereferences
  mmc: dw_mmc: enable controller interrupt before calling mmc_start_host
  mmc: sdhci-of-esdhc: disable CMD23 for some Freescale SoCs
  mmc: dw_mmc: remove _dev_info compile warning
  mmc: dw_mmc: convert the variable type of irq

11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Fri, 9 Nov 2012 17:10:20 +0000 (18:10 +0100)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull crypto fix from Herbert Xu:
 "This push fixes a potential panic in cryptd which may occur with
  crypto drivers such as aesni-intel."

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: cryptd - disable softirqs in cryptd_queue_worker to prevent data corruption

11 years agoMerge tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Fri, 9 Nov 2012 17:08:04 +0000 (18:08 +0100)]
Merge tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Most of commits are for stable and regression fixes.  Except for one
  fix for a regression in 3.7-rc4, there are all driver local changes,
  so nothing too much to worry."

* tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: Fix card refcount unbalance
  ALSA: hda - Add new codec ALC668 and ALC900 (default name ALC1150)
  ALSA: hda - Improve HP depop when system enter to S3
  ALSA: usb-audio: Fix crash at re-preparing the PCM stream
  ALSA: hdspm - Fix sync check reporting on RME RayDAT
  ALSA: hda - Add pin fixups for ASUS G75
  ALSA: hda - Fix invalid connections in VT1802 codec
  ALSA: hda - Fix empty DAC filling in patch_via.c
  ALSA: hda - Force to reset IEC958 status bits for AD codecs
  ALSA: es1968: Add ESS vendor ID to pm_whitelist
  ALSA: HDA: Mark CS260x immutable structures const
  ALSA: HDA: Fix digital microphone on CS420x
  ALSA: hda: Cirrus: Fix coefficient index for beep configuration
  ALSA: hda - support Teradici 2200 host card audio
  ALSA: Fix typo in drivers sound

11 years agoxen/arm: Fix compile errors when drivers are compiled as modules (export more).
Stefano Stabellini [Thu, 8 Nov 2012 15:58:55 +0000 (15:58 +0000)]
xen/arm: Fix compile errors when drivers are compiled as modules (export more).

The commit 911dec0db4de6ccc544178a8ddaf9cec0a11d533
"xen/arm: Fix compile errors when drivers are compiled as modules." exports
the neccessary functions. But to guard ourselves against out-of-tree modules
and future drivers hitting this, lets export all of the relevant
hypercalls.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agodrm/vmwgfx: Fix a case where the code would BUG when trying to pin GMR memory
Thomas Hellstrom [Fri, 9 Nov 2012 09:45:14 +0000 (10:45 +0100)]
drm/vmwgfx: Fix a case where the code would BUG when trying to pin GMR memory

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dmitry Torokhov <dtor@vmware.com>
Cc: stable@vger.kernel.org
Cc: linux-graphics-maintainer@vmware.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agodrm/vmwgfx: Fix hibernation device reset
Thomas Hellstrom [Fri, 9 Nov 2012 09:05:57 +0000 (10:05 +0100)]
drm/vmwgfx: Fix hibernation device reset

The device would not reset properly when resuming from hibernation.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dmitry Torokhov <dtor@vmware.com>
Cc: stable@vger.kernel.org
Cc: linux-graphics-maintainer@vmware.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agoMerge tag 'pinctrl-for-v3.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 9 Nov 2012 05:59:04 +0000 (06:59 +0100)]
Merge tag 'pinctrl-for-v3.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pinctrl fixes from Linus Walleij:

 - A set of SPEAr pinctrl fixes that recently arrived

 - A fixup for the Samsung/Exynos Kconfig deps

* tag 'pinctrl-for-v3.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: samsung and exynos need to depend on OF && GPIOLIB
  pinctrl: SPEAr1340: Add clcd sleep mode pin configuration
  pinctrl: SPEAr1340: Make DDR reset & clock pads as gpio
  pinctrl: SPEAr1310: add register entries for enabling pad direction
  pinctrl: SPEAr1310: Separate out pci pins from pcie_sata pin group
  pinctrl: SPEAr1310: Fix value of PERIP_CFG reigster and MCIF_SEL_SHIFT
  pinctrl: SPEAr1310: fix clcd high resolution pin group name
  pinctrl: SPEAr320: Correct pad mux entries for rmii/smii
  pinctrl: SPEAr3xx: correct register space to configure pwm
  pinctrl: SPEAr: Don't update all non muxreg bits on pinctrl_disable

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Linus Torvalds [Fri, 9 Nov 2012 05:57:56 +0000 (06:57 +0100)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Martin Schwidefsky:
 "A couple of bug fixes.  I keep the fingers crossed that we now got
  transparent huge pages ready for prime time."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/cio: fix length calculation in idset.c
  s390/sclp: fix addressing mode clobber
  s390: Move css limits from drivers/s390/cio/ to include/asm/.
  s390/thp: respect page protection in pmd_none() and pmd_present()
  s390/mm: use pmd_large() instead of pmd_huge()
  s390/cio: suppress 2nd path verification during resume

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Fri, 9 Nov 2012 05:56:23 +0000 (06:56 +0100)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid

Pull HID fix from Jiri Kosina:
 "This reverts a patch that causes regression in binding between HID
  devices and drivers during device unplug/replug cycle."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: hidraw: put old deallocation mechanism in place

11 years agoMerge branch 'akpm' (Fixes from Andrew)
Linus Torvalds [Fri, 9 Nov 2012 05:53:02 +0000 (06:53 +0100)]
Merge branch 'akpm' (Fixes from Andrew)

Merge misc fixes from Andrew Morton:
 "Five fixes"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (5 patches)
  h8300: add missing L1_CACHE_SHIFT
  mm: bugfix: set current->reclaim_state to NULL while returning from kswapd()
  fanotify: fix missing break
  revert "epoll: support for disabling items, and a self-test app"
  checkpatch: improve network block comment style checking

11 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Fri, 9 Nov 2012 05:49:24 +0000 (06:49 +0100)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Just radeon and nouveau, mostly regressions fixers, and a couple of
  radeon register checker fixes."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/nouveau: fix acpi edid retrieval
  drm/nvc0/disp: fix regression in vblank semaphore release
  drm/nv40/mpeg: fix context handling
  drm/nv40/graph: fix typo in type names
  drm/nv41/vm: fix typo in type name
  drm/radeon/si: add some missing regs to the VM reg checker
  drm/radeon/cayman: add some missing regs to the VM reg checker
  drm/radeon/dce3: switch back to old pll allocation order for discrete

11 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty...
Linus Torvalds [Fri, 9 Nov 2012 05:47:55 +0000 (06:47 +0100)]
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux

Pull virtio and module fixes from Rusty Russell:
 "YA module signing build tweak, and two cc'd to stable."

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
  virtio: Don't access index after unregister.
  modules: don't break modules_install on external modules with no key.
  module: fix out-by-one error in kallsyms

11 years agoMerge tag 'for-linus-v3.7-rc5' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Fri, 9 Nov 2012 05:42:51 +0000 (06:42 +0100)]
Merge tag 'for-linus-v3.7-rc5' of git://oss.sgi.com/xfs/xfs

Pull xfs bugfixes from Ben Myers:

 - fix for large transactions spanning multiple iclog buffers

 - zero the allocation_args structure on the stack before using it to
   determine whether to use a worker for allocation
 - move allocation stack switch to xfs_bmapi_allocate in order to
   prevent deadlock on AGF buffers

 - growfs no longer reads in garbage for new secondary superblocks

 - silence a build warning

 - ensure that invalid buffers never get written to disk while on free
   list

 - don't vmap inode cluster buffers during free

 - fix buffer shutdown reference count mismatch

 - fix reading of wrapped log data

* tag 'for-linus-v3.7-rc5' of git://oss.sgi.com/xfs/xfs:
  xfs: fix reading of wrapped log data
  xfs: fix buffer shudown reference count mismatch
  xfs: don't vmap inode cluster buffers during free
  xfs: invalidate allocbt blocks moved to the free list
  xfs: silence uninitialised f.file warning.
  xfs: growfs: don't read garbage for new secondary superblocks
  xfs: move allocation stack switch up to xfs_bmapi_allocate
  xfs: introduce XFS_BMAPI_STACK_SWITCH
  xfs: zero allocation_args on the kernel stack
  xfs: only update the last_sync_lsn when a transaction completes

11 years agoh8300: add missing L1_CACHE_SHIFT
Fengguang Wu [Thu, 8 Nov 2012 23:53:41 +0000 (15:53 -0800)]
h8300: add missing L1_CACHE_SHIFT

Fix the build error

  lib/atomic64.c: In function 'lock_addr':
  lib/atomic64.c:40:11: error: 'L1_CACHE_SHIFT' undeclared (first use in this function)
  lib/atomic64.c:40:11: note: each undeclared identifier is reported only once for each function it appears in

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agomm: bugfix: set current->reclaim_state to NULL while returning from kswapd()
Takamori Yamaguchi [Thu, 8 Nov 2012 23:53:39 +0000 (15:53 -0800)]
mm: bugfix: set current->reclaim_state to NULL while returning from kswapd()

In kswapd(), set current->reclaim_state to NULL before returning, as
current->reclaim_state holds reference to variable on kswapd()'s stack.

In rare cases, while returning from kswapd() during memory offlining,
__free_slab() and freepages() can access the dangling pointer of
current->reclaim_state.

Signed-off-by: Takamori Yamaguchi <takamori.yamaguchi@jp.sony.com>
Signed-off-by: Aaditya Kumar <aaditya.kumar@ap.sony.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agofanotify: fix missing break
Eric Paris [Thu, 8 Nov 2012 23:53:37 +0000 (15:53 -0800)]
fanotify: fix missing break

Anders Blomdell noted in 2010 that Fanotify lost events and provided a
test case.  Eric Paris confirmed it was a bug and posted a fix to the
list

  https://groups.google.com/forum/?fromgroups=#!topic/linux.kernel/RrJfTfyW2BE

but never applied it.  Repeated attempts over time to actually get him
to apply it have never had a reply from anyone who has raised it

So apply it anyway

Signed-off-by: Alan Cox <alan@linux.intel.com>
Reported-by: Anders Blomdell <anders.blomdell@control.lth.se>
Cc: Eric Paris <eparis@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agorevert "epoll: support for disabling items, and a self-test app"
Andrew Morton [Thu, 8 Nov 2012 23:53:35 +0000 (15:53 -0800)]
revert "epoll: support for disabling items, and a self-test app"

Revert commit 03a7beb55b9f ("epoll: support for disabling items, and a
self-test app") pending resolution of the issues identified by Michael
Kerrisk, copied below.

We'll revisit this for 3.8.

: I've taken a look at this patch as it currently stands in 3.7-rc1, and
: done a bit of testing. (By the way, the test program
: tools/testing/selftests/epoll/test_epoll.c does not compile...)
:
: There are one or two places where the behavior seems a little strange,
: so I have a question or two at the end of this mail. But other than
: that, I want to check my understanding so that the interface can be
: correctly documented.
:
: Just to go though my understanding, the problem is the following
: scenario in a multithreaded application:
:
: 1. Multiple threads are performing epoll_wait() operations,
:    and maintaining a user-space cache that contains information
:    corresponding to each file descriptor being monitored by
:    epoll_wait().
:
: 2. At some point, a thread wants to delete (EPOLL_CTL_DEL)
:    a file descriptor from the epoll interest list, and
:    delete the corresponding record from the user-space cache.
:
: 3. The problem with (2) is that some other thread may have
:    previously done an epoll_wait() that retrieved information
:    about the fd in question, and may be in the middle of using
:    information in the cache that relates to that fd. Thus,
:    there is a potential race.
:
: 4. The race can't solved purely in user space, because doing
:    so would require applying a mutex across the epoll_wait()
:    call, which would of course blow thread concurrency.
:
: Right?
:
: Your solution is the EPOLL_CTL_DISABLE operation. I want to
: confirm my understanding about how to use this flag, since
: the description that has accompanied the patches so far
: has been a bit sparse
:
: 0. In the scenario you're concerned about, deleting a file
:    descriptor means (safely) doing the following:
:    (a) Deleting the file descriptor from the epoll interest list
:        using EPOLL_CTL_DEL
:    (b) Deleting the corresponding record in the user-space cache
:
: 1. It's only meaningful to use this EPOLL_CTL_DISABLE in
:    conjunction with EPOLLONESHOT.
:
: 2. Using EPOLL_CTL_DISABLE without using EPOLLONESHOT in
:    conjunction is a logical error.
:
: 3. The correct way to code multithreaded applications using
:    EPOLL_CTL_DISABLE and EPOLLONESHOT is as follows:
:
:    a. All EPOLL_CTL_ADD and EPOLL_CTL_MOD operations should
:       should EPOLLONESHOT.
:
:    b. When a thread wants to delete a file descriptor, it
:       should do the following:
:
:       [1] Call epoll_ctl(EPOLL_CTL_DISABLE)
:       [2] If the return status from epoll_ctl(EPOLL_CTL_DISABLE)
:           was zero, then the file descriptor can be safely
:           deleted by the thread that made this call.
:       [3] If the epoll_ctl(EPOLL_CTL_DISABLE) fails with EBUSY,
:           then the descriptor is in use. In this case, the calling
:           thread should set a flag in the user-space cache to
:           indicate that the thread that is using the descriptor
:           should perform the deletion operation.
:
: Is all of the above correct?
:
: The implementation depends on checking on whether
: (events & ~EP_PRIVATE_BITS) == 0
: This replies on the fact that EPOLL_CTL_AD and EPOLL_CTL_MOD always
: set EPOLLHUP and EPOLLERR in the 'events' mask, and EPOLLONESHOT
: causes those flags (as well as all others in ~EP_PRIVATE_BITS) to be
: cleared.
:
: A corollary to the previous paragraph is that using EPOLL_CTL_DISABLE
: is only useful in conjunction with EPOLLONESHOT. However, as things
: stand, one can use EPOLL_CTL_DISABLE on a file descriptor that does
: not have EPOLLONESHOT set in 'events' This results in the following
: (slightly surprising) behavior:
:
: (a) The first call to epoll_ctl(EPOLL_CTL_DISABLE) returns 0
:     (the indicator that the file descriptor can be safely deleted).
: (b) The next call to epoll_ctl(EPOLL_CTL_DISABLE) fails with EBUSY.
:
: This doesn't seem particularly useful, and in fact is probably an
: indication that the user made a logic error: they should only be using
: epoll_ctl(EPOLL_CTL_DISABLE) on a file descriptor for which
: EPOLLONESHOT was set in 'events'. If that is correct, then would it
: not make sense to return an error to user space for this case?

Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: "Paton J. Lewis" <palewis@adobe.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agocheckpatch: improve network block comment style checking
Joe Perches [Thu, 8 Nov 2012 23:53:29 +0000 (15:53 -0800)]
checkpatch: improve network block comment style checking

Some comment styles in net and drivers/net are flagged inappropriately.

Avoid proclaiming inline comments like:
int a = b; /* some comment */
and block comments like:
/*********************
 * some comment
 ********************/
are defective.

Tested with
$ cat drivers/net/t.c
/* foo */

/*
 * foo
 */

/* foo
 */

/* foo
 * bar */

/****************************
 * some long block comment
 ***************************/

struct foo {
int bar; /* another test */
};
$

Signed-off-by: Joe Perches <joe@perches.com>
Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: David Miller <davem@davemloft.net>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge branch 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux...
Dave Airlie [Fri, 9 Nov 2012 04:57:02 +0000 (14:57 +1000)]
Merge branch 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes

just some misc regression fixes and typo fixes.

* 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/nouveau: fix acpi edid retrieval
  drm/nvc0/disp: fix regression in vblank semaphore release
  drm/nv40/mpeg: fix context handling
  drm/nv40/graph: fix typo in type names
  drm/nv41/vm: fix typo in type name

11 years agovirtio: Don't access index after unregister.
Cornelia Huck [Fri, 9 Nov 2012 04:24:12 +0000 (14:54 +1030)]
virtio: Don't access index after unregister.

Virtio wants to release used indices after the corresponding
virtio device has been unregistered. However, virtio does not
hold an extra reference, giving up its last reference with
device_unregister(), making accessing dev->index afterwards
invalid.

I actually saw problems when testing my (not-yet-merged)
virtio-ccw code:

- device_add virtio-net,id=xxx
-> creates device virtio<n> with n>0

- device_del xxx
-> deletes virtio<n>, but calls ida_simple_remove with an
   index of 0

- device_add virtio-net,id=xxx
-> tries to add virtio0, which is still in use...

So let's save the index we want to release before calling
device_unregister().

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Cc: stable@kernel.org
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agodrm/nouveau: fix acpi edid retrieval
Maarten Lankhorst [Thu, 8 Nov 2012 16:19:38 +0000 (17:19 +0100)]
drm/nouveau: fix acpi edid retrieval

Commit c0077061e7ea accidentally inverted the logic for nouveau_acpi_edid,
causing it to only show a connector as connected when the edid could not
be retrieved with acpi.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nvc0/disp: fix regression in vblank semaphore release
Kelly Doran [Wed, 7 Nov 2012 00:02:04 +0000 (10:02 +1000)]
drm/nvc0/disp: fix regression in vblank semaphore release

Signed-off-by: Kelly Doran <kel.p.doran@gmail.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv40/mpeg: fix context handling
Marcin Slusarz [Tue, 6 Nov 2012 21:48:51 +0000 (22:48 +0100)]
drm/nv40/mpeg: fix context handling

It slipped in thanks to typeless API.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv40/graph: fix typo in type names
Marcin Slusarz [Tue, 6 Nov 2012 21:48:50 +0000 (22:48 +0100)]
drm/nv40/graph: fix typo in type names

nv04_graph_priv / nv04_graph_chan are not defined in this context...

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv41/vm: fix typo in type name
Marcin Slusarz [Tue, 6 Nov 2012 21:48:49 +0000 (22:48 +0100)]
drm/nv41/vm: fix typo in type name

It's a miracle it compiles at all - nv04_vm_priv does not exist
anywhere in the tree.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agoMerge branch 'drm-fixes-3.7' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Fri, 9 Nov 2012 03:29:07 +0000 (13:29 +1000)]
Merge branch 'drm-fixes-3.7' of git://people.freedesktop.org/~agd5f/linux into drm-fixes

Just some minor fixes for VM reg check and a regression fix for dce3 plls

* 'drm-fixes-3.7' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon/si: add some missing regs to the VM reg checker
  drm/radeon/cayman: add some missing regs to the VM reg checker
  drm/radeon/dce3: switch back to old pll allocation order for discrete

11 years agoARM: OMAP2+: PRCM: remove obsolete prcm.[ch]
Paul Walmsley [Tue, 30 Oct 2012 02:59:29 +0000 (20:59 -0600)]
ARM: OMAP2+: PRCM: remove obsolete prcm.[ch]

arch/arm/mach-omap2/prcm.c and arch/arm/plat-omap/include/plat/prcm.h
are now completely unused and can be removed.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Vaibhav Hiremath <hvaibhav@ti.com>
11 years agoARM: OMAP2+: hwmod: call to _omap4_disable_module() should use the SoC-specific call
Paul Walmsley [Tue, 30 Oct 2012 02:57:55 +0000 (20:57 -0600)]
ARM: OMAP2+: hwmod: call to _omap4_disable_module() should use the SoC-specific call

The hwmod code unconditionally calls _omap4_disable_module() on all
SoCs when a module doesn't enable correctly.  This "worked" due to the
weak function omap4_cminst_wait_module_idle() in
arch/arm/mach-omap2/prcm.c, which was a no-op.  But now those weak
functions are going away - they should not be used.  So this patch
will now call the SoC-specific disable_module code, assuming it
exists.

Needs to be done before the weak function is removed, otherwise AM33xx
will crash early in boot.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Vaibhav Hiremath <hvaibhav@ti.com>
11 years agoARM: OMAP2+: PRCM: consolidate PRCM-related timeout macros
Paul Walmsley [Tue, 30 Oct 2012 02:57:44 +0000 (20:57 -0600)]
ARM: OMAP2+: PRCM: consolidate PRCM-related timeout macros

Consolidate all of the copies of MAX_MODULE_HARDRESET_WAIT and
MAX_MODULE_SOFTRESET_WAIT into one place, arch/arm/mach-omap2/prm.h.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Vaibhav Hiremath <hvaibhav@ti.com>
11 years agoARM: OMAP2+: PRCM: split and relocate the PRM/CM globals setup
Paul Walmsley [Tue, 30 Oct 2012 02:57:39 +0000 (20:57 -0600)]
ARM: OMAP2+: PRCM: split and relocate the PRM/CM globals setup

Split omap2_set_globals_prcm() into PRM, CM, and PRCM_MPU variants, since
these are all separate IP blocks.  This should make it easier to move the
PRM, CM, PRCM_MPU code into drivers/ in future patchsets.

At this point arch/arm/plat-omap/include/plat/prcm.h is empty; a
subsequent patch will remove it, and remove the #include from all the
files that #include it.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Vaibhav Hiremath <hvaibhav@ti.com>
11 years agoARM: OMAP2+: PRCM: remove omap2_cm_wait_idlest()
Paul Walmsley [Tue, 30 Oct 2012 02:57:31 +0000 (20:57 -0600)]
ARM: OMAP2+: PRCM: remove omap2_cm_wait_idlest()

Now that all users of mach-omap2/omap2_cm_wait_idlest() have been removed,
delete the function and its supporting macros and prototypes.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Vaibhav Hiremath <hvaibhav@ti.com>
11 years agoARM: OMAP2+: CM/clock: convert _omap2_module_wait_ready() to use SoC-independent...
Paul Walmsley [Tue, 30 Oct 2012 02:56:29 +0000 (20:56 -0600)]
ARM: OMAP2+: CM/clock: convert _omap2_module_wait_ready() to use SoC-independent CM functions

Convert the OMAP clock code's _omap2_module_wait_ready() to use
SoC-independent CM functions that are provided by the CM code, rather
than using a deprecated function from mach-omap2/prcm.c.

This facilitates the future conversion of the CM code to a driver, and
also removes a mach-omap2/prcm.c user.  mach-omap2/prcm.c will be removed
by a subsequent patch.

Some modules have IDLEST registers that aren't in the CM module, such
as the AM3517 IDLEST bits.  So we also need a fallback function for
these non-CM odd cases.  Create a temporary one in mach-omap2/clock.c,
intended to exist until the SCM drivers are ready.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Vaibhav Hiremath <hvaibhav@ti.com>
11 years agoARM: OMAP2xxx: APLL/CM: convert to use omap2_cm_wait_module_ready()
Paul Walmsley [Tue, 30 Oct 2012 02:56:17 +0000 (20:56 -0600)]
ARM: OMAP2xxx: APLL/CM: convert to use omap2_cm_wait_module_ready()

Convert the OMAP2xxx APLL code to use omap2_cm_wait_module_ready(),
and move the low-level CM register manipulation functions to
mach-omap2/cm2xxx.c.  The objectives here are to remove the dependency
on the deprecated omap2_cm_wait_idlest() function in
mach-omap2/prcm.c, so that code can be removed later; and move
low-level register accesses to the CM IP block to the CM code, which
will soon be moved into drivers/.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Vaibhav Hiremath <hvaibhav@ti.com>
11 years agoARM: OMAP2+: board files: use SoC-specific system restart functions
Paul Walmsley [Tue, 30 Oct 2012 02:56:12 +0000 (20:56 -0600)]
ARM: OMAP2+: board files: use SoC-specific system restart functions

Modify the board files to use the SoC-specific system restart
functions.  At this point it's possible to remove omap_prcm_restart()
from mach-omap2/prcm.c.

While removing the prototypes for the now-unused restart functions, clean
up a few more obsolete prototypes in mach-omap2/clock.h.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Vaibhav Hiremath <hvaibhav@ti.com>
11 years agoARM: OMAP2+: PRCM: create SoC-specific chip restart functions
Paul Walmsley [Tue, 30 Oct 2012 02:56:07 +0000 (20:56 -0600)]
ARM: OMAP2+: PRCM: create SoC-specific chip restart functions

Split omap_prcm_restart() from mach-omap2/prcm.c into SoC-specific
variants.  These functions need to be able to save the reboot reason
into the scratchpad RAM.  This implies a dependency on both the PRM
and SCM IP blocks, so they've been moved into their own file.  This
will eventually call functions in the PRM and SCM drivers, once those
are created.

Vaibhav Hiremath <hvaibhav@ti.com> identified an unused prototype in
the first version of this patch - now removed.  Tony Lindgren
<tony@atomide.com> noted a compile problem with some RMK Kconfigs;
resolved in this patch.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Vaibhav Hiremath <hvaibhav@ti.com>
Tested-by: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
11 years agoARM: OMAP2xxx: clock: move virt_prcm_set code into clkt2xxx_virt_prcm_set.c
Paul Walmsley [Tue, 30 Oct 2012 02:56:00 +0000 (20:56 -0600)]
ARM: OMAP2xxx: clock: move virt_prcm_set code into clkt2xxx_virt_prcm_set.c

Collect all of the virt_prcm_set-specific clocktype code into
mach-omap2/clkt2xxx_virt_prcm_set.c.  Remove its dependency on the
'sclk' and 'vclk' global variables.  Those variables will be removed
by subsequent patches.

This is part of the process of cleaning up the OMAP2xxx clock code
and preparing for the removal of the omap_prcm_restart() function.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Vaibhav Hiremath <hvaibhav@ti.com>
11 years agoARM: OMAP2xxx: clock: remove global 'dclk' variable
Paul Walmsley [Tue, 30 Oct 2012 02:55:53 +0000 (20:55 -0600)]
ARM: OMAP2xxx: clock: remove global 'dclk' variable

Remove the global 'dclk' variable, instead replacing it with a
variable local to the dpllcore clock type C file.  This removes some
of the special-case code surrounding the OMAP2xxx clock init.

This patch is a prerequisite for the removal of the
omap_prcm_restart() code from arch/arm/mach-omap2/prcm.c.  It also
cleans up some special-case OMAP2xxx clock code in the process.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Vaibhav Hiremath <hvaibhav@ti.com>
11 years agoARM: OMAP2/3: PRM: add SoC reset functions (using the CORE DPLL method)
Paul Walmsley [Tue, 30 Oct 2012 02:55:46 +0000 (20:55 -0600)]
ARM: OMAP2/3: PRM: add SoC reset functions (using the CORE DPLL method)

Add SoC reset functions into the PRM code.  These functions are based
on code from mach-omap2/prcm.c.  They reset the SoC using the CORE DPLL
reset method (as opposed to one of the other two or three chip reset
methods).

Adding them here will facilitate their removal from
arch/arm/mach-omap2/prcm.c.  (prcm.c is deprecated.)

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Vaibhav Hiremath <hvaibhav@ti.com>
11 years agoARM: OMAP2+: common: remove mach-omap2/common.c globals and map_common_io code
Paul Walmsley [Tue, 30 Oct 2012 02:50:21 +0000 (20:50 -0600)]
ARM: OMAP2+: common: remove mach-omap2/common.c globals and map_common_io code

Get rid of the mach-omap2/common.c globals by moving the global
initialization for IP block addresses that must occur early into
mach-omap2/io.c.  In the process, remove the *_map_common_io*() and
SoC-specific *set_globals* functions.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Vaibhav Hiremath <hvaibhav@ti.com>
11 years agoARM: OMAP2+: PRCM: remove omap_prcm_get_reset_sources()
Paul Walmsley [Tue, 30 Oct 2012 02:49:45 +0000 (20:49 -0600)]
ARM: OMAP2+: PRCM: remove omap_prcm_get_reset_sources()

omap_prcm_get_reset_sources() is now unused; so, remove it.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Vaibhav Hiremath <hvaibhav@ti.com>
11 years agowatchdog: OMAP: use standard GETBOOTSTATUS interface; use platform_data fn ptr
Paul Walmsley [Tue, 30 Oct 2012 02:49:44 +0000 (20:49 -0600)]
watchdog: OMAP: use standard GETBOOTSTATUS interface; use platform_data fn ptr

Previously the OMAP watchdog driver used a non-standard way to report
the chip reset source via the GETBOOTSTATUS ioctl.  This patch
converts the driver to use the standard WDIOF_* flags for this
purpose.

This patch may break existing userspace code that uses the existing
non-standard data format returned by the OMAP watchdog driver's
GETBOOTSTATUS ioctl.  To fetch detailed reset source information,
userspace code will need to retrieve it directly from the CGRM or PRM
drivers when those are completed.

Previously, to fetch the reset source, the driver either read a
register outside the watchdog IP block (OMAP1), or called a function
exported directly from arch/arm/mach-omap2.  Both approaches are
broken.  This patch also converts the driver to use a platform_data
function pointer.  This approach is temporary, and is due to the lack
of drivers for the OMAP16xx+ Clock Generation and Reset Management IP
block and the OMAP2+ Power and Reset Management IP block.  Once
drivers are available for those IP blocks, the watchdog driver can be
converted to call exported functions from those drivers directly.
At that point, the platform_data function pointer can be removed.

In the short term, this patch is needed to allow the PRM code to be
removed from arch/arm/mach-omap2 (it is being moved to a driver).

This version integrates a fix from Jon Hunter <jon-hunter@ti.com>
that avoids a NULL pointer dereference in a DT-only boot, and integrates
a patch commit message fix from Felipe Balbi <balbi@ti.com>.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
[paul@pwsan.com: integrated pdata fix from Jon Hunter]
Cc: Jon Hunter <jon-hunter@ti.com>
[paul@pwsan.com: integrated changelog fix from Felipe Balbi]
Cc: Felipe Balbi <balbi@ti.com>
11 years agoxfs: fix reading of wrapped log data
Dave Chinner [Fri, 2 Nov 2012 00:38:44 +0000 (11:38 +1100)]
xfs: fix reading of wrapped log data

Commit 4439647 ("xfs: reset buffer pointers before freeing them") in
3.0-rc1 introduced a regression when recovering log buffers that
wrapped around the end of log. The second part of the log buffer at
the start of the physical log was being read into the header buffer
rather than the data buffer, and hence recovery was seeing garbage
in the data buffer when it got to the region of the log buffer that
was incorrectly read.

Cc: <stable@vger.kernel.org> # 3.0.x, 3.2.x, 3.4.x 3.6.x
Reported-by: Torsten Kaiser <just.for.lkml@googlemail.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
11 years agoxfs: fix buffer shudown reference count mismatch
Dave Chinner [Fri, 2 Nov 2012 03:23:12 +0000 (14:23 +1100)]
xfs: fix buffer shudown reference count mismatch

When we shut down the filesystem, we have to unpin and free all the
buffers currently active in the CIL. To do this we unpin and remove
them in one operation as a result of a failed iclogbuf write. For
buffers, we do this removal via a simultated IO completion of after
marking the buffer stale.

At the time we do this, we have two references to the buffer - the
active LRU reference and the buf log item.  The LRU reference is
removed by marking the buffer stale, and the active CIL reference is
by the xfs_buf_iodone() callback that is run by
xfs_buf_do_callbacks() during ioend processing (via the bp->b_iodone
callback).

However, ioend processing requires one more reference - that of the
IO that it is completing. We don't have this reference, so we free
the buffer prematurely and use it after it is freed. For buffers
marked with XBF_ASYNC, this leads to assert failures in
xfs_buf_rele() on debug kernels because the b_hold count is zero.

Fix this by making sure we take the necessary IO reference before
starting IO completion processing on the stale buffer, and set the
XBF_ASYNC flag to ensure that IO completion processing removes all
the active references from the buffer to ensure it is fully torn
down.

Cc: <stable@vger.kernel.org>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
11 years agoxfs: don't vmap inode cluster buffers during free
Dave Chinner [Fri, 2 Nov 2012 00:38:42 +0000 (11:38 +1100)]
xfs: don't vmap inode cluster buffers during free

Inode buffers do not need to be mapped as inodes are read or written
directly from/to the pages underlying the buffer. This fixes a
regression introduced by commit 611c994 ("xfs: make XBF_MAPPED the
default behaviour").

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
11 years agoxfs: invalidate allocbt blocks moved to the free list
Dave Chinner [Fri, 2 Nov 2012 00:38:41 +0000 (11:38 +1100)]
xfs: invalidate allocbt blocks moved to the free list

When we free a block from the alloc btree tree, we move it to the
freelist held in the AGFL and mark it busy in the busy extent tree.
This typically happens when we merge btree blocks.

Once the transaction is committed and checkpointed, the block can
remain on the free list for an indefinite amount of time.  Now, this
isn't the end of the world at this point - if the free list is
shortened, the buffer is invalidated in the transaction that moves
it back to free space. If the buffer is allocated as metadata from
the free list, then all the modifications getted logged, and we have
no issues, either. And if it gets allocated as userdata direct from
the freelist, it gets invalidated and so will never get written.

However, during the time it sits on the free list, pressure on the
log can cause the AIL to be pushed and the buffer that covers the
block gets pushed for write. IOWs, we end up writing a freed
metadata block to disk. Again, this isn't the end of the world
because we know from the above we are only writing to free space.

The problem, however, is for validation callbacks. If the block was
on old btree root block, then the level of the block is going to be
higher than the current tree root, and so will fail validation.
There may be other inconsistencies in the block as well, and
currently we don't care because the block is in free space. Shutting
down the filesystem because a freed block doesn't pass write
validation, OTOH, is rather unfriendly.

So, make sure we always invalidate buffers as they move from the
free space trees to the free list so that we guarantee they never
get written to disk while on the free list.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Phil White <pwhite@sgi.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
11 years agoxfs: silence uninitialised f.file warning.
Dave Chinner [Thu, 25 Oct 2012 06:22:30 +0000 (17:22 +1100)]
xfs: silence uninitialised f.file warning.

Uninitialised variable build warning introduced by 2903ff0 ("switch
simple cases of fget_light to fdget"), gcc is not smart enough to
work out that the variable is not used uninitialised, and the commit
removed the initialisation at declaration that the old variable had.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
11 years agoxfs: growfs: don't read garbage for new secondary superblocks
Dave Chinner [Tue, 9 Oct 2012 03:50:52 +0000 (14:50 +1100)]
xfs: growfs: don't read garbage for new secondary superblocks

When updating new secondary superblocks in a growfs operation, the
superblock buffer is read from the newly grown region of the
underlying device. This is not guaranteed to be zero, so violates
the underlying assumption that the unused parts of superblocks are
zero filled. Get a new buffer for these secondary superblocks to
ensure that the unused regions are zero filled correctly.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
11 years agoxfs: move allocation stack switch up to xfs_bmapi_allocate
Dave Chinner [Fri, 5 Oct 2012 01:06:59 +0000 (11:06 +1000)]
xfs: move allocation stack switch up to xfs_bmapi_allocate

Switching stacks are xfs_alloc_vextent can cause deadlocks when we
run out of worker threads on the allocation workqueue. This can
occur because xfs_bmap_btalloc can make multiple calls to
xfs_alloc_vextent() and even if xfs_alloc_vextent() fails it can
return with the AGF locked in the current allocation transaction.

If we then need to make another allocation, and all the allocation
worker contexts are exhausted because the are blocked waiting for
the AGF lock, holder of the AGF cannot get it's xfs-alloc_vextent
work completed to release the AGF.  Hence allocation effectively
deadlocks.

To avoid this, move the stack switch one layer up to
xfs_bmapi_allocate() so that all of the allocation attempts in a
single switched stack transaction occur in a single worker context.
This avoids the problem of an allocation being blocked waiting for
a worker thread whilst holding the AGF.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
11 years agoxfs: introduce XFS_BMAPI_STACK_SWITCH
Dave Chinner [Fri, 5 Oct 2012 01:06:58 +0000 (11:06 +1000)]
xfs: introduce XFS_BMAPI_STACK_SWITCH

Certain allocation paths through xfs_bmapi_write() are in situations
where we have limited stack available. These are almost always in
the buffered IO writeback path when convertion delayed allocation
extents to real extents.

The current stack switch occurs for userdata allocations, which
means we also do stack switches for preallocation, direct IO and
unwritten extent conversion, even those these call chains have never
been implicated in a stack overrun.

Hence, let's target just the single stack overun offended for stack
switches. To do that, introduce a XFS_BMAPI_STACK_SWITCH flag that
the caller can pass xfs_bmapi_write() to indicate it should switch
stacks if it needs to do allocation.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
11 years agoxfs: zero allocation_args on the kernel stack
Mark Tinguely [Thu, 20 Sep 2012 18:16:45 +0000 (13:16 -0500)]
xfs: zero allocation_args on the kernel stack

Zero the kernel stack space that makes up the xfs_alloc_arg structures.

Signed-off-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
11 years agoxfs: only update the last_sync_lsn when a transaction completes
Dave Chinner [Mon, 8 Oct 2012 10:56:12 +0000 (21:56 +1100)]
xfs: only update the last_sync_lsn when a transaction completes

The log write code stamps each iclog with the current tail LSN in
the iclog header so that recovery knows where to find the tail of
thelog once it has found the head. Normally this is taken from the
first item on the AIL - the log item that corresponds to the oldest
active item in the log.

The problem is that when the AIL is empty, the tail lsn is dervied
from the the l_last_sync_lsn, which is the LSN of the last iclog to
be written to the log. In most cases this doesn't happen, because
the AIL is rarely empty on an active filesystem. However, when it
does, it opens up an interesting case when the transaction being
committed to the iclog spans multiple iclogs.

That is, the first iclog is stamped with the l_last_sync_lsn, and IO
is issued. Then the next iclog is setup, the changes copied into the
iclog (takes some time), and then the l_last_sync_lsn is stamped
into the header and IO is issued. This is still the same
transaction, so the tail lsn of both iclogs must be the same for log
recovery to find the entire transaction to be able to replay it.

The problem arises in that the iclog buffer IO completion updates
the l_last_sync_lsn with it's own LSN. Therefore, If the first iclog
completes it's IO before the second iclog is filled and has the tail
lsn stamped in it, it will stamp the LSN of the first iclog into
it's tail lsn field. If the system fails at this point, log recovery
will not see a complete transaction, so the transaction will no be
replayed.

The fix is simple - the l_last_sync_lsn is updated when a iclog
buffer IO completes, and this is incorrect. The l_last_sync_lsn
shoul dbe updated when a transaction is completed by a iclog buffer
IO. That is, only iclog buffers that have transaction commit
callbacks attached to them should update the l_last_sync_lsn. This
means that the last_sync_lsn will only move forward when a commit
record it written, not in the middle of a large transaction that is
rolling through multiple iclog buffers.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
11 years agoarm64: mm: fix booting on systems with no memory below 4GB
Will Deacon [Thu, 8 Nov 2012 16:00:16 +0000 (16:00 +0000)]
arm64: mm: fix booting on systems with no memory below 4GB

Booting on a system with all of its memory above the 4GB boundary breaks
for two reasons:

(1) We still try to create a non-empty DMA32 zone
(2) no-bootmem limits allocations to 0xffffffff

This patch fixes these issues for ARM64.

Tested-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
11 years agoarm64: smp: add missing completion for secondary boot
Will Deacon [Wed, 7 Nov 2012 17:00:05 +0000 (17:00 +0000)]
arm64: smp: add missing completion for secondary boot

Commit 149c24151e85 ("ARM: SMP: use a timing out completion for cpu
hotplug") modified arm's CPU up path to use completions. It seems that
we only got half of this patch for arm64, so add the missing call to
complete.

Reported-by: Jon Brawn <jon.brawn@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
11 years agoarm64: compat: select CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION
Will Deacon [Wed, 7 Nov 2012 14:16:28 +0000 (14:16 +0000)]
arm64: compat: select CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION

Commit c1d7e01d7877 ("ipc: use Kconfig options for
__ARCH_WANT_[COMPAT_]IPC_PARSE_VERSION") replaced the
__ARCH_WANT_COMPAT_IPC_PARSE_VERSION token with a corresponding Kconfig
option instead.

This patch updates arm64 to use the latter, rather than #define an
unused token.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
11 years agoarm64: elf: fix core dumping definitions for GP and FP registers
Will Deacon [Tue, 6 Nov 2012 19:28:48 +0000 (19:28 +0000)]
arm64: elf: fix core dumping definitions for GP and FP registers

struct user_fp does not exist for arm64, so use struct user_fpsimd_state
instead for the ELF core dumping definitions. Furthermore, since we use
regset-based core dumping, we do not need definitions for dump_task_regs
and dump_fpu.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
11 years agoarm64: perf: use architected event for CPU cycle counter
Will Deacon [Mon, 5 Nov 2012 12:34:47 +0000 (12:34 +0000)]
arm64: perf: use architected event for CPU cycle counter

We currently use a fake event encoding (0xFF) to indicate CPU cycles so
that we don't waste an event counter and can target the hardware cycle
counter instead.

The problem with this approach is that the event space defined by the
architecture permits an implementation to allocate 0xFF for some other
event.

This patch uses the architected cycle counter encoding (0x11) so that
we avoid potentially clashing with event encodings on future CPU
implementations.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
11 years agodrm/radeon/si: add some missing regs to the VM reg checker
Alex Deucher [Thu, 8 Nov 2012 15:13:24 +0000 (10:13 -0500)]
drm/radeon/si: add some missing regs to the VM reg checker

This register is needed for streamout to work properly.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
11 years agodrm/radeon/cayman: add some missing regs to the VM reg checker
Alex Deucher [Thu, 8 Nov 2012 15:08:04 +0000 (10:08 -0500)]
drm/radeon/cayman: add some missing regs to the VM reg checker

These regs were being wronly rejected leading to rendering
issues.

fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=56876

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
11 years agoALSA: Fix card refcount unbalance
Takashi Iwai [Thu, 8 Nov 2012 13:36:18 +0000 (14:36 +0100)]
ALSA: Fix card refcount unbalance

There are uncovered cases whether the card refcount introduced by the
commit a0830dbd isn't properly increased or decreased:
- OSS PCM and mixer success paths
- When lookup function gets NULL

This patch fixes these places.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=50251

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Add new codec ALC668 and ALC900 (default name ALC1150)
Kailang Yang [Thu, 8 Nov 2012 09:25:37 +0000 (10:25 +0100)]
ALSA: hda - Add new codec ALC668 and ALC900 (default name ALC1150)

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Improve HP depop when system enter to S3
Kailang Yang [Thu, 8 Nov 2012 09:23:18 +0000 (10:23 +0100)]
ALSA: hda - Improve HP depop when system enter to S3

alc269_toggle_power_output() was only use in ALC269VB.  I rename it to
alc269vb_toggle_power_output().

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: usb-audio: Fix crash at re-preparing the PCM stream
Takashi Iwai [Thu, 8 Nov 2012 07:52:45 +0000 (08:52 +0100)]
ALSA: usb-audio: Fix crash at re-preparing the PCM stream

There are bug reports of a crash with USB-audio devices when PCM
prepare is performed immediately after the stream is stopped via
trigger callback.  It turned out that the problem is that we don't
wait until all URBs are killed.

This patch adds a new function to synchronize the pending stop
operation on an endpoint, and calls in the prepare callback for
avoiding the crash above.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=49181

Reported-and-tested-by: Artem S. Tashkinov <t.artem@lycos.com>
Cc: <stable@vger.kernel.org> [v3.6]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agonet: usb: cdc_eem: Fix rx skb allocation for 802.1Q VLANs
Ian Coolidge [Wed, 7 Nov 2012 14:39:19 +0000 (14:39 +0000)]
net: usb: cdc_eem: Fix rx skb allocation for 802.1Q VLANs

cdc_eem frames might need to contain 802.1Q VLAN Ethernet frames.
URB/skb sizing from usbnet will default to the hard_mtu,
so account for the VLAN header by expanding that via hard_header_len

Signed-off-by: Ian Coolidge <iancoolidge@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agousb: gadget: g_ether: fix frame size check for 802.1Q
Ian Coolidge [Wed, 7 Nov 2012 14:39:18 +0000 (14:39 +0000)]
usb: gadget: g_ether: fix frame size check for 802.1Q

Checking skb->len against ETH_FRAME_LEN assumes a 1514
ethernet frame size. With an 802.1Q VLAN header, ethernet
frame length can now be 1518. Validate frame length against that.

Signed-off-by: Ian Coolidge <iancoolidge@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agocxgb4: Fix initialization of SGE_CONTROL register
Vipul Pandya [Wed, 7 Nov 2012 03:45:46 +0000 (03:45 +0000)]
cxgb4: Fix initialization of SGE_CONTROL register

INGPADBOUNDARY_MASK is already shifted. No need to shift it again. On reloading
a driver it was resulting in a bad SGE FL MTU sizes [1536, 9088] error. This
only causes an issue on systems that have L1 cache size of 32B, 128B, 512B,
2048B or 4096B.

Signed-off-by: Jay Hernandez <jay@chelsio.com>
Signed-off-by: Vipul Pandya <vipul@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoisdn: Make CONFIG_ISDN depend on CONFIG_NETDEVICES
Lee Jones [Tue, 6 Nov 2012 23:55:03 +0000 (23:55 +0000)]
isdn: Make CONFIG_ISDN depend on CONFIG_NETDEVICES

It doesn't make much sense to enable ISDN services if you don't
intend to connect to a network. Therefore insisting that ISDN
depends on NETDEVICES seems logical. We can then remove any
guards mentioning NETDEVICES inside all subordinate drivers.

This also has the nice side-effect of fixing the warning below
when ISDN_I4L && !CONFIG_NETDEVICES at compile time.

This patch fixes:
drivers/isdn/i4l/isdn_common.c: In function ‘isdn_ioctl’:
drivers/isdn/i4l/isdn_common.c:1278:8: warning: unused variable ‘s’ [-Wunused-variable]

Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agocxgb4: Initialize data structures before using.
Vipul Pandya [Tue, 6 Nov 2012 03:37:09 +0000 (03:37 +0000)]
cxgb4: Initialize data structures before using.

We should not assume reserve fields to be don't cares as fields may change.
Clearing data structures before using.

Signed-off-by: Jay Hernandez <jay@chelsio.com>
Signed-off-by: Vipul Pandya <vipul@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agommc: sdhci-s3c: fix the card detection in runtime-pm
Seungwon Jeon [Tue, 30 Oct 2012 05:28:36 +0000 (14:28 +0900)]
mmc: sdhci-s3c: fix the card detection in runtime-pm

If host clock is disabled, host cannot detect a card in case of using
CD internal for detection.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agoaf-packet: fix oops when socket is not present
Eric Leblond [Tue, 6 Nov 2012 02:10:10 +0000 (02:10 +0000)]
af-packet: fix oops when socket is not present

Due to a NULL dereference, the following patch is causing oops
in normal trafic condition:

commit c0de08d04215031d68fa13af36f347a6cfa252ca
Author: Eric Leblond <eric@regit.org>
Date:   Thu Aug 16 22:02:58 2012 +0000

    af_packet: don't emit packet on orig fanout group

This buggy patch was a feature fix and has reached most stable
branches.

When skb->sk is NULL and when packet fanout is used, there is a
crash in match_fanout_group where skb->sk is accessed.
This patch fixes the issue by returning false as soon as the
socket is NULL: this correspond to the wanted behavior because
the kernel as to resend the skb to all the listening socket in
this case.

Signed-off-by: Eric Leblond <eric@regit.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agopkt_sched: enable QFQ to support TSO/GSO
Paolo Valente [Mon, 5 Nov 2012 20:29:24 +0000 (20:29 +0000)]
pkt_sched: enable QFQ to support TSO/GSO

If the max packet size for some class (configured through tc) is
violated by the actual size of the packets of that class, then QFQ
would not schedule classes correctly, and the data structures
implementing the bucket lists may get corrupted. This problem occurs
with TSO/GSO even if the max packet size is set to the MTU, and is,
e.g., the cause of the failure reported in [1]. Two patches have been
proposed to solve this problem in [2], one of them is a preliminary
version of this patch.

This patch addresses the above issues by: 1) setting QFQ parameters to
proper values for supporting TSO/GSO (in particular, setting the
maximum possible packet size to 64KB), 2) automatically increasing the
max packet size for a class, lmax, when a packet with a larger size
than the current value of lmax arrives.

The drawback of the first point is that the maximum weight for a class
is now limited to 4096, which is equal to 1/16 of the maximum weight
sum.

Finally, this patch also forcibly caps the timestamps of a class if
they are too high to be stored in the bucket list. This capping, taken
from QFQ+ [3], handles the unfrequent case described in the comment to
the function slot_insert.

[1] http://marc.info/?l=linux-netdev&m=134968777902077&w=2
[2] http://marc.info/?l=linux-netdev&m=135096573507936&w=2
[3] http://marc.info/?l=linux-netdev&m=134902691421670&w=2

Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
Tested-by: Cong Wang <amwang@redhat.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agommc: sdhci-s3c: use clk_prepare_enable and clk_disable_unprepare
Thomas Abraham [Tue, 2 Oct 2012 23:35:43 +0000 (08:35 +0900)]
mmc: sdhci-s3c: use clk_prepare_enable and clk_disable_unprepare

Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
calls as required by common clock framework.

Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: dw_mmc: constify dw_mci_idmac_ops in exynos back-end
Arnd Bergmann [Tue, 6 Nov 2012 21:55:31 +0000 (22:55 +0100)]
mmc: dw_mmc: constify dw_mci_idmac_ops in exynos back-end

The of_device_id match data is now marked as const and
must not be modified. This changes the dw_mmc to mark
all pointers passing the dw_mci_drv_data or dw_mci_dma_ops
structures as const, and also marks the static definitions
as const.

drivers/mmc/host/dw_mmc-exynos.c: In function 'dw_mci_exynos_probe':
drivers/mmc/host/dw_mmc-exynos.c:234:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Abraham <thomas.abraham@linaro.org>
Cc: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: dw_mmc: fix modular build for exynos back-end
Arnd Bergmann [Tue, 6 Nov 2012 21:55:30 +0000 (22:55 +0100)]
mmc: dw_mmc: fix modular build for exynos back-end

The MODULE_DEVICE_TABLE entry for dw_mci_exynos_match
was incorrectly copied from the platform back-end, which
causes this error when building the driver as a loadable
module:

drivers/mmc/host/dw_mmc-exynos.c: At top level:
drivers/mmc/host/dw_mmc-exynos.c:226:34: error: '__mod_of_device_table' aliased to undefined symbol 'dw_mci_pltfm_match'

This patch fixes the problem by just using the correct
string.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Abraham <thomas.abraham@linaro.org>
Cc: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: sdhci: fix NULL dereference in sdhci_request() tuning
Chris Ball [Mon, 5 Nov 2012 19:29:49 +0000 (14:29 -0500)]
mmc: sdhci: fix NULL dereference in sdhci_request() tuning

Commit 473b095a72a9 ("mmc: sdhci: fix incorrect command used in tuning")
introduced a NULL dereference at resume-time if an SD 3.0 host controller
raises the SDHCI_NEEDS_TUNING flag while no card is inserted.  Seen on an
OLPC XO-4 with sdhci-pxav3, but presumably affects other controllers too.

Signed-off-by: Chris Ball <cjb@laptop.org>
Cc: stable <stable@vger.kernel.org> [3.3+]
11 years agommc: sdhci: fix IS_ERR() checking of regulator_get()
Kevin Liu [Wed, 17 Oct 2012 11:04:44 +0000 (19:04 +0800)]
mmc: sdhci: fix IS_ERR() checking of regulator_get()

There are two problems here:

The check for vmmc was printing an unnecessary pr_info() when
host->vmmc is NULL.

The intent of the check for vqmmc was to only remove UHS if we have a
regulator that doesn't support the required voltage, but since IS_ERR()
doesn't catch NULL, we were actually removing UHS modes if vqmmc isn't
present at all -- since it isn't present for most users, this breaks
UHS for them.  This patch fixes that UHS regression in 3.7-rc1.

Signed-off-by: Kevin Liu <kliu5@marvell.com>
Signed-off-by: Bin Wang <binw@marvell.com>
Reviewed-by: Philip Rakity <prakity@marvell.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: fix sdhci-dove probe/removal
Russell King - ARM Linux [Mon, 29 Oct 2012 21:43:07 +0000 (21:43 +0000)]
mmc: fix sdhci-dove probe/removal

1. Never ever publish a device in the system before it has been setup
   to a usable state.
2. Unregister the device _BEFORE_ taking away any resources it may be
   using.
3. Don't check clks against NULL.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: sh_mmcif: fix use after free
Guennadi Liakhovetski [Tue, 23 Oct 2012 12:08:52 +0000 (14:08 +0200)]
mmc: sh_mmcif: fix use after free

A recent commit "mmc: sh_mmcif: fix clock management" has introduced a
use after free bug in sh_mmcif.c: in sh_mmcif_remove() the call to
mmc_free_host() frees private driver data, therefore using it afterwards
is a bug. Revert that hunk.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: stable@vger.kernel.org [3.6]
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: sdhci-pci: fix 'Invalid iomem size' error message condition
Adrian Hunter [Thu, 18 Oct 2012 06:54:31 +0000 (09:54 +0300)]
mmc: sdhci-pci: fix 'Invalid iomem size' error message condition

The SDHCI standard defines a 256 byte register set but a device
that specifies a larger iomem region is not an error.  Alter the
message condition accordingly.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: mxcmmc: Fix MODULE_ALIAS
Fabio Estevam [Tue, 9 Oct 2012 19:26:05 +0000 (16:26 -0300)]
mmc: mxcmmc: Fix MODULE_ALIAS

The correct name for the driver is "mxc-mmc".

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: omap_hsmmc: fix NULL pointer dereference for dt boot
Balaji T K [Mon, 15 Oct 2012 16:05:08 +0000 (21:35 +0530)]
mmc: omap_hsmmc: fix NULL pointer dereference for dt boot

dev->platform_data is NULL in case of device tree boot,
instead use the saved version in struct omap_hsmmc_host.

Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: omap_hsmmc: fix host reference after mmc_free_host
Balaji T K [Mon, 15 Oct 2012 16:05:07 +0000 (21:35 +0530)]
mmc: omap_hsmmc: fix host reference after mmc_free_host

struct omap_hsmmc_host *host should not be accessed after mmc_free_host().
Reorder mmc_free_host() after iounmap(host->base).

Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: dw_mmc: fix multiple drv_data NULL dereferences
James Hogan [Tue, 16 Oct 2012 08:43:08 +0000 (09:43 +0100)]
mmc: dw_mmc: fix multiple drv_data NULL dereferences

800d78bfccb3d ("mmc: dw_mmc: add support for implementation specific
callbacks") -- merged in v3.7-rc1 -- introduced multiple NULL pointer
dereferences when the default dw_mci_pltfm_probe() is used, as it sets
host->drv_data to NULL, and that's only checked against NULL in 1 out of
the 7 cases where it is dereferenced.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: dw_mmc: enable controller interrupt before calling mmc_start_host
Yuvaraj CD [Mon, 8 Oct 2012 08:59:51 +0000 (14:29 +0530)]
mmc: dw_mmc: enable controller interrupt before calling mmc_start_host

As mmc_start_host is getting called before enabling the dw_mmc controller
interrupt, there is a problem of missing the SDMMC_INT_CMD_DONE for the
very first command sent by the sdio_reset.

This problem occurs only when we disable MMC debugging i.e, MMC_DEBUG=n.
This patch enables the dw_mmc controller interrupt before mmc_start_host.

Signed-off-by: Yuvaraj CD <yuvaraj.cd@samsung.com>
Reviewed-by: Girish K S <girish.shivananjappa@linaro.org>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: sdhci-of-esdhc: disable CMD23 for some Freescale SoCs
Jerry Huang [Thu, 25 Oct 2012 05:47:19 +0000 (13:47 +0800)]
mmc: sdhci-of-esdhc: disable CMD23 for some Freescale SoCs

CMD23 causes lots of errors in kernel on some freescale SoCs
(P1020, P1021, P1022, P1024, P1025 and P4080) when MMC card used,
which is because these controllers does not support CMD23,
even on the SoCs which declares CMD23 is supported.
Therefore, we'll not use CMD23.

Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: dw_mmc: remove _dev_info compile warning
Seungwon Jeon [Fri, 28 Sep 2012 10:13:11 +0000 (19:13 +0900)]
mmc: dw_mmc: remove _dev_info compile warning

This patch removes the following warning.
drivers/mmc/host/dw_mmc.c:1976: warning: passing argument 1 of
'_dev_info' from incompatible pointer type

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agommc: dw_mmc: convert the variable type of irq
Seungwon Jeon [Fri, 28 Sep 2012 05:21:59 +0000 (14:21 +0900)]
mmc: dw_mmc: convert the variable type of irq

Even though platform_get_irq returns error, 'host->irq'
always has an unsigned value. Less-than-zero comparison
of an unsigned value is never true. Type of 'unsigned int'
will be changed for 'int'.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
11 years agoALSA: hdspm - Fix sync check reporting on RME RayDAT
Adrian Knoth [Wed, 7 Nov 2012 17:00:09 +0000 (18:00 +0100)]
ALSA: hdspm - Fix sync check reporting on RME RayDAT

The RayDAT reports the sync status of its inputs in consecutive bit
positions, so all we do in hdspm_s1_sync_check is to iterate over idx:

    status = hdspm_read(hdspm, HDSPM_RD_STATUS_1);

    lock = (status & (0x1<<idx)) ? 1 : 0;
    sync = (status & (0x100<<idx)) ? 1 : 0;

The index is given in kcontrol->private_value:

    HDSPM_SYNC_CHECK("WC SyncCheck", 0),
    HDSPM_SYNC_CHECK("AES SyncCheck", 1),
    HDSPM_SYNC_CHECK("SPDIF SyncCheck", 2),
    HDSPM_SYNC_CHECK("ADAT1 SyncCheck", 3),
    HDSPM_SYNC_CHECK("ADAT2 SyncCheck", 4),
    HDSPM_SYNC_CHECK("ADAT3 SyncCheck", 5),
    HDSPM_SYNC_CHECK("ADAT4 SyncCheck", 6),
    HDSPM_SYNC_CHECK("TCO SyncCheck", 7),
    HDSPM_SYNC_CHECK("SYNC IN SyncCheck", 8),

The patch corrects the indicated sync flags by passing the proper index
value to hdspm_s1_sync_check().

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoxen/arm: Fix compile errors when drivers are compiled as modules.
Konrad Rzeszutek Wilk [Tue, 6 Nov 2012 22:06:52 +0000 (17:06 -0500)]
xen/arm: Fix compile errors when drivers are compiled as modules.

We end up with:

ERROR: "HYPERVISOR_event_channel_op" [drivers/xen/xen-gntdev.ko] undefined!
ERROR: "privcmd_call" [drivers/xen/xen-privcmd.ko] undefined!
ERROR: "HYPERVISOR_grant_table_op" [drivers/net/xen-netback/xen-netback.ko] undefined!

and this patch exports said function (which is implemented in hypercall.S).

Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agoxen/generic: Disable fallback build on ARM.
Konrad Rzeszutek Wilk [Tue, 6 Nov 2012 20:49:27 +0000 (15:49 -0500)]
xen/generic: Disable fallback build on ARM.

As there is no need for it (the fallback code is for older
hypervisors and they only run under x86), and also b/c
we get:

drivers/xen/fallback.c: In function 'xen_event_channel_op_compat':
drivers/xen/fallback.c:10:19: error: storage size of 'op' isn't known
drivers/xen/fallback.c:15:2: error: implicit declaration of function '_hypercall1' [-Werror=implicit-function-declaration]
drivers/xen/fallback.c:15:19: error: expected expression before 'int'
drivers/xen/fallback.c:18:7: error: 'EVTCHNOP_close' undeclared (first use in this function)
drivers/xen/fallback.c:18:7: note: each undeclared identifier is reported only once for each function it appears in
.. and more

[v1: Moved the enablement to be covered by CONFIG_X86 per Ian's suggestion]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agoxen/events: fix RCU warning, or Call idle notifier after irq_enter()
Mojiong Qiu [Tue, 6 Nov 2012 08:08:15 +0000 (16:08 +0800)]
xen/events: fix RCU warning, or Call idle notifier after irq_enter()

exit_idle() should be called after irq_enter(), otherwise it throws:

[ INFO: suspicious RCU usage. ]
3.6.5 #1 Not tainted
-------------------------------
include/linux/rcupdate.h:725 rcu_read_lock() used illegally while idle!

other info that might help us debug this:

RCU used illegally from idle CPU!
rcu_scheduler_active = 1, debug_locks = 1
RCU used illegally from extended quiescent state!
1 lock held by swapper/0/0:
 #0:  (rcu_read_lock){......}, at: [<ffffffff810e9fe0>] __atomic_notifier_call_chain+0x0/0x140

stack backtrace:
Pid: 0, comm: swapper/0 Not tainted 3.6.5 #1
Call Trace:
 <IRQ>  [<ffffffff811259a2>] lockdep_rcu_suspicious+0xe2/0x130
 [<ffffffff810ea10c>] __atomic_notifier_call_chain+0x12c/0x140
 [<ffffffff810e9fe0>] ? atomic_notifier_chain_unregister+0x90/0x90
 [<ffffffff811216cd>] ? trace_hardirqs_off+0xd/0x10
 [<ffffffff810ea136>] atomic_notifier_call_chain+0x16/0x20
 [<ffffffff810777c3>] exit_idle+0x43/0x50
 [<ffffffff81568865>] xen_evtchn_do_upcall+0x25/0x50
 [<ffffffff81aa690e>] xen_do_hypervisor_callback+0x1e/0x30
 <EOI>  [<ffffffff810013aa>] ? hypercall_page+0x3aa/0x1000
 [<ffffffff810013aa>] ? hypercall_page+0x3aa/0x1000
 [<ffffffff81061540>] ? xen_safe_halt+0x10/0x20
 [<ffffffff81075cfa>] ? default_idle+0xba/0x570
 [<ffffffff810778af>] ? cpu_idle+0xdf/0x140
 [<ffffffff81a4d881>] ? rest_init+0x135/0x144
 [<ffffffff81a4d74c>] ? csum_partial_copy_generic+0x16c/0x16c
 [<ffffffff82520c45>] ? start_kernel+0x3db/0x3e8
 [<ffffffff8252066a>] ? repair_env_string+0x5a/0x5a
 [<ffffffff82520356>] ? x86_64_start_reservations+0x131/0x135
 [<ffffffff82524aca>] ? xen_start_kernel+0x465/0x46

Git commit 98ad1cc14a5c4fd658f9d72c6ba5c86dfd3ce0d5
Author: Frederic Weisbecker <fweisbec@gmail.com>
Date:   Fri Oct 7 18:22:09 2011 +0200

    x86: Call idle notifier after irq_enter()

did this, but it missed the Xen code.

Signed-off-by: Mojiong Qiu <mjqiu@tencent.com>
Cc: stable@vger.kernel.org # from 3.3 and newer.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agoxen/hvm: If we fail to fetch an HVM parameter print out which flag it is.
Konrad Rzeszutek Wilk [Fri, 19 Oct 2012 19:01:46 +0000 (15:01 -0400)]
xen/hvm: If we fail to fetch an HVM parameter print out which flag it is.

Makes it easier to troubleshoot in the field.

Acked-by: Ian Campbell <ian.campbell@citrix.com>
[v1: Use macro per Ian's suggestion]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agodrm/radeon/dce3: switch back to old pll allocation order for discrete
Alex Deucher [Mon, 5 Nov 2012 15:16:12 +0000 (10:16 -0500)]
drm/radeon/dce3: switch back to old pll allocation order for discrete

The order shouldn't matter, but this seems to cause regressions for
certain specific cases.  This should fix it for now.  We probably
need to investigate a proper fix in the next development cycle.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Andy Furniss <andyqos@ukfsn.org>
11 years agoALSA: hda - Add pin fixups for ASUS G75
Takashi Iwai [Wed, 7 Nov 2012 09:40:36 +0000 (10:40 +0100)]
ALSA: hda - Add pin fixups for ASUS G75

To parse properly the subwoofer outputs on ASUS G75 laptop with VT1802
codec, correct the default configurations of speaker pins 0x24 and
0x33.

Reported-by: Massimo Del Fedele <max@veneto.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Fix invalid connections in VT1802 codec
Takashi Iwai [Wed, 7 Nov 2012 09:37:48 +0000 (10:37 +0100)]
ALSA: hda - Fix invalid connections in VT1802 codec

VT1802 codec provides the invalid connection lists of NID 0x24 and
0x33 containing the routes to a non-exist widget 0x3e.  This confuses
the auto-parser.  Fix it up in the driver by overriding these
connections.

Reported-by: Massimo Del Fedele <max@veneto.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Fix empty DAC filling in patch_via.c
Takashi Iwai [Wed, 7 Nov 2012 09:32:47 +0000 (10:32 +0100)]
ALSA: hda - Fix empty DAC filling in patch_via.c

In via_auto_fill_adc_nids(), the parser tries to fill dac_nids[] at
the point of the current line-out (i).  When no valid path is found
for this output, this results in dac = 0, thus it creates a hole in
dac_nids[].  This confuses is_empty_dac() and trims the detected DAC
in later reference.

This patch fixes the bug by appending DAC properly to dac_nids[] in
via_auto_fill_adc_nids().

Reported-by: Massimo Del Fedele <max@veneto.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoARM: zynq: Allow UART1 to be used as DEBUG_LL console.
Nick Bowler [Mon, 5 Nov 2012 21:45:49 +0000 (16:45 -0500)]
ARM: zynq: Allow UART1 to be used as DEBUG_LL console.

The main UART on the Xilinx ZC702 board is UART1, located at address
e0001000.  Add a Kconfig option to select this device as the low-level
debugging port.  This allows the really early boot printouts to reach
the USB serial adaptor on this board.

For consistency's sake, add a choice entry for UART0 even though it is
the the default if UART1 is not selected.

Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
Tested-by: Josh Cartwright <josh.cartwright@ni.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>