pandora-kernel.git
13 years agoMerge branch 'master' of git://git.infradead.org/users/cbou/linux-cns3xxx into devel...
Russell King [Thu, 22 Jul 2010 15:00:55 +0000 (16:00 +0100)]
Merge branch 'master' of git://git.infradead.org/users/cbou/linux-cns3xxx into devel-stable

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/nico/orion into devel-stable
Russell King [Wed, 21 Jul 2010 08:22:45 +0000 (09:22 +0100)]
Merge git://git./linux/kernel/git/nico/orion into devel-stable

13 years ago[ARM] Kirkwood: add missing machine targets to defconfig
Nicolas Pitre [Sat, 17 Jul 2010 02:51:10 +0000 (22:51 -0400)]
[ARM] Kirkwood: add missing machine targets to defconfig

Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years ago[ARM] Orion: DNS-323 C1 requires phylib
Martin Michlmayr [Fri, 16 Jul 2010 15:31:51 +0000 (16:31 +0100)]
[ARM] Orion: DNS-323 C1 requires phylib

The code to support the DNS-323 rev C1 added a call to
phy_register_fixup_for_uid() and therefore phylib has to
be built in.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years ago[ARM] Kirkwood: update LED support for Network Space v2
Simon Guinot [Tue, 6 Jul 2010 14:08:47 +0000 (16:08 +0200)]
[ARM] Kirkwood: update LED support for Network Space v2

Signed-off-by: Simon Guinot <sguinot@lacie.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years agoleds: add LED driver for Network Space v2 LEDs
Simon Guinot [Tue, 6 Jul 2010 14:08:46 +0000 (16:08 +0200)]
leds: add LED driver for Network Space v2 LEDs

This patch add a LED class driver for the dual-GPIO LEDs found on the
Network Space v2 board (and parents). This include Internet Space v2,
Network Space (Max) v2 and d2 Network v2 boards.

This dual-GPIO LED is wired to a CPLD and can blink in relation with the
SATA activity. The driver expose this capability through a "sata" sysfs
attribute.

Signed-off-by: Simon Guinot <sguinot@lacie.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years ago[ARM] Kirkwood: add LaCie Network Space Max v2 support
Simon Guinot [Mon, 5 Jul 2010 10:31:04 +0000 (12:31 +0200)]
[ARM] Kirkwood: add LaCie Network Space Max v2 support

Signed-off-by: Simon Guinot <sguinot@lacie.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years ago[ARM] Kirkwood: more factorization of the PCIe init code
Nicolas Pitre [Mon, 5 Jul 2010 17:59:56 +0000 (13:59 -0400)]
[ARM] Kirkwood: more factorization of the PCIe init code

Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years ago[ARM] Dove: platform device registration for the sdio interfaces
Saeed Bishara [Thu, 6 May 2010 13:12:06 +0000 (16:12 +0300)]
[ARM] Dove: platform device registration for the sdio interfaces

Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years ago[ARM] Kirkwood: add support for PCIe1
Saeed Bishara [Tue, 8 Jun 2010 11:21:34 +0000 (14:21 +0300)]
[ARM] Kirkwood: add support for PCIe1

This patch extends the kirkwood's PCIe support up to 2 controllers as in the 6282 devices.

Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years ago[ARM] PCI: add platform private data to pci_sys_data
Saeed Bishara [Thu, 3 Jun 2010 11:58:46 +0000 (14:58 +0300)]
[ARM] PCI: add platform private data to pci_sys_data

Add private_data pointer to the pci_sys_data, this pointer can be
used for holding platform specific data for each pci controller.

Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years ago[ARM] Kirkwood: Add support for 88f6282
Saeed Bishara [Tue, 1 Jun 2010 15:09:27 +0000 (18:09 +0300)]
[ARM] Kirkwood: Add support for 88f6282

The 6282 SoC is compatible to 6280 and features faster CPU, DDR3, additional
PCIe interface, and LCD controller. More information can be found here:
http://www.marvell.com/products/processors/embedded/armada_300/armada_310.pdf

Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years ago[ARM] Kirkwood: add support for rev A1 of the 88f6192 and 88f6180 chips.
Saeed Bishara [Tue, 1 Jun 2010 15:09:26 +0000 (18:09 +0300)]
[ARM] Kirkwood: add support for rev A1 of the 88f6192 and 88f6180 chips.

Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years ago[ARM] Kirkwood: configure NAND mpp's for db88f6281
Saeed Bishara [Tue, 8 Jun 2010 11:30:37 +0000 (14:30 +0300)]
[ARM] Kirkwood: configure NAND mpp's for db88f6281

In case the board is configured to boot from spi flash, the mpps
will not be configured to select the NAND I/Os. This patch makes
sure to select the NAND I/O's regardless to the boot device type.

Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years ago[ARM] orion5x: Fix soft-reset for some platforms
Benjamin Herrenschmidt [Mon, 21 Jun 2010 03:22:08 +0000 (13:22 +1000)]
[ARM] orion5x: Fix soft-reset for some platforms

Some platforms, such as the DNS-323 rev C requires the soft reset line
to be toggled on and back off for the reset to work.

Note: The choice of 200ms delay comes from the 2.6.12 based vendor kernel.
It seems to be a -lot- though and I had my device working fine with much
smaller delays but better safe...

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years ago[ARM] orion5x: Base support for DNS-323 rev C1
Benjamin Herrenschmidt [Mon, 21 Jun 2010 03:21:53 +0000 (13:21 +1000)]
[ARM] orion5x: Base support for DNS-323 rev C1

This patch adds the base support for this new HW revision to the existing
dns323-setup.c file. The SoC seems to be the same as rev B1, the GPIOs
are all wired differently though and the fan control isn't i2c based
anymore.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years agonet/phy/marvell: Expose IDs and flags in a .h and add dns323 LEDs setup flag
Benjamin Herrenschmidt [Mon, 21 Jun 2010 03:20:46 +0000 (13:20 +1000)]
net/phy/marvell: Expose IDs and flags in a .h and add dns323 LEDs setup flag

This moves the various known Marvell PHY IDs to include/linux/marvell_phy.h
along with dev_flags definitions for use by the driver.

I then added a flag that changes the PHY init code to setup the LEDs
config to the values needed to operate a dns323 rev C1 NAS.

I moved the existing "resistance" flag to the .h as well, though I've
been unable to find whoever sets this to convert it to use that constant.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years ago[ARM] Marvell OpenRD-Ultimate machine support
Dmytro Milinevskyy [Thu, 10 Jun 2010 19:12:55 +0000 (22:12 +0300)]
[ARM] Marvell OpenRD-Ultimate machine support

This patch adds support for the OpenRD Ultimate machine (could be found
at http://www.arm.linux.org.uk/developer/machines/list.php?id=2884)

Signed-off-by: Dmytro Milinevskyy <milinevskyy@gmail.com>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years ago[ARM] orion/kirkwood: reset PCIe unit on boot
Olaf Rempel [Tue, 8 Jun 2010 20:32:38 +0000 (22:32 +0200)]
[ARM] orion/kirkwood: reset PCIe unit on boot

Patch found in QNAPs vendor source package, with some cleanups
(proper defines, shortened max. timeout from 1s to 200ms).

Without this patch the PCIe SATA controller (Marvell 88sx7042/sata_mv)
in my QNAP TS-419P (Marvell 88f6281/Kirkwood) stops working after a
few minutes.

The symptomes are described in this thread:
http://marc.info/?l=linux-ide&m=124822863706181&w=2

[ Note: this is a workaround in need of a better analysis/solution -- NP ]

Acked-by: Saeed Bishara <saeed@marvell.com>
Tested-by: Bernhard R. Link <brl@pcpool00.mathematik.uni-freiburg.de>
Seconded-by: Martin Michlmayr <tbm@cyrius.com>
I'm_not_very_happy_with_it-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years ago[ARM] Kirkwood: fix HP t5325 after commit 6605742f2a
Nicolas Pitre [Tue, 22 Jun 2010 03:29:28 +0000 (23:29 -0400)]
[ARM] Kirkwood: fix HP t5325 after commit 6605742f2a

Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years ago[ARM] Kirkwood: Add support for HP t5325 Thin Client
Martin Michlmayr [Sun, 13 Jun 2010 19:00:16 +0000 (20:00 +0100)]
[ARM] Kirkwood: Add support for HP t5325 Thin Client

Add support for the HP t5325 Thin Client.  This thin client is based
on a Marvell Kirkwood chip at 1.2 GHz and features 512 MB RAM, 512 MB
SATA-attached flash and an XGI Volari Z11 GPU.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years ago[ARM] Kirkwood: Add MPP44 (board ID) on TS-219
Martin Michlmayr [Sun, 13 Jun 2010 18:37:18 +0000 (19:37 +0100)]
[ARM] Kirkwood: Add MPP44 (board ID) on TS-219

MPP44 can be used to differentiate between one-bay (TS-11x) and
two-bay (TS-21x) devices.

According to an engineer from QNAP, the setting of MPP44 depends
on the firmware rather than hardware.  Presumably, this means
that you could fake the MPP44 value by changing the boot loader.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years ago[ARM] Kirkwood: update MPP definition.
Benjamin Zores [Tue, 8 Jun 2010 08:00:22 +0000 (10:00 +0200)]
[ARM] Kirkwood: update MPP definition.

Add MPP definitions for Marvell Kirkwood 88F6282 revision.
Update some defines to reflect datasheet's MPP names.

Signed-off-by: Benjamin Zores <benjamin.zores@alcatel-lucent.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years ago[ARM] orion5x: Set links to solid on D-Link DNS-323
Martin Michlmayr [Fri, 26 Mar 2010 10:20:00 +0000 (11:20 +0100)]
[ARM] orion5x: Set links to solid on D-Link DNS-323

Among other changes, commit b2a731aa ("D-link DNS-323 revision A1 power
LED") changed the default behaviour of the power LED from solid to
blinking.  This was done to match the original DNS-323 firmware which
blinks during the boot process and sets the LED to solid when booting
has completed.  However, the downside of this behaviour is that it
requires userland code to change the LED, even for those who don't
care about the behaviour of the original firmware.  Therefore, change
it to solid again and let those who care about the original behaviour
change the behaviour from userland.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years ago[ARM] Kirkwood: Fix explanation of MPP45 for QNAP TS41x
Martin Michlmayr [Tue, 25 May 2010 17:20:14 +0000 (18:20 +0100)]
[ARM] Kirkwood: Fix explanation of MPP45 for QNAP TS41x

On the QNAP TS-41x, MPP45 is used to show the setting of jumper JP1.
Fix the documentation to explain what the settings really indicate.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years ago[ARM] Kirkwood: Export GPIO indicating jumper setting of JP1
Martin Michlmayr [Sat, 22 May 2010 01:23:10 +0000 (02:23 +0100)]
[ARM] Kirkwood: Export GPIO indicating jumper setting of JP1

Export GPIO 45 which is used to indicate the setting of the JP1
jumper.  This is useful for userland tools, such as qcontrol, to
see whether the LCD or a serial console is connected.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years ago[ARM] qnap tsx1x: fix section mismatch
Arnaud Patard [Wed, 12 May 2010 15:37:08 +0000 (17:37 +0200)]
[ARM] qnap tsx1x: fix section mismatch

Fix the following warning :
WARNING: vmlinux.o(.text+0x95a0): Section mismatch in reference from the
function qnap_tsx1x_register_flash() to the (unknown reference) .init.data:(unknown)
The function qnap_tsx1x_register_flash() references
the (unknown reference) __initdata (unknown).
This is often because qnap_tsx1x_register_flash lacks a __initdata
annotation or the annotation of (unknown) is wrong.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
13 years agoMerge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 16 Jul 2010 18:26:33 +0000 (11:26 -0700)]
Merge branch 'perf-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  tracing: Add alignment to syscall metadata declarations
  perf: Sync callchains with period based hits
  perf: Resurrect flat callchains
  perf: Version String fix, for fallback if not from git
  perf: Version String fix, using kernel version

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes
Linus Torvalds [Fri, 16 Jul 2010 15:23:10 +0000 (08:23 -0700)]
Merge git://git./linux/kernel/git/steve/gfs2-2.6-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes:
  GFS2: rename causes kernel Oops
  GFS2: BUG in gfs2_adjust_quota
  GFS2: Fix kernel NULL pointer dereference by dlm_astd
  GFS2: recovery stuck on transaction lock
  GFS2: O_TRUNC not working on stuffed files across cluster

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Fri, 16 Jul 2010 15:22:40 +0000 (08:22 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: w90p910_ts - fix call to setup_timer()
  Input: synaptics - fix wrong dimensions check
  Input: i8042 - mark stubs in i8042.h "static inline"

13 years agoInput: w90p910_ts - fix call to setup_timer()
Wan ZongShun [Fri, 16 Jul 2010 06:28:57 +0000 (23:28 -0700)]
Input: w90p910_ts - fix call to setup_timer()

No need to take address, w90p910_ts is already a pointer.

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Fri, 16 Jul 2010 03:25:44 +0000 (20:25 -0700)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: skcipher - avoid NULL dereference

13 years agoGFS2: rename causes kernel Oops
Bob Peterson [Wed, 14 Jul 2010 22:12:26 +0000 (18:12 -0400)]
GFS2: rename causes kernel Oops

This patch fixes a kernel Oops in the GFS2 rename code.

The problem was in the way the gfs2 directory code was trying
to re-use sentinel directory entries.

In the failing case, gfs2's rename function was renaming a
file to another name that had the same non-trivial length.
The file being renamed happened to be the first directory
entry on the leaf block.

First, the rename code (gfs2_rename in ops_inode.c) found the
original directory entry and decided it could do its job by
simply replacing the directory entry with another.  Therefore
it determined correctly that no block allocations were needed.

Next, the rename code deleted the old directory entry prior to
replacing it with the new name.  Therefore, the soon-to-be
replaced directory entry was temporarily made into a directory
entry "sentinel" or a place holder at the start of a leaf block.

Lastly, it went to re-add the replacement directory entry in
that leaf block.  However, when gfs2_dirent_find_space was
looking for space in the leaf block, it used the wrong value
for the sentinel.  That threw off its calculations so later
it decides it can't really re-use the sentinel and therefore
must allocate a new leaf block.  But because it previously decided
to re-use the directory entry, it didn't waste the time to
grab a new block allocation for the inode.  Therefore, the
inode's i_alloc pointer was still NULL and it crashes trying to
reference it.

In the case of sentinel directory entries, the entire dirent is
reused, not just the "free space" portion of it, and therefore
the function gfs2_dirent_find_space should use the value 0
rather than GFS2_DIRENT_SIZE(0) for the actual dirent size.

Fixing this calculation enables the reproducer programs to work
properly.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
13 years agoGFS2: BUG in gfs2_adjust_quota
Abhijith Das [Sun, 4 Jul 2010 05:33:24 +0000 (01:33 -0400)]
GFS2: BUG in gfs2_adjust_quota

HighMem pages on i686 do not get mapped to the buffer_heads and this was
causing a NULL pointer dereference when we were trying to memset page buffers
to zero.
We now use zero_user() that kmaps the page and directly manipulates page data.
This patch also fixes a boundary condition that was incorrect.

Signed-off-by: Abhi Das <adas@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
13 years agoGFS2: Fix kernel NULL pointer dereference by dlm_astd
Bob Peterson [Thu, 17 Jun 2010 20:45:37 +0000 (16:45 -0400)]
GFS2: Fix kernel NULL pointer dereference by dlm_astd

This patch fixes a problem in an error path when looking
up dinodes.  There are two sister-functions, gfs2_inode_lookup
and gfs2_process_unlinked_inode.  Both functions acquire and
hold the i_iopen glock for the dinode being looked up. The last
thing they try to do is hold the i_gl glock for the dinode.
If that glock fails for some reason, the error path was
incorrectly calling gfs2_glock_put for the i_iopen glock twice.
This resulted in the glock being prematurely freed.  The
"minimum hold time" usually kept the glock in memory, but the
lock interface to dlm (aka lock_dlm) freed its memory for the
glock.  In some circumstances, it would cause dlm's dlm_astd daemon
to try to call the bast function for the freed lock_dlm memory,
which resulted in a NULL pointer dereference.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
13 years agoGFS2: recovery stuck on transaction lock
Bob Peterson [Wed, 23 Jun 2010 15:44:47 +0000 (11:44 -0400)]
GFS2: recovery stuck on transaction lock

This patch fixes bugzilla bug #590878: GFS2: recovery stuck on
transaction lock.  We set the frozen flag on the glock when we receive
a completion that cannot be delivered due to blocked locks. At that
point we check to see whether the first waiting holder has the noexp
flag set. If the noexp lock is queued later, then we need to unfreeze
the glock at that point in time, namely, in the glock work function.

This patch was originally written by Steve Whitehouse, but since
he's on holiday, I'm submitting it.  It's been well tested with a
complex recovery test called revolver.

Signed-off-by: Steve Whitehouse <swhiteho@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
13 years agoGFS2: O_TRUNC not working on stuffed files across cluster
Bob Peterson [Thu, 24 Jun 2010 23:15:09 +0000 (19:15 -0400)]
GFS2: O_TRUNC not working on stuffed files across cluster

This patch replaces a statement that got dropped out by accident.
Without the patch, truncates on stuffed (very small) files cause
those files to have an unpredictable size.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
13 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Thu, 15 Jul 2010 00:28:13 +0000 (17:28 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  ARM: 6226/1: fix kprobe bug in ldr instruction emulation
  ARM: Update mach-types
  ARM: lockdep: fix unannotated irqs-on
  ARM: 6184/2: ux500: use neutral PRCMU base
  ARM: 6212/1: atomic ops: add memory constraints to inline asm
  ARM: 6211/1: atomic ops: fix register constraints for atomic64_add_unless
  ARM: 6210/1: Do not rely on reset defaults of L2X0_AUX_CTRL

13 years agoMerge branch 'lmb-to-memblock' of git://git.kernel.org/pub/scm/linux/kernel/git/benh...
Linus Torvalds [Thu, 15 Jul 2010 00:27:44 +0000 (17:27 -0700)]
Merge branch 'lmb-to-memblock' of git://git./linux/kernel/git/benh/powerpc

* 'lmb-to-memblock' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  lmb: rename to memblock

13 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Thu, 15 Jul 2010 00:27:29 +0000 (17:27 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/fsl-booke: Fix address issue when using relocatable kernels
  powerpc/cpm1: Mark micropatch code/data static and __init
  powerpc/cpm1: Fix build with various CONFIG_*_UCODE_PATCH combinations
  powerpc/cpm: Reintroduce global spi_pram struct (fixes build issue)

13 years agoARM: 6226/1: fix kprobe bug in ldr instruction emulation
Nicolas Pitre [Wed, 14 Jul 2010 04:21:22 +0000 (05:21 +0100)]
ARM: 6226/1: fix kprobe bug in ldr instruction emulation

From: Bin Yang <bin.yang@marvell.com>

Cc: stable@kernel.org
Signed-off-by: Bin Yang <bin.yang@marvell.com>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoInput: synaptics - fix wrong dimensions check
Takashi Iwai [Wed, 14 Jul 2010 16:32:46 +0000 (09:32 -0700)]
Input: synaptics - fix wrong dimensions check

The commit 83ba9ea8a04b72dfee2515428c15e7414ba4fc61 ommitted the return
line for the old synaptics model accidentally.  This resulted in a wrong
check, namely, the dimensions are checked for the old devices that don't
support the query properly.

This patch adds the return line back.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agolmb: rename to memblock
Yinghai Lu [Mon, 12 Jul 2010 04:36:09 +0000 (14:36 +1000)]
lmb: rename to memblock

via following scripts

      FILES=$(find * -type f | grep -vE 'oprofile|[^K]config')

      sed -i \
        -e 's/lmb/memblock/g' \
        -e 's/LMB/MEMBLOCK/g' \
        $FILES

      for N in $(find . -name lmb.[ch]); do
        M=$(echo $N | sed 's/lmb/memblock/g')
        mv $N $M
      done

and remove some wrong change like lmbench and dlmb etc.

also move memblock.c from lib/ to mm/

Suggested-by: Ingo Molnar <mingo@elte.hu>
Acked-by: "H. Peter Anvin" <hpa@zytor.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 14 Jul 2010 00:31:11 +0000 (17:31 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  input: i8042 - add runtime check in x86's i8042_platform_init
  Revert "Input: fixup X86_MRST selects"
  Revert "Input: do not force selecting i8042 on Moorestown"
  x86, mrst: Add i8042_detect API for Moorestwon platform
  x86: Add i8042 pre-detection hook to x86_platform_ops
  x86, platform: Export x86_platform to modules

13 years agoMerge branch 'kvm-updates/2.6.35' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Wed, 14 Jul 2010 00:30:49 +0000 (17:30 -0700)]
Merge branch 'kvm-updates/2.6.35' of git://git./virt/kvm/kvm

* 'kvm-updates/2.6.35' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: MMU: flush remote tlbs when overwriting spte with different pfn
  KVM: VMX: Fix host MSR_KERNEL_GS_BASE corruption

13 years agoLinux 2.6.35-rc5 v2.6.35-rc5
Linus Torvalds [Mon, 12 Jul 2010 21:55:33 +0000 (14:55 -0700)]
Linux 2.6.35-rc5

13 years agoMerge branch 'arm/defconfig/reduced-v2.6.35-rc1' of git://git.pengutronix.de/git...
Linus Torvalds [Mon, 12 Jul 2010 21:47:01 +0000 (14:47 -0700)]
Merge branch 'arm/defconfig/reduced-v2.6.35-rc1' of git://git.pengutronix.de/git/ukl/linux-2.6

* 'arm/defconfig/reduced-v2.6.35-rc1' of git://git.pengutronix.de/git/ukl/linux-2.6:
  ARM: reduce defconfigs

This is a big change, but results in no loss of information, despite us
losing almost 200k lines:

 177 files changed, 652 insertions(+), 194157 deletions(-)

and Grant Likely thinks powerpc can also use the same reduction
technique.

The python script that did the reduction looks like this:

    #! /usr/bin/env python
    # vim: set fileencoding=utf-8 :
    # Copyright (C) 2010 by Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

    import re
    import subprocess
    import os
    import sys

    # This prevents including a timestamp in the .config which makes comparing a
    # bit easier.
    os.environ['KCONFIG_NOTIMESTAMP'] = 'Yes, please'

    # XXX: get these using getopt
    kernel_tree = '' # os.path.join(os.environ['HOME'], 'gsrc', 'linux-2.6')
    arch = 'arm'
    target = sys.argv[1]
    defconfig_src = os.path.join(kernel_tree, 'arch/%s/configs/%s' % (arch, target))

    subprocess.check_call(['make', '-s', 'ARCH=%s' % arch, target])
    origconfig = list(open('.config'))
    config = list(origconfig)
    config_size = os.stat('.config').st_size

    i = 0

    while i < len(config):
        print 'test for %r' % config[i]
        defconfig = open(defconfig_src, 'w')
        defconfig.writelines(config[:i])
        defconfig.writelines(config[i + 1:])
        defconfig.close()
        subprocess.check_call(['make', '-s', 'ARCH=%s' % arch, target])
        if os.stat('.config').st_size == config_size and list(open('.config')) == origconfig:
            del config[i]
        else:
            i += 1

    defconfig = open(defconfig_src, 'w')
    defconfig.writelines(config)
    defconfig.close()

which is pretty self-explanatory.

Acked-by: Nicolas Pitre <nico@fluxnic.net>
Acked-by: Russell King <linux@arm.linux.org.uk>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Mon, 12 Jul 2010 21:44:43 +0000 (14:44 -0700)]
Merge branch 'fix/hda' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Restore cleared pin controls on resume

13 years agoMerge branch 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mcheha...
Linus Torvalds [Mon, 12 Jul 2010 21:44:19 +0000 (14:44 -0700)]
Merge branch 'v4l_for_2.6.35' of git://git./linux/kernel/git/mchehab/linux-2.6

* 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  V4L/DVB: uvc: Fix multiple symbols definitions with UVC gadget and host drivers
  V4L/DVB: v4l: mem2mem_testdev: fix g_fmt NULL pointer dereference
  V4L/DVB: uvcvideo: Power line frequency control doesn't support GET_MIN/MAX/RES
  V4L/DVB: ivtv: Add delay to ensure the decoder always restarts with a blank screen
  V4L/DVB: Documentation: Add the Philips FQ1236 MK5 to video4linux/CARDLIST.tuner
  V4L/DVB: tveeprom: Add an entry for tuner code 168: a TCL M30WTP-4N-E tuner
  V4L/DVB: tuner: Add a definition for the Philips FQ1236 MK5 NTSC tuner
  V4L/DVB: OMAP_VOUT: fix: Module params were not working through bootargs
  V4L/DVB: OMAP_VOUT: fix: Replaced dma-sg with dma-contig
  V4L/DVB: OMAP_VOUT:Build FIX: Rebased against latest DSS2 changes

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Mon, 12 Jul 2010 21:42:21 +0000 (14:42 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: Send Report ID when numbered reports are sent over the control endpoint.
  HID: Enable HID_QUIRK_MULTI_INPUT for Retro Adaptor
  HID: add support for CH Eclipse yoke
  HID: eliminate a double lock in debug code
  HID: ntrig: add support for new firwmare versions
  HID: check for HID_QUIRK_IGNORE during probing
  HID: roccat: fix modules interdependencies

13 years agoMAINTAINERS: fix EDAC-I7CORE file patterns
Joe Perches [Mon, 12 Jul 2010 20:45:49 +0000 (17:45 -0300)]
MAINTAINERS: fix EDAC-I7CORE file patterns

File patterns are one per line.
Fixed include file location.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoARM: Update mach-types
Russell King [Mon, 12 Jul 2010 20:10:16 +0000 (21:10 +0100)]
ARM: Update mach-types

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoKVM: MMU: flush remote tlbs when overwriting spte with different pfn
Xiao Guangrong [Wed, 30 Jun 2010 08:04:06 +0000 (16:04 +0800)]
KVM: MMU: flush remote tlbs when overwriting spte with different pfn

After remove a rmap, we should flush all vcpu's tlb

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
13 years agoHID: Send Report ID when numbered reports are sent over the control endpoint.
Alan Ott [Wed, 30 Jun 2010 13:50:36 +0000 (09:50 -0400)]
HID: Send Report ID when numbered reports are sent over the control endpoint.

The Report ID wasn't sent as part of the payload for reports which were sent
over the control endpoint. This is required by section 8.1 of the HID spec.

Signed-off-by: Alan Ott <alan@signal11.us>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
13 years agoV4L/DVB: uvc: Fix multiple symbols definitions with UVC gadget and host drivers
Laurent Pinchart [Sat, 10 Jul 2010 19:13:05 +0000 (16:13 -0300)]
V4L/DVB: uvc: Fix multiple symbols definitions with UVC gadget and host drivers

The UVC gadget driver borrowed code from the UVC host driver without
changing the symbol names. This results in a namespace clash with
multiple definitions of several symbols when compiling both drivers in
the kernel.

Make all generic UVC functions and variables static in the UVC gadget
driver, as the symbols are not referenced outside of the gadget driver.
Rename the uvc_trace_param global variable to uvc_gadget_trace_param.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelv...
Linus Torvalds [Sun, 11 Jul 2010 20:35:34 +0000 (13:35 -0700)]
Merge branch 'hwmon-for-linus' of git://git./linux/kernel/git/jdelvare/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: Fix autoloading of fschmd on recent Fujitsu machines
  hwmon: (coretemp) Properly label the sensors
  hwmon: (coretemp) Skip duplicate CPU entries
  hwmon: (it87) Fix in7 on IT8720F
  hwmon: (k8temp) Fix temperature reporting for ASB1 processor revisions

13 years agoMerge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvar...
Linus Torvalds [Sun, 11 Jul 2010 20:32:55 +0000 (13:32 -0700)]
Merge branch 'i2c-for-linus' of git://git./linux/kernel/git/jdelvare/staging

* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  i2c/mips: Fix error return codes from Sibyte i2c bus driver
  i2c: Fix probability check

13 years agoHID: Enable HID_QUIRK_MULTI_INPUT for Retro Adaptor
Peter Edwards [Sun, 11 Jul 2010 16:45:50 +0000 (17:45 +0100)]
HID: Enable HID_QUIRK_MULTI_INPUT for Retro Adaptor

Patch for linux-2.6.35-rc4 mainline kernel to enable Paul Qureshi's
Retro Adapter [http://keio.dk/retroadapter.html], an open source USB
device which allows controllers and joysticks from classic computers
and consoles to work on modern PCs, to appear as two separate devices
under Linux.
Signed-off-by: Peter Edwards <samwise@bagshot-row.org>
Acked-by: Paul Qureshi <retro@world3.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
13 years agoHID: add support for CH Eclipse yoke
Jonathan Rockway [Sat, 3 Jul 2010 07:59:01 +0000 (02:59 -0500)]
HID: add support for CH Eclipse yoke

This USB flight yoke needs the NOGET quirk, like most of CH's other
products. This patch adds that.

Signed-off-by: Jonathan Rockway <jon@jrock.us>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
13 years agopowerpc/fsl-booke: Fix address issue when using relocatable kernels
Matthew McClintock [Tue, 29 Jun 2010 19:42:07 +0000 (14:42 -0500)]
powerpc/fsl-booke: Fix address issue when using relocatable kernels

When booting a relocatable kernel it needs to jump to the correct
start address, which for BookE parts is usually unchanged
regardless of the physical memory offset.

Recent changes cause problems with how we calculate the start
address, it was always adding the RMO into the start address
which is incorrect. This patch only adds in the RMO offset
if we are in the kexec code path, as it needs the RMO to work
correctly.

Instead of adding the RMO offset in in the common code path, we
can just set r6 to the RMO offset in the kexec code path instead
of to zero, and finally perform the masking in the common code
path

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/cpm1: Mark micropatch code/data static and __init
Anton Vorontsov [Thu, 8 Jul 2010 17:16:16 +0000 (21:16 +0400)]
powerpc/cpm1: Mark micropatch code/data static and __init

This saves runtime memory and fixes lots of sparse warnings like this:

    CHECK   arch/powerpc/sysdev/micropatch.c
  arch/powerpc/sysdev/micropatch.c:27:6: warning: symbol 'patch_2000'
  was not declared. Should it be static?
  arch/powerpc/sysdev/micropatch.c:146:6: warning: symbol 'patch_2f00'
  was not declared. Should it be static?
  ...

Signed-off-by: Anton Vorontsov <avorontsov@mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/cpm1: Fix build with various CONFIG_*_UCODE_PATCH combinations
Anton Vorontsov [Thu, 8 Jul 2010 17:16:14 +0000 (21:16 +0400)]
powerpc/cpm1: Fix build with various CONFIG_*_UCODE_PATCH combinations

Warnings are treated as errors for arch/powerpc code, so build fails
with CONFIG_I2C_SPI_UCODE_PATCH=y:

    CC      arch/powerpc/sysdev/micropatch.o
  cc1: warnings being treated as errors
  arch/powerpc/sysdev/micropatch.c: In function 'cpm_load_patch':
  arch/powerpc/sysdev/micropatch.c:630: warning: unused variable 'smp'
  make[1]: *** [arch/powerpc/sysdev/micropatch.o] Error 1

And with CONFIG_USB_SOF_UCODE_PATCH=y:

  CC      arch/powerpc/sysdev/micropatch.o
  cc1: warnings being treated as errors
  arch/powerpc/sysdev/micropatch.c: In function 'cpm_load_patch':
  arch/powerpc/sysdev/micropatch.c:629: warning: unused variable 'spp'
  arch/powerpc/sysdev/micropatch.c:628: warning: unused variable 'iip'
  make[1]: *** [arch/powerpc/sysdev/micropatch.o] Error 1

This patch fixes these issues by introducing proper #ifdefs.

Cc: <stable@kernel.org> [ .33, .34 ]
Signed-off-by: Anton Vorontsov <avorontsov@mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/cpm: Reintroduce global spi_pram struct (fixes build issue)
Anton Vorontsov [Thu, 8 Jul 2010 17:16:10 +0000 (21:16 +0400)]
powerpc/cpm: Reintroduce global spi_pram struct (fixes build issue)

spi_t was removed in commit 644b2a680ccc51a9ec4d6beb12e9d47d2dee98e2
("powerpc/cpm: Remove SPI defines and spi structs"), the commit assumed
that spi_t isn't used anywhere outside of the spi_mpc8xxx driver. But
it appears that the struct is needed for micropatch code. So, let's
reintroduce the struct.

Fixes the following build issue:

    CC      arch/powerpc/sysdev/micropatch.o
  micropatch.c: In function 'cpm_load_patch':
  micropatch.c:629: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
  micropatch.c:629: error: 'spp' undeclared (first use in this function)
  micropatch.c:629: error: (Each undeclared identifier is reported only once
  micropatch.c:629: error: for each function it appears in.)

Reported-by: LEROY Christophe <christophe.leroy@c-s.fr>
Reported-by: Tony Breeds <tony@bakeyournoodle.com>
Cc: <stable@kernel.org> [ .33, .34 ]
Signed-off-by: Anton Vorontsov <avorontsov@mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agoARM: lockdep: fix unannotated irqs-on
Russell King [Sat, 10 Jul 2010 09:10:18 +0000 (10:10 +0100)]
ARM: lockdep: fix unannotated irqs-on

CPU: Testing write buffer coherency: ok
------------[ cut here ]------------
WARNING: at kernel/lockdep.c:3145 check_flags+0xcc/0x1dc()
Modules linked in:
[<c0035120>] (unwind_backtrace+0x0/0xf8) from [<c0355374>] (dump_stack+0x20/0x24)
[<c0355374>] (dump_stack+0x20/0x24) from [<c0060c04>] (warn_slowpath_common+0x58/0x70)
[<c0060c04>] (warn_slowpath_common+0x58/0x70) from [<c0060c3c>] (warn_slowpath_null+0x20/0x24)
[<c0060c3c>] (warn_slowpath_null+0x20/0x24) from [<c008f224>] (check_flags+0xcc/0x1dc)
[<c008f224>] (check_flags+0xcc/0x1dc) from [<c00945dc>] (lock_acquire+0x50/0x140)
[<c00945dc>] (lock_acquire+0x50/0x140) from [<c0358434>] (_raw_spin_lock+0x50/0x88)
[<c0358434>] (_raw_spin_lock+0x50/0x88) from [<c00fd114>] (set_task_comm+0x2c/0x60)
[<c00fd114>] (set_task_comm+0x2c/0x60) from [<c007e184>] (kthreadd+0x30/0x108)
[<c007e184>] (kthreadd+0x30/0x108) from [<c0030104>] (kernel_thread_exit+0x0/0x8)
---[ end trace 1b75b31a2719ed1c ]---
possible reason: unannotated irqs-on.
irq event stamp: 3
hardirqs last  enabled at (2): [<c0059bb0>] finish_task_switch+0x48/0xb0
hardirqs last disabled at (3): [<c002f0b0>] ret_slow_syscall+0xc/0x1c
softirqs last  enabled at (0): [<c005f3e0>] copy_process+0x394/0xe5c
softirqs last disabled at (0): [<(null)>] (null)

Fix this by ensuring that the lockdep interrupt state is manipulated in
the appropriate places.  We essentially treat userspace as an entirely
separate environment which isn't relevant to lockdep (lockdep doesn't
monitor userspace.)  We don't tell lockdep that IRQs will be enabled
in that environment.

Instead, when creating kernel threads (which is a rare event compared
to entering/leaving userspace) we have to update the lockdep state.  Do
this by starting threads with IRQs disabled, and in the kthread helper,
tell lockdep that IRQs are enabled, and enable them.

This provides lockdep with a consistent view of the current IRQ state
in kernel space.

This also revert portions of 0d928b0b616d1c5c5fe76019a87cba171ca91633
which didn't fix the problem.

Tested-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoi2c/mips: Fix error return codes from Sibyte i2c bus driver
Guenter Roeck [Sat, 10 Jul 2010 07:42:47 +0000 (09:42 +0200)]
i2c/mips: Fix error return codes from Sibyte i2c bus driver

Sibyte i2c bus driver returns non-descriptive error values.
Update to return error values as defined in Documentation/i2c/fault-codes.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoi2c: Fix probability check
Jean Delvare [Sat, 10 Jul 2010 07:42:46 +0000 (09:42 +0200)]
i2c: Fix probability check

The new unified probing function differs from the original code, and
the preliminary test whether probing is possible must be updated
accordingly.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agotracing: Add alignment to syscall metadata declarations
Steven Rostedt [Fri, 9 Jul 2010 19:41:44 +0000 (15:41 -0400)]
tracing: Add alignment to syscall metadata declarations

For some reason if we declare a static variable and then assign it
later, and the assignment contains a __attribute__((__aligned__(#))),
some versions of gcc will ignore it.

This caused the syscall meta data to not be compact in its section
and caused a kernel oops when the section was being read.

The fix for these versions of gcc seems to be to add the aligned
attribute to the declaration as well.

This fixes the BZ regression:

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

Reported-by: Zeev Tarantov <zeev.tarantov@gmail.com>
Tested-by: Zeev Tarantov <zeev.tarantov@gmail.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <AANLkTinkKVmB0fpVeqUkMeqe3ZYeXJdI8xDuzJEOjYwh@mail.gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
13 years agohwmon: Fix autoloading of fschmd on recent Fujitsu machines
Jean Delvare [Fri, 9 Jul 2010 14:22:51 +0000 (16:22 +0200)]
hwmon: Fix autoloading of fschmd on recent Fujitsu machines

Fujitsu slightly changed the DMI strings in their recent machines,
(for example the D2778) and this breaks the automatic loading of the
needed fschmd driver. Being more tolerant on string comparison fixes
the issue.

This closes bug #15634:
https://bugzilla.kernel.org/show_bug.cgi?id=15634

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Sergey Spiridonov <sena@hurd.homeunix.org>
Cc: Hans de Goede <hdegoede@redhat.com>
13 years agohwmon: (coretemp) Properly label the sensors
Jean Delvare [Fri, 9 Jul 2010 14:22:51 +0000 (16:22 +0200)]
hwmon: (coretemp) Properly label the sensors

Don't assume that CPU entry number and core ID always match. It
worked in the simple cases (single CPU, no HT) but fails on
multi-CPU systems.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Huaxu Wan <huaxu.wan@intel.com>
Cc: stable@kernel.org
13 years agohwmon: (coretemp) Skip duplicate CPU entries
Jean Delvare [Fri, 9 Jul 2010 14:22:49 +0000 (16:22 +0200)]
hwmon: (coretemp) Skip duplicate CPU entries

On hyper-threaded CPUs, each core appears twice in the CPU list. Skip
the second entry to avoid duplicate sensors.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Huaxu Wan <huaxu.wan@intel.com>
Cc: stable@kernel.org
13 years agohwmon: (it87) Fix in7 on IT8720F
Jean Delvare [Fri, 9 Jul 2010 14:22:48 +0000 (16:22 +0200)]
hwmon: (it87) Fix in7 on IT8720F

The IT8720F has no VIN7 pin, so VCCH should always be routed
internally to VIN7 with an internal divider. Curiously, there still
is a configuration bit to control this, which means it can be set
incorrectly. And even more curiously, many boards out there are
improperly configured, even though the IT8720F datasheet claims that
the internal routing of VCCH to VIN7 is the default setting. So we
force the internal routing in this case.

It turns out that all boards with the wrong setting are from Gigabyte,
so I suspect a BIOS bug. But it's easy enough to workaround in the
driver, so let's do it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Jean-Marc Spaggiari <jean-marc@spaggiari.org>
Cc: stable@kernel.org
13 years agohwmon: (k8temp) Fix temperature reporting for ASB1 processor revisions
Andreas Herrmann [Fri, 9 Jul 2010 14:22:47 +0000 (16:22 +0200)]
hwmon: (k8temp) Fix temperature reporting for ASB1 processor revisions

Reported temperature for ASB1 CPUs is too high.
Add ASB1 CPU revisions (these are also non-desktop variants) to the
list of CPUs for which the temperature fixup is not required.

Example: (from LENOVO ThinkPad Edge 13, 01972NG, system was idle)

  Current kernel reports

  $ sensors
  k8temp-pci-00c3
  Adapter: PCI adapter
  Core0 Temp:  +74.0 C
  Core0 Temp:  +70.0 C
  Core1 Temp:  +69.0 C
  Core1 Temp:  +70.0 C

  With this patch I have

  $ sensors
  k8temp-pci-00c3
  Adapter: PCI adapter
  Core0 Temp:  +54.0 C
  Core0 Temp:  +51.0 C
  Core1 Temp:  +48.0 C
  Core1 Temp:  +49.0 C

Cc: stable@kernel.org [.32.x .33.x, .34.x]
Cc: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoARM: 6184/2: ux500: use neutral PRCMU base
Linus Walleij [Wed, 23 Jun 2010 06:59:48 +0000 (07:59 +0100)]
ARM: 6184/2: ux500: use neutral PRCMU base

The MTU wallclock timing fix-up patch was hardwired to the DB8500
causing a regression. This makes it work on the DB5500 as well.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6212/1: atomic ops: add memory constraints to inline asm
Will Deacon [Thu, 8 Jul 2010 09:59:16 +0000 (10:59 +0100)]
ARM: 6212/1: atomic ops: add memory constraints to inline asm

Currently, the 32-bit and 64-bit atomic operations on ARM do not
include memory constraints in the inline assembly blocks. In the
case of barrier-less operations [for example, atomic_add], this
means that the compiler may constant fold values which have actually
been modified by a call to an atomic operation.

This issue can be observed in the atomic64_test routine in
<kernel root>/lib/atomic64_test.c:

00000000 <test_atomic64>:
   0: e1a0c00d  mov ip, sp
   4: e92dd830  push {r4, r5, fp, ip, lr, pc}
   8: e24cb004  sub fp, ip, #4
   c: e24dd008  sub sp, sp, #8
  10: e24b3014  sub r3, fp, #20
  14: e30d000d  movw r0, #53261 ; 0xd00d
  18: e3011337  movw r1, #4919 ; 0x1337
  1c: e34c0001  movt r0, #49153 ; 0xc001
  20: e34a1aa3  movt r1, #43683 ; 0xaaa3
  24: e16300f8  strd r0, [r3, #-8]!
  28: e30c0afe  movw r0, #51966 ; 0xcafe
  2c: e30b1eef  movw r1, #48879 ; 0xbeef
  30: e34d0eaf  movt r0, #57007 ; 0xdeaf
  34: e34d1ead  movt r1, #57005 ; 0xdead
  38: e1b34f9f  ldrexd r4, [r3]
  3c: e1a34f90  strexd r4, r0, [r3]
  40: e3340000  teq r4, #0
  44: 1afffffb  bne 38 <test_atomic64+0x38>
  48: e59f0004  ldr r0, [pc, #4] ; 54 <test_atomic64+0x54>
  4c: e3a0101e  mov r1, #30
  50: ebfffffe  bl 0 <__bug>
  54: 00000000  .word 0x00000000

The atomic64_set (0x38-0x44) writes to the atomic64_t, but the
compiler doesn't see this, assumes the test condition is always
false and generates an unconditional branch to __bug. The rest of the
test is optimised away.

This patch adds suitable memory constraints to the atomic operations on ARM
to ensure that the compiler is informed of the correct data hazards. We have
to use the "Qo" constraints to avoid hitting the GCC anomaly described at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44492 , where the compiler
makes assumptions about the writeback in the addressing mode used by the
inline assembly. These constraints forbid the use of auto{inc,dec} addressing
modes, so it doesn't matter if we don't use the operand exactly once.

Cc: stable@kernel.org
Reviewed-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6211/1: atomic ops: fix register constraints for atomic64_add_unless
Will Deacon [Thu, 8 Jul 2010 09:58:06 +0000 (10:58 +0100)]
ARM: 6211/1: atomic ops: fix register constraints for atomic64_add_unless

The atomic64_add_unless function compares an atomic variable with
a given value and, if they are not equal, adds another given value
to the atomic variable. The function returns zero if the addition
did not occur and non-zero otherwise.

On ARM, the return value is initialised to 1 in C code. Inline assembly
code then performs the atomic64_add_unless operation, setting the
return value to 0 iff the addition does not occur. This means that
when the addition *does* occur, the value of ret must be preserved
across the inline assembly and therefore requires a "+r" constraint
rather than the current one of "=&r".

Thanks to Nicolas Pitre for helping to spot this.

Cc: stable@kernel.org
Reviewed-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6210/1: Do not rely on reset defaults of L2X0_AUX_CTRL
Sascha Hauer [Thu, 8 Jul 2010 07:36:21 +0000 (08:36 +0100)]
ARM: 6210/1: Do not rely on reset defaults of L2X0_AUX_CTRL

On i.MX35 the L2X0_AUX_CTRL register does not have sensible reset
default values. Allow them to be overwritten with the aux_val/aux_mask
arguments passed to l2x0_init().

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoALSA: hda - Restore cleared pin controls on resume
Takashi Iwai [Mon, 5 Jul 2010 14:50:13 +0000 (16:50 +0200)]
ALSA: hda - Restore cleared pin controls on resume

Many codecs now clear the pin controls at suspend via snd_hda_shutup_pins()
for reducing the click noise at power-off.  But this leaves some pins
uninitialized, and they'll be never recovered after resume.

This patch adds the proper recovery of cleared pin controls on resume.
Also it adds a check of bus->shutdown so that pins won't be cleared at
module unloading.

Reference: Kernel bug 16339
http://bugzilla.kernel.org/show_bug.cgi?id=16339

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoIB/qib: Use request_firmware() to load SD7220 firmware
Ben Hutchings [Thu, 1 Jul 2010 20:37:20 +0000 (20:37 +0000)]
IB/qib: Use request_firmware() to load SD7220 firmware

Extract the microcode for the QLogic QLE7220 series IB HCA and use the
kernel microcode request facility to load the microcode.  This
supports Debian Linux's requirements to separate microcode which
doesn't have open source code available from the device driver.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agoV4L/DVB: v4l: mem2mem_testdev: fix g_fmt NULL pointer dereference
Pawel Osciak [Tue, 22 Jun 2010 08:38:41 +0000 (05:38 -0300)]
V4L/DVB: v4l: mem2mem_testdev: fix g_fmt NULL pointer dereference

Calling g_fmt before s_fmt resulted in a NULL pointer dereference as no
default formats were being selected on probe.

Reported-by: Németh Márton <nm127@freemail.hu>
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoV4L/DVB: uvcvideo: Power line frequency control doesn't support GET_MIN/MAX/RES
Laurent Pinchart [Mon, 5 Jul 2010 18:24:39 +0000 (15:24 -0300)]
V4L/DVB: uvcvideo: Power line frequency control doesn't support GET_MIN/MAX/RES

Issuing a GET_MIN request on the power line frequency control times out
on at least the Apple iSight. As the UVC specification doesn't list
GET_MIN/MAX/RES as supported on that control, remove them from the
uvc_ctrls array.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoV4L/DVB: ivtv: Add delay to ensure the decoder always restarts with a blank screen
Ian Armstrong [Sun, 20 Jun 2010 18:12:28 +0000 (15:12 -0300)]
V4L/DVB: ivtv: Add delay to ensure the decoder always restarts with a blank screen

Add a short delay when stopping the decoder, allowing it to settle and
preventing some unexpected interaction with other firmware commands.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Tested-by: Martin Dauskardt <martin.dauskardt@gmx.de>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoV4L/DVB: Documentation: Add the Philips FQ1236 MK5 to video4linux/CARDLIST.tuner
Andy Walls [Fri, 18 Jun 2010 01:24:09 +0000 (22:24 -0300)]
V4L/DVB: Documentation: Add the Philips FQ1236 MK5 to video4linux/CARDLIST.tuner

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoV4L/DVB: tveeprom: Add an entry for tuner code 168: a TCL M30WTP-4N-E tuner
Andy Walls [Sat, 12 Jun 2010 23:24:24 +0000 (20:24 -0300)]
V4L/DVB: tveeprom: Add an entry for tuner code 168: a TCL M30WTP-4N-E tuner

Hauppauge EEPROM tuner code 168 has recently shown up on HVR-1600 TV
capture cards supported by the cx18 driver.  This change allows analog
tuner type autodetection to succeed for these cards.

Information for decoding tuner code 168 was provided by Hauppauge.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoV4L/DVB: tuner: Add a definition for the Philips FQ1236 MK5 NTSC tuner
Andy Walls [Sat, 12 Jun 2010 23:20:36 +0000 (20:20 -0300)]
V4L/DVB: tuner: Add a definition for the Philips FQ1236 MK5 NTSC tuner

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoV4L/DVB: OMAP_VOUT: fix: Module params were not working through bootargs
Vaibhav Hiremath [Thu, 27 May 2010 11:17:09 +0000 (08:17 -0300)]
V4L/DVB: OMAP_VOUT: fix: Module params were not working through bootargs

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Muralidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoV4L/DVB: OMAP_VOUT: fix: Replaced dma-sg with dma-contig
Vaibhav Hiremath [Thu, 27 May 2010 11:17:08 +0000 (08:17 -0300)]
V4L/DVB: OMAP_VOUT: fix: Replaced dma-sg with dma-contig

Actually OMAP doesn't support scatter-gather DMA for
Display subsystem but due to legacy coding it has been overlooked
till now.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Muralidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoV4L/DVB: OMAP_VOUT:Build FIX: Rebased against latest DSS2 changes
Vaibhav Hiremath [Thu, 27 May 2010 11:17:07 +0000 (08:17 -0300)]
V4L/DVB: OMAP_VOUT:Build FIX: Rebased against latest DSS2 changes

Changes -
- Kconfig option dependancy changed to ARCH_OMAP2/3 from
ARCH_OMAP24XX/34XX
- There are some moments of function from omap_dss_device
to omap_dss_driver. Incorporated changes for the same.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Muralidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Thu, 8 Jul 2010 19:20:54 +0000 (12:20 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IPoIB: Fix world-writable child interface control sysfs attributes
  IB/qib: Clean up properly if qib_init() fails
  IB/qib: Completion queue callback needs to be single threaded
  IB/qib: Update 7322 serdes tables
  IB/qib: Clear 6120 hardware error register
  IB/qib: Clear eager buffer memory for each new process
  IB/qib: Mask hardware error during link reset
  IB/qib: Don't mark VL15 bufs as WC to avoid a rare 7322 chip problem
  RDMA/cxgb4: Derive smac_idx from port viid
  RDMA/cxgb4: Avoid false GTS CIDX_INC overflows
  RDMA/cxgb4: Don't call abort_connection() for active connect failures
  RDMA/cxgb4: Use the DMA state API instead of the pci equivalents

13 years agoMerge branches 'cxgb4', 'ipoib' and 'qib' into for-next
Roland Dreier [Thu, 8 Jul 2010 16:10:24 +0000 (09:10 -0700)]
Merge branches 'cxgb4', 'ipoib' and 'qib' into for-next

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Thu, 8 Jul 2010 15:20:41 +0000 (08:20 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Enable beep on Realtek codecs with PCI SSID override
  ALSA: usb-audio - Add volume resolution quirk for some Logitech webcams
  ALSA: hda - Add Macbook 5,2 quirk
  ALSA: hda - Fix uninitialized variable

13 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Thu, 8 Jul 2010 15:06:40 +0000 (08:06 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  writeback: simplify the write back thread queue
  writeback: split writeback_inodes_wb
  writeback: remove writeback_inodes_wbc
  fs-writeback: fix kernel-doc warnings
  splice: check f_mode for seekable file
  splice: direct_splice_actor() should not use pos in sd

13 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Thu, 8 Jul 2010 15:05:43 +0000 (08:05 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc: Fix userspace build of ptrace.h
  powerpc: Fix default_machine_crash_shutdown #ifdef botch
  powerpc: Fix logic error in fixup_irqs
  powerpc/iseries: Fix possible null pointer dereference in iSeries_pcibios_fixup_resources
  powerpc: Linux cannot run with 0 cores
  powerpc: Fix feature-fixup tests for gcc 4.5
  powerpc: Disable SPARSE_IRQ by default
  powerpc: Fix compile errors in prom_init_check for gcc 4.5
  powerpc: Fix module building for gcc 4.5 and 64 bit
  powerpc/perf_event: Fix for power_pmu_disable()

13 years agoMerge branch 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 8 Jul 2010 15:02:18 +0000 (08:02 -0700)]
Merge branch 's5p-fixes-for-linus' of git://git./linux/kernel/git/kgene/linux-samsung

* 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: SAMSUNG: Fix on wrong function name for S5PV210 sdhci0
  ARM: S5P6442: Fix PLL setting announce message.
  ARM: SAMSUNG: Fix build without SDHCI controllers for S3C64XX
  ARM: S5PV210: Correct clock register properties
  ARM: S5P: Bug fix on external interrupt for S5P SoCs

13 years agoMerge branch 'fix/misc' into for-linus
Takashi Iwai [Thu, 8 Jul 2010 14:55:26 +0000 (16:55 +0200)]
Merge branch 'fix/misc' into for-linus

13 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Thu, 8 Jul 2010 14:55:02 +0000 (16:55 +0200)]
Merge branch 'fix/hda' into for-linus

13 years agopowerpc: Fix userspace build of ptrace.h
Sam Ravnborg [Sun, 9 May 2010 06:52:31 +0000 (08:52 +0200)]
powerpc: Fix userspace build of ptrace.h

Build of ptrace.h failed for assembly because it
pulls in stdint.h.
Use exportable types (__u32, __u64) to avoid the dependency
on stdint.h.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrey Volkov <avolkov@varma-el.com>
Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agopowerpc: Fix default_machine_crash_shutdown #ifdef botch
Paul E. McKenney [Tue, 15 Jun 2010 14:48:39 +0000 (14:48 +0000)]
powerpc: Fix default_machine_crash_shutdown #ifdef botch

crash_kexec_wait_realmode() is defined only if CONFIG_PPC_STD_MMU_64
and CONFIG_SMP, but is called if CONFIG_PPC_STD_MMU_64 even if !CONFIG_SMP.
Fix the conditional compilation around the invocation.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agopowerpc: Fix logic error in fixup_irqs
Johannes Berg [Wed, 16 Jun 2010 00:09:35 +0000 (00:09 +0000)]
powerpc: Fix logic error in fixup_irqs

When SPARSE_IRQ is set, irq_to_desc() can
return NULL. While the code here has a
check for NULL, it's not really correct.
Fix it by separating the check for it.

This fixes CPU hot unplug for me.

Reported-by: Alastair Bridgewater <alastair.bridgewater@gmail.com>
Cc: stable@kernel.org [2.6.32+]
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agopowerpc/iseries: Fix possible null pointer dereference in iSeries_pcibios_fixup_resources
Denis Kirjanov [Wed, 16 Jun 2010 05:16:59 +0000 (05:16 +0000)]
powerpc/iseries: Fix possible null pointer dereference in iSeries_pcibios_fixup_resources

I don't know if this is a right fix for the problem
since of_get_property can return NULL.
Since iseries_device_information is used only for informational purpose,
we can skip this function without valid HvSubBusNumber number.

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agopowerpc: Linux cannot run with 0 cores
Anton Blanchard [Thu, 17 Jun 2010 14:33:06 +0000 (14:33 +0000)]
powerpc: Linux cannot run with 0 cores

If we configure with CONFIG_SMP=n or set NR_CPUS less than the number of
SMT threads we will set the max cores property to 0 in the
ibm,client-architecture-support structure. On new versions of firmware that
understand this property it obliges and terminates our partition.

Use DIV_ROUND_UP so we handle not only the CONFIG_SMP=n case but also the
case where NR_CPUS isn't a multiple of the number of SMT threads.

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>