]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoxfs: fix segment in xfs_buf_item_format_segment
Mark Tinguely [Tue, 4 Dec 2012 23:18:04 +0000 (17:18 -0600)]
xfs: fix segment in xfs_buf_item_format_segment

Not every segment in a multi-segment buffer is dirty in a
transaction and they will not be outputted. The assert in
xfs_buf_item_format_segment() that checks for the at least
one chunk of data in the segment to be used is not necessary
true for multi-segmented buffers.

Signed-off-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
11 years agoxfs: rename bli_format to avoid confusion with bli_formats
Mark Tinguely [Tue, 4 Dec 2012 23:18:03 +0000 (17:18 -0600)]
xfs: rename bli_format to avoid confusion with bli_formats

Rename the bli_format structure to __bli_format to avoid
accidently confusing them with the bli_formats pointer.

Signed-off-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
11 years agoxfs: use b_maps[] for discontiguous buffers
Mark Tinguely [Tue, 4 Dec 2012 23:18:02 +0000 (17:18 -0600)]
xfs: use b_maps[] for discontiguous buffers

Commits starting at 77c1a08 introduced a multiple segment support
to xfs_buf. xfs_trans_buf_item_match() could not find a multi-segment
buffer in the transaction because it was looking at the single segment
block number rather than the multi-segment b_maps[0].bm.bn. This
results on a recursive buffer lock that can never be satisfied.

This patch:
 1) Changed the remaining b_map accesses to be b_maps[0] accesses.
 2) Renames the single segment b_map structure to __b_map to avoid
    future confusion.

Signed-off-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
11 years agoxen: Fix stack corruption in xen_failsafe_callback for 32bit PVOPS guests.
Andrew Cooper [Wed, 16 Jan 2013 12:00:55 +0000 (12:00 +0000)]
xen: Fix stack corruption in xen_failsafe_callback for 32bit PVOPS guests.

This fixes CVE-2013-0190 / XSA-40

There has been an error on the xen_failsafe_callback path for failed
iret, which causes the stack pointer to be wrong when entering the
iret_exc error path.  This can result in the kernel crashing.

In the classic kernel case, the relevant code looked a little like:

        popl %eax      # Error code from hypervisor
        jz 5f
        addl $16,%esp
        jmp iret_exc   # Hypervisor said iret fault
5:      addl $16,%esp
                       # Hypervisor said segment selector fault

Here, there are two identical addls on either option of a branch which
appears to have been optimised by hoisting it above the jz, and
converting it to an lea, which leaves the flags register unaffected.

In the PVOPS case, the code looks like:

        popl_cfi %eax         # Error from the hypervisor
        lea 16(%esp),%esp     # Add $16 before choosing fault path
        CFI_ADJUST_CFA_OFFSET -16
        jz 5f
        addl $16,%esp         # Incorrectly adjust %esp again
        jmp iret_exc

It is possible unprivileged userspace applications to cause this
behaviour, for example by loading an LDT code selector, then changing
the code selector to be not-present.  At this point, there is a race
condition where it is possible for the hypervisor to return back to
userspace from an interrupt, fault on its own iret, and inject a
failsafe_callback into the kernel.

This bug has been present since the introduction of Xen PVOPS support
in commit 5ead97c84 (xen: Core Xen implementation), in 2.6.23.

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: stable@vger.kernel.org
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agoTell the world we gave up on pushing CC_OPTIMIZE_FOR_SIZE
Kirill Smelkov [Fri, 2 Nov 2012 11:41:01 +0000 (15:41 +0400)]
Tell the world we gave up on pushing CC_OPTIMIZE_FOR_SIZE

In commit 281dc5c5ec0f ("Give up on pushing CC_OPTIMIZE_FOR_SIZE") we
already changed the actual default value, but the help-text still
suggested 'y'. Fix the help text too, for all the same reasons.

Sadly, -Os keeps on generating some very suboptimal code for certain
cases, to the point where any I$ miss upside is swamped by the downside.
The main ones are:

 - using "rep movsb" for memcpy, even on CPU's where that is
   horrendously bad for performance.

 - not honoring branch prediction information, so any I$ footprint you
   win from smaller code, you lose from less code density in the I$.

 - using divide instructions when that is very expensive.

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agomfd, TWL4030: TWL4030 need select REGMAP_I2C
Chuansheng Liu [Mon, 24 Dec 2012 14:19:56 +0000 (22:19 +0800)]
mfd, TWL4030: TWL4030 need select REGMAP_I2C

Fix the build error:

  drivers/built-in.o: In function `twl_probe':
  drivers/mfd/twl-core.c:1256: undefined reference to `devm_regmap_init_i2c'
  make: *** [vmlinux] Error 1

Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
[ Samuel is busy, taking it directly  - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agodrivers/base/cpu.c: Fix typo in comment
Ralf Baechle [Tue, 15 Jan 2013 14:27:46 +0000 (15:27 +0100)]
drivers/base/cpu.c: Fix typo in comment

[ We should make fun of people who can't speel too, but then we'd have
  no time for any real work at all  - Linus ]

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agolockdep, rwsem: fix down_write_nest_lock() if !CONFIG_DEBUG_LOCK_ALLOC
Jiri Kosina [Tue, 15 Jan 2013 19:12:37 +0000 (20:12 +0100)]
lockdep, rwsem: fix down_write_nest_lock() if !CONFIG_DEBUG_LOCK_ALLOC

Commit 1b963c81b145 ("lockdep, rwsem: provide down_write_nest_lock()")
contains a bug in a codepath when CONFIG_DEBUG_LOCK_ALLOC is disabled,
which causes down_read() to be called instead of down_write() by mistake
on such configurations.  Fix that.

Reported-and-tested-by: Andrew Clayton <andrew@digital-domain.net>
Reported-and-tested-by: Zlatko Calusic <zlatko.calusic@iskon.hr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Reviewed-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Wed, 16 Jan 2013 19:33:52 +0000 (11:33 -0800)]
Merge tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull second round of sound fixes from Takashi Iwai:
 "Yet a few more fixes popped up in this week.

  The biggest change here is the addition of pinctrl support for Atmel,
  which turned out to be almost mandatory to make things working.

  The rest are a few fixes for M-Audio usb-audio device and a fix for
  regression of HD-audio HDMI codecs with alsactl in the recent kernel."

* tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda/hdmi - Work around "alsactl restore" errors
  ALSA: usb-audio: selector map for M-Audio FT C400
  ALSA: usb-audio: M-Audio FT C400 skip packet quirk
  ALSA: usb-audio: correct M-Audio C400 clock source quirk
  ALSA: usb - fix race in creation of M-Audio Fast track pro driver
  ASoC: atmel-ssc: add pinctrl selection to driver
  ARM: at91/dts: add pinctrl support for SSC peripheral

11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Linus Torvalds [Wed, 16 Jan 2013 19:13:39 +0000 (11:13 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending

Pull scsi target fixes from Nicholas Bellinger:
 "This includes an important >= v3.6 regression bugfix for active I/O
  shutdown (Roland), some TMR related failure / corner cases fixes for
  long outstanding I/O (Roland), two FCoE target mode fabric fabric role
  fixes (MDR), a fix for an incorrect sense code during LUN
  communication failure (Dr. Hannes), plus a handful of other minor
  fixes.

  There are still some outstanding zero-length control CDB regression
  fixes that need to be addressed for v3.8, that will be coming in a
  follow-up PULL request."

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  iscsi-target: Fix CmdSN comparison (use cmd->cmd_sn instead of cmd->stat_sn)
  target: Release se_cmd when LUN lookup fails for TMR
  target: Fix use-after-free in LUN RESET handling
  target: Fix missing CMD_T_ACTIVE bit regression for pending WRITEs
  tcm_fc: Do not report target role when target is not defined
  tcm_fc: Do not indicate retry capability to initiators
  target: Use TCM_NO_SENSE for initialisation
  target: Introduce TCM_NO_SENSE
  target: use correct sense code for LUN communication failure

11 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Linus Torvalds [Wed, 16 Jan 2013 18:55:10 +0000 (10:55 -0800)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs

Pull ext3 and udf fixes from Jan Kara:
 "One ext3 performance regression fix and one udf regression fix (oops
  on interrupted mount)."

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
  UDF: Fix a null pointer dereference in udf_sb_free_partitions
  jbd: don't wake kjournald unnecessarily

11 years agoMerge git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Wed, 16 Jan 2013 18:17:09 +0000 (10:17 -0800)]
Merge git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull s390 KVM fix from Gleb Natapov.

* git://git.kernel.org/pub/scm/virt/kvm/kvm:
  s390/kvm: Fix BUG in include/linux/kvm_host.h:745

11 years agoMerge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh
Linus Torvalds [Wed, 16 Jan 2013 18:13:04 +0000 (10:13 -0800)]
Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh

Pull SuperH fixes from Paul Mundt.

* tag 'sh-for-linus' of git://github.com/pmundt/linux-sh:
  sh: ecovec: add sample amixer settings
  sh: Fix up stack debugging build.
  sh: wire up finit_module syscall.
  sh: Fix FDPIC binary loader
  sh: clkfwk: bugfix: sh_clk_div_enable() care sh_clk_div_set_rate() if div6
  sh: define TASK_UNMAPPED_BASE as a page aligned constant

11 years agoMerge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas...
Linus Torvalds [Wed, 16 Jan 2013 17:44:40 +0000 (09:44 -0800)]
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64

Pull arm64 fixes from Catalin Marinas:
 - Page protection fixes, including proper PAGE_NONE handling
 - Timezone vdso sequence counting fix
 - Additional compat syscall wiring

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
  arm64: compat: add syscall table entries for new syscalls
  arm64: mm: introduce present, faulting entries for PAGE_NONE
  arm64: mm: only wrprotect clean ptes if they are present
  arm64: vdso: remove broken, redundant sequence counting for timezones

11 years agoMerge branch 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Linus Torvalds [Wed, 16 Jan 2013 17:11:50 +0000 (09:11 -0800)]
Merge branch 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Peter Anvin:
 "This is mainly a workaround for a bug in Sandy Bridge graphics which
  causes corruption of certain memory pages."

* 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/Sandy Bridge: Sandy Bridge workaround depends on CONFIG_PCI
  x86/Sandy Bridge: mark arrays in __init functions as __initconst
  x86/Sandy Bridge: reserve pages when integrated graphics is present
  x86, efi: correct precedence of operators in setup_efi_pci

11 years agoMAINTAINERS: update email address for Timur Tabi
Timur Tabi [Tue, 15 Jan 2013 20:19:45 +0000 (14:19 -0600)]
MAINTAINERS: update email address for Timur Tabi

Timur Tabi no longer works for Freescale, so update the email address
and status for all of his maintained projects.

Also mark the QE library as orphaned, for lack of interest in
maintaining it.

The CS4270 driver is marked as "Odd Fixes" because appropriate hardware
is no longer available.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agofirmware: make sure the fw file size is not 0
Luciano Coelho [Tue, 15 Jan 2013 08:43:43 +0000 (10:43 +0200)]
firmware: make sure the fw file size is not 0

If the requested firmware file size is 0 bytes in the filesytem, we
will try to vmalloc(0), which causes a warning:

  vmalloc: allocation failure: 0 bytes
  kworker/1:1: page allocation failure: order:0, mode:0xd2
    __vmalloc_node_range+0x164/0x208
    __vmalloc_node+0x4c/0x58
    vmalloc+0x38/0x44
    _request_firmware_load+0x220/0x6b0
    request_firmware+0x64/0xc8
    wl18xx_setup+0xb4/0x570 [wl18xx]
    wlcore_nvs_cb+0x64/0x9f8 [wlcore]
    request_firmware_work_func+0x94/0x100
    process_one_work+0x1d0/0x750
    worker_thread+0x184/0x4ac
    kthread+0xb4/0xc0

To fix this, check whether the file size is less than or equal to zero
in fw_read_file_contents().

Cc: stable <stable@vger.kernel.org> [3.7]
Signed-off-by: Luciano Coelho <coelho@ti.com>
Acked-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agomodule, async: async_synchronize_full() on module init iff async is used
Tejun Heo [Wed, 16 Jan 2013 02:52:51 +0000 (18:52 -0800)]
module, async: async_synchronize_full() on module init iff async is used

If the default iosched is built as module, the kernel may deadlock
while trying to load the iosched module on device probe if the probing
was running off async.  This is because async_synchronize_full() at
the end of module init ends up waiting for the async job which
initiated the module loading.

 async A modprobe

 1. finds a device
 2. registers the block device
 3. request_module(default iosched)
4. modprobe in userland
5. load and init module
6. async_synchronize_full()

Async A waits for modprobe to finish in request_module() and modprobe
waits for async A to finish in async_synchronize_full().

Because there's no easy to track dependency once control goes out to
userland, implementing properly nested flushing is difficult.  For
now, make module init perform async_synchronize_full() iff module init
has queued async jobs as suggested by Linus.

This avoids the described deadlock because iosched module doesn't use
async and thus wouldn't invoke async_synchronize_full().  This is
hacky and incomplete.  It will deadlock if async module loading nests;
however, this works around the known problem case and seems to be the
best of bad options.

For more details, please refer to the following thread.

  http://thread.gmane.org/gmane.linux.kernel/1420814

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Alex Riesen <raa.lkml@gmail.com>
Tested-by: Ming Lei <ming.lei@canonical.com>
Tested-by: Alex Riesen <raa.lkml@gmail.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agos390/chsc: fix SEI usage
Sebastian Ott [Tue, 15 Jan 2013 18:02:01 +0000 (19:02 +0100)]
s390/chsc: fix SEI usage

cbc0dd1 "s390/pci: CHSC PCI support for error and availability events"
introduced a new SEI notification type as part of pci support.
The way SEI was called with nt2 and nt0 consecutive broke the nt0
stuff used for channel subsystem notifications.

The reason why this was broken with the mentioned patch is that you
cannot selectively disable type 0 notifications (so even when asked
for type 2 only, type 0 could be presented).

The way to do it is to tell SEI which types of notification you can
process and -this is the important part- look at the SEI result which
notification type you actually received.

Reviewed-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Tested-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/time: fix sched_clock() overflow
Heiko Carstens [Mon, 14 Jan 2013 15:55:55 +0000 (16:55 +0100)]
s390/time: fix sched_clock() overflow

Converting a 64 Bit TOD format value to nanoseconds means that the value
must be divided by 4.096. In order to achieve that we multiply with 125
and divide by 512.
When used within sched_clock() this triggers an overflow after appr.
417 days. Resulting in a sched_clock() return value that is much smaller
than previously and therefore may cause all sort of weird things in
subsystems that rely on a monotonic sched_clock() behaviour.

To fix this implement a tod_to_ns() helper function which converts TOD
values without overflow and call this function from both places that
open coded the conversion: sched_clock() and kvm_s390_handle_wait().

Cc: stable@kernel.org
Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agodrm/i915: Invalidate the relocation presumed_offsets along the slow path
Chris Wilson [Tue, 15 Jan 2013 16:17:54 +0000 (16:17 +0000)]
drm/i915: Invalidate the relocation presumed_offsets along the slow path

In the slow path, we are forced to copy the relocations prior to
acquiring the struct mutex in order to handle pagefaults. We forgo
copying the new offsets back into the relocation entries in order to
prevent a recursive locking bug should we trigger a pagefault whilst
holding the mutex for the reservations of the execbuffer. Therefore, we
need to reset the presumed_offsets just in case the objects are rebound
back into their old locations after relocating for this exexbuffer - if
that were to happen we would assume the relocations were valid and leave
the actual pointers to the kernels dangling, instant hang.

Fixes regression from commit bcf50e2775bbc3101932d8e4ab8c7902aa4163b4
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Nov 21 22:07:12 2010 +0000

    drm/i915: Handle pagefaults in execbuffer user relocations

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55984
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@fwll.ch>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agosh: ecovec: add sample amixer settings
Kuninori Morimoto [Tue, 25 Dec 2012 04:04:20 +0000 (20:04 -0800)]
sh: ecovec: add sample amixer settings

FSI - DA7210 needs amixer settings to use it.
This patch adds quick setting guide

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
11 years agodrm/i915/eDP: do not write power sequence registers for ghost eDP
Jani Nikula [Wed, 16 Jan 2013 08:53:40 +0000 (10:53 +0200)]
drm/i915/eDP: do not write power sequence registers for ghost eDP

Some machines detect an eDP port even if it's not really there, and eDP
initialization has a fail path for this. Typically such machines have an
LVDS display instead. A regression introduced in

commit 82ed61fa1a4e08d5f9e86fb1b715b50ed678b6ac
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Sat Oct 20 20:57:41 2012 +0200

    drm/i915: make edp panel power sequence setup more robust

updated the power sequence registers PCH_PP_ON_DELAYS, PCH_PP_OFF_DELAYS,
and PCH_PP_DIVISOR also in the ghost eDP case, messing up the LVDS display.

Split the power sequencer initialization into two, delaying the register
updates until after we know the eDP is real.

Note: Keep the PP_CONTROL unlocking in the first part, even if it does not
update registers, per the commit message of the above mentioned commit.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=52601
Reported-and-tested-by: Ryan Coe <ryan@rycomotorsports.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoserial:ifx6x60:Keep word size accordance with SPI controller
channing [Wed, 16 Jan 2013 05:14:20 +0000 (13:14 +0800)]
serial:ifx6x60:Keep word size accordance with SPI controller

As protocol driver, IFX SPI driver initiate to setup SPI master with default
SPI word size as 16 bit/word, however, SPI master may not adopt this default
value due to SPI controller's capability, it might choose an available value by
itself and set it to spi_device.bits_per_word. In order to keep align with
Controller, IFX driver should make use of this value during SPI transfer,
but the default one.

Signed-off-by: Chen Jun <jun.d.chen@intel.com>
Signed-off-by: channing <chao.bi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agotty: 8250_dw: Fix inverted arguments to serial_out in IRQ handler
Maxime Ripard [Mon, 14 Jan 2013 19:09:26 +0000 (20:09 +0100)]
tty: 8250_dw: Fix inverted arguments to serial_out in IRQ handler

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoserial: samsung: remove redundant setting of line config during port reset
Thomas Abraham [Mon, 31 Dec 2012 21:42:45 +0000 (13:42 -0800)]
serial: samsung: remove redundant setting of line config during port reset

The setting of uart line control configuration in s3c24xx_serial_resetport
is can be removed since the 'set_termios' call will overwrite any ULCON
register setting which s3c24xx_serial_resetport does.

Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoRevert "xen/smp: Fix CPU online/offline bug triggering a BUG: scheduling while atomic."
Konrad Rzeszutek Wilk [Wed, 16 Jan 2013 03:40:26 +0000 (22:40 -0500)]
Revert "xen/smp: Fix CPU online/offline bug triggering a BUG: scheduling while atomic."

This reverts commit 41bd956de3dfdc3a43708fe2e0c8096c69064a1e.

The fix is incorrect and not appropiate for the latest kernels.
In fact it _causes_ the BUG: scheduling while atomic while
doing vCPU hotplug.

Suggested-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agoserial:ifx6x60:Delete SPI timer when shut down port
chao bi [Wed, 12 Dec 2012 03:40:56 +0000 (11:40 +0800)]
serial:ifx6x60:Delete SPI timer when shut down port

When shut down SPI port, it's possible that MRDY has been asserted and a SPI
timer was activated waiting for SRDY assert, in the case, it needs to delete
this timer.

Signed-off-by: Chen Jun <jun.d.chen@intel.com>
Signed-off-by: channing <chao.bi@intel.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agotty/8250: The correct device id for this card is 0x0022
Matt Schulte [Fri, 7 Dec 2012 04:19:59 +0000 (22:19 -0600)]
tty/8250: The correct device id for this card is 0x0022

The correct device id for this card is 0x0022

Signed-off-by: Matt Schulte <matts@commtech-fastcom.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agotty/8250: pbn_b0_8_1152000_200 is supposed to be an 8 port definition
Matt Schulte [Fri, 7 Dec 2012 04:19:58 +0000 (22:19 -0600)]
tty/8250: pbn_b0_8_1152000_200 is supposed to be an 8 port definition

tty/8250: pbn_b0_8_1152000_200 is supposed to be an 8 port definition

Signed-off-by: Matt Schulte <matts@commtech-fastcom.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agotty: serial: vt8500: fix return value check in vt8500_serial_probe()
Wei Yongjun [Sun, 2 Dec 2012 10:10:44 +0000 (05:10 -0500)]
tty: serial: vt8500: fix return value check in vt8500_serial_probe()

In case of error, function of_clk_get() returns ERR_PTR()
and never returns NULL. The NULL test in the return value
check should be replaced with IS_ERR().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Tony Prisk <linux@prisktech.co.nz>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoserial: mxs-auart: Index is unsigned
fabio.estevam@freescale.com [Tue, 8 Jan 2013 01:11:06 +0000 (23:11 -0200)]
serial: mxs-auart: Index is unsigned

Fix the following warning when building with W=1 option:

drivers/tty/serial/mxs-auart.c: In function 'mxs_auart_tx_chars':
drivers/tty/serial/mxs-auart.c:272:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agomxs: uart: fix setting RTS from software
Steffen Trumtrar [Thu, 13 Dec 2012 13:27:43 +0000 (14:27 +0100)]
mxs: uart: fix setting RTS from software

With the patch "serial: mxs-auart: fix the wrong RTS hardware flow control" the
mainline mxs-uart driver now sets RTSEN only when hardware flow control is
enabled via software. It is not possible any longer to set RTS manually via
software. However, the manual modification is a valid operation.
Regain the possibility to set RTS via software and only set RTSEN when hardware
flow control is explicitly enabled via settermios cflag CRTSCTS.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoxen/gntdev: remove erronous use of copy_to_user
Daniel De Graaf [Wed, 2 Jan 2013 22:57:13 +0000 (17:57 -0500)]
xen/gntdev: remove erronous use of copy_to_user

Since there is now a mapping of granted pages in kernel address space in
both PV and HVM, use it for UNMAP_NOTIFY_CLEAR_BYTE instead of accessing
memory via copy_to_user and triggering sleep-in-atomic warnings.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agoxen/gntdev: correctly unmap unlinked maps in mmu notifier
Daniel De Graaf [Wed, 2 Jan 2013 22:57:12 +0000 (22:57 +0000)]
xen/gntdev: correctly unmap unlinked maps in mmu notifier

If gntdev_ioctl_unmap_grant_ref is called on a range before unmapping
it, the entry is removed from priv->maps and the later call to
mn_invl_range_start won't find it to do the unmapping. Fix this by
creating another list of freeable maps that the mmu notifier can search
and use to unmap grants.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agoxen/gntdev: fix unsafe vma access
Daniel De Graaf [Wed, 2 Jan 2013 22:57:11 +0000 (22:57 +0000)]
xen/gntdev: fix unsafe vma access

In gntdev_ioctl_get_offset_for_vaddr, we need to hold mmap_sem while
calling find_vma() to avoid potentially having the result freed out from
under us.  Similarly, the MMU notifier functions need to synchronize with
gntdev_vma_close to avoid map->vma being freed during their iteration.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agoxen/privcmd: Fix mmap batch ioctl.
Andres Lagar-Cavilla [Tue, 15 Jan 2013 03:35:40 +0000 (22:35 -0500)]
xen/privcmd: Fix mmap batch ioctl.

1. If any individual mapping error happens, the V1 case will mark *all*
operations as failed. Fixed.

2. The err_array was allocated with kcalloc, resulting in potentially O(n) page
allocations. Refactor code to not use this array.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agoMerge tag 'v3.7' into stable/for-linus-3.8
Konrad Rzeszutek Wilk [Tue, 15 Jan 2013 20:58:25 +0000 (15:58 -0500)]
Merge tag 'v3.7' into stable/for-linus-3.8

Linux 3.7

* tag 'v3.7': (833 commits)
  Linux 3.7
  Input: matrix-keymap - provide proper module license
  Revert "revert "Revert "mm: remove __GFP_NO_KSWAPD""" and associated damage
  ipv4: ip_check_defrag must not modify skb before unsharing
  Revert "mm: avoid waking kswapd for THP allocations when compaction is deferred or contended"
  inet_diag: validate port comparison byte code to prevent unsafe reads
  inet_diag: avoid unsafe and nonsensical prefix matches in inet_diag_bc_run()
  inet_diag: validate byte code to prevent oops in inet_diag_bc_run()
  inet_diag: fix oops for IPv4 AF_INET6 TCP SYN-RECV state
  mm: vmscan: fix inappropriate zone congestion clearing
  vfs: fix O_DIRECT read past end of block device
  net: gro: fix possible panic in skb_gro_receive()
  tcp: bug fix Fast Open client retransmission
  tmpfs: fix shared mempolicy leak
  mm: vmscan: do not keep kswapd looping forever due to individual uncompactable zones
  mm: compaction: validate pfn range passed to isolate_freepages_block
  mmc: sh-mmcif: avoid oops on spurious interrupts (second try)
  Revert misapplied "mmc: sh-mmcif: avoid oops on spurious interrupts"
  mmc: sdhci-s3c: fix missing clock for gpio card-detect
  lib/Makefile: Fix oid_registry build dependency
  ...

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Conflicts:
arch/arm/xen/enlighten.c
drivers/xen/Makefile

[We need to have the v3.7 base as the 'for-3.8' was based off v3.7-rc3
and there are some patches in v3.7-rc6 that we to have in our branch]

11 years agoXen: properly bound buffer access when parsing cpu/*/availability
Jan Beulich [Tue, 15 Jan 2013 13:31:43 +0000 (13:31 +0000)]
Xen: properly bound buffer access when parsing cpu/*/availability

At the same time reduce the local buffers to 16 bytes each.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agoxen/grant-table: correctly initialize grant table version 1
Matt Wilson [Tue, 15 Jan 2013 13:21:27 +0000 (13:21 +0000)]
xen/grant-table: correctly initialize grant table version 1

Commit 85ff6acb075a484780b3d763fdf41596d8fc0970 (xen/granttable: Grant
tables V2 implementation) changed the GREFS_PER_GRANT_FRAME macro from
a constant to a conditional expression. The expression depends on
grant_table_version being appropriately set. Unfortunately, at init
time grant_table_version will be 0. The GREFS_PER_GRANT_FRAME
conditional expression checks for "grant_table_version == 1", and
therefore returns the number of grant references per frame for v2.

This causes gnttab_init() to allocate fewer pages for gnttab_list, as
a frame can old half the number of v2 entries than v1 entries. After
gnttab_resume() is called, grant_table_version is appropriately
set. nr_init_grefs will then be miscalculated and gnttab_free_count
will hold a value larger than the actual number of free gref entries.

If a guest is heavily utilizing improperly initialized v1 grant
tables, memory corruption can occur. One common manifestation is
corruption of the vmalloc list, resulting in a poisoned pointer
derefrence when accessing /proc/meminfo or /proc/vmallocinfo:

[   40.770064] BUG: unable to handle kernel paging request at 0000200200001407
[   40.770083] IP: [<ffffffff811a6fb0>] get_vmalloc_info+0x70/0x110
[   40.770102] PGD 0
[   40.770107] Oops: 0000 [#1] SMP
[   40.770114] CPU 10

This patch introduces a static variable, grefs_per_grant_frame, to
cache the calculated value. gnttab_init() now calls
gnttab_request_version() early so that grant_table_version and
grefs_per_grant_frame can be appropriately set. A few BUG_ON()s have
been added to prevent this type of bug from reoccurring in the future.

Signed-off-by: Matt Wilson <msw@amazon.com>
Reviewed-and-Tested-by: Steven Noonan <snoonan@amazon.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Annie Li <annie.li@oracle.com>
Cc: xen-devel@lists.xen.org
Cc: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org # v3.3 and newer
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agox86/xen : Fix the wrong check in pciback
Yang Zhang [Thu, 22 Nov 2012 02:20:23 +0000 (10:20 +0800)]
x86/xen : Fix the wrong check in pciback

Fix the wrong check in pciback.

Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agovfio-pci: Fix buffer overfill
Alex Williamson [Tue, 15 Jan 2013 17:45:26 +0000 (10:45 -0700)]
vfio-pci: Fix buffer overfill

A read from a range hidden from the user (ex. MSI-X vector table)
attempts to fill the user buffer up to the end of the excluded range
instead of up to the requested count.  Fix it.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Cc: stable@vger.kernel.org
11 years agoarm64: compat: add syscall table entries for new syscalls
Will Deacon [Mon, 14 Jan 2013 14:45:46 +0000 (14:45 +0000)]
arm64: compat: add syscall table entries for new syscalls

There have been a number of new syscalls introduced to arch/arm/ since
the compat layer was implemented for arm64, so add pointers to the
relevant functions to the compat syscall table.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
11 years agodrm/radeon: improve semaphore debugging on lockup
Jerome Glisse [Fri, 11 Jan 2013 20:19:43 +0000 (15:19 -0500)]
drm/radeon: improve semaphore debugging on lockup

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon: allow FP16 color clear registers on r500
Marek Olšák [Sat, 12 Jan 2013 03:19:37 +0000 (04:19 +0100)]
drm/radeon: allow FP16 color clear registers on r500

Probably not a candidate for stable kernels because of conflicts
in DRM versioning.

Signed-off-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon: clear reset flags if engines are idle
Alex Deucher [Mon, 14 Jan 2013 16:04:39 +0000 (11:04 -0500)]
drm/radeon: clear reset flags if engines are idle

Fixes a hard lock in the gpu reset code after the
rework for DMA support (0ecebb9e0d14e9948e0b1529883a776758117d6f
"drm/radeon: switch to a finer grained reset for evergreen")
due to not bailing before the MC shutdown if the relevant engines
are idle.

Discussion:
http://lists.freedesktop.org/archives/dri-devel/2013-January/032985.html

Reported-by: Eldad Zack <eldad@fogrefinery.com>
Tested-by: Eldad Zack <eldad@fogrefinery.com>
Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agoALSA: hda/hdmi - Work around "alsactl restore" errors
Takashi Iwai [Tue, 15 Jan 2013 13:44:41 +0000 (14:44 +0100)]
ALSA: hda/hdmi - Work around "alsactl restore" errors

When "alsactl restore" is performed on HDMI codecs, it tries to
restore the channel map value since the channel map controls are
writable.  But hdmi_chmap_ctl_put() returns -EBADFD when no PCM stream
is assigned yet, and this results in an error message from alsactl.
Although the error is harmless, it's certainly ugly and can be
regarded as a regression.

As a workaround, this patch changes the return code in such a case to
be zero for making others happy.  (A slight excuse is: when the chmap
is changed through the proper alsa-lib API, the PCM status is checked
there anyway, so we don't have to be too strict in the kernel side.)

Cc: <stable@vger.kernel.org> [v3.7+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agocpuidle: remove the power_specified field in the driver
Daniel Lezcano [Tue, 15 Jan 2013 13:18:04 +0000 (14:18 +0100)]
cpuidle: remove the power_specified field in the driver

We realized that the power usage field is never filled and when it
is filled for tegra, the power_specified flag is not set causing all
of these values to be reset when the driver is initialized with
set_power_state().

However, the power_specified flag can be simply removed under the
assumption that the states are always backward sorted, which is the
case with the current code.

This change allows the menu governor select function and the
cpuidle_play_dead() to be simplified.  Moreover, the
set_power_states() function can removed as it does not make sense
any more.

Drop the power_specified flag from struct cpuidle_driver and make
the related changes as described above.

As a consequence, this also fixes the bug where on the dynamic
C-states system, the power fields are not initialized.

[rjw: Changelog]
References: https://bugzilla.kernel.org/show_bug.cgi?id=42870
References: https://bugzilla.kernel.org/show_bug.cgi?id=43349
References: https://lkml.org/lkml/2012/10/16/518
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agodrm/i915: Record DERRMR, FORCEWAKE and RING_CTL in error-state
Chris Wilson [Tue, 15 Jan 2013 12:05:55 +0000 (12:05 +0000)]
drm/i915: Record DERRMR, FORCEWAKE and RING_CTL in error-state

These are useful for investigating hangs involving WAIT_FOR_EVENT.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
[danvet: Apply a droplet of Future-Proof in the if-ladder.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agof2fs: fix the debugfs entry creation path
Namjae Jeon [Tue, 15 Jan 2013 10:58:47 +0000 (19:58 +0900)]
f2fs: fix the debugfs entry creation path

As the "status" debugfs entry will be maintained for entire F2FS filesystem
irrespective of the number of partitions.
So, we can move the initialization to the init part of the f2fs and destroy will
be done from exit part. After making changes, for individual partition mount -
entry creation code will not be executed.

Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
11 years agof2fs: add global mutex_lock to protect f2fs_stat_list
majianpeng [Mon, 14 Jan 2013 12:08:16 +0000 (20:08 +0800)]
f2fs: add global mutex_lock to protect f2fs_stat_list

There is an race condition between umounting f2fs and reading f2fs/status, which
results in oops.

Fox example:
Thread A Thread B
umount f2fs  cat f2fs/status

f2fs_destroy_stats() { stat_show() {
 list_for_each_entry_safe(&f2fs_stat_list)
 list_del(&si->stat_list);
 mutex_lock(&si->stat_lock);
 si->sbi = NULL;
 mutex_unlock(&si->stat_lock);
 kfree(sbi->stat_info);
}   mutex_lock(&si->stat_lock) <- si is gone.
 ...
}

Solution with a global lock: f2fs_stat_mutex:
Thread A Thread B
umount f2fs  cat f2fs/status

f2fs_destroy_stats() { stat_show() {
 mutex_lock(&f2fs_stat_mutex);
 list_del(&si->stat_list);
 mutex_unlock(&f2fs_stat_mutex);
 kfree(sbi->stat_info);  mutex_lock(&f2fs_stat_mutex);
}  list_for_each_entry_safe(&f2fs_stat_list)
 ...
 mutex_unlock(&f2fs_stat_mutex);
}

Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
[jaegeuk.kim@samsung.com: fix typos, description, and remove the existing lock]
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
11 years agof2fs: remove the blk_plug usage in f2fs_write_data_pages
Namjae Jeon [Tue, 15 Jan 2013 07:45:24 +0000 (16:45 +0900)]
f2fs: remove the blk_plug usage in f2fs_write_data_pages

Let's consider the usage of blk_plug in f2fs_write_data_pages().
We can come up with the two issues: lock contention and task awareness.

1. Merging bios prior to grabing "queue lock"
 The f2fs merges consecutive IOs in the file system level before
 submitting any bios, which is similar with the back merge by the
 plugging mechanism in attempt_plug_merge(). Both of them need to acquire
 no queue lock.

2. Merging policy with respect to tasks
 The f2fs merges IOs as much as possible regardless of tasks, while
 blk-plugging is conducted on a basis of tasks. As we can understand
 there are trade-offs, f2fs tries to maximize the write performance with
 well-merged bios.

As a result, if f2fs produces many consecutive but separated bios in
writepages(), it would be good to use blk-plugging since f2fs would be
able to avoid queue lock contention in the block layer by merging them.
But, f2fs merges IOs and submit one bio, which means that there are not
much chances to merge bios by attempt_plug_merge().

However, f2fs has already been used blk_plug by triggering generic_writepages()
in f2fs_write_data_pages().
So to make the overall code consistency, I'd like to remove blk_plug there.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
11 years agoMerge tag 'asoc-atmel-pinctrl' of git://git.kernel.org/pub/scm/linux/kernel/git/broon...
Takashi Iwai [Tue, 15 Jan 2013 06:51:25 +0000 (07:51 +0100)]
Merge tag 'asoc-atmel-pinctrl' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: atmel: Fixes for pinctrl

Due to a series of problems with the handling of Atmel, a combination of
making changes that make other branches instantly buggy and a general
failure to deal with the resulting issues effectively, v3.8 Atmel audio
currently won't work at all for DT boards without adding pinctrl
definitions and a request for those.

11 years agoMerge tag 'trace-3.8-rc3-regression-fix' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 15 Jan 2013 04:22:16 +0000 (20:22 -0800)]
Merge tag 'trace-3.8-rc3-regression-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull tracing regression fixes from Steven Rostedt:
 "The clean up patch commit 0fb9656d957d "tracing: Make tracing_enabled
  be equal to tracing_on" caused two regressions.

   1) The irqs off latency tracer no longer starts if tracing_on is off
      when the tracer is set, and then tracing_on is enabled.  The
      tracing_on file needs the hook that tracing_enabled had to enable
      tracers if they request it (call the tracer's start() method).

   2) That commit had a separate change that really should have been a
      separate patch, but it must have been added accidently with the -a
      option of git commit.  But as the change is still related to the
      commit it wasn't noticed in review.  That change, changed the way
      blocking is done by the trace_pipe file with respect to the
      tracing_on settings.  I've been told that this change breaks
      current userspace, and this specific change is being reverted."

* tag 'trace-3.8-rc3-regression-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  tracing: Fix regression of trace_pipe
  tracing: Fix regression with irqsoff tracer and tracing_on file

11 years agoMerge tag 'regmap-debugfs-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 15 Jan 2013 04:20:44 +0000 (20:20 -0800)]
Merge tag 'regmap-debugfs-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap

Pull regmap debugfs optimisation fixes from Mark Brown:
 "The debugfs optimisations merged in v3.8 weren't my finest hour, there
  were a number of cases that the more complex algorithm made worse
  especially around the error handling.  This patch series should
  address those issues."

* tag 'regmap-debugfs-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: debugfs: Make sure we store the last entry in the offset cache
  regmap: debugfs: Ensure a correct return value for empty caches
  regmap: debugfs: Discard the cache if we fail to allocate an entry
  regmap: debugfs: Fix check for block start in cached seeks
  regmap: debugfs: Fix attempts to read nonexistant register blocks

11 years agoMerge tag 'regulator-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brooni...
Linus Torvalds [Tue, 15 Jan 2013 04:20:03 +0000 (20:20 -0800)]
Merge tag 'regulator-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "A few fixes for the regulator subsystems, a few driver specific things
  plus a fix for the interaction between regultor_can_change_voltage()
  and continuous voltage ranges both of which were added for this
  release."

* tag 'regulator-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: max8998: Ensure enough delay time for max8998_set_voltage_buck_time_sel
  regulator: max8998: Use uV in voltage_map_desc
  regulator: max8997: Use uV in voltage_map_desc
  regulator: core: Fix comment for regulator_register()
  regulator: core: Fix continuous_voltage_range case in regulator_can_change_voltage
  regulator: s5m8767: Fix probe failure due to stack corruption

11 years agoMerge remote-tracking branch 'regulator/fix/s5m8767' into tmp
Mark Brown [Tue, 15 Jan 2013 00:38:59 +0000 (09:38 +0900)]
Merge remote-tracking branch 'regulator/fix/s5m8767' into tmp

11 years agoMerge remote-tracking branch 'regulator/fix/max8998' into tmp
Mark Brown [Tue, 15 Jan 2013 00:38:56 +0000 (09:38 +0900)]
Merge remote-tracking branch 'regulator/fix/max8998' into tmp

11 years agoMerge remote-tracking branch 'regulator/fix/max8997' into tmp
Mark Brown [Tue, 15 Jan 2013 00:38:51 +0000 (09:38 +0900)]
Merge remote-tracking branch 'regulator/fix/max8997' into tmp

11 years agoMerge remote-tracking branch 'regulator/fix/core' into tmp
Mark Brown [Tue, 15 Jan 2013 00:38:27 +0000 (09:38 +0900)]
Merge remote-tracking branch 'regulator/fix/core' into tmp

11 years agoPCI: Allow pcie_aspm=force even when FADT indicates it is unsupported
Colin Ian King [Tue, 27 Nov 2012 14:09:40 +0000 (14:09 +0000)]
PCI: Allow pcie_aspm=force even when FADT indicates it is unsupported

Right now using pcie_aspm=force will not enable ASPM if the FADT indicates
ASPM is unsupported.  However, the semantics of force should probably allow
for this, especially as they did before 3c076351c4 ("PCI: Rework ASPM
disable code")

This patch just skips the clearing of any ASPM setup that the firmware has
carried out on this bus if pcie_aspm=force is being used.

Reference: http://bugs.launchpad.net/bugs/962038
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: stable@vger.kernel.org
11 years agoUDF: Fix a null pointer dereference in udf_sb_free_partitions
Namjae Jeon [Mon, 14 Jan 2013 21:53:47 +0000 (22:53 +0100)]
UDF: Fix a null pointer dereference in udf_sb_free_partitions

This patch fixes a regression caused by commit bff943af6fe "udf: Fix memory
leak when mounting" due to which it was triggering a kernel null point
dereference in case of interrupted mount OR when allocating memory to
sbi->s_partmaps failed in function udf_sb_alloc_partition_maps.

Reported-and-tested-by: James Hogan <james@albanarts.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Ashish Sangwan <a.sangwan@samsung.com>
Signed-off-by: Jan Kara <jack@suse.cz>
11 years agojbd: don't wake kjournald unnecessarily
Eric Sandeen [Tue, 18 Dec 2012 17:03:57 +0000 (11:03 -0600)]
jbd: don't wake kjournald unnecessarily

Don't send an extra wakeup to kjournald in the case where we
already have the proper target in j_commit_request, i.e. that
commit has already been requested for commit.

commit d9b0193 "jbd: fix fsync() tid wraparound bug" changed
the logic leading to a wakeup, but it caused some extra wakeups
which were found to lead to a measurable performance regression.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
11 years agoMerge tag 'dt-fixes-for-3.8' of git://sources.calxeda.com/kernel/linux
Linus Torvalds [Mon, 14 Jan 2013 21:19:08 +0000 (13:19 -0800)]
Merge tag 'dt-fixes-for-3.8' of git://sources.calxeda.com/kernel/linux

Pull devicetree fixes from Rob Herring:
 "Two fixes to prevent unconditional re-compile of dts files on arm and
  arm64."

* tag 'dt-fixes-for-3.8' of git://sources.calxeda.com/kernel/linux:
  ARM: dts: prevent *.dtb from always being rebuilt
  arm64: dts: prevent *.dtb from always being rebuilt

11 years agovfs: add missing virtual cache flush after editing partial pages
Linus Torvalds [Mon, 14 Jan 2013 21:17:50 +0000 (13:17 -0800)]
vfs: add missing virtual cache flush after editing partial pages

Andrew Morton pointed this out a month ago, and then I completely forgot
about it.

If we read a partial last page of a block device, we will zero out the
end of the page, but since that page can then be mapped into user space,
we should also make sure to flush the cache on architectures that have
virtual caches.  We have the flush_dcache_page() function for this, so
use it.

Now, in practice this really never matters, because nobody sane uses
virtual caches to begin with, and they largely exist on old broken RISC
arhitectures.

And even if you did run on one of those obsolete CPU's, the whole "mmap
and access the last partial page of a block device" behavior probably
doesn't actually exist.  The normal IO functions (read/write) will never
see the zeroed-out part of the page that migth not be coherent in the
cache, because they honor the size of the device.

So I'm marking this for stable (3.7 only), but I'm not sure anybody will
ever care.

Pointed-out-by: Andrew Morton <akpm@linux-foundation.org>
Cc: stable@vger.kernel.org # 3.7
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Mon, 14 Jan 2013 18:56:05 +0000 (10:56 -0800)]
Merge tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Most of commits found here are for ASoC device specific fixes,
  arizona, cs4271, wm5102, wm2200, etc, in addition to a couple of
  memory leak fixes in ASoC core.

  Other than that, regression fixes in HD-audio and USB-audio, and a fix
  for new Realtek codecs."

* tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (30 commits)
  ALSA: usb-audio: Fix NULL dereference by access to non-existing substream
  ALSA: hda - Add support of new codec ALC284
  ALSA: usb-audio: Make ebox44_table static
  ALSA: hdspm - Fix wordclock status on AES32
  Revert "ALSA: hda - Shut up pins at power-saving mode with Conexnat codecs"
  ALSA: hda - Disable runtime D3 for Intel CPT & co
  ALSA: pxa27x: fix ac97 warm reset
  ALSA: pxa27x: fix ac97 cold reset
  ASoC: wm_adsp: Ensure that block writes are from DMA aligned addresses
  ASoC: wm2000: Fix sense of speech clarity enable
  ASoC: wm5100: Remove DSP B and left justified formats
  ASoC: arizona: Remove DSP B and left justified AIF modes
  ASoC: wm2200: Remove DSP B and left justified AIF modes
  ASoC: wm5102: Improve speaker enable performance
  ASoC: core: fix the memory leak in case of remove_aux_dev()
  ASoC: core: fix the memory leak in case of device_add() failure
  ASoC: cs42l52: Catch no-match case in cs42l52_get_clk
  ASoC: lm49453: Update lm49453_reg_defs values as per LM49453 HW revision-B
  ASoC: lm49453: Fix adc, mic and sidetone volume ranges
  ASoC: arizona: Correct FLL source definitions
  ...

11 years ago[libata] replace sata_settings with devslp_timing
Shane Huang [Mon, 17 Dec 2012 15:18:59 +0000 (23:18 +0800)]
[libata] replace sata_settings with devslp_timing

NCQ capability was used to check availability of SATA Settings page
from Identify Device Data Log, which contains DevSlp timing variables.
It does not work on some HDDs and leads to error messages.

IDENTIFY word 78 bit 5(Hardware Feature Control) can't work either
because it is only the sufficient condition of Identify Device data
log, not the necessary condition.

This patch replaced ata_device->sata_settings with ->devslp_timing
to only save DevSlp timing variables(8 bytes), instead of the whole
SATA Settings page(512 bytes).

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=51881

Reported-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Shane Huang <shane.huang@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
11 years ago[libata] ahci: Add support for Enmotus Bobcat device.
Hugh Daschbach [Fri, 4 Jan 2013 22:39:09 +0000 (14:39 -0800)]
[libata] ahci: Add support for Enmotus Bobcat device.

Silicon does not support standard AHCI BAR assignment.  Add
vendor/device exception to force BAR 2.

Signed-off-by: Hugh Daschbach <hugh.daschbach@enmotus.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
11 years agotracing: Fix regression of trace_pipe
Liu Bo [Mon, 14 Jan 2013 02:54:11 +0000 (10:54 +0800)]
tracing: Fix regression of trace_pipe

Commit 0fb9656d "tracing: Make tracing_enabled be equal to tracing_on"
changes the behaviour of trace_pipe, ie. it makes trace_pipe return if
we've read something and tracing is enabled, and this means that we have
to 'cat trace_pipe' again and again while running tests.

IMO the right way is if tracing is enabled, we always block and wait for
ring buffer, or we may lose what we want since ring buffer's size is limited.

Link: http://lkml.kernel.org/r/1358132051-5410-1-git-send-email-bo.li.liu@oracle.com
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
11 years ago[libata] ahci: Fix lack of command retry after a success error handler.
Bian Yu [Thu, 13 Dec 2012 03:26:58 +0000 (22:26 -0500)]
[libata] ahci: Fix lack of command retry after a success error handler.

It should be a mistake introduced by commit 8d899e70c1b3afff.

qc->flags can't be set AC_ERR_*

Signed-off-by: Bian Yu <bianyu@kedacom.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
11 years agoMerge branch 'pci/yijing-hotplug-workqueues' into for-linus
Bjorn Helgaas [Mon, 14 Jan 2013 17:25:13 +0000 (10:25 -0700)]
Merge branch 'pci/yijing-hotplug-workqueues' into for-linus

* pci/yijing-hotplug-workqueues:
  PCI: shpchp: Use per-slot workqueues to avoid deadlock
  PCI: shpchp: Handle push button event asynchronously
  PCI: shpchp: Make shpchp_wq non-ordered
  PCI: pciehp: Use per-slot workqueues to avoid deadlock

11 years agoPCI: shpchp: Use per-slot workqueues to avoid deadlock
Bjorn Helgaas [Fri, 11 Jan 2013 19:21:15 +0000 (12:21 -0700)]
PCI: shpchp: Use per-slot workqueues to avoid deadlock

When we have an SHPC-capable bridge with a second SHPC-capable bridge
below it, pushing the upstream bridge's attention button causes a
deadlock.

The deadlock happens because we use the shpchp_wq workqueue to run
shpchp_pushbutton_thread(), which uses shpchp_disable_slot() to remove
devices below the upstream bridge.  When we remove the downstream bridge,
we call shpc_remove(), the shpchp driver's .remove() method.  That calls
flush_workqueue(shpchp_wq), which deadlocks because the
shpchp_pushbutton_thread() work item is still running.

This patch avoids the deadlock by creating a workqueue for every slot
and removing the single shared workqueue.

Here's the call path that leads to the deadlock:

  shpchp_queue_pushbutton_work
    queue_work(shpchp_wq) # shpchp_pushbutton_thread
    ...

  shpchp_pushbutton_thread
    shpchp_disable_slot
      remove_board
        shpchp_unconfigure_device
          pci_stop_and_remove_bus_device
            ...
              shpc_remove # shpchp driver .remove method
                hpc_release_ctlr
                  cleanup_slots
                    flush_workqueue(shpchp_wq)

This change is based on code inspection, since we don't have hardware
with this topology.

Based-on-patch-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: stable@vger.kernel.org
11 years agoPCI: shpchp: Handle push button event asynchronously
Bjorn Helgaas [Fri, 11 Jan 2013 19:07:22 +0000 (12:07 -0700)]
PCI: shpchp: Handle push button event asynchronously

Use non-ordered workqueue for attention button events.

Attention button events on each slot can be handled asynchronously. So
we should use non-ordered workqueue. This patch also removes ordered
workqueue in shpchp as a result.

486b10b9f4 ("PCI: pciehp: Handle push button event asynchronously") made
the same change to pciehp.  I split this out from a patch by Yijing Wang
<wangyijing@huawei.com> so we fix one thing at a time and to make the
shpchp history correspond more closely with the pciehp history.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
11 years agoMerge tag 'staging-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Mon, 14 Jan 2013 17:08:38 +0000 (09:08 -0800)]
Merge tag 'staging-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging fixes from Greg Kroah-Hartman:
 "Here are a number of small fixes to staging drivers for your 3.8-rc3
  tree.

  Well, the omapdrm fixes aren't really "small" but they were waiting on
  a number of other drm patches to go in through the drm tree, and got
  delayed by my vacation over the holidays.  They are totally
  self-contained, everyone involved have acked them, and they fix issues
  that people have been having with the driver.

  Other than that one, it's a bunch of tiny bugfixes for a number of
  reported issues.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
* tag 'staging-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (36 commits)
  staging: zram: fix invalid memory references during disk write
  staging: tidspbridge: use prepare/unprepare on dsp clocks
  staging: tidspbridge: Fix build breakage due to splitting CM functions.
  staging: comedi: comedi_test: fix race when cancelling command
  staging: comedi: Kconfig: COMEDI_NI_AT_A2150 should select COMEDI_FC
  staging: comedi: prevent auto-unconfig of manually configured devices
  staging: comedi: fix minimum AO period for NI 625x and NI 628x
  staging: vme_pio2: fix oops on module unloading
  staging: speakup: avoid out-of-range access in synth_add()
  staging: speakup: avoid out-of-range access in synth_init()
  staging: rtl8192e: Fix failure to check pci_map_single()
  staging: rtl8187se: Fix failure to check pci_map_single()
  staging: drm/imx: fix double free bug in error path
  staging: drm/imx: several bug fixes
  staging: drm/imx: check return value of ipu_reset()
  staging: drm/omap: fix flags in dma buf exporting
  staging: drm/omap: use omapdss low level API
  staging/fwserial: Update TODO file per reviewer comments
  staging/fwserial: Limit tx/rx to 1394-2008 spec maximum
  staging/fwserial: Refine Kconfig help text
  ...

11 years agoMerge tag 'usb-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Mon, 14 Jan 2013 17:07:57 +0000 (09:07 -0800)]
Merge tag 'usb-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg Kroah-Hartman:
 "Here are a bunch of USB fixes for your 3.8-rc3 tree.  They all either
  fix problems that have been reported (like the xhci/hub changes) or
  add new device ids to existing drivers.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
* tag 'usb-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (39 commits)
  usb: ftdi_sio: Crucible Technologies COMET Caller ID - pid added
  usb: host: ohci-tmio: fix compile warning
  USB: Add device quirk for Microsoft VX700 webcam
  USB: ehci-fsl: fix regression on mpc5121e
  usb: chipidea: Allow disabling streaming not only in udc mode
  USB: fsl-mph-dr-of: fix regression on mpc5121e
  USB: select USB_ARCH_HAS_EHCI for MXS
  USB: hub: handle claim of enabled remote wakeup after reset
  USB: cdc-acm: Add support for "PSC Scanning, Magellan 800i"
  USB: option: add Nexpring NP10T terminal id
  USB: option: add Telekom Speedstick LTE II
  USB: option: blacklist network interface on ZTE MF880
  usb: imx21-hcd: Include missing linux/module.h
  USB: option: Add new MEDIATEK PID support
  USB: ehci: make debug port in-use detection functional again
  USB: usbtest: fix test number in log message
  xhci: Avoid "dead ports", add roothub port polling.
  USB: Handle warm reset failure on empty port.
  USB: Ignore port state until reset completes.
  USB: Increase reset timeout.
  ...

11 years agoMerge tag 'driver-core-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 14 Jan 2013 17:07:11 +0000 (09:07 -0800)]
Merge tag 'driver-core-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core fixes from Greg Kroah-Hartman:
 "Here are two patches for 3.8-rc3.

  One removes the __dev* defines from init.h now that all usages of it
  are gone from your tree.  The other fix is for debugfs's paramater
  that was using the wrong base for the option.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
* tag 'driver-core-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  debugfs: convert gid= argument from decimal, not octal
  Remove __dev* markings from init.h

11 years agoMerge tag 'char-misc-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Mon, 14 Jan 2013 17:06:24 +0000 (09:06 -0800)]
Merge tag 'char-misc-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc fix from Greg Kroah-Hartman:
 "Here is a single fix for the mei driver that resolves a reported
  issue.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
* tag 'char-misc-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  mei: fix mismatch in mutex unlock-lock in mei_amthif_read()

11 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Mon, 14 Jan 2013 16:56:31 +0000 (08:56 -0800)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Nothing too astounding

   - nouveau: bunch of regression fixes and oops fixes
   - radeon: UMS fixes, rn50 fix, dma fix
   - udl: fix EDID retrieval for large EDIDs."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  udldrmfb: udl_get_edid: drop unneeded i--
  udldrmfb: udl_get_edid: usb_control_msg buffer must not be on the stack
  udldrmfb: Fix EDID not working with monitors with EDID extension blocks
  drm/nvc0/fb: fix crash when different mutex is used to protect same list
  drm/nouveau/clock: fix support for more than 2 monitors on nve0
  drm/nv50/disp: fix selection of bios script for analog outputs
  drm/nv17-50: restore fence buffer on resume
  drm/nouveau: fix blank LVDS screen regression on pre-nv50 cards
  drm/nouveau: fix nouveau_client allocation failure path
  drm/nouveau: don't return freed object from nouveau_handle_create
  drm/nouveau/vm: fix memory corruption when pgt allocation fails
  drm/nouveau: add locking around instobj list operations
  drm/nouveau: do not forcibly power on lvds panels
  drm/nouveau/devinit: ensure legacy vga control is enabled during post
  radeon/kms: fix dma relocation checking
  radeon/kms: force rn50 chip to always report connected on analog output
  drm/radeon: fix error path in kpage allocation
  drm/radeon: fix a bogus kfree
  drm/radeon: fix NULL pointer dereference in UMS mode

11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Mon, 14 Jan 2013 16:27:10 +0000 (08:27 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David Miller:

 1) Fix regression allowing IP_TTL setting of zero, fix from Cong Wang.

 2) Fix leak regressions in tunap, from Jason Wang.

 3) be2net driver always returns IRQ_HANDLED in INTx handler, fix from
    Sathya Perla.

 4) qlge doesn't really support NETIF_F_TSO6, don't set that flag.  Fix
    from Amerigo Wang.

 5) Add 802.11ad Atheros wil6210 driver, from Vladimir Kondratiev.

 6) Fix MTU calculations in mac80211 layer, from T Krishna Chaitanya.

 7) Station info layer of mac80211 needs to use del_timer_sync(), from
    Johannes Berg.

 8) tcp_read_sock() can loop forever, because we don't immediately stop
    when recv_actor() returns zero.  Fix from Eric Dumazet.

 9) Fix WARN_ON() in tcp_cleanup_rbuf().  We have to use sk_eat_skb() in
    tcp_recv_skb() to handle the case where a large GRO packet is split
    up while it is use by a splice() operation.  Fix also from Eric
    Dumazet.

10) addrconf_get_prefix_route() in ipv6 tests flags incorrectly, it
    does:

        if (X && (p->flags & Y) != 0)

    when it really meant to go:

        if (X && (p->flags & X) != 0)

    fix from Romain Kuntz.

11) Fix lost Kconfig dependency for bfin_mac driver hardware
    timestamping.  From Lars-Peter Clausen.

12) Fix regression in handling of RST without ACK in TCP, from Eric
    Dumazet.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (37 commits)
  be2net: fix unconditionally returning IRQ_HANDLED in INTx
  tuntap: fix leaking reference count
  tuntap: forbid calling TUNSETIFF when detached
  tuntap: switch to use rtnl_dereference()
  net, wireless: overwrite default_ethtool_ops
  qlge: remove NETIF_F_TSO6 flag
  tcp: accept RST without ACK flag
  net: ethernet: xilinx: Do not use NO_IRQ in axienet
  net: ethernet: xilinx: Do not use axienet on PPC
  bnx2x: Allow management traffic after boot from SAN
  bnx2x: Fix fastpath structures when memory allocation fails
  bfin_mac: Restore hardware time-stamping dependency on BF518
  tun: avoid owner checks on IFF_ATTACH_QUEUE
  bnx2x: move debugging code before the return
  tuntap: refuse to re-attach to different tun_struct
  ipv6: use addrconf_get_prefix_route for prefix route lookup [v2]
  ipv6: fix the noflags test in addrconf_get_prefix_route
  tcp: fix splice() and tcp collapsing interaction
  tcp: splice: fix an infinite loop in tcp_read_sock()
  net: prevent setting ttl=0 via IP_TTL
  ...

11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Mon, 14 Jan 2013 16:17:22 +0000 (08:17 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc

Pull sparc updates from David Miller:

 1) Add finit_module syscall entry.

 2) Remove stray __dev{init,exit} references, from Sam Ravnborg.

Fix up conflicts in the sparc PCI code due to whitespace differences in
the __dev{init,exit} removal (which also came in through Greg).

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc: remove __devinit, __devexit annotations
  sparc: Hook up finit_module syscall.

11 years agoARM: dts: prevent *.dtb from always being rebuilt
Stephen Warren [Sat, 29 Dec 2012 00:42:46 +0000 (17:42 -0700)]
ARM: dts: prevent *.dtb from always being rebuilt

if_changed (used by the *.dts->*.dtc rule) rebuilds files if they aren't
contained in $(targets). (make V=2 indicates this). Add $(dtb-y) to
$(targets) to prevent *.dtb from always being rebuilt.

This fixes a regression introduced by the .dtb rule rework in 499cd82
"ARM: dt: change .dtb build rules to build in dts directory".

Reported-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
11 years agoarm64: dts: prevent *.dtb from always being rebuilt
Stephen Warren [Sat, 29 Dec 2012 00:42:47 +0000 (17:42 -0700)]
arm64: dts: prevent *.dtb from always being rebuilt

if_changed (used by the *.dts->*.dtc rule) rebuilds files if they aren't
contained in $(targets). (make V=2 indicates this). Add $(dtb-y) to
$(targets) to prevent *.dtb from always being rebuilt. Note

This fixes a regression introduced by the .dtb rule rework in da4cbc6
"arm64: use new common dtc rule", although since arm64 doesn't actually
have any *.dts yet, this isn't a critical issue.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
11 years agosh: Fix up stack debugging build.
Paul Mundt [Mon, 14 Jan 2013 09:07:36 +0000 (18:07 +0900)]
sh: Fix up stack debugging build.

Somewhere along the line the ebss label was taken out, resulting in pcrel
branch too far errors. Restore the label to get things building again.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
11 years agoALSA: usb-audio: selector map for M-Audio FT C400
Eldad Zack [Sun, 13 Jan 2013 22:02:04 +0000 (23:02 +0100)]
ALSA: usb-audio: selector map for M-Audio FT C400

Add names of the clock sources for the M-Audio Fast Track
C400.

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: usb-audio: M-Audio FT C400 skip packet quirk
Eldad Zack [Sun, 13 Jan 2013 22:02:03 +0000 (23:02 +0100)]
ALSA: usb-audio: M-Audio FT C400 skip packet quirk

Attain constant real-world latency by skipping 16 data packets.
The number of packets to be skipped was found by trial and error.

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: usb-audio: correct M-Audio C400 clock source quirk
Eldad Zack [Sun, 13 Jan 2013 22:02:02 +0000 (23:02 +0100)]
ALSA: usb-audio: correct M-Audio C400 clock source quirk

Taking another look at the C400 descriptors, I see now that there is
a clock selector (0x80) for this device.
Right now, the clock source points to the internal clock (0x81), which
is also valid. When the external clock source (0x82) is selected in the
mixer, and the rates mismatch (if it's free-running it is fixed to
48KHz), xruns will occur.

Set the clock ID to the clock selector unit (0x81), which then
allows the validation code to function correctly.

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: usb - fix race in creation of M-Audio Fast track pro driver
David Henningsson [Fri, 4 Jan 2013 16:02:18 +0000 (17:02 +0100)]
ALSA: usb - fix race in creation of M-Audio Fast track pro driver

A patch in the 3.2 kernel caused regression with hotplugging the
M-Audio Fast track pro, or sound after suspend. I don't have the
device so I haven't done a full analysis, but it seems userspace
(both udev and pulseaudio) got confused when a card was created,
immediately destroyed, and then created again.

However, at least one person in the bug report (martin djfun)
reports that this patch resolves the issue for him. It also leaves
a message in the log:
"snd-usb-audio: probe of 1-1.1:1.1 failed with error -5" which is
a bit misleading. It is better than non-working audio, but maybe
there's a more elegant solution?

BugLink: https://bugs.launchpad.net/bugs/1095315
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agosh: wire up finit_module syscall.
Paul Mundt [Mon, 14 Jan 2013 08:59:03 +0000 (17:59 +0900)]
sh: wire up finit_module syscall.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
11 years agox86/Sandy Bridge: Sandy Bridge workaround depends on CONFIG_PCI
H. Peter Anvin [Mon, 14 Jan 2013 04:56:41 +0000 (20:56 -0800)]
x86/Sandy Bridge: Sandy Bridge workaround depends on CONFIG_PCI

early_pci_allowed() and read_pci_config_16() are only available if
CONFIG_PCI is defined.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
11 years agox86/Sandy Bridge: mark arrays in __init functions as __initconst
H. Peter Anvin [Mon, 14 Jan 2013 04:36:39 +0000 (20:36 -0800)]
x86/Sandy Bridge: mark arrays in __init functions as __initconst

Mark static arrays as __initconst so they get removed when the init
sections are flushed.

Reported-by: Mathias Krause <minipli@googlemail.com>
Link: http://lkml.kernel.org/r/75F4BEE6-CB0E-4426-B40B-697451677738@googlemail.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
11 years agostaging: zram: fix invalid memory references during disk write
Nitin Gupta [Wed, 2 Jan 2013 16:53:41 +0000 (08:53 -0800)]
staging: zram: fix invalid memory references during disk write

Fixes a bug introduced by commit c8f2f0db1 ("zram: Fix handling
of incompressible pages") which caused invalid memory references
during disk write. Invalid references could occur in two cases:
 - Incoming data expands on compression: In this case, reference was
made to kunmap()'ed bio page.
 - Partial (non PAGE_SIZE) write with incompressible data: In this
case, reference was made to a kfree()'ed buffer.

Fixes bug 50081:
https://bugzilla.kernel.org/show_bug.cgi?id=50081

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Cc: stable <stable@vger.kernel.org>
Reported-by: Mihail Kasadjikov <hamer.mk@gmail.com>
Reported-by: Tomas M <tomas@slax.org>
Reviewed-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agof2fs: avoid redundant time update for parent directory in f2fs_delete_entry
Namjae Jeon [Sat, 12 Jan 2013 05:41:33 +0000 (14:41 +0900)]
f2fs: avoid redundant time update for parent directory in f2fs_delete_entry

In call to f2fs_delete_entry, 'dir' time modification code is put
at two places.
So, remove the redundant code for timing update.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
11 years agof2fs: remove redundant call to set_blocksize in f2fs_fill_super
Namjae Jeon [Sat, 12 Jan 2013 05:41:13 +0000 (14:41 +0900)]
f2fs: remove redundant call to set_blocksize in f2fs_fill_super

Since, f2fs supports only 4KB blocksize, which is set at the beginning in
f2fs_fill_super. So, we do not need to again check this blocksize setting
in such case.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
11 years agoPCI: shpchp: Make shpchp_wq non-ordered
Bjorn Helgaas [Fri, 11 Jan 2013 22:30:52 +0000 (15:30 -0700)]
PCI: shpchp: Make shpchp_wq non-ordered

e24dcbef93 ("shpchp: update workqueue usage") was described as adding
non-ordered shpchp_wq, but it actually made it an *ordered* workqueue.

This patch changes shpchp_wq to be non-ordered, as described in the
e24dcbef93 commit log and as was done for pciehp by a827ea307b ("pciehp:
update workqueue usage").

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Tejun Heo <tj@kernel.org>
11 years agoPCI/AER: pci_get_domain_bus_and_slot() call missing required pci_dev_put()
Betty Dall [Sun, 13 Jan 2013 22:46:18 +0000 (15:46 -0700)]
PCI/AER: pci_get_domain_bus_and_slot() call missing required pci_dev_put()

The function aer_recover_queue() calls pci_get_domain_bus_and_slot(), which
requires that the caller decrement the reference count with pci_dev_put().
This patch adds the missing call to pci_dev_put().

Signed-off-by: Betty Dall <betty.dall@hp.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Shuah Khan <shuah.khan@hp.com>
CC: stable@vger.kernel.org
11 years agoudldrmfb: udl_get_edid: drop unneeded i--
Hans de Goede [Fri, 11 Jan 2013 11:08:58 +0000 (12:08 +0100)]
udldrmfb: udl_get_edid: drop unneeded i--

This is a left-over from when udl_get_edid returned the amount of bytes
successfully read, which it no longer does.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agoudldrmfb: udl_get_edid: usb_control_msg buffer must not be on the stack
Hans de Goede [Fri, 11 Jan 2013 11:08:57 +0000 (12:08 +0100)]
udldrmfb: udl_get_edid: usb_control_msg buffer must not be on the stack

The buffer passed to usb_control_msg may end up in scatter-gather list, and
may thus not be on the stack. Having it on the stack usually works on x86, but
not on other archs.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agoudldrmfb: Fix EDID not working with monitors with EDID extension blocks
Hans de Goede [Fri, 11 Jan 2013 11:08:56 +0000 (12:08 +0100)]
udldrmfb: Fix EDID not working with monitors with EDID extension blocks

udldrmfb only reads the main EDID block, and if that advertises extensions
the drm_edid code expects them to be present, and starts reading beyond the
buffer udldrmfb passes it.

Although it may be possible to read more EDID info with the udl we simpy don't
know how, and even if trial and error gets it working on one device, that is
no guarantee it will work on other revisions. So this patch does a simple fix
in the form of patching the EDID info to report 0 extension blocks, this
fixes udldrmfb only doing 1024x768 on monitors with EDID extension blocks.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agoMerge branch 'drm-fixes-3.8' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Sun, 13 Jan 2013 22:16:54 +0000 (08:16 +1000)]
Merge branch 'drm-fixes-3.8' of git://people.freedesktop.org/~agd5f/linux into drm-next

Fixes for UMS mode which has been broken for a while plus an rn50 fix
and a dma fix.

* 'drm-fixes-3.8' of git://people.freedesktop.org/~agd5f/linux:
  radeon/kms: fix dma relocation checking
  radeon/kms: force rn50 chip to always report connected on analog output
  drm/radeon: fix error path in kpage allocation
  drm/radeon: fix a bogus kfree
  drm/radeon: fix NULL pointer dereference in UMS mode

11 years agoMerge branch 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux...
Dave Airlie [Sun, 13 Jan 2013 22:15:36 +0000 (08:15 +1000)]
Merge branch 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next

Regression fixes since rework mostly.

* 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/nvc0/fb: fix crash when different mutex is used to protect same list
  drm/nouveau/clock: fix support for more than 2 monitors on nve0
  drm/nv50/disp: fix selection of bios script for analog outputs
  drm/nv17-50: restore fence buffer on resume
  drm/nouveau: fix blank LVDS screen regression on pre-nv50 cards
  drm/nouveau: fix nouveau_client allocation failure path
  drm/nouveau: don't return freed object from nouveau_handle_create
  drm/nouveau/vm: fix memory corruption when pgt allocation fails
  drm/nouveau: add locking around instobj list operations
  drm/nouveau: do not forcibly power on lvds panels
  drm/nouveau/devinit: ensure legacy vga control is enabled during post