]> Pileus Git - ~andy/linux/log
~andy/linux
11 years agoMerge tag 'omap-devel-am33xx-for-v3.6' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Tue, 3 Jul 2012 20:03:28 +0000 (22:03 +0200)]
Merge tag 'omap-devel-am33xx-for-v3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc

From Tony Lindgren <tony@atomide.com>:

Here are changes to add support for am33xx processors for the
clock, power, and voltagedomains.

* tag 'omap-devel-am33xx-for-v3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP AM33xx: clockdomains: Add clockdomain data and respective operations
  ARM: OMAP AM33xx: powerdomains: add AM335x support
  ARM: OMAP AM33xx: CM: Introduce AM33xx CM APIs and register level details
  ARM: OMAP AM33xx: PRM: add PRM support
  ARM: OMAP AM33xx: voltagedomain: Add voltage domain data
  ARM: OMAP2+: control: Add AM33XX control reg & sec clkctrl offset
  ARM: OMAP2+: am33xx: Add AM335XEVM machine support
  ARM: OMAP2+: am33xx: Add low level debugging support

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
11 years agoMerge branch 'lpc32xx/core' of git://git.antcom.de/linux-2.6 into next/soc
Arnd Bergmann [Tue, 3 Jul 2012 19:45:50 +0000 (21:45 +0200)]
Merge branch 'lpc32xx/core' of git://git.antcom.de/linux-2.6 into next/soc

A second batch of core patches for lpc32xx, based on top of the first
one in the lpc32xx-next branch.

* 'lpc32xx/core' of git://git.antcom.de/linux-2.6:
  ARM: LPC32xx: Remove unused gpios
  ARM: LPC32xx: Remove USB and I2C init from phy3250.c
  ARM: LPC32xx: Cleanup USB clock init
  ARM: LPC32xx: Remove wrong re-initialization of MMC clock register
  ARM: LPC32xx: Add further bits to MMC init
  ARM: LPC32xx: Init MMC via clock

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
11 years agoARM: LPC32xx: Remove unused gpios
Alexandre Pereira da Silva [Sun, 1 Jul 2012 19:06:45 +0000 (21:06 +0200)]
ARM: LPC32xx: Remove unused gpios

Remove SPI0_CS, MMC_CD and MMC_WP gpios as they moved to devicetree.

Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: Roland Stigge <stigge@antcom.de>
11 years agoARM: LPC32xx: Remove USB and I2C init from phy3250.c
Roland Stigge [Sun, 1 Jul 2012 19:06:45 +0000 (21:06 +0200)]
ARM: LPC32xx: Remove USB and I2C init from phy3250.c

USB and I2C initialization can be removed safely from the board specific
phy3250.c, now that initialization moved to the generalized clock.c.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Tested-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
11 years agoARM: LPC32xx: Cleanup USB clock init
Alexandre Pereira da Silva [Sun, 1 Jul 2012 19:06:45 +0000 (21:06 +0200)]
ARM: LPC32xx: Cleanup USB clock init

Move most of usb clock initialization from lpc32xx_udc and ohci-nxp to
clock.c. Also adds ohci clocks and otg clocks.

Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: Roland Stigge <stigge@antcom.de>
11 years agoARM: LPC32xx: Remove wrong re-initialization of MMC clock register
Roland Stigge [Sun, 1 Jul 2012 19:06:45 +0000 (21:06 +0200)]
ARM: LPC32xx: Remove wrong re-initialization of MMC clock register

This patch fixes a bug, (wrongfully) resetting the value of
LPC32XX_CLKPWR_MS_CTRL back to its initial contents (after careful setup). This
was discovered only with a board/bootloader combination (EA3250) where the
contents of the respective register wasn't already at the correct value on
Linux boot.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
11 years agoARM: LPC32xx: Add further bits to MMC init
Roland Stigge [Sun, 1 Jul 2012 19:06:44 +0000 (21:06 +0200)]
ARM: LPC32xx: Add further bits to MMC init

This patch makes sure certain MMC bits are cleared as they should for
initialization.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
11 years agoARM: LPC32xx: Init MMC via clock
Roland Stigge [Sun, 1 Jul 2012 19:06:44 +0000 (21:06 +0200)]
ARM: LPC32xx: Init MMC via clock

This patch moves MMC/SD controller initialization from the board specific file
phy3250.c to clock.c.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
11 years agoMerge branch 'lpc32xx/devel' into next/soc
Olof Johansson [Sat, 30 Jun 2012 23:27:54 +0000 (16:27 -0700)]
Merge branch 'lpc32xx/devel' into next/soc

* lpc32xx/devel: (22 commits)
  ARM: LPC32xx: Move i2s1 dma enabling to clock.c
  ARM: LPC32xx: Move uart6 irda disable to serial.c
  ARM: LPC32xx: Cleanup board init, remove duplicate clock init
  ARM: LPC32xx: Remove spi chip definitions
  ARM: LPC32xx: Remove spi chipselect request from board init
  ARM: LPC32xx: Add dt settings to the at25 node
  ARM: LPC32xx: Build arch dtbs
  ARM: LPC32xx: Fix lpc32xx.dtsi status property: "disable" -> "disabled"
  ARM: LPC32xx: Remove mach specific ARCH_NR_GPIOS, use default
  ARM: LPC32xx: High Speed UART configuration via DT
  ARM: LPC32xx: DT conversion of Standard UARTs
  ARM: LPC32xx: DTS adjustment for using pl18x primecell
  ARM: LPC32xx: Add MMC controller support
  ARM: LPC32xx: Defconfig update
  ARM: LPC32xx: Clock adjustment for key matrix controller
  ARM: LPC32xx: DTS adjustment for key matrix controller
  ARM: LPC32xx: Add dts for EA3250 reference board
  ARM: LPC32xx: Adjust dtsi file for MLC controller configuration
  ARM: LPC32xx: Add DMA configuration to platform data
  ARM: LPC32xx: Remove SLC controller initialization from platform init
  ...

11 years agoMerge tag 'omap-devel-a-for-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git...
Tony Lindgren [Fri, 22 Jun 2012 08:50:22 +0000 (01:50 -0700)]
Merge tag 'omap-devel-a-for-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into devel-am33xx

Adds AM33xx PRCM support

11 years agoARM: OMAP AM33xx: clockdomains: Add clockdomain data and respective operations
Vaibhav Hiremath [Mon, 18 Jun 2012 06:47:27 +0000 (00:47 -0600)]
ARM: OMAP AM33xx: clockdomains: Add clockdomain data and respective operations

AM33XX PRCM module consists of various clockdomains, in all
total we have 18 clockdomains available, with following
controlling options,
   - SW Sleep: sw forced sleep transition
   - SW Wakeup: sw forced wakeup transition

This patch adds all available clockdomain data, respective
clockdomain operations for AM33XX family of device, and also
integrates it into existing OMAP framework.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
CC: Tony Lindgren <tony@atomide.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
[paul@pwsan.com: removed CLKDM_NO_AUTODEPS from clockdomain flags, removed
 unnecessary .clktrctrl_offs field; updated for 3.5]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
11 years agoARM: OMAP AM33xx: powerdomains: add AM335x support
Vaibhav Hiremath [Mon, 18 Jun 2012 06:47:27 +0000 (00:47 -0600)]
ARM: OMAP AM33xx: powerdomains: add AM335x support

Add offset & mask fields to struct powerdomain

In case of AM33xx family of devices, there is no consistency between
PWRSTCTRL & PWRSTST register offsers in PRM space, for example -

PRM_XXX           PWRSTCTRL     PWRSTST
=======================================
PRM_PER_MOD:      0x0C,         0x08
PRM_WKUP_MOD:     0x04,         0x08
PRM_MPU_MOD:      0x00,         0x04
PRM_DEVICE_MOD:   NA,           NA

And also, there is no consistency between bit-offsets inside
PWRSTCTRL & PWRSTST register, for example -

PRM_XXX           LOGICRET  MEMON  MEMRET
=======================================
GFX_PWRCTRL:      2,        17,    6
PER_PWRCTRL:      3,        25,    29
MPU_PWRCTRL:      2,        18,    22
WKUP_PWRCTRL:     3,        NA,    NA

This means, we need to maintain and pass on all this information
in powerdomain handle; so adding fields for,
   - PWRSTCTRL/ST register offset
   - Logic retention state mask
   - mem_on/ret/pwrst/retst mask

Currently, this fields is only applicable and used for AM33XX devices.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Rajendra Nayak <rnayak@ti.com>
[paul@pwsan.com: this patch is a combination of "Add offset & mask fields to
 struct powerdomain" and the powerdomain portions of "ARM: OMAP3+: am33xx:
 Add powerdomain & PRM support"; updated for 3.5]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
11 years agoARM: OMAP AM33xx: CM: Introduce AM33xx CM APIs and register level details
Vaibhav Hiremath [Mon, 18 Jun 2012 06:47:26 +0000 (00:47 -0600)]
ARM: OMAP AM33xx: CM: Introduce AM33xx CM APIs and register level details

As far as PRM/CM/PRCM modules are concerned, AM33XX device is
different than OMAP3 and OMAP4 architectures; so similar to
PRM implementation, handle AM33XX CM separately.

This patch introduces AM33XX CM module low-level api's, used and
required by omap clockdomain and hwmod framework.

Please note that cm-regbits-33xx.h (register bit field offset)
and cm33xx.h (register addr offset) files are mostly auto generated.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
CC: Tony Lindgren <tony@atomide.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
[paul@pwsan.com: split the hwmod code changes in this patch into a separate
 patch; updated for 3.5]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
11 years agoARM: OMAP AM33xx: PRM: add PRM support
Vaibhav Hiremath [Mon, 18 Jun 2012 06:47:26 +0000 (00:47 -0600)]
ARM: OMAP AM33xx: PRM: add PRM support

As far as PRM/CM/PRCM modules are concerned, AM33XX device is
different than OMAP3 and OMAP4 architectures; so we need to handle it
separately.  This patch adds support for the PRM APIs required for
AM33XX device.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Afzal Mohammed <afzal@ti.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Rajendra Nayak <rnayak@ti.com>
[paul@pwsan.com: separated the PRM parts of "ARM: OMAP3+: am33xx: Add
 powerdomain & PRM support" into this patch; fixed Makefile prm33xx.o
 location; cleaned up some checkpatch violations; updated for 3.5]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
11 years agoARM: OMAP AM33xx: voltagedomain: Add voltage domain data
Vaibhav Hiremath [Mon, 18 Jun 2012 06:47:26 +0000 (00:47 -0600)]
ARM: OMAP AM33xx: voltagedomain: Add voltage domain data

Currently dummy voltage domain data is being created
in order to succeed boot process, nothing has been done
w.r.t actual hardware (voltage control).

Also, hook up the AM33XX voltage domain to OMAP framework.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Afzal Mohammed <afzal@ti.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Acked-by: Kevin Hilman <khilman@ti.com>
[paul@pwsan.com: updated for 3.5]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
11 years agoARM: OMAP2+: control: Add AM33XX control reg & sec clkctrl offset
Vaibhav Hiremath [Mon, 18 Jun 2012 06:47:25 +0000 (00:47 -0600)]
ARM: OMAP2+: control: Add AM33XX control reg & sec clkctrl offset

Define AM33XX control register, in order to allow access to
control register address space, also add CONTROL_SEC_CLK_CTRL
register offset; both are required in clock tree data,
for wdt0 and timer0 clock source select configuration.

CONTROL.SEC_CLK_CTRL register is provided to select/configure
clock input for WDT0 and TIMER0.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
[paul@pwsan.com: added include of plat/am33xx.h to fix build break;
 added AM33XX_CONTROL_STATUS bitfields that will be needed for the clock
 tree; fixed some control.h whitespace problems while here]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
11 years agoMerge branch 'nomadik-for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git...
Olof Johansson [Sun, 17 Jun 2012 05:40:37 +0000 (22:40 -0700)]
Merge branch 'nomadik-for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into next/soc

* 'nomadik-for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik:
  ARM: nomadik: bump all IRQ numbers by one
  ARM: nomadik: register the MMC/SD device
  ARM: nomadik: register the I2C devices
  ARM: nomadik: register all three I2C busses
  ARM: nomadik: convert to generic clock
  ARM: nomadik: register PL031 RTC
  ARM: nomadik: register AMBA devices dynamically
  ARM: nomadik: register GPIOs dynamically

11 years agoLinux 3.5-rc3 v3.5-rc3
Linus Torvalds [Sun, 17 Jun 2012 00:25:17 +0000 (17:25 -0700)]
Linux 3.5-rc3

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Sun, 17 Jun 2012 00:01:41 +0000 (17:01 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs

Pull btrfs compile warning fixes from Chris Mason.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: cast devid to unsigned long long for printk %llu
  Btrfs: init old_generation in get_old_root

11 years agoMerge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux...
Linus Torvalds [Sun, 17 Jun 2012 00:00:15 +0000 (17:00 -0700)]
Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile

Pull arch/tile update from Chris Metcalf:
 "This one-line bug fix unbreaks glibc robust mutexes (among other
  things no doubt), from code merged in during the 3.5 merge window but
  which we had been running internally at Tilera for almost a year."

* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  tile: fix bug in get_user() for 4-byte values

11 years agoMerge tag 'fbdev-fixes-for-3.5-1' of git://github.com/schandinat/linux-2.6
Linus Torvalds [Sat, 16 Jun 2012 23:59:05 +0000 (16:59 -0700)]
Merge tag 'fbdev-fixes-for-3.5-1' of git://github.com/schandinat/linux-2.6

Pull fbdev fixes from Florian Tobias Schandinat:

 - two fixes for s3c-fb by Jingoo Han (including a fix for a potential
   division by zero)

 - a couple of randconfig fixes by Arnd Bergmann

 - a cleanup for bfin_adv7393fb by Emil Goode

* tag 'fbdev-fixes-for-3.5-1' of git://github.com/schandinat/linux-2.6:
  video: s3c-fb: fix possible division by zero in s3c_fb_calc_pixclk
  video: s3c-fb: clear SHADOWCON register when clearing hardware window registers
  drivers/tosa: driver needs I2C and SPI to compile
  drivers/savagefb: use mdelay instead of udelay
  video/console: automatically select a font
  video/ili9320: do not mark exported functions __devexit
  drivers/video: use correct __devexit_p annotation
  video: bfin_adv7393fb: Convert to kstrtouint_from_user

11 years agotile: fix bug in get_user() for 4-byte values
Chris Metcalf [Sat, 16 Jun 2012 20:53:06 +0000 (16:53 -0400)]
tile: fix bug in get_user() for 4-byte values

The definition of 32-bit values in the 64-bit tilegx architecture is that
they should be sign-extended regardless of whether they are considered
signed or unsigned by the compiler.  Accordingly, we need to use an
"ld4s" rather than "ld4u" to load and sign-extend for get_user().

This fixes glibc bug 14238 (see http://sourceware.org/bugzilla),
introduced during the 3.5 merge window.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
11 years agoswap: fix shmem swapping when more than 8 areas
Hugh Dickins [Sat, 16 Jun 2012 00:55:50 +0000 (17:55 -0700)]
swap: fix shmem swapping when more than 8 areas

Minchan Kim reports that when a system has many swap areas, and tmpfs
swaps out to the ninth or more, shmem_getpage_gfp()'s attempts to read
back the page cannot locate it, and the read fails with -ENOMEM.

Whoops.  Yes, I blindly followed read_swap_header()'s pte_to_swp_entry(
swp_entry_to_pte()) technique for determining maximum usable swap
offset, without stopping to realize that that actually depends upon the
pte swap encoding shifting swap offset to the higher bits and truncating
it there.  Whereas our radix_tree swap encoding leaves offset in the
lower bits: it's swap "type" (that is, index of swap area) that was
truncated.

Fix it by reducing the SWP_TYPE_SHIFT() in swapops.h, and removing the
broken radix_to_swp_entry(swp_to_radix_entry()) from read_swap_header().

This does not reduce the usable size of a swap area any further, it
leaves it as claimed when making the original commit: no change from 3.0
on x86_64, nor on i386 without PAE; but 3.0's 512GB is reduced to 128GB
per swapfile on i386 with PAE.  It's not a change I would have risked
five years ago, but with x86_64 supported for ten years, I believe it's
appropriate now.

Hmm, and what if some architecture implements its swap pte with offset
encoded below type? That would equally break the maximum usable swap
offset check.  Happily, they all follow the same tradition of encoding
offset above type, but I'll prepare a check on that for next.

Reported-and-Reviewed-and-Tested-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: stable@vger.kernel.org [3.1, 3.2, 3.3, 3.4]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Sat, 16 Jun 2012 00:39:32 +0000 (17:39 -0700)]
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "This is a couple of minor fixes, one for a preempt warning in the
  mpt2sas driver and one is a config failure with the new sd async
  domain."

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  [SCSI] Fix sd_probe_domain config problem
  [SCSI] mpt2sas: Fix unsafe using smp_processor_id() in preemptible

11 years agoMerge tag 'nfs-for-3.5-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Sat, 16 Jun 2012 00:37:23 +0000 (17:37 -0700)]
Merge tag 'nfs-for-3.5-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client bugfixes from Trond Myklebust:
 "Highlights include:

   - Fix a couple of mount regressions due to the recent cleanups.
   - Fix an Oops in the open recovery code
   - Fix an rpc_pipefs upcall hang that results from some of the net
     namespace work from 3.4.x (stable kernel candidate).
   - Fix a couple of write and o_direct regressions that were found at
     last weeks Bakeathon testing event in Ann Arbor."

* tag 'nfs-for-3.5-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  NFS: add an endian notation for sparse
  NFSv4.1: integer overflow in decode_cb_sequence_args()
  rpc_pipefs: allow rpc_purge_list to take a NULL waitq pointer
  NFSv4 do not send an empty SETATTR compound
  NFSv2: EOF incorrectly set on short read
  NFS: Use the NFS_DEFAULT_VERSION for v2 and v3 mounts
  NFS: fix directio refcount bug on commit
  NFSv4: Fix unnecessary delegation returns in nfs4_do_open
  NFSv4.1: Convert another trivial printk into a dprintk
  NFS4: Fix open bug when pnfs module blacklisted
  NFS: Remove incorrect BUG_ON in nfs_found_client
  NFS: Map minor mismatch error to protocol not support error.
  NFS: Fix a commit bug
  NFS4: Set parsed mount data version to 4
  NFSv4.1: Ensure we clear session state flags after a session creation
  NFSv4.1: Convert a trivial printk into a dprintk
  NFSv4: Fix up decode_attr_mdsthreshold
  NFSv4: Fix an Oops in the open recovery code
  NFSv4.1: Fix a request leak on the back channel

11 years agoMerge branch 'fixes-for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma...
Linus Torvalds [Sat, 16 Jun 2012 00:35:01 +0000 (17:35 -0700)]
Merge branch 'fixes-for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping

Pull DMA-mapping fixes from Marek Szyprowski:
 "A set of minor fixes for dma-mapping code (ARM and x86) required for
  Contiguous Memory Allocator (CMA) patches merged in v3.5-rc1."

* 'fixes-for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
  x86: dma-mapping: fix broken allocation when dma_mask has been provided
  ARM: dma-mapping: fix debug messages in dmabounce code
  ARM: mm: fix type of the arm_dma_limit global variable
  ARM: dma-mapping: Add missing static storage class specifier

11 years agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Sat, 16 Jun 2012 00:28:20 +0000 (17:28 -0700)]
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc

Pull PowerPC fix from Paul Mackerras:
 "Just one commit, and a one-liner at that, but an important one;
  without it hard_irq_disable() does nothing on powerpc."

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  Make hard_irq_disable() actually hard-disable interrupts

11 years agoMerge branch 'for-3.5' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Sat, 16 Jun 2012 00:27:31 +0000 (17:27 -0700)]
Merge branch 'for-3.5' of git://linux-nfs.org/~bfields/linux

Pull two nfsd bugfixes from J. Bruce Fields.

* 'for-3.5' of git://linux-nfs.org/~bfields/linux:
  nfsd4: BUG_ON(!is_spin_locked()) no good on UP kernels
  NFS: hard-code init_net for NFS callback transports

11 years agoMerge tag 'stable/for-linus-3.5-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 16 Jun 2012 00:17:15 +0000 (17:17 -0700)]
Merge tag 'stable/for-linus-3.5-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

Pull five Xen bug-fixes from Konrad Rzeszutek Wilk:

 - When booting as PVHVM we would try to use PV console - but would not validate
   the parameters causing us to crash during restore b/c we re-use the wrong event
   channel.
 - When booting on machines with SR-IOV PCI bridge we didn't check for the bridge
   and tried to use it.
 - Under AMD machines would advertise the APERFMPERF resulting in needless amount
   of MSRs from the guest.
 - A global value (xen_released_pages) was not subtracted at bootup when pages
   were added back in. This resulted in the balloon worker having the wrong
   account of how many pages were truly released.
 - Fix dead-lock when xen-blkfront is run in the same domain as xen-blkback.

* tag 'stable/for-linus-3.5-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen: mark local pages as FOREIGN in the m2p_override
  xen/setup: filter APERFMPERF cpuid feature out
  xen/balloon: Subtract from xen_released_pages the count that is populated.
  xen/pci: Check for PCI bridge before using it.
  xen/events: Add WARN_ON when quick lookup found invalid type.
  xen/hvc: Check HVM_PARAM_CONSOLE_[EVTCHN|PFN] for correctness.
  xen/hvc: Fix error cases around HVM_PARAM_CONSOLE_PFN
  xen/hvc: Collapse error logic.

11 years agoMerge tag 'usb-3.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sat, 16 Jun 2012 00:10:02 +0000 (17:10 -0700)]
Merge tag 'usb-3.5-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 tiny fixes for the USB core and drivers for
  3.5-rc3

  A bunch of gadget fixes, and new device ids, as well as some fixes for
  a number of different regressions that have been reported recently.
  We also fixed some PCI host controllers to resolve a long-standing bug
  with a whole class of host controllers that have been plaguing people
  for a number of kernel releases, preventing their systems from
  suspending properly.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
* tag 'usb-3.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (41 commits)
  USB: fix gathering of interface associations
  usb: ehci-sh: fix illegal phy_init() running when platform_data is NULL
  usb: cdc-acm: fix devices not unthrottled on open
  Fix OMAP EHCI suspend/resume failure (i693)
  USB: ohci-hub: Mark ohci_finish_controller_resume() as __maybe_unused
  usb: use usb_serial_put in usb_serial_probe errors
  USB: EHCI: Fix build warning in xilinx ehci driver
  USB: fix PS3 EHCI systems
  xHCI: Increase the timeout for controller save/restore state operation
  xhci: Don't free endpoints in xhci_mem_cleanup()
  xhci: Fix invalid loop check in xhci_free_tt_info()
  xhci: Fix error path return value.
  USB: Checking the wrong variable in usb_disable_lpm()
  usb-storage: Add 090c:1000 to unusal-devs
  USB: serial-generic: use a single set of device IDs
  USB: serial: Enforce USB driver and USB serial driver match
  USB: add NO_D3_DURING_SLEEP flag and revert 151b61284776be2
  USB: option: add more YUGA device ids
  USB: mos7840: Fix compilation of usb serial driver
  USB: option: fix memory leak
  ...

11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide
Linus Torvalds [Sat, 16 Jun 2012 00:07:48 +0000 (17:07 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide

Pull IDE fixes from David S. Miller:

1) Two fixes to icside, one for a build failure and another for a
   warning.  From Christian Dietrich.

2) Fix a bit operation that did erroneous masking, from Julia Lawall.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
  drivers/ide/ide-cs.c: adjust suspicious bit operation
  ide: icside.c: fix printk format string compile warning
  ide: icside.c: Fix compile with CONFIG_BLK_DEV_IDEDMA_ICS=n

11 years agoBtrfs: cast devid to unsigned long long for printk %llu
Chris Mason [Sat, 16 Jun 2012 00:07:17 +0000 (20:07 -0400)]
Btrfs: cast devid to unsigned long long for printk %llu

Avoid warning in 32 bit machines

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Sat, 16 Jun 2012 00:07:06 +0000 (17:07 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc

Pull sparc update from David S. Miller:
 "This just removes some sparc headers that were never, ever, used."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc: remove two unused headers

11 years agoBtrfs: init old_generation in get_old_root
Chris Mason [Sat, 16 Jun 2012 00:02:02 +0000 (20:02 -0400)]
Btrfs: init old_generation in get_old_root

gcc was giving an uninit variable warning here.  Strictly
speaking we don't need to init it, but this will make things
much less error prone.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 15 Jun 2012 23:59:19 +0000 (16:59 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar.

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/smp: Fix topology checks on AMD MCM CPUs
  x86/mm: Fix some kernel-doc warnings
  x86, um: Correct syscall table type attributes breaking gcc 4.8

11 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 15 Jun 2012 23:58:10 +0000 (16:58 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar.

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  watchdog: Quiet down the boot messages
  perf/x86: Fix broken LBR fixup code
  tracing: Have tracing_off() actually turn tracing off

11 years agoMerge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 15 Jun 2012 23:52:35 +0000 (16:52 -0700)]
Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull core updates (RCU and locking) from Ingo Molnar:
 "Most of the diffstat comes from the RCU slow boot regression fixes,
  but there's also a debuggability improvements/fixes."

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  memblock: Document memblock_is_region_{memory,reserved}()
  rcu: Precompute RCU_FAST_NO_HZ timer offsets
  rcu: Move RCU_FAST_NO_HZ per-CPU variables to rcu_dynticks structure
  rcu: Update RCU_FAST_NO_HZ tracing for lazy callbacks
  rcu: RCU_FAST_NO_HZ detection of callback adoption
  spinlock: Indicate that a lockup is only suspected
  kdump: Execute kmsg_dump(KMSG_DUMP_PANIC) after smp_send_stop()
  panic: Make panic_on_oops configurable

11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Linus Torvalds [Fri, 15 Jun 2012 23:07:24 +0000 (16:07 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending

Pull target updates from Nicholas Bellinger:
 "This series contains post merge qla_target.c / tcm_qla2xxx bugfixes
  from the past weeks, including the patch to allow target-core to use
  an optional session shutdown callback to help address an active I/O
  shutdown bug in tcm_qla2xxx code (Joern).

  Also included is a target regression bugfix releated to explict ALUA
  target port group CDB emulation that is CC'ed to stable (Roland)."

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  qla2xxx: Remove version.h header file inclusion
  tcm_qla2xxx: Handle malformed wwn strings properly
  tcm_qla2xxx: tcm_qla2xxx_handle_tmr() can be static
  qla2xxx: Don't leak commands we give up on in qlt_do_work()
  qla2xxx: Don't crash if we can't find cmd for failed CTIO
  tcm_qla2xxx: Don't insert nacls without sessions into the btree
  target: Return error to initiator if SET TARGET PORT GROUPS emulation fails
  tcm_qla2xxx: Clear session s_id + loop_id earlier during shutdown
  tcm_qla2xxx: Convert to TFO->put_session() usage
  target: Add TFO->put_session() caller for HW fabric session shutdown

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Fri, 15 Jun 2012 23:04:37 +0000 (16:04 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs

Pull btrfs update from Chris Mason:
 "The dates look like I had to rebase this morning because there was a
  compiler warning for a printk arg that I had missed earlier.

  These are all fixes, including one to prevent using stale pointers for
  device names, and lots of fixes around transaction abort cleanups
  (Josef, Liu Bo).

  Jan Schmidt also sent in a number of fixes for the new reference
  number tracking code.

  Liu Bo beat me to updating the MAINTAINERS file.  Since he thought to
  also fix the git url, I kept his commit."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (24 commits)
  Btrfs: update MAINTAINERS info for BTRFS FILE SYSTEM
  Btrfs: destroy the items of the delayed inodes in error handling routine
  Btrfs: make sure that we've made everything in pinned tree clean
  Btrfs: avoid memory leak of extent state in error handling routine
  Btrfs: do not resize a seeding device
  Btrfs: fix missing inherited flag in rename
  Btrfs: fix incompat flags setting
  Btrfs: fix defrag regression
  Btrfs: call filemap_fdatawrite twice for compression
  Btrfs: keep inode pinned when compressing writes
  Btrfs: implement ->show_devname
  Btrfs: use rcu to protect device->name
  Btrfs: unlock everything properly in the error case for nocow
  Btrfs: fix btrfs_destroy_marked_extents
  Btrfs: abort the transaction if the commit fails
  Btrfs: wake up transaction waiters when aborting a transaction
  Btrfs: fix locking in btrfs_destroy_delayed_refs
  Btrfs: pass locked_page into extent_clear_unlock_delalloc if theres an error
  Btrfs: fix race in tree mod log addition
  Btrfs: add btrfs_next_old_leaf
  ...

11 years agoBtrfs: update MAINTAINERS info for BTRFS FILE SYSTEM
Liu Bo [Thu, 14 Jun 2012 08:23:25 +0000 (02:23 -0600)]
Btrfs: update MAINTAINERS info for BTRFS FILE SYSTEM

Update to the latest btrfs's maintainer mail and git repo.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoBtrfs: destroy the items of the delayed inodes in error handling routine
Miao Xie [Thu, 14 Jun 2012 08:23:22 +0000 (02:23 -0600)]
Btrfs: destroy the items of the delayed inodes in error handling routine

the items of the delayed inodes were forgotten to be freed, this patch
fixes it.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoBtrfs: make sure that we've made everything in pinned tree clean
Liu Bo [Thu, 14 Jun 2012 08:23:21 +0000 (02:23 -0600)]
Btrfs: make sure that we've made everything in pinned tree clean

Since we have two trees for recording pinned extents, we need to go through
both of them to make sure that we've done everything clean.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoBtrfs: avoid memory leak of extent state in error handling routine
Liu Bo [Thu, 14 Jun 2012 08:23:20 +0000 (02:23 -0600)]
Btrfs: avoid memory leak of extent state in error handling routine

We've forgotten to clear extent states in pinned tree, which will results in
space counter mismatch and memory leak:

WARNING: at fs/btrfs/extent-tree.c:7537 btrfs_free_block_groups+0x1f3/0x2e0 [btrfs]()
...
space_info 2 has 8380416 free, is not full
space_info total=12582912, used=4096, pinned=4096, reserved=0, may_use=0, readonly=4194304
btrfs state leak: start 29364224 end 29376511 state 1 in tree ffff880075f20090 refs 1
...

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoBtrfs: do not resize a seeding device
Liu Bo [Thu, 14 Jun 2012 08:23:19 +0000 (02:23 -0600)]
Btrfs: do not resize a seeding device

Seeding devices are not supposed to change any more.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoBtrfs: fix missing inherited flag in rename
Liu Bo [Thu, 14 Jun 2012 08:23:18 +0000 (02:23 -0600)]
Btrfs: fix missing inherited flag in rename

When we move a file into a directory with compression flag, we need to
inherite BTRFS_INODE_COMPRESS and clear BTRFS_INODE_NOCOMPRESS as well.
But if we move a file into a directory without compression flag, we need
to clear both of them.

It is the way how our setflags deals with compression flag, so keep
the same behaviour here.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoMerge branch 'for-chris' of git://git.jan-o-sch.net/btrfs-unstable into for-linus
Chris Mason [Fri, 15 Jun 2012 01:33:34 +0000 (21:33 -0400)]
Merge branch 'for-chris' of git://git.jan-o-sch.net/btrfs-unstable into for-linus

11 years agoMake hard_irq_disable() actually hard-disable interrupts
Paul Mackerras [Fri, 15 Jun 2012 04:51:39 +0000 (14:51 +1000)]
Make hard_irq_disable() actually hard-disable interrupts

At present, hard_irq_disable() does nothing on powerpc because of
this code in include/linux/interrupt.h:

    #ifndef hard_irq_disable
    #define hard_irq_disable()      do { } while(0)
    #endif

So we need to make our hard_irq_disable be a macro.  It was previously
a macro until commit 7230c56441 ("powerpc: Rework lazy-interrupt
handling") changed it to a static inline function.

Cc: stable@vger.kernel.org
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
--
 arch/powerpc/include/asm/hw_irq.h |    3 +++
 1 file changed, 3 insertions(+)

11 years agoBtrfs: fix incompat flags setting
Li Zefan [Mon, 11 Jun 2012 09:10:51 +0000 (17:10 +0800)]
Btrfs: fix incompat flags setting

It's a bug, but it happens to work, as BTRFS_COMPRESS_LZO == 2, which
has only one bit set.

Signed-off-by: Li Zefan <lizefan@huawei.com>
11 years agoBtrfs: fix defrag regression
Li Zefan [Mon, 11 Jun 2012 08:03:35 +0000 (16:03 +0800)]
Btrfs: fix defrag regression

If a file has 3 small extents:

| ext1 | ext2 | ext3 |

Running "btrfs fi defrag" will only defrag the last two extents, if those
extent mappings hasn't been read into memory from disk.

This bug was introduced by commit 17ce6ef8d731af5edac8c39e806db4c7e1f6956f
("Btrfs: add a check to decide if we should defrag the range")

The cause is, that commit looked into previous and next extents using
lookup_extent_mapping() only.

While at it, remove the code that checks the previous extent, since
it's sufficient to check the next extent.

Signed-off-by: Li Zefan <lizefan@huawei.com>
11 years agoBtrfs: call filemap_fdatawrite twice for compression
Josef Bacik [Fri, 8 Jun 2012 19:26:47 +0000 (15:26 -0400)]
Btrfs: call filemap_fdatawrite twice for compression

I removed this in an earlier commit and I was wrong.  Because compression
can return from filemap_fdatawrite() without having actually set any of it's
pages as writeback() it can make filemap_fdatawait() do essentially nothing,
and then we won't find any ordered extents because they may not have been
created yet.  So not only does this make fsync() completely useless, but it
will also screw up if you truncate on a non-page aligned offset since we
zero out the end and then wait on ordered extents and then call drop caches.
We can drop the cache before the io completes and then we try to unpin the
extent we just wrote we won't find it and everything goes sideways.  So fix
this by putting it back and put a giant comment there to keep me from trying
to remove it in the future.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
11 years agoBtrfs: keep inode pinned when compressing writes
Josef Bacik [Fri, 8 Jun 2012 19:16:12 +0000 (15:16 -0400)]
Btrfs: keep inode pinned when compressing writes

A user reported lots of problems using compression on the new code and it
turns out part of the problem was that igrab() was failing when we added a
new ordered extent.  This is because when writing out an inode under
compression we immediately return without actually doing anything to the
pages, and then in another thread at some point down the line actually do
the ordered dance.  The problem is between the point that we start writeback
and we actually add the ordered extent we could be trying to reclaim the
inode, which makes igrab() return NULL.  So we need to do an igrab() when we
create the async extent and then drop it when we are done with it.  This
makes sure we stay pinned in memory until the ordered extent can get a
reference on it and we are good to go.  With this patch we no longer panic
in btrfs_finish_ordered_io().  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
11 years agoBtrfs: implement ->show_devname
Josef Bacik [Tue, 5 Jun 2012 18:13:12 +0000 (14:13 -0400)]
Btrfs: implement ->show_devname

Because btrfs can remove the device that was mounted we need to have a
->show_devname so that in this case we can print out some other device in
the file system to /proc/mount.  So if there are multiple devices in a btrfs
file system we will just print the device with the lowest devid that we can
find.  This will make everything consistent and deal with device removal
properly.  The drawback is if you mount with a device that is higher than
the lowest devicd it won't show up as the mounted device in /proc/mounts,
but this is a small price to pay. This was inspired by Miao Xie's patch.
Thanks,

Reviewed-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <josef@redhat.com>
11 years agoBtrfs: use rcu to protect device->name
Josef Bacik [Mon, 4 Jun 2012 18:03:51 +0000 (14:03 -0400)]
Btrfs: use rcu to protect device->name

Al pointed out that we can just toss out the old name on a device and add a
new one arbitrarily, so anybody who uses device->name in printk could
possibly use free'd memory.  Instead of adding locking around all of this he
suggested doing it with RCU, so I've introduced a struct rcu_string that
does just that and have gone through and protected all accesses to
device->name that aren't under the uuid_mutex with rcu_read_lock().  This
protects us and I will use it for dealing with removing the device that we
used to mount the file system in a later patch.  Thanks,

Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <josef@redhat.com>
11 years agoBtrfs: unlock everything properly in the error case for nocow
Josef Bacik [Thu, 31 May 2012 19:58:55 +0000 (15:58 -0400)]
Btrfs: unlock everything properly in the error case for nocow

I was getting hung on umount when a transaction was aborted because a range
of one of the free space inodes was still locked.  This is because the nocow
stuff doesn't unlock anything on error.  This fixed the problem and I
verified that is what was happening.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
11 years agoBtrfs: fix btrfs_destroy_marked_extents
Josef Bacik [Thu, 31 May 2012 19:54:30 +0000 (15:54 -0400)]
Btrfs: fix btrfs_destroy_marked_extents

So we're forcing the eb's to have their ref count set to 1 so invalidatepage
works but this breaks lots of things, for example root nodes, and is just
plain wrong, we don't need to just evict all of this stuff.  Also drop the
invalidatepage altogether and add a page_cache_release().  With this patch
we no longer hang when trying to access the root nodes after an aborted
transaction and we no longer leak memory.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
11 years agoBtrfs: abort the transaction if the commit fails
Josef Bacik [Thu, 31 May 2012 19:52:43 +0000 (15:52 -0400)]
Btrfs: abort the transaction if the commit fails

If a transaction commit fails we don't abort it so we don't set an error on
the file system.  This patch fixes that by actually calling the abort stuff
and then adding a check for a fs error in the transaction start stuff to
make sure it is caught properly.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
11 years agoBtrfs: wake up transaction waiters when aborting a transaction
Josef Bacik [Thu, 31 May 2012 19:49:57 +0000 (15:49 -0400)]
Btrfs: wake up transaction waiters when aborting a transaction

I was getting lots of hung tasks and a NULL pointer dereference because we
are not cleaning up the transaction properly when it aborts.  First we need
to reset the running_transaction to NULL so we don't get a bad dereference
for any start_transaction callers after this.  Also we cannot rely on
waitqueue_active() since it's just a list_empty(), so just call wake_up()
directly since that will do the barrier for us and such.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
11 years agoBtrfs: fix locking in btrfs_destroy_delayed_refs
Josef Bacik [Thu, 31 May 2012 15:06:33 +0000 (11:06 -0400)]
Btrfs: fix locking in btrfs_destroy_delayed_refs

The transaction abort stuff was throwing warnings from the list debugging
code because we do a list_del_init outside of the delayed_refs spin lock.
The delayed refs locking makes baby Jesus cry so it's not hard to get wrong,
but we need to take the ref head mutex to make sure it's not being processed
currently, and so if it is we need to drop the spin lock and then take and
drop the mutex and do the search again.  If we can take the mutex then we
can safely remove the head from the list and carry on.  Now when the
transaction aborts I don't get the list debugging warnings.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
11 years agoBtrfs: pass locked_page into extent_clear_unlock_delalloc if theres an error
Josef Bacik [Wed, 30 May 2012 19:35:17 +0000 (15:35 -0400)]
Btrfs: pass locked_page into extent_clear_unlock_delalloc if theres an error

While doing my enospc work I got a transaction abortion that resulted in a
panic when we tried to unlock_page() an already unlocked page.  This is
because we aren't calling extent_clear_unlock_delalloc with the locked page
so it was unlocking all the pages in the range.  This is wrong since
__extent_writepage expects to have the page locked still unless we return
*page_started as 1.  This should keep us from panicing.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
11 years agoUSB: fix gathering of interface associations
Daniel Mack [Tue, 12 Jun 2012 18:23:52 +0000 (20:23 +0200)]
USB: fix gathering of interface associations

TEAC's UD-H01 (and probably other devices) have a gap in the interface
number allocation of their descriptors:

  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          220
    bNumInterfaces          3
    [...]
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      [...]
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         2
      bInterfaceCount         2
      bFunctionClass          1 Audio
      bFunctionSubClass       0
      bFunctionProtocol      32
      iFunction               4
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      [...]

Once a configuration is selected, usb_set_configuration() walks the
known interfaces of a given configuration and calls find_iad() on
each of them to set the interface association pointer the interface
is included in.

The problem here is that the loop variable is taken for the interface
number in the comparison logic that gathers the association. Which is
fine as long as the descriptors are sane.

In the case above, however, the logic gets out of sync and the
interface association fields of all interfaces beyond the interface
number gap are wrong.

Fix this by passing the interface's bInterfaceNumber to find_iad()
instead.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-by: bEN <ml_all@circa.be>
Reported-by: Ivan Perrone <ivanperrone@hotmail.com>
Tested-by: ivan perrone <ivanperrone@hotmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: ehci-sh: fix illegal phy_init() running when platform_data is NULL
Shimoda, Yoshihiro [Tue, 12 Jun 2012 00:34:33 +0000 (09:34 +0900)]
usb: ehci-sh: fix illegal phy_init() running when platform_data is NULL

If the platform_data is not set, pdata will be uninitialized value.
Since the driver has the following code, if the condition is true when
the pdata is uninitialized value, the driver may jump to the illegal
phy_init().

if (pdata && pdata->phy_init)
pdata->phy_init();

This patch also fixes the following warning:

  CC      drivers/usb/host/ehci-hcd.o
drivers/usb/host/ehci-sh.c: In function â€˜ehci_hcd_sh_probe’:
drivers/usb/host/ehci-sh.c:104: warning: â€˜pdata’ may be used uninitialized in this function

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: cdc-acm: fix devices not unthrottled on open
Otto Meta [Wed, 6 Jun 2012 16:46:21 +0000 (18:46 +0200)]
usb: cdc-acm: fix devices not unthrottled on open

Currently CDC-ACM devices stay throttled when their TTY is closed while
throttled, stalling further communication attempts after the next open.

Unthrottling during open/activate got lost starting with kernel
3.0.0 and this patch reintroduces it.

Signed-off-by: Otto Meta <otto.patches@sister-shadow.de>
Cc: stable <stable@vger.kernel.org>
Acked-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoxen: mark local pages as FOREIGN in the m2p_override
Stefano Stabellini [Wed, 23 May 2012 17:57:20 +0000 (18:57 +0100)]
xen: mark local pages as FOREIGN in the m2p_override

When the frontend and the backend reside on the same domain, even if we
add pages to the m2p_override, these pages will never be returned by
mfn_to_pfn because the check "get_phys_to_machine(pfn) != mfn" will
always fail, so the pfn of the frontend will be returned instead
(resulting in a deadlock because the frontend pages are already locked).

INFO: task qemu-system-i38:1085 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
qemu-system-i38 D ffff8800cfc137c0     0  1085      1 0x00000000
 ffff8800c47ed898 0000000000000282 ffff8800be4596b0 00000000000137c0
 ffff8800c47edfd8 ffff8800c47ec010 00000000000137c0 00000000000137c0
 ffff8800c47edfd8 00000000000137c0 ffffffff82213020 ffff8800be4596b0
Call Trace:
 [<ffffffff81101ee0>] ? __lock_page+0x70/0x70
 [<ffffffff81a0fdd9>] schedule+0x29/0x70
 [<ffffffff81a0fe80>] io_schedule+0x60/0x80
 [<ffffffff81101eee>] sleep_on_page+0xe/0x20
 [<ffffffff81a0e1ca>] __wait_on_bit_lock+0x5a/0xc0
 [<ffffffff81101ed7>] __lock_page+0x67/0x70
 [<ffffffff8106f750>] ? autoremove_wake_function+0x40/0x40
 [<ffffffff811867e6>] ? bio_add_page+0x36/0x40
 [<ffffffff8110b692>] set_page_dirty_lock+0x52/0x60
 [<ffffffff81186021>] bio_set_pages_dirty+0x51/0x70
 [<ffffffff8118c6b4>] do_blockdev_direct_IO+0xb24/0xeb0
 [<ffffffff811e71a0>] ? ext3_get_blocks_handle+0xe00/0xe00
 [<ffffffff8118ca95>] __blockdev_direct_IO+0x55/0x60
 [<ffffffff811e71a0>] ? ext3_get_blocks_handle+0xe00/0xe00
 [<ffffffff811e91c8>] ext3_direct_IO+0xf8/0x390
 [<ffffffff811e71a0>] ? ext3_get_blocks_handle+0xe00/0xe00
 [<ffffffff81004b60>] ? xen_mc_flush+0xb0/0x1b0
 [<ffffffff81104027>] generic_file_aio_read+0x737/0x780
 [<ffffffff813bedeb>] ? gnttab_map_refs+0x15b/0x1e0
 [<ffffffff811038f0>] ? find_get_pages+0x150/0x150
 [<ffffffff8119736c>] aio_rw_vect_retry+0x7c/0x1d0
 [<ffffffff811972f0>] ? lookup_ioctx+0x90/0x90
 [<ffffffff81198856>] aio_run_iocb+0x66/0x1a0
 [<ffffffff811998b8>] do_io_submit+0x708/0xb90
 [<ffffffff81199d50>] sys_io_submit+0x10/0x20
 [<ffffffff81a18d69>] system_call_fastpath+0x16/0x1b

The explanation is in the comment within the code:

We need to do this because the pages shared by the frontend
(xen-blkfront) can be already locked (lock_page, called by
do_read_cache_page); when the userspace backend tries to use them
with direct_IO, mfn_to_pfn returns the pfn of the frontend, so
do_blockdev_direct_IO is going to try to lock the same pages
again resulting in a deadlock.

A simplified call graph looks like this:

pygrub                          QEMU
-----------------------------------------------
do_read_cache_page              io_submit
  |                              |
lock_page                       ext3_direct_IO
                                 |
                                bio_add_page
                                 |
                                lock_page

Internally the xen-blkback uses m2p_add_override to swizzle (temporarily)
a 'struct page' to have a different MFN (so that it can point to another
guest). It also can easily find out whether another pfn corresponding
to the mfn exists in the m2p, and can set the FOREIGN bit
in the p2m, making sure that mfn_to_pfn returns the pfn of the backend.

This allows the backend to perform direct_IO on these pages, but as a
side effect prevents the frontend from using get_user_pages_fast on
them while they are being shared with the backend.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agonfsd4: BUG_ON(!is_spin_locked()) no good on UP kernels
J. Bruce Fields [Tue, 12 Jun 2012 12:28:48 +0000 (08:28 -0400)]
nfsd4: BUG_ON(!is_spin_locked()) no good on UP kernels

Most frequent symptom was a BUG triggering in expire_client, with the
server locking up shortly thereafter.

Introduced by 508dc6e110c6dbdc0bbe84298ccfe22de7538486 "nfsd41:
free_session/free_client must be called under the client_lock".

Cc: stable@kernel.org
Cc: Benny Halevy <bhalevy@tonian.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
11 years agoNFS: hard-code init_net for NFS callback transports
Stanislav Kinsbursky [Fri, 1 Jun 2012 09:55:47 +0000 (13:55 +0400)]
NFS: hard-code init_net for NFS callback transports

In case of destroying mount namespace on child reaper exit, nsproxy is zeroed
to the point already. So, dereferencing of it is invalid.
This patch hard-code "init_net" for all network namespace references for NFS
callback services. This will be fixed with proper NFS callback
containerization.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
11 years agoBtrfs: fix race in tree mod log addition
Jan Schmidt [Mon, 11 Jun 2012 08:52:38 +0000 (10:52 +0200)]
Btrfs: fix race in tree mod log addition

When adding to the tree modification log, we grab two locks at different
stages. We must not drop the outer lock until we're done with section
protected by the inner lock. This moves the unlock call for the outer lock
to the appropriate position.

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
11 years agoBtrfs: add btrfs_next_old_leaf
Jan Schmidt [Mon, 11 Jun 2012 06:29:29 +0000 (08:29 +0200)]
Btrfs: add btrfs_next_old_leaf

To make sense of the tree mod log, the backref walker not only needs
btrfs_search_old_slot, but it also called btrfs_next_leaf, which in turn was
calling btrfs_search_slot. This obviously didn't give the correct result.

This commit adds btrfs_next_old_leaf, a drop-in replacement for
btrfs_next_leaf with a time_seq parameter. If it is zero, it behaves exactly
like btrfs_next_leaf. If it is non-zero, it will use btrfs_search_old_slot
with this time_seq parameter.

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
11 years agoBtrfs: fix return value for __tree_mod_log_oldest_root
Jan Schmidt [Tue, 5 Jun 2012 14:41:24 +0000 (16:41 +0200)]
Btrfs: fix return value for __tree_mod_log_oldest_root

In __tree_mod_log_oldest_root() we must return the found operation even if
it's not a ROOT_REPLACE operation. Otherwise, the caller assumes that there
are no operations to be rewinded and returns immediately.

The code in the caller is modified to improve readability.

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
11 years agoBtrfs: use btrfs_read_lock_root_node in get_old_root
Jan Schmidt [Mon, 4 Jun 2012 14:54:57 +0000 (16:54 +0200)]
Btrfs: use btrfs_read_lock_root_node in get_old_root

get_old_root could race with root node updates because we weren't locking
the node early enough. Use btrfs_read_lock_root_node to grab the root locked
in the very beginning and release the lock as soon as possible (just like
btrfs_search_slot does).

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
11 years agoBtrfs: remove obsolete btrfs_next_leaf call from __resolve_indirect_ref
Jan Schmidt [Thu, 14 Jun 2012 14:10:13 +0000 (16:10 +0200)]
Btrfs: remove obsolete btrfs_next_leaf call from __resolve_indirect_ref

When resolving indirect refs, we used to call btrfs_next_leaf in case we
didn't find an exact match. While we should find exact matches most of the
time, in case we don't, we must continue searching. Treating those matches
differently depending on the level we're searching doesn't make sense.

Even worse, we might end up searching for a key larger than the largest, in
which case there is no next_leaf and subsequent jobs would fail. This commit
drops the bogous lines.

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
11 years agoARM: LPC32xx: Move i2s1 dma enabling to clock.c
Alexandre Pereira da Silva [Wed, 13 Jun 2012 22:38:48 +0000 (19:38 -0300)]
ARM: LPC32xx: Move i2s1 dma enabling to clock.c

Move i2s1 dma init to be done when it's clock is enabled.

Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: Roland Stigge <stigge@antcom.de>
11 years agoARM: LPC32xx: Move uart6 irda disable to serial.c
Alexandre Pereira da Silva [Wed, 13 Jun 2012 22:34:25 +0000 (19:34 -0300)]
ARM: LPC32xx: Move uart6 irda disable to serial.c

Move the irda configuration to serial.c where other special cases are
handled

Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: Roland Stigge <stigge@antcom.de>
11 years agoARM: LPC32xx: Cleanup board init, remove duplicate clock init
Alexandre Pereira da Silva [Wed, 13 Jun 2012 22:28:23 +0000 (19:28 -0300)]
ARM: LPC32xx: Cleanup board init, remove duplicate clock init

Remove SSP0, CLCD and DMA clocks that are already migrated to
the clock framework.

Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: Roland Stigge <stigge@antcom.de>
11 years agoARM: LPC32xx: Remove spi chip definitions
Alexandre Pereira da Silva [Mon, 11 Jun 2012 03:25:15 +0000 (00:25 -0300)]
ARM: LPC32xx: Remove spi chip definitions

Leave chipselect and spi devices binding to the devicetree

Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: Roland Stigge <stigge@antcom.de>
11 years agoARM: LPC32xx: Remove spi chipselect request from board init
Alexandre Pereira da Silva [Tue, 12 Jun 2012 14:34:28 +0000 (11:34 -0300)]
ARM: LPC32xx: Remove spi chipselect request from board init

The lpc32xx spi0 chipselect will be requested directly from the
pl022 driver

Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: Roland Stigge <stigge@antcom.de>
11 years agoARM: LPC32xx: Add dt settings to the at25 node
Alexandre Pereira da Silva [Tue, 12 Jun 2012 13:34:12 +0000 (10:34 -0300)]
ARM: LPC32xx: Add dt settings to the at25 node

Add the reg, cs-gpios and max-frequencies that are needed for spi
device registry in phy3250.
Adds also the pl022 internal transfers details via dt

Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: Roland Stigge <stigge@antcom.de>
11 years agoARM: LPC32xx: Build arch dtbs
Alexandre Pereira da Silva [Tue, 12 Jun 2012 13:23:27 +0000 (10:23 -0300)]
ARM: LPC32xx: Build arch dtbs

Add ea3250.dtb and phy3250.dtb to the list of dtbs to be built

Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: Roland Stigge <stigge@antcom.de>
11 years agoARM: LPC32xx: Fix lpc32xx.dtsi status property: "disable" -> "disabled"
Roland Stigge [Thu, 14 Jun 2012 14:16:18 +0000 (16:16 +0200)]
ARM: LPC32xx: Fix lpc32xx.dtsi status property: "disable" -> "disabled"

This patches fixes some status = "disable" strings to "disabled", the correct
way of disabling nodes in the devicetree.

Signed-off-by: Roland Stigge <stigge@antcom.de>
11 years agoARM: LPC32xx: Remove mach specific ARCH_NR_GPIOS, use default
Roland Stigge [Thu, 14 Jun 2012 14:16:18 +0000 (16:16 +0200)]
ARM: LPC32xx: Remove mach specific ARCH_NR_GPIOS, use default

ARCH_NR_GPIOS was defined statically to include exactly all SoC specific GPIOs.
Now if additional GPIOs need to be added dynamically, e.g. via DT, none are
available. Removing the mach specific setting, leaving ARCH_NR_GPIOS to the
default of 256 (currently in include/asm-generic/gpio.h).

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
11 years agoARM: LPC32xx: High Speed UART configuration via DT
Roland Stigge [Thu, 14 Jun 2012 14:16:18 +0000 (16:16 +0200)]
ARM: LPC32xx: High Speed UART configuration via DT

This patch fixes the DTS files for the High Speed UARTs 1, 2 and 7 of the
LPC32xx SoC, adjusting the compatible strings, adding interrupts and status
configuration. On the PHY3250 reference board, UART2 is enabled.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
11 years agoARM: LPC32xx: DT conversion of Standard UARTs
Roland Stigge [Thu, 14 Jun 2012 14:16:18 +0000 (16:16 +0200)]
ARM: LPC32xx: DT conversion of Standard UARTs

This patch switches from static serial driver initialization to devicetree
configuration. This way, the Standard UARTs of the LPC32xx SoC can be enabled
individually via DT.

E.g., instead of Kconfig configuration, the phy3250.dts activates
UARTs 3 and 5.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Tested-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
11 years agoARM: LPC32xx: DTS adjustment for using pl18x primecell
Roland Stigge [Thu, 14 Jun 2012 14:16:18 +0000 (16:16 +0200)]
ARM: LPC32xx: DTS adjustment for using pl18x primecell

This patch adjusts the dts files to reference the pl18x primecell driver
correctly.

Signed-off-by: Roland Stigge <stigge@antcom.de>
11 years agoARM: LPC32xx: Add MMC controller support
Roland Stigge [Thu, 14 Jun 2012 14:16:17 +0000 (16:16 +0200)]
ARM: LPC32xx: Add MMC controller support

This patch adds support for the MMC controller of the LPC32xx SoC to the
platform initialization via the pl08x primecell driver. Lacking more complete
DT support, done via DT auxdata.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
11 years agoARM: LPC32xx: Defconfig update
Roland Stigge [Thu, 14 Jun 2012 14:16:17 +0000 (16:16 +0200)]
ARM: LPC32xx: Defconfig update

This defconfig update for the LPC32xx SoC platform adds the new drivers in v3.5
and drivers typically used in systems with the LPC32xx chip.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
11 years agoARM: LPC32xx: Clock adjustment for key matrix controller
Roland Stigge [Thu, 14 Jun 2012 14:16:17 +0000 (16:16 +0200)]
ARM: LPC32xx: Clock adjustment for key matrix controller

The clock.c file needs to be changed to match the automatic device name to its
clock.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Rob Herring <rob.herring@calxeda.com>
11 years agoARM: LPC32xx: DTS adjustment for key matrix controller
Roland Stigge [Thu, 14 Jun 2012 14:16:17 +0000 (16:16 +0200)]
ARM: LPC32xx: DTS adjustment for key matrix controller

This patch connects the lpc32xx-key driver to the LPC32xx platform (via
lpc32xx.dtsi), and more specifically to the reference board via its dts file.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
11 years agoARM: LPC32xx: Add dts for EA3250 reference board
Roland Stigge [Thu, 14 Jun 2012 14:16:17 +0000 (16:16 +0200)]
ARM: LPC32xx: Add dts for EA3250 reference board

There is another reference/development board for the LPC32xx SoC (besides the
Phytec 3250): The Embedded Artists LPC3250 board. This patch adds a default dts
file for it.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
11 years agoARM: LPC32xx: Adjust dtsi file for MLC controller configuration
Roland Stigge [Thu, 14 Jun 2012 14:16:17 +0000 (16:16 +0200)]
ARM: LPC32xx: Adjust dtsi file for MLC controller configuration

This patch takes into account that the MTD NAND MLC controller needs more
registers, located actually before the previously allocated memory range,
already starting at 200a8000 instead of 200b0000.

Further, the interrupt for the controller is configured.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Tested-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
11 years agoARM: LPC32xx: Add DMA configuration to platform data
Roland Stigge [Thu, 14 Jun 2012 14:16:17 +0000 (16:16 +0200)]
ARM: LPC32xx: Add DMA configuration to platform data

This patch adds DMA channel configuration to the LPC32xx platform file.  The
configured DMA signalling is generic for LPC32xx SoC and is not board specific.

Signed-off-by: Roland Stigge <stigge@antcom.de>
11 years agoARM: LPC32xx: Remove SLC controller initialization from platform init
Roland Stigge [Thu, 14 Jun 2012 14:16:16 +0000 (16:16 +0200)]
ARM: LPC32xx: Remove SLC controller initialization from platform init

Since we now support two MTD NAND controllers (MLC and SLC) for LPC32xx via DT,
we don't initialize the SLC controller statically anymore, but do it via the
clock setup (see previous patch).

Signed-off-by: Roland Stigge <stigge@antcom.de>
Tested-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
11 years agoARM: LPC32xx: Clock initialization for NAND controllers
Roland Stigge [Thu, 14 Jun 2012 14:16:16 +0000 (16:16 +0200)]
ARM: LPC32xx: Clock initialization for NAND controllers

This patch adds clock initialization for the MLC NAND controller of the LPC32xx
SoC and adjusts it for the SLC controller.

Signed-off-by: Roland Stigge <stigge@antcom.de>
11 years agoARM: LPC32xx: Add NAND flash timing to PHY3250 board dts
Roland Stigge [Thu, 14 Jun 2012 14:16:16 +0000 (16:16 +0200)]
ARM: LPC32xx: Add NAND flash timing to PHY3250 board dts

This patch adds necessary NAND flash timings to the board specific dts file of
the PHY3250 reference board of the LPC32xx SoC.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Tested-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
11 years agoMerge git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Thu, 14 Jun 2012 12:46:59 +0000 (15:46 +0300)]
Merge git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull kvm fix from Marcelo Tosatti:
 "Fix a spurious warning on CPU offline path"

* git://git.kernel.org/pub/scm/virt/kvm/kvm:
  x86: kvmclock: remove check_and_clear_guest_paused warning

11 years agoMerge tag 'pinctrl-fixes-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 14 Jun 2012 12:43:32 +0000 (15:43 +0300)]
Merge tag 'pinctrl-fixes-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pinctrl fixes from Linus Walleij:
 - section markup fixes
 - clk_prepare() fix to conform to the clk API
 - memory leaks
 - incorrect debug messages
 - bad errorpaths
 - typos

* tag 'pinctrl-fixes-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: pinctrl-mxs: set platform driver data to NULL at errpath and at unregister
  pinctrl: pinctrl-mxs: Take care of frees if the kzalloc fails
  pinctrl: pinctrl-imx: fix incorrect debug message of maps
  pinctrl: pinctrl-imx: free if of_get_parent fails to get the parent node
  pinctrl: pinctrl-imx: free allocated pinctrl_map structure only once and use kernel facilities for IMX_PMX_DUMP
  pinctrl: nomadik: fix up typo
  pinctrl: nomadik: add clk_prepare() call
  pinctrl: fix a minor harmless typo
  pinctrl: sirf: mark of_device_id match table as __devinitconst

11 years agoMerge tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Thu, 14 Jun 2012 12:38:48 +0000 (15:38 +0300)]
Merge tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:

 - Fix a regression of USB-audio PCM assignment since 3.4
 - A few VGA-switcheroo-related fixes for proper HDMI audio enablement
 - Fixed the missing initializations of HD-audio verbs, which may have
   resulted in various breakage
 - Some driver-specific ASoC updates
 - A few fixes for the dynamic PCM code
 - The addition of pinctrl support for the i.MX audmux which didn't make
   it into -rc1 due to cross tree dependency issues
 - A few minor fixes in compress API codes

* tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Don't forget to call init verbs added by fixup list
  ALSA: HDA: Pin fixup for Zotac Z68 motherboard
  ALSA: compress_core: cleanup pointers on stop
  ALSA: compress_core: don't wake up on pause
  ALSA: hda - Fix detection of Creative SoundCore3D controllers
  vga_switcheroo: Enable/disable audio clients at the right time
  ALSA: hda - HDMI Audio init all connectors when VGA-switcheroo is off
  vga_switcheroo: Fix error without CONFIG_VGA_SWITCHEROO
  ALSA: hda - Fix uninitialized HDMI controllers with VGA-switcheroo
  vga_switcheroo: Add a helper function to get the client state
  ALSA: usb-audio: Fix substream assignments
  ASoC: tegra: add MODULE_DEVICE_TABLE to tegra30_ahub
  ASoC: wm2000: Always use a 4s timeout for the firmware
  ASoC: dapm: Fix input list to use source widgets
  ASoC: dpcm: Fix dpcm_get_be() to check that DAI is BE
  ASoC: wm8994: Apply volume updates with clocks enabled
  ASoC: wm8994: Ensure all AIFnCLK events are run from the _late variants
  ASoC: imx-audmux: add pinctrl support
  ASoC: dapm: Fix connected widget capture path query.

11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Thu, 14 Jun 2012 12:33:55 +0000 (15:33 +0300)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David S. Miller:

This has the fix for the wireless issues I ran into the other week as
well as:

 1) Fix CAN c_can driver transmit handling resulting in BUG check
    triggers, from AnilKumar Ch.

 2) Fix packet drop monitor sleeping in atomic context, from Eric
    Dumazet.

 3) Fix mv643xx_eth driver build regression, from Andrew Lunn.

 4) Inetpeer freeing needs an RCU grace period in order to avoid races
    during tree invalidation.  From Eric Dumazet.

 5) Fix endianness bugs in xt_HMARK netfilter module, from Hans
    Schillstrom.

 6) Add proper module refcounting to l2tp_eth to avoid crash on module
    unload, from Eric Dumazet.

 7) Fix truncation of neighbour entry dumps due to logic errors in
    neigh_dump_info() and friends, from Eric Dumazet.

 8) The conversion of fib6_age() to dst_neigh_lookup() accidently
    reversed the logic of a flags test, fix from Thomas Graf.

 9) Fix checksum configuration in newer sky2 chips, from Stephen
    Hemminger.

10) Revert BQL support in NIU driver, doesn't work.

11) l2tp_ip_sendmsg() illegally uses a route without a proper reference.
    From Eric Dumazet.

12) be2net driver references an SKB after it's potentially been freed,
    also from Eric Dumazet.

13) Fix RCU stalls in dummy net driver init.  Also from Eric Dumazet.

14) lpc_eth has several bugs in it's transmit engine leading to packet
    leaks and improper queue wakes, from Eric Dumazet.

15) Apply short DMA workaround to more tg3 chips, from Matt Carlson.

16) Add tilegx network driver.

17) Bonding queue mapping for a packet can get corrupted, fix from Eric
    Dumazet.

18) Fix bug in netpoll_send_udp() SKB management that can leave garbage
    in the payload in certain situations.  From Eric Dumazet.

19) bnx2x driver interprets chip RX checksum offload incorrectly in
    encapsulation situations.  Fix from Eric Dumazet.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (75 commits)
  bnx2x: fix checksum validation
  netpoll: fix netpoll_send_udp() bugs
  bonding: Fix corrupted queue_mapping
  bonding:record primary when modify it via sysfs
  tilegx network driver: initial support
  tg3: Apply short DMA frag workaround to 5906
  net: stmmac: Fix clock en-/disable calls
  lpc_eth: fix tx completion
  lpc_eth: add missing ndo_change_mtu()
  dummy: fix rcu_sched self-detected stalls
  net: Reorder initialization in ip_route_output to fix gcc warning
  virtio-net: fix a race on 32bit arches
  r8169: avoid NAPI scheduling delay.
  net: Make linux/tcp.h C++ friendly (trivial)
  netdev: fix drivers/net/phy/ kernel-doc warnings
  net/core: fix kernel-doc warnings
  be2net: fix a race in be_xmit()
  l2tp: fix a race in l2tp_ip_sendmsg()
  mac80211: add back channel change flag
  NFC: Fix possible NULL ptr deref when getting the name of a socket
  ...

11 years agox86: dma-mapping: fix broken allocation when dma_mask has been provided
Marek Szyprowski [Thu, 14 Jun 2012 12:01:30 +0000 (14:01 +0200)]
x86: dma-mapping: fix broken allocation when dma_mask has been provided

Commit 0a2b9a6ea93 ("X86: integrate CMA with DMA-mapping subsystem")
broke memory allocation with dma_mask. This patch fixes possible kernel
ops caused by lack of resetting page variable when jumping to 'again' label.

Reported-by: Konrad Rzeszutek Wilk <konrad@darnok.org>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
11 years agowatchdog: Quiet down the boot messages
Don Zickus [Wed, 13 Jun 2012 13:35:48 +0000 (09:35 -0400)]
watchdog: Quiet down the boot messages

A bunch of bugzillas have complained how noisy the nmi_watchdog
is during boot-up especially with its expected failure cases
(like virt and bios resource contention).

This is my attempt to quiet them down and keep it less confusing
for the end user.  What I did is print the message for cpu0 and
save it for future comparisons.  If future cpus have an
identical message as cpu0, then don't print the redundant info.
However, if a future cpu has a different message, happily print
that loudly.

Before the change, you would see something like:

    ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
    CPU0: Intel(R) Core(TM)2 Quad CPU    Q9550  @ 2.83GHz stepping 0a
    Performance Events: PEBS fmt0+, Core2 events, Intel PMU driver.
    ... version:                2
    ... bit width:              40
    ... generic registers:      2
    ... value mask:             000000ffffffffff
    ... max period:             000000007fffffff
    ... fixed-purpose events:   3
    ... event mask:             0000000700000003
    NMI watchdog enabled, takes one hw-pmu counter.
    Booting Node   0, Processors  #1
    NMI watchdog enabled, takes one hw-pmu counter.
     #2
    NMI watchdog enabled, takes one hw-pmu counter.
     #3 Ok.
    NMI watchdog enabled, takes one hw-pmu counter.
    Brought up 4 CPUs
    Total of 4 processors activated (22607.24 BogoMIPS).

After the change, it is simplified to:

    ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
    CPU0: Intel(R) Core(TM)2 Quad CPU    Q9550  @ 2.83GHz stepping 0a
    Performance Events: PEBS fmt0+, Core2 events, Intel PMU driver.
    ... version:                2
    ... bit width:              40
    ... generic registers:      2
    ... value mask:             000000ffffffffff
    ... max period:             000000007fffffff
    ... fixed-purpose events:   3
    ... event mask:             0000000700000003
    NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.
    Booting Node   0, Processors  #1 #2 #3 Ok.
    Brought up 4 CPUs

V2: little changes based on Joe Perches' feedback
V3: printk cleanup based on Ingo's feedback; checkpatch fix
V4: keep printk as one long line
V5: Ingo fix ups

Reported-and-tested-by: Nathan Zimmer <nzimmer@sgi.com>
Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: nzimmer@sgi.com
Cc: joe@perches.com
Link: http://lkml.kernel.org/r/1339594548-17227-1-git-send-email-dzickus@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
11 years agoFix OMAP EHCI suspend/resume failure (i693)
Anand Gadiyar [Tue, 5 Jun 2012 12:34:27 +0000 (15:34 +0300)]
Fix OMAP EHCI suspend/resume failure (i693)

Its observed with some PHY, the 60Mhz clock gets
cut too soon for OMAP EHCI, leaving OMAP-EHCI in a bad state.

So on starting port suspend, make sure the 60Mhz clock to EHCI
is kept alive using an internal clock, so that EHCi can cleanly
transition its hw state machine on a port suspend.

Its not proven if this is the issue hit on USB3333,
but the symptoms look very similar.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Volodymyr Mieshkov <x0182794@ti.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoUSB: ohci-hub: Mark ohci_finish_controller_resume() as __maybe_unused
Roland Stigge [Mon, 11 Jun 2012 19:38:29 +0000 (21:38 +0200)]
USB: ohci-hub: Mark ohci_finish_controller_resume() as __maybe_unused

ohci_finish_controller_resume() is intended to be used in platform specific
drivers ohci-*.c, included from ohci-hcd.c. Some of them don't actually use
ohci_finish_controller_resume(), so mark it as __maybe_unused.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>